tbimagea=new Array('LaMereZou-0208','LaMereZou-0364','LaMereZou-0298','LaMereZou-0315','LaMereZou-0302','LaMereZou-0275','LaMereZou-0481','LaMereZou-0449','LaMereZou-0286','LaMereZou-0376'); //tableau des image mettre le nom de toutes les images pour un diapo
tbimageb=new Array('LaMereZou-0379','LaMereZou-0319','LaMereZou-0294','LaMereZou-0274','LaMereZou-0373','LaMereZou-0299','LaMereZou-0247','LaMereZou-0443','LaMereZou-0324','LaMereZou-0473');
tbimagec=new Array('LaMereZou-0362','LaMereZou-0214','LaMereZou-0244','LaMereZou-0287','LaMereZou-0293','LaMereZou-0414','LaMereZou-0422','LaMereZou-0285','LaMereZou-0322','LaMereZou-0329');
preImages=new Array;

function precharge(){
var tbg = tbimagea.concat(tbimageb,tbimagec);  //tableau des tableau afin de precharger toutes les images en une fois preciser le nom de tous les tableaux
for (i = 0; i < tbg.length; i++){
    preImages[i] = new Image();
	preImages[i].src = 'images/'+tbg[i]+'.jpg';
	}
d1=new fondu('divconteneur',tbimagea,5000);  // preciser l'id du diapo , le nom du tableau  contenant le nom des image ainsi que la duree d'attente avant transition du diapo concerne
d2=new fondu('divconteneur2',tbimageb,3000);
d3=new fondu('divconteneur3',tbimagec,2000);
}

function fondu(ctn,tb,tps){			//a partir d'ici il n'y a plus rien a faire

if(navigator.appName.substring(0,3)=="Mic"){
this.Imagea=document.getElementById(ctn).childNodes[0];
this.Imageb=document.getElementById(ctn).childNodes[2];
}
else{
this.Imagea=document.getElementById(ctn).childNodes[1];
this.Imageb=document.getElementById(ctn).childNodes[3];
}
this.Tableau=tb;
this.temp=tps;
this.compteur=1;
this.opaa=0;
this.opab=100;
this.oxo=0;
this.defilmage();
}

fondu.prototype.defilmage = function(){

if(this.compteur==this.Tableau.length-1){
this.compteur=-1;
}
if(this.oxo==1){
this.compteur++;
this.opaa=10;
this.Imagea.src="images/"+this.Tableau[this.compteur]+".jpg";
this.oxo=0;
}
this.opaa+=3;
this.opab-=4;
if(document.all && !window.opera){
this.Imagea.style.filter = 'alpha(opacity=' + this.opaa + ');';
this.Imageb.style.filter = 'alpha(opacity=' + this.opab + ');';
}
else{
this.Imagea.style.opacity = this.opaa/100;
this.Imageb.style.opacity = this.opab/100;
}
if(this.opaa>=100){
this.opaa=10;
this.opab=100;
var xcc=this.Imagea.src.length-4;
var cxx=this.Imagea.src.lastIndexOf("/")+1;
var nomimg=this.Imagea.src.substring(cxx,xcc);
this.Imageb.src='images/'+nomimg+'.jpg';
this.oxo=1;
var lui=this;
setTimeout(function() { lui.defilmage(); },this.temp);
return false;
}
var lui=this;
setTimeout( function() { lui.defilmage(); }, 25 );
}

if(navigator.appName.substring(0,3)=="Mic"){
attachEvent("onload",precharge);
}
else{
addEventListener("load", precharge, false);
}