function muestra(nombreCapa, sup)
 {
    oculta(nombreCapa);
    document.getElementById(nombreCapa).style.visibility="visible"; 
    document.getElementById(nombreCapa).style.top=sup;  

 }


function oculta (nombreCapa)
 {
  document.getElementById(nombreCapa).style.visibility="hidden"; 
 }

function oculta_muestra (capaOc, capaMu, sup, esq)
 {
  document.getElementById(capaOc).style.visibility="hidden"; 
  document.getElementById(capaMu).style.position="Absolute";  
  document.getElementById(capaMu).style.top=sup; 
  document.getElementById(capaMu).style.left=esq; 
  document.getElementById(capaMu).style.visibility="visible";
  return true;
      
 }

function muestra_capa (capaMu, sup, esq)
 {
  document.getElementById(capaMu).style.position="Absolute";  
  document.getElementById(capaMu).style.top=sup; 
  document.getElementById(capaMu).style.left=esq; 
  document.getElementById(capaMu).style.visibility="visible";
  return true;
    
 }

function amagaPag (nroPag)
 {
  for (i=1;i<=nroPag;i++)
   { 
    var pagina = 'pag' + i 
    document.getElementById(pagina).style.visibility="hidden";
    
    }  
 }

function quitapon(nombreCapa, sup)
 {
   if (document.getElementById(nombreCapa).style.visibility == "visible") 
       document.getElementById(nombreCapa).style.visibility="hidden"; 
   else  
      document.getElementById(nombreCapa).style.visibility="visible"; 
      document.getElementById(nombreCapa).style.top=sup;  

 }

function validarEntero(valor)
{
	//intento convertir a entero. 
	//si era un entero no le afecta, si no lo era lo intenta convertir
	valor = parseInt(valor)

	//Compruebo si es un valor numérico
	if (isNaN(valor)) {
		//entonces (no es un numero) devuelvo el valor cadena vacia
		return ""
	}else{
		//En caso contrario (Si era un número) devuelvo el valor
		return valor
	}
}

function tomarValor()
{ 
  url = location.href;
  val = url.indexOf("?"); 
  val = url.substring(val+1,url.length);
  datos = new Array(); 
  datos = val.split("&");
  var capa = 'npag' + datos[0]; 
//  var respuesta = confirm("valor capa " + capa) 
  muestra_capa(capa, 10, 220)
   
}

function pulldownMenu(menuForm)
{
var URL =
document.menuForm.link.options[document.menuForm.link.selectedIndex].value;
window.location.href = URL;
}
