function fValidar(){
    // Varibles de campos y secciones
    var tr_sec_31=document.getElementById("tr_sec_31");
    var tr_sec_32=document.getElementById("tr_sec_32");
    var tr_sec_33=document.getElementById("tr_sec_33");
    var razonsocial=document.getElementById("RAZONSOCIAL");
    var nombres=document.getElementById("NOMBRES");
    var direccion=document.getElementById("DIRECCION");
    var cmb_doc=document.forms[0].LST_31_134;
    var numero_pas=document.getElementById("NUMERO_PAS");
    var numero_dni=document.getElementById("NUMERO_DNI");
    var num_carnet_ext=document.getElementById("NUM_CARNET_EXT");
    var num_ci_ffaa=document.getElementById("NUM_CI_FFAA");
    var num_ci_pnp=document.getElementById("NUM_CI_PNP");
    var num_otros=document.getElementById("NUM_OTROS");
    var edad=document.getElementById("EDAD");
    var txt_ocup=document.getElementById("TXT_OCUP");
    var txt_mail=document.getElementById("TXT_MAIL");
    var txt_telf=document.getElementById("TXT_TELF");
    var txt_fax=document.getElementById("TXT_FAX");
    var txt_depa=document.getElementById("TXT_DEPA");
    var txt_prov=document.getElementById("TXT_PROV");
    var txt_dist=document.getElementById("TXT_DIST");
    var cmb=document.forms[0].LST_31_144;
    var num_boleta=document.getElementById("NUM_BOLETA");
    var num_contrato=document.getElementById("NUM_CONTRATO");
    var num_factura=document.getElementById("NUM_FACTURA");
    var num_otros_dp=document.getElementById("NUM_OTROS_DP");
    var txt_fec_emi=document.getElementById("TXT_FEC_EMI");
    var txt_raz_social_s2=document.getElementById("TXT_RAZ_SOCIAL_S2");
    var txt_nom_s2=document.getElementById("TXT_NOM_S2");
    var txt_repre_s2=document.getElementById("TXT_REPRE_S2");
    var txt_dir_s2=document.getElementById("TXT_DIR_S2");
    var txt_tel_s2=document.getElementById("TXT_TEL_S2");
    var txt_mail_s2=document.getElementById("TXT_MAIL_S2");
    var txt_fax_s2=document.getElementById("TXT_FAX_S2");
    var txt_dep_s2=document.getElementById("TXT_DEP_S2");
    var txt_prov_s2=document.getElementById("TXT_PROV_S2");
    var txt_dist_s2=document.getElementById("TXT_DIST_S2");
    var txt_fec_s2=document.getElementById("TXT_FEC_S2");
    var txt_dep_s3=document.getElementById("TXT_DEP_S3");
    var txt_prov_s3=document.getElementById("TXT_PROV_S3");
    var txt_dist_s3=document.getElementById("TXT_DIST_S3");
    var txt_req_s3=document.getElementById("TXT_REQ_S3");
    var txa_det_req_s3=document.getElementById("TXA_DET_REQ_S3");

    // validar formulario
    if(tr_sec_31!=null){
    if (esVisible('tr_sec_31')){
    if (document.getElementById("hid_valida_131").value=="R"){
    if(razonsocial!=null){
    if (!trim(razonsocial.value)){
        alert("Ingrese su razon social");
        razonsocial.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    if (document.getElementById("hid_valida_132").value=="R"){
    if(nombres!=null){
    if (!trim(nombres.value)){
        alert("Debe ingresar sus Apellidos y Nombres");
        nombres.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    if (document.getElementById("hid_valida_133").value=="R"){
    if(direccion!=null){
    if (!trim(direccion.value)){
        alert("Debe ingresar su Dirección");
        direccion.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    if (document.getElementById("hid_valida_134").value=="R"){
    if(cmb_doc!=null){
    if (cmb_doc.options[cmb_doc.selectedIndex].value==-1){
        alert("Ingrese el documento de indentidad:");
        cmb_doc.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    if (document.getElementById("hid_valida_163").value=="R"){
    if(numero_pas!=null){
    if (!trim(numero_pas.value)){
        alert("Debe ingresar número de pasaporte");
        numero_pas.focus();
        return false;
    }
    }
    if(numero_pas!=null){
    if (!esNumeroEntero(numero_pas.value)){
        alert("Ingrese un número entero válido");
        numero_pas.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    else if (document.getElementById("hid_valida_163").value=="N"){
    var numero_pas=document.getElementById("NUMERO_PAS");
    if(numero_pas!=null){
    if (trim(numero_pas.value)){
    if(numero_pas!=null){
    if (!esNumeroEntero(numero_pas.value)){
        alert("Ingrese un número entero válido");
        numero_pas.focus();
        return false;
    }
    }
    }
    }
    }// end else if hid_valida_...
    if (document.getElementById("hid_valida_135").value=="R"){
    if(numero_dni!=null){
    if (!trim(numero_dni.value)){
        alert("Ingrese su número de DNI correcto");
        numero_dni.focus();
        return false;
    }
    }
    if(numero_dni!=null){
    if (!esNumeroEntero(numero_dni.value)){
        alert("Ingrese un número entero válido");
        numero_dni.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    else if (document.getElementById("hid_valida_135").value=="N"){
    var numero_dni=document.getElementById("NUMERO_DNI");
    if(numero_dni!=null){
    if (trim(numero_dni.value)){
    if(numero_dni!=null){
    if (!esNumeroEntero(numero_dni.value)){
        alert("Ingrese un número entero válido");
        numero_dni.focus();
        return false;
    }
    }
    }
    }
    }// end else if hid_valida_...
    if (document.getElementById("hid_valida_164").value=="R"){
    if(num_carnet_ext!=null){
    if (!trim(num_carnet_ext.value)){
        alert("Ingrese número de Carnet Extranjería");
        num_carnet_ext.focus();
        return false;
    }
    }
    if(num_carnet_ext!=null){
    if (!esNumeroEntero(num_carnet_ext.value)){
        alert("Ingrese un número entero válido");
        num_carnet_ext.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    else if (document.getElementById("hid_valida_164").value=="N"){
    var num_carnet_ext=document.getElementById("NUM_CARNET_EXT");
    if(num_carnet_ext!=null){
    if (trim(num_carnet_ext.value)){
    if(num_carnet_ext!=null){
    if (!esNumeroEntero(num_carnet_ext.value)){
        alert("Ingrese un número entero válido");
        num_carnet_ext.focus();
        return false;
    }
    }
    }
    }
    }// end else if hid_valida_...
    if (document.getElementById("hid_valida_165").value=="R"){
    if(num_ci_ffaa!=null){
    if (!trim(num_ci_ffaa.value)){
        alert("ingresar numero");
        num_ci_ffaa.focus();
        return false;
    }
    }
    if(num_ci_ffaa!=null){
    if (!esNumeroEntero(num_ci_ffaa.value)){
        alert("Ingrese un número entero válido");
        num_ci_ffaa.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    else if (document.getElementById("hid_valida_165").value=="N"){
    var num_ci_ffaa=document.getElementById("NUM_CI_FFAA");
    if(num_ci_ffaa!=null){
    if (trim(num_ci_ffaa.value)){
    if(num_ci_ffaa!=null){
    if (!esNumeroEntero(num_ci_ffaa.value)){
        alert("Ingrese un número entero válido");
        num_ci_ffaa.focus();
        return false;
    }
    }
    }
    }
    }// end else if hid_valida_...
    if (document.getElementById("hid_valida_166").value=="R"){
    if(num_ci_pnp!=null){
    if (!trim(num_ci_pnp.value)){
        alert("Ingrese el ci pnp:");
        num_ci_pnp.focus();
        return false;
    }
    }
    if(num_ci_pnp!=null){
    if (!esNumeroEntero(num_ci_pnp.value)){
        alert("Ingrese un número entero válido");
        num_ci_pnp.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    else if (document.getElementById("hid_valida_166").value=="N"){
    var num_ci_pnp=document.getElementById("NUM_CI_PNP");
    if(num_ci_pnp!=null){
    if (trim(num_ci_pnp.value)){
    if(num_ci_pnp!=null){
    if (!esNumeroEntero(num_ci_pnp.value)){
        alert("Ingrese un número entero válido");
        num_ci_pnp.focus();
        return false;
    }
    }
    }
    }
    }// end else if hid_valida_...
    if (document.getElementById("hid_valida_167").value=="R"){
    if(num_otros!=null){
    if (!trim(num_otros.value)){
        alert("Ingrese el número:");
        num_otros.focus();
        return false;
    }
    }
    if(num_otros!=null){
    if (!esNumeroEntero(num_otros.value)){
        alert("Ingrese un número entero válido");
        num_otros.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    else if (document.getElementById("hid_valida_167").value=="N"){
    var num_otros=document.getElementById("NUM_OTROS");
    if(num_otros!=null){
    if (trim(num_otros.value)){
    if(num_otros!=null){
    if (!esNumeroEntero(num_otros.value)){
        alert("Ingrese un número entero válido");
        num_otros.focus();
        return false;
    }
    }
    }
    }
    }// end else if hid_valida_...
    if (document.getElementById("hid_valida_136").value=="R"){
    if(edad!=null){
    if (!trim(edad.value)){
        alert("ingrese su edad");
        edad.focus();
        return false;
    }
    }
    if(edad!=null){
    if (!esNumeroEntero(edad.value)){
        alert("Ingrese un número entero válido");
        edad.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    else if (document.getElementById("hid_valida_136").value=="N"){
    var edad=document.getElementById("EDAD");
    if(edad!=null){
    if (trim(edad.value)){
    if(edad!=null){
    if (!esNumeroEntero(edad.value)){
        alert("Ingrese un número entero válido");
        edad.focus();
        return false;
    }
    }
    }
    }
    }// end else if hid_valida_...
    if (document.getElementById("hid_valida_137").value=="R"){
    if(txt_ocup!=null){
    if (!trim(txt_ocup.value)){
        alert("Ingrese su Ocupación");
        txt_ocup.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    if (document.getElementById("hid_valida_138").value=="R"){
    if(txt_mail!=null){
    if (!trim(txt_mail.value)){
        alert("Ingrese correo electronico");
        txt_mail.focus();
        return false;
    }
    }
    if(txt_mail!=null){
    if (!esCorreo(txt_mail.value)){
        alert("Ingrese un correo válido");
        txt_mail.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    else if (document.getElementById("hid_valida_138").value=="N"){
    var txt_mail=document.getElementById("TXT_MAIL");
    if(txt_mail!=null){
    if (trim(txt_mail.value)){
    if(txt_mail!=null){
    if (!esCorreo(txt_mail.value)){
        alert("Ingrese un correo válido");
        txt_mail.focus();
        return false;
    }
    }
    }
    }
    }// end else if hid_valida_...
    if (document.getElementById("hid_valida_139").value=="R"){
    if(txt_telf!=null){
    if (!trim(txt_telf.value)){
        alert("Ingrese numero telefonico");
        txt_telf.focus();
        return false;
    }
    }
    if(txt_telf!=null){
    if (!esNumeroEntero(txt_telf.value)){
        alert("Ingrese un número entero válido");
        txt_telf.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    else if (document.getElementById("hid_valida_139").value=="N"){
    var txt_telf=document.getElementById("TXT_TELF");
    if(txt_telf!=null){
    if (trim(txt_telf.value)){
    if(txt_telf!=null){
    if (!esNumeroEntero(txt_telf.value)){
        alert("Ingrese un número entero válido");
        txt_telf.focus();
        return false;
    }
    }
    }
    }
    }// end else if hid_valida_...
    if (document.getElementById("hid_valida_140").value=="R"){
    if(txt_fax!=null){
    if (!trim(txt_fax.value)){
        alert("Ingrese correctamente su número de fax");
        txt_fax.focus();
        return false;
    }
    }
    if(txt_fax!=null){
    if (!esNumeroEntero(txt_fax.value)){
        alert("Ingrese un número entero válido");
        txt_fax.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    else if (document.getElementById("hid_valida_140").value=="N"){
    var txt_fax=document.getElementById("TXT_FAX");
    if(txt_fax!=null){
    if (trim(txt_fax.value)){
    if(txt_fax!=null){
    if (!esNumeroEntero(txt_fax.value)){
        alert("Ingrese un número entero válido");
        txt_fax.focus();
        return false;
    }
    }
    }
    }
    }// end else if hid_valida_...
    if (document.getElementById("hid_valida_141").value=="R"){
    if(txt_depa!=null){
    if (!trim(txt_depa.value)){
        alert("Debe ingresar un departamento");
        txt_depa.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    if (document.getElementById("hid_valida_142").value=="R"){
    if(txt_prov!=null){
    if (!trim(txt_prov.value)){
        alert("Debe ingresar el nombre de su provincia");
        txt_prov.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    if (document.getElementById("hid_valida_143").value=="R"){
    if(txt_dist!=null){
    if (!trim(txt_dist.value)){
        alert("Debe ingresar el nombre de su Distrito");
        txt_dist.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    if (document.getElementById("hid_valida_144").value=="R"){
    if(cmb!=null){
    if (cmb.options[cmb.selectedIndex].value==-1){
        alert("Ingrese el documento probatorio:");
        cmb.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    if (document.getElementById("hid_valida_145").value=="R"){
    if(num_boleta!=null){
    if (!trim(num_boleta.value)){
        alert("ingresar numero de boleta");
        num_boleta.focus();
        return false;
    }
    }
    if(num_boleta!=null){
    if (!esNumeroEntero(num_boleta.value)){
        alert("Ingrese un número entero válido");
        num_boleta.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    else if (document.getElementById("hid_valida_145").value=="N"){
    var num_boleta=document.getElementById("NUM_BOLETA");
    if(num_boleta!=null){
    if (trim(num_boleta.value)){
    if(num_boleta!=null){
    if (!esNumeroEntero(num_boleta.value)){
        alert("Ingrese un número entero válido");
        num_boleta.focus();
        return false;
    }
    }
    }
    }
    }// end else if hid_valida_...
    if (document.getElementById("hid_valida_168").value=="R"){
    if(num_contrato!=null){
    if (!trim(num_contrato.value)){
        alert("ingresar número");
        num_contrato.focus();
        return false;
    }
    }
    if(num_contrato!=null){
    if (!esNumeroEntero(num_contrato.value)){
        alert("Ingrese un número entero válido");
        num_contrato.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    else if (document.getElementById("hid_valida_168").value=="N"){
    var num_contrato=document.getElementById("NUM_CONTRATO");
    if(num_contrato!=null){
    if (trim(num_contrato.value)){
    if(num_contrato!=null){
    if (!esNumeroEntero(num_contrato.value)){
        alert("Ingrese un número entero válido");
        num_contrato.focus();
        return false;
    }
    }
    }
    }
    }// end else if hid_valida_...
    if (document.getElementById("hid_valida_169").value=="R"){
    if(num_factura!=null){
    if (!trim(num_factura.value)){
        alert("ingresar número");
        num_factura.focus();
        return false;
    }
    }
    if(num_factura!=null){
    if (!esNumeroEntero(num_factura.value)){
        alert("Ingrese un número entero válido");
        num_factura.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    else if (document.getElementById("hid_valida_169").value=="N"){
    var num_factura=document.getElementById("NUM_FACTURA");
    if(num_factura!=null){
    if (trim(num_factura.value)){
    if(num_factura!=null){
    if (!esNumeroEntero(num_factura.value)){
        alert("Ingrese un número entero válido");
        num_factura.focus();
        return false;
    }
    }
    }
    }
    }// end else if hid_valida_...
    if (document.getElementById("hid_valida_170").value=="R"){
    if(num_otros_dp!=null){
    if (!trim(num_otros_dp.value)){
        alert("ingresa numero");
        num_otros_dp.focus();
        return false;
    }
    }
    if(num_otros_dp!=null){
    if (!esNumeroEntero(num_otros_dp.value)){
        alert("Ingrese un número entero válido");
        num_otros_dp.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    else if (document.getElementById("hid_valida_170").value=="N"){
    var num_otros_dp=document.getElementById("NUM_OTROS_DP");
    if(num_otros_dp!=null){
    if (trim(num_otros_dp.value)){
    if(num_otros_dp!=null){
    if (!esNumeroEntero(num_otros_dp.value)){
        alert("Ingrese un número entero válido");
        num_otros_dp.focus();
        return false;
    }
    }
    }
    }
    }// end else if hid_valida_...
    if (document.getElementById("hid_valida_146").value=="R"){
    if(txt_fec_emi!=null){
    if (!trim(txt_fec_emi.value)){
        alert("Debe ingresar la fecha de emision");
        txt_fec_emi.focus();
        return false;
    }
    }
    if(txt_fec_emi!=null){
    if (!esFecha(txt_fec_emi.value)){
        alert("Ingrese una fecha válida");
        txt_fec_emi.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    else if (document.getElementById("hid_valida_146").value=="N"){
    var txt_fec_emi=document.getElementById("TXT_FEC_EMI");
    if(txt_fec_emi!=null){
    if (trim(txt_fec_emi.value)){
    if(txt_fec_emi!=null){
    if (!esFecha(txt_fec_emi.value)){
        alert("Ingrese una fecha válida");
        txt_fec_emi.focus();
        return false;
    }
    }
    }
    }
    }// end else if hid_valida_...
    }
    }
    // validar formulario
    if(tr_sec_32!=null){
    if (esVisible('tr_sec_32')){
    if (document.getElementById("hid_valida_147").value=="R"){
    if(txt_raz_social_s2!=null){
    if (!trim(txt_raz_social_s2.value)){
        alert("Ingrese Razon Social del reclamado");
        txt_raz_social_s2.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    if (document.getElementById("hid_valida_148").value=="R"){
    if(txt_nom_s2!=null){
    if (!trim(txt_nom_s2.value)){
        alert("Ingrese Apellidos y Nombres del reclamado");
        txt_nom_s2.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    if (document.getElementById("hid_valida_149").value=="R"){
    if(txt_repre_s2!=null){
    if (!trim(txt_repre_s2.value)){
        alert("Ingrese Representante del reclamado");
        txt_repre_s2.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    if (document.getElementById("hid_valida_150").value=="R"){
    if(txt_dir_s2!=null){
    if (!trim(txt_dir_s2.value)){
        alert("Ingrese Direccion del reclamado");
        txt_dir_s2.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    if (document.getElementById("hid_valida_151").value=="R"){
    if(txt_tel_s2!=null){
    if (!trim(txt_tel_s2.value)){
        alert("Ingrese telefono del reclamado");
        txt_tel_s2.focus();
        return false;
    }
    }
    if(txt_tel_s2!=null){
    if (!esNumeroEntero(txt_tel_s2.value)){
        alert("Ingrese un número entero válido");
        txt_tel_s2.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    else if (document.getElementById("hid_valida_151").value=="N"){
    var txt_tel_s2=document.getElementById("TXT_TEL_S2");
    if(txt_tel_s2!=null){
    if (trim(txt_tel_s2.value)){
    if(txt_tel_s2!=null){
    if (!esNumeroEntero(txt_tel_s2.value)){
        alert("Ingrese un número entero válido");
        txt_tel_s2.focus();
        return false;
    }
    }
    }
    }
    }// end else if hid_valida_...
    if (document.getElementById("hid_valida_153").value=="R"){
    if(txt_mail_s2!=null){
    if (!trim(txt_mail_s2.value)){
        alert("Ingrese correo electronico del reclamado");
        txt_mail_s2.focus();
        return false;
    }
    }
    if(txt_mail_s2!=null){
    if (!esCorreo(txt_mail_s2.value)){
        alert("Ingrese un correo válido");
        txt_mail_s2.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    else if (document.getElementById("hid_valida_153").value=="N"){
    var txt_mail_s2=document.getElementById("TXT_MAIL_S2");
    if(txt_mail_s2!=null){
    if (trim(txt_mail_s2.value)){
    if(txt_mail_s2!=null){
    if (!esCorreo(txt_mail_s2.value)){
        alert("Ingrese un correo válido");
        txt_mail_s2.focus();
        return false;
    }
    }
    }
    }
    }// end else if hid_valida_...
    if (document.getElementById("hid_valida_152").value=="R"){
    if(txt_fax_s2!=null){
    if (!trim(txt_fax_s2.value)){
        alert("Ingrese el fax:");
        txt_fax_s2.focus();
        return false;
    }
    }
    if(txt_fax_s2!=null){
    if (!esNumeroEntero(txt_fax_s2.value)){
        alert("Ingrese un número entero válido");
        txt_fax_s2.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    else if (document.getElementById("hid_valida_152").value=="N"){
    var txt_fax_s2=document.getElementById("TXT_FAX_S2");
    if(txt_fax_s2!=null){
    if (trim(txt_fax_s2.value)){
    if(txt_fax_s2!=null){
    if (!esNumeroEntero(txt_fax_s2.value)){
        alert("Ingrese un número entero válido");
        txt_fax_s2.focus();
        return false;
    }
    }
    }
    }
    }// end else if hid_valida_...
    if (document.getElementById("hid_valida_154").value=="R"){
    if(txt_dep_s2!=null){
    if (!trim(txt_dep_s2.value)){
        alert("Ingrese Departamento del reclamado");
        txt_dep_s2.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    if (document.getElementById("hid_valida_155").value=="R"){
    if(txt_prov_s2!=null){
    if (!trim(txt_prov_s2.value)){
        alert("Ingrese Provincia del Reclamado");
        txt_prov_s2.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    if (document.getElementById("hid_valida_156").value=="R"){
    if(txt_dist_s2!=null){
    if (!trim(txt_dist_s2.value)){
        alert("Ingrese Distrito del Reclamado");
        txt_dist_s2.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    }
    }
    // validar formulario
    if(tr_sec_33!=null){
    if (esVisible('tr_sec_33')){
    if (document.getElementById("hid_valida_157").value=="R"){
    if(txt_fec_s2!=null){
    if (!trim(txt_fec_s2.value)){
        alert("Ingrese la fecha de ocurrencia");
        txt_fec_s2.focus();
        return false;
    }
    }
    if(txt_fec_s2!=null){
    if (!esFecha(txt_fec_s2.value)){
        alert("Ingrese una fecha válida");
        txt_fec_s2.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    else if (document.getElementById("hid_valida_157").value=="N"){
    var txt_fec_s2=document.getElementById("TXT_FEC_S2");
    if(txt_fec_s2!=null){
    if (trim(txt_fec_s2.value)){
    if(txt_fec_s2!=null){
    if (!esFecha(txt_fec_s2.value)){
        alert("Ingrese una fecha válida");
        txt_fec_s2.focus();
        return false;
    }
    }
    }
    }
    }// end else if hid_valida_...
    if (document.getElementById("hid_valida_158").value=="R"){
    if(txt_dep_s3!=null){
    if (!trim(txt_dep_s3.value)){
        alert("Nombre del Departamento del hecho");
        txt_dep_s3.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    if (document.getElementById("hid_valida_159").value=="R"){
    if(txt_prov_s3!=null){
    if (!trim(txt_prov_s3.value)){
        alert("Ingrese el provincia:");
        txt_prov_s3.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    if (document.getElementById("hid_valida_160").value=="R"){
    if(txt_dist_s3!=null){
    if (!trim(txt_dist_s3.value)){
        alert("Ingrese el distrito:");
        txt_dist_s3.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    if (document.getElementById("hid_valida_161").value=="R"){
    if(txt_req_s3!=null){
    if (!trim(txt_req_s3.value)){
        alert("Ingrese el requerimiento:");
        txt_req_s3.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    if (document.getElementById("hid_valida_162").value=="R"){
    if(txa_det_req_s3!=null){
    if (!trim(txa_det_req_s3.value)){
        alert("Ingrese su comentario");
        txa_det_req_s3.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    }
    }

    // Asigna texto a valor de listas
    if(cmb_doc!=null) document.getElementById("hid_lista_134").value=cmb_doc.options[cmb_doc.selectedIndex].text;
    if(cmb!=null) document.getElementById("hid_lista_144").value=cmb.options[cmb.selectedIndex].text;

   // Limpiar texto de ayuda


    __doPostBack('ctl00$PortalPlaceHolder$ctl00$btn_Enviar','');
}

function grabar(obj)
{
    resetCondicionados("c_135,c_163,c_164,c_165,c_166,c_167");
    var cmb_doc=document.forms[0].LST_31_134;
    if(cmb_doc!=null){
    if (cmb_doc.options[cmb_doc.selectedIndex].value=="DNI"){
        verElemento("tr_135",1);
        document.getElementById("hid_valida_135").value='R';
    }
    }
    if(cmb_doc!=null){
    if (cmb_doc.options[cmb_doc.selectedIndex].value=="Pasaporte"){
        verElemento("tr_163",1);
        document.getElementById("hid_valida_163").value='R';
    }
    }
    if(cmb_doc!=null){
    if (cmb_doc.options[cmb_doc.selectedIndex].value=="Carnet Extranjería"){
        verElemento("tr_164",1);
        document.getElementById("hid_valida_164").value='R';
    }
    }
    if(cmb_doc!=null){
    if (cmb_doc.options[cmb_doc.selectedIndex].value=="CI FFAA"){
        verElemento("tr_165",1);
        document.getElementById("hid_valida_165").value='R';
    }
    }
    if(cmb_doc!=null){
    if (cmb_doc.options[cmb_doc.selectedIndex].value=="CI PNP"){
        verElemento("tr_166",1);
        document.getElementById("hid_valida_166").value='R';
    }
    }
    if(cmb_doc!=null){
    if (cmb_doc.options[cmb_doc.selectedIndex].value=="Otros"){
        verElemento("tr_167",1);
        document.getElementById("hid_valida_167").value='R';
    }
    }
}function guarda(obj)
{
    resetCondicionados("c_145,c_168,c_169,c_170");
    var cmb=document.forms[0].LST_31_144;
    if(cmb!=null){
    if (cmb.options[cmb.selectedIndex].value=="Boleta"){
        verElemento("tr_145",1);
        document.getElementById("hid_valida_145").value='R';
    }
    }
    if(cmb!=null){
    if (cmb.options[cmb.selectedIndex].value=="Contrato"){
        verElemento("tr_168",1);
        document.getElementById("hid_valida_168").value='R';
    }
    }
    if(cmb!=null){
    if (cmb.options[cmb.selectedIndex].value=="Factura"){
        verElemento("tr_169",1);
        document.getElementById("hid_valida_169").value='R';
    }
    }
    if(cmb!=null){
    if (cmb.options[cmb.selectedIndex].value=="Otros"){
        verElemento("tr_170",1);
        document.getElementById("hid_valida_170").value='R';
    }
    }
}
