var height;
if (document.all) //IE
    height = document.body.offsetHeight;
else if (document.layers) //Netscape
    height = window.innerHeight;