function validar_contacto2() {
  //Valido Nombre
  if (document.FormMail.Nombre.value.length < 3) {
	alert("Por favor Ingrese su \"Nombre\".");
    document.FormMail.Nombre.focus();
    return (false);
  }
  /*
  var checkOK = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZÁÉÍÓÚÜ" + "abcdefghijklmnñopqrstuvwxyzáéíóúü ";
  var checkStr = document.FormMail.Nombre.value;
  var allValid = true;
  for (i = 0; i < checkStr.length; i++) {
    ch = checkStr.charAt(i);
    for (j = 0; j < checkOK.length; j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length) {
      allValid = false;
      break;
    }
  }
  if (!allValid) {
	alert("Ha ingresado un \"Nombre\" no válido.");
    document.FormMail.Nombre.focus();
    return (false);
  }
 */
  //Valido Apellido
  if (document.FormMail.Apellido.value.length < 2) {
	alert("Por favor ingrese su \"Apellido\".");
    document.FormMail.Apellido.focus();
    return (false);
  }
  /*
  var checkOK = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZÁÉÍÓÚÜ" + "abcdefghijklmnñopqrstuvwxyzáéíóúü ";
  var checkStr = document.FormMail.Apellido.value;
  var allValid = true;
  for (i = 0; i < checkStr.length; i++) {
    ch = checkStr.charAt(i);
    for (j = 0; j < checkOK.length; j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length) {
      allValid = false;
      break;
    }
  }
  if (!allValid) {
	alert("Ha ingresado un \"Apellido\" no válido.");
    document.FormMail.Apellido.focus();
    return (false);
  }  
 */
  //Valido Correo Electroncio
  var checkOK = "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ@" + "abcdefghijklmnopqrstuvwxyz-_.";
  var checkStr = document.FormMail.email.value;
  var allValid = true;
  for (i = 0; i < checkStr.length; i++) {
    ch = checkStr.charAt(i);
    for (j = 0; j < checkOK.length; j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length) {
      allValid = false;
      break;
    }
  }
  if (!allValid) {
	alert("Por favor ingrese su dirección de correo electrónico en el campo \"Email\".");
    document.FormMail.email.focus();
    return (false);
  }  
  if ((document.FormMail.email.value.indexOf ('@', 0) == -1)||(document.FormMail.email.value.length < 5)) {
	alert("Ha ingresado una dirección de correo electrónico no válida en el campo \"Email\".");
	document.FormMail.email.focus();
    return (false);
  }

  //Valido Consulta
  if (document.FormMail.Consulta.value.length < 10) {
	alert("Por favor ingrese su \"Consulta\".");
    document.FormMail.Consulta.focus();
    return (false);
  }
  /*var enter = "\n";
  var checkOK = '0123456789ABCDEFGHIJKLMNÑOPQRSTUVWXYZÁÉÍÓÚÜ$()' + 'abcdefghijklmnñopqrstuvwxyzáéíóúü,.:_-+¡!¿?=; "{}[]#%&º…' + String.fromCharCode(13) + enter;
  var checkStr = document.FormMail.Consulta.value;
  var allValid = true;
  for (i = 0; i < checkStr.length; i++) {
    ch = checkStr.charAt(i);
    for (j = 0; j < checkOK.length; j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length) {
      allValid = false;
      break;
    }
  }
  if (!allValid) {
	alert("Ha Ingresado Caracteres NO Válidos el campo \"Consulta\".");
    document.FormMail.Consulta.focus();
    return (false);
  }*/  
  
  //Valido Codigo de Seguridad
  if (document.FormMail.CodigoSeguridad.value.length < 6) {
	alert("Por favor ingrese los 6 dígitos del \"Código\".");
    document.FormMail.CodigoSeguridad.focus();
    return (false);
  }
  var checkOK = "1234567890ABCDEFGHIJKLMNÑOPQRSTUVWXYZ" + "abcdefghijklmnñopqrstuvwxyz";
  var checkStr = document.FormMail.CodigoSeguridad.value;
  var allValid = true;
  for (i = 0; i < checkStr.length; i++) {
    ch = checkStr.charAt(i);
    for (j = 0; j < checkOK.length; j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length) {
      allValid = false;
      break;
    }
  }
  if (!allValid) {
	alert("Ha ingresado un \"Código\" no válido.");
    document.FormMail.CodigoSeguridad.focus();
    return (false);
  }  
  
  //Si paso esta Ok
  return (true);
}

function check_form_contacto() {
  var resultado_validacion = validar_contacto2();
  if (resultado_validacion == true) {
	document.FormMail.submit();
  }
}
