// JavaScript Document
function valida(){ 

 x= 0;
 y= 0;
 
if(document.getElementById("nombre").value==''){
	alert("Introducir su Nombre completo");
	 x= 1;
	} 

if(document.getElementById("correo").value==''){
	alert("Introducir su E-mail");
	 x= 1;
	} 

if(document.getElementById("telefono").value==''){
	alert("Introducir su telefono");
	 x= 1;
	} 

if(document.formulario.mensaje.value.length <= 50){ 
	alert("El mensaje debe ser mayor a 50 caracteres");
	 y= 1;
	} 
	
if(x==0 && y==0){ 
alert("Muchas gracias por enviar el formulario"); 
document.formulario.submit(); 
	} 

}
