function CerrarSesionWpanel()
{
    var oXmlHttp = createXMLHttp();
    if (oXmlHttp==null) return;
    
    var ahora = new Date();    
    
    var url="../ajax/toplogonpanelcerrarsesion.jsp?TIMEID=" + ahora.getTime();
    oXmlHttp.open("get",url,true);
    oXmlHttp.onreadystatechange = function () {
        if (oXmlHttp.readyState == 4 ) {
           window.location.reload();           
        }
    }
    oXmlHttp.send(null);

}
//-----------------------------------------------------------------------------
function AbrirDivMenuInicio()
{

    var divmenuinicio=document.getElementById("divmenuinicio");
    if (divmenuinicio!=null)
       {

       document.getElementById("container").appendChild(divmenuinicio);

       divmenuinicio.style.top=23;
       divmenuinicio.style.left=17;
       divmenuinicio.style.width=256;
       divmenuinicio.style.height=239;
       divmenuinicio.style.zIndex=20;
       divmenuinicio.innerHTML ="<img src=\"./images/loading_icon.gif\" border=0>";
       }

    var AjusteUpdater="?update=" + new Date().getTime(); 

    var oXmlHttp = createXMLHttp();
    if (oXmlHttp==null) return;

    var url="./ajax/getdivabiertomenuinicio.jsp" + AjusteUpdater;

    oXmlHttp.open("get",url,true);

    oXmlHttp.onreadystatechange = function () {
        if (oXmlHttp.readyState == 4 ) {          
           var Resul=oXmlHttp.responseText;
           if (divmenuinicio!=null)
              {
              divmenuinicio.innerHTML = Resul;
              }
        }
    }

    oXmlHttp.send(null);


}
//------------------------------------------------------------------
function CerrarDivMenuInicio()
{

    var divmenuinicio=document.getElementById("divmenuinicio");
    if (divmenuinicio!=null)
       {
       divmenuinicio.style.top=8;
       divmenuinicio.style.left=2;
       divmenuinicio.style.width=14;
       divmenuinicio.style.height=14;
       divmenuinicio.style.zIndex=0;
       divmenuinicio.innerHTML ="&nbsp;";
       } 

}
//------------------------------------------------------------------
function EjecutaMenuAbrirPanel()
{

var TMPURL=escape("./wpanel/index.jsp");
var especificaciones="";
window.open(TMPURL,"",especificaciones);

CerrarDivMenuInicio();

}
//------------------------------------------------------------------
function setLogonSwitch(NOMBRE,VALOR)
{

    var oXmlHttp = createXMLHttp();
    if (oXmlHttp==null) return;
    
    var ahora = new Date();    
    
    var url="./ajax/setlogonswitch.jsp?NOMBRE=" + NOMBRE + "&VALOR=" + VALOR + "&TIMEID=" + ahora.getTime();
    oXmlHttp.open("get",url,true);
    oXmlHttp.onreadystatechange = function () {
        if (oXmlHttp.readyState == 4 ) {
            window.location.reload();           
        }
    }

    oXmlHttp.send(null);

}
//------------------------------------------------------------------
