/**************CHECK IF FLASH IS ENABLED ON CLIENT SIDE**************/

//U can change this number to check specific version of flash
var MM_FalshVersion = 6;
var MM_FalshCanPlay = false;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ?
                     navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
//Obtain integer for Flash version installed
if (plugin) {
		numPlugins = navigator.mimeTypes.length;
		for (i = 0; i < numPlugins; i++)	{
			plugin = navigator.mimeTypes[i];			
			if ((plugin.type == "application/x-shockwave-flash") && (plugin.enabledPlugin)) {
				pluginDesc = plugin.enabledPlugin.description;
				plugVersionPoz = pluginDesc.indexOf(".")	
				MM_PluginVersion = parseInt(pluginDesc.substring(plugVersionPoz -1, plugVersionPoz));
				}
		}
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write("<SCR" + "IPT LANGUAGE='VBScript'\> \n");
	document.write("Function VBGetFlashControlVersion() \n");
	document.write("On Error Resume Next \n");
	document.write("Dim Control, server, theversion \n");
	document.write("server = \"ShockwaveFlash.ShockwaveFlash\" \n");
	document.write("set Control = CreateObject(server) \n");
	document.write("if (IsObject(Control)) then \n");
	document.write("Dim majorVersion, controlVersion \n");
	document.write("controlVersion = Control.FlashVersion() \n");
	document.write("majorVersion = int(controlVersion / 65536) \n");
	document.write("theversion = CStr(majorVersion) \n");
	document.write("theversion = left(theversion,InStr(theversion,\".\")-1) \n");
	document.write("end if \n");
	document.write("if IsNull(theversion) or IsEmpty(theversion) or theversion = \"\" then \n");
	document.write("	theversion = 0 \n");
	document.write("end if \n");
	document.write("set Control = nothing \n");
	document.write("VBGetFlashControlVersion = theversion \n");
	document.write("End Function \n");
	document.write("</SCR" + "IPT\> \n");

	MM_PluginVersion = parseInt(VBGetFlashControlVersion());
}

MM_FalshCanPlay = MM_PluginVersion >= MM_FalshVersion;
