function Form1_Validator(theForm)
{
if (theForm.firstname.value == "")
  {
    alert("Por favor, escriba su nombre en este campo.");
    theForm.firstname.focus();
    return (false);
  }
if (theForm.lastname.value == "")
  {
    alert("Por favor, escriba su apellido en este campo.");
    theForm.lastname.focus();
    return (false);
  }
if (theForm.city.value == "")
  {
    alert("Por favor, indique su ciudad.");
    theForm.city.focus();
    return (false);
  }
if (theForm.country.value == "")
  {
    alert("Por favor, indique su pais.");
    theForm.country.focus();
    return (false);
  }
if (theForm.email.value == "")
  {
    alert("Por favor escriba su e-mail en este campo");
    theForm.email.focus();
    return (false);
  }
if (theForm.email.value.indexOf('@',0)==-1 ||
        theForm.email.value.indexOf('.',0)==-1)
        {
            alert("Por favor escriba su e-mail en este campo")
            theForm.email.select()
            theForm.email.focus()
            return (false);
        }
if (theForm.email2.value == "")
    {
    alert("Por favor, confirme su e-mail.");
    theForm.email2.focus();
    return (false);
  }
if(theForm.email.value!=theForm.email2.value)
  {
  alert('E-mail debe ser la misma en los campos \"E-mail\" y \"Confirmar E-mail\".');
  theForm.email.focus();
  return false;
  }
if (theForm.age.value == "")
  {
    alert("Por favor, indique su edad.");
    theForm.age.focus();
    return (false);
  }
if (theForm.gender.value == "")
  {
    alert("Por favor, indique su sexo.");
    theForm.sex[0].focus();
    return (false);
  }
if (theForm.durationofdisease.value == "")
  {
    alert("Por favor, indique la duracion total de su enfermedad.");
    theForm.duration[0].focus();
    return (false);
  }
if (theForm.captcha_code.value == "")
  {
    alert("Por favor escriba el codigo digital.");
    theForm.captcha_code.focus();
    return (false);
  } 
   return (true);
}
