var navigationHight = 0; //顶部导航条高度
var menuWidth = 180; //菜单宽度
var marginValue, m2;
if(typeof(disValue)=="undefined")
{
    disValue=0;
}
if (window.XMLHttpRequest) {
    if (!window.ActiveXObject) {
        marginValue = 11; // Mozilla, Safari,...
        m2 = 7;
    } else {
        marginValue = 5; //IE7
        m2 = 5;
    }
} else {
    marginValue =5; //IE6
    m2 = 5;
}

var leftdiv = document.getElementById("div-left-menu");
var sidebar = document.getElementById("div-left-menu-content");

var splitdiv = document.getElementById("div-middle-split");
var rightdiv = document.getElementById("div-right-frame");
var frameshow = document.getElementById("frameshow");
var FrameResize = function() {
    try
    {
        leftdiv.style.height = document.body.clientHeight - navigationHight - marginValue-disValue;
        rightdiv.style.height = document.body.clientHeight - navigationHight - marginValue-disValue;
        splitdiv.style.height = document.body.clientHeight - navigationHight - marginValue-disValue;
        sidebar.style.height = document.body.clientHeight - navigationHight - marginValue - 51-disValue;
    }
    catch(e)
    {
        alert(e.message);
    }
}
function on_tool(imgpath) {
    //判断菜单是否隐藏
    if (leftdiv.style.display == "none") {
        FrameResize();
        leftdiv.style.display = "block";
        frameshow.src = imgpath+"AppFrame/APICss/default/ui/splitter_horCol.gif";
    }
    else {
        rightdiv.style.height = document.body.clientHeight - navigationHight - marginValue-disValue;
        splitdiv.style.height = document.body.clientHeight - navigationHight - marginValue-disValue;
        leftdiv.style.display = "none";
        frameshow.src =  imgpath+"AppFrame/APICss/default/ui/splitter_horExp.gif";
    }
}
FrameResize();
if (window.XMLHttpRequest) {
    if (!window.ActiveXObject) {
        window.onload = FrameResize; // Mozilla, Safari...          
    } else {
        window.onresize = FrameResize; //IE7
    }
} else {
    window.onresize = FrameResize; //IE6
}
//window.onerror = function() {
//    return true;
//}