function checkFlash()
{
	var flashinstalled = 0;
	var flashversion = 0;


	if (navigator.plugins && navigator.plugins.length)
	{
		x = navigator.plugins["Shockwave Flash"];
		if (x)
		{
			flashinstalled = 2;
			if (x.description)
			{
				y = x.description;
				flashversion = y.charAt(y.indexOf('.')-1);
			}
		}
		else
			flashinstalled = 1;
		if (navigator.plugins["Shockwave Flash 2.0"])
		{
			flashinstalled = 2;
			flashversion = 2;
		}
	}
	else if (navigator.mimeTypes && navigator.mimeTypes.length)
	{
		x = navigator.mimeTypes['application/x-shockwave-flash'];
		if (x && x.enabledPlugin)
			flashinstalled = 2;
		else
			flashinstalled = 1;
	}
	else
	{
		for(var i=7; i>0; i--){
			flashversion = 0;
			try{
				var flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i);
				flashversion = i;
				return;
			}
			catch(e){
			}
		}
	}

	if (flashinstalled < 2)
	{
		if (confirm('We have detected that you don\'t currently have Macromedia Flash Player installed on your computer.\n\nClick OK to be redirected to the download page for Macromedia Flash Player.')) 
		{
			document.location.href = 'http://www.macromedia.com/go/getflashplayer';
		}
	}
}

checkFlash();