function fValidar(){
    // Varibles de campos y secciones
    var tr_sec_16=document.getElementById("tr_sec_16");
    var txtnombre=document.getElementById("TXTNOMBRE");
    var txtemail=document.getElementById("TXTEMAIL");
    var txtnombreempresa=document.getElementById("TXTNOMBREEMPRESA");
    var txtconsulta=document.getElementById("TXTCONSULTA");

    // validar formulario
    if(tr_sec_16!=null){
    if (esVisible('tr_sec_16')){
    if (document.getElementById("hid_valida_51").value=="R"){
    if(txtnombre!=null){
    if (!trim(txtnombre.value) || txtnombre.value.toLowerCase()=="ingresar nombre"){
        alert("Ingresar nombre");
        txtnombre.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    if (document.getElementById("hid_valida_52").value=="R"){
    if(txtemail!=null){
    if (!trim(txtemail.value) || txtemail.value.toLowerCase()=="ingresar email"){
        alert("Ingresar Email");
        txtemail.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    if (document.getElementById("hid_valida_53").value=="R"){
    if(txtnombreempresa!=null){
    if (!trim(txtnombreempresa.value)){
        alert("Ingrese el nombre de la empresa:");
        txtnombreempresa.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    if (document.getElementById("hid_valida_54").value=="R"){
    if(txtconsulta!=null){
    if (!trim(txtconsulta.value)){
        alert("Ingrese el consulta:");
        txtconsulta.focus();
        return false;
    }
    }
    }// end if hid_valida_...
    }
    }
    var txt_captcha_ingresado=document.getElementById("TXT_CAPTCHA");
    var texto_captcha=window.frames.ifr_Captcha.document.getElementById('captcha_hid_TextoCaptcha').value;
    if(txt_captcha_ingresado!=null){
    if(!trim(txt_captcha_ingresado.value)){
        alert("Ingrese el codigo que se muestra en la imagen correctamente.");
        txt_captcha_ingresado.focus();
        return false;
    }
    if(txt_captcha_ingresado.value.toLowerCase()!=texto_captcha.toLowerCase()){
        alert("No coinciden los caracteres ingresados.");
        txt_captcha_ingresado.focus();
        return false;
    }
    }

    // Asigna texto a valor de listas

   // Limpiar texto de ayuda

    if(txtnombre!=null){
    if (txtnombre.value.toLowerCase()=="ingresar nombre"){
        txtnombre.value="";
    }
    }
    if(txtemail!=null){
    if (txtemail.value.toLowerCase()=="ingresar email"){
        txtemail.value="";
    }
    }

    __doPostBack('ctl00$PortalPlaceHolder$ctl00$btn_Enviar','');
}


