var ns4 = (document.layers)? true:false; // NS 4 var ie4 = (document.all)? true:false; // IE 4 var dom = (document.getElementById)? true:false; // NS 6 ou IE 5 var photos=new Array() var photoslink=new Array() var photoscomment = new Array() var videoslink=new Array() var videoscomment=new Array() var fenetre = new Array() var fenetre2 = new Array() var which=0 // Définition du chemin de l'image. Vous pouvez en mettre aurant que vous le désirez // Spécifiez si l'image doit être cliquable ou pas : 0 = non - 1 = oui var linkornot=1 // Spécifiez le nombre de photos affichées en simultané var nbmedias=3 // Inscrivez l'URL de chaque image entre les "". Ne le faire que si la variable ci-dessus est égale à 1 (linkornot=1) /* photos[0]="tn/PEGA000001_tn.jpg" photos[1]="tn/PEGA000002_tn.jpg" photos[2]="tn/PEGA000003_tn.jpg" photos[3]="tn/PEGA000004_tn.jpg" photos[4]="tn/PEGA000005_tn.jpg" photos[5]="tn/PEGA000006_tn.jpg" photos[6]="tn/PEGA000007_tn.jpg" photos[7]="tn/PEGA001303_tn.jpg" photos[8]="tn/PEGB001303_tn.jpg" photos[9]="tn/PEGC001303_tn.jpg" photoslink[0]="PEGA000001.jpg" photoslink[1]="PEGA000002.jpg" photoslink[2]="PEGA000003.jpg" photoslink[3]="PEGA000004.jpg" photoslink[4]="PEGA000005.jpg" photoslink[5]="PEGA000006.jpg" photoslink[6]="PEGA000007.jpg" photoslink[7]="PEGA001303.jpg" photoslink[8]="PEGB001303.jpg" photoslink[9]="PEGC001303.jpg" photoscomment[0]="ma photo 1" photoscomment[1]="ma photo 2" photoscomment[2]="ma photo 3" photoscomment[3]="ma photo 4" photoscomment[4]="ma photo 5" photoscomment[5]="ma photo 6" photoscomment[6]="ma photo 7" photoscomment[7]="ma photo 8" photoscomment[8]="ma photo 9" photoscomment[9]="ma photo 10" */ /* fenetre[0] = 0 fenetre[1] = 1 fenetre[2] = 2 fenetre[3] = 3 fenetre[4] = 4 fenetre[5] = 5 */ // NE RIEN EDITER AU-DESSOUS DE CETTE LIGNE. var preloadedimages=new Array() for (i=0;i0){ which-- applyeffect() document.images.photoslider.src=photos[which] playeffect() keeptrack() } } function forward(){ if (which i) { fenetre[i] = fenetre[i] - 1 applyeffect(i, effect) eval("document.images.photos" + i + ".src=photos[fenetre[i]]") eval("document.images.photos" + i + ".alt=photoscomment[fenetre[i]]") SetDivIdContent("photoscomment" + i, photoscomment[fenetre[i]].substring(0,36) + " ...") playeffect(i) } } which = fenetre[0] //keeptrack() } function backwardvid(){ var i = 0 for (i = 0; i < nbmedias; i++) { //alert(fenetre2[i]) if (fenetre2[i] > i) { fenetre2[i] = fenetre2[i] - 1 //applyeffect(i, effect) //eval("document.images.videos" + i + ".src=videos[fenetre2[i]]") eval("document.images.videos" + i + ".alt=videoscomment[fenetre2[i]]") SetDivIdContent("videoscomment" + i, videoscomment[fenetre2[i]].substring(0,36) + " ...") //playeffect(i) } } which = fenetre2[0] //keeptrack() } function forward(effect){ var i = 0 for (i = 0; i < nbmedias; i++) { if ( fenetre[i] < (photos.length - nbmedias + i)) { //alert("fenetre[i] " + fenetre[i]) //alert("photos[fenetre[i]] " + photos[fenetre[i]]) fenetre[i] = fenetre[i] + 1 applyeffect(i, effect) eval("document.images.photos" + i + ".src=photos[fenetre[i]]") eval("document.images.photos" + i + ".alt=photoscomment[fenetre[i]]") SetDivIdContent("photoscomment" + i, photoscomment[fenetre[i]].substring(0,36) + " ...") playeffect(i) } } which = fenetre[0] //keeptrack() } function forwardvid(){ var i = 0 for (i = 0; i < nbmedias; i++) { if ( fenetre2[i] < (videoslink.length - nbmedias + i)) { //alert("fenetre2[i] " + fenetre2[i]) //alert("videos[fenetre2[i]] " + videos[fenetre2[i]]) fenetre2[i] = fenetre2[i] + 1 //applyeffect(i, effect) //eval("document.images.videos" + i + ".src=videos[fenetre2[i]]") eval("document.images.videos" + i + ".alt=videoscomment[fenetre2[i]]") SetDivIdContent("videoscomment" + i, videoscomment[fenetre2[i]].substring(0,36) + "...") //playeffect(i) } } which = fenetre2[0] //keeptrack() } function forwardfast(){ for (i = 0; i < nbmedias; i++) forward(8) } function forwardfastvid(){ for (i = 0; i < nbmedias; i++) forwardvid() } function backwardfast(){ for (i = 0; i < nbmedias; i++) backward(9) } function backwardfastvid(){ for (i = 0; i < nbmedias; i++) backwardvid() } function first(){ for (i = 0; i < nbmedias; i++) { fenetre[i] = i if ( fenetre[i] < photos.length) { applyeffect(i, 3) eval("document.images.photos" + i + ".src=photos[fenetre[i]]") eval("document.images.photos" + i + ".alt=photoscomment[fenetre[i]]") SetDivIdContent("photoscomment" + i, photoscomment[fenetre[i]].substring(0,36) + " ...") playeffect(i) } } which = fenetre[0] //keeptrack() } function firstvid(){ for (i = 0; i < nbmedias; i++) { fenetre2[i] = i if ( fenetre2[i] < videoslink.length) { //applyeffect(i, 3) //eval("document.images.videos" + i + ".src=videos[fenetre2[i]]") eval("document.images.videos" + i + ".alt=videoscomment[fenetre2[i]]") SetDivIdContent("videoscomment" + i, videoscomment[fenetre2[i]].substring(0,36) + " ...") // playeffect(i) } } //which = fenetre2[0] //keeptrack() } function last(){ if (photos.length < nbmedias) first() else { for (i = 0; i < nbmedias; i++) { fenetre[i] = photos.length - nbmedias + i applyeffect(i, 2) eval("document.images.photos" + i + ".src=photos[fenetre[i]]") eval("document.images.photos" + i + ".alt=photoscomment[fenetre[i]]") SetDivIdContent("photoscomment" + i, photoscomment[fenetre[i]].substring(0,36) + " ...") playeffect(i) } } which = fenetre[0] //keeptrack() } function lastvid(){ if (videoslink.length < nbmedias) firstvid() else { for (i = 0; i < nbmedias; i++) { fenetre2[i] = videoslink.length - nbmedias + i //applyeffect(i, 2) //eval("document.images.videos" + i + ".src=videos[fenetre2[i]]") eval("document.images.videos" + i + ".alt=videoscomment[fenetre2[i]]") SetDivIdContent("videoscomment" + i, videoscomment[fenetre2[i]].substring(0,36) + " ...") //playeffect(i) } } //which = fenetre2[0] //keeptrack() } function transport(i){ new_window('popup-photos.asp?namephotos=' + photoslink[fenetre[i]]+ '&way=none' , '750', '720', '50', '100') } function transportvid(i){ //window.location=videoslink[fenetre2[i]] new_window('popup-videos.asp?url=' + videoslink[fenetre2[i]]+ '&comment=' + videoscomment[fenetre2[i]] , '500', '420', '250', '350') } function new_window(url, wid, hei, posx, posy) { mywin_9=window.open(url,'win_9','width=' + wid + ',height='+ hei + ', scrollbars=yes, left=' + posx + ', top=' + posy); //win_9.moveTo(posx, posY); } function SetDivIdContent(ID,Content) { if (dom) { document.getElementById(ID).innerHTML = Content; return; } if (ie4) { document.all[ID].innerHTML = Content; return; } if (ns4) { with (eval('document.'+ID+'.document')) { open(); write(Content); close(); } } }