<!-- 

accueil1= new Image();
accueil1.src = "../1-php/images/bouton_accueil_1.gif";
accueil2 = new Image();
accueil2.src = "../1-php/images/bouton_accueil_2.gif";

produit1= new Image();
produit1.src = "../1-php/images/bouton_produit_1.gif";
produit2 = new Image();
produit2.src = "../1-php/images/bouton_produit_2.gif";

occasion1= new Image();
occasion1.src = "../1-php/images/bouton_occasion_1.gif";
occasion2 = new Image();
occasion2.src = "../1-php/images/bouton_occasion_2.gif";

systeme1= new Image();
systeme1.src = "../1-php/images/bouton_systeme_1.gif";
systeme2 = new Image();
systeme2.src = "../1-php/images/bouton_systeme_2.gif";

commander1= new Image();
commander1.src = "../1-php/images/bouton_commander_1.gif";
commander2 = new Image();
commander2.src = "../1-php/images/bouton_commander_2.gif";

faq1= new Image();
faq1.src = "../1-php/images/bouton_faq_1.gif";
faq2 = new Image();
faq2.src = "../1-php/images/bouton_faq_2.gif";

joindre1= new Image();
joindre1.src = "../1-php/images/bouton_joindre_1.gif";
joindre2 = new Image();
joindre2.src = "../1-php/images/bouton_joindre_2.gif";

informations1= new Image();
informations1.src = "../1-php/images/bouton_informations_1.gif";
informations2 = new Image();
informations2.src = "../1-php/images/bouton_informations_2.gif";

function flip(image,nouvelle) {
	document.images[image].src = eval(nouvelle + ".src");
	}

function openWindow(url,largeur,hauteur) {
	var top = (screen.availHeight/2) - (hauteur/2);
	var left = (screen.availWidth/2) - (largeur/2);
	popVid=open(url,"PFPop","width="+largeur+",height="+hauteur+",resize=yes,menubar=no,toolbar=no,status=no,scrollbars=no,top="+top+",left="+left);
	popVid.focus();
}


function isValidEmail(str) {
   return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
}

function isNumeric(sText)
{
   var ValidChars = "0123456789.-( )";
   var IsNumber=true;
   var Char;

 
   for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
         }
      }
   return IsNumber;
   
   }

function validateForm(formulaire){
	if((formulaire[0].value=='Prénom')||(formulaire[0].value=='')){
		alert('Le prénom est invalide.');
		//formulaire[0].focus(); 
		return false;
	}
	if((formulaire[1].value=='Nom de famille')||(formulaire[1].value=='')){
		alert('Le nom de famille est invalide.');
		//formulaire[1].focus(); 
		return false;
	}
	if((formulaire[2].value=='Adresse email')||(formulaire[2].value=='')||!isValidEmail(formulaire[2].value)){
		if((formulaire[2].value!='Adresse email')&&(formulaire[2].value!='')&&!isValidEmail(formulaire[2].value)){
			ex2 = ' : '+formulaire[2].value;
		}else{
			ex2 = '.';
		}
		alert('L\'adresse email est invalide'+ex2);
		formulaire[2].value='Adresse email';
		//formulaire[2].focus(); 
		return false;
	}
	//alert (tel);
	if((formulaire[3].value==tel)||(formulaire[3].value=='')||!isNumeric(formulaire[3].value)){
		if((formulaire[3].value!=tel)&&(formulaire[3].value!='')&&!isNumeric(formulaire[3].value)){
			ex3 = ' : '+formulaire[3].value;
		}else{
			ex3 = '.';
		}
		alert('Le numéro de téléphone est invalide'+ex3);
		formulaire[3].value=tel;
		//formulaire[3].focus(); 
		return false;
	}
	return true;
}

function validateFormFlyover(formulaire){
	if((formulaire[0].value=='0')){
		alert('S.V.P. veuillez choisir un pays.');
		formulaire[0].focus(); 
		return false;
	}
	if((formulaire[1].value=='Prénom')||(formulaire[1].value=='')){
		alert('Le prénom est invalide.');
		return false;
	}
	if((formulaire[2].value=='Adresse email')||(formulaire[2].value=='')||!isValidEmail(formulaire[2].value)){
		if((formulaire[2].value!='Adresse email')&&(formulaire[2].value!='')&&!isValidEmail(formulaire[2].value)){
			ex2 = ' : '+formulaire[2].value;
		}else{
			ex2 = '.';
		}
		alert('L\'adresse email est invalide'+ex2);
		formulaire[2].value='Adresse email';
		//formulaire[2].focus(); 
		return false;
	}
	//alert (tel);
	if((formulaire[3].value==tel)||(formulaire[3].value=='')||!isNumeric(formulaire[3].value)){
		if((formulaire[3].value!=tel)&&(formulaire[3].value!='')&&!isNumeric(formulaire[3].value)){
			ex3 = ' : '+formulaire[3].value;
		}else{
			ex3 = '.';
		}
		alert('Le numéro de téléphone est invalide'+ex3);
		formulaire[3].value=tel;
		//formulaire[3].focus(); 
		return false;
	}
	return true;
}


