﻿var serverPath = '/';
function GetCompleteServerPath() {
    var server = window.location.pathname;
    if (server == '/') {
        serverPath = server;
    }
    else {
        serverPath = server + '/';
    }
}

function ShowNavigation1(cntrlId, controllerName, actionName) {
    GetCompleteServerPath();
    var hashValue = document.location.hash;
    if (hashValue.length > 0) {
        var url = hashValue.replace('#', '').split('/');
        controllerName = url[0];
        var str = "";
        for (var i = 1; i < url.length; i++) {
            str = str + url[i];
            if (parseInt(url.length) != parseInt(i) + 1) {
                str = str + "/";
            }
        }
        cntrlId = str;
        document.location.hash = controllerName + "/" + cntrlId;
        document.getElementById('hash').value = controllerName + "/" + cntrlId;
    }
    else {
        document.location.hash = controllerName + "/" + cntrlId;
    }
    $.ajax(
    {

        type: "POST",
        url: serverPath + controllerName + "/" + actionName, 
        //url: "/" + controllerName + "/" + actionName,
        //url: window.location.pathname + "/" + controllerName + "/" + actionName,
        data: "Display=" + cntrlId,
        dataType: "html",
        async: false,
        success: function (result) {
            $("#contentDiv").html(result);
        }
    });

}

function ContactUs1(cntrlId, controllerName, actionName) {

    var indexRequestType = document.getElementsByName('requestType');
    var RequestType = ' ';
    for (var i = 0; i < indexRequestType.length; i++) {
        if (indexRequestType[i].checked) {
            RequestType = indexRequestType[i].value;
        }
    }
    var boolReturn = ValidateRequest(RequestType);
    if (RequestType == null || RequestType == ' ') {
        return;
    }
    if (!boolReturn) {
        return;
    }
    var Comments = document.getElementById('comments').value;
    var Name = document.getElementById('name').value;
    var Company = document.getElementById('company').value;
    var Telephone = document.getElementById('telephone').value;
    var Fax = document.getElementById('fax').value;
    var Email = document.getElementById('email').value;
    var City = document.getElementById('city').value;
    var State = document.getElementById('state').value;
    var Zip = document.getElementById('zip').value;
    var Country = document.getElementById('country').value;
    var Address = document.getElementById('address').value;
    var Address2 = document.getElementById('address2').value;
    var SpecifierName = document.getElementById('specifierName').value;
    var SpecifierLocation = document.getElementById('specifierLocation').value;
    var ProjectName = document.getElementById('projectName').value;
    var ProjectLocation = document.getElementById('projectLocation').value;
    var ProjectDescription = document.getElementById('projectDescription').value;
    var VltEquipmentDescription = document.getElementById('vltEquipmentDescription').value;


    var url = controllerName + "/" + cntrlId;
    var mainUrl = url.split('?');
    document.location.hash = mainUrl[0];
    //    $("#contentDiv").fadeIn(400).html('<span style="color:#ffff">Please wait...</span>');
    //$("#contentDiv").fadeIn(400).html('<img src="/Images/images/loading.gif" style="margin-left:150px;margin-top:150px" alt="please wait ..." >&nbsp;');
    //$("#contentDiv").fadeIn(400).html('<img src="' + window.location.pathname + '/Images/images/loading.gif" style="margin-left:150px;margin-top:150px" alt="please wait ..." />');
    $("#contentDiv").fadeIn(400).html('<img src="' + serverPath + 'Images/images/loading.gif" style="margin-left:150px;margin-top:150px" alt="please wait ..." />');
    $.ajax(
    {
        type: "GET",
        //url: "/" + controllerName + "/" + actionName,
        //url: window.location.pathname + "/" + controllerName + "/" + actionName,
        url: serverPath + controllerName + "/" + actionName,
        data: "Display=" + cntrlId + ':' + Name + ':' + Company + ':' + Telephone + ':' + Fax + ':' + Email + ':' + City + ':' + State + ':' + Zip + ':' + Country + ':' + Address + ':' + Address2 + ':' + SpecifierName + ':' + SpecifierLocation + ':' + ProjectName + ':' + ProjectLocation + ':' + ProjectDescription + ':' + VltEquipmentDescription + ':' + Comments,
        dataType: "html",
        success: function (result) {
            //alert(result);
            $("#contentDiv").html(result);
            $("#ContactUsDiv").html("<p class='font_22blueNormal'>thank you for submitting your request/sending your feedback</P>");
        }
    });
}

function SearchNavigation() {
   var searchTerm = document.getElementById('searchText').value;
    var pageUrl = GetUrl(searchTerm);
    var url = pageUrl.split('/');
    var actionName = "Index";
    var controllerName = url[0];
    var cntrlId = "";

    if (url.length == 2) {
        cntrlId = url[1];
    }
    if (url.length == 3) {
        cntrlId = url[1] + "/" + url[2];
    }
    if (url.length == 4) {
        cntrlId = url[1] + "/" + url[2] + "/" + url[3];
    }

    document.location.hash = pageUrl;  //mainUrl[0];
//    $("#contentDiv").fadeIn(400).html('<img src="' + serverPath + 'Images/images/loading.gif" style="margin-left:150px;margin-top:150px" alt="please wait ..." />');
//    //$("#contentDiv").fadeIn(400).html('<img src="/Images/images/loading.gif" style="margin-left:150px;margin-top:150px" alt="please wait ..." >&nbsp;');
//    //$("#contentDiv").fadeIn(400).html('<img src="' + window.location.pathname + '/Images/images/loading.gif" style="margin-left:150px;margin-top:150px" alt="please wait ..." />');
//    $.ajax(
//        {
//            type: "POST",
//            url: serverPath + controllerName + "/" + actionName, 
//            //url: "/" + controllerName + "/" + actionName,
//            //url: window.location.pathname + "/" + controllerName + "/" + actionName,
//            data: "Display=" + cntrlId,
//            dataType: "html",
//            success: function (result) {
//                $("#contentDiv").html(result);
//            }
//        });
}

