// Insert Flash
// Creative Infusion Limited 24/11/2007
//
function InsertFlash(flashpath, nopath, width, height, requiredMajorVersion, requiredMinorVersion, requiredRevision)
{
	// Version check based upon the values passed
	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(
				"src", flashpath,
				"width", width,
				"height", height,
				"align", "middle",
				"id", "detectionExample",
				"quality", "high",
				"bgcolor", "#FDFAF2",
				"name", "detectionExample",
				"allowScriptAccess","sameDomain",
				"type", "application/x-shockwave-flash",
				'codebase', 'http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab',
				"pluginspage", "http://www.adobe.com/go/getflashplayer"
		);
	} else {  // flash is too old or we can't detect the plugin
		var alternateContent = '<img src="'+nopath+'" width="'+width+' height="'+height+'" usemap="#script" id="Image8">';
		document.write(alternateContent);  // insert non-flash content
	}
}
