var valor = 0;     
function gestionarRadioButton(rb) { 
    valor = rb.value; 
    if (valor=="1") { 
        showSelect('1'); showType('1'); return false;
    } 
    else if (valor=="2") { 
        showSelect('2'); showType('2'); return false;
    } 
    else if (valor=="3") { 
        showSelect('3'); showType('3'); return false;
    }     
} 

function showChannels(rb) { 
    valor = rb.value; 
    if (valor=="0") {
        document.getElementById("competitions").style.display='block';
        document.getElementById("channels").style.display='none';
        return false;
    } 
    else if (valor=="1") { 
        document.getElementById("competitions").style.display='none';
        document.getElementById("channels").style.display='block';      
        return false;
    }     
} 

function showSearch(valor) { 

    if (valor=="0") {     
        document.getElementById("standard_search").style.display='none';
        document.getElementById("avanced_search").style.display='block';
        return false;
    } 
    else if (valor=="1") { 
        document.getElementById("avanced_search").style.display='none';
        document.getElementById("standard_search").style.display='block';
        return false;
    }     
} 

function showMainNew(valor, cant) { 
    var cant= cant ;
    
        for(i=0; i < cant; i++){     
            document.getElementById("newMain"+i).style.display='none';
        }
        document.getElementById("newMain"+valor).style.display='block';
        return false; 
}

function swapTabCompetitions(cant, tagId, divId){
    for (i=1;i <= cant;i++){
        if(tagId != "tab"+i){
            document.getElementById("tab"+i).className='pesta_des vinc_2';
        } else{
            document.getElementById("tab"+i).className='pesta_act vinc_1';
        }
    }
    for (i=1;i <= cant;i++){
        document.getElementById("showCompetition"+i).style.display='none';
    }
        document.getElementById(divId).style.display='block';
  return false;
}

function swapTabCompetitions_fv(cant, tagId, divId){
    for (i=1;i <= cant;i++){
        if(tagId != "tab"+i){
            document.getElementById("tab"+i).className='pesta_des_fv vinc_2';
        } else{
            document.getElementById("tab"+i).className='pesta_act_fv vinc_1';
        }
    }
    for (i=1;i <= cant;i++){
        document.getElementById("showCompetition"+i).style.display='none';
    }
        document.getElementById(divId).style.display='block';
  return false;
}

function swapTabCompetitions_fv_home(cant, tagHomeId, num, divId){
    for (i=1;i <= cant;i++){
        if(tagHomeId != "tabHome"+num+i){
            document.getElementById("tabHome"+num+i).className='pesta_des_fv_home vinc_2';
        } else{
            document.getElementById("tabHome"+num+i).className='pesta_act_fv_home vinc_1';
        }
    }
    for (i=1;i <= cant;i++){
        document.getElementById("showCategory"+num+i).style.display='none';
    }
        document.getElementById(divId).style.display='block';
  return false;
}