// -----------------------------------------------------------------------------
// Globals
// Major version of Flash required
var requiredMajorVersion = 7;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Minor version of Flash required
var requiredRevision = 0;
// -----------------------------------------------------------------------------

var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);

function displayFlashHeader() {
	// 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", _framework + "swf/logo_legenda",
					"width", "955",
					"height", "64",
					"quality", "high",
					"wmode", "transparent",
					"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 = 'This content requires the Adobe Flash Player. <a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
		document.write(alternateContent);  // insert non-flash content
	}
}

function displayFlashHeaderPegi() {
	// 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", _framework + "swf/logo_pegi_legenda",
					"width", "955",
					"height", "64",
					"quality", "high",
					"wmode", "transparent",
					"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 = 'This content requires the Adobe Flash Player. <a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
		document.write(alternateContent);  // insert non-flash content
	}
}

function displayCarrousel() {
	// 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", _framework + "swf/carrousel_v4?xmlFile=" + _framework + "cf/carrousel_xml.cfm",
			"width", "575",
			"height", "200",
			"quality", "high",
			"wmode", "transparent",
			"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 = 'This content requires the Adobe Flash Player. <a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
		document.write(alternateContent);  // insert non-flash content
	}
}

function displayMemorygame() {
	// 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", _framework + "swf/memory?path_to_images=" + _framework + "gfx/memory/",
			"width", "575",
			"height", "475",
			"quality", "high",
			"wmode", "transparent",
			"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 = 'This content requires the Adobe Flash Player. <a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
		document.write(alternateContent);  // insert non-flash content
	}
}

function displayBanner(movie) {
	// 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", _webfolder + "websites/" + _impl_name + "/gfx/banners/flash/" + movie,
			"width", "268",
			"height", "390",
			"quality", "high",
			"wmode", "transparent",
			"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 = 'This content requires the Adobe Flash Player. <a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
		document.write(alternateContent);  // insert non-flash content
	}
}

function displayRandomBanner() {
	// 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", _framework + "swf/random",
			"width", "200",
			"height", "100",
			"quality", "high",
			"wmode", "transparent",
			"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 = 'This content requires the Adobe Flash Player. <a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
		document.write(alternateContent);  // insert non-flash content
	}
}

function displayFAQ(id, movie) {
	// 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
		var obj = AC_FL_ReturnContent(
			"src", _webfolder + "websites/" + _impl_name + "/gfx/faq/" + movie,
			"width", "200",
			"height", "100",
			"quality", "high",
			"wmode", "transparent",
			"type", "application/x-shockwave-flash",
			"codebase", "http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab",
			"pluginspage", "http://www.adobe.com/go/getflashplayer"
		);
		document.getElementById(id).innerHTML = obj
	} else {  // flash is too old or we can't detect the plugin
		var alternateContent = 'This content requires the Adobe Flash Player. <a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
		document.getElementById(id).innerHTML = alternateContent
	}
}