function SelectorTipoBusqueda(obj) {
    if (obj.value == 'rdo_ContenidoDB') {
        if (document.all) document.getElementById("ctl00_PortalPlaceHolder_ctl00_tr_Topicos").style.display = '';
        else document.getElementById("ctl00_PortalPlaceHolder_ctl00_tr_Topicos").style.visibility = 'visible';
    } else {
        if (document.all) document.getElementById("ctl00_PortalPlaceHolder_ctl00_tr_Topicos").style.display = 'none';
        else document.getElementById("ctl00_PortalPlaceHolder_ctl00_tr_Topicos").style.visibility = 'collapse';
    }

    var txt_criterio = document.getElementById("ctl00_PortalPlaceHolder_ctl00_txt_TextoBuscarAvanzada");
    if (txt_criterio != null) txt_criterio.focus();
}

function validarTextoBusquedaAvanzada(cajaTexto0) {
    var cajaTexto = document.getElementById(cajaTexto0);
    cajaTexto.value = trim(cajaTexto.value);
    if (noVacio(cajaTexto) == false) {
        alert('No ha ingresado texto para buscar');
        cajaTexto.focus();
        return false;
    } else {
        if (cajaTexto.value.length > 2) {
            if (theForm.ctl00$PortalPlaceHolder$ctl00$rdl_Tipo[1].checked) {
                if (!theForm.ctl00_PortalPlaceHolder_ctl00_chl_Topicos_0.checked
                    && !theForm.ctl00_PortalPlaceHolder_ctl00_chl_Topicos_1.checked
                    && !theForm.ctl00_PortalPlaceHolder_ctl00_chl_Topicos_2.checked
                    && !theForm.ctl00_PortalPlaceHolder_ctl00_chl_Topicos_3.checked
                    && !theForm.ctl00_PortalPlaceHolder_ctl00_chl_Topicos_4.checked
                        ) {
                    alert('Seleccionar un tópico al menos.');
                    return false;
                }
            }
            return true;
        }
        else {
            alert('El texto debe contener al menos 3 letras');
            cajaTexto.focus();
            return false;
        }
    }
}

function MostrarAyuda(valor) {
    var div_Ayuda = document.getElementById("div_Ayuda");
    if (valor == true) {
        div_Ayuda.style.display = 'block';
    } else {
        div_Ayuda.style.display = 'none';
    }
}        
