/*------Fct verifier le form commadner dvd------*/
function verif_form_contact()	{
	var nom="true";
	var prenom="true";
	var mail1="true";
	question="true";

	/*Nom*/
	if(document.form_contact.nom.value == "")  {
	   alert("Veuillez entrer votre nom !");
	   document.form_contact.nom.focus();
	   var nom="false";
	  }
	 if(document.form_contact.prenom.value == "") {/*Prenom*/
	   alert("Veuillez entrer votre prénom !");
	   document.form_contact.prenom.focus();
		prenom="false";
	  }
	/*Email*/
	 if(document.form_contact.email.value == "") {
	   alert("Veuillez entrer votre email !");
	   document.form_contact.email.focus();
		mail1="false";
	  }
	 if(document.form_contact.email.value.indexOf('@') == -1) {
	   alert("Veuillez entrer un email valide !");
	   document.form_contact.email.focus();
		mail1="false";
	  }

	  if(document.form_contact.question.value == "") {
	   alert("Veuillez entrer une question !");
	   document.form_contact.question.focus();
		question="false";
	  } 
	  if(nom=="true" && prenom=="true" && mail1=="true" && question=="true")	{

		document.form_contact.submit();
	  }
  
}


/*-----------------------------------Modifie le cookie de langue-------*/

function chang_lang(lang)	{
	var expDate = new Date()
	expDate.setTime(expDate.getTime() + (360 * 24 * 3600 * 1000))
        document.cookie = "lang=" + escape(lang)+ ";expires=" + expDate.toGMTString();
        /*alert("Ok js change lang");*/
        document.location.reload();

}

function chang_img(id, img)	{
	if(document.getElementById)	{
	/*alert("Ok js change lang ID "+id+" ||img : "+img);*/
		document.getElementById(id).src =""+img+"";
	      
	}
	else if(document.all)	{
		document.all[id].src =""+img+"";
	}
}


/*-----------------------------------Fonction pour le diaporama-----------------------*/
		function objet() {
		this.length = objet.arguments.length
		for (var i = 0; i < this.length; i++) this[i+1] = objet.arguments[i]
		}
		
		function fadOut() {
			new Effect.Fade('imgJean', 1);
			setTimeout("changer()", 1000);

		}
		function changer() {
			document.getElementById("imgJean").src = nom[numero];
			document.getElementById("imgJean").alt = alt[numero];
			document.images["imgJean"].alt=alt[numero];
			numero += 1;
			if (numero == nom.length + 1) numero = 1;
			setTimeout("fadIn()", 50);
		}
		function fadIn() {
			new Effect.Appear('imgJean', 1);
			setTimeout("fadOut()", 4000);
		}
		/*alert("ok fadeOut");*/
				/*alert("ok fadIn");
		function objet() {
			this.length = objet.arguments.length
			for (var i = 0; i < this.length; i++) this[i+1] = objet.arguments[i]
		}
		
		function fadOut() {

			new Effect.Fade('imgJean', 1);
			setTimeout("changer()", 1000);
		}

		function fadIn() {

			new Effect.Appear('imgJean', 1);
			setTimeout("fadOut()", 4000);
		}*/