Properties document.body.clientHeight and document.body.clientWidth return different values on IE7, IE8 and Firefox:
document.body.clientHeight
document.body.clientWidth
IE 8:
This has to do with the browser's box model. Use something like jQuery or another JavaScript abstraction library to normalize the DOM model.