
Hubbit = new Object();

window.onresize = fix_height;

function fix_height() {

    var screen_height = get_screen_height();
    var frame_obj = document.getElementById("viewframe");
    // TODO: the 20 constant here is not correct. probably bar doesn't refect the right height
    frame_obj.height = (screen_height - document.getElementById("divBar").clientHeight - 20) + "px";

    return false;
}

function get_screen_height() {
    var myHeight = 0;

    if( typeof( window.innerWidth ) == 'number' ) {
        //Non-IE
        myHeight = window.innerHeight;
    } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
        //IE 6+ in 'standards compliant mode'
        myHeight = document.documentElement.clientHeight;
    } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
        //IE 4 compatible
        myHeight = document.body.clientHeight;
    }

    return myHeight;
}
