function winopen(target,w,h,scroll)
{
var parametros="resizable=yes,scrollbars=" + scroll + ",toolbar=no, location=no,directories=no,status=no, menubar=no,width=" + w + ",height=" + h + ",top=3,left=3";
window.open(target,'',parametros);
}

function FrontPage_Form1_Validator(theForm)
{

  if (theForm.HS_Nombre.value == "")
  {
    alert("Escriba un valor para el campo \"Nombre\".");
    theForm.HS_Nombre.focus();
    return (false);
  }

  if (theForm.HS_Nombre.value.length < 3)
  {
    alert("Escriba por lo menos 3 caracteres en el campo \"Nombre\".");
    theForm.HS_Nombre.focus();
    return (false);
  }

  if (theForm.HS_APaterno.value == "")
  {
    alert("Escriba un valor para el campo \"Apellido Paterno\".");
    theForm.HS_APaterno.focus();
    return (false);
  }

  if (theForm.HS_APaterno.value.length < 3)
  {
    alert("Escriba por lo menos 3 caracteres en el campo \"Apellido Paterno\".");
    theForm.HS_APaterno.focus();
    return (false);
  }

  if (theForm.HS_AMaterno.value == "")
  {
    alert("Escriba un valor para el campo \"Apellido Materno\".");
    theForm.HS_AMaterno.focus();
    return (false);
  }

  if (theForm.HS_AMaterno.value.length < 3)
  {
    alert("Escriba por lo menos 3 caracteres en el campo \"Apellido Materno\".");
    theForm.HS_AMaterno.focus();
    return (false);
  }

  if (theForm.HS_eMail.value == "")
  {
    alert("Escriba un valor para el campo \"e-Mail\".");
    theForm.HS_eMail.focus();
    return (false);
  }

  if (theForm.HS_eMail.value.length < 3)
  {
    alert("Escriba por lo menos 3 caracteres en el campo \"e-Mail\".");
    theForm.HS_eMail.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-.@_-%";
  var checkStr = theForm.HS_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("Escriba sólo letra, dígito y \".@_-%\" caracteres en el campo \"e-Mail\".");
    theForm.HS_eMail.focus();
    return (false);
  }

  var radioSelected = false;
  for (i = 0;  i < theForm.HS_Sexo.length;  i++)
  {
    if (theForm.HS_Sexo[i].checked)
        radioSelected = true;
  }
  if (!radioSelected)
  {
    alert("Elija una de las opciones \"Sexo\".");
    return (false);
  }

  if (theForm.HS_EdoCivil.selectedIndex < 0)
  {
    alert("Elija una de las opciones \"Estado civil\".");
    theForm.HS_EdoCivil.focus();
    return (false);
  }

  if (theForm.HS_EdoCivil.selectedIndex == 0)
  {
    alert("La primera opción \"Estado civil\" no es válida. Elija una de las otras opciones.");
    theForm.HS_EdoCivil.focus();
    return (false);
  }

  var checkOK = "0123456789-.";
  var checkStr = theForm.HS_Estatura.value;
  var allValid = true;
  var decPoints = 0;
  var allNum = "";
  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 (ch == ".")
    {
      allNum += ".";
      decPoints++;
    }
    else
      allNum += ch;
  }
  if (!allValid)
  {
    alert("Escriba sólo dígito caracteres en el campo \"Estatura\".");
    theForm.HS_Estatura.focus();
    return (false);
  }

  if (decPoints > 1)
  {
    alert("Escriba un número válido en el campo \"HS_Estatura\".");
    theForm.HS_Estatura.focus();
    return (false);
  }

  var checkOK = "0123456789-";
  var checkStr = theForm.HS_Peso.value;
  var allValid = true;
  var decPoints = 0;
  var allNum = "";
  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;
    }
    allNum += ch;
  }
  if (!allValid)
  {
    alert("Escriba sólo dígito caracteres en el campo \"HS_Peso\".");
    theForm.HS_Peso.focus();
    return (false);
  }

  if (theForm.HS_DiaNac.selectedIndex == 0)
  {
    alert("La primera opción \"Día de nacimiento\" no es válida. Elija una de las otras opciones.");
    theForm.HS_DiaNac.focus();
    return (false);
  }

  if (theForm.HS_MesNac.selectedIndex == 0)
  {
    alert("La primera opción \"Mes de nacimiento\" no es válida. Elija una de las otras opciones.");
    theForm.HS_MesNac.focus();
    return (false);
  }

  if (theForm.HS_AnioNac.selectedIndex == 0)
  {
    alert("La primera opción \"Año de nacimiento\" no es válida. Elija una de las otras opciones.");
    theForm.HS_AnioNac.focus();
    return (false);
  }

  if (theForm.HS_Ciudad.value == "")
  {
    alert("Escriba un valor para el campo \"Ciudad de residencia\".");
    theForm.HS_Ciudad.focus();
    return (false);
  }

  if (theForm.HS_Ciudad.value.length < 3)
  {
    alert("Escriba por lo menos 3 caracteres en el campo \"Ciudad de residencia\".");
    theForm.HS_Ciudad.focus();
    return (false);
  }

  if (theForm.HS_Estado.value == "")
  {
    alert("Escriba un valor para el campo \"Estado de residencia\".");
    theForm.HS_Estado.focus();
    return (false);
  }

  if (theForm.HS_Estado.value.length < 3)
  {
    alert("Escriba por lo menos 3 caracteres en el campo \"Estado de residencia\".");
    theForm.HS_Estado.focus();
    return (false);
  }

  if (theForm.HS_SueldoMin.value == "")
  {
    alert("Escriba un valor para el campo \"Sueldo deseado\".");
    theForm.HS_SueldoMin.focus();
    return (false);
  }

  if (theForm.HS_SueldoMin.value.length < 1)
  {
    alert("Escriba por lo menos 1 caracteres en el campo \"Sueldo deseado\".");
    theForm.HS_SueldoMin.focus();
    return (false);
  }

  var checkOK = "0123456789-.,";
  var checkStr = theForm.HS_SueldoPue1.value;
  var allValid = true;
  var decPoints = 0;
  var allNum = "";
  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 (ch == ".")
    {
      allNum += ".";
      decPoints++;
    }
    else
      allNum += ch;
  }
  if (!allValid)
  {
    alert("Escriba sólo dígito caracteres en el campo \"HS_SueldoPue1\".");
    theForm.HS_SueldoPue1.focus();
    return (false);
  }

  if (decPoints > 1)
  {
    alert("Escriba un número válido en el campo \"HS_SueldoPue1\".");
    theForm.HS_SueldoPue1.focus();
    return (false);
  }

	 out = ","; // reemplazar la letra a
	 add = ""; // por la letra z
	 temp = "" + theForm.HS_SueldoPue1.value;
	 while (temp.indexOf(out)>-1)
	 {
	 			 pos= temp.indexOf(out);
	 			 temp = "" + (temp.substring(0, pos) + add + 
	 			 temp.substring((pos + out.length), temp.length));
	 }
	 theForm.HS_SueldoPue1.value = temp;
	
  var checkOK = "0123456789-.,";
  var checkStr = theForm.HS_SueldoPue2.value;
  var allValid = true;
  var decPoints = 0;
  var allNum = "";
  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 (ch == ".")
    {
      allNum += ".";
      decPoints++;
    }
    else
      allNum += ch;
  }
  if (!allValid)
  {
    alert("Escriba sólo dígito caracteres en el campo \"HS_SueldoPue2\".");
    theForm.HS_SueldoPue2.focus();
    return (false);
  }

  if (decPoints > 1)
  {
    alert("Escriba un número válido en el campo \"HS_SueldoPue2\".");
    theForm.HS_SueldoPue2.focus();
    return (false);
  }

	 out = ","; // reemplazar la letra a
	 add = ""; // por la letra z
	 temp = "" + theForm.HS_SueldoPue2.value;
	 while (temp.indexOf(out)>-1)
	 {
	 			 pos= temp.indexOf(out);
	 			 temp = "" + (temp.substring(0, pos) + add + 
	 			 temp.substring((pos + out.length), temp.length));
	 }
	 theForm.HS_SueldoPue2.value = temp;
	
	
  var checkOK = "0123456789-.,";
  var checkStr = theForm.HS_SueldoPue3.value;
  var allValid = true;
  var decPoints = 0;
  var allNum = "";
  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 (ch == ".")
    {
      allNum += ".";
      decPoints++;
    }
    else
      allNum += ch;
  }
  if (!allValid)
  {
    alert("Escriba sólo dígito caracteres en el campo \"HS_SueldoPue3\".");
    theForm.HS_SueldoPue3.focus();
    return (false);
  }

  if (decPoints > 1)
  {
    alert("Escriba un número válido en el campo \"HS_SueldoPue3\".");
    theForm.HS_SueldoPue3.focus();
    return (false);
  }

	 out = ","; // reemplazar la letra a
	 add = ""; // por la letra z
	 temp = "" + theForm.HS_SueldoPue3.value;
	 while (temp.indexOf(out)>-1)
	 {
	 			 pos= temp.indexOf(out);
	 			 temp = "" + (temp.substring(0, pos) + add + 
	 			 temp.substring((pos + out.length), temp.length));
	 }
	 theForm.HS_SueldoPue3.value = temp;
	
  var checkOK = "0123456789-.,";
  var checkStr = theForm.HS_SueldoPue4.value;
  var allValid = true;
  var decPoints = 0;
  var allNum = "";
  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 (ch == ".")
    {
      allNum += ".";
      decPoints++;
    }
    else
      allNum += ch;
  }
  if (!allValid)
  {
    alert("Escriba sólo dígito caracteres en el campo \"HS_SueldoPue4\".");
    theForm.HS_SueldoPue4.focus();
    return (false);
  }

  if (decPoints > 1)
  {
    alert("Escriba un número válido en el campo \"HS_SueldoPue4\".");
    theForm.HS_SueldoPue4.focus();
    return (false);
  }
	 out = ","; // reemplazar la letra a
	 add = ""; // por la letra z
	 temp = "" + theForm.HS_SueldoPue4.value;
	 while (temp.indexOf(out)>-1)
	 {
	 			 pos= temp.indexOf(out);
	 			 temp = "" + (temp.substring(0, pos) + add + 
	 			 temp.substring((pos + out.length), temp.length));
	 }
	 theForm.HS_SueldoPue4.value = temp;
	
  var checkOK = "0123456789-.,";
  var checkStr = theForm.HS_SueldoPue5.value;
  var allValid = true;
  var decPoints = 0;
  var allNum = "";
  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 (ch == ".")
    {
      allNum += ".";
      decPoints++;
    }
    else
      allNum += ch;
  }
  if (!allValid)
  {
    alert("Escriba sólo dígito caracteres en el campo \"HS_SueldoPue5\".");
    theForm.HS_SueldoPue5.focus();
    return (false);
  }

  if (decPoints > 1)
  {
    alert("Escriba un número válido en el campo \"HS_SueldoPue5\".");
    theForm.HS_SueldoPue5.focus();
    return (false);
  }
  return (true);

	 out = ","; // reemplazar la letra a
	 add = ""; // por la letra z
	 temp = "" + theForm.HS_SueldoPue5.value;
	 while (temp.indexOf(out)>-1)
	 {
	 			 pos= temp.indexOf(out);
	 			 temp = "" + (temp.substring(0, pos) + add + 
	 			 temp.substring((pos + out.length), temp.length));
	 }
	 theForm.HS_SueldoPue5.value = temp;


}
