If a user wants to look at it in a small window he may have to scroll, but he won't lose anything. The other controls can get cut off, so as the size of the screen shrinks, I move the lower bars up and the bars on the right to their left, to keep them in view. They are in pixel units. You might note the differences between NS and IE in the property references. In IE you go from what you are measuring to its container, which for a top level div is the body element.
Navigator has a quicker way to find the size of the window.
I used the Math.ceil and Math.floor methods to make sure that I get a number back. IE in particular likes to read pixel properties as strings, and often throws a fit if you try to subtract from what it thinks is a string. There was no particular reason I picked the methods ceil and floor which round a number up or down to the next integer. I haven't used them for a while, didn't want them getting dull or rusty in the bottom of my toolbox. The tem variables reference the control containers in IE by their document.all.id.