// JavaScript Document

function validar_contacto(theForm){
	if (theForm.nombre.value == ""){
		alert("Su nombre es un dato requerido.");
		theForm.nombre.focus();
		return (false);
	}

	if (theForm.apellido.value == ""){
		alert("Su apellido es un dato requerido.");
		theForm.apellido.focus();
		return (false);
	}
	
	if (theForm.email.value == ""){
		alert("Su dirección de correo es un dato requerido.");
		theForm.email.focus();
		return (false);
	}
	
	email = theForm.email.value;
	email = email.toLowerCase();			
	
	if ( email.search("@") != -1 ){
	}
	else{
		alert("La dirección de correo ingresada no es válida.");
		theForm.email.focus();
		return (false);				
	}
	
	if (theForm.comentario.value == ""){
		alert("El comentario es un dato requerido.");
		theForm.comentario.focus();
		return (false);
	}
	
	if (theForm.guess.value == ""){
		alert("Debe ingresar el código de seguridad que se muestra.");
		theForm.guess.focus();
		return (false);
	}
	
	return (true);
}

