// moock fpi [f.lash p.layer i.nspector] version: 1.3.5 written by colin moock
// adapted by mediaLINK - Version 1.2 - 08.07.2002


//-----system globals
var flash3Installed = false;
var flash4Installed = false;
var flash5Installed = false;
var flash6Installed = false;
var maxVersion = 6;
var actualVersion = 0;

//-----the detecting
function flashDetect(v,nfp){
	requiredVersion = v;
	noflashPage = nfp;

	//checking js1.1-capable-browsers for VB-Scripting
	if (parseInt(navigator.appVersion) >= 4){

		//browsercheck for ie/win
		var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
		var isWin = (navigator.appVersion.indexOf("Windows") != -1) ? true : false;

		//vbscript detection
		if (isIE && isWin){
			document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
			document.write('on error resume next \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'); // break up end tag so it doesn't end our script
		}


		//JavaScript detection
		if (navigator.plugins){
			if (navigator.plugins["Shockwave Flash"]){
				var flashVersion = parseInt(navigator.plugins["Shockwave Flash"].description.substring(navigator.plugins["Shockwave Flash"].description.indexOf(".")-1));		
				flash3Installed = flashVersion == 3;
				flash4Installed = flashVersion == 4;
				flash5Installed = flashVersion == 5;
				flash6Installed = flashVersion >= 6;

			}
		}
	
		//loop through all versions and setting actualVersion to highest detected version
		for (var i = 3; i <= maxVersion; i++) {	
			if (eval("flash" + i + "Installed") == true) actualVersion = i;
		}

		//action on query
		if (actualVersion >= requiredVersion) { 
		}else{
			wait = setTimeout("JavaScript:self.location.href = noflashPage",100);
		}


	}else{
		wait = setTimeout("JavaScript:self.location.href = noflashPage",100);
	}
}