var flashinstalled = 0;
var flashversion = 0;
MSDetect = "false";
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
	MSDetect = "true";

function WriteFlash(filename, w, h, other)
{
	if (other == '')
		other = "<div style='color: #FFF;'>If you are having troubles viewing this site, you may need to upgrade your Flash player.  To view this site, you will need to have Flash player version 8 or higher. For a free download of the most recent version of Flash, <a href='http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash' target='_blank'>click here</a>.</div>";

	if (flashinstalled == 2 && flashversion >= 8)
	{
		document.write('<object type="application/x-shockwave-flash" width="' + w + '" height="' + h + '" id="media" data="' + filename + '">');
		document.write('<param name="movie" value="' + filename + '" />');
		document.write('<param name="allowScriptAccess" value="sameDomain" />');
		document.write('<param name="quality" value="high" />');
		document.write('<param name="wmode" value="transparent" />');
		document.write('<param name="scale" value="noScale" />');
		document.write('<param name="salign" value="TL" />');
		document.write('<param name="FlashVars" value="playerMode=embedded" /></object>');
	}
	else
	{
		document.write(other);
	}
}
