var capasInfo = new Array();	

function anidarCapaInfo(nombreCapa) {
	capasInfo.push(nombreCapa);				
}

function mostrarCapaInfo(nombreCapa) {
	fichero_llamada = new String(document.location);
	fichero_llamada = fichero_llamada.substring(fichero_llamada.lastIndexOf("/") + 1, fichero_llamada.length);
	
	if(fichero_llamada.substring(0, 9) == "index.php" || fichero_llamada == "") {
		ocultarTodasCapasInfo();
		document.getElementById(nombreCapa).style.position = "relative";
		document.getElementById(nombreCapa).style.visibility = "visible";
	}
}

function ocultarCapaInfo(nombreCapa) {
	fichero_llamada = new String(document.location);
	fichero_llamada = fichero_llamada.substring(fichero_llamada.lastIndexOf("/") + 1, fichero_llamada.length);
	
	if(fichero_llamada.substring(0, 9) == "index.php" || fichero_llamada == "") {
		document.getElementById(nombreCapa).style.position = "absolute";
		document.getElementById(nombreCapa).style.visibility = "hidden";
	}
}

function ocultarTodasCapasInfo() {
	for (i = 0; i < capasInfo.length; i++) {
		document.getElementById(capasInfo[i]).style.position = "absolute";
		document.getElementById(capasInfo[i]).style.visibility = "hidden";
	}
}
