<!--
// Funciones nuevas
function CheckUsuario(){
  var sex_tmp;
  for(var i=0;i < 2 ;i++){
    if(document.datos.sexo[i].checked==true)
	  sex_tmp=document.datos.sexo[i].value;
  }
  if(document.datos.nombre.value==""){
    alert("You need to specify the first name");
	return false;
  }
  if(document.datos.apellido.value==""){
    alert("You need to specify the last name");
	return false;
  }
  if((sex_tmp!=1)&&(sex_tmp!=2)){
    alert("You need to specify the sex");
	return false;
  }
  window.open('check_existe.phtml?nombre=' + document.datos.nombre.value + '&apellido=' + document.datos.apellido.value + '&sexo=' + sex_tmp + '','ventana_existe','status=yes,toolbar=yes,location=yes,menubar=yes,scrollbars=yes,resizable=yes,width=780,height=580');
  document.datos.existe_flag.value=1;
}
function ChecarLogin(inForm){
  if(!validEmail(inForm.correo_electronico.value)){
    alert("Invalid email. Please check");
    return false;
  }
  if(inForm.password.value==""){
    alert("Your password is not valid");
    return false;
  }
  return true;
}
function ChecarDatos(){   
  if(!validEmail(document.datos.correo_electronico.value)){
    alert("Invalid email. Please check");
   return void(0);
  }
  if(!CheckPass(document.datos.password.value)){
    alert("Your password is not valid");
    return void(0);
  }
  if(document.datos.password.value!=document.datos.password_confirm.value){
    alert("Your password and password confirmation are not equal");
    return void(0);;
  }
  if(document.datos.nombre.value == ""){
    alert("You need to specify the first name\n");
    return void(0);;
  }
  if(document.datos.apellido.value == ""){
    alert("You need to specify the last name\n");
    return void(0);;
  }
  var checked=0;
  for (var i=0; i<document.datos.sexo.length; i++){
    if(document.datos.sexo[i].checked==true)
      checked=1;
  }
  if(!checked){
    alert("You need to specify the gender");
    return void(0);;
  }
  if(document.datos.ciudad_p.value==""){
    alert("The city in the address has not been provided\n");
    return void(0);;
  }
  if(document.datos.edo_p.value==""){
    alert("The state/province in the address has not been provided\n");
    return void(0);;
  }
  if(document.datos.pais_id_p.selectedIndex==0){
    alert("The country in the address has not been provided\n");
    return void(0);;
  }
  if((document.datos.tel_casa.value == "")&&(document.datos.celular.value == "")&&(document.datos.fax_p.value == "")){
    alert("A form of contact has not been provided\n");
   return void(0);;
  }
  if(document.datos.apostolado.selectedIndex==0){
    alert("The section you belong has not been provided\n");
    return void(0);;
  }
  if(_trim(document.datos.primera_experiencia.value)==""){
    alert("You need to specify your experience\n");
    return void(0);;
  }
  if(_trim(document.datos.persona_contacto.value)==""){
    alert("You need to specify the contact person\n");
    return void(0);;
  }
  document.datos.submit();
  return true;
}
function CancelarRegistro(Folder,Id){
  if(confirm("Are you sure you want to cancel the registration?"))
  if(Id && Folder){
    window.location = Folder + "/borraSubmit.phtml?id=" + Id;
  }else{
    window.location = "index.phtml";
  }
}
function CheckPassword(){
  if(!validEmail(document.datos.correo_electronico.value)){
    alert("Invalid email. Please check");
    return void(0);
  }
  document.datos.submit();
}
function ChecarDatos02(){
  if(document.datos.apostolado.selectedIndex==0){
    alert("The section you belong has not been provided\n");
    return void(0);
  }
  if(_trim(document.datos.primera_experiencia.value)==""){
    alert("You need to specify your experience\n");
    return void(0);
  }
  if(_trim(document.datos.persona_contacto.value)==""){
    alert("You need to specify the contact person\n");
    return void(0);
  }
  document.datos.submit();
  return true;
}


function ChecarDatosMail(){

  if(!validEmail(document.datos.correo_electronico.value)){
    alert("Invalid email. Please check");
    return void(0);
  }
  if(!CheckPass(document.datos.password.value)){
    alert("Your password is not valid");
    return void(0);
  }
  if(document.datos.password.value!=document.datos.password_confirm.value){
    alert("Your password and password confirmation are not equal");
    return void(0);
  }
  if(document.datos.nombre.value == ""){
    alert("You need to specify the first name\n");
    return void(0);
  }
  if(document.datos.apellido.value == ""){
    alert("You need to specify the last name\n");
    return void(0);
  }
  var checked=0;
  for (var i=0; i<document.datos.sexo.length; i++){
    if(document.datos.sexo[i].checked==true)
      checked=1;
  }
  if(!checked){
    alert("You need to specify the gender");
    return void(0);
  }

  if(document.datos.ciudad_p.value==""){
    alert("The city in the address has not been provided\n");
    return void(0);
  }
  if(document.datos.edo_p.value==""){
    alert("The state/province in the address has not been provided\n");
    return void(0);
  }
  if(document.datos.pais_id_p.selectedIndex==0){
    alert("The country in the address has not been provided\n");
    return void(0);
  }
  if((document.datos.tel_casa.value == "")&&(document.datos.celular.value == "")&&(document.datos.fax_p.value == "")){
    alert("A form of contact has not been provided\n");
    return void(0);
  }

  if(document.datos.apostolado.selectedIndex==0){
    alert("The section you belong has not been provided\n");
    return void(0);
  }
  if(_trim(document.datos.primera_experiencia.value)==""){
    alert("You need to specify your experience\n");
    return void(0);
  }
  if(_trim(document.datos.persona_contacto.value)==""){
    alert("You need to specify the contact person\n");
    return void(0);
  }
     
  if (document.datos.trial.value>2 || document.datos.trial.value<1){
    alert("Necesita seleccionar una opción de registro");
    return void(0);
  }
  	
  document.datos.submit();
  return true;
}


//-->
