var fenetre=false;



function tarata(contact,a,b,c){

//contact sera le nom du contact

//a doit être le nom

//b doit être le domaine

//c doit être le point quelque chose

document.getElementById("contact").value = contact;

document.getElementById("a").value = a;

document.getElementById("b").value = b;

document.getElementById("c").value = c;

document.EnvoyerCanasucre.submit();

}



function modelesswin(url)

{ 

  var ecrit=false;

  var mwidth=1024;

  var mwidthPlus=1039;

  var mheight=225;

  if (!fenetre) {fenetre = document.createElement("div");ecrit = true;}



		/*Table à importer dans le html pour éditer.

		<table border=0 cellpadding=0 cellspacing=0>

		<tr>

		  <td bgcolor="#CCCCFF"><img src="/All/Images/1pix.gif" width="2" height="2"></td>

		  <td bgcolor="#CCCCFF" class="TitreMenuDroite">Aide</td>

		  <td bgcolor="#CCCCFF" class="TitreMenuDroite" onclick="fenetre.style.display=\'none\';" style="cursor:hand;">X</td>

		  <td bgcolor="#CCCCFF"><img src="/All/Images/1pix.gif" width="2" height="2"></td>

		</tr>

		<tr>

		  <td bgcolor="#CCCCFF"><img src="/All/Images/1pix.gif" width="2" height="'+mheight+'"></td>

		  <td colspan="2">

		  <iframe id="fenmod" name="fenmod" height='+mheight+' width='+mwidth+' src="'+url+'">

		  </iframe>

		</td>

		  <td bgcolor="#CCCCFF"><img src="/All/Images/1pix.gif" width="2" height="'+mheight+'"></td>

		</tr>

		<tr>

		  <td bgcolor="#CCCCFF"><img src="/All/Images/1pix.gif" width="2" height="2"></td>

		  <td bgcolor="#CCCCFF"><img src="/All/Images/1pix.gif" width="'+mwidth+'" height="2"></td>

		  <td bgcolor="#CCCCFF"><img src="/All/Images/1pix.gif" width="15" height="2"></td>

		  <td bgcolor="#CCCCFF"><img src="/All/Images/1pix.gif" width="2" height="2"></td>

		</tr>

		</table>

		*/





// Variable de la table

		var mTable="";

		mTable=mTable + '<table border=0 cellpadding=0 cellspacing=0>';

		mTable=mTable + '<tr>';

		  mTable=mTable + '<td bgcolor="#CCCCFF"><img src="/All/Images/1pix.gif" width="2" height="2"></td>';

		  mTable=mTable + '<td bgcolor="#CCCCFF" class="TitreMenuDroite">Aide</td>';

		  mTable=mTable + '<td bgcolor="#CCCCFF" class="TitreMenuDroite" onclick="fenetre.style.display=\'none\';" style="cursor:hand;">X</td>';

		  mTable=mTable + '<td bgcolor="#CCCCFF"><img src="/All/Images/1pix.gif" width="2" height="2"></td>';

		mTable=mTable + '</tr>';

		mTable=mTable + '<tr>';

		  mTable=mTable + '<td bgcolor="#CCCCFF"><img src="/All/Images/1pix.gif" width="2" height="'+mheight+'"></td>';

		  mTable=mTable + '<td colspan="2">';

		  mTable=mTable + '<iframe id="fenmod" name="fenmod" height='+mheight+' width='+mwidth+' src="'+url+'">';

		  mTable=mTable + '</iframe>';

		mTable=mTable + '</td>';

		  mTable=mTable + '<td bgcolor="#CCCCFF"><img src="/All/Images/1pix.gif" width="2" height="'+mheight+'"></td>';

		mTable=mTable + '</tr>';

		mTable=mTable + '<tr>';

		  mTable=mTable + '<td bgcolor="#CCCCFF"><img src="/All/Images/1pix.gif" width="2" height="2"></td>';

		  mTable=mTable + '<td bgcolor="#CCCCFF"><img src="/All/Images/1pix.gif" width="'+mwidth+'" height="2"></td>';

		  mTable=mTable + '<td bgcolor="#CCCCFF"><img src="/All/Images/1pix.gif" width="15" height="2"></td>';

		  mTable=mTable + '<td bgcolor="#CCCCFF"><img src="/All/Images/1pix.gif" width="2" height="2"></td>';

		mTable=mTable + '</tr>';

		mTable=mTable + '</table>';

  //Affichage du contenu

  //fenetre.innerHTML='<table cellpadding=0 cellspacing=0 border=1 width='+mwidth+' height='+mheight+'><tr><td bgcolor="#0702ca" height=15 align="right"><span style="cursor:hand;background-color:#c0c0c0;width:13;height:13;font-size:14;font-family:verdana;font-weight:bold;" onclick="fenetre.style.display=\'none\';">X</span></td></tr><tr><td heigth=450 width=450><iframe id="fenmod" name="fenmod" height='+mheight+' width='+mwidth+' src="'+url+'"></iframe></td></tr></table>';

  fenetre.innerHTML=mTable;

  fenetre.style.top = 0;

  fenetre.style.left = 0;

  fenetre.style.position = "absolute";

  fenetre.style.display="block";

  if (ecrit) {document.body.insertBefore(fenetre);}

} 



