var pict= new Array; var url= new Array; pict[0]="adu?p=74078212802268849"; url[0]="icone procédure de connexion"; //document.write(''); var iss; // Compteur pour le preLoad var nb_pictures=pict.length; // Le nombre d'image dans le tableau pictures var j = 0; // Compteur dans la fonction ChanceImage() var preLoad = new Array(); var width = 0; var height = 0; // Construction du tableau d'image preLoad. for (iss = 0; iss < nb_pictures; iss++) { preLoad[iss] = new Image(); preLoad[iss].src = pict[iss]; if (width < preLoad[iss].width) { width = preLoad[iss].width; width = width + 20; } if (height < preLoad[iss].height) { height = preLoad[iss].height; height = height + 20; } } //******************************************************** // Function ChangeImage() //******************************************************** // Description : À chaque fois que l'on change d'image cette fonction est appelée. function ChangeImage() { var x if (document.getElementById('bandeau_v')!= null) {document.getElementById('bandeau_v').style.width = width;}; if (document.getElementById('bandeau_h')!= null) {document.getElementById('bandeau_h').style.height = height;}; document.getElementById('bd_image1').style.width = width; document.getElementById('bd_image1').style.height = height; document.getElementById('bd_image2').style.width = width; document.getElementById('bd_image2').style.height = height; // Lorsqu'on est rendu au bout du tableau, on recommence à l'indice 1 if (j>=nb_pictures){ j=0; compteur=0;} //$("#img1").fadeOut("fast"); //$("#img1").hide(); document.images.img1.src = preLoad[j].src; //$("#img1").hide(); $("#img1").fadeIn("fast"); lien1=url[j]; j++; // Lorsqu'on est rendu au bout du tableau, on recommence à l'indice 1 if (j>=nb_pictures){ j=0; compteur=0;} //$("#img2").fadeOut("fast"); //$("#img2").hide(); document.images.img2.src = preLoad[j].src; //$("#img2").hide(); $("#img2").fadeIn("fast"); lien2=url[j]; j++; // Pause entre chaque changement d'image } window.onload = ChangeImage;