function visibl(menu, elClickado){
	// cambio el estado del clickado
	elClickado.plegado = !elClickado.plegado;
	//alert ("ahora estoy " + elClickado.plegado);
	if (elClickado.plegado) {
		elClickado.style.fontWeight = "bold";
		menu.style.display = "block";
	}
	else {
		elClickado.style.fontWeight = "normal";
		menu.style.display = "none";
	}
	return false;
}

	if (document.getElementById) {
	document.write("<style type='text/css'>.nivel2,.nivel3,.nivel4 {display: none}</style>");
}

// window.onload=navegamenu;

function navegamenu(ids_desplegar, ids_destacar){
	var menu = document.getElementById('menu');
	ids_desplegar = desplegar;
	ids_destacar = destacar;
	//alert('Los ids que hay que desplegar son:\n'+' '+ids_desplegar);
	//alert('Los ids que hay que destacar son:\n'+' '+ids_destacar);
	for(var i=0;i<desplegar.length;i++){
		document.getElementById(desplegar[i]).style.display = 'block';
	}
	for(var j=0;j<destacar.length;j++)
	{
		document.getElementById(destacar[j]).style.fontWeight = 'bold';
		if (j == destacar.length-1)
		{
			document.getElementById(destacar[j]).href = "javascript:void(0)";
			document.getElementById(destacar[j]).style.textDecoration = "none";
			document.getElementById(destacar[j]).style.cursor = "default";
		}

		
	}
}


// función para lanzar un pop-up (revisar medidas)         
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=1000,height=250,left = 100,top = 350');");
}


function abrePagina(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=1000,height=750,left = 100,top = 350');");
}