/* Ici on définit le comportement de la barre horizontale du menu de chaque page */
<!--
Normal1 = new Image();
Normal1.src = "images/menu1.jpg";    
Highlight1 = new Image();
Highlight1.src = "images/menu_onmouse1.jpg";
Normal2 = new Image();
Normal2.src = "images/menu2.jpg";   
Highlight2 = new Image();
Highlight2.src = "images/menu_onmouse2.jpg";
Normal3 = new Image();
Normal3.src = "images/menu3.jpg";     
Highlight3 = new Image();
Highlight3.src = "images/menu_onmouse3.jpg";

function change_image(image_no,objet_image) {
 window.document.images[image_no].src = objet_image.src;
}

// Fonction vérifiant la pésence des données obligatoire dans tarif.php
function verifCommande()
{
	if(!document.commande.nom.value.length!=0 || !document.commande.adresse.value.length!=0 || !document.commande.cp.value.length!=0 || !document.commande.ville.value.length!=0 || !document.commande.courriel.value.length!=0)
	{
		alert('Veuillez remplir les champs obligatoires');
	}
	else{
		document.commande.submit();
		document.commande.reset();
	}
}


function CalculTotal()
{
	var total=0;
	// Catégorie 2
	if (document.commande.cat2.value==0) total=total+0.00;
	else
	{
		if (document.commande.cat2.value==48) total=total+24.00;
		else
		{
			if (document.commande.cat2.value==72) total=total+36.00;
			
			else total=total+60.00;
		}
	}
	
	// Catégorie 3
	if (document.commande.cat3.value==0) total=total+0.00;
	else
	{
		if (document.commande.cat3.value==48) total=total+20.00;
		else
		{
			if (document.commande.cat3.value==72) total=total+30.00;
			
			else total=total+50;
		}
	}
	
	// Catégorie 4
	if (document.commande.cat4.value==0) total=total+0.00;
	else
	{
		if (document.commande.cat4.value==48) total=total+16.00;
		else
		{
			if (document.commande.cat4.value==72) total=total+24.00;
			
			else total=total+40.00;
		}
	}
	
	// Catégorie 5
	if (document.commande.cat5.value==0) total=total+0.00;
	else
	{
		if (document.commande.cat5.value==48) total=total+15.00;
		else
		{
			if (document.commande.cat5.value==72) total=total+23.00;
			
			else total=total+37.00;
		}
	}
	
	document.commande.prix.value=total;
	document.commande.total.value=total;
}

//-->
