tbimagea=new Array('LaMereZou-6734','LaMereZou-4937','LaMereZou-6733','LaMereZou-6533','LaMereZou-5141','LaMereZou-5106','LaMereZou-5060','LaMereZou-5024','LaMereZou-4996','LaMereZou-4977'); //tableau des image mettre le nom de toutes les images pour un diapo
tbimageb=new Array('LaMereZou-4926','LaMereZou-4939','LaMereZou-6656','LaMereZou-6448','LaMereZou-5140','LaMereZou-5075','LaMereZou-5046','LaMereZou-5028','LaMereZou-4983','LaMereZou-4957');
tbimagec=new Array('LaMereZou-4936','LaMereZou-4944','LaMereZou-6581','LaMereZou-6385','LaMereZou-5117','LaMereZou-5061','LaMereZou-5028','LaMereZou-5020','LaMereZou-4982','LaMereZou-4944');
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);
}
