// -------------------------------------------------------
// This is a slightly amended version of:
// http://www.kirupa.com/developer/mx/detection.htm
// (moock FPI always seemed a bit over-complex to me)
// ~ Matt Tarbit 06.09.05
// -------------------------------------------------------

var contentVersion = 7;

var isWinIE 	= (navigator.appVersion.indexOf("MSIE") != -1 && navigator.appVersion.indexOf("Windows") != -1) ? 1:0;
var hasPlugin 	= (navigator.plugins && navigator.plugins["Shockwave Flash"]) ? 1:0;
var flashOK		= 0;

if (isWinIE) {

	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); // hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('flashOK = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');

}

if (hasPlugin) {

	var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	for (i in words) {
		if (isNaN(parseInt(words[i]))) continue;
		var pluginVersion = words[i]; 
	}
	var flashOK = (pluginVersion >= contentVersion);

}

if (flashOK) {
	window.location.replace("flash.php");
} else {
	window.location.replace("html.php");
}