I am working on a site that will not all fit horizontally in a browser window that is less than 945px. My client is fine with that and wants the current layout. What happens is that 2 images overlap.

What I would like to do in javaScript is to use a script that will determine the width of the browser window (not the screen resolution) and then show or hide the one image which is not crucial to the content of the site. The image I want to do this to is one that is in it's own div. So for example: "onLoad if browser window is less than 945px then hide ths image (or div)" would be what I'm trying (I think) to express in JS.

I don't want to use screen resolution because the script wouldn't work if a 1024 user had his Favorites panel open, so I'd like to sniff out the current width of the browser window.

And of course it needs to work in all recent browsers. My knowledge of JS is limited thought I'm good with Action Script so I get the idea, and I have reference books to help me, also.

I would greatly appreciate any help I can get.

Thanks.
RH