// JavaScript Document
function abre(img,an,al){
	an=an+15
	al=al+64
	var v=open('','v','left=0,top=0, width='+an+',height='+al+',resizable=0,status=yes')
	v.document.open() <!-- abrir una pagina nueva dentro de la ventana -->
	v.resizeTo(an,al) <!-- Para cambiar el alto y el ancho -->
	v.document.write('<title>SANAVI</title>')
	v.document.write('<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">')
	v.document.write('<a href="#"><img src="../../images/ampliaciones/'+img+'.jpg" onClick="self.close()"></a>')
	v.focus ()
	v.document.write('</body>')
}

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();
	}
}

function ajustaAltura() {
    var altoCentro=(document.getElementById("contenidos")).offsetHeight;    
    var izq=document.getElementById("bordeIzq");
	var dcha=document.getElementById("bordeDcha");
    
    izq.style.height=altoCentro + "px";
	dcha.style.height=altoCentro + "px";
}

function Validar(form)
{
  if (form.Nombre.value == "")
  { alert("Por favor indiquenos su nombre"); form.Nombre.focus(); return; }

  if (form.Email.value == "")
  { alert("Por favor indiquenos su direcci�n de e-mail"); form.Email.focus(); return; }

  if (form.Domicilio.value == "")
  { alert("Por favor indiquenos su domicilio"); form.Domicilio.focus(); return; }
 
  if (form.Telefono.value == "")
  { alert("Por favor indiquenos su n�mero de tel�fono"); form.Telefono.focus(); return; }

  if (form.Email.value.indexOf('@', 0) == -1 ||
      form.Email.value.indexOf('.', 0) == -1)
  { alert("Direcci�n de e-mail inv�lida"); form.Email.focus(); return; }

  form.submit();
}


function ValidarIng(form)
{
  if (form.Nombre.value == "")
  { alert("Please its name writes"); form.Nombre.focus(); return; }

  if (form.Email.value == "")
  { alert("Please its direction or email writes"); form.Email.focus(); return; }

  if (form.Domicilio.value == "")
  { alert("Please its address writes"); form.Domicilio.focus(); return; }
 
  if (form.Telefono.value == "")
  { alert("Please its telephone number writes"); form.Telefono.focus(); return; }

  if (form.Email.value.indexOf('@', 0) == -1 ||
      form.Email.value.indexOf('.', 0) == -1)
  { alert("Invalid direction of email"); form.Email.focus(); return; }

  form.submit();
}

MM_reloadPage(true);
