function open_window() {
    window.open(this.href, '_blank');
    return false;
}
function initialize()
{
    var isIE = navigator.appName.charAt(0)=="M" ? true : false;
    if (isIE && document.execCommand) {
        document.execCommand("BackgroundImageCache", false, true);
    }

    var els = document.getElementsByTagName('a');
    for (var i = 0; i < els.length; i++) {
        if (els[i].href.match(/\.pdf\??[0-9]*$/i)) {
            els[i].onclick = open_window;
            if (els[i].getElementsByTagName('img').length == 0) {
                els[i].className = 'pdf';
            }
            if (els[i].parentNode.tagName == 'LI') {
                els[i].parentNode.style.listStyle = 'none';
                els[i].parentNode.style.left = '-20px';
                els[i].parentNode.style.position = 'relative';
            }
        } else if (els[i].href.match(/\.doc\??$/i)) {
            els[i].className = 'doc';
            if (els[i].parentNode.tagName == 'LI') {
                els[i].parentNode.style.listStyle = 'none';
                els[i].parentNode.style.left = '-20px';
                els[i].parentNode.style.position = 'relative';
            }
        } else if (els[i].href.match(/\.zip\??$/i)) {
            els[i].className = 'zip';
            if (els[i].parentNode.tagName == 'LI') {
                els[i].parentNode.style.listStyle = 'none';
                els[i].parentNode.style.left = '-20px';
                els[i].parentNode.style.position = 'relative';
            }
        } else if (els[i].href.match(/\.txt$/i)) {
            els[i].className = 'txt';
            els[i].onclick = open_window;
        }
    }
}

