



function createFlashObject(parentId, flashMovie, bgColor, width, height, params) {

	var MM_contentVersion = 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 MM_PluginVersion = words[i]; 
		}
		var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;

	} else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
	&& (navigator.appVersion.indexOf("Win") != -1)) {

		try {
			// Try 7 first, since we know we can use GetVariable with it
			var ax = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.7');
			flashVersion = getFlashVersion(ax.GetVariable('$version'));
		} catch (e) {
		      // Try 6 next, some versions are known to crash with GetVariable calls
		    try {
		      var ax = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');
		      MM_FlashCanPlay = '6.0.21';  // First public version of Flash 6
		    } catch (e) {
			  try {
		        // Try the default activeX
				var ax = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
				MM_FlashCanPlay = getFlashVersion(ax.GetVariable('$version'));
		      } catch (e) {
				 // No flash
		      }
		    }
		}
	}

	if (MM_FlashCanPlay) {
		var flashMovie = new SWFObject(flashMovie, parentId+"flash", width, height, "8.0.15", bgColor, true);
		flashMovie.addParam("allowScriptAccess", "always");
		flashMovie.addParam("allowFullScreen", "false");
		flashMovie.addParam("wmode", "transparent");
		if(params!==false) 
			flashMovie.addParam("FlashVars", params);
		flashMovie.write(parentId);

	
	} else {
		
		var message = '<p align="center"><a href="http://get.adobe.com/flashplayer/" target="_blank">'
					  + '<img src="/images/getFlashPlayer.jpg" alt="Get Adobe Flash Player" border="0" /></a></p>';

		//Only display the text message when there is enough room
		if(parseInt(width)>150 && parseInt(height)>100) 
			message = '<p align="center"><b>Some parts of this site require the adobe flash player,'
					  + '<br> please click the image below to install the flash player.</b></p>' + message;

		$(('#'+parentId)).html(message);

	}
}
