function Scroller(element, upElement, downElement, increment, intervalTime)
{
	this.element = element;
	this.increment = increment;
	this.intervalTime = intervalTime;
	
	this.interval = "";
	this.pe = "";
	this.direction = "";
	
	this.upElement = upElement;
	this.downElement = downElement;
	
	this.start = startScroll;
	this.stop = stopScroll;
	this.scrollit = scrollBox;
	
	var _this = this;
	
	Event.observe( this.upElement, "mouseover", function(event) {
		_this.direction = -1;
		_this.start();														  
	});
	Event.observe( this.downElement, "mouseover", function(event) {
		_this.direction = 1;
		_this.start();														  
	});
	Event.observe( this.upElement, "mouseout", function(event) {
		_this.stop();														  
	});
	Event.observe( this.downElement, "mouseout", function(event) {
		_this.stop();														  
	});
}

function scrollBox( )
{
	var box = $( this.element );
	var desiredScroll = box.scrollTop + this.direction * this.increment;
	
	box.scrollTop = desiredScroll;

	if ( desiredScroll > 0 && box.scrollTop == 0 )
	{
		box.style.overflow = "auto";
		box.scrollTop = desiredScroll;
	}
}
	
function startScroll()
{
	var _this = this;
	this.interval = setInterval( function() { _this.scrollit() }, this.intervalTime );		
}

function stopScroll()
{
	clearInterval( this.interval );
}
