de = document.createTextNode(L_RELOAD_TEXT);
        navCancelContainer.appendChild(textNode);
    }
}

function getDisplayValue(elem) {
    "use strict";
    var objStyle;
    if (window.getComputedStyle) {
        objStyle = window.getComputedStyle(elem);
    } else {
        objStyle = elem.currentStyle;
    }
    return objStyle.display;
}

function expandCollapse(elem, changeImage) {
    "use strict";
    if (document.getElementById) {
        var ecBlock = document.getElementById(elem);

        if (ecBlock != null) {
            if (changeImage) {
                
                elemImage = document.getElementById(elem + "Image");
            }

            
            if (!changeImage || (elemImage != null)) {
                var displayValue = getDisplayValue(ecBlock);
                if (displayValue == "none" || displayValue == null || displayValue == "") {
                    
                    ecBlock.style.display = "block";
                    if (changeImage) {
                        
                        elemImage.src = "up.png";
                    }
                }
                else if (displayValue == "block") {
                    
                    ecBlock.style.display = "none";
                    if (changeImage) {
                        
                        elemImage.src = "down.png";
                    }
                } else {
                    
                    ecBlock.style.display = "block";
                    if (changeImage) {
                        elemImage.src = "up.png";
                    }
                }
            }
        }
    }
}


function initHomepage() {
    "use strict";
    

    
    var DocURL = document.location.href;

    var poundIndex = DocURL.indexOf('#');

    if (poundIndex != -1 && poundIndex+1 < location.length && isExternalUrlSafeForNavigation(location.substring(poundIndex+1))) {

       
       var protocolIndex = DocURL.indexOf("://", 4);

       
       var serverIndex = DocURL.indexOf("/", protocolIndex + 3);

       
       var BeginURL = DocURL.indexOf("#",1) + 1;
       var urlresult = DocURL.substring(BeginURL, serverIndex);
       if (protocolIndex - BeginURL > 7)
           urlresult="";

        
       var displayresult = DocURL.substring(protocolIndex + 3, serverIndex);
    } else {
       var displayresult = "";
       var urlresult = "";
    }

    var aElement = document.createElement("A");

    aElement.innerText = displayresult;
    aElement.href = urlresult;

    homepageContainer.appendChild(aElement);
}


function initConnectionStatus() {
    "use strict";
    if (navigator.onLine) { 
        checkConnection.innerText = L_CONNECTION_ON_TEXT;
    } else {
        checkConnection.innerText = L_CONNECTION_OFF_TEXT;
    }
}

function initGoBack() {
    "use strict";
    

    if (history.length < 1) {
        
        var textNode = document.createTextNode(L_GOBACK_TEXT);
        goBackContainer.appendChild(textNode);
    } else {
        var bElement = document.createElement("A");
        bElement.innerText = L_GOBACK_TEXT ;
        bElement.href = "javascript:history.back();";
        goBackContainer.appendChild(bElement);
    }
}

function initMoreInfo(infoBlockID) {
    "use strict";
    var bElement = document.createElement("A");
    bElement.innerText = L_MOREINFO_TEXT;
    bElement.href = "javascript:expandCollapse(\'infoBlockID\', true);";
    moreInfoContainer.appendChild(bElement);

}

function initOfflineUser(offlineUserID) {
    "use strict";
    var bElement = document.createElement("A");
    bElement.innerText = L_OFFLINE_USERS_TEXT;
    bElement.href = "javascript:expandCollapse('offlineUserID', true);";
    offlineUserContainer.appendChild(bElement);
}

function initUnframeContent() {
    "use strict";
    var location = window.location.href;
    var poundIndex = location.indexOf('#');

    if (poundIndex != -1 && poundIndex+1 < location.length && isExternalUrlSafeForNavigation(location.substring(poundIndex+1))) {
        document.getElementById("whatToDoIntro").style.display="";
        document.getElementById("whatToDoBody").style.display="";
    }
}

function removeNoScriptElements() {
    "use strict";
    var noScriptElements = document.getElementsByTagName("noscript");
    for (var i = noScriptElements.length - 1; i >= 0; i--) {
        var bElement = noScriptElements[i];
        if (bElement !== null) {
            bElement.parentNode.removeChild(bElement);
        }
    }
}

function makeNewWindow() {
    "use strict";
    var location = window.location.href;
    var poundIndex = location.indexOf('#');

    if (poundIndex != -1 && poundIndex+1 < location.length && isExternalUrlSafeForNavigation(location.substring(poundIndex+1))) {
        window.open(location.substring(poundIndex+1));
    }
}

function setTabInfo(tabInfoBlockID) {
    "use strict";
    
    var bPrevElement = document.getElementById("tabInfoTextID");
    var bPrevImage   = document.getElementById("tabInfoBlockIDImage");

    if (bPrevElement != null) {
        tabInfoContainer.removeChild(bPrevElement);
    }

    if (bPrevImage != null) {
        tabImageContainer.removeChild(bPrevImage);
    }

    var bElement = document.createElement("A");
    var bImageElement = document.createElement("IMG");

    var ecBlock = document.getElementById(tabInfoBlockID);

    
    if ((ecBlock != null) &&
        (getDisplayValue(ecBlock) == "none" || getDisplayValue(ecBlock) == null || getDisplayValue(ecBlock) == "")) {
        bElement.innerText = L_SHOW_HOTKEYS_TEXT;
        bImageElement.alt = L_SHOW_HOTKEYS_TEXT;
        bImageElement.src="down.png";
    } else {
        bElement.innerText = L_HIDE_HOTKEYS_TEXT;
        bImageElement.alt = L_HIDE_HOTKEYS_TEXT;
        bImageElement.src="up.png";
    }

    bElement.id = "tabInfoTextID";
    bElement.href = "javascript:expandCollapse(\'tabInfoBlockID\', false); setTabInfo('tabInfoBlockID');";


    bImageElement.id="tabInfoBlockIDImage";
    bImageElement.border="0";
    bImageElement.className="actionIcon";

    tabInfoContainer.appendChild(bElement);
    tabImageContainer.appendChild(bImageElement);
}

function launchInternetOptions() {
    "use strict";
    window.external.msLaunchInternetOptions();
}

function diagnoseConnection() {
    "use strict";
    window.external.DiagnoseConnection();
}

function diagnoseConnectionAndRefresh() {
    "use strict";
    window.external.DiagnoseConnection();
    if (navigator.onLine) { 
        clickRefresh();
    }
}

function getInfo() {
    "use strict";
    
    checkConnection();

    
    if (document.addEventListener) {
        addEventListener("offline", reportConnectionEvent, false);
    } else {
        attachEvent("onoffline", reportConnectionEvent);
    }

    
    document.body.ononline = reportConnectionEvent;
    document.body.onoffline = reportConnectionEvent;
}

function checkConnection() {
