function ValidarCorreo(email){
  var formato = /^([\w-\.])+@([\w-]+\.)+([a-z]){2,4}$/;
  var comparacion = formato.test(email);
  if(comparacion == false){
       alert("El correo electrónico ingresado no es válido.");
       return false;
  }
  else { return true; }
}
function Comprobar(){
 var mal = false; 
 if (document.frmcont.nombre.value == "") {
    alert("Debe indicar su nombre.");
    document.frmcont.nombre.focus();
    return;
   }
 if (document.frmcont.retcorr.value == "") {
    alert("Debes ingresar tu dirección de correo electrónico.");
    document.frmcont.retcorr.focus();
    return;
   }
 if (document.frmcont.subject.value == "") {
    alert("Debe escribir el asunto.");
    document.frmcont.subject.focus();
    return;
   }
 if (document.frmcont.body.value == "") {
    alert("Debe escribir un mensaje.");
    document.frmcont.body.focus();
    return;
   }
 if (document.frmcont.captcha.value == "") {
    alert("Debe escribir las cuatro letras que aparecen en la imagen.");
    document.frmcont.captcha.focus();
    return;
   }
 if (ValidarCorreo(document.frmcont.retcorr.value) == true) {
    document.frmcont.action="recibe.php";
    document.frmcont.submit();
 }
 else {
     document.frmcont.retcorr.focus();
 }
}

function Send() {
    document.frmcont.action="recibe.php";
    document.frmcont.submit();
}


