﻿function ShowInformation(AspxPageName, Repos, consTema, metodo, TituloItems, TargetDato) {
    HTTPString = AspxPageName.toUpperCase();
    var FileExtension = HTTPString.substring(HTTPString.indexOf('.'), HTTPString.length);

    if (HTTPString.startsWith("HTTP")) {
        FileExtension = ".HTTP"
    }
    //    OcultariFrame();
    document.getElementById("MenuHor").style.visibility = "visible";
    var divContenido = document.getElementById("Despliegue");

    divContenido.innerHTML = "<table width=\"50%\" border=\"0\" align=\"center\">" +
                                    "<tr><td>&nbsp;</td></tr>" +
                                    "<tr><td align=\"center\">&nbsp;<img src=\"img/simple.gif\"></td></tr>" +
                                    "<tr><td align=\"center\">Consultando...</center></td></tr>" +
                                    "<tr><td>&nbsp;</td></tr>" +
                                "</table>";

    switch (TargetDato) {
        case "_SELF": case "": case "_self":

            if (FileExtension == "") {
                AspxPageName = "contenidos/Mensaje.aspx"
            }
            var xmlhttp = GetXMLHttpDoc();
            xmlhttp.open("GET", AspxPageName, true);
            xmlhttp.setRequestHeader("Connection", "close");

            xmlhttp.onreadystatechange = function() {
                // 0 = uninitialized, 1 = loading, 2 = loaded, 3 = interactive, 4 = complete
                if (xmlhttp.readyState == 4) {
                    if (xmlhttp.status == 200) {
                        //200 for "OK"
                        var resultResponse = xmlhttp.responseText;
                        resultResponse = resultResponse.toString().replace("</form>", "<!--</form>-->");
                        resultResponse = resultResponse.toString().replace("<form", "<!--<form");
                        resultResponse = resultResponse.toString().replace("id=\"Form1\">", "id=\"Form1\">-->");
                        divContenido.innerHTML = resultResponse;
                    }
                    else if (xmlhttp.status == 404) {
                        //404 for "Not Found" 
                        divContenido.innerHTML = "¡La direccion no existe!";
                    }
                    else {
                        divContenido.innerHTML = "¡Error: ".xmlhttp.status + "!";
                    }
                }
            }
            xmlhttp.send(null)
            //            location.href('#InicioContenido');
            break;

        case "_BLANK": case "_blank":
            divContenido.innerHTML = "<table width=\"50%\" border=\"0\" align=\"center\">" +
                                    "<tr><td>&nbsp;</td></tr>" +
                                    "<tr><td align=\"center\">El contenido se desplegó en la pantalla emergente.</center></td></tr>" +
                                    "<tr><td>&nbsp;</td></tr>" +
                                "</table>";
            if (WindowObjectReference == null || WindowObjectReference.closed) {
                WindowObjectReference = window.open(AspxPageName, FileExtension.substring(1, FileExtension.length), "resizable=1,scrollbars=1", true);
            }
            else if (PreviousUrl != AspxPageName) {
                WindowObjectReference.close();
                WindowObjectReference = window.open(AspxPageName, FileExtension.substring(1, FileExtension.length), "resizable=1,scrollbars=1", true);
            }
            else {
                WindowObjectReference.focus();
            };
            PreviousUrl = AspxPageName;

            break;
    }

    if (consTema != "") {
        WebServiceGetDataAjax.RutadeAscendecia("SNIEG", consTema, "1", TituloItems, SucceededCallback);
    }
}



var WindowObjectReference = null;
var PreviousUrl;


function SucceededCallback(result) {
    var divNavegationRoot = document.getElementById("RutaNavegacion");
    document.getElementById("RutaNavegacion").style.height = "40px";
    divNavegationRoot.innerHTML = result;

    /*var divNavegationRoot2 = document.getElementById("Despliegue");
    divNavegationRoot2.innerHTML = result;*/
}

function MostrariFrame(alto, consTema, TituloItems) {
    document.getElementById("Iframe1").style.display = "block";
    document.getElementById("Iframe1").style.height = alto + "px";
    document.getElementById("ContenidoPrincipal").style.height = alto + "px";
    document.getElementById("Despliegue").style.display = "none";
    document.getElementById("Home").style.display = "none";
    document.getElementById("MenuHor").style.visibility = "visible";
    /*if (consTema == "2812")
    document.getElementById("MenuHor").style.position = "relative";
    else document.getElementById("MenuHor").style.position = "absolute";*/
    if (consTema != "") {
        WebServiceGetDataAjax.RutadeAscendecia("SNIEG", consTema, "1", TituloItems, SucceededCallback);
    }
    else {
        document.getElementById("RutaNavegacion").style.display = "none";
    }
}

function OcultariFrame() {
    document.getElementById("Iframe1").style.display = "none";
    document.getElementById("Despliegue").style.display = "block";
    document.getElementById("Home").style.display = "none";
    document.getElementById("ContenidoPrincipal").style.height = "100%";
    document.getElementById("RutaNavegacion").style.display = "block";
    document.getElementById("MenuHor").style.visibility = "visible";
    document.getElementById("MenuHor").style.position = "absolute";
}

