function OpenWindow(szpage,left,top,width,height) {
    window.open(szpage,"","scrollbars=no,toolbar=no,left="+left+",top="+top+",width="+width+",height="+height);
    return false;
}

function OpenWindowResize(szpage,left,top,width,height) {
    window.open(szpage,"","scrollbars=yes,resizable=yes,left="+left+",top="+top+",width="+width+",height="+height);
    return false;
}

function AjustaTabla(sztbl,nmargin) {
    h=getClientHeight();
    document.getElementById(sztbl).style.height=h-nmargin+"px";
}

function getClientWidth(){
    var width;
    if(document.innerWidth){ 
        width=document.innerWidth;
    } else if(document.documentElement.clientWidth){ 
        width=document.documentElement.clientWidth;
    } else if(document.body){ 
        width=document.body.clientWidth; 
    }
    return width;
}

function getClientHeight(){
    var height;
    if(document.innerHeight){ 
        height=document.innerHeight;
    } else if(document.documentElement.clientHeight){ 
        height=document.documentElement.clientHeight;
    } else if(document.body){ 
        height=document.body.clientHeight; 
    }
    return height;
}

function ResetButtons() {
    parent.ct.document.getElementById("config").disabled=false;
    parent.ct.document.getElementById("config").className="btn_menu";
    parent.ct.document.getElementById("tiendas").disabled=false;
    parent.ct.document.getElementById("tiendas").className="btn_menu";
    parent.ct.document.getElementById("productos").disabled=false;
    parent.ct.document.getElementById("productos").className="btn_menu";
    parent.ct.document.getElementById("clientes").disabled=false;
    parent.ct.document.getElementById("clientes").className="btn_menu";
    parent.ct.document.getElementById("pedidos").disabled=false;
    parent.ct.document.getElementById("pedidos").className="btn_menu";
    parent.ct.document.getElementById("descarga").disabled=false;
    parent.ct.document.getElementById("descarga").className="btn_menu";
}

