var arrGroepenTV = new Array();
var arrGroepenR = new Array();

function chBackTabs(parID){
    for (i=1;i<7;i++){
        if (i!=parID){
            document.getElementById("tab"+i).style.fontWeight = "normal";
            document.getElementById("tab"+i).style.backgroundColor = "#F0F0D0";
            document.getElementById("tab"+i).style.borderBottomColor = "#C6C6C6";
            document.getElementById("tab"+i).style.borderBottomStyle = "solid";
            document.getElementById("tab"+i).style.borderBottomWidth = "1px"; 
    
            document.getElementById("hoek"+i).style.backgroundColor = "#F0F0D0";
            document.getElementById("hoek"+i).style.borderBottomColor = "#C6C6C6";
            document.getElementById("hoek"+i).style.borderBottomStyle = "solid";
            document.getElementById("hoek"+i).style.borderBottomWidth = "1px";
        }
    }
}

function chTab(parID){

    chBackTabs(parID)

    document.getElementById("tab"+parID).style.fontWeight = "bold";
    document.getElementById("tab"+parID).style.backgroundColor = "#ffffff";
    document.getElementById("tab"+parID).style.borderBottom = "none";
    
    document.getElementById("hoek"+parID).style.backgroundColor = "#ffffff";
    document.getElementById("hoek"+parID).style.borderBottom = "none";
    
    if (parID==1) {
        document.getElementById("dspNav").style.height = "110px";
        document.getElementById("dspNav").innerHTML = document.getElementById("navTV").innerHTML;
        dspFirstTV();
    }
    if (parID==2) {
        document.getElementById("dspNav").style.height = "80px";
        document.getElementById("dspNav").innerHTML = document.getElementById("navRadio").innerHTML;
        dspFirstRadio();
    }
    if (parID==3) {
        document.getElementById("dspNav").innerHTML = document.getElementById("navExtraZ").innerHTML;
        document.getElementById("dspZenders").innerHTML = document.getElementById("ExtraZenders").innerHTML;
        document.getElementById("dspNav").style.height = "0px";
    }
    if (parID==4) {
        document.getElementById("dspNav").innerHTML = document.getElementById("navExtraP").innerHTML;
        document.getElementById("dspZenders").innerHTML = document.getElementById("ExtraPakketten").innerHTML;
        document.getElementById("dspNav").style.height = "0px";
    }
    if (parID == 5) {
        document.getElementById("dspNav").innerHTML = "";
        document.getElementById("dspZenders").innerHTML = document.getElementById("navHD").innerHTML;
        document.getElementById("dspNav").style.height = "0px";
    }
    if (parID == 6) {
        document.getElementById("dspNav").innerHTML = "";
        document.getElementById("dspZenders").innerHTML = document.getElementById("navProgGem").innerHTML;
        document.getElementById("dspNav").style.height = "0px";
    }
 }
 
 function chBackZenderGr(which,groepID) {
    if (which=="TV"){
        for (i=0;i<arrGroepenTV.length;i++){
            if (arrGroepenTV[i]!=groepID){
                document.getElementById("tab1Gr"+arrGroepenTV[i]).style.fontWeight = "normal";
                document.getElementById("tab1Gr"+arrGroepenTV[i]).style.backgroundColor = "#ECFEFE";
                document.getElementById("tab1Gr"+arrGroepenTV[i]).style.paddingLeft = "0px";
            }
        }
    }else{
        for (i=0;i<arrGroepenR.length;i++){
            if (arrGroepenR[i]!=groepID){
                document.getElementById("tab1Gr"+arrGroepenR[i]).style.fontWeight = "normal";
                document.getElementById("tab1Gr"+arrGroepenR[i]).style.backgroundColor = "#ECFEFE";
                document.getElementById("tab1Gr"+arrGroepenR[i]).style.paddingLeft = "0px";
            }
        }
    }
}

function shwZenders(which,groepID){

    chBackZenderGr(which,groepID);
    
    document.getElementById("tab1Gr"+groepID).style.fontWeight = "bold";
    document.getElementById("tab1Gr"+groepID).style.backgroundColor = "#ffffff";
    document.getElementById("tab1Gr"+groepID).style.paddingLeft = "70px";

    document.getElementById("dspZenders").innerHTML = document.getElementById("zenderGroep"+which+"_"+groepID).innerHTML;
}
