function showDiv(div)
{
	var element = div;
     document.getElementById(element).style.visibility="visible";
}
function hideDiv(div)
{
	var element = div;
     document.getElementById(element).style.visibility="hidden";
}
function hideAll()
{
	for(a = 0; a < 1000; a++) {
		var element= "produit"+a;
		document.getElementById(element).style.visibility="hidden";
	}
}

function effet(div){
	var element = div;
	var element = document.getElementById(element);
	if (Element.visible(element))
	{
		Effect.BlindUp(element);
	}
	else
	{
	//	Effect.BlindDown(element);
		Effect.BlindDown(element);
	}
}

function verifieFormulaireContact(texte){
var test=1;
var val=false;
var message=texte;

	if(document.forms['co'].nom.value=="" || document.forms['co'].email.value=="" || document.forms['co'].objet.value=="" || document.forms['co'].message.value==""){
			alert(message);
			test=0;
			val=false;
		}
	if(test==1){
		val=true;
		}
return val;
}

function verifieFormulaireAmie(texte){
var test=1;
var val=false;
var message=texte;

	if(document.forms['co'].nome.value=="" || document.forms['co'].emaile.value=="" || document.forms['co'].noma.value=="" || document.forms['co'].emaila.value=="" || document.forms['co'].message.value==""){
			alert(message);
			test=0;
			val=false;
		}
	if(test==1){
		val=true;
		}
return val;
}

function validation(texte) {

var val=false;
var message=texte;

// si le premier choix est vide...
if ( document.getElementById("tailleProduit").value == 0 ) 
{
window.alert(message);
val=false;
}
else {
val=true;
}
return val;
}

function changeimg() {
 			var ancimage = document.getElementById("image1").src;
 			
 			if( ancimage.substring(ancimage.lastIndexOf("/"), ancimage.length) == "/xs.gif"){
				document.getElementById("tailleProduit").value = 1;
  			 	document.getElementById("image1").src= ancimage.substring(0,ancimage.lastIndexOf("/"), ancimage.length)+"/xs2.gif";
				document.getElementById("image2").src= ancimage.substring(0,ancimage.lastIndexOf("/"), ancimage.length)+"/s.gif";
				document.getElementById("image3").src= ancimage.substring(0,ancimage.lastIndexOf("/"), ancimage.length)+"/m.gif";
				document.getElementById("image4").src= ancimage.substring(0,ancimage.lastIndexOf("/"), ancimage.length)+"/l.gif";
  			 } 
  			 else{
  			 	document.getElementById("image1").src= ancimage.substring(0,ancimage.lastIndexOf("/"), ancimage.length)+"/xs.gif";
				document.getElementById("tailleProduit").value = 0;
  			 }
		}
		function changeimg2() {
 			
 			var ancimage = this.document.getElementById('image2').src;
 			
 			if( ancimage.substring(ancimage.lastIndexOf("/"), ancimage.length) == "/s.gif"){
				this.document.getElementById("tailleProduit").value = 2;
  			 	this.document.getElementById('image2').src= ancimage.substring(0,ancimage.lastIndexOf("/"), ancimage.length)+"/s2.gif";
				this.document.getElementById('image1').src= ancimage.substring(0,ancimage.lastIndexOf("/"), ancimage.length)+"/xs.gif";
				this.document.getElementById('image3').src= ancimage.substring(0,ancimage.lastIndexOf("/"), ancimage.length)+"/m.gif";
				this.document.getElementById('image4').src= ancimage.substring(0,ancimage.lastIndexOf("/"), ancimage.length)+"/l.gif";
  			 } 
  			 else{
  			 	this.document.getElementById('image2').src= ancimage.substring(0,ancimage.lastIndexOf("/"), ancimage.length)+"/s.gif";
				this.document.getElementById("tailleProduit").value = 0;
  			 }
		}
		function changeimg3() {
 			
 			var ancimage = this.document.getElementById('image3').src;
 			
 			if( ancimage.substring(ancimage.lastIndexOf("/"), ancimage.length) == "/m.gif"){
				this.document.getElementById("tailleProduit").value = 3;
  			 	this.document.getElementById('image3').src= ancimage.substring(0,ancimage.lastIndexOf("/"), ancimage.length)+"/m2.gif";
				this.document.getElementById('image2').src= ancimage.substring(0,ancimage.lastIndexOf("/"), ancimage.length)+"/s.gif";
				this.document.getElementById('image1').src= ancimage.substring(0,ancimage.lastIndexOf("/"), ancimage.length)+"/xs.gif";
				this.document.getElementById('image4').src= ancimage.substring(0,ancimage.lastIndexOf("/"), ancimage.length)+"/l.gif";
  			 } 
  			 else{
  			 	this.document.getElementById('image3').src= ancimage.substring(0,ancimage.lastIndexOf("/"), ancimage.length)+"/m.gif";
				this.document.getElementById("tailleProduit").value = 0;
 
  			 }
		}
		function changeimg4() {
 			
 			var ancimage = this.document.getElementById('image4').src;
 			
 			if( ancimage.substring(ancimage.lastIndexOf("/"), ancimage.length) == "/l.gif"){
				this.document.getElementById("tailleProduit").value = 4;
  			 	this.document.getElementById('image4').src= ancimage.substring(0,ancimage.lastIndexOf("/"), ancimage.length)+"/l2.gif";
				this.document.getElementById('image2').src= ancimage.substring(0,ancimage.lastIndexOf("/"), ancimage.length)+"/s.gif";
				this.document.getElementById('image3').src= ancimage.substring(0,ancimage.lastIndexOf("/"), ancimage.length)+"/m.gif";
				this.document.getElementById('image1').src= ancimage.substring(0,ancimage.lastIndexOf("/"), ancimage.length)+"/xs.gif";
  			 } 
  			 else{
				 this.document.getElementById('image4').src= ancimage.substring(0,ancimage.lastIndexOf("/"), ancimage.length)+"/l.gif";
				 this.document.getElementById("tailleProduit").value = 0;
  			 }
		}
