// JavaScript Document

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->

	function validar()
	{
		var msg="";

		if (document.formu.txtNombre.value == '')
		{
			msg=msg+"Debes rellenar el nombre del gato\n";
		}
		
		if (document.formu.txtFoto.value == '')
		{
			msg=msg+"Debes incluir una foto\n";
		}
		
		if (document.formu.txtDescripcion.value == '')
		{
			msg=msg+"Debes rellenar la descripcion\n";	
		}

		if(msg)
		{
			alert(msg);
		}
		else
		{
			document.formu.submit();
		}
	}//fin funcion

	function mostrarFormulario()
	{
		document.getElementById("formulario").style.visibility="visible";
	}
	
	function mostrarMensaje()
	{
		document.getElementById("mensaje").style.visibility="visible";
	}//fin funcion
	
	function ocultarFormulario()
	{
		document.getElementById("formulario").style.visibility="hidden";
	}
	
	function verFotos()
	{
		document.f.hdnVerFotos.value = 1;
		document.f.submit();
	}//fin funcion
	
	function pasarPagina(p)
	{
		document.formu2.hdnPagina.value=p;
		document.formu2.hdnVerFotos.value=1;
		document.formu2.submit();
	}
	
	function retrocederPagina(p)
	{
		document.formu3.hdnPagina.value=p;
		document.formu3.hdnVerFotos.value=1;
		document.formu3.submit();
	}
