<!--
/*****************************************************************
File Modified From:						Changes By:
	Flash Plugin Check v1.03
		Written by Steve Vachon				Gregory Gritmon
		(a.k.a Prometh)						(a.k.a GSquared)
		www.svachon.com/scripts				www.gregorygritmon.com
------------------------------------------------------------------

******************************************************************/
//	   var flashVersion = 7;	// The major version you want to detect - mustn't contain decimals
//	   var flashMinor = 0;		// The release number (example where 79 is the minor version: 6,0,79,0) - leave as 0 if uncertain
	/* The 2 lines below have been removed, so specification of flash version can be declared outside this code.
	   var flashVersion = 6;	// The major version you want to detect - mustn't contain decimals
	   var flashMinor = 0;		// The release number (example where 79 is the minor version: 6,0,79,0) - leave as 0 if uncertain
	*/
	if(!flashMinor) flashMinor = 0; // if no minor version is specified, set it to 0.

	// Leave the following untouched unless you know what you're doing
	var hasFlash = false,
		hasActiveX = false,
		navPlugins = (navigator.plugins.length > 0),
		isIE = (navigator.appVersion.indexOf("MSIE") > -1),
		ieVer = parseFloat(navigator.appVersion.split("MSIE")[1]),
		isWin = (navigator.appVersion.indexOf("Windows") > -1),
		isMac = (navigator.appVersion.indexOf("Mac") > -1);
	
	// Variables that will later contain version information
	var fullVersion, majorVersion, minorVersion;
	
	if(navPlugins || (isIE && isMac && ieVer >= 5)) {	// Less than IE5 on the MAC have no plugins object
		var plugin = navigator.plugins["Shockwave Flash"];
		var pluginDescription = plugin.description.split(" ");
		for(var i=0; i<pluginDescription.length; i++) {
			if(!isNaN(parseInt(pluginDescription[i]))) {
				majorVersion = parseInt(pluginDescription[i]);
				minorVersion = parseInt(plugin.description.split("r")[1]);
				break;
			}
		}
		if(majorVersion >= flashVersion && minorVersion >= flashMinor) hasFlash = true;
	}
	else if(isWin && isIE) {
		document.write('<script language=VBScript\>\n');
		document.write('function isHere(chk)\n');
		document.write('  isHere = false\n');
		document.write('  on error resume next\n');
		document.write('  if ScriptEngineMajorVersion > 1 then\n');
		document.write('    isHere = IsObject(CreateObject(chk))\n');
		document.write('  end if\n');
		document.write('end function\n');
		document.write('</script\>');
	
		try {
			hasActiveX = isHere("msxml");
			if(!hasActiveX) hasActiveX = isHere("Microsoft.ActiveXPlugin.1");
		} catch(e) {
			hasActiveX = false;
		}
		if(hasActiveX) {
			for(var i=2; i<=flashVersion; i++) {
				if(isHere("ShockwaveFlash.ShockwaveFlash."+i)) majorVersion = i;
			}
		}
		minorVersion = 0;	// You cannot detect minor Flash plugin versions in IE on the PC, so cabversion specifies it in the <object> tag
		if(majorVersion >= flashVersion) hasFlash = true;
	}
	fullVersion = majorVersion+",0,"+minorVersion+",0";	// Can't be trusted in IE on the PC due to the minorVersion problem
	//-->
