function Form1_Validator(theForm)
{
	if (theForm.usuario.value == "") {
		alert("Introduzca el usuario correctamente.");
		theForm.usuario.focus();
		return (false);  
	}
	if (theForm.password.value == "") {
		alert("Introduzca la contraseņa correctamente.");
		theForm.password.focus();
		return (false);  
	}
	return (true);
}

function Form1_Validator_Contactar(theForm)
{
	if (theForm.from.value == "") {
		alert("Debe introducir su NOMBRE.");
		theForm.from.focus();
		return (false);  
	}
	if ((theForm.from.value.length) < 5) {
		alert("La longitud introducida para el NOMBRE es incorrecta.");
		theForm.from.focus();
		return (false);  
	}
	if (theForm.empresa.value == "") {
		alert("Debe introducir la EMPRESA.");
		theForm.empresa.focus();
		return (false);  
	}
	if ((theForm.empresa.value.length) < 5) {
		alert("La longitud introducida para EMPRESA es incorrecta.");
		theForm.empresa.focus();
		return (false);  
	}
	if (theForm.cargo.value == "") {
		alert("Debe introducir el CARGO.");
		theForm.cargo.focus();
		return (false);  
	}
	if ((theForm.cargo.value.length) < 5) {
		alert("La longitud introducida para el CARGO es incorrecta.");
		theForm.cargo.focus();
		return (false);  
	}
	if (theForm.email.value == "") {
		alert("Debe introducir el EMAIL.");
		theForm.email.focus();
		return (false);  
	}
	if(theForm.email.value.indexOf(".")>2 && theForm.email.value.indexOf("@")>0){
	}else{
		alert("El formato del EMAIL es incorrecto.");
		theForm.email.focus();
		return (false); 
	}
	if ((theForm.email.value.length) < 5) {
		alert("La longitud introducida para el EMAIL es incorrecta.");
		theForm.email.focus();
		return (false);  
	}
	if (theForm.mensaje.value == "") {
		alert("Debe introducir el MENSAJE.");
		theForm.mensaje.focus();
		return (false);  
	}
	if ((theForm.mensaje.value.length) < 5) {
		alert("La longitud introducida para el MENSAJE es incorrecta.");
		theForm.mensaje.focus();
		return (false);  
	}
	return (true);
}
