<!--
var isSwfInstall = 0;
function smverte_embedSwf( _sDivId, _sSwfSource, _sFlashVars, _sSwfId, _nWidth, _nHeight, _sSwfWmode, _aFlashVersion/* [major,minor,revision]*/ ){
	
	var _sSwf = (_sSwfSource==null) ? "" : _sSwfSource; // sans extension .swf
	var _sVars = (_sFlashVars==null) ? "" : _sFlashVars;
	var _sId = (_sSwfId==null)? "PlayerCamera" : _sSwfId;
	var _nW = (_nWidth==null)? 200 : _nWidth;
	var _nH = (_nHeight==null)? 150 : _nHeight;
	var _sWmode = (_sSwfWmode==null) ? "opaque" : _sSwfWmode;
		
	// Major version 
		var requiredMajorVersion = 	(_aFlashVersion!=null && _aFlashVersion!=undefined) ? _aFlashVersion[0] : 6; // 9
	// Minor version 
		var requiredMinorVersion = 	(_aFlashVersion!=null && _aFlashVersion!=undefined) ? _aFlashVersion[1] : 0; // 0
	// Minor version
		var requiredRevision = 		(_aFlashVersion!=null && _aFlashVersion!=undefined) ? _aFlashVersion[2] : 65; // 115
	// Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
		var hasProductInstall = DetectFlashVer(6, 0, 65);	
	// Version check based upon the values defined in globals
		var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
	
	// alt content if flash not detected
		var alternateContent = "<div  style=\"background-color:#fff;border:1px grey solid;padding:3px;\"><p>Le plugiciel <b>« Flash "+requiredMajorVersion+"."+requiredMinorVersion+"."+requiredRevision+" »</b> n'est pas installé sur votre ordinateur.<br/><a href='http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash' target='_blank'>Cliquez ici pour le télécharger</a>.</p><p><b>Note pour les utilisateurs Macintosh:</b> Il se peut que vous deviez redémarrer votre ordinateur une fois l'installation terminée.</p></div>";
	
	// Check to see if a player with Flash Product Install is available and the version does not meet the requirements for playback
		if ( !hasRequestedVersion  && hasProductInstall) {
			
			/*// MMdoctitle is the stored document.title value used by the installation process to close the window that started the process
				 This is necessary in order to close browser windows that are still utilizing the older version of the player after installation has completed
				 DO NOT MODIFY THE FOLLOWING FOUR LINES
				 Location visited after installation is complete if installation is required 
			*/
				var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
				var MMredirectURL = window.location;
				document.title = document.title.slice(0, 47) + " - Flash Player Installation";
				var MMdoctitle = document.title;
			
			
			if(!isSwfInstall){// only prompt install 1 time
				isSwfInstall=true;
				if (isIE){
					smverte_doEmbedSwf(_sDivId, "/lib/v1/swf/playerProductInstall", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"", "installFlashPlayer", _nWidth, _nHeight, _sSwfWmode);
				}else{
					if (_sDivId!=null){
						document.getElementById(_sDivId).innerHTML = alternateContent;
					}else{
						return alternateContent;
					}
				}
			}
		}else if (hasRequestedVersion) { // if we've detected an acceptable version
			if (_sDivId!=null){
				smverte_doEmbedSwf(_sDivId, _sSwfSource, _sFlashVars, _sSwfId, _nWidth, _nHeight, _sSwfWmode);
			}else{
				return smverte_doEmbedSwf(_sDivId, _sSwfSource, _sFlashVars, _sSwfId, _nWidth, _nHeight, _sSwfWmode);
			}
			// embed the Flash Content SWF when all tests are passed
			
		} else {  // flash is too old or we can't detect the plugin
			if (_sDivId!=null){
				document.getElementById(_sDivId).innerHTML = alternateContent;
			}else{
				return alternateContent;
			}
		}
};
function smverte_doEmbedSwf( _sDivId, _sSwfSource, _sFlashVars, _sSwfId, _nWidth, _nHeight, _sSwfWmode, _aFlashVersion/* [major,minor,revision]*/ ){
	
	var _sSwf = (_sSwfSource==null) ? "" : _sSwfSource; // sans extension .swf
	var _sVars = (_sFlashVars==null) ? "" : _sFlashVars;
	var _sId = (_sSwfId==null)? "PlayerCamera" : _sSwfId;
	var _nW = (_nWidth==null)? 200 : _nWidth;
	var _nH = (_nHeight==null)? 150 : _nHeight;
	var _sWmode = (_sSwfWmode==null) ? "opaque" : _sSwfWmode;
	var _sEmbedHtml = "";
	
	if (_sSwfSource != ""){
		if (AC_FL_GetContent == 0) {
			alert('This page requires AC_RunActiveContent.js. In Flash, run Apply Active Content Update in the Commands menu to copy AC_RunActiveContent.js to the HTML output folder.');
			} else {
				/* Safari bug fix: must write someting to innerHTML and then "+=" the other content ;See following innerHTML assignment*/
				_sEmbedHtml +=  "<span style='display:none'>Radio-Canada.ca</span>"; 
				_sEmbedHtml +=  AC_FL_GetContent(
					'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0',
					'width', _nW,
					'height', _nH,
					'src', _sSwf,
					'movie', _sSwf,
					'quality', 'high',
					'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
					'align', 'middle',
					'play', 'true',
					'loop', 'true',
					'scale', 'showall',
					'wmode', _sWmode,
					'devicefont', 'false',
					'id', _sId,
					'bgcolor', '#000000',
					'name', _sId,
					'menu', 'true',
					'allowScriptAccess','always',
					'salign', '',
					'FlashVars',  _sVars
					); //end AC code
				
				if (_sDivId!=null){
					document.getElementById(_sDivId).innerHTML = _sEmbedHtml;
				}else{
					return  _sEmbedHtml;
				}
			}
	}
};
function smverte_writeFlashEmbed(_sEmbedhtml){
	document.write ( _sEmbedhtml  );
};

function smverte_checkEmail(email) {
    var filter = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
    if (filter.test(email)) {
        return true;
    } else {
        return false;
    }
}

function Decode(msg){
var DECRYPT = false;
var ClearMessage="";
ClearMessage += codeIt(msg);
document.write(ClearMessage);
} var key = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz1029384756><#].";
function codeIt (_message) {
var wTG;var mcH = key.length / 2;
var _newString = "";
var dv;
for (var x = 0; x < _message.length; x++) {
wTG = key.indexOf(_message.charAt(x));
if (wTG > mcH) {
dv = wTG - mcH;_newString += key.charAt(33 - dv);
} else {
if (key.indexOf(_message.charAt(x)) < 0) {
_newString += _message.charAt(x);
} else {
dv = mcH - wTG;
_newString += key.charAt(33 + dv);
}
}
}
return (_newString);
}


	function validateForm(objForm) {
		var msg = "";
		if (objForm.message.value == "Écrivez votre suggestion ici" || objForm.message.value == "") msg += "message" + "\n";
		if (objForm.nom.value == "") msg += "nom" + "\n";
		if (objForm.courriel.value == "") msg += "courriel" + "\n";
		if (objForm.ville.value == "") msg += "ville" + "\n";
		if (objForm.telephone.value == "") msg += "telephone" + "\n";
		
		if (msg != "") {
			alert("Les champs suivant sont obligatoire : " + "\n" + msg);
			return false;
		}
		
//if ( objForm.courriel.value.indexOf("@") == -1 || objForm.courriel.value.indexOf(".") == -1) {
		if ( !smverte_checkEmail(objForm.courriel.value) ){
			alert("Le champs courriel doit être un courriel valide.");
			return false;
		}
	}


function valideForm(f) { /// formualire ImageVautMilleMots
	if (f.prenom_nom.value == "" || f.adresse.value == "" || f.ville_province.value == "" || f.code_postal.value == "" || f.telephone.value == "" || f.courriel.value == "" || f.fichier_image.value == "" || f.description.value == "") {
		alert ("Veuillez remplir tous les champs du formulaire.");
		f.focus();
		return false;
	}
	if ( !smverte_checkEmail(f.courriel.value) ){
		alert("Le champs courriel doit être un courriel valide.");
		f.courriel.focus();
		return false;
	}
	if (!f.ceder_droits.checked) {
		alert ("Veuillez cocher la case attestant que vous avez pris connaissance de l'avis juridique et que vous consentez à vous y conformer.");
		f.ceder_droits.focus();
		return false;
	}
	return true;
};


function clearDefault(el) {
  if (el.defaultValue==el.value) el.value = ""
}	

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function go(Quiz) {
	window.location.href = value;
}


function cmdParticiper_onclick() {
        with (document.frmMain) {
                if (hdTousLesChoix.value == "CHECKED") {
                        var bGood;
                        if (hdIDQuestion.value) {
                                bGood = false;
                                for (var lReponse = 0; lReponse < eval("optBonneReponse" + hdIDQuestion.value.toString() + ".length"); ++lReponse) {
                                        if (eval("optBonneReponse" + hdIDQuestion.value.toString() + "[lReponse].checked")) {
                                                bGood = true;
                                        }
                                }
                                if (!bGood) {
                                        alert ("Vous n'avez pas répondu à toutes les questions!");
                                        return false;
                                }
                        } else {
                                for (var lQuestion = 0; lQuestion < hdIDQuestion.length; ++lQuestion) {
                                        bGood = false;
                                        for (var lReponse = 0; lReponse < eval("optBonneReponse" + hdIDQuestion[lQuestion].value.toString() + ".length"); ++lReponse) {
                                                if (eval("optBonneReponse" + hdIDQuestion[lQuestion].value.toString() + "[lReponse].checked")) {
                                                        bGood = true;
                                                }
                                        }
                                        if (!bGood) {
                                                alert ("Vous n'avez pas répondu à toutes les questions!");
                                                return false;
                                        }
                                }
                        }
                }

                var dtToday = new Date();
                var dtConcourDateDebut, dtConcourDateFin;
                dtConcourDateDebut = new Date(hdConcourDateDebut.value);
                dtConcourDateFin = new Date(hdConcourDateFin.value);

                if (dtToday >= dtConcourDateDebut && dtToday <= dtConcourDateFin) {
                        if (edPrenom.value == "" || edNom.value == "" || edEMail.value == "" || edTelephone.value == "" || edAge.value == "") {
                                alert ("Pour enregistrer votre participation, veuillez remplir tous les champs du formulaire svp.");
                                return false;
                        }
              }
				
				return true;
        }
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

-->