function CargarContenidoAcervoRoot(TituloItems) {


    var urltarget = "contenidos/espanol/normatividad/acervo/pres_acervoIIN.asp";
    var consTema = "2854";
    if (consTema != "") {
        WebServiceGetDataAjax.RutadeAscendecia("SNIEG", consTema, "1", TituloItems, SucceededCallback);
    }
    var AspxPageName = urltarget;


    OcultariFrame();
    //CargarMenuHor();
    //document.getElementById("Fecha").style.display = "none"
    //document.getElementById("Menuhor").style.display = "block"

    //Envia resultados al contenedor
    var xmlhttp = GetXMLHttpDoc();

    var divF = document.getElementById("Frame");
    divF.innerHTML = "<iframe src=\"\" id=\"Iframe1\" name=\"IframeContentPal\" onreadystatechange=\"dostate(this);\" frameborder=\"0\" width=\"100%\" height=\"0\"></iframe>";

    var div = document.getElementById("Despliegue");
    div.innerHTML = "<table style=\"margin:15px\" width=\"50%\" border=\"0\" align=\"center\">" +
                         "<tr height=\"50\"><td>&nbsp;</td></tr>" +
                         "<tr><td align=\"center\">&nbsp;<img src=\"img/simple.gif\"></td></tr>" +
                         "<tr><td align=\"center\">Cargando...</center></td></tr>" +
                         "<tr><td>&nbsp;</td></tr>" +
                     "</table>";

    xmlhttp.open("GET", AspxPageName, true);
    xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
    //    xmlhttp.setRequestHeader('Connection', 'close');

    xmlhttp.onreadystatechange = function() {
        if (xmlhttp.readyState == 4) {
            if (xmlhttp.status == 200) {
                var resultResponse = xmlhttp.responseText;
                resultResponse = resultResponse.toString().replace("</form>", "<!--</form>-->");
                resultResponse = resultResponse.toString().replace("<form", "<!--<form");
                resultResponse = resultResponse.toString().replace("id=\"form1\">", "id=\"form1\">-->");

                div.innerHTML = resultResponse;
            }
            else if (xmlhttp.status == 404) {
                div.innerHTML = "¡La direccion no existe!";
            }
            else {
                div.innerText = "¡Error: ".xmlhttp.status + "!";
            }
        }
    }
    xmlhttp.send(null)
}

function CargarContenido(urltarget, consTema, TituloItems) {
    if (consTema != "") {
        WebServiceGetDataAjax.RutadeAscendecia("SNIEG", consTema, "1", TituloItems, SucceededCallback);
    }
    OcultariFrame();
    //CargarMenuHor();
    //document.getElementById("Fecha").style.display = "none"
    //document.getElementById("Menuhor").style.display = "block"
    var AspxPageName = urltarget;

    //Envia resultados al contenedor
    var xmlhttp = GetXMLHttpDoc();

    var divF = document.getElementById("Frame");
    divF.innerHTML = "<iframe src=\"\" id=\"Iframe1\" name=\"IframeContentPal\" onreadystatechange=\"dostate(this);\" frameborder=\"0\" width=\"100%\" height=\"0\"></iframe>";

    var div = document.getElementById("Despliegue");
    div.innerHTML = "<table style=\"margin:15px\" width=\"50%\" border=\"0\" align=\"center\">" +
                         "<tr height=\"50\"><td>&nbsp;</td></tr>" +
                         "<tr><td align=\"center\">&nbsp;<img src=\"img/simple.gif\"></td></tr>" +
                         "<tr><td align=\"center\">Cargando...</center></td></tr>" +
                         "<tr><td>&nbsp;</td></tr>" +
                     "</table>";

    xmlhttp.open("GET", AspxPageName, true);
    xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
    //    xmlhttp.setRequestHeader('Connection', 'close');

    xmlhttp.onreadystatechange = function() {
        if (xmlhttp.readyState == 4) {
            if (xmlhttp.status == 200) {
                var resultResponse = xmlhttp.responseText;
                resultResponse = resultResponse.toString().replace("</form>", "<!--</form>-->");
                resultResponse = resultResponse.toString().replace("<form", "<!--<form");
                resultResponse = resultResponse.toString().replace("id=\"form1\">", "id=\"form1\">-->");

                div.innerHTML = resultResponse;
            }
            else if (xmlhttp.status == 404) {
                div.innerHTML = "¡La direccion no existe!";
            }
            else {
                div.innerText = "¡Error: ".xmlhttp.status + "!";
            }
        }
    }
    xmlhttp.send(null)
}

