var requiredVersion = 8;
var flashinstalled = 0;
var flashversion = 0;
MSDetect = "false";
if (navigator.plugins && navigator.plugins.length) {
	x = navigator.plugins["Shockwave Flash"];
	if (x) {
		flashinstalled = 2;
		if (x.description) {
			y = x.description;
			flashversion = y.charAt(y.indexOf('.')-2);
			flashversion+= y.charAt(y.indexOf('.')-1);
		}
	}
	else flashinstalled = 1;
	if (navigator.plugins["Shockwave Flash 2.0"]) {
		flashinstalled = 2;
		flashversion = 2;
	}
}
else if (navigator.mimeTypes && navigator.mimeTypes.length) {
	x = navigator.mimeTypes['application/x-shockwave-flash'];
	if (x && x.enabledPlugin) flashinstalled = 2;
	else flashinstalled = 1;
}
else MSDetect = "true";


document.write('<scr' + 'ipt language="VBScript"\> \n');
document.write('on error resume next \n');
document.write('If MSDetect = "true" Then \n');
document.write('	For i = 2 to 20 \n');
document.write('		If Not(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & i))) Then \n');
document.write('\n');
document.write('		Else \n');
document.write('			flashinstalled = 2 \n');
document.write('			flashversion = i \n');
document.write('		End If \n');
document.write('	Next \n');
document.write('End If \n');
document.write('If flashinstalled = 0 Then \n');
document.write('	flashinstalled = 1 \n');
document.write('End If \n');
document.write('</scr' + 'ipt\> \n'); 

if (flashversion >= requiredVersion) has_flash=true;
else has_flash=false;



/*
var dontKnow = false;
var flashVersion = 0;
var requiredVersion = 7;

var has_flash=false;

var agent = navigator.userAgent.toLowerCase(); 

if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1) {
	document.write('<scr' + 'ipt language="VBScript"\> \n');
	document.write('on error resume next \n');
	document.write('if IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.8")) then flashVersion = 8 \n');
	document.write('if flashVersion < 8 and IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.7")) then flashVersion = 7 \n');
	document.write('if flashVersion < 7 and IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6")) then flashVersion = 6 \n');
	document.write('if flashVersion < 6 and IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5")) then flashVersion = 5 \n');
	document.write('if flashVersion < 5 and IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4")) then flashVersion = 4 \n');
	document.write('if flashVersion < 4 and IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3")) then flashVersion = 3 \n');	
	document.write('</scr' + 'ipt\> \n'); 
}

else if (navigator.plugins && navigator.plugins.length > 0) {
	var flashPlugin = navigator.plugins['Shockwave Flash'];
	if (typeof flashPlugin == 'object') { 
		if (flashPlugin.description.indexOf('8.') != -1) flashVersion = 8;
        else if (flashPlugin.description.indexOf('7.') != -1) flashVersion = 7;
        else if (flashPlugin.description.indexOf('6.') != -1) flashVersion = 6;
		else if (flashPlugin.description.indexOf('5.') != -1) flashVersion = 5;
		else if (flashPlugin.description.indexOf('4.') != -1) flashVersion = 4;
		else if (flashPlugin.description.indexOf('3.') != -1) flashVersion = 3;
	}
}

if (flashVersion >= requiredVersion) has_flash=true;
else if (flashVersion > 0) has_flash=false;
else has_flash=false;
*/
