/*

    CONFIGURATION

*/

/* 
If variable isIntranet is set to true, when clicking on external links a popup 
window with a note will open instead of the real link. Default: false.
*/
var isIntranet = false;


/*

    DO NOT CHANGE

*/

/* globals */
var isDOMCapable = false;

/* DOM methods and collections used in the script */
if (document.getElementsByTagName && document.getElementById
    && document.createElement && document.createTextNode
    && document.appendChild) {
    isDOMCapable = true;
}

/* Function to fix IE's Bug showing active links and remove rectangle around links */
function init(id, src, text, introtxt) {
    if (document.getElementsByTagName) {
        var anchors = document.getElementsByTagName("a");
        for (var i = 0; i < anchors.length; i++) {
            var myAnchor = anchors[i];
            if (!myAnchor.onclick) {
                myAnchor.onclick = function () {
                    if (document.all) { // only for IE
                        this.blur();
                    }
                    if (this.href.indexOf("404.html") != -1) { // do not follow dead links
                        return false;
                    } else if (isIntranet && window.location.hostname != this.hostname) { // assume that this is an external link
                        makeNewWindow(this);
                        return false;
                    }
                    return true;
                }        
            }
        }
    }
    renderPrintLink(id, src, text, introtxt);
}

if (!document.getElementById) {
    document.getElementById = function() { return null; }
}


