@mrhooFeb 16.2006 — #If you call the following code with no arguments, it will return the integer part of the pixel width and height of the browser window in a two element array.
If you pass it an element reference it will return the [width,height] of that element.
Of course you have a default size for when the script is turned off or feeble.
[CODE] function elSize(hoo){ hoo= (hoo && hoo.nodeType===1)? hoo: false; var A; if(hoo){ var bh= [hoo.scrollHeight,hoo.offsetHeight]; var bw= [hoo.scrollWidth,hoo.offsetWidth]; A= (bh[0]>bh[1])? [bw[0],bh[0]]: [bw[1],bh[1]]; } else{ if(self.innerHeight) A= [self.innerWidth,self.innerHeight]; else{ var D= document.documentElement; if(D && 'clientHeight' in D) A= [D.clientWidth,D.clientHeight]; else A= [screen.width,screen.height]; } } return A; } [/CODE]