lucy24 - 9:44 am on May 19, 2013 (gmt 0)
The usual preliminary questions: How are you testing? Just by playing with your browser's window width? Did you first check to make sure the function is returning the right value? (Nothing fancy: "alert(width)" will give you the information you need.*) It doesn't have to work in MSIE, because it will never meet MSIE in real life. But from your post it's impossible to tell where the error is happening.
Incidentally 360 seems awfully narrow for 300x250. It doesn't leave much horizontal space for other content.
* The first time I ever saw the "NaN" response was when testing something that involved innerWidth and MSIE. This is really true. I had to go ask a reference librarian what it means :(