function goToUrlReplacer() {
    goToUrl = function(event) {
        if (event.tagName) {
            if (!event.selected) {
                location.href = event.getElementsByTagName('a')[0].href;
            }
        } else {
            if (event['srcElement'].tagName == 'LI') {
                if (!event['srcElement'].getElementsByTagName('a')[0].selected) {
                    location.href = event['srcElement'].getElementsByTagName('a')[0].href;
                }
            } else if (event['srcElement'].tagName == 'A') {
                if (!event['srcElement'].selected) {
                    location.href = event['srcElement'].href;
                }
            }
        }
    }
}

if (window.attachEvent) {
    window.attachEvent("onload", goToUrlReplacer, false);
}

if (window.addEventListener) {
    window.addEventListener("load", goToUrlReplacer, false);
}
