
function siteproblem() {
   contact.htm.document.contact.Sujet.focus();
   contact.htm.document.contact.Sujet.value = "Problème sur le site";
}   

function printPage() { print(document); }

/*---------- Commande -----------------*/

function Ouverture(){
   document.Order.Date.value = Date(); 
   }

var StrPays;
var NumQteTot;
var NumPrixTot;
var NumPoidsTot;
var NumEmballage;
var NumPort;
var nombre;
var result;
var NumPayer;

function Calcul() {
   NumQte1 = parseFloat(document.Order.Qte1.value);
   NumQte2 = parseFloat(document.Order.Qte2.value);
   NumQteTot = NumQte1 + NumQte2;
   document.Order.QteTot.value = NumQteTot; 
   
   NumPrixUnit1 = parseFloat(document.Order.PrixUnit1.value);
   NumPrixUnit2 = parseFloat(document.Order.PrixUnit2.value);
   NumPrix1 = NumPrixUnit1 * NumQte1;
   NumPrix2 = NumPrixUnit2 * NumQte2; 
   document.Order.Prix1.value = NumPrix1;
   document.Order.Prix2.value = NumPrix2;
	  
   NumPrixTot = NumPrix1 + NumPrix2;	  
   document.Order.PrixTot.value = NumPrixTot;
   
   NumPoidsGr1 = parseFloat(document.Order.PoidsGr1.value);
   NumPoidsGr2 = parseFloat(document.Order.PoidsGr2.value);
   NumPoids1 = NumPoidsGr1 * NumQte1;
   NumPoids2 = NumPoidsGr2 * NumQte2;
   NumPoidsTot = NumPoids1 + NumPoids2;
   document.Order.Poids1.value = NumPoids1;
   document.Order.Poids2.value = NumPoids2;
   document.Order.PoidsTot.value = NumPoidsTot;
   
   StrPays = document.Order.Pays.value;
         
   if(NumPoidsTot >= 1 && NumPoidsTot <= 350 && StrPays == "BELGIQUE") {
   document.Order.Emballage.value = "1.15";
   document.Order.Port.value = "2.70";
   NumPrixTot = parseFloat(document.Order.PrixTot.value);
   NumEmballage = parseFloat(document.Order.Emballage.value);
   NumPort = parseFloat(document.Order.Port.value);
   NumPayer = NumPrixTot + NumEmballage + NumPort;
   nombre = NumPayer;
   result = Math.round(nombre * 100) / 100;
   document.Order.Payer.value = result;
   } else {document.Order.Emballage.value = "0";
           document.Order.Port.value = "0";		
           document.Order.Payer.value = "0";
		   }
		   
   if(NumPoidsTot >= 1 && NumPoidsTot <= 350 && StrPays != "BELGIQUE") {
   document.Order.Emballage.value = "1.15";
   document.Order.Port.value = "4.90";
   NumPrixTot = parseFloat(document.Order.PrixTot.value);
   NumEmballage = parseFloat(document.Order.Emballage.value);
   NumPort = parseFloat(document.Order.Port.value);
   NumPayer = NumPrixTot + NumEmballage + NumPort;
   nombre = NumPayer;
   result = Math.round(nombre * 100) / 100;
   document.Order.Payer.value = result;
   }
   
   if(NumPoidsTot >= 350 && NumPoidsTot <= 1000 && StrPays == "BELGIQUE") {
   document.Order.Emballage.value = "1.25";
   document.Order.Port.value = "2.70";
   NumPrixTot = parseFloat(document.Order.PrixTot.value);
   NumEmballage = parseFloat(document.Order.Emballage.value);
   NumPort = parseFloat(document.Order.Port.value);
   NumPayer = NumPrixTot + NumEmballage + NumPort;
   nombre = NumPayer;
   result = Math.round(nombre *100) / 100;
   document.Order.Payer.value = result;
   }
   
   if(NumPoidsTot >= 350 && NumPoidsTot <= 1000 && StrPays != "BELGIQUE") {
   document.Order.Emballage.value = "1.25";
   document.Order.Port.value = "9.10";
   NumPrixTot = parseFloat(document.Order.PrixTot.value);
   NumEmballage = parseFloat(document.Order.Emballage.value);
   NumPort = parseFloat(document.Order.Port.value);
   NumPayer = NumPrixTot + NumEmballage + NumPort;
   nombre = NumPayer;
   result = Math.round(nombre *100) / 100;
   document.Order.Payer.value = result;
   }
   
   if(NumPoidsTot >= 1001 && NumPoidsTot <= 2000 && StrPays == "BELGIQUE") {
   document.Order.Emballage.value = "1.35";
   document.Order.Port.value = "3.70";
   NumPrixTot = parseFloat(document.Order.PrixTot.value);
   NumEmballage = parseFloat(document.Order.Emballage.value);
   NumPort = parseFloat(document.Order.Port.value);
   NumPayer = NumPrixTot + NumEmballage + NumPort;
   nombre = NumPayer;
   result = Math.round(nombre *100) / 100;
   document.Order.Payer.value = result;
   }
   
   if(NumPoidsTot >= 1001 && NumPoidsTot <= 2000 && StrPays != "BELGIQUE") {
   document.Order.Emballage.value = "1.35";
   document.Order.Port.value = "26.00";
   NumPrixTot = parseFloat(document.Order.PrixTot.value);
   NumEmballage = parseFloat(document.Order.Emballage.value);
   NumPort = parseFloat(document.Order.Port.value);
   NumPayer = NumPrixTot + NumEmballage + NumPort;
   nombre = NumPayer;
   result = Math.round(nombre *100) / 100;
   document.Order.Payer.value = result;
   }
   window.print();  
}  

