// JavaScript Document function disp(txt) {document.write(txt);} // ne pas changer le nom 'banniere' var banniere=new CreerBan('Cliquez sur les bannières...'); // Definition des bannières Add(url de l'image, adresse associée à l'image, target, delai en secondes) // target est une chaine de caractères qui est soit : // 1- le nom de la frame qui va recevoir le site de la bannière // 2- "_blank" pour ouvrir une nouvelle fenêtre // 3- "_self" pour remplacer la bannière par son site // 4- "_top" pour supprimer toutes les frames et afficher le site en pleine page // Remarque : toutes les images ont la dimension de la première image affichée (sous netscape) // Il est préférable d'avoir toutes les images au meme format. banniere.Add("/img/fr/banniere/www.action2i.com.gif", "http://www.action2i.com", "_blank", 9); // 1 banniere.Add("/img/fr/banniere/www.action2i.com.gif", "http://www.action2i.com", "_blank", 9); // 1 banniere.Add("/img/fr/banniere/www.action2i.com.gif", "http://www.action2i.com", "_blank", 9); // 1 function CreerBan(alt) { this.nb=0; this.no=0; this.alt=alt; this.Add=AddBan; this.Init=InitBan; } function AddBan(img,href,target,delai) { var ban=new Object; ban.img=img; ban.href=href; ban.target=target; ban.delai=delai; this[this.nb]=ban; ++this.nb; } function InitBan() { if (document.images) { for(var i=0; i"+this.alt+""); setTimeout("rotation()", this[0].delai*1000); } function rotation() { ++banniere.no; var no=banniere.no; if (no>=banniere.nb) { banniere.no=0; no=0; } document.images["tjsimg"].src=banniere[no].img; setTimeout("rotation()", banniere[no].delai*1000); } function jumpLink() { with (banniere[banniere.no]) { if (target=="_blank") { window.open(href,""); } else if (target=="_top") { parent.window.location=href; } } } function preload() { this.length = preload.arguments.length; for (var i = 0; i < this.length; i++) { this[i+1] = new Image(); this[i+1].src = preload.arguments[i]; } }