tbimagea=new Array('FOTO11','FOTO12','FOTO13','FOTO14','FOTO15','FOTO16','FOTO17','FOTO18','FOTO21','FOTO22','FOTO23','FOTO24','FOTO25','FOTO26','FOTO27','FOTO28'); //tableau N°1
tbimageb=new Array('FOTO21','FOTO22','FOTO23','FOTO24','FOTO25','FOTO26','FOTO27','FOTO28'); //tableau vide
tbimaged=new Array(); //tableau vide
tbimagec=new Array(); //tableau vide
preImages=new Array;
function precharge(){
var tbg = tbimagea.concat(tbimageb,tbimagec,tbimaged); //tableau des tableaux pour préchargement
for (i = 0; i < tbg.length; i++){
preImages[i] = new Image();
preImages[i].src = 'PHOTOS_I/'+tbg[i]+'.jpg';
}
d1=new fondu('divconteneur1',tbimagea,2500); // id diapo , le nom du tableau contenant le nom des image, duree de transition
d2=new fondu('divconteneur2',tbimageb,1500);
d3=new fondu('divconteneur3',tbimagec,2000);
d4=new fondu('divconteneur4',tbimaged,1500);
}
function fondu(ctn,tb,tps){ //
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="PHOTOS_I/"+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;
this.Imageb.src=this.Imagea.getAttribute('src')
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);
}

