var MM_FlashControlInstalled;		// is the Flash ActiveX control installed?

var MM_FlashControlVersion;		// ActiveX control version if installed

function MM_FlashInfo()

{

		this.version = -1; // init

		this.revision = -1;

		this.implementation = "Do not know";

		this.installed = false;

		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[words.length-1].substring(1));

					}

			}

		}

		else if (MM_FlashControlInstalled != null) // is set in dispatcher.vbs

			{

			this.implementation = "ActiveX control";

			this.installed = MM_FlashControlInstalled;

			this.version = MM_FlashControlVersion;

			this.autoInstallable = true;

			}

}

// called function

function flashDispatch(contentVersion,contentRevision) {

		var canPlay = false; // init: right Version ?

		var useFlash = false; // init: can use Flash ?

		var autoInstall = true // init: always insert Flash on ActiveX

		

		var player = new MM_FlashInfo(); // get all infos needed

		autoInstall ? autoInstall=player.autoInstallable : autoInstall=false; // autoInstall wanted and possible?

		

		if (contentVersion==player.version && (contentRevision<=player.revision || player.revision==-1)) canPlay=true;

		else if (contentVersion < player.version) canPlay=true;

		else canPlay=false;

		

		useFlash = canPlay ? true : false;

		//useFlash = autoInstall ? true : useFlash; // insert always Flash on ActiveX

		return useFlash;

}