 
 
window.onresize = initMyProBarFrame;
window.onload = initMyProBarFrame;

function initMyProBarFrame() { 
if (document.getElementById("frame") && document.getElementById("profile-bar")){
    var window_height = getWindowHeight();
    var myProBarFrame =   document.getElementById("frame");
    var profileBar =   document.getElementById("profile-bar");  
    myProBarFrame.height = window_height - profileBar.clientHeight + "px"; 
    return false;
}
}
function getWindowHeight() {
    var myProBarH = 0;

    if( typeof( window.innerWidth ) == 'number' ) { 
        myProBarH = window.innerHeight;
    } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
        myProBarH = document.documentElement.clientHeight;
    } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
        myProBarH = document.body.clientHeight;
    } 

    return myProBarH;
}