//D'autres scripts sur http://www.ToutJavaScript.com
//préchargement de images
//i1 = new Image;
//i1.src = "ban_jeux.gif";
//i1 = new Image;
//i1.src = "ban_pub.gif";
//i1 = new Image;
//i1.src = "ban_site.gif";


function disp(txt) {document.write(txt);}
// ne pas changer le nom 'banniere'
var banniere=new CreerBan('*** Merci de cliquer 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("http://action.metaffiliation.com/suivi.php?maff=S3CFA48562143","http://action.metaffiliation.com/suivi.php?mclic=S3CFA4856214","_blank",10);
banniere.Add("http://action.metaffiliation.com/suivi.php?maff=S3BD248562135","http://action.metaffiliation.com/suivi.php?mclic=S3BD248562135","_blank",10);
banniere.Add("http://ad.zanox.com/ppv/?6893685C1319889430","http://ad.zanox.com/ppc/?6893685C1319889430T","_blank",10);
banniere.Add("http://action.metaffiliation.com/suivi.php?maff=S41BBC485621B9","http://action.metaffiliation.com/suivi.php?mclic=S41BBC485621B9","_blank",10);


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() {
var aff="";
if (document.images) { for(var i=0;i<this.nb;i++){var gif=new preload(this[i].img)}}
disp(aff+"<BR><A href='javascript:pSngo()'><IMG name='pSnimg' src='"+this[0].img+"' alt='"+this.alt+"'></A>");
setTimeout("rotation()",this[0].delai*1000);
}
function rotation() {

banniere.no++; var no=banniere.no; if (no>=banniere.nb) {banniere.no=0; no=0}
// alert(no+" "+banniere[no].img+" ------"+document.anchors["tjsban"].href)
document.images["pSnimg"].src=banniere[no].img;
setTimeout("rotation()",banniere[no].delai*1000);
}
function pSngo() {
with(banniere[banniere.no]) {
if(target=="_blank"){window.open(href,"")} else {
if(target=="_top"){parent.window.location=href} else {
if(target=="_self"){window.location=href} else {
parent.frames[target].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];
}
}