function hideLevel( _levelId) {
	var thisLevel = document.getElementById( _levelId );
	if(thisLevel!=null)
	    thisLevel.style.display = "none";
	}
	
function showLevel( _levelId) {
	var thisLevel = document.getElementById( _levelId );
	
	if(thisLevel!=null)
	    {	
	    if ( thisLevel.style.display == "none") {
		    thisLevel.style.display = "block";
		    }
	    else {
		    hideLevel( _levelId);
		    }	
	    }
	}

function HideMasterPageLevels()
{
    HideAll();
     
     if(location.href.toUpperCase().indexOf('GRANDESINSTALACIONES')>-1)     showLevel('ocultar1');
     if(location.href.toUpperCase().indexOf('LABORATORIOSENSAYO')>-1)     showLevel('ocultar2');
     if(location.href.toUpperCase().indexOf('INVESTIGACIONESAPLICADAS')>-1)     showLevel('ocultar3');
     if(location.href.toUpperCase().indexOf('GESTIONPROGRAMAS')>-1)     showLevel('ocultar4');
     if(location.href.toUpperCase().indexOf('SERVICIOSINDUSTRIA')>-1)     showLevel('ocultar5');
     if(location.href.toUpperCase().indexOf('DOCUMENTACIONCIENTIFICA')>-1)     showLevel('ocultar6');
     if(location.href.toUpperCase().indexOf('OTRI')>-1 ||location.href.toUpperCase().indexOf('GRUPOSID')>-1 ||location.href.toUpperCase().indexOf('GRUPOID')>-1  )     showLevel('ocultar7');
     if(location.href.toUpperCase().indexOf('PROGRAMASALTATECNOLOGIA')>-1)     showLevel('ocultar8');
     if(location.href.toUpperCase().indexOf('ORGANIZACION')>-1)     showLevel('ocultarOrganizacion');
     if(location.href.toUpperCase().indexOf('CERTIFICACION')>-1)     showLevel('ocultarOrganizacion');

}

function HideAll()
{
     /// Paneles del menú a la izquierda
     hideLevel('ocultar1');
     hideLevel('ocultar2');
     hideLevel('ocultar3');
     hideLevel('ocultar4');
     hideLevel('ocultar5');
     hideLevel('ocultar5_2');
     hideLevel('ocultar5_3');
     hideLevel('ocultar5_4');
     hideLevel('ocultar6');
     hideLevel('ocultar7');
     hideLevel('ocultar7_1');
     hideLevel('ocultar7_2');
     hideLevel('ocultar7_3');
     hideLevel('ocultar7_4');
     hideLevel('ocultar7_5');
     hideLevel('ocultar8');
     hideLevel('ocultar8_1');
     hideLevel('ocultar9');
     hideLevel('ocultar9_1');
     hideLevel('ocultar9_2');
     hideLevel('ocultar9_3');
     hideLevel('ocultarOrganizacion');
     /// Paneles de Grupos de I+D
     hideLevel('ocultar100');
     hideLevel('ocultar101');
     hideLevel('ocultar102');
     hideLevel('ocultar103');
     hideLevel('ocultar104');
     hideLevel('ocultar105');
     hideLevel('ocultar106');
     hideLevel('ocultar107');
     hideLevel('ocultar108');
     hideLevel('ocultar109');
     hideLevel('ocultar110');
     hideLevel('ocultar111');
     hideLevel('ocultar112');
     hideLevel('ocultar113');
    
}