//********************************************************************* // // Macromedia Flash Dispatcher - a scriptable detector for Flash Player // // // Copyright (c) 2000 Macromedia, Inc. // // ********************************************************************* // // URL of the Flash self-detecting movie ("sniffer"). // // Reset this if you move the file out of the directory in which the // document containing the script that calls MM_FlashDispatch() resides. // var MM_FlashDetectorURL = "ICIHavenflashdetect.swf"; // // Latest available revisions of the Plug-in. // var MM_latestPluginRevision = new Object(); MM_latestPluginRevision["6.0"] = new Object(); MM_latestPluginRevision["5.0"] = new Object(); MM_latestPluginRevision["4.0"] = new Object(); MM_latestPluginRevision["3.0"] = new Object(); MM_latestPluginRevision["2.0"] = new Object(); // // This table must be updated as new versions and revisions of the // plug-in are released, in support of the 'requireLatestRevision' // option in MM_FlashDispatch(). // MM_latestPluginRevision["6.0"]["Windows"] = 65; MM_latestPluginRevision["6.0"]["Macintosh"] = 65; MM_latestPluginRevision["6.0"]["Unix"] = 69; MM_latestPluginRevision["5.0"]["Windows"] = 42; MM_latestPluginRevision["5.0"]["Macintosh"] = 41; MM_latestPluginRevision["5.0"]["Unix"] = 51; MM_latestPluginRevision["4.0"]["Windows"] = 28; MM_latestPluginRevision["4.0"]["Macintosh"] = 27; MM_latestPluginRevision["4.0"]["Unix"] = 12; MM_latestPluginRevision["3.0"]["Windows"] = 10; MM_latestPluginRevision["3.0"]["Macintosh"] = 10; MM_latestPluginRevision["2.0"]["Windows"] = 11; MM_latestPluginRevision["2.0"]["Macintosh"] = 11; /* * MM_FlashInfo() - construct an object representing Flash Player status * * Constructor: * * new MM_FlashInfo() * * Properties: * * installed true if player is installed (undefined if undetectable) * * implementation the form the player takes in this browser: "ActiveX control" or "Plug-in" * * autoInstallable true if the player can be automatically installed/updated on this browser/platform * * version player version if installed * * revision revision if implementation is "Plug-in" * * Methods: * * canPlay(contentVersion) true if installed player is capable of playing content authored with the * specified version of Flash software * Description: * * MM_FlashInfo() instantiates an object that contains as much * information about Flash Player-whether it is installed, what * version is installed, and so one-as is possible to collect. * * Where Flash Player is implemented as a plug-in and the user's * browser supports plug-in detection, all properties are defined; * this includes Netscape on all platforms and Microsoft Internet * Explorer 5 on the Macintosh. Where Flash Player is implemented * as an ActiveX control (MSIE on Windows), all properties except * 'revision' are defined. * * Prior to version 5, Microsoft Internet Explorer on the Macintosh * did not support plug-in detection. In this case, no properties * are defined, unless the cookie 'MM_FlashDetectedSelf' has been * set, in which case all properties except 'version' and 'revision' * are set. * * This object is primarily meant for use by MM_FlashDispatch(), but * may be of use in reporting the player version, etc. to the user. */ var MM_FlashControlInstalled; // is the Flash ActiveX control installed? var MM_FlashControlVersion; // ActiveX control version if installed function MM_FlashInfo() { if (navigator.plugins && navigator.plugins.length > 0) { this.implementation = "Plug-in"; this.autoInstallable = false; // until Netscape SmartUpdate supported // Check whether the plug-in is installed: if (navigator.plugins["Shockwave Flash"]) { this.installed = true; // Get the plug-in version and revision: var words = navigator.plugins["Shockwave Flash"].description.split(" "); for (var i = 0; i < words.length; ++i) { if (isNaN(parseInt(words[i]))) continue; this.version = words[i]; this.revision = parseInt(words[i + 1].substring(1)); } } else { this.installed = false; } } else if (MM_FlashControlInstalled != null) { this.implementation = "ActiveX control"; this.installed = MM_FlashControlInstalled; this.version = MM_FlashControlVersion; this.autoInstallable = true; } else if (MM_FlashDetectedSelf()) { this.installed = true; this.implementation = "Plug-in"; this.autoInstallable = false; } this.canPlay = MM_FlashCanPlay; } /* * MM_FlashDispatch() - get Flash Player status and redirect appropriately * * Synopsis: * * MM_FlashDispatch(contentURL, contentVersion, requireLatestRevision, * upgradeURL, install, installURL, altURL, * overridePluginsPage, disableAutoInstall) * * Arguments: * * contentURL URL of document containing Flash content * contentVersion version of Flash software used to author content * requireLatestRevision Boolean indicating whether to require * latest revision of player (plug-in only) * upgradeURL document to load if player must be * upgraded to play content and automated * updating is not supported on the user's * browser & platform * install Boolean indicating whether to install * if player is not installed * installURL document to load if 'install' is true * and automated installation is not * supported on user's browser & platform * altURL document to load if 'install' is false * overridePluginsPage Boolean indicating whether to set the * PLUGINSPAGE attribute for the embedded * Flash Player sniffer to `installURL' * disableAutoInstall Boolean indicating that the auto-installation * should not occur and that the user will go * to the installURL or to the upgradeURL as specified * * Returns: * * Normally, never returns; changes window.location. * Returns with no value when called improperly. * * Description: * * MM_FlashDispatch() detects whether the user's Web browser has the * Flash plug-in or ActiveX control installed, and what version is * installed if so. It then takes appropriate action based on whether * Flash Player is installed and is compatible with 'contentVersion': * load a document containing Flash content, load alternate content, * or oversee the updating or installation of the player. * * There are three possible outcomes of the detection process: * * 1. A version of Flash Player has been detected that is * suitable for playing the requested content version. * MM_FlashDispatch() will load 'contentURL'. * * 2. An unsuitable version of Flash Player has been detected. * MM_FlashDispatch() will load 'contentURL' if automated * updating is supported on the user's browser & platform; * otherwise, it will load 'upgradeURL'. * * 3. Flash Player is not installed. If 'install' is set to * true, MM_FlashDispatch() will load 'contentURL' if the * user's browser supports automated installation; otherwise, * it will load 'installURL'. If 'install' is false, * MM_FlashDispatch() will load 'altURL'. * * When script-based detection of Flash Player is not possible, * MM_FlashDispatch() attempts to load a Flash movie to carry out * the detection. If Flash Player is not installed, there is presently * no choice but to let the browser redirect the user via the * PLUGINSPAGE attribute of the EMBED tag. In this case, 'install' * is ignored, but setting 'overridePluginsPage' to true will * set PLUGINSPAGE to 'installURL', overriding its default value * (the URL for the Macromedia Flash download center). If this flag * is set, 'installURL' must be absolute, not relative. */ var MM_FlashPluginsPage = "http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"; function MM_FlashDispatch(contentURL, contentVersion, requireLatestRevision, upgradeURL, install, installURL, altURL, overridePluginsPage, disableAutoInstall) { if (disableAutoInstall == null) { alert("ERROR: MM_FlashDispatch() called with too few arguments."); return; } if (overridePluginsPage && installURL.substring(0, 7) != "http://") { alert("ERROR: MM_FlashDispatch() called with relative URL" + " for PLUGINSPAGE (" + installURL + ")"); return; } var player = new MM_FlashInfo(); if (player.installed == null) { var detector = ""; document.open(); document.write("