You'll need to test the viewer's browser to tell if they can view your animation before you use it.
- Any version of Netscape Navigator/Communicator 3.0 or newer,
- Netscape Navigator version 2.02 running on OS/2,and
- Any version of Microsoft Internet Explorer 4.0 or newer.
// VERIFY THAT THE BROWSER IS ONE THAT SUPPORTS THE IMAGE() OBJECT
// BY VERIFYING THAT ONE OF THE FOLLOWING IS TRUE:
// CASE 1 the client is Netscape version 3 or higher,
// CASE 2 the client is Netscape version 2.02 on an OS/2 platform, or
// CASE 3 the client is Microsoft Internet Explorer version 4 or higher.
// bAnimate will be set to TRUE if any of the following cases are true.
// CASE 1:
// CASE 2:
// CASE 3:
Once the browser has been identified you can use the "bAnimate" variable to decide whether you should animate the image. Again, if you try to animate an image on an old browser you'll get a nasty error message.
If bAnimate = 'true' then it's safe to do the animation,
if bAnimate = 'false' then it's better to skip the animation.
You don't have to understand this script to use it. Just put this script in your document's HEAD, and the bAnimate variable will be there for you to use.