function resized() { var newheight; if (document.layers) { //netscape not tested newheight = window.innerHeight - document.getElementById('tab').offsetHeight; document.cmecfMainContent.height = newheight+"px"; } else if (document.all) { //mac IE and (not PC IE) newheight = document.body.offsetHeight - document.getElementById('tab').offsetHeight; cmecfMainContent.style.height = newheight+"px"; } else { //works for safari - same code as for netscape newheight = window.innerHeight - document.getElementById('tab').offsetHeight; cmecfMainContent.style.height = newheight+"px"; } }