function getFlashVersion() {
	var JSflashVersion = 0;
	if(JSflashVersion>0){return JSflashVersion;}
	playerVersion = [0,0,0],
	d = null;
	if (typeof navigator.plugins != "undefined" && typeof navigator.plugins["Shockwave Flash"] == "object") {
		d = navigator.plugins["Shockwave Flash"].description;
		if (d && !(typeof navigator.mimeTypes != "undefined" && navigator.mimeTypes["application/x-shockwave-flash"] && !navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)) {
			d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
			playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
			playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
			playerVersion[2] = /r/.test(d) ? parseInt(d.replace(/^.*r(.*)$/, "$1"), 10) : 0;
		}
	}
	else if (typeof window.ActiveXObject != "undefined") {
		var a = null, fp6Crash = false;
		try {
			a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash" + ".7");
		}
		catch(e) {
			try { 
				a = new ("ShockwaveFlash.ShockwaveFlash" + ".6");
				playerVersion = [6,0,21];
				a.AllowScriptAccess = "always";	 // Introduced in fp6.0.47
			}
			catch(e) {
				if (playerVersion[0] == 6) {
					fp6Crash = true;
				}
			}
			if (!fp6Crash) {
				try {
					a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
				}
				catch(e) {}
			}
		}
		if (!fp6Crash && a) { // a will return null when ActiveX is disabled
			try {
				d = a.GetVariable("$version");	// Will crash fp6.0.21/23/29
				if (d) {
					d = d.split(" ")[1].split(",");
					playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
				}
			}
			catch(e) {}
		}
	}
	JSflashVersion = playerVersion[0];
	return JSflashVersion;
}
