// JavaScript Document
//SYSLAN 

//--------------------------------------------
function validar_datos(form){
  if (form.nombre.value == "")
  { alert("Por favor ingrese tu nombre ");form.nombre.focus(); return; }

 if (form.correo.value == "")
  { alert("Por favor ingrese tu correo");form.correo.focus(); return; }
 if (!isEmailAddress(form.correo))
	  { form.correo.focus(); return; }
 if (form.tema.value == "")
  { alert("Por favor ingrese el Tema");form.tema.focus();return; }

if (form.mensaje.value == "")
  { alert("Por favor ingrese tu mensaje"); form.mensaje.focus();return; }
if (form.code.value == "")
  { alert("Por favor ingrese el Codigo de Verificación"); form.code.focus();return; }

	form.submit();
	return true;
}

//----------------------------------------------
//--------------
function isEmailAddress(theElement){
var s = theElement.value;
var filter=/^[A-Za-z][A-Za-z0-9_]*@[A-Za-z0-9_]+\.[A-Za-z0-9_.]+[A-za-z]$/;
if (s.length == 0 ) return true;
if (filter.test(s))
return true;
else
	alert("Ingrese una dirección de correo válida");
theElement.focus();
return false;
}
function verFotoAmpliada(img){

  foto1= new Image();

  foto1.src=(img);

  Controlla(img);

}
