
var fd_requiredVersion = 4;

var fd_flash2Installed = false;
var fd_flash3Installed = false;
var fd_flash4Installed = false;
var fd_flash5Installed = false;
var fd_flash6Installed = false;
var fd_maxVersion = 6;
var fd_actualVersion = 0;

if (document.all && !window.opera) var browser_IE = true; else var browser_IE = false;
if (navigator.appVersion.indexOf("Windows") != -1) var browser_Win = true; else var browser_Win = false;

if (browser_IE && browser_Win) {
	document.write ('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
	document.write ('on error resume next \n');
	document.write ('fd_flash2Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.2"))) \n');
	document.write ('fd_flash3Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3"))) \n');
	document.write ('fd_flash4Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');
	document.write ('fd_flash5Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n');  
	document.write ('fd_flash6Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6"))) \n');  
	document.write ('</SCR' + 'IPT\> \n');
}


function DetectFlash(localRequiredVersion) {

	var hasRightVersion = false;

	if (navigator.plugins) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var isVersion2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + isVersion2].description;
			var flashVersion = parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1));
			fd_flash2Installed = flashVersion == 2;
			fd_flash3Installed = flashVersion == 3;
			fd_flash4Installed = flashVersion == 4;
			fd_flash5Installed = flashVersion == 5;
			fd_flash6Installed = flashVersion >= 6;
		}
	}

	for (var i = 2; i <= fd_maxVersion; i++) {
		if (eval("fd_flash" + i + "Installed == true")) fd_actualVersion = i;
	}

	if (localRequiredVersion) {
		if (fd_actualVersion >= localRequiredVersion) { hasRightVersion = true; }
	}
	else {
		if (fd_actualVersion >= fd_requiredVersion) { hasRightVersion = true; }
	}

	return hasRightVersion;

}  




