// Function to allow multiple onload functions to be called
function multipleOnload() {
    externalLinks();
}
window.onload = multipleOnload;
// end function

//replaces deprecated target="_blank" markup
//to permit a link opening in a new window
function externalLinks() {
    if (!document.getElementsByTagName)return;
    var anchors = document.getElementsByTagName("a");
    for (var i = 0; i < anchors.length; i++) {
        var anchor = anchors[i];
        if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") {
            anchor.target = "_blank";
            anchor.title = (anchor.title != "") ? anchor.title + " (This link opens in a new window.)" : "This link opens in a new window.";
            anchor.className = (anchor.className != '') ? anchor.className + ' external' : 'external';
        }
    }
}

//this test to see if JavaScript is off
//if so, opens the link in the standard way
function launchWindow(objAnchor, objEvent) {
    var iKeyCode;
    if (objEvent && objEvent.type == 'keypress') {
        if (objEvent.keyCode)iKeyCode = objEvent.keyCode;
        else if (objEvent.which)iKeyCode = objEvent.which;
        if (iKeyCode != 13 && iKeyCode != 32)return true;
    }
    var canOpen = window.open(objAnchor);
    if (!canOpen)document.location.href = objAnchor.getAttribute("href");
    return !canOpen;
}