function GetXMLHttpDoc() {
    var xmlhttp = false;
    try {
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch (e) {
        try {
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        catch (E) {
            xmlhttp = false;
        }
    }
    // Mozilla
    if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
        xmlhttp = new XMLHttpRequest();
    }
    return xmlhttp;
}

function CargarNoticias(urltarget, consTema, TituloItems) {
    if (consTema != "") {
        WebServiceGetDataAjax.RutadeAscendecia("SNIEG", consTema, "1", TituloItems, SucceededCallback);
    }
    // OcultariFrame();
    //CargarMenuHor();
    //document.getElementById("Fecha").style.display = "none"
    //document.getElementById("Menuhor").style.display = "block"
    var AspxPageName = urltarget;

    //Envia resultados al contenedor
    var xmlhttp = GetXMLHttpDoc();

    var div = document.getElementById("Noticias");
    div.innerHTML = "<table style=\"margin:15px\" width=\"50%\" border=\"0\" align=\"center\">" +
                         "<tr height=\"50\"><td>&nbsp;</td></tr>" +
                         "<tr><td align=\"center\">&nbsp;<img src=\"img/simple.gif\"></td></tr>" +
                         "<tr><td align=\"center\">Cargando...</center></td></tr>" +
                         "<tr><td>&nbsp;</td></tr>" +
                     "</table>";

    xmlhttp.open("GET", AspxPageName, true);
    xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
    //    xmlhttp.setRequestHeader('Connection', 'close');

    xmlhttp.onreadystatechange = function() {
        if (xmlhttp.readyState == 4) {
            if (xmlhttp.status == 200) {
                var resultResponse = xmlhttp.responseText;
                resultResponse = resultResponse.toString().replace("</form>", "<!--</form>-->");
                resultResponse = resultResponse.toString().replace("<form", "<!--<form");
                resultResponse = resultResponse.toString().replace("id=\"form1\">", "id=\"form1\">-->");

                div.innerHTML = resultResponse;
            }
            else if (xmlhttp.status == 404) {
                div.innerHTML = "¡No hay noticias!";
            }
            else {
                div.innerText = "¡Error: ".xmlhttp.status + "!";
            }
        }
    }
    xmlhttp.send(null)
}

function showModalPopupViaClient(ev) {
    ev.preventDefault();
    var cajaTextoBuscado = document.getElementById("ctl00_TxtBoxSearch");
    if (cajaTextoBuscado.value != "") {
        var modalPopupBehavior = $find('programmaticModalPopupBehavior');
        modalPopupBehavior.show();
    }
}

function hideModalPopupViaClient(ev) {
    ev.preventDefault();
    var modalPopupBehavior = $find('programmaticModalPopupBehavior');
    modalPopupBehavior.hide();
}

function EventClientSearch() {
    var cajaTextoBuscado = document.getElementById("ctl00_TxtBoxSearch");
    var textoBuscado = cajaTextoBuscado.value;

    if (textoBuscado != "") {
        var cajaResultados = document.getElementById("ctl00_ContentUpdatePanel2");
        var cajaMensaje = document.getElementById("ctl00_TitleUpdatePanel");
        var params = "texto=" + textoBuscado;
        var xmlhttp = GetXMLHttpDoc();
        xmlhttp.open("POST", "busqueda.aspx", true);
        xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
        xmlhttp.setRequestHeader('Content-length', params.length);
        xmlhttp.setRequestHeader('Connection', 'close');
        var rText = "";
        cajaResultados.innerHTML = "<table width=\"100%\" border=\"1\" height=\"100%\" align=\"center\" ><tr><td><div align=\"center\">&nbsp;<img src='img/procesando.gif'> &nbsp;&nbsp;Buscado...</div></td></tr></table>";

        xmlhttp.send(params)
        xmlhttp.onreadystatechange = function() {
            if (xmlhttp.readyState == 4) {
                if (xmlhttp.status == 200) {
                    rText = xmlhttp.responseText;
                    rText = rText.toString().replace("<form name=\"form2\" method=\"post\" action=\"busqueda.aspx\" id=\"form2\">", "");
                    rText = rText.toString().replace("</form>", "");
                    cajaResultados.innerHTML = rText;
                    cajaMensaje.innerHTML = "<strong>IMPORTANTE: El resultado seleccionado lo podra visualizar atrás de este recuadro o bien en una nueva ventana.</strong>";
                }
            }
        }
    }
    else {

        var modalPopupBehavior = $find('programmaticModalPopupBehavior');
        modalPopupBehavior.hide();
        alert("capture el texto a buscar");
    }
}


function DetectEnter() {
    if (window.event.keyCode == 13) {
        window.event.keyCode = 9
        var ButtonSearch = document.getElementById("ctl00_Encabezado1_BttnSearch");
        ButtonSearch.click();
        return false;
    }
}

function Aumentar() {
    var obj = $("body");
    for (x = 0; x < obj.length; x++) {
        try {
            if (obj[x].style.fontSize != "") {
                var tamaño = 1 + parseFloat(obj[x].style.fontSize.replace('px', ''));
                obj[x].style.fontSize = tamaño + 'px';
            } else {
                obj[x].style.fontSize = '15px';
            }
        } catch (ex) { }
    }

}


function Reducir() {
    var obj = $("body");
    for (x = 0; x < obj.length; x++) {
        try {
            if (obj[x].style.fontSize != "") {
                var tamaño = parseFloat(obj[x].style.fontSize.replace('px', '')) - 1;
                obj[x].style.fontSize = tamaño + 'px';
            } else {
                obj[x].style.fontSize = '15px';
            }
        } catch (ex) { }
    }

}

function Desplegar(titulos, elementos) {
    var title = document.getElementById(titulos);
    if (title == null)
        return;
    var ans = document.getElementById(elementos);
    if (ans == null)
        return;
    if (ans.style.display == '')
        ans.style.display = 'none';
    else
        ans.style.display = '';
}

function ocultar(e) {
    var opcionPadre = e.substring(0, 15);
    if (opcionPadre == "PanelColapsable") {
        PanelColapsable2787.close();
        PanelColapsable2788.close();
        PanelColapsable2789.close();
        PanelColapsable2790.close();

        PanelColapsable2792.close();
        PanelColapsable2793.close(); /**/
        PanelColapsable2795.close();
        PanelColapsable2791.close(); /**/
        PanelColapsable2796.close();
        PanelColapsable2797.close();
        PanelColapsable2823.close();
        PanelColapsable3115.close();
        PanelColapsable3111.close();

        PanelColapsableH2795.close();
        PanelColapsableH2791.close(); /**/
        PanelColapsableH2796.close();
        PanelColapsableH2797.close();
        PanelColapsableH2823.close();
        PanelColapsableH3115.close();
        PanelColapsableH3111.close();

        //*        CollapsiblePanel2816.close();
        //*        CollapsiblePanel2816.enableAnimation = false;
        //*        CollapsiblePanel2816.enableAnimation = true;




        CollapsiblePanel2817.close();
        CollapsiblePanel2817.enableAnimation = false;
        CollapsiblePanel2817.enableAnimation = true;
        CollapsiblePanel2818.close();
        CollapsiblePanel2818.enableAnimation = false;
        CollapsiblePanel2818.enableAnimation = true;
        CollapsiblePanel2819.close();
        CollapsiblePanel2819.enableAnimation = false;
        CollapsiblePanel2819.enableAnimation = true;

        CollapsiblePanel2820.close();
        CollapsiblePanel2820.enableAnimation = false;
        CollapsiblePanel2820.enableAnimation = true;
        CollapsiblePanel2821.close();
        CollapsiblePanel2821.enableAnimation = false;
        CollapsiblePanel2821.enableAnimation = true;
        CollapsiblePanel2822.close();
        CollapsiblePanel2822.enableAnimation = false;
        CollapsiblePanel2822.enableAnimation = true;
        // Comentado 30/Nov, se movio el tema de Acervo de ser subtema a ser Padre GGPM
        //CollapsiblePanel2823.close();
        //CollapsiblePanel2823.enableAnimation = false;
        //CollapsiblePanel2823.enableAnimation = true;
        CollapsiblePanel2827.close();
        CollapsiblePanel2827.enableAnimation = false;
        CollapsiblePanel2827.enableAnimation = true;
        //////        CollapsiblePanel2828.close();
        //////        CollapsiblePanel2828.enableAnimation = false;
        //////        CollapsiblePanel2828.enableAnimation = true;
        //        CollapsiblePanel3028.close();
        //        CollapsiblePanel3028.enableAnimation = false;
        //        CollapsiblePanel3028.enableAnimation = true;
        /*CollapsiblePanel2871.close();
        CollapsiblePanel2871.enableAnimation = false;
        CollapsiblePanel2871.enableAnimation = true;
        CollapsiblePanel2969.close();
        CollapsiblePanel2969.enableAnimation = false;
        CollapsiblePanel2969.enableAnimation = true;*/

        CollapsiblePanel3057.close(); //CTE >> DyS
        CollapsiblePanel3062.close(); //CTE >> Eco
        CollapsiblePanel3063.close(); //CTE >> GyMA
        CollapsiblePanel3064.close(); //CTE >> GSPIJ

        //*        CollapsiblePanel2966.close();
        //*        CollapsiblePanel2966.enableAnimation = false;
        //*        CollapsiblePanel2966.enableAnimation = true;

        CollapsiblePanel2945.close(); // INEGI como UC del SNIEG >> Junta de gobierno
        CollapsiblePanel2945.enableAnimation = false;
        CollapsiblePanel2945.enableAnimation = true;

        CollapsiblePanel3002.close(); // INEGI como UC del SNIEG >> Informes
        CollapsiblePanel3002.enableAnimation = false;
        CollapsiblePanel3002.enableAnimation = true;

        //*        Comentadas por juan carlos

        //*        CollapsiblePanel2889.close();
        //*        CollapsiblePanel2889.enableAnimation = false;
        //*        CollapsiblePanel2889.enableAnimation = true;
        //*        CollapsiblePanel2890.close();
        //*        CollapsiblePanel2890.enableAnimation = false;
        //*        CollapsiblePanel2890.enableAnimation = true;
        //*        CollapsiblePanel2891.close();
        //*        CollapsiblePanel2891.enableAnimation = false;
        //*        CollapsiblePanel2891.enableAnimation = true;
        //*        CollapsiblePanel2892.close();
        //*        CollapsiblePanel2892.enableAnimation = false;
        //*        CollapsiblePanel2892.enableAnimation = true;
        CollapsiblePanel2914.close();
        CollapsiblePanel2914.enableAnimation = false;
        CollapsiblePanel2914.enableAnimation = true;

        //// se quitó del menú derecho      CollapsiblePanelH2821.close();
        ////        CollapsiblePanelH2821.enableAnimation = false;
        ////        CollapsiblePanelH2821.enableAnimation = true;
        CollapsiblePanelH2822.close();
        CollapsiblePanelH2822.enableAnimation = false;
        CollapsiblePanelH2822.enableAnimation = true;
        // Comentado el 30/Noviembre/2011. El tema pasó de ser subtema a tema padre GGPM
        //CollapsiblePanelH2823.close();
        //CollapsiblePanelH2823.enableAnimation = false;
        //CollapsiblePanelH2823.enableAnimation = true;
        CollapsiblePanelH2827.close();
        CollapsiblePanelH2827.enableAnimation = false;
        CollapsiblePanelH2827.enableAnimation = true;
        //////        CollapsiblePanelH2828.close();
        //////        CollapsiblePanelH2828.enableAnimation = false;
        //////        CollapsiblePanelH2828.enableAnimation = true;
        //        CollapsiblePanelH3028.close();
        //        CollapsiblePanelH3028.enableAnimation = false;
        //        CollapsiblePanelH3028.enableAnimation = true;
        /*CollapsiblePanelH2871.close();
        CollapsiblePanelH2871.enableAnimation = false;
        CollapsiblePanelH2871.enableAnimation = true;
        CollapsiblePanelH2969.close();
        CollapsiblePanelH2969.enableAnimation = false;
        CollapsiblePanelH2969.enableAnimation = true;*/

        //*        CollapsiblePanelH2966.close();
        //*        CollapsiblePanelH2966.enableAnimation = false;
        //*        CollapsiblePanelH2966.enableAnimation = true;
        CollapsiblePanelH3057.close();
        CollapsiblePanelH3057.enableAnimation = false;
        CollapsiblePanelH3057.enableAnimation = true;
        CollapsiblePanelH3062.close();
        CollapsiblePanelH3062.enableAnimation = false;
        CollapsiblePanelH3062.enableAnimation = true;
        CollapsiblePanelH3063.close();
        CollapsiblePanelH3063.enableAnimation = false;
        CollapsiblePanelH3063.enableAnimation = true;
        CollapsiblePanelH3064.close();
        CollapsiblePanelH3064.enableAnimation = false;
        CollapsiblePanelH3064.enableAnimation = true;
    }
    var opcionHijo = e.substring(0, 16);
    if (opcionHijo == "CollapsiblePanel") { // Aquí se da la animación entre los hijos para que sean excluyentes
        CollapsiblePanel2818.close();
        CollapsiblePanel2817.close();
        CollapsiblePanel2819.close();
        CollapsiblePanel2820.close();
        CollapsiblePanel2821.close();
        CollapsiblePanel2822.close();
        /*CollapsiblePanel2871.close();*/
        //        CollapsiblePanel3028.close();
        // Comentado 30/Nov/2011 Se movio el tema, de ser subtema paso al área de los padres GGPM
        //CollapsiblePanel2823.close();
        CollapsiblePanel2827.close();
        //////        CollapsiblePanel2828.close();

        CollapsiblePanel3057.close(); //CTE >> DyS
        CollapsiblePanel3062.close(); //CTE >> Eco
        CollapsiblePanel3063.close(); //CTE >> GyMA
        CollapsiblePanel3064.close(); //CTE >> GSPIJ

        CollapsiblePanel2966.close();

        CollapsiblePanel2945.close(); // INEGI como UC del SNIEG >> Junta de gobierno
        CollapsiblePanel3002.close(); // INEGI como UC del SNIEG >> Informes

        //*        CollapsiblePanel2889.close();
        //*        CollapsiblePanel2890.close();
        //*        CollapsiblePanel2891.close();
        //*        CollapsiblePanel2892.close();
        CollapsiblePanel2914.close();

        // CollapsiblePanelH2821.close(); Se comento por cambio de consecutivo 13/09/2011 MASS
        CollapsiblePanelH2822.close();
        /*CollapsiblePanelH2871.close();*/
        //        CollapsiblePanelH3028.close();  
        // Comentado el 30/Noviembre/2011. El tema pasó de ser subtema a tema padre GGPM
        //CollapsiblePanelH2823.close();
        CollapsiblePanelH2827.close();
        //////        CollapsiblePanelH2828.close();

        //*        CollapsiblePanelH2966.close();
    }
}

function hidesub() {

    //*     CollapsiblePanel2816.close();
    //*     CollapsiblePanel2816.enableAnimation = false;
    //*     CollapsiblePanel2816.enableAnimation = true;
    CollapsiblePanel2817.close();
    CollapsiblePanel2817.enableAnimation = false;
    CollapsiblePanel2817.enableAnimation = true;
    CollapsiblePanel2818.close();
    CollapsiblePanel2818.enableAnimation = false;
    CollapsiblePanel2818.enableAnimation = true;
    CollapsiblePanel2819.close();
    CollapsiblePanel2819.enableAnimation = false;
    CollapsiblePanel2819.enableAnimation = true;

    //*     CollapsiblePanel2889.close();
    //*     CollapsiblePanel2889.enableAnimation = false;
    //*     CollapsiblePanel2889.enableAnimation = true;
    //*     CollapsiblePanel2890.close();
    //*     CollapsiblePanel2890.enableAnimation = false;
    //*     CollapsiblePanel2890.enableAnimation = true;
    //*     CollapsiblePanel2891.close();
    //*     CollapsiblePanel2891.enableAnimation = false;
    //*     CollapsiblePanel2891.enableAnimation = true;
    //*     CollapsiblePanel2892.close();
    //*     CollapsiblePanel2892.enableAnimation = false;
    //*     CollapsiblePanel2892.enableAnimation = true;

    CollapsiblePanel2820.close();
    CollapsiblePanel2820.enableAnimation = false;
    CollapsiblePanel2820.enableAnimation = true;
    CollapsiblePanel2821.close();
    CollapsiblePanel2821.enableAnimation = false;
    CollapsiblePanel2821.enableAnimation = true;
    CollapsiblePanel2822.close();
    CollapsiblePanel2822.enableAnimation = false;
    CollapsiblePanel2822.enableAnimation = true;
    // Comentado el 30/Noviembre/2011. Se movio de ser subtema paso a ser padre GGPM
    //CollapsiblePanel2823.close();
    //CollapsiblePanel2823.enableAnimation = false;
    //CollapsiblePanel2823.enableAnimation = true;
    CollapsiblePanel2827.close();
    CollapsiblePanel2827.enableAnimation = false;
    CollapsiblePanel2827.enableAnimation = true;
    //////     CollapsiblePanel2828.close();
    //////     CollapsiblePanel2828.enableAnimation = false;
    //////     CollapsiblePanel2828.enableAnimation = true;
    //     CollapsiblePanel3028.close();
    //     CollapsiblePanel3028.enableAnimation = false;
    //     CollapsiblePanel3028.enableAnimation = true;
    /*CollapsiblePanel2969.close();
    CollapsiblePanel2969.enableAnimation = false;
    CollapsiblePanel2969.enableAnimation = true;*/

    //*     CollapsiblePanel2966.close();
    //*     CollapsiblePanel2966.enableAnimation = false;
    //*     CollapsiblePanel2966.enableAnimation = true;

    CollapsiblePanel2945.close();
    CollapsiblePanel2945.enableAnimation = false;
    CollapsiblePanel2945.enableAnimation = true;

}

function hide() {
    PanelColapsable2787.close();
    PanelColapsable2788.close();
    PanelColapsable2789.close();
    PanelColapsable2790.close();
    PanelColapsable2792.close();
    PanelColapsable2793.close(); /**/

    PanelColapsable2795.close();
    PanelColapsable2791.close(); /**/
    PanelColapsable2796.close();
    PanelColapsable2797.close();
    PanelColapsable2823.close(); /**/
    PanelColapsable3115.close(); /**/
    PanelColapsable3111.close(); /**/


    PanelColapsableH2795.close();
    PanelColapsableH2791.close(); /**/
    PanelColapsableH2796.close();
    PanelColapsableH2797.close();
    PanelColapsableH2823.close();
    PanelColapsableH3115.close();
    PanelColapsableH3111.close();


    //*    CollapsiblePanel2816.close();
    //*    CollapsiblePanel2816.enableAnimation = false;
    //*    CollapsiblePanel2816.enableAnimation = true;
    CollapsiblePanel2817.close();
    CollapsiblePanel2817.enableAnimation = false;
    CollapsiblePanel2817.enableAnimation = true;
    CollapsiblePanel2818.close();
    CollapsiblePanel2818.enableAnimation = false;
    CollapsiblePanel2818.enableAnimation = true;
    CollapsiblePanel2819.close();
    CollapsiblePanel2819.enableAnimation = false;
    CollapsiblePanel2819.enableAnimation = true;

    CollapsiblePanel2820.close();
    CollapsiblePanel2820.enableAnimation = false;
    CollapsiblePanel2820.enableAnimation = true;
    CollapsiblePanel2821.close();
    CollapsiblePanel2821.enableAnimation = false;
    CollapsiblePanel2821.enableAnimation = true;
    CollapsiblePanel2822.close();
    CollapsiblePanel2822.enableAnimation = false;
    CollapsiblePanel2822.enableAnimation = true;
    // Se comentó el día 30/Noviembre/2011. El tema acervo pasó de ser subtema a ser tema padre GGPM
    //CollapsiblePanel2823.close();
    //CollapsiblePanel2823.enableAnimation = false;
    //CollapsiblePanel2823.enableAnimation = true;
    CollapsiblePanel2827.close();
    CollapsiblePanel2827.enableAnimation = false;
    CollapsiblePanel2827.enableAnimation = true;
    //////    CollapsiblePanel2828.close();
    //////    CollapsiblePanel2828.enableAnimation = false;
    //////    CollapsiblePanel2828.enableAnimation = true;
    //    CollapsiblePanel3028.close();
    //    CollapsiblePanel3028.enableAnimation = false;
    //    CollapsiblePanel3028.enableAnimation = true;
    /*CollapsiblePanel2969.close();
    CollapsiblePanel2969.enableAnimation = false;
    CollapsiblePanel2969.enableAnimation = true;*/

    //*    CollapsiblePanel2966.close();
    //*    CollapsiblePanel2966.enableAnimation = false;
    //*    CollapsiblePanel2966.enableAnimation = true;

    CollapsiblePanel2945.close();
    CollapsiblePanel2945.enableAnimation = false;
    CollapsiblePanel2945.enableAnimation = true;

    //*    CollapsiblePanel2889.close();
    //*    CollapsiblePanel2889.enableAnimation = false;
    //*    CollapsiblePanel2889.enableAnimation = true;
    //*    CollapsiblePanel2890.close();
    //*    CollapsiblePanel2890.enableAnimation = false;
    //*    CollapsiblePanel2890.enableAnimation = true;
    //*    CollapsiblePanel2891.close();
    //*    CollapsiblePanel2891.enableAnimation = false;
    //*    CollapsiblePanel2891.enableAnimation = true;
    //*    CollapsiblePanel2892.close();
    //*    CollapsiblePanel2892.enableAnimation = false;
    //*    CollapsiblePanel2892.enableAnimation = true;
    /*CollapsiblePanel2914.close();
    CollapsiblePanel2914.enableAnimation = false;
    CollapsiblePanel2914.enableAnimation = true;*/

    //// se quitó del menú derecho   CollapsiblePanelH2821.close();
    ////    CollapsiblePanelH2821.enableAnimation = false;
    ////    CollapsiblePanelH2821.enableAnimation = true;
    CollapsiblePanelH2822.close();
    CollapsiblePanelH2822.enableAnimation = false;
    CollapsiblePanelH2822.enableAnimation = true;
    // Se comentó el 30/Noviembre/2011. El tema pasó de ser subtema a tema padre GGPM
    //CollapsiblePanelH2823.close();
    //CollapsiblePanelH2823.enableAnimation = false;
    //CollapsiblePanelH2823.enableAnimation = true;
    CollapsiblePanelH2827.close();
    CollapsiblePanelH2827.enableAnimation = false;
    CollapsiblePanelH2827.enableAnimation = true;
    //////    CollapsiblePanelH2828.close();
    //////    CollapsiblePanelH2828.enableAnimation = false;
    //////    CollapsiblePanelH2828.enableAnimation = true;
    //    CollapsiblePanelH3028.close(); //menu hor
    //    CollapsiblePanelH3028.enableAnimation = false;
    //    CollapsiblePanelH3028.enableAnimation = true;
    /*CollapsiblePanelH2969.close();
    CollapsiblePanelH2969.enableAnimation = false;
    CollapsiblePanelH2969.enableAnimation = true;*/

    //*    CollapsiblePanelH2966.close();
    //*    CollapsiblePanelH2966.enableAnimation = false;
    //*    CollapsiblePanelH2966.enableAnimation = true;

    CollapsiblePanel2818.close();
    CollapsiblePanel2817.close();
    CollapsiblePanel2819.close();
    CollapsiblePanel2820.close();
    CollapsiblePanel2821.close();
    CollapsiblePanel2822.close();
    /*CollapsiblePanel2871.close();*/
    //    CollapsiblePanel3028.close();  // menú derecho
    // Se comentó el día 30/Noviembre/2011. El tema pasó de ser subtema a tema padre GGPM
    //CollapsiblePanel2823.close();
    CollapsiblePanel2827.close();
    //////    CollapsiblePanel2828.close();

    //*    CollapsiblePanel2966.close();  

    CollapsiblePanel2945.close();

    //*    CollapsiblePanel2889.close();
    //*    CollapsiblePanel2890.close();
    //*    CollapsiblePanel2891.close();
    //*    CollapsiblePanel2892.close();
    /*CollapsiblePanel2914.close();*/

    //// se quitó del menú derecho    CollapsiblePanelH2821.close();
    /*CollapsiblePanelH2871.close();*/
    //    CollapsiblePanelH3028.close();  // menu derecho
    // Comentado el 30/Noviembre/2011. El tema pasó de ser subtema a tema padre GGPM
    //CollapsiblePanelH2823.close();
    CollapsiblePanelH2827.close();
    //////    CollapsiblePanelH2828.close();

    //*    CollapsiblePanelH2966.close();     
}

function hideh() {
    if (navigator.appName == "Microsoft Internet Explorer") {
        PanelColapsableH2795.close();
        PanelColapsableH2791.close(); /**/
        PanelColapsableH2796.close();
        PanelColapsableH2797.close();
        //    Se quito por cambio de consecutivo 13/09/2011.
        //    CollapsiblePanelH2821.close();
        //    CollapsiblePanelH2821.enableAnimation = false;
        //    CollapsiblePanelH2821.enableAnimation = true;
        CollapsiblePanelH2822.close();
        CollapsiblePanelH2822.enableAnimation = false;
        CollapsiblePanelH2822.enableAnimation = true;
        // Se comentó el 30/Noviembre/2011. El tema pasó de ser subtema a tema padre GGPM
        //CollapsiblePanelH2823.close();
        //CollapsiblePanelH2823.enableAnimation = false;
        //CollapsiblePanelH2823.enableAnimation = true;
        CollapsiblePanelH2827.close();
        CollapsiblePanelH2827.enableAnimation = false;
        CollapsiblePanelH2827.enableAnimation = true;
        //////    CollapsiblePanelH2828.close();
        //////    CollapsiblePanelH2828.enableAnimation = false;
        //////    CollapsiblePanelH2828.enableAnimation = true;
        //    CollapsiblePanelH3028.close(); // elementos del pie
        //    CollapsiblePanelH3028.enableAnimation = false;
        //    CollapsiblePanelH3028.enableAnimation = true;
        /*CollapsiblePanelH2969.close();
        CollapsiblePanelH2969.enableAnimation = false;
        CollapsiblePanelH2969.enableAnimation = true;*/

        //*    CollapsiblePanelH2966.close();
        //*    CollapsiblePanelH2966.enableAnimation = false;
        //*    CollapsiblePanelH2966.enableAnimation = true;

        // CollapsiblePanelH2821.close();
        /*CollapsiblePanelH2871.close();*/
        //    CollapsiblePanelH3028.close(); // pie
        // Comentado el 30/Noviembre/2011. El tema pasó de ser subtema a tema padre GGPM
        //CollapsiblePanelH2823.close();
        CollapsiblePanelH2827.close();
        //////    CollapsiblePanelH2828.close();
        //*    CollapsiblePanelH2966.close();
    } else
        ContraerMenus('', '2');

}

function toggleMenu(objID) {
    if (!document.getElementById) return;
    var ob = document.getElementById(objID).style;
    ob.display = (ob.display == 'block') ? 'none' : 'block';
}

function ContraerMenus(Padre, Tipo) {
    //Padre: id del padre en donde se dio clic, por lo tanto se contraeran los demas menus
    var allHTMLTags = new Array();
    //Se guardan todos los html tags
    var allHTMLTags = document.getElementsByTagName("tr");

    //alert(allHTMLTags.length);
    for (i = 0; i < allHTMLTags.length; i++) {

        //Solo los tags que cumplan entraran en la condición de que la clase sea la que se indica
        if (allHTMLTags[i].className == 'ContenedorHijos') {
            switch (Tipo) {
                case "1": //Solo deja abierto el menu al que le dimos clic
                    var myRegExp = new RegExp(Padre, "i");
                    var idNodo = allHTMLTags[i].id; //Recuperamos el id del nodo
                    if (idNodo.search(myRegExp) == -1) //Si no es parte del menu que dimos clic entonces lo ocultamos
                        allHTMLTags[i].style.display = 'none';
                    break;
                case "2":    //Cierra todos los menus, se utiliza solo en el menu horizontal, cuando seleccionamos algun item
                    allHTMLTags[i].style.display = 'none';
                    break;
                /*case "3":  
                var myRegExp = new RegExp(Padre, "i");
                var idNodo = allHTMLTags[i].id; //Recuperamos el id del nodo
                if (idNodo.search(myRegExp) != -1) //Si no es parte del menu que dimos clic entonces lo ocultamos
                allHTMLTags[i].style.display = 'none';
                break; */ 
            }
        }
    }

}

function ContraerMInt(id, Padre) {//Contraer menus interiores
    //Padre: id del padre en donde se dio clic, por lo tanto se contraeran los demas menus
    //Id: id del menu que quedara abierto
    var allHTMLTags = new Array();
    //Se guardan todos los html tags
    var allHTMLTags = document.getElementsByTagName("tr");
    //alert(allHTMLTags.length);
    for (i = 0; i < allHTMLTags.length; i++) {
        //Solo los tags que cumplan entraran en la condición de que la clase sea la que se indica
        if (allHTMLTags[i].className == 'ContenedorHijos') {
            var myRegExp = new RegExp(Padre, "i");
            var myRegExp2 = new RegExp("Nietos", "i");
            var idNodo = allHTMLTags[i].id; //Recuperamos el id del nodo
            if (idNodo.search(myRegExp) != -1 && idNodo.search(myRegExp2) != -1) { //Si no es parte del menu que dimos clic entonces lo ocultamos
                if (idNodo != id)
                    allHTMLTags[i].style.display = 'none';
            }
        }
    }
}

