
var flash2Plugin = false;
var flash3Plugin = false;
var flash4Plugin = false;
var flash5Plugin = false;
var flash6Plugin = false;
var flash7Plugin = false;
var flash8Plugin = false;
var flash9Plugin = false;
var flash10Plugin = false;
var versionInstalled = 0;
var flashOkay = false;
var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.indexOf("Windows") != -1) ? true : false;
if(isIE && isWin){
document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
document.write('on error resume next \n');
document.write('flash2Plugin = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.2"))) \n');
document.write('flash3Plugin = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3"))) \n');
document.write('flash4Plugin = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');
document.write('flash5Plugin = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n');
document.write('flash6Plugin = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6"))) \n');
document.write('flash7Plugin = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.7"))) \n');
document.write('flash8Plugin = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.8"))) \n');
document.write('flash9Plugin = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.9"))) \n');
document.write('flash10Plugin = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.10"))) \n');
document.write('</SCR' + 'IPT\> \n');
}
function detectFlash(reqVer) {
if(typeof reqVer=="undefined") {
reqVer = 8;
}

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 versionStr = flashDescription.substr((flashDescription.indexOf(".") - 2), 2);
var flashVersion = parseInt(versionStr.replace(/^\s+|\s+$/g,""));
flash2Plugin = (flashVersion == 2) ? true : false;
flash3Plugin = (flashVersion == 3) ? true : false;
flash4Plugin = (flashVersion == 4) ? true : false;
flash5Plugin = (flashVersion == 5) ? true : false;
flash6Plugin = (flashVersion == 6) ? true : false;
flash7Plugin = (flashVersion == 7) ? true : false;
flash8Plugin = (flashVersion == 8) ? true : false;
flash9Plugin = (flashVersion == 9) ? true : false;
flash10Plugin = (flashVersion == 10) ? true : false;
}
}
if (flash2Plugin) versionInstalled = 2;
if (flash3Plugin) versionInstalled = 3;
if (flash4Plugin) versionInstalled = 4;
if (flash5Plugin) versionInstalled = 5;
if (flash6Plugin) versionInstalled = 6;
if (flash7Plugin) versionInstalled = 7;
if (flash8Plugin) versionInstalled = 8;
if (flash9Plugin) versionInstalled = 9;
if (flash10Plugin) versionInstalled = 10;

flashOkay = (versionInstalled >= reqVer) ? true : false;

}