var mod_numer = new Class({	
		initialize: function(id){
		this.numer = 1;
		this.stop = 0;
		}
});

mod_numer.implement({
	zmien: function(){
		if(this.stop==0){
	 		this.numer=this.numer+1;
		}
		
	 	if(this.numer>4){this.numer=1;}
	
		for(i=1;i<5;i++){
			document.getElementById('ostatni_numer'+i).className='ostatni_numer_schowaj';
		}
		
		document.getElementById('ostatni_numer'+this.numer).className='ostatni_numer_pokaz';

	},
	
	wybrany: function(id){
		this.numer=id;
	
		for(i=1;i<5;i++){
			document.getElementById('ostatni_numer'+i).className='ostatni_numer_schowaj';
		}
	
		document.getElementById('ostatni_numer'+id).className='ostatni_numer_pokaz';
	},
	
	stopek: function(){
		if(this.stop==0){
			this.stop=1;
		}else{
			this.stop=0;
		}		
	}
	
});

var modul_numer = new mod_numer(1);

window.addEvent("domready", function () {
	var czas=5000;
	var przew=setInterval("modul_numer.zmien()",czas);

Body2 = document.getElementById('latest_number');
Body2.onmouseover=function(){
	modul_numer.stopek();
}		
Body2.onmouseout=function(){
	modul_numer.stopek();
}	
});