	
	
	function flashDetect(siteRoot,swfFilePath,swfFileName,altImageFileName,altImageText,altImageHREF,width,height,bgcolor)
	{
			
			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
				{
				var xObj = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");	//CONTENT VERSION IS "6"
				if (xObj==null)
					MM_FlashCanPlay = false;
				else
					MM_FlashCanPlay = true;
				}
				catch (e)
				{
				MM_FlashCanPlay = false;
				}
			}
			
			if ( 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,0,0" ');
				document.write(' ID="' + swfFileName + '" WIDTH="'+ width + '" HEIGHT="' + height + '" ALIGN="">');
				document.write(' <PARAM NAME=movie VALUE="' + siteRoot + swfFilePath + swfFileName + '.swf"> <PARAM NAME=quality VALUE=best> <PARAM NAME=bgcolor VALUE=' + bgcolor + '>  '); 
				document.write(' <EMBED src="' + siteRoot + swfFilePath + swfFileName + '.swf" quality=best bgcolor=' + bgcolor );
				document.write(' swLiveConnect=FALSE WIDTH="' + width + '" HEIGHT="' + height + '" NAME="' + swfFileName + '" ALIGN=""');
				document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">');
				document.write(' </EMBED>');
				document.write(' </OBJECT>');
			} else{
				if (altImageHREF == ''){
					document.write('<IMG SRC="' + siteRoot + swfFilePath + altImageFileName + '" ALT="' + altImageText + '" WIDTH="' + width + '" HEIGHT="' + height + '" BORDER=0 align="top">');
					}
				else{
					document.write('<A HREF="' + siteRoot + altImageHREF + '" TITLE="' + altImageText + '"><IMG SRC="' + siteRoot + swfFilePath + altImageFileName + '" WIDTH="' + width + '" HEIGHT="' + height + '" align="top"></A>');
					}	
			}
	}



