AC_FL_RunContent = 0;
DetectFlashVer = 0;

// Globals
// Major version of Flash required
var requiredMajorVersion = 9;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Revision of Flash required
var requiredRevision = 115;

function writeFlash(lang)
{
	var mId;
	if(lang=="fr")
	{
		mId = "main";
	}
	else
	{
		mId = "main_en";
	}
	
	if (AC_FL_RunContent == 0 || DetectFlashVer == 0) {
		alert("This page requires AC_RunActiveContent.js.");
	} else {
		var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
		if(hasRightVersion) {  // if we've detected an acceptable version
			// embed the flash movie
			AC_FL_RunContent(
					'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,45,0',
					'width', '900',
					'height', '600',
					'src', mId,
					'quality', 'best',
					'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
					'align', 'top',
					'play', 'true',
					'loop', 'true',
					'scale', 'showall',
					'wmode', 'opaque',
					'devicefont', 'false',
					'id', mId,
					'bgcolor', '#cedae5',
					'name', mId,
					'menu', 'true',
					'allowScriptAccess','always',
					'allowFullScreen','false',
					'movie', mId,
					'salign', ''
				); //end AC code
		} else {  // flash is too old or we can't detect the plugin
			var alternateContent;
			if(lang=="fr")
			{
				alternateContent = 'Ce site nécessite Flash Player pour fonctionner.'
				+ '<a href=http://www.macromedia.com/go/getflash/>Télécharger Flash</a>';
			}
			else
			{
				alternateContent = 'This website needs Flash Player to function properly.'
				+ '<a href=http://www.macromedia.com/go/getflash/>Download Flash</a>';
			}
			document.getElementById('content').innerHTML = (alternateContent);  // insert non-flash content
		}
	}
}