function ShowNavigation(cntrlId, controllerName, actionName) {
    var url = controllerName + "/" + cntrlId;
    var mainUrl = url.split('?');
    document.location.hash = mainUrl[0];
    document.getElementById('hash').value = url;
    $("#contentDiv").fadeIn(400).html('<img src="' + serverPath + 'Images/images/loading.gif" style="margin-left:150px;margin-top:150px" alt="please wait ..." />');
    //$("#contentDiv").fadeIn(400).html('<img src="/Images/images/loading.gif" style="margin-left:150px;margin-top:150px" alt="please wait ..." >&nbsp;');
    //$("#contentDiv").fadeIn(400).html('<img src="' + window.location.pathname + '/Images/images/loading.gif" style="margin-left:150px;margin-top:150px" alt="please wait ..." />');
    $.ajax(
    {
        type: "POST",
        url: serverPath + controllerName + "/" + actionName, 
        //url: "/" + controllerName + "/" + actionName,
        //url: window.location.pathname + "/" + controllerName + "/" + actionName,
        data: "Display=" + cntrlId,
        dataType: "html",
        success: function (result) {
            $("#contentDiv").html(result);
        }
    });

}

function asyncshownavigation(cntrlId, controllerName, actionName) {
    var url = controllerName + "/" + cntrlId;
    var mainUrl = url.split('?');
    document.location.hash = mainUrl[0];
    document.getElementById('hash').value = mainUrl[0];
    $("#contentDiv").fadeIn(400).html('<img src="' + serverPath + 'Images/images/loading.gif" style="margin-left:150px;margin-top:150px" alt="please wait ..." />');
    //$("#contentDiv").fadeIn(400).html('<img src="/Images/images/loading.gif" style="margin-left:150px;margin-top:150px" alt="please wait ..." >&nbsp;');
    //$("#contentDiv").fadeIn(400).html('<img src="' + window.location.pathname + '/Images/images/loading.gif" style="margin-left:150px;margin-top:150px" alt="please wait ..." />');
    $.ajax(
    {
        type: "POST",
        url: serverPath + controllerName + "/" + actionName, 
        //url: "/" + controllerName + "/" + actionName,
        //url: window.location.pathname + "/" + controllerName + "/" + actionName,
        data: "Display=" + cntrlId,
        dataType: "html",
        async: false,
        success: function (result) {
            $("#contentDiv").html(result);
        }
    });

}


function ShowPopups(cntrlId, controllerName, actionName, className) {
    var url = controllerName + "/" + cntrlId;
    var mainUrl = url.split('?');

    $.ajax(
    {
        type: "POST",
        url: serverPath + controllerName + "/" + actionName, 
        //url: "/" + controllerName + "/" + actionName,
        //url: window.location.pathname + "/" + controllerName + "/" + actionName,
        data: "Display=" + cntrlId,
        dataType: "html",
        success: function (result) {
            removeClass('light1');
            changeClass('light1', className);
            document.getElementById('light1').style.display = 'block';
            document.getElementById('fade1').style.display = 'block'
            $("#light1").html(result);
        }
    });

}

function HidePopup() {
    var url = document.location.hash;
    document.getElementById('fade1').style.display = 'none';
    document.getElementById('light1').style.display = 'none';
    document.location.hash = url;
}

function RenderPartialView(cntrlId, partialView, controllerName, actionName, ID, divID) {
    var url = controllerName + "/" + cntrlId;
    var e = document.getElementById(ID);
    var strUser = e.options[e.selectedIndex].value;
    document.location.hash = url;
    $.ajax(
    {
        type: "POST",
        url: serverPath + controllerName + "/" + actionName, 
        //url: "/" + controllerName + "/" + actionName,
        //url: window.location.pathname + "/" + controllerName + "/" + actionName,
        data: "Display=" + partialView + ':' + strUser,
        dataType: "html",
        success: function (result) {
            $("#" + divID).html(result);
        }
    });
}

function ShowSearchView(cntrlId, controllerName, actionName) {
    var url = controllerName + "/" + cntrlId;
    document.location.hash = url;
    document.getElementById('hash').value = url;
    $("#contentDiv").fadeIn(400).html('<img src="' + serverPath + 'Images/images/loading.gif" style="margin-left:150px;margin-top:150px" alt="please wait ..." />');
    //$("#" + divID).fadeIn(400).html('<img src="/Images/images/loading.gif" style="margin-left:150px;margin-top:150px" alt="please wait ..." >&nbsp;');
    //$("#" + divID).fadeIn(400).html('<img src="' + window.location.pathname + '/Images/images/loading.gif" style="margin-left:150px;margin-top:150px" alt="please wait ..." />');
    $.ajax(
    {
        type: "POST",
        url: serverPath + controllerName + "/" + actionName, 
        //url: "/" + controllerName + "/" + actionName,
        //url: window.location.pathname + "/" + controllerName + "/" + actionName,
        data: "Display=" + cntrlId,
        dataType: "html",
        success: function (result) {
            $("#" + divID).html(result);
        }
    });
}

function ContactUs(cntrlId, controllerName, actionName) {
    var url = controllerName + "/" + cntrlId;
    var mainUrl = url.split('?');
    document.location.hash = mainUrl[0];
    document.getElementById('hash').value = url;
    $("#contentDiv").fadeIn(400).html('<img src="' + serverPath + 'Images/images/loading.gif" style="margin-left:150px;margin-top:150px" alt="please wait ..." />');
    //$("#" + divID).fadeIn(400).html('<img src="/Images/images/loading.gif" style="margin-left:150px;margin-top:150px" alt="please wait ..." >&nbsp;');
    //$("#" + divID).fadeIn(400).html('<img src="' + window.location.pathname + '/Images/images/loading.gif" style="margin-left:150px;margin-top:150px" alt="please wait ..." />');
    $.ajax(
    {
        type: "GET",
        url: serverPath + controllerName + "/" + actionName, 
        //url: "/" + controllerName + "/" + actionName,
        //url: window.location.pathname + "/" + controllerName + "/" + actionName,
        data: "Display=" + cntrlId,
        dataType: "html",
        success: function (result) {
            //alert(result);
            $("#contentDiv").html(result);
        }
    });
}

