<html>
<SCRIPT type="text/javascript">
// ===== Constructeur de l'objet ====================
// ===== Constructeur de l'objet ====================
function cl_imgDia(id,time,imgPath,imgLink,txtText,txtLink){
this.id = id;
this.time = time;
this.index = 0;
this.imgPath = imgPath;
this.imgLink = imgLink;
this.txtText = txtText;
this.txtLink = txtLink;
this.imgNbr = this.imgPath.length;
// Méthode
this.startDia = startDia;
this.defilDia = defilDia;
this.filterDia = filterDia;
}
//======= Commence l'écriture de la dia =============
function startDia(){
if (document.images) {
document.write('<A id="link_'+this.id+'" HREF="#"><IMG id="img_'+this.id+'" id="name_'+this.id+'" SRC="./img/mini" BORDER=0 ALT=Menu style="filter:progid
XImageTransform.Microsoft.Pixelate(MaxSquare=100,Duration=1)"></A><BR><A id="linktext_'+this.id+'" href="./events.php"><FONT id="text_'+this.id+'">TEST</FONT></A>');
this.defilDia();
}
else{
document.write('<A id="link_'+this.id+'" HREF="#"><IMG SRC="./img/mini" BORDER=0></A><BR><A id="linkevent_diapo" href="./events.php"><FONT id="text_'+this.id+'">TEST A</FONT></A>');
}
}
//======= Defile les images ================
function defilDia(){
a++;
tempo3 = setTimeout("defilDia()",4000);
a = a % imgPath.length;
document.getElementById('text_'+'1').innerHTML = imgText[a];
document.getElementById('link_'+'1').href = imgPath[a];
document.getElementById('linktext_'+'1').href = imgText[a];
if (document.images){
name_img = 'name_'+a;
this.filterDia(eval('document.'+name_img));
document.getElementById('img_'+'1').src = imgPath[a];
}
}
function filterDia(img){
if(img && img.filters && img.filters[0]){
img.filters[0].apply();
img.filters[0].play();
}
}
</SCRIPT>
<SCRIPT type="text/javascript">
var imgPath = new Array();
var imgText = new Array();
var eventID = new Array();
var SiClickGoTo = new Array();
i0 = new Image();
i0.src = "./img/mini/4.jpg";
SiClickGoTo[0] = "./showphoto.php?img=4";
imgPath[0] = i0.src;
imgText[0] = "Texte 0";
eventID[0] = "3";
i1 = new Image();
i1.src = "./img/mini/8.jpg";
SiClickGoTo[1] = "./showphoto.php?img=8";
imgPath[1] = i1.src;
imgText[1] = "Texte 1";
eventID[1] = "4";
i2 = new Image();
i2.src = "./img/mini/3.jpg";
SiClickGoTo[2] = "./showphoto.php?img=3";
imgPath[2] = i2.src;
imgText[2] = "Texte 2";
eventID[2] = "3";
i3 = new Image();
i3.src = "./img/mini/2.jpg";
SiClickGoTo[3] = "./showphoto.php?img=2";
imgPath[3] = i3.src;
imgText[3] = "Texte 3";
eventID[3] = "4";
i4 = new Image();
i4.src = "./img/mini/3.jpg";
SiClickGoTo[4] = "./showphoto.php?img=3";
imgPath[4] = i4.src;
imgText[4] = "Texte 4";
eventID[4] = "4";
i5 = new Image();
i5.src = "./img/mini/7.jpg";
SiClickGoTo[5] = "./showphoto.php?img=7";
imgPath[5] = i5.src;
imgText[5] = "Texte 5";
eventID[5] = "3";
var a = 0;
</SCRIPT>
</HEAD>
<BODY>
<DIV style="border:1px solid black; float:left; ">
<SCRIPT language="JavaScript">
var event_1 = new cl_imgDia(1,4000,imgPath,SiClickGoTo,imgText,eventID);
event_1.startDia();
</SCRIPT>
</DIV>
</BODY>
</html>
Partager