//external flash detection and write to page stuff
//  JavaScript for Detecting if user's browser has Flash (version 5)
var g_MM_FlashCanPlay = false;
var MM_contentVersion = 5;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) 
{
	var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	for (var i = 0; i < words.length; ++i)
	{
		if (isNaN(parseInt(words[i])))
			continue;
		var MM_PluginVersion = words[i]; 

	}
	g_MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
&& (navigator.appVersion.indexOf("Win") != -1)) 
{
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('g_MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}

//  Javascript to display the flash file
if ( g_MM_FlashCanPlay ) 
{	  
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ');
	document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" align="middle" ');
	document.write(' width="' + g_strFlashWidth + '" height="' + g_strFlashHeight + '" > ');
	var strMovieParam = '<param name="movie" value="' + g_strFlashFilePath + '">';
	document.write(strMovieParam);
	document.write('<param name="loop" value="false">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="scale" value="noborder">');
	document.write('<param name=bgcolor value="' + g_strFlashBackColor + '">'); 
	document.write('<embed src="' + g_strFlashFilePath + '" loop="false" quality="high" scale="noborder" bgcolor="' + g_strFlashBackColor + '" width="' + g_strFlashWidth + '" height="' + g_strFlashHeight + '" name="flash" ');
	document.write('pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" ');
	document.write('type="application/x-shockwave-flash" width="' + g_strFlashWidth + '" height="' + g_strFlashHeight + '">');
	document.write('</embed>');
	document.write('</object>');
}