// flash player detection script
// written by nils millahn, with inspiration from moock fpi at http://www.moock.org/webdesign/flash/detection/moockfpi/
function detectFlash(){	
	if (navigator.plugins){								// does navigator.plugins exist?
		if (navigator.plugins["Shockwave Flash"]){		// or flash 3+ installed?

			var flashDescription = navigator.plugins["Shockwave Flash"].description;
			var flashVersion = parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1));

			// we know the version, now set appropriate version flags
			flash5Installed = (flashVersion >= 5);
		}
	}
	
	// if we're on webtv, the version supported is 2 or 3 only
	if(navigator.userAgent.indexOf("WebTV") != -1) flash5Installed = false;	
	
	// we're finished getting the version. time to take the appropriate action
	if (flash5Installed || flash6Installed)
		window.location.replace(flashPage);
	else
		window.location.replace(noFlashPage);
}

detectFlash();	// call our detector now that it's safely loaded.	