function fValidar(){
    // Varibles de campos y secciones
    var tr_sec_26=document.getElementById("tr_sec_26");
    var tr_sec_27=document.getElementById("tr_sec_27");
    var tr_sec_28=document.getElementById("tr_sec_28");
    var txt_apaterno=document.getElementById("TXT_APATERNO");
    var txt_amaterno=document.getElementById("TXT_AMATERNO");
    var txt_nombres=document.getElementById("TXT_NOMBRES");
    var fec_fecnacimiento=document.getElementById("FEC_FECNACIMIENTO");
    var lst_pais=document.forms[0].LST_26_192;
    var txt_centroproce=document.getElementById("TXT_CENTROPROCE");
    var lst_inicial=document.forms[0].LST_27_194;
    var lst_primaria=document.forms[0].LST_27_195;
    var lst_secundaria=document.forms[0].LST_27_196;
    var txt_apoapaterno=document.getElementById("TXT_APOAPATERNO");
    var txt_apoamaterno=document.getElementById("TXT_APOAMATERNO");
    var txt_aponombres=document.getElementById("TXT_APONOMBRES");
    var txt_fijo=document.getElementById("TXT_FIJO");
    var txt_celular=document.getElementById("TXT_CELULAR");
    var txt_email=document.getElementById("TXT_EMAIL");
    var txt_direccion=document.getElementById("TXT_DIRECCION");
    var lst_distrito=document.forms[0].LST_28_204;
    var txt_numhijos=document.getElementById("TXT_NUMHIJOS");
    var txt_edadhijos=document.getElementById("TXT_EDADHIJOS");
    var txtcomentarios=document.getElementById("TXTCOMENTARIOS");

    if (esVisible('tr_sec_26')){
    if (document.getElementById("hid_valida_188").value=="R"){
    if (!trim(txt_apaterno.value)){
        alert("Ingrese su Apellido Paterno");
        txt_apaterno.focus();
        return false;
    }
    }
    if (document.getElementById("hid_valida_189").value=="R"){
    if (!trim(txt_amaterno.value)){
        alert("Ingrese su Apellido Materno");
        txt_amaterno.focus();
        return false;
    }
    }
    if (document.getElementById("hid_valida_190").value=="R"){
    if (!trim(txt_nombres.value)){
        alert("Ingrese sus Nombres");
        txt_nombres.focus();
        return false;
    }
    }
    if (document.getElementById("hid_valida_191").value=="R"){
    if (!trim(fec_fecnacimiento.value)){
        alert("Elija la Fecha de su Nacimiento");
        fec_fecnacimiento.focus();
        return false;
    }
    if (!esFecha(fec_fecnacimiento.value)){
        alert("Ingrese una fecha válida");
        fec_fecnacimiento.focus();
        return false;
    }
    }
    else if (document.getElementById("hid_valida_191").value=="N"){
    var fec_fecnacimiento=document.getElementById("FEC_FECNACIMIENTO");
    if (trim(fec_fecnacimiento.value)){
    if (!esFecha(fec_fecnacimiento.value)){
        alert("Ingrese una fecha válida");
        fec_fecnacimiento.focus();
        return false;
    }
    }
    }
    if (document.getElementById("hid_valida_192").value=="R"){
    if (lst_pais.options[lst_pais.selectedIndex].value==-1){
        alert("Ingrese el país");
        lst_pais.focus();
        return false;
    }
    }
    if (document.getElementById("hid_valida_193").value=="R"){
    if (!trim(txt_centroproce.value)){
        alert("Ingrese el centro educativo de procedencia");
        txt_centroproce.focus();
        return false;
    }
    }
    }
    if (esVisible('tr_sec_27')){
    if (document.getElementById("hid_valida_194").value=="R"){
    if (lst_inicial.options[lst_inicial.selectedIndex].value==-1){
        alert("Elija el nivel Inicial");
        lst_inicial.focus();
        return false;
    }
    }
    if (document.getElementById("hid_valida_195").value=="R"){
    if (lst_primaria.options[lst_primaria.selectedIndex].value==-1){
        alert("Elija el nivel Secundaria");
        lst_primaria.focus();
        return false;
    }
    }
    if (document.getElementById("hid_valida_196").value=="R"){
    if (lst_secundaria.options[lst_secundaria.selectedIndex].value==-1){
        alert("Elija el nivel Secundaria");
        lst_secundaria.focus();
        return false;
    }
    }
    }
    if (esVisible('tr_sec_28')){
    if (document.getElementById("hid_valida_197").value=="R"){
    if (!trim(txt_apoapaterno.value)){
        alert("Ingrese su Apellido Paterno");
        txt_apoapaterno.focus();
        return false;
    }
    }
    if (document.getElementById("hid_valida_198").value=="R"){
    if (!trim(txt_apoamaterno.value)){
        alert("Ingrese su Apellido Materno");
        txt_apoamaterno.focus();
        return false;
    }
    }
    if (document.getElementById("hid_valida_199").value=="R"){
    if (!trim(txt_aponombres.value)){
        alert("Ingrese sus Nombres");
        txt_aponombres.focus();
        return false;
    }
    }
    if (document.getElementById("hid_valida_200").value=="R"){
    if (!trim(txt_fijo.value)){
        alert("Ingrese su Teléfono");
        txt_fijo.focus();
        return false;
    }
    if (!esNumeroEntero(txt_fijo.value)){
        alert("Ingrese un número entero válido");
        txt_fijo.focus();
        return false;
    }
    }
    else if (document.getElementById("hid_valida_200").value=="N"){
    var txt_fijo=document.getElementById("TXT_FIJO");
    if (trim(txt_fijo.value)){
    if (!esNumeroEntero(txt_fijo.value)){
        alert("Ingrese un número entero válido");
        txt_fijo.focus();
        return false;
    }
    }
    }
    if (document.getElementById("hid_valida_201").value=="R"){
    if (!trim(txt_celular.value)){
        alert("Ingrese el teléfono celular");
        txt_celular.focus();
        return false;
    }
    if (!esNumeroEntero(txt_celular.value)){
        alert("Ingrese un número entero válido");
        txt_celular.focus();
        return false;
    }
    }
    else if (document.getElementById("hid_valida_201").value=="N"){
    var txt_celular=document.getElementById("TXT_CELULAR");
    if (trim(txt_celular.value)){
    if (!esNumeroEntero(txt_celular.value)){
        alert("Ingrese un número entero válido");
        txt_celular.focus();
        return false;
    }
    }
    }
    if (document.getElementById("hid_valida_202").value=="R"){
    if (!trim(txt_email.value)){
        alert("Ingrese su E-mail");
        txt_email.focus();
        return false;
    }
    if (!esCorreo(txt_email.value)){
        alert("Ingrese un correo válido");
        txt_email.focus();
        return false;
    }
    }
    else if (document.getElementById("hid_valida_202").value=="N"){
    var txt_email=document.getElementById("TXT_EMAIL");
    if (trim(txt_email.value)){
    if (!esCorreo(txt_email.value)){
        alert("Ingrese un correo válido");
        txt_email.focus();
        return false;
    }
    }
    }
    if (document.getElementById("hid_valida_203").value=="R"){
    if (!trim(txt_direccion.value)){
        alert("Ingrese su Dirección");
        txt_direccion.focus();
        return false;
    }
    }
    if (document.getElementById("hid_valida_204").value=="R"){
    if (lst_distrito.options[lst_distrito.selectedIndex].value==-1){
        alert("Elija su Distrito");
        lst_distrito.focus();
        return false;
    }
    }
    if (document.getElementById("hid_valida_205").value=="R"){
    if (!trim(txt_numhijos.value)){
        alert("Ingrese el número de hijos");
        txt_numhijos.focus();
        return false;
    }
    if (!esNumeroEntero(txt_numhijos.value)){
        alert("Ingrese un número entero válido");
        txt_numhijos.focus();
        return false;
    }
    }
    else if (document.getElementById("hid_valida_205").value=="N"){
    var txt_numhijos=document.getElementById("TXT_NUMHIJOS");
    if (trim(txt_numhijos.value)){
    if (!esNumeroEntero(txt_numhijos.value)){
        alert("Ingrese un número entero válido");
        txt_numhijos.focus();
        return false;
    }
    }
    }
    if (document.getElementById("hid_valida_206").value=="R"){
    if (!trim(txt_edadhijos.value)){
        alert("Ingrese el edad de los hijos");
        txt_edadhijos.focus();
        return false;
    }
    }
    if (document.getElementById("hid_valida_207").value=="R"){
    if (!trim(txtcomentarios.value)){
        alert("Ingrese el comentarios");
        txtcomentarios.focus();
        return false;
    }
    }
    }

    // Asigna texto a valor de listas
    document.getElementById("hid_lista_192").value=lst_pais.options[lst_pais.selectedIndex].text;
    document.getElementById("hid_lista_194").value=lst_inicial.options[lst_inicial.selectedIndex].text;
    document.getElementById("hid_lista_195").value=lst_primaria.options[lst_primaria.selectedIndex].text;
    document.getElementById("hid_lista_196").value=lst_secundaria.options[lst_secundaria.selectedIndex].text;
    document.getElementById("hid_lista_204").value=lst_distrito.options[lst_distrito.selectedIndex].text;

   // Limpiar texto de ayuda


    __doPostBack('ctl00$PortalPlaceHolder$ctl00$btn_Enviar','');
}