var selectedCard = "right_bottom_02.gif";
function ShufImages() {
    var ImgPath = serverPath + 'Images/images/cards/';
    //var ImgPath = 'Images/images/cards/';
    //var ImgPath = window.location.pathname + '/Images/images/cards/';
    var ImgAry = new Array('right_bottom_01.gif', 'right_bottom_02.gif', 'right_bottom_03.gif', 'right_bottom_04.gif', 'right_bottom_05.gif', 'right_bottom_06.gif');
    var RandomNu;
    var ImgCnt = 1;
    while (ImgCnt < ImgAry.length) {
        RandomNu = Math.floor(Math.random() * (ImgAry.length));

        if (ImgAry[RandomNu] != 'X') {
            //document.getElementById('I' + ImgCnt).src = ImgPath + ImgAry[RandomNu];
            document.getElementById('CardsImage').src = ImgPath + ImgAry[RandomNu];
            var selectedImage = ImgAry[RandomNu];
            selectedCard = selectedImage;
            document.getElementById('CardsImage').onclick = function () { foo(selectedCard); }
            ImgAry[RandomNu] = 'X';
            ImgCnt++;
        }
    }
}
function foo(imgName) {
    //alert(imgName);
}
function selectedCardPopup() {
    if (selectedCard == "right_bottom_01.gif")
        ShowPopups('Cards/Card1', 'Home', 'Index', ' white_content_Card4');
    if (selectedCard == "right_bottom_02.gif")
        ShowPopups('Cards/Card2', 'Home', 'Index', ' white_content_Card3');
    if (selectedCard == "right_bottom_03.gif")
        ShowPopups('Cards/Card3', 'Home', 'Index', ' white_content_Card3');
    if (selectedCard == "right_bottom_04.gif")
        ShowPopups('Cards/Card4', 'Home', 'Index', ' white_content_Card4');
    if (selectedCard == "right_bottom_05.gif")
        ShowPopups('Cards/Card5', 'Home', 'Index', ' white_content_Card5');
    if (selectedCard == "right_bottom_06.gif")
        ShowPopups('Cards/Card6', 'Home', 'Index', ' white_content_Card4');
    return false;
}

var site = {};
function $get(stringId) {
    return document.getElementById(stringId);
}
function checkHash() {
    setInterval(function (e) {
        var gethash = document.location.hash;
        var pagehash = gethash.split('#')[1];
        var currenthash = $get('hash');
        if (pagehash != currenthash.value) {
            ShowNavigation1('Homepage', 'Home', 'Index');
            return false;
        }
    }, 500);
}
site.init = function () {
    if (window.addEventListener) {
        window.addEventListener('load', function (a) {
            checkHash();
        }, false);
    }
    if (window.ActiveXObject) {
        window.attachEvent('onload', function (a) {
            checkHash();
        });
    }
};

site.init();

function ShowDivs(divId, ucName, tabID1) {
    ClearDivs(ucName);
    changeClass(tabID1, " selected-tab");
    document.getElementById(divId).style.display = 'block';
}
function ClearDivs(ucName) {
    document.getElementById(ucName + 'IntrodcTab').style.display = 'none';
    document.getElementById(ucName + 'SpecificationTab').style.display = 'none';
    document.getElementById(ucName + 'DownLoadTab').style.display = 'none';
    document.getElementById(ucName + 'ProductsTab').style.display = 'none';
    document.getElementById(ucName + 'DriversTab').style.display = 'none';

    removeClass('IntrodcTab');
    removeClass('SpecificationTab');
    removeClass('DownLoadTab');
    removeClass('ProductsTab');
    removeClass('DriversTab');
}

function removeClass(elementID) {
    var element = document.getElementById(elementID);
    //var strReplace = element.className.replace(/\bselected-tab\b/, '');"/\b"+cssName+"\b/";
    element.className = '';
    //alert(strReplace);
    //    element.setAttribute("class", newClass); //For Most Browsers
    //    element.setAttribute("className", newClass); //For IE; harmless to other browsers.
}

function changeClass(elementID, newClass) {
    var element = document.getElementById(elementID);
    element.className += newClass;
    //element.setAttribute("class", newClass); //For Most Browsers
    //element.setAttribute("className", newClass); //For IE; harmless to other browsers.
}
function ShowSubDivs(divId, tabID) {
    ClearSubDivs();
    changeClass(tabID, " selected");
    document.getElementById(divId).style.display = 'block';
}

function ClearSubDivs() {
    document.getElementById('fundamentalsDiv').style.display = 'none';
    document.getElementById('photometricsDiv').style.display = 'none';
    removeClass('pyxisspec2');
    removeClass('pyxisspec1');
}

function ShowCorvusSubDivs(divId, tabID) {
    document.getElementById('corvus1rDiv').style.display = 'none';
    document.getElementById('corvus3rDiv').style.display = 'none';
    removeClass('pyxisProduct1');
    removeClass('pyxisProduct2');
    changeClass(tabID, " selected");
    document.getElementById(divId).style.display = 'block';
}

