// JavaScript Document
<!--
/*****************************************************
 *                                                   *
 *              Flash Plugin Check v1.03             *
 *                                                   *
 *              Written by Steve Vachon              *
 *                  (a.k.a Prometh)                  *
 *                                                   *
 *              www.svachon.com/scripts              *
 *                                                   *
 *****************************************************/

/*
 In order to keep file size down, you may remove all
 comments in this file and the html file EXCEPT the
 above marquee.

 If you merge this file with your html file, you must
 include the marquee in that html document.

 http://www.gnu.org/licenses/gpl.txt

 To detect the minor player version in IE on the PC,
 it must be done from within the swf. Use this script:
 www.svachon.com/scripts/detect_flashversion.zip
*/


var targetMajor = 6;	// The major version you want to detect - mustn't contain decimals
var targetMinor = 0;	// The release number (example where 79 is the minor version: 6,0,79,0) - leave as 0 if uncertain

// 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 >= targetMajor && minorVersion >= targetMinor) 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<=targetMajor; 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 >= targetMajor) hasFlash = true;
}
fullVersion = majorVersion+",0,"+minorVersion+",0";	// Can't be trusted in IE on the PC due to the minorVersion problem
//-->