
// SNIFFER STUFF

UseFlash = 0;
if (navigator.plugins && navigator.plugins.length > 0)
{
	if (navigator.plugins["Shockwave Flash"])
	{
		var plugin_version = 0;
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
		for (var i = 0; i < words.length; ++i)
		{
			if (isNaN(parseInt(words[i])))
			continue;
			plugin_version = words[i];
		}
		if (plugin_version >= 5)
		{
			var plugin = navigator.plugins["Shockwave Flash"];
			var numTypes = plugin.length;
			for (j = 0; j < numTypes; j++) 
			{
				mimetype = plugin[j];
				if (mimetype)
				{
					if (mimetype.enabledPlugin && (mimetype.suffixes.indexOf("swf") != -1)) {
						UseFlash = 1;
					}
					// Mac wierdness
					if (navigator.mimeTypes["application/x-shockwave-flash"] == null) {
						UseFlash = 0;
					}
				}
			}
		}
	}
}
var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;    // true if we're on ie
var isWin = (navigator.appVersion.indexOf("Windows") != -1) ? true : false; // true if we're on windows

var flashVersion = 0;
var flash2Installed = false;
var flash3Installed = false;
var flash4Installed = false;
var flash5Installed = false;
var flash6Installed = false;

if (isIE && isWin) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('flash2Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.2"))) \n');
	document.write('flash3Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3"))) \n');
	document.write('flash4Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');
	document.write('flash5Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n');  
	document.write('flash6Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6"))) \n');  
	document.write('</SCR' + 'IPT\> \n');
}

if (flash5Installed || flash6Installed) {
	UseFlash = 1;
	flashVersion = "5";
} 

if (flashVersion >=5) {
	UseFlash = 1
}

// Allow the cookie to override
if (document.cookie && (document.cookie.indexOf("FlashRenderOption=I") >= 0)) {
	UseFlash = 0;
}

if (UseFlash == 1 || (document.cookie.indexOf("FlashRenderOption=I") >= 0)) {
	// Use Flash player

} else {
	parent.location = "../error_page.html";
}

