<!-- //
/*
* 
*/
function writeFlashTag(version, id, src, altsrc, width, height, bgcolor, scale, align, salign, quality, wmode, flashvars) {
		// Parse required version string into major and minor integer parts
		var versionParts = version.split(".");
		// Major version of Flash required
		var requiredMajorVersion = parseInt(versionParts[0]);
		// Minor version of Flash required
		var requiredMinorVersion = parseInt(versionParts[1]);
		// Revison of Flash required
		var requiredRevision = parseInt(versionParts[2]);
		// The version of JavaScript supported
		var jsVersion = 1.1;
			
		// Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
		var hasProductInstall = DetectFlashVer(6, 0, 65);
		// Version check based upon the values entered above in "Globals"
		var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
		// Location visited after installation is complete if installation is required (refresh)
		var MMredirectURL = window.location;
		// Stored value of document title used by the installation process to close the window that started the installation process
		// This is necessary to remove browser windows that will still be utilizing the older version of the player after installation is complete
		// DO NOT MODIFY THE FOLLOWING TWO LINES
		var MMdoctitle = document.title.slice(0, 47) + " - Flash Player Installation";
		
		// Check to see if a player with Flash Product Install is available and whather the version playbackmeets the requirements
		var renderTags;
		if (hasProductInstall && !hasReqestedVersion) {
			// Older Player - Express product installation (oe flash tags)
			document.title = MMdoctitle;
			renderTags = getFlashTag("FlashInstaller",
															 "ScriptLibrary/FlashIntegration/FlashInstaller.swf?MMredirectURL="+MMredirectURL+"&MMplayerType=ActiveX&MMdoctitle="+MMdoctitle,
															 "ScriptLibrary/FlashIntegration/FlashInstaller.swf?MMredirectURL="+MMredirectURL+"&MMplayerType=PlugIn",
															 width,
															 height,
															 "#3A6EA5",
															 "noscale",
															 align,
															 salign,
															 quality,
															 wmode,
															 "");
		} else if (hasReqestedVersion) {
			// Required Player Installed - Launch Content (oe flash tags)
			renderTags = getFlashTag(id, src, src, width, height, bgcolor, scale, align, salign, quality, wmode, flashvars);			
		} else {
		// Really Old Player - Manual product installation (linked alt image)
   	renderTags = '<a href="http://www.macromedia.com/go/getflash/" target="_blank" title="Get Flash">'
					+ '<img src="Templates/Global/images/noFlash.gif" border="0" alt="Get Flash">'
				+ '</a>'
		}
		
		// Write tags to document
		document.write(renderTags);
}
/* 
* 
*/
function getFlashTag(id, objetcsrc, embedsrc, width, height, bgcolor, scale, align, salign, quality, wmode, flashvars) {
	var oeTags = ''
	+ '<object '
		+ 'id="'+id+'" '
		+ 'width="'+width+'" '
		+ 'height="'+height+'" '
		+ 'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '
		+ 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
		+ '<param name="allowScriptAccess" value="sameDomain">'
		+ '<param name="swliveconnect" value="true">'
		+ '<param name="play" value="true">'
		+ '<param name="loop" value="false">'
		+ '<param name="menu" value="false">'
		+ '<param name="wmode" value="'+wmode+'">'
		+ '<param name="align" value="'+align+'">'
		+ '<param name="salign" value="'+salign+'">'
		+ '<param name="quality" value="'+quality+'">'
		+ '<param name="scale" value="'+scale+'">'
		+ '<param name="bgcolor" value="'+bgcolor+'">'
		+ '<param name="movie" value="'+objetcsrc+'">'
		+ '<param name="flashvars" value="'+flashvars+'">'
		+ '<embed '
			+ 'name="'+id+'" '
			+ 'width="'+width+'" '
			+ 'height="'+height+'" '
			+ 'type="application/x-shockwave-flash" '
			+ 'pluginspage="http://www.macromedia.com/go/getflashplayer" '
			+ 'allowScriptAccess="sameDomain" '
			+ 'play="true" '
			+ 'loop="false" '
			+ 'menu="false" '
			+ 'wmode="'+wmode+'" '
			+ 'align="'+align+'" '
			+ 'salign="'+salign+'" '
			+ 'quality="'+quality+'" '
			+ 'scale="'+scale+'" '
			+ 'bgcolor="'+bgcolor+'" '
			+ 'src="'+embedsrc+'" '
			+ 'flashvars="'+flashvars+'"'
		+ '></embed>'
	+ '</object>';
	/* DEBUG: alert(oeTags); */
	return oeTags;
}
// -->
