Is there a problem with this script?

I made a post a few moments ago about a patch blowing up in the main forum, but I’m pretty sure I’ve narrowed it down to a JS script. This runs like a charm on Mac OS X, but kills Max on Windows XP. Am I missing something?