var scroll_credit = Class.create(); 
scroll_credit.prototype = {
	current:0,
	sObj : null,
	step:null,
	sObjHheight:0,
	pe:null,
	totalScroll:0,
	speed:0,
	initialize: function(name, step, speed) {
		this.step = step;
		this.sObj = $(name);
		this.sObjHheight = this.sObj.getHeight();
		this.speed = speed;
		this.totalScroll = Math.ceil(this.sObjHheight/Math.abs(step));
	},   
	
	run:function(){
		this.pe = new PeriodicalExecuter(this.scroll.bind(this), this.speed); 
	},
	scroll: function() {
		this.current = this.current % this.totalScroll;
		if(this.current == 0){
			this.sObj.setStyle({top:this.step});
		}
		new Effect.Move(this.sObj, { x: 0, y: this.step, mode: 'relative' }); 
		this.current ++;
	} 
};
