	// -----------------------------------------------------------------------

	window.onload = function() {	
		setFooter();
	}
	window.onresize = function() {
		setFooter();
	}

	// -----------------------------------------------------------------------
	// OUVERTURE DE POP UP
	function openWindow(url, name, w, h, r, s, m,left, top) {
		popupWin = window.open(url, name, 'width=' + w + ',height=' + h + ',resizable=' + r + ',scrollbars=' + s + ',menubar=' + m + ',left=' + left + ',top=' + top);
	}
	// -----------------------------------------------------------------------
	// OUVERTURE DE POP UP
	function see2Image(url, w, h) {
		seeImage(url, w, h);
	}
	// -----------------------------------------------------------------------
	// OUVERTURE DE POP UP
	function seeImage(url, w, h) {
		percent=0;
		if(w>screen.availWidth){
			nw=screen.availWidth-100;
			percent=100*nw/w;
			nh=percent*h/100;
		}else{
			nw=w;
			nh=h;
		}
		if((h>screen.availHeight && percent==0) || (nh>screen.availHeight)){
			nh=screen.availHeight-100;
			percent=100*nh/h;
			nw=percent*w/100;
		}else{
			nw=w;
			nh=h;
		}		popupWin = window.open('popup.php?img='+url, 'image', 'width=' + nw + ',height=' + nh + ',resizable=no,scrollbars=no,menubar=no,left=0,top=0');
	}


	// -----------------------------------------------------------------------
	// MISE A JOUR PANIER
	function panierCalcul(){
		document.forms.panierForm.action.value="recalculer";
		document.forms.panierForm.submit();
	}
	// -----------------------------------------------------------------------
	// NAVIGATEUR
	IE4 = (document.all) ? 1 : 0;
	NS4 = (document.layers) ? 1 : 0;
	NS6= (document.getElementById&&!document.all) ? 1 : 0

	// -----------------------------------------------------------------------
	// AJOUT ADRESSE LIVRAISON
	function getLivraison(){
		if(document.forms.whoswho.same.checked){
			FORM2="<p>&nbsp;</p><table width=\"*\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">";
			FORM2+="<tr>";
			FORM2+="<td colspan=\"2\"><b class=\"title\">ADRESSE DE LIVRAISON</b></td>\n";
			FORM2+="</tr><tr>\n";
			FORM2+="<td>Nom *</td>\n";
			FORM2+="<td><input type=\"text\" name=\"Xnom\" size=\"65\"></td>\n";
			FORM2+="</tr><tr>\n";
			FORM2+="<td>Prénom *</td>\n";
			FORM2+="<td><input type=\"text\" name=\"Xprenom\" size=\"65\"></td>\n";
			FORM2+="</tr><tr>\n";
			FORM2+="<td>Adresse *</td>\n";
			FORM2+="<td><input type=\"text\" name=\"Xadresse1\" size=\"65\"></td>\n";
			FORM2+="</tr><tr>\n";
			FORM2+="<td>&nbsp;</td>\n";
			FORM2+="<td><input type=\"text\" name=\"Xadresse2\" size=\"65\"></td>\n";
			FORM2+="</tr><tr>\n";
			FORM2+="<td>Code&nbsp;postal *</td>\n";
			FORM2+="<td><input type=\"text\" name=\"Xcodepostal\" size=\"65\"></td>\n";
			FORM2+="</tr><tr>\n";
			FORM2+="<td>Ville *</td>\n";
			FORM2+="<td><input type=\"text\" name=\"Xville\" size=\"65\"></td>\n";
			FORM2+="</tr><tr>\n";
			FORM2+="<td>Pays *</td>\n";
			FORM2+="<td><input type=\"text\" name=\"Xpays\" size=\"65\"></td>\n";
			FORM2+="</tr></table>\n";
		}else{
			FORM2="";
		}
		if (IE4) {
			document.all.livraison.innerHTML = FORM2;
		}else if (NS4) {
			document.livraison.document.write (FORM2);
			document.livraison.document.close ();
		}else if (NS6) {
			document.getElementById("livraison").innerHTML = FORM2;
		}
	}


	// -----------------------------------------------------------------------
	// VALIDATION DU FORMULAIRE DES COORDONNEES
	function validwhoswho(){
		if(document.forms.whoswho.nom.value=="") {
			alert("Vous devez compléter votre nom !");
			document.forms.whoswho.nom.focus();
		}else if(document.forms.whoswho.prenom.value=="") {
			alert("Vous devez compléter votre prénom !");
			document.forms.whoswho.prenom.focus();
		}else if(document.forms.whoswho.adresse1.value=="") {
			alert("Vous devez compléter votre adresse !");
			document.forms.whoswho.adresse1.focus();
		}else if(document.forms.whoswho.codepostal.value=="") {
			alert("Vous devez compléter votre code postal !");
			document.forms.whoswho.codepostal.focus();
		}else if(checkNumerical(document.forms.whoswho.codepostal.value)) {
			alert("Votre code postal doit être sous forme numérique !");
			document.forms.whoswho.codepostal.focus();
		}else if(document.forms.whoswho.ville.value=="") {
			alert("Vous devez compléter votre ville !");
			document.forms.whoswho.ville.focus();
		}else if(document.forms.whoswho.pays.value=="") {
			alert("Vous devez compléter votre pays !");
			document.forms.whoswho.pays.focus();
		}else if(checkMail(document.forms.whoswho.email.value)) {
			alert("Vous devez donner une adresse email valide");
			document.forms.whoswho.email.focus();
		}else if(document.forms.whoswho.same.checked) {
			if(document.forms.whoswho.Xnom.value=="") {
				alert("Vous devez compléter le nom pour la livraison !");
				document.forms.whoswho.Xnom.focus();
			}else if(document.forms.whoswho.Xprenom.value=="") {
				alert("Vous devez compléter le prénom pour la livraison !");
				document.forms.whoswho.Xprenom.focus();
			}else if(document.forms.whoswho.Xadresse1.value=="") {
				alert("Vous devez compléter l'adresse pour la livraison !");
				document.forms.whoswho.Xadresse1.focus();
			}else if(document.forms.whoswho.Xcodepostal.value=="") {
				alert("Vous devez compléter le code postal pour la livraison !");
				document.forms.whoswho.Xcodepostal.focus();
			}else if(checkNumerical(document.forms.whoswho.Xcodepostal.value)) {
				alert("Votre code postal de livraison doit être sous forme numérique !");
				document.forms.whoswho.Xcodepostal.focus();
			}else if(document.forms.whoswho.Xville.value=="") {
				alert("Vous devez compléter la ville pour la livraison !");
				document.forms.whoswho.Xville.focus();
			}else if(document.forms.whoswho.Xpays.value=="") {
				alert("Vous devez compléter le pays pour la livraison !");
				document.forms.whoswho.Xpays.focus();

			}else{
				document.forms.whoswho.submit();
			}
		}else{
			document.forms.whoswho.submit();
		}
	}



	// -----------------------------------------------------------------------
	// VALIDATION DU FORMULAIRE CONTACT
	function validContact() {
		if(document.forms.addcontact.nom.value=="") {
			alert("Vous devez compléter votre nom !");
			document.forms.addcontact.nom.focus();
		}else if(document.forms.addcontact.prenom.value=="") {
			alert("Vous devez compléter votre prénom !");
			document.forms.addcontact.prenom.focus();
		}else if(checkMail(document.forms.addcontact.email.value)) {
			alert("Vous devez donner une adresse de courriel valide");
			document.forms.addcontact.email.focus();
		}else if(document.forms.addcontact.message.value=="") {
			alert("Vous devez écrire un message !");
			document.forms.addcontact.message.focus();
		}else{
			document.forms.addcontact.submit();
		}
	}


	// -----------------------------------------------------------------------
	// DEFINITION DU NAVIGATEUR
	var nava = (document.layers) ? 1 : 0;
	var dom = (document.getElementById) ? 1 : 0;
	var iex = (document.all) ? 1 : 0;

	// -----------------------------------------------------------------------
	// POSITIONNEMENT DU MODULE
	function positionModule(MC){
		XBarPosition=(screen.availWidth/2)-200+"px";
		if (nava) { 
			modMC = document[MC];
			modMC.left=XBarPosition;
		}else if (dom) { 
			modMC = document.getElementById(MC).style;
			modMC.left=XBarPosition;
		}else if (iex) { 
			modMC = [MC].style;
			modMC.left=XBarPosition;
		}
	}

	function hiddeModule(MC){
		if (nava) { 
			modMC = document[MC];
		}else if (dom) { 
			modMC = document.getElementById(MC).style;
		}else if (iex) { 
			modMC = [MC].style;
		}
		modMC.visibility="hidden";
	}
	// -----------------------------------------------------------------------
	// MISE EN PLEIN ECRAN
	try{		
		top.window.moveTo(0,0); 
	}
	catch(err) {
	}

	// -----------------------------------------------------------------------
	if (iex) { 
		try{
			top.window.resizeTo(screen.availWidth,screen.availHeight); 
		}
		catch(err) {
		}
	}else if (nava || dom) { 
		if (top.window.outerHeight < screen.availHeight || top.window.outerWidth < screen.availWidth) {
			top.window.outerHeight = top.screen.availHeight; 
			top.window.outerWidth = top.screen.availWidth; 
		}
	} 






	// VALIDATION DATE
	function checkDate(chaineDate) {
	   if (chaineDate != ""){
		   var ladate = (chaineDate).split("-")
		   if ((ladate.length != 3) || isNaN(parseInt(ladate[0])) || isNaN(parseInt(ladate[1])) || isNaN(parseInt(ladate[2]))) {
				return false;
			}else{
			   var unedate = new Date(eval(ladate[2]),eval(ladate[1])-1,eval(ladate[0]));
				var annee = unedate.getYear();
				if ((Math.abs(annee)+"").length < 4) {
					annee = annee + 1900;
				}
			  	if ((unedate.getDate() == eval(ladate[0])) && (unedate.getMonth() == eval(ladate[1])-1) && (annee == eval(ladate[2]))){
					return true;
				}else{
					return false;
				}
			}
		}
	}
	// -----------------------------------------------------------------------
	// VALIDATION D'UN EMAIL
	function checkMail(MAIL){
		var x = MAIL;
		var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if (filter.test(x)) {
			return false;
		}else{
			return true;
		}
	}

	// -----------------------------------------------------------------------
	// VALIDATION NUMERIQUE
	function checkNumerical(STR){
		var x = STR;
		var filter=/(^\d+$)|(^\d+\.\d+$)/
		if (filter.test(x)) {
			return false;
		}else{
			return true;
		}
	}
	// -----------------------------------------------------------------------
	// VALIDATION DU FORMULAIRE DE RESERVATION
	function validForm(){
		startevent=document.forms.WBform.startday.value+"-"+document.forms.WBform.startmonth.value+"-"+document.forms.WBform.startyear.value
		stopevent=document.forms.WBform.stopday.value+"-"+document.forms.WBform.stopmonth.value+"-"+document.forms.WBform.stopyear.value
		if(document.forms.WBform.nom.value==''){
			alert('ATTENTION !\nVous devez complÃ©ter votre nom.');
			document.forms.WBform.nom.focus();
		}else if(document.forms.WBform.telephone.value==''){
			alert('ATTENTION !\nVous devez complÃ©ter votre tÃ©lÃ©phone.');
			document.forms.WBform.telephone.focus();
		}else if(checkMail(document.forms.WBform.email.value)){
			alert('ATTENTION !\nVous devez entrer une adresse email valide.');
			document.forms.WBform.email.focus();
		}else if(checkDate(startevent)==false){
			alert('ATTENTION !\nVous devez entrer une date dÃ©part valide.');
		}else if(checkDate(stopevent)==false){
			alert('ATTENTION !\nVous devez entrer une date fin valide.');
		}else{
			document.forms.WBform.submit();
		}
	}