function ShowxpoledDriversSubDivs(divId, tabID) {
    document.getElementById('xpo-ledDriverSelectorDiv').style.display = 'none';
    document.getElementById('xpo-ledDriverTypesDiv').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
    removeClass('xpodrivers1');
    removeClass('xpodrivers2');
    changeClass(tabID, " selected");
}
function ShowRoblonDiv(divID, tabID1) {
    document.getElementById('displayLightingRoblonDiv').style.display = 'none';
    document.getElementById('accentLightingRoblonDiv').style.display = 'none';
    document.getElementById(divID).style.display = 'block';
    removeClass('displayLightingRoblon');
    removeClass('accentLightingRoblon');
    changeClass(tabID1, ' selected-tab');
}
function ShowxpoledProductsSubDivs(divId, tabID) {
    document.getElementById('xpo-ledDesignRulesDiv').style.display = 'none';
    document.getElementById('xpo-ledBasicsDiv').style.display = 'none';
    document.getElementById('xpo-ledAdvancedDiv').style.display = 'none';
    document.getElementById('xpo-ledAccessoriesDiv').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
    removeClass('xpoProduct1');
    removeClass('xpoProduct2');
    removeClass('xpoProduct3');
    removeClass('xpoProduct4');
    changeClass(tabID, " selected");
}
function ShowxpoledSpecificationSubDivs(divId, tabID) {
    document.getElementById('fundamentalsDiv').style.display = 'none';
    document.getElementById('planningDiv').style.display = 'none';
    document.getElementById('photometricsDiv').style.display = 'none';
    document.getElementById('chromaticDetailsDiv').style.display = 'none';
    document.getElementById('thermalDetailsDiv').style.display = 'none';
    document.getElementById('lifetimeDiv').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
    removeClass('xpospec1');
    removeClass('xpospec2');
    removeClass('xpospec3');
    removeClass('xpospec4');
    removeClass('xpospec5');
    removeClass('xpospec6');
    changeClass(tabID, " selected");
}
function ShowPyxisProdctsSubDivs(divId, tabID) {
    ClearPyxisProdctsSubDivs();
    changeClass(tabID, " selected");
    document.getElementById(divId).style.display = 'block';
}

function ClearPyxisProdctsSubDivs() {
    document.getElementById('pyxis1nDiv').style.display = 'none';
    document.getElementById('pyxis1rDiv').style.display = 'none';
    document.getElementById('pyxis1sDiv').style.display = 'none';
    document.getElementById('pyxis3rDiv').style.display = 'none';

    removeClass('pyxisProduct1');
    removeClass('pyxisProduct2');
    removeClass('pyxisProduct3');
    removeClass('pyxisProduct4');
}

function ShowLibraSubDivs(divId, tabID1) {
    document.getElementById('librafundamentalsDiv').style.display = 'none';
    document.getElementById('libraphotometricsDiv').style.display = 'none';
    document.getElementById('librachromaticityDiv').style.display = 'none';
    document.getElementById('librathermalDiv').style.display = 'none';
    document.getElementById('libralifetimeDiv').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
    removeClass('libraspec1');
    removeClass('libraspec2');
    removeClass('libraspec3');
    removeClass('libraspec4');
    removeClass('libraspec5');
    changeClass(tabID1, " selected");
}

function ShowLibraProdctsSubDivs(divId, tabID1) {
    document.getElementById('librastandaradDiv').style.display = 'none';
    document.getElementById('libracustomDiv').style.display = 'none';
    document.getElementById('libraaccessoriesDiv').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
    removeClass('libraProduct1');
    removeClass('libraProduct2');
    removeClass('libraProduct3');
    changeClass(tabID1, " selected");
}

function ShowvltledDriversSubDivs(divId) {
    document.getElementById('vltledDriversTab').style.display = 'none';
    document.getElementById('vltledControlsTab').style.display = 'none';
    document.getElementById('vltledDownLoadTab').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
}

function vimaShowDivs(divId, tabID) {
    document.getElementById('vimaSpecsTab').style.display = 'none';
    document.getElementById('vimaDimensionsTab').style.display = 'none';
    document.getElementById('vimaConfiguratorTab').style.display = 'none';
    document.getElementById('vimaAccessoriesTab').style.display = 'none';
    document.getElementById('vimaDriversTab').style.display = 'none';
    document.getElementById('vimaDownLoadTab').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
    removeClass("fotab1");
    removeClass("fotab2");
    removeClass("fotab3");
    removeClass("fotab4");
    removeClass("fotab5");
    removeClass("fotab6");
    changeClass(tabID, " selected-tab");
}

function vimaEleganceShowDivs(divId, tabID) {
    document.getElementById('vimaEleganceSpecsTab').style.display = 'none';
    document.getElementById('vimaEleganceDimensionsTab').style.display = 'none';
    document.getElementById('vimaEleganceDriversTab').style.display = 'none';
    document.getElementById('vimaEleganceDownLoadTab').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
    removeClass("fotab1");
    removeClass("fotab2");
    removeClass("fotab3");
    removeClass("fotab4");
    changeClass(tabID, " selected-tab");
}

function ShowRoblonDriversSubDivs(divId, tabID1) {
    document.getElementById('roblonDriversTab').style.display = 'none';
    document.getElementById('roblonDownLoadTab').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
    removeClass('DriversTab');
    removeClass('DownLoadTab');
    changeClass(tabID1, " selected-tab");
}
function fiberEducationShowDivs(divId) {
    document.getElementById('fiberEducationIntroTab').style.display = 'none';
    document.getElementById('fiberEducationLuxCalcTab').style.display = 'none';
    document.getElementById('fiberEducationRCPTab').style.display = 'none';
    document.getElementById('fiberEducationAdvantagesTab').style.display = 'none';
    document.getElementById('fiberEducationHalogenTab').style.display = 'none';
    document.getElementById('fiberEducationPMMATab').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
}

function illAccessoriesShowDivs(divId) {
    document.getElementById('illAccessoriesColorWheelsTab').style.display = 'none';
    document.getElementById('illAccessoriesLampsTab').style.display = 'none';
    document.getElementById('illAccessoriesEffectsTab').style.display = 'none';
    document.getElementById('illAccessoriesDownloadTab').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
}

function fiberAccessoriesShowDivs(divId) {
    document.getElementById('fiberAccessoriesMountingTab').style.display = 'none';
    document.getElementById('fiberAccessoriesEndsealsTab').style.display = 'none';
    document.getElementById('fiberAccessoriesEducationTab').style.display = 'none';
    document.getElementById('fiberAccessoriesDownloadTab').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
}

function fiberSysAccessoriesShowDivs(divId, tabId) {
    document.getElementById('fiberSysHarnessingTab').style.display = 'none';
    document.getElementById('fiberSysTerminationsTab').style.display = 'none';
    document.getElementById('fiberSysControlsTab').style.display = 'none';
    document.getElementById('fiberSysLampsTab').style.display = 'none';
    document.getElementById('fiberToolsTab').style.display = 'none';
    document.getElementById('fiberSysDownloadTab').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
    removeClass('fotab1');
    removeClass('fotab2');
    removeClass('fotab3');
    removeClass('fotab4');
    removeClass('fotab5');
    removeClass('fotab6');
    changeClass(tabId, ' selected-tab');
}

