var textChanger = {
	tmo_change_texte : null,
	delay : 6000,
	duration : 0.2,
	elems : [],
	current : -1,

	Init:function(Nb){
		this.elems = $$('.zoom');
		this.elems.each(function(item) { item.hide(); });
		this.Montre();
	},

	delayMontre : function() {
		this.tmo_change_texte = setTimeout("textChanger.Montre()", this.delay);
	},

	Montre : function(){
		if (this.current > -1){

		this.elems[this.current].fade({duration: this.duration });
			//this.elems[this.current].hide();
		}
		this.current = (this.current+1) % this.elems.length;
		this.elems[this.current].appear({duration: this.duration, from:0.0, to:1.0 });
		if(this.elems.length>1){
			this.delayMontre();
		}

	},

	Interrompre : function(){
		if (this.tmo_change_texte) {
		  clearTimeout(this.tmo_change_texte);
		}
	}

}
Event.observe(document, 'dom:loaded', textChanger.Init.bind(textChanger));


