function SetBodyHeight() { var myBHeight = 0; if( typeof( window.innerWidth ) == 'number' ) { //Non-IE myBHeight = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' myBHeight = document.documentElement.clientHeight; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible myBHeight = document.body.clientHeight; } var dElement = document.getElementsByTagName("body")[0]; dElement.style.height = myBHeight + 'px'; //window.alert(myBHeight + 'px'); } FastInit.addOnLoad(SetBodyHeight);