function initializeHighlightTab() {
    var currentUrl = window.location.href;
    var currentQueryStr = unescape(currentUrl);
    var defaultUrl = currentUrl.split("/");
    var currentQuery = currentQueryStr.split("=");
    //alert(defaultUrl[6]);
    //alert(currentQuery[1]);
    var i = 1;
    var max = currentLabel.length - 1;
    for (i = 1; i <= max; i++) {
        if (defaultUrl[6] == "default.mspx") {
            //alert("Label:" + currentLabel[i] + ", Query" + currentQuery[1]);
            document.getElementById("tabLabel_" + i).style.color = "#1b6169";
            document.getElementById("tabLabel_1").style.backgroundColor = "white";
        }
        else {
            if (currentLabel[i] == currentQuery[1]) {
                //alert("Label:" + currentLabel[i] + ", Query" + currentQuery[1]);
                document.getElementById("tabLabel_" + i).style.color = "#1b6169";
                document.getElementById("tabLabel_" + i).style.backgroundColor = "white";
                document.getElementById("tabContent_" + i).style.display = "block";
            }

            else {
                document.getElementById("tabContent_" + i).style.display = "none";
                //alert("Label:" + currentLabel[i] + ", Query" + currentQuery[1]);
                //document.getElementById("tabLabel_" + i).style.backgroundColor = "transparent";
            }
        }
    }
}

function switchTabContent(countTab) {
    var i = 1;
    var maxItem = tabControl.length - 1;
    for (i = 1; i <= maxItem; i++) {
        if (tabControl[i] == countTab) {
            document.getElementById("tabContent_" + i).style.display = "block";
        }
        else {
            document.getElementById("tabContent_" + i).style.display = "none";
        }
    }
}

function highlightTab(countTab) {
    var i = 1;
    var maxItem = tabControl.length - 1;
    for (i = 1; i <= maxItem; i++) {
        if (tabControl[i] == countTab) {
            document.getElementById("tabLabel_" + i).style.backgroundColor = "white";
            document.getElementById("tabLabel_" + i).style.color = "#1b6169";
        }
        else {
            document.getElementById("tabLabel_" + i).style.backgroundColor = "transparent";
            document.getElementById("tabLabel_" + i).style.color = "#434343";
        }
    }
}

function tabControls(countTab) {
    switchTabContent(countTab);
    highlightTab(countTab);
}


function switchPage(countPage) {
    var i = 1;
    var maxItem = multiPage.length - 1;
    for (i = 1; i <= maxItem; i++) {
        if (multiPage[i] == countPage) {
            document.getElementById("page_" + i).style.display = "block";
            document.getElementById("pageCount_" + i).style.backgroundImage = "url(/germany/gruender/templates/images/countPages_on.gif)";
            document.getElementById("pageCount_" + i).style.color = "#000000";
        }
        else {
            document.getElementById("page_" + i).style.display = "none";
            document.getElementById("pageCount_" + i).style.backgroundImage = "url(/germany/gruender/templates/images/countPages_off.gif)";
            document.getElementById("pageCount_" + i).style.color = "#000000";
        }
    }
}