To the OP:
Probably not the best policy to begin with:
the following script will not even begin to run in FF or safari.
... as you're sort of implying that it will
run somewhere else, likely IE. Very different from just leaving the user agent out of it.