var canPlayFlash = false;
var flashVersion = 6;
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]; 
	}
	var canPlayFlash = pluginVersion >= flashVersion;
} 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." & flashVersion)))\n');
	document.write('</scr' + 'ipt\> \n');
}

function display_flash(movie, width, height, alt)
{
	//var htmlVar = document.getElementById(id).innerHTML;
	if (canPlayFlash) {
		document.write('<object type="application/x-shockwave-flash" ');
		document.write('data="'+movie+'" ');
		document.write('width="'+width+'" ');
		document.write('height="'+height+'">');
		document.write('<param name="movie" value="'+movie+'" />');
		document.write('<param name="quality" value="high" />');
		document.write('<param name="wmode" value="opaque" />');
		document.write('</object>');
	} else {
		document.write(''+alt);
	}
}