//<!-- START FLYOVER CODE -->

var flyInAds=new Array();var flyInIndex=new Array();function registerFlyIn(divId,startPos,stopPos,speed,pauseTime,delayTime,showPeriod,canShow){var newIndex=flyInAds.length;flyInIndex[divId]=newIndex;flyInAds[newIndex]=new FlyIn(divId);flyInAds[newIndex].audioStop();flyInAds[newIndex].startPos=startPos;flyInAds[newIndex].stopPos=stopPos;flyInAds[newIndex].speed=speed;flyInAds[newIndex].pauseTime=pauseTime;flyInAds[newIndex].delayTime=delayTime;flyInAds[newIndex].canShow=canShow;flyInAds[newIndex].showPeriod=showPeriod;}
function flyInOnLoad(){var totalFlyIns=flyInAds.length;for(i=0;i<totalFlyIns;i++){if(flyInAds[i].canShow){if(flyInAds[i].showPeriod>0){if(checkCookie(flyInAds[i].id,flyInAds[i].showPeriod)){flyInAds[i].start();}}
else{flyInAds[i].start();setCookie(flyInAds[i].id+"showNext",-1);}}}}
function flyInStart(divId){flyInAds[flyInIndex[divId]].start();}
function flyInStop(divId){flyInAds[flyInIndex[divId]].stop();}
function flyInResume(divId){flyInAds[flyInIndex[divId]].resume();}
function flyInClose(divId){flyInAds[flyInIndex[divId]].finished();}
function FlyIn(divId){this.id=divId;this.isPaused=false;this.hasPaused=false;this.flying=false;this.canShow=true;this.showPeriod=0;this.speed=1;this.startPos=1;this.stopPos=1;this.pauseTime=0;this.onshow=false;this.audioPlaying=false;this.isIE=false;this.startFlyIn=startFlyIn;this.startX=startX;this.startY=startY;this.move=moveFlyIn;this.moveRight=moveRight;this.moveLeft=moveLeft;this.moveUp=moveUp;this.moveDown=moveDown;this.moveSpiralIn=moveSpiralIn;this.moveSpiralOut=moveSpiralOut;this.start=startFlyIn;this.stop=stopFlyIn;this.resume=resumeFlyIn;this.pause=pauseFlyIn;this.unpause=unpauseFlyIn;this.finished=finished;this.startMove=startMove;this.audioPlay=audioPlay;this.audioStop=audioStop;if(window.innerWidth){this.documentWidth=window.innerWidth;}
else if((document.body)&&(document.body.clientWidth)){this.documentWidth=document.body.clientWidth;}
if(window.innerHeight){this.documentHeight=window.innerHeight;}
else if((document.body)&&(document.body.clientHeight)){this.documentHeight=document.body.clientHeight;}
this.isIE=(document.all&&document.getElementById);this.element=document.getElementById(this.id);this.width=parseInt(this.element.style.width);this.height=parseInt(this.element.style.height);this.xCentre=(this.documentWidth/2)-(this.width/2);this.yCentre=(this.documentHeight/2)-(this.height/2);this.aCos=new Array(360);this.aSin=new Array(360);for(var i=0;i<360;i++){this.aSin[i]=Math.sin(i*Math.PI/180);this.aCos[i]=Math.cos(i*Math.PI/180);}
function startFlyIn(){this.isPaused=false;this.hasPaused=false;this.flying=false;this.element.style.left=this.startX();this.element.style.top=this.startY();this.direction=this.startPos;this.radius=this.documentHeight-this.height;this.deg=0;var thisObj=this;var delay=setTimeout(function(){thisObj.startMove()},1000*this.delayTime);}
function startMove(){this.element.style.display='block';this.onshow=true;this.audioPlay();this.move();}
function startX(){switch(this.startPos){case 1:return(-this.width);break;case 2:return this.documentWidth;break;case 3:return this.xCentre;break;case 4:return this.xCentre;break;default:return(-this.width);break;}}
function startY(){switch(this.startPos){case 1:return this.yCentre;break;case 2:return this.yCentre;break;case 3:return(-this.height);break;case 4:return this.documentHeight;break;default:return this.yCentre;break;}}
function moveFlyIn(){if((!this.isPaused)){switch(this.direction){case 1:this.moveRight();break;case 2:this.moveLeft();break;case 3:this.moveDown();break;case 4:this.moveUp();break;case 5:this.moveSpiralIn();break;case 6:this.moveSpiralOut();break;default:this.moveLeft();break;}
if(this.onshow){var thisObj=this;this.flying=setTimeout(function(){thisObj.move()},10);}}}
function moveSpiralIn(){if(this.radius>0){var y=parseInt(this.radius*this.aSin[this.deg]);var x=parseInt(this.radius*this.aCos[this.deg]);this.element.style.left=(x+this.xCentre);this.element.style.top=(y+this.yCentre);this.deg+=this.speed;if(this.deg>=360)this.deg=0;if(this.deg%10==0)this.radius-=this.speed;}
else{this.pause();return;}}
function moveSpiralOut(){if(this.radius<this.documentHeight){var y=parseInt(this.radius*this.aSin[this.deg]);var x=parseInt(this.radius*this.aCos[this.deg]);this.element.style.left=(x+this.xCentre);this.element.style.top=(y+this.yCentre);if(this.deg<=0)this.deg=360;if(this.deg%10==0)this.radius+=this.speed;this.deg-=this.speed;}
else{this.finished();}}
function moveRight(){if(parseInt(this.element.style.left)<=this.documentWidth){this.element.style.left=(parseInt(this.element.style.left)+this.speed);if((!this.hasPaused)&&((parseInt(this.element.style.left)+(this.width/2))>=(this.documentWidth/2))){this.pause();return;}}
else{this.finished();}}
function moveLeft(){if((parseInt(this.element.style.left)+this.width)>=0){this.element.style.left=(parseInt(this.element.style.left)-this.speed);if((!this.hasPaused)&&((parseInt(this.element.style.left)+(this.width/2))<=(this.documentWidth/2))){this.pause();return;}}
else{this.finished();}}
function moveUp(){if((parseInt(this.element.style.top)+this.height)>=0){this.element.style.top=parseInt(this.element.style.top)-this.speed;if((!this.hasPaused)&&((parseInt(this.element.style.top)+(this.height/2))<=(this.documentHeight/2))){this.pause();return;}}
else{this.finished();}}
function moveDown(){if(parseInt(this.element.style.top)<=this.documentHeight){this.element.style.top=parseInt(this.element.style.top)+this.speed;if((!this.hasPaused)&&((parseInt(this.element.style.top)+(this.height/2))>=(this.documentHeight/2))){this.pause();return;}}
else{this.finished();}}
function stopFlyIn(){clearTimeout(this.flying);this.flying=false;}
function pauseFlyIn(){this.hasPaused=true;this.radius=0;this.direction=this.stopPos;if(this.pauseTime>0){this.stop();var thisObj=this;this.isPaused=setTimeout(function(){thisObj.unpause()},1000*this.pauseTime);}}
function unpauseFlyIn(){var thisObj=this.isPaused;clearTimeout(thisObj);this.isPaused=false;this.move();}
function resumeFlyIn(){if(!this.isPaused){this.move();}}
function finished(){this.onshow=false;this.element.style.display='none';this.stop();this.audioStop();}
function audioPlay(){if((!this.audioPlaying)&&(this.isIE)){if(el=document.getElementById(this.id+"_audio")){el.play();this.audioPlaying=true;}}}
function audioStop(){if((el=document.getElementById(this.id+"_audio"))&&(this.isIE)){el.stop();this.audioPlaying=false;}}}
function checkCookie(id,period){var now=new Date();fixDate(now);var canNextShow=getCookie(id+"showNext");if(canNextShow==null)canNextShow=0;if(canNextShow<=now.getTime()){canNextShow=now.getTime()+((24*60*60*1000)*period);now.setTime(now.getTime()+365*24*60*60*1000);setCookie(id+"showNext",canNextShow,now);return true;}
return false;}
function setCookie(name,value,expires,path,domain){var curCookie=name+"="+escape(value)+
((expires)?"; expires="+expires.toGMTString():"")+
((path)?"; path="+path:"")+
((domain)?"; domain="+domain:"");document.cookie=curCookie;}
function getCookie(name){var dc=document.cookie;var prefix=name+"=";var begin=dc.indexOf("; "+prefix);if(begin==-1){begin=dc.indexOf(prefix);if(begin!=0)return null;}
else{begin+=2;}
var end=document.cookie.indexOf(";",begin);if(end==-1)end=dc.length;return unescape(dc.substring(begin+prefix.length,end));}
function fixDate(date){var base=new Date(0);var skew=base.getTime();if(skew>0)
date.setTime(date.getTime()-skew);}
window.onload=flyInOnLoad;
function hideIt(objectID) {
	if (document.all) {
	document.all[objectID].style.visibility = 'hidden'
	} else {
		if (document.layers) {
		document.layers[objectID].visibility = 'hidden'
		} else {	
			if (document.getElementById) {
			document.getElementById(objectID).style.visibility = 'hidden'
			}
		}
	}
}

function showIt(objectID) {
	if (document.all) {
	document.all[objectID].style.visibility = 'visible'
	} else {
		if (document.layers) {
		document.layers[objectID].visibility = 'visible'
		} else {	
			if (document.getElementById) {
			document.getElementById(objectID).style.visibility = 'visible'
			}
		}
	}
}
//<!-- FINISH FLYOVER CODE -->

// -->