var contentVersion = 6;
var canPlayFlash = false;
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 PluginVersion = words[i]; 
	}
	canPlayFlash = PluginVersion>=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('canPlayFlash = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}
	
function insertFlash(domobject, basedir, swf, width, height)
{
	domobject.innerHTML = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"" + width + "\" height=\"" + height + "\"><param name=\"base\" value=\"" + basedir + "\"><param name=\"movie\" value=\"" + basedir + "/" + swf + ".swf\"><param name=\"quality\" value=\"high\"><param name=\"wmode\" value=\"opaque\"><embed src=\"" + basedir + "/" + swf + ".swf\" quality=\"high\" pluginspage=\"https://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + width + "\" height=\"" + height + "\" wmode=\"opaque\" base=\"" + basedir + "\"></embed></object>";
}

function insertFlashVideo(domobject, strPlayer, strBasedir, strSwf, numWidth, numHeight)
{
	domobject.innerHTML = "<object "
							+ "classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" "
							+ "codebase=\"https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" "
							+ "width=\"" + numWidth + "\" height=\"" + numHeight + "\">"
							+ "<param name=\"movie\" value=\"" + strPlayer + "?clip=" + strBasedir + "/" + strSwf + "&wskin=ArcticExternalAll\">"
							+ "<param name=\"quality\" value=\"high\">"
							+ "<param name=\"wmode\" value=\"opaque\">"
							+ "<embed "
								+ "src=\"" + strPlayer + "?clip=" + strBasedir + "/" + strSwf + "&wskin=ArcticExternalAll\"" 
								+ "quality=\"high\" "
								+ "pluginspage=\"https://www.macromedia.com/go/getflashplayer\" "
								+ "type=\"application/x-shockwave-flash\" "
								+ "width=\"" + numWidth + "\" height=\"" + numHeight + "\" "
								+ "wmode=\"opaque\""
							+ "</embed>"
							+ "</object>";
}