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 for tabs
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).className = "tabLabelOn";
        }
        else {
            document.getElementById("tabLabel_" + i).className = "tabLabelOff";
        }
    }
}

function tabControls(countTab) {
    switchTabContent(countTab);
    highlightTab(countTab);
}

// function for tabs Type1
function switchTabContentType1(countTab) {
    var i = 1;
    var maxItem = tabControlType1.length - 1;
    for (i = 1; i <= maxItem; i++) {
        if (tabControlType1[i] == countTab) {
            document.getElementById("tabContentType1_" + i).style.display = "block";
        }
        else {
            document.getElementById("tabContentType1_" + i).style.display = "none";
        }
    }
}

function highlightTabType1(countTab) {
    var i = 1;
    var maxItem = tabControlType1.length - 1;
    for (i = 1; i <= maxItem; i++) {
        if (tabControlType1[i] == countTab) {
            document.getElementById("tabLabelType1_" + i).className = "tabLabelType1On";
        }
        else {
            document.getElementById("tabLabelType1_" + i).className = "tabLabelType1Off";
        }
    }
}

function tabControlsType1(countTab) {
    switchTabContentType1(countTab);
    highlightTabType1(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).className = "pageCountOn";
        }
        else {
            document.getElementById("page_" + i).style.display = "none";
            document.getElementById("pageCount_" + i).className = "pageCountOff";
        }
    }
}