Flash detection crashes IE

I’m using a version of the official Macromedia Flash detection script provided in Flash Professional 8 which seems to work on most browsers but crashes in Internet Explorer.

Just wanted any help or comment if something stands out in the code. I’ve put up a version of the page for comment:

The script should result in 1 of 3 things:

  1. Flash 8+ installed: “Click to load swf content.”

  2. Flash 7 or lower, or no flash installed: “Follow installation instructions here…”

  3. Flash undetectable or JavaScript not enabled: “Javascript required to detect flash.”

Cheers