function chandeliersShowDivs(divId, tabId) {
    document.getElementById('chandeliersIntroductionTab').style.display = 'none';
    document.getElementById('chandeliersGalleryTab').style.display = 'none';
    document.getElementById('chandeliersDownloadsTab').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
    removeClass('fotab1');
    removeClass('fotab2');
    removeClass('fotab3');
    changeClass(tabId, ' selected-tab');
}

function foGalaxyShowDivs(divId, tabID) {
    document.getElementById('foGalaxyFOCablesTab').style.display = 'none';
    document.getElementById('foGalaxyStarfieldsTab').style.display = 'none';
    document.getElementById('foGalaxyGalleryTab').style.display = 'none';
    document.getElementById('foGalaxyEducationTab').style.display = 'none';
    document.getElementById('foGalaxyDownloadsTab').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
    removeClass("fotab1");
    removeClass("fotab2");
    removeClass("fotab3");
    removeClass("fotab4");
    removeClass("fotab5");
    changeClass(tabID, " selected-tab");
}

function foLightPanelShowDivs(divId, tabID) {
    document.getElementById('foLightPanelIntroTab').style.display = 'none';
    document.getElementById('foLightPanelConfiguratorTab').style.display = 'none';
    document.getElementById('foLightPanelEducationTab').style.display = 'none';
    document.getElementById('foLightPanelAccessoriesTab').style.display = 'none';
    document.getElementById('foLightPanelDownloadsTab').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
    removeClass("fotab1");
    removeClass("fotab2");
    removeClass("fotab3");
    removeClass("fotab4");
    removeClass("fotab5");
    changeClass(tabID, " selected-tab");
}

function foLightChannelShowDivs(divId, tabID) {
    document.getElementById('foLightChannelIntroTab').style.display = 'none';
    document.getElementById('foLightChannelConfiguratorTab').style.display = 'none';
    document.getElementById('foLightChannelEducationTab').style.display = 'none';
    document.getElementById('foLightChannelForGlassTab').style.display = 'none';
    document.getElementById('foLightChannelAccessoriesTab').style.display = 'none';
    document.getElementById('foLightChannelDownloadsTab').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
    removeClass("fotab1");
    removeClass("fotab2");
    removeClass("fotab3");
    removeClass("fotab4");
    removeClass("fotab5");
    removeClass("fotab6");
    changeClass(tabID, " selected-tab");
}

// KKDC TimiSeries Tab Show......

function TimiSeriesShowDivs(divId, ucName, tabID) {
    document.getElementById(ucName + 'ConfiguratorTab').style.display = 'none';
    document.getElementById(ucName + 'SpecificationTab').style.display = 'none';
    document.getElementById(ucName + 'AcccessoriesTab').style.display = 'none';
    document.getElementById(ucName + 'DownloadTab').style.display = 'none';
    document.getElementById(ucName + 'DriversTab').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
    removeClass("kkdctab1");
    removeClass("kkdctab2");
    removeClass("kkdctab3");
    removeClass("kkdctab4");
    removeClass("kkdctab5");
    changeClass(tabID, " selected-tab");
}
function DriversShowDivs(divId, ucName) {
    document.getElementById(ucName + 'DriversTab').style.display = 'none';
    document.getElementById(ucName + 'DriversControlsTab').style.display = 'none';
    document.getElementById(ucName + 'DriversDownloadTab').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
}
function KKDCShowDivs(divId, newClass) {
    document.getElementById('kkdcLinearTab').style.display = 'none';
    document.getElementById('kkdcFlexibleTab').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
    removeClass('kkdcTabs');
    changeClass('kkdcTabs', newClass);
}

//*****Neptune*****
function neptuneShowDivs(divId, tabId) {
    document.getElementById('neptuneIntroductionTab').style.display = 'none';
    document.getElementById('neptuneSpecificationsTab').style.display = 'none';
    document.getElementById('neptuneDownloadsTab').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
    removeClass('fotab1');
    removeClass('fotab2');
    removeClass('fotab3');
    changeClass(tabId, ' selected-tab');
}

function neptuneIntroShowSubDivs(divId) {
    document.getElementById('neptuneIntroductionSubTab1').style.display = 'none';
    document.getElementById('neptuneIntroductionSubTab2').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
}

//*****Atlantis*****

function atlantisShowDivs(divId, tabId) {
    document.getElementById('atlantisAccessoriesTab').style.display = 'none';
    document.getElementById('atlantisSpecificationsTab').style.display = 'none';
    document.getElementById('atlantisDownloadsTab').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
    removeClass('fotab1');
    removeClass('fotab2');
    removeClass('fotab3');
    changeClass(tabId, ' selected-tab');
}

//*****Sirius*****

function siriusShowDivs(divId) {
    document.getElementById('siriusSpecificationsTab').style.display = 'none';
    document.getElementById('siriusDownloadsTab').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
}

//*****Reef*****

function reefShowDivs(divId) {
    document.getElementById('reefSpecificationsTab').style.display = 'none';
    document.getElementById('reefDownloadsTab').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
}

//*****Eclipse*****

function eclipseShowDivs(divId) {
    document.getElementById('eclipseSpecificationsTab').style.display = 'none';
    document.getElementById('eclipseDownloadsTab').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
}
//*****Paver*****

function paverShowDivs(divId, tabId) {
    document.getElementById('paverSpecificationsTab').style.display = 'none';
    document.getElementById('paverDownloadsTab').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
    removeClass('fotab1');
    removeClass('fotab2');
    changeClass(tabId, ' selected-tab');
}

//*****Light panel edu*****
function lpEduShowSubDivs(divId, tabId) {
    document.getElementById('lpeduSubDiv1').style.display = 'none';
    document.getElementById('lpeduSubDiv2').style.display = 'none';
    document.getElementById('lpeduSubDiv3').style.display = 'none';
    document.getElementById('lpeduSubDiv4').style.display = 'none';
    document.getElementById('lpeduSubDiv5').style.display = 'none';
    document.getElementById('lpeduSubDiv6').style.display = 'none';
    document.getElementById('lpeduSubDiv7').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
    removeClass('fosubtab1');
    removeClass('fosubtab2');
    removeClass('fosubtab3');
    removeClass('fosubtab4');
    removeClass('fosubtab5');
    removeClass('fosubtab6');
    removeClass('fosubtab7');
    changeClass(tabId, ' active');
}
//*****Light channel edu*****
function lcEduShowSubDivs(divId, tabId) {
    document.getElementById('lpeduSubDiv1').style.display = 'none';
    document.getElementById('lpeduSubDiv2').style.display = 'none';
    document.getElementById('lpeduSubDiv3').style.display = 'none';
    document.getElementById('lpeduSubDiv4').style.display = 'none';
    document.getElementById('lpeduSubDiv5').style.display = 'none';
    document.getElementById('lpeduSubDiv6').style.display = 'none';
    document.getElementById('lpeduSubDiv7').style.display = 'none';
    document.getElementById('lpeduSubDiv8').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
    removeClass('fosubtab1');
    removeClass('fosubtab2');
    removeClass('fosubtab3');
    removeClass('fosubtab4');
    removeClass('fosubtab5');
    removeClass('fosubtab6');
    removeClass('fosubtab7');
    removeClass('fosubtab8');
    changeClass(tabId, ' active');
}

/* Vima sub divs*/
function vimaShowSubDivs(divId, tabId) {
    document.getElementById('vimaSubDiv1').style.display = 'none';
    document.getElementById('vimaSubDiv2').style.display = 'none';
    document.getElementById('vimaSubDiv3').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
    removeClass('fosubtab1');
    removeClass('fosubtab2');
    removeClass('fosubtab3');
    changeClass(tabId, ' active');
}
// Ilti series show divs.....

function iltiSeriesShowDivs(divId, ucName, tabID) {
    document.getElementById(ucName + 'DriversTab').style.display = 'none';
    document.getElementById(ucName + 'AcccessoriesTab').style.display = 'none';
    document.getElementById(ucName + 'DownloadTab').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
    removeClass('iltiTab1');
    removeClass('iltiTab2');
    removeClass('iltiTab3');
    changeClass(tabID, ' selected-tab1');
}
function tabSelection(tabID) {
    removeClass('tab1');
    removeClass('tab2');
    removeClass('tab3');
    removeClass('tab4');
    changeClass(tabID, ' selected-tab');
}

function tabSelection2Tab(tabID) {
    removeClass('tab1');
    removeClass('tab2');
    changeClass(tabID, ' selected-tab');
}

// Coral 
function coralShowDivs(divId, tabId) {
    document.getElementById('coralIntroductionTab').style.display = 'none';
    document.getElementById('coralSpecificationsTab').style.display = 'none';
    document.getElementById('coralDownloadsTab').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
    removeClass('fotab1');
    removeClass('fotab2');
    removeClass('fotab3');
    changeClass(tabId, ' selected-tab');
}

// XPO
function xpoShowDivs(divId, tabId) {
    document.getElementById('xpoIntroTab').style.display = 'none';
    document.getElementById('xpoRulesTab').style.display = 'none';
    document.getElementById('xpoSpecTab').style.display = 'none';
    document.getElementById('xpoDownloadsTab').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
    removeClass('fotab1');
    removeClass('fotab2');
    removeClass('fotab3');
    removeClass('fotab4');
    changeClass(tabId, ' selected-tab');
}

function xpoShowSubDivs(divId, tabId) {
    document.getElementById('xpoSubDiv1').style.display = 'none';
    document.getElementById('xpoSubDiv2').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
    removeClass('fosubtab1');
    removeClass('fosubtab2');
    changeClass(tabId, ' active');
}
// illuminators
function illuminatorsShowDivs(divId, tabID) {
    document.getElementById('illuminatorsSpecificationsTab').style.display = 'none';
    document.getElementById('illuminatorsConfiguratorTab').style.display = 'none';
    document.getElementById('illuminatorsDrawingsTab').style.display = 'none';
    document.getElementById('illuminatorsAccessoriesTab').style.display = 'none';
    document.getElementById('illuminatorsDownloadsTab').style.display = 'none';
    removeClass("fotab1");
    removeClass("fotab2");
    removeClass("fotab3");
    removeClass("fotab4");
    removeClass("fotab5");
    changeClass(tabID, " selected-tab");
    document.getElementById(divId).style.display = 'block';
}

function illuminatorsShow4Divs(divId, tabID) {
    document.getElementById('illuminatorsSpecificationsTab').style.display = 'none';
    document.getElementById('illuminatorsConfiguratorTab').style.display = 'none';
    document.getElementById('illuminatorsDrawingsTab').style.display = 'none';
   document.getElementById('illuminatorsDownloadsTab').style.display = 'none';
    removeClass("fotab1");
    removeClass("fotab2");
    removeClass("fotab3");
    removeClass("fotab5");
    changeClass(tabID, " selected-tab");
    document.getElementById(divId).style.display = 'block';
}

// FO-Fiber
function fiberShowDivs(divId, tabID) {
    document.getElementById('fiberSpecificationsTab').style.display = 'none';
    document.getElementById('fiberEducationTab').style.display = 'none';
    document.getElementById('fiberDownloadsTab').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
    removeClass("fotab1");
    removeClass("fotab2");
    removeClass("fotab3");
    changeClass(tabID, " selected-tab");
}

// Ribbon
function ribbonShowDivs(divId, tabID) {
    document.getElementById('fiberSpecificationsTab').style.display = 'none';
    document.getElementById('fiberGalleryTab').style.display = 'none';
    document.getElementById('fiberDownloadsTab').style.display = 'none';
    document.getElementById('fiberEducationTab').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
    //document.getElementById('illuminatorsDownloadsTab').style.display = 'none';
    removeClass("fotab1");
    removeClass("fotab2");
    removeClass("fotab3");
    removeClass("fotab4");
    changeClass(tabID, " selected-tab");
}

// Megoflex SL
function megoflexSLShowDivs(divId, tabID) {
    document.getElementById('fiberSpecificationsTab').style.display = 'none';
    document.getElementById('fiberMountingTab').style.display = 'none';
    document.getElementById('fiberDownloadsTab').style.display = 'none';
    document.getElementById('fiberEducationTab').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
    removeClass("fotab1");
    removeClass("fotab2");
    removeClass("fotab3");
    removeClass("fotab4");
    changeClass(tabID, " selected-tab");
}

// Diamond Line
function diamondLineShowDivs(divId, tabID) {
    document.getElementById('fiberSpecificationsTab').style.display = 'none';
    document.getElementById('fiberMountingTab').style.display = 'none';
    document.getElementById('fiberIntroTab').style.display = 'none';
    document.getElementById('fiberDownloadsTab').style.display = 'none';
    document.getElementById('fiberEducationTab').style.display = 'none';
    document.getElementById(divId).style.display = 'block';
    removeClass("fotab1");
    removeClass("fotab2");
    removeClass("fotab3");
    removeClass("fotab4");
    removeClass("fotab5");
    changeClass(tabID, " selected-tab");
}

function ShowProductsList() {
    document.getElementById("testimonialDiv").style.display = "none";
    document.getElementById("productsListDiv").style.display = "block";
}

function FoProductListShowDivs() {
    document.getElementById('mid-image').style.display = 'none';
    document.getElementById('TestomonialDiv').style.display = 'none';
    document.getElementById('ProductListDiv').style.display = 'block';
}

function DisplayMidImage() {

    document.getElementById('mid-image').style.display = 'block';
    document.getElementById('LedProductListDiv').style.display = 'block';
    document.getElementById('TestomonialDiv').style.display = 'none';
}


function FoProductTestimonialShowDivs() {

    document.getElementById('mid-image').style.display = 'none';
    document.getElementById('TestomonialDiv').style.display = 'block';
    document.getElementById('ProductListDiv').style.display = 'none';
    document.getElementById('LedProductListDiv').style.display = 'none';

}

//******************Image swaping Code------------------*/
function mmLoadMenus() {
    if (window.mm_menu_0125083423_0) return;
    window.mm_menu_0125083423_0_1 = new Menu("Roblon", 120, 23, "Verdana, Arial, Helvetica, sans-serif", 11, "#000000", "#FFFFFF", "#CCCCCC", "#617DA2", "left", "middle", 3, 0, 1000, -5, 7, true, false, true, 0, false, false);
    mm_menu_0125083423_0_1.addMenuItem("Pyxis", "location='pyxis.html'");
    mm_menu_0125083423_0_1.addMenuItem("Corvus", "location='corvus.html'");
    mm_menu_0125083423_0_1.addMenuItem("Libra", "location='libra.html'");
    mm_menu_0125083423_0_1.addMenuItem("XPO&nbsp;Led", "location='xpo_led.html'");
    mm_menu_0125083423_0_1.addMenuItem("Drivers&nbsp;&&nbsp;Controls", "location='drivers_controls.html'");
    mm_menu_0125083423_0_1.hideOnMouseOut = true;
    mm_menu_0125083423_0_1.bgColor = '#555555';
    mm_menu_0125083423_0_1.menuBorder = 1;
    mm_menu_0125083423_0_1.menuLiteBgColor = '#FFFFFF';
    mm_menu_0125083423_0_1.menuBorderBgColor = '#777777';
    window.mm_menu_0125083423_0_2 = new Menu("KKDC", 120, 23, "Verdana, Arial, Helvetica, sans-serif", 11, "#000000", "#FFFFFF", "#CCCCCC", "#617DA2", "left", "middle", 3, 0, 1000, -5, 7, true, false, true, 0, false, false);
    mm_menu_0125083423_0_2.addMenuItem("Linear", "location='linear.html'");
    mm_menu_0125083423_0_2.addMenuItem("Flexible", "location='flexible.html'");
    mm_menu_0125083423_0_2.addMenuItem("Drivers&nbsp;&&nbsp;Controls", "location='drivers_controlskkdc.html'");
    mm_menu_0125083423_0_2.hideOnMouseOut = true;
    mm_menu_0125083423_0_2.bgColor = '#555555';
    mm_menu_0125083423_0_2.menuBorder = 1;
    mm_menu_0125083423_0_2.menuLiteBgColor = '#FFFFFF';
    mm_menu_0125083423_0_2.menuBorderBgColor = '#777777';
    window.mm_menu_0125083423_0_3 = new Menu("ILTI&nbsp;LUCE", 120, 23, "Verdana, Arial, Helvetica, sans-serif", 11, "#000000", "#FFFFFF", "#CCCCCC", "#617DA2", "left", "middle", 3, 0, 1000, -5, 7, true, false, true, 0, false, false);
    mm_menu_0125083423_0_3.addMenuItem("3x1&nbsp;Accent&nbsp;Lights", "location='3_1accentlights.html'");
    mm_menu_0125083423_0_3.addMenuItem("1x1&nbsp;Accent&nbsp;Lights", "location='1_1accentlights.html'");
    mm_menu_0125083423_0_3.addMenuItem("Driver&nbsp;&&nbsp;Controls", "location='driver_controls_iltiluce.html'");
    mm_menu_0125083423_0_3.hideOnMouseOut = true;
    mm_menu_0125083423_0_3.bgColor = '#555555';
    mm_menu_0125083423_0_3.menuBorder = 1;
    mm_menu_0125083423_0_3.menuLiteBgColor = '#FFFFFF';
    mm_menu_0125083423_0_3.menuBorderBgColor = '#777777';
    window.mm_menu_0125083423_0_4 = new Menu("VLT&nbsp;Led", 120, 23, "Verdana, Arial, Helvetica, sans-serif", 11, "#000000", "#FFFFFF", "#CCCCCC", "#617DA2", "left", "middle", 3, 0, 1000, -5, 7, true, false, true, 0, false, false);
    mm_menu_0125083423_0_4.addMenuItem("ViMA-5", "location='vima5.html'");
    mm_menu_0125083423_0_4.addMenuItem("Elegance", "location='elegance.html'");
    mm_menu_0125083423_0_4.addMenuItem("Driver&nbsp;&&nbsp;Controls", "location='drivers_controls_vltled.html'");
    mm_menu_0125083423_0_4.hideOnMouseOut = true;
    mm_menu_0125083423_0_4.bgColor = '#555555';
    mm_menu_0125083423_0_4.menuBorder = 1;
    mm_menu_0125083423_0_4.menuLiteBgColor = '#FFFFFF';
    mm_menu_0125083423_0_4.menuBorderBgColor = '#777777';
    window.mm_menu_0125083423_0 = new Menu("root", 120, 23, "Verdana, Arial, Helvetica, sans-serif", 11, "#000000", "#FFFFFF", "#CCCCCC", "#617DA2", "left", "middle", 3, 0, 1000, -5, 7, true, false, true, 0, false, false);
    mm_menu_0125083423_0.addMenuItem(mm_menu_0125083423_0_1, "location='roblon.html'");
    mm_menu_0125083423_0.addMenuItem(mm_menu_0125083423_0_2, "location='kkdc.html'");
    mm_menu_0125083423_0.addMenuItem(mm_menu_0125083423_0_3, "location='ilti_luce.html'");
    mm_menu_0125083423_0.addMenuItem(mm_menu_0125083423_0_4, "location='vlt_led.html'");
    mm_menu_0125083423_0.hideOnMouseOut = true;
    mm_menu_0125083423_0.childMenuIcon = "arrows.gif";
    mm_menu_0125083423_0.bgColor = '#555555';
    mm_menu_0125083423_0.menuBorder = 1;
    mm_menu_0125083423_0.menuLiteBgColor = '#FFFFFF';
    mm_menu_0125083423_0.menuBorderBgColor = '#777777';

    mm_menu_0125083423_0.writeMenus();
} // mmLoadMenus()

