// JavaScript Document
	
	/*
		Parameters:
			swf 			= Specify the path and filename for the flash file (swf)
			width 			= Specify the width of the flash file
			height 			= Specify the height of the flash file
			noflash_image 	= Specify an image to display if flash is not installed or enabled
			image_width 	= Specify the image width
			image_height  	= Specify the image height
			image_alt 		= Specify the alt tag to add to the image
			dflash_link  	= Specify whether to include the downlaod flash link or not and what color (0 = no flash link, 1 = include white flash link, 2 = include blue flash link )
			image_href 		= Specify the url location if the alternate image should open a new window once clicked - optional
			loop			= Specify whether to loop the flash or play once (true/false)
	*/
	function insertFlash(swf, width, height, noflash_image, image_width, image_height, image_alt, dflash_link, image_href, loop) {
		
		<!--
			// -----------------------------------------------------------------------------
			// Globals
			// Major version of Flash required
			var requiredMajorVersion = 8;
			// Minor version of Flash required
			var requiredMinorVersion = 0;
			// Minor version of Flash required
			var requiredRevision = 0;
			// -----------------------------------------------------------------------------
		// -->
			
		// Version check based upon the values entered above in "Globals" (IE)
		var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
				
		// Check to see if the version meets the requirements for playback
		if (hasReqestedVersion) {
				
				// if we've detected an acceptable version
				// embed the Flash Content SWF when all tests are passed
				AC_FL_RunContent(
						'codebase', 'https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
						'src', swf,
						'width', width,
						'height', height,
						'quality', 'high',
						'pluginspage', 'https://www.macromedia.com/go/getflashplayer',
						//"pluginspage", "https://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash",
						'align', 'middle',
						'play', 'true',
						'loop', loop,
						'scale', 'exactfit',
						'wmode', 'opaque',
						'devicefont', 'false',
						'id', swf,
						'name', swf,
						'allowFullScreen', 'false',
						'allowScriptAccess','sameDomain',
						'movie', swf,
						'salign', ''
						); //end AC code
									
		} else {  // flash is too old or we can't detect the plugin
			
			if( typeof(image_href) == 'undefined' || image_href == '' ){
				var alternateContent = '<img src="'+ noflash_image +'" width="' + image_width + '" height="' + image_height + '" usemap="#script" border="0" title="' + image_alt + '">';
				if (dflash_link == 1){
					alternateContent = alternateContent + '<p style=" margin:4px 6px 5px 6px; font-family:Arial, Helvetica, sans-serif; font-size:11px; color: #ffffff">Download (FREE) <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank" style="font-family:Arial, Helvetica, sans-serif; font-size:11px; color: #ffffff">Flash Player</a> to see full version.</p>';
				}
				if (dflash_link == 2){
					alternateContent = alternateContent + '<p style="text-align: center; margin:0px 6px 10px 6px; font-family:Arial, Helvetica, sans-serif; font-size:11px; color: #005596">Download (FREE) <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank" style="font-family:Arial, Helvetica, sans-serif; font-size:11px; color: #005596">Flash Player</a> to see full version.</p>';
				}
			}
			else{
				var alternateContent = '<a target="_blank" href="' + image_href + '" alt="' + image_alt + '"><img src="'+ noflash_image +'" width="' + image_width + '" height="' + image_height + '" usemap="#script" border="1" title="' + image_alt + '"></a>';
				if (dflash_link == 1){
					alternateContent = alternateContent + '<p style=" margin:4px 6px 5px 6px; font-family:Arial, Helvetica, sans-serif; font-size:11px; color: #ffffff">Download (FREE) <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank" style="font-family:Arial, Helvetica, sans-serif; font-size:11px; color: #ffffff">Flash Player</a> to see full version.</p>';
				}
				if (dflash_link == 2){
					alternateContent = alternateContent + '<p style="text-align: center; margin:0px 6px 10px 6px; font-family:Arial, Helvetica, sans-serif; font-size:11px; color: #005596">Download (FREE) <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank" style="font-family:Arial, Helvetica, sans-serif; font-size:11px; color: #005596">Flash Player</a> to see full version.</p>';
				}				
			}
			
			document.write(alternateContent);  // insert non-flash content
		}

	}