function CheckForm()

{



		// contrôle avant envoi du formulaire

		if(document.inscription.prenom.value == "")

		{

			alert("Introduisez votre prénom SVP!");

			document.inscription.prenom.focus();

			return false;

		}



		if(document.inscription.nom.value == "")

		{

			alert("Introduisez votre nom SVP!");

			document.inscription.nom.focus();

			return false;

		}



		if(document.inscription.adresse.value == "")

		{

			alert("Introduisez SVP votre adresse exacte: rue et numéro!");

			document.inscription.adresse.focus();

			return false;

		}



	if(document.inscription.telephone.value == "")

		{

			alert("Introduisez SVP votre numéro de téléphone!");

			document.inscription.telephone.focus();

			return false;

		}    	



		if(document.inscription.npa.value == "")

		{

			alert("Introduisez le code postal SVP!");

			document.inscription.npa.focus();

			return false;

		}



		if(document.inscription.lieu.value == "")

		{

			alert("Introduisez votre localité SVP!");

			document.inscription.lieu.focus();

			return false;

		}



			/*if(document.inscription.pays.value == "")

		{

			alert("Introduisez votre pays SVP!");

			document.inscription.pays.focus();

			return false;

		}



			if(document.inscription.AnneeNaissance.value.length != 10)

		{

		alert("Introduisez votre année de naissance dans le format jj.mm.aaaa SVP!");

			document.inscription.AnneeNaissance.focus();

			return false;

		}*/

		

			if(document.inscription.email.value == "")

		{

		alert("Introdisez votre e-mail SVP!");

			document.inscription.email.focus();

			return false;

		}

		

			if(document.inscription.Statuts.checked == true)

		{

			document.inscription.Statuts.value="Oui";

		}

			else

		{

			alert("Vous devez accepter les statuts!");

			return false;

		}

		

		//demande une confirmation

		reponse = confirm("Voulez-vous vraiment envoyer votre demande d'inscription?");

		if(reponse == false)

			{

			alert ("Vous avez annulé votre inscription.");

			return false;

			}

}





function CheckCanasucre()

{



		// contrôle avant envoi du formulaire

		if(document.ContactCanasucre.Remarques.value == "")

		{

			alert("Vous devez saisir un texte!");

			document.ContactCanasucre.Remarques.focus();

			return false;

		}

		

			if(document.ContactCanasucre.email.value == "")

		{

		alert("Introduisez votre e-mail SVP!");

			document.ContactCanasucre.email.focus();

			return false;

		}





		//demande une confirmation

		reponse = confirm("Voulez-vous vraiment envoyer le texte?");

		if(reponse == false)

			{

			alert ("Vous avez annulé votre envoi");

			return false;

			}

}





function CheckQuestionsLundi()

{



		// contrôle avant envoi du formulaire

			if(document.question.prenom.value == "")

		{

		alert("Introduisez votre prénom SVP!");

			document.questions.prenom.focus();

			return false;

		}



			if(document.question.nom.value == "")

		{

		alert("Introduisez votre nom SVP!");

			document.questions.nom.focus();

			return false;

		}



			if(document.question.email.value == "")

		{

		alert("Introduisez votre e-mail SVP!");

			document.questions.email.focus();

			return false;

		}



		if(document.questions.Remarques.value == "")

		{

			alert("Vous devez saisir un texte!");

			document.questions.Remarques.focus();

			return false;

		}

		

		//demande une confirmation

		reponse = confirm("Voulez-vous vraiment envoyer votre question?");

		if(reponse == false)

			{

			alert ("Vous avez annulé votre envoi");

			return false;

			}

}