function MM_swapImgRestore() { //v3.0
    var i, x, a = document.MM_sr; for (i = 0; a && i < a.length && (x = a[i]) && x.oSrc; i++) x.src = x.oSrc;
}

function MM_preloadImages() { //v3.0
    var d = document; if (d.images) {
        if (!d.MM_p) d.MM_p = new Array();
        var i, j = d.MM_p.length, a = MM_preloadImages.arguments; for (i = 0; i < a.length; i++)
            if (a[i].indexOf("#") != 0) { d.MM_p[j] = new Image; d.MM_p[j++].src = a[i]; }
    }
}

function MM_findObj(n, d) { //v4.01
    var p, i, x; if (!d) d = document; if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
        d = parent.frames[n.substring(p + 1)].document; n = n.substring(0, p);
    }
    if (!(x = d[n]) && d.all) x = d.all[n]; for (i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n];
    for (i = 0; !x && d.layers && i < d.layers.length; i++) x = MM_findObj(n, d.layers[i].document);
    if (!x && d.getElementById) x = d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
    var i, j = 0, x, a = MM_swapImage.arguments;
    document.MM_sr = new Array;
    for (i = 0; i < (a.length - 2); i += 3)
        if ((x = MM_findObj(a[i])) != null) {
            document.MM_sr[j++] = x;
            if (!x.oSrc) x.oSrc = x.src;
            //x.src = window.location.pathname + "/" + a[i + 2];
            x.src = a[i + 2];
        }
}

//-----------------Auto Swsap code Jquery ----------------------//

function theRotator() {
    //Set the opacity of all images to 0
    $('div.rotator div').css({ opacity: 0.0 });

    //Get the first image and display it (gets set to full opacity)
    $('div.rotator div:first').css({ opacity: 1.0 });

    //Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
    setInterval('rotate()', 7000);

}

function rotate() {
    //Get the first image
    var current = ($('div.rotator div.show') ? $('div.rotator div.show') : $('div.rotator div:first'));

    //Get next image, when it reaches the end, rotate it back to the first image
    var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator div:first') : current.next()) : $('div.rotator div:first'));

    //Set the fade in effect for the next image, the show class has higher z-index
    next.css({ opacity: 0.0 })
	.addClass('show')
	.animate({ opacity: 1.0 }, 1000);

    //Hide the current image
    current.animate({ opacity: 0.0 }, 1000)
	.removeClass('show');
};

$(document).ready(function () {
    //Load the slideshow
    theRotator();
});


/* Mouse over change background for div */

function mouseOverImageDiv(image, id) {
    var element = document.getElementById(id);
    element.style.backgroundImage = "url(" + image + ")";
}

function mouseOutImageDiv(image, id) {
    var element = document.getElementById(id);
    element.style.backgroundImage = "url(" + image + ")";
}

/* Mouse over change image for image */

function mouseOverImage(image, id) {
    var element = document.getElementById(id);
    element.src = image;
}

function mouseOutImage(image, id) {
    var element = document.getElementById(id);
    element.src = image;
}


function bgcolorchange(divId1, color, titlecolor) {
    if (divId1 == "kkdcTableContent1") {
        document.getElementById("kkdcTitle1").style.backgroundColor = titlecolor; ;
    }
    if (divId1 == "kkdcTableContent2") {
        document.getElementById("kkdcTitle2").style.backgroundColor = titlecolor; ;
    }
    if (divId1 == "kkdcTableContent3") {
        document.getElementById("kkdcTitle3").style.backgroundColor = titlecolor; ;
    }
    if (divId1 == "kkdcTableContent4") {
        document.getElementById("kkdcTitle4").style.backgroundColor = titlecolor; ;
    }

    var divId = document.getElementById(divId1);
    var divs = divId.getElementsByTagName("div");
    var countDiv = 0;
    for (var i = 0; i < divs.length; i++) {

        divs[i].style.backgroundColor = color;
    }

}

function kkdctabSelection(tabID) {
    var divId = document.getElementById(tabID);
    var divs = divId.getElementsByTagName("div");
    var countDiv = 0;
    for (var i = 0; i < divs.length; i++) {

        divs[i].style.backgroundColor = color;
    }
}
