// JavaScript Document


document.observe("dom:loaded", function(){
										
	var updater = Class.create({
		initialize: function(divToUpdate, interval, file) {
			
		this.slideCounter = 0;
		this.slideMax = 1;		
		this.tgt = $("mascheraMover");
			
			this.divToUpdate = divToUpdate;
			this.interval = interval;
			this.file = file;
			new PeriodicalExecuter(this.getUpdate.bind(this), this.interval);
		},
		
		getUpdate: function() {
			
			if(this.slideCounter < this.slideMax){
				new Effect.Move(this.tgt, { x: -780 });	
				this.slideCounter++
			} else {
			new Effect.Move(this.tgt, { x: (780*1) });
			this.slideCounter = 0	
			}
			
		}
	});


 var visitorCounter = new updater('counter', 7, 'countVisitors.php'); 
     visitorCounter.getUpdate();


});										