// JavaScript Document
function createFlashPlayer(player, w, h, id, file, wmode, bgColor, storyImage, storyHeading, story, section1title, section1link, section2title, section2link,  section3title, section3link , section4title, section4link){

// Check to see if the version meets the requirements for playback -- 
	//hasReqestedVersion = true;
	if (hasReqestedVersion) {
		// if we've detected an acceptable version
		// embed the Flash Content SWF when all tests are passed
		
		AC_FL_RunContent(
				"src", player,
				"width", w,
				"height", h,
				"align", "center",
				"id", id,
				"quality", "high",
				"bgcolor", "ffffff",
				"name", "slideshow",
				"allowScriptAccess","sameDomain",
				"allowFullScreen", "true",
				"type", "application/x-shockwave-flash",
				'codebase', 'http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab',
				"pluginspage", "http://www.adobe.com/go/getflashplayer",
				"base", ".",
				"scale", "default",
				"wmode", wmode,
				"FlashVars", file,
 "class", "video-embed"
	);

	
	} else {  // flash is too old or we can't detect the plugin
		var alternateContent = '<div class="vidNoScript" style="background-image: url('+storyImage+'); background-color: #'+bgColor+';"/><div class="section"><div class="sectionHeading">'+storyHeading+'</div><div class="story">'+story+'</div><div class="learnMore"><a title="LEARN MORE" href="'+section1link+'">LEARN MORE >></a></div></div><div class="flashPlayerLinks"><a title="'+section1title+'" href="'+section1link+'">'+section1title+'</a><a title="'+section2title+'" href="'+section2link+'">'+section2title+'</a><a title="'+section3title+'" href="'+section3link+'">'+section3title+'</a><a title="'+section4title+'" href="'+section4link+'">'+section4title+'</a></div></noscript>'
document.write(alternateContent);  // insert non-flash content
	}
}
