
var requiredMajorVersion = 9;
var requiredMinorVersion = 0;
var requiredRevision = 124;

f_addEvent (window, 'onload', onLoadMinigameFocus, false);

function onLoadMinigameFocus() {
	if (document.getElementById('MINIGAME'))
		document.getElementById('MINIGAME').focus();
}

function displayMinigame(game, code) {
	var hasProductInstall = DetectFlashVer(6, 0, 65);
	var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
	if ( hasProductInstall && !hasRequestedVersion ) {
		var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
		var MMredirectURL = window.location;
	    document.title = document.title.slice(0, 47) + " - Flash Player Installation";
	    var MMdoctitle = document.title;
		AC_FL_RunContent(
			"src", "playerProductInstall",
			"FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
			"width", "550",
			"height", "450",
			"align", "middle",
			"id", "MINIGAME",
			"quality", "high",
			"name", "MINIGAME",
			"allowScriptAccess","sameDomain",
			"type", "application/x-shockwave-flash",
			"pluginspage", "http://www.adobe.com/go/getflashplayer"
		);
	} else if (hasRequestedVersion) {
		AC_FL_RunContent(
				"src", game,
				"width", "550",
				"height", "450",
				"align", "middle",
				"id", "MINIGAME",
				"quality", "high",
				"wmode", "window",
				"name", "MINIGAME",
				"allowScriptAccess","sameDomain",
				"type", "application/x-shockwave-flash",
				"pluginspage", "http://www.adobe.com/go/getflashplayer",
				"flashvars", "gamecode=" + code
		);
	} else {
	    var alternateContent = 'Alternate HTML content should be placed here. '
	  	+ 'This content requires the Adobe Flash Player. '
	   	+ '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
	    document.write(alternateContent);
	}
}

