var diaporama_catalogues_prospectus = new Array(
	new Array('catalogues_prospectus/stop_pub_bas.jpg','http://www.prospectuschezmoi.com/etiquette-stop-pub.php'),
	new Array('catalogues_prospectus/devenir_vendeur_a_domicile.jpg','http://www.prospectuschezmoi.com/lautoentrepreneur-prospectus.php')

	// ******** PENSEZ A RETIRER LA VIRGULE SUR LA DERNIERE LIGNE SINON LE PASSAGE ENTRE DIAPO NE FONCTIONNE PAS.	
	
	//EDITION 2010
	//new Array('catalogues_prospectus/fete_mamie_b.jpg','http://www.prospectuschezmoi.com/detail-prospectus.php')	
	//new Array('catalogues_prospectus/st_valentin_b.gif','http://www.prospectuschezmoi.com/moteur.php?evenement=St%20Valentin&goto=submit')
	//new Array('catalogues_prospectus/soldes_b.jpg','http://www.dgccrf.bercy.gouv.fr/actualites/soldes/soldes_hiver10.htm')
	//EDITION 2009
	//new Array('catalogues_prospectus/cadeaux_jouets_de_noel_2009.jpg','http://www.prospectuschezmoi.com/moteur.php?evenement=No%C3%ABl&goto=submit')
	//new Array('catalogues_prospectus/rentree2009_bas.gif','http://www.prospectuschezmoi.com/moteur.php?evenement=La%20Rentree&amp;goto=submit')
	//new Array('catalogues_prospectus/le_blanc2008.jpg','http://www.prospectuschezmoi.com/moteur.php?evenement=Le%20Blanc&goto=submit'),
	//new Array('catalogues_prospectus/repas_de_fetes.jpg','http://www.prospectuschezmoi.com/moteur.php?evenement=Repas%20de%20F&ecirc;tes&amp;goto=submit')
	
	);
	
function $(str){
	var obj;
	if(typeof(str) == "string"){
		return document.getElementById(str);
	}
	return undefined;
}

function chgImagePrecise(objImg, objLien, diaporama){
	var self = this;
	
	self.img = undefined;
	self.img = $(objImg);
	self.link = $(objLien);
	
	self.diaporama = diaporama;
	self.current = 0;
	self.interval = setInterval(function(){self.change();}, 7000);
	self.change();
}

chgImagePrecise.prototype.change = function(){
	var img;
	var nb_img=this.diaporama.length;

	this.current++;
	if(this.current >= nb_img) this.current=0;
	
	if (this.img) {
		if (this.img.filters && this.img.filters.length > 0) this.img.filters[0].apply();
		this.img.src = "images_fr/diaporama/" + this.diaporama[this.current][0];
		this.link.href = this.diaporama[this.current][1];
		if(this.img.filters && this.img.filters.length > 0) this.img.filters[0].play();
	}
}
