var FlashActiveXInstalled;
var FlashActiveXVersion;
function FlashPlugInInfo(contentVersion) {
    if (navigator.plugins && navigator.plugins.length > 0) {
		this.implementation = "Plug-in";
		this.autoInstallable = false;
		if (navigator.plugins["Shockwave Flash"]) {
			this.installed = true;
			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];
			}
		} else {
			this.installed = false;
		}
	} else if (FlashActiveXInstalled != null) {
		this.implementation = "ActiveX control";
		this.installed = FlashActiveXInstalled;
		this.version = FlashActiveXVersion;
		this.autoInstallable = true;
    }
    this.canPlay = (parseInt(contentVersion) <= this.version);
}
function checkFlash(contentVersion, failURL, canInstallURL, unsureURL) {
	var player = new FlashPlugInInfo(contentVersion);
	
	if (player.installed == null) {
		location = unsureURL;
	} else if (!player.installed) {
		if (player.autoInstallable) {
			location = canInstallURL;
		} else {
			location = failURL;
		}
	} else {
		if (!player.canPlay) {
			if (player.autoInstallable) {
				location = canInstallURL;
			} else {
				location = failURL;
			}
		}
	}
	
}