function getWindowDimension()
{
    var width = 0;
    var height = 0;
    if (typeof( window.innerWidth ) == 'number') {
        width = window.innerWidth;
        height = window.innerHeight;
    }
    else if (document.documentElement &&
             ( document.documentElement.clientWidth ||
               document.documentElement.clientHeight )) {
        width = document.documentElement.clientWidth;
        height = document.documentElement.clientHeight;
    }
    else if (document.body &&
             ( document.body.clientWidth || document.body.clientHeight )) {
        width = document.body.clientWidth;
        height = document.body.clientHeight;
    }
    return {'width':width,'height':height};
}

function setHeight()
{
    var full = getWindowDimension();
    var h = full['height'] - 50 + "px";
    var hh = full['height'] - 52 + "px";
    $("#hc_layout").css("height", h);
    $("#lholder").css("height", hh);
    $("#rholder").css("height", hh);
}

function init(){
    setHeight();
    $("#hc_layout").splitter({
        type: 'v',
        initA: true,
        accessKey: '|'
    });
    $(window).bind("resize", function()
    {
        $("#hc_layout").trigger("resize");
        setHeight();
    }).trigger("resize");

    var menuAccordion;
    menuAccordion = $('#menus').accordion({
        header:"div.mtt",
        autoheight:false,
        active: '.selected',
        selectedClass: 'active'
    });

}
