function AfficheFlash(){
      document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="700" height="250">');
      document.write('<param name="movie" value="img/CRGM.swf">');
      document.write('<param name="quality" value="high">');
      document.write('<embed src="img/CRGM.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="700" height="250"></embed>');
      document.write('</object>');
}
function AfficheFlashEn(){
      document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="700" height="250">');
      document.write('<param name="movie" value="img/CRGM_en.swf">');
      document.write('<param name="quality" value="high">');
      document.write('<embed src="img/CRGM_en.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="700" height="250"></embed>');
      document.write('</object>');
}
function SetPosition(){
var winW, winH;

	if (parseInt(navigator.appVersion)>3) {
		 if (navigator.appName=="Netscape") {
		  winW = window.innerWidth;
		  //winH = window.innerHeight;
		   winH = 197;
	 	 }
		 if (navigator.appName.indexOf("Microsoft")!=-1) {
		  winW = document.body.offsetWidth;
		  winH = 197;
		 }
	}
	winW=(winW-700)/2;
	document.getElementById("fleche").style.left=winW+180;
	document.getElementById("fleche").style.top=winH;
	//document.write("Window width = "+winW+"<br>"+"Window height = "+winH)
}
function ValidateForm(){
	var val, TheEmail, p, q;
	TheEmail=document.form1.courriel.value;
	p=TheEmail.indexOf('@');
	q=TheEmail.indexOf('.');
	val=false;
	if (document.form1.demande.value==''){
		val=true;
	}
	if (document.form1.courriel.value==''){
		val=true;
	}
	//if (document.form1.codepostal.value==''){
	//	val=true;
	//}		
	if (document.form1.genre[0].checked==false && document.form1.genre[1].checked==false){
		val=true;
	}
	if (document.form1.age[0].checked==false && document.form1.age[1].checked==false && document.form1.age[2].checked==false && document.form1.age[3].checked==false && document.form1.age[4].checked==false){
		val=true;
	}
	if (p<1 || p==(TheEmail.length-1)){
		alert('Votre adresse de courriel n\'est pas valide.');
		return false;
	}
	if (q<1 || q==(TheEmail.length-1)){
		alert('Votre adresse de courriel n\'est pas valide.');
		return false;
	}

	if (val==false){
		document.form1.submit()
		return true;
	}else{
		alert('Vous devez répondre aux questions obligatoires.');
		return false;
	}
}
function ValidateFormEn(){
	var val, TheEmail, p, q;
	TheEmail=document.form1.courriel.value;
	p=TheEmail.indexOf('@');
	q=TheEmail.indexOf('.');
	val=false;
	if (document.form1.demande.value==''){
		val=true;
	}
	if (document.form1.courriel.value==''){
		val=true;
	}
	//if (document.form1.codepostal.value==''){
	//	val=true;
	//}	
	if (document.form1.genre[0].checked==false && document.form1.genre[1].checked==false){
		val=true;
	}
	if (document.form1.age[0].checked==false && document.form1.age[1].checked==false && document.form1.age[2].checked==false && document.form1.age[3].checked==false && document.form1.age[4].checked==false){
		val=true;
	}
	if (p<1 || p==(TheEmail.length-1)){
		alert('Your email is not valid.');
		return false;
	}
	if (q<1 || q==(TheEmail.length-1)){
		alert('Your email is not valid.');
		return false;
	}
	
	if (val==false){
		document.form1.submit()
		return true;
	}else{
		alert('You must answer all mandatory fields.');
		return false;
	}
}
function SetIntervenant(){
	if (form1.Intervenant.checked==true){
		facultative.innerHTML="&nbsp;";
	}else{
		facultative.innerHTML = "<table width=\"90%\"  border=\"0\" cellspacing=\"0\" cellpadding=\"5\" class=\"textenoir\">" +
			  "<tr valign=\"top\">" +
				"<td colspan=\"2\" class=\"lienbleu\">Les questions qui suivent sont facultatives.<br>" +
				  "<strong>Mais en les compl&eacute;tant vous nous aiderez grandement &agrave; vous r&eacute;pondre au plus pr&egrave;s de vos besoins.</strong></td>" +
			  "</tr>" +
			  "<tr valign=\"top\">" +
				"<td colspan=\"2\">Dur&eacute;e du probl&egrave;me de jeu :</td>" +
			  "</tr>" +
			  "<tr valign=\"top\">" +
				"<td colspan=\"2\"><input name=\"duree\" type=\"radio\" value=\"moins de 1 an\">" +
				  "moins de 1 an " +
					"<br>" +
					"<input name=\"duree\" type=\"radio\" value=\"1 &agrave; 3 ans\">" +
					"1 &agrave; 3 ans " +
					"<br>" +
					"<input name=\"duree\" type=\"radio\" value=\"4 &agrave; 6 ans\">" +
					"4 &agrave; 6 ans " +
					"<br>" +
					"<input name=\"duree\" type=\"radio\" value=\"7 ans et plus\">" +
					"7 ans et plus " +
					"<br>" +
					"<input name=\"duree\" type=\"radio\" value=\"Je ne sais pas\">" +
					"Je ne sais pas</td>" +
			  "</tr>" +
			  "<tr valign=\"top\">" +
				"<td colspan=\"2\">&Eacute;valuation des pertes d&rsquo;argent par mois : </td>" +
			  "</tr>" +
			  "<tr valign=\"top\">" +
				"<td colspan=\"2\"> <input name=\"perte\" type=\"radio\" value=\"100 $ &agrave; 500 $\">" +
				  "100 $ &agrave; 500 $ " +
				  "<br>" +
				  "<input name=\"perte\" type=\"radio\" value=\"501 $ &agrave; 1 000 $\">" +
				  "501 $ &agrave; 1 000 $ " +
				  "<br>" +
				  "<input name=\"perte\" type=\"radio\" value=\"plus de 1 000 $\">" +
				  "plus de 1 000 $ " +
				  "<br>" +
				  "<input name=\"perte\" type=\"radio\" value=\"Je ne sais pas\">" +
				  "Je ne sais pas</td>" +
			  "</tr>" +
			  "<tr valign=\"top\">" +
				"<td colspan=\"2\">Probl&egrave;me(s) caus&eacute;s par le jeu :<br>" +
				  "(vous pouvez cocher plusieurs r&eacute;ponses)</td>" +
			  "</tr>" +
			  "<tr valign=\"top\">" +
				"<td colspan=\"2\"> <input name=\"probleme\" type=\"checkbox\" id=\"probleme\" value=\"financier\">" +
				  "financier<br>" +
				  "<input name=\"probleme\" type=\"checkbox\" id=\"probleme\" value=\"marital, relationnel\">" +
				  "marital, relationnel<br>" +
				  "<input name=\"probleme\" type=\"checkbox\" id=\"probleme\" value=\"sant&eacute; mentale\">" +
				  "sant&eacute; mentale<br>" +
				  "<input name=\"probleme\" type=\"checkbox\" id=\"probleme\" value=\"social\">" +
				  "social<br>" +
				  "<input name=\"probleme\" type=\"checkbox\" id=\"probleme\" value=\"travail\">" +
				  "travail<br>" +
				  "<input name=\"probleme\" type=\"checkbox\" id=\"probleme\" value=\"sant&eacute; physique\">" +
				  "sant&eacute; physique<br>" +
				  "<input name=\"probleme\" type=\"checkbox\" id=\"probleme\" value=\"l&eacute;gal\">" +
				  "l&eacute;gal</td>" +
			  "</tr>" +
			"</table>";
	}
}
