var cls_scroller = new Class({
	
	scrollerObjectName 	: null,
	scroller_up			: null,
	scroller_down		: null,
	scroller_area		: null,
	scroller_wait		: null,
	myFx				: null,
	options				: {
		speed: 15000,
		speedUp: null,
		speedDown: null
	},
	
	setOptions: function(){
		this.options = $merge.run([this.options].extend(arguments));
		if (!this.addEvent) return this;
		for (var option in this.options){
			if ($type(this.options[option]) != 'function' || !(/^on[A-Z]/).test(option)) continue;
			this.addEvent(option, this.options[option]);
			delete this.options[option];
		}
		return this;
	},
	
	initialize: function(id_scrollArea, id_up, id_down, options) {
		
		this.scroller_up 		= $(id_up);
		this.scroller_down 		= $(id_down);
		this.scroller_area 		= $(id_scrollArea);
		
		this.setOptions(options);
		this.options.speedDown = ($defined(this.options.speedDown)) ? this.options.speedDown : this.options.speed;
		this.options.speedUp = ($defined(this.options.speedUp)) ? this.options.speedUp : this.options.speed;
		
		this.scroller_up.addEvent('mouseover', function() { 

			var arr_scrollMax 	= this.scroller_area.getScrollSize();
			var arr_scroll 		= this.scroller_area.getScroll();
			var duration 		= Math.ceil(this.options.speedUp * arr_scroll.y / arr_scrollMax.y);
			
			this.myFx = new Fx.Scroll(this.scroller_area, {'duration' : duration}).toTop();
			
		}.bind(this));

		this.scroller_up.addEvent('mouseout', function() { 

			if (this.myFx != null) {
				this.myFx.cancel();
				this.myFx = null;
			}
		
		}.bind(this));
		
		this.scroller_down.addEvent('mouseover', function() { 
			
			var arr_scrollMax 	= this.scroller_area.getScrollSize();
			var arr_scroll 		= this.scroller_area.getScroll();
			var duration 		= Math.ceil(this.options.speedDown * (arr_scrollMax.y - arr_scroll.y) / arr_scrollMax.y);

			this.myFx = new Fx.Scroll(this.scroller_area, {'duration' : duration}).toBottom();
			
		}.bind(this));

		this.scroller_down.addEvent('mouseout', function() { 
			
			if (this.myFx != null) {
				this.myFx.cancel();
				this.myFx = null;
			}
			
		}.bind(this));

	}
	
});