function control() {
   document.Order.Emballage.disabled = false;
   document.Order.Port.disabled = false;
   document.Order.Payer.disabled = false;
   }
   
function accepter() {
   alert("Le fait d'accepter cette commande implique que vous êtes d'accord avec les conditions de celle-ci");
   }
   
function controlorder() {

   if(document.Order.Nom.value == "") {
   alert("Veuillez entrer votre nom!");
   document.Order.Nom.focus();
   return false;
   }
   
   if(document.Order.Prenom.value == "") {
   alert("Veuillez entrer votre prénom!");
   document.Order.Prenom.focus();
   return false;
   }

   if(document.Order.Adresse.value == "") {
   alert("Veuillez entrer votre adresse!");
   document.Order.Adresse.focus();
   return false;
   }

   if(document.Order.CodePostal.value == "") {
   alert("Veuillez entrer votre code postal!");
   document.Order.CodePostal.focus();
   return false;
   }

   if(document.Order.Localite.value == "") {
   alert("Veuillez entrer votre localité!");
   document.Order.Localite.focus();
   return false;
   }

   if(document.Order.Email.value == "") {
   alert("Veuillez entrer votre E-mail!");
   document.Order.Email.focus();
   return false;
   }
   else
     return true;
}	 
   
 function controlmessage() {

   if(document.Contact.Nom.value == "") {
   alert("Veuillez entrer votre nom!");
   document.Contact.Nom.focus();
   return false;
   }
           
   if(document.Contact.Email.value == "") {
   alert("Veuillez entrer votre E-mail!");
   document.Contact.Email.focus();
   return false;
   }

   if(document.Contact.Sujet.value == "") {
   alert("Veuillez entrer votre Sujet!");
   document.Contact.Sujet.focus();
   return false;
   }

   if(document.Contact.Message.value == "") {
   alert("Veuillez entrer votre message!");
   document.Contact.Message.focus();
   return false;
   }
   else
     return true;
}  

/* -------- AteliersDistance.htm ------------*/

var Rouge;
var Orange;
var Jaune;
var Vert;
var Bleu;
var Indigo;
var Violet;
var result;
var NumPayer;

/* -------- Identification.htm ------------*/

var Color;
var Email;
var Passeword;

/* -------- Inscription.htm ------------*/

var Email;
var Passeword;
var PassewordBis;
var Nom;
var Prenom;
var Naisance;

function controlinscription() {

   if(document.Inscription.Email.value == "") {
   alert("Veuillez entrer votre Email!");
   document.Inscription.Email.focus();
   return false;
   }
   
   if(document.Inscription.Passeword.value == "") {
   alert("Veuillez entrer votre passeword!");
   document.Inscription.Passeword.focus();
   return false;
   }

   if(document.Inscription.PassewordBis.value == "") {
   alert("Veuillez entrer votre adresse!");
   document.Inscription.PassewordBis.focus();
   return false;
   }

   if(document.Inscription.Nom.value == "") {
   alert("Veuillez entrer votre code postal!");
   document.Inscription.Nom.focus();
   return false;
   }

   if(document.Inscription.Prenom.value == "") {
   alert("Veuillez entrer votre localité!");
   document.Inscription.Prenom.focus();
   return false;
   }

   if(document.Inscription.Naissance.value == "") {
   alert("Veuillez entrer votre E-mail!");
   document.Inscription.Naissance.focus();
   return false;
   }
   else
     return true;
}	 

/* -------- CopyrightYear ------------*/

var year;

function copyright() {
  year = 2009;
  document.yearform.yeartxt.focus();
  document.yearform.yeartxt.value= year;
  }  
  

     