function resizeWindow() {
    var htmlheight;
    var height;
    var innerCntH;
    var marginTop = marginBottom = 0;

    var container = document.getElementById("container");
    var innerContent = document.getElementById("maincontent");

    if (container && innerContent) {
        if (parseInt(navigator.appVersion) > 3) {
            if (navigator.appName == "Netscape") {
                htmlheight = window.innerHeight;
                height = container.clientHeight;
                innerCntH = innerContent.clientHeight - 30;
            }
        }
        if (navigator.appName.indexOf("Microsoft") != -1) {
            htmlheight = document.documentElement.clientHeight;
            height = container.offsetHeight;
            innerCntH = innerContent.offsetHeight - 30;
        }
        
        htmlheight -= (marginTop + marginBottom + height - innerCntH);
        if (htmlheight > innerCntH)
            innerContent.style.height = htmlheight + "px";
    }
}
