var capas = null;

function guardaCapas (listaCapas) {
	capas = listaCapas;
}

function ocultaCapas() {
	for(var i in capas) {
		if (document.all) {
			document.all[capas[i]].style.display = "none";
		} else {
			var obj = document.getElementById(capas[i]);
			obj.style.display = "none";
		}
	}
}

function verCapa(id) {
// alert('nObj : '+id);

	// Ponemos celdas en estado normal
	document.all['fNota5'].style.color="#000000";
	document.all['fNota5'].style.background="#EFD8C0"; // #FFFBE6 
	document.all['fNota5'].style.cursor="default";
	document.all['fNota5'].style.border= "0px";

	// Resaltamos la celda selecionada
	document.all['f'+id].style.color="#302A09";
	document.all['f'+id].style.background="#FFEFD5";
	document.all['f'+id].style.cursor="hand";
	document.all['f'+id].style.border="1px solid #800000";
	ocultaCapas();

	// Mostramos la capa seleccionada
	if (document.all) {
		document.all[id].style.display="block";
	} else {
		var obj = document.getElementById(id);
		obj.style.display = "block";
	}
}


// SOLO PARA LA NOTA 5
function entra(id) {

// alert('Entrando en Nota5');

	document.all['f'+id].style.color="#302A09";
	document.all['f'+id].style.background="#FFEFD5";
	document.all['f'+id].style.border="1px solid #800000";

	if (document.all) {
		document.all[id].style.display="block";
	} else {
		var obj = document.getElementById(id);
		obj.style.display = "block";
	}


}



function sale(obj) {
var nObj = obj.id;

// if (nObj=='fNota5') { alert('Es el apartado 5'); }

	document.all[nObj].style.color="#000000";
	document.all[nObj].style.background="#EFD8C0"; // #FFFBE6
	document.all[nObj].style.cursor="default";
	document.all[nObj].style.border="0px";
	ocultaCapas();




}

