function Scroller(containerID, contentID, arrowUpID, arrowDownID)
{
	this.alphaOn = 1.0;
	this.alphaOff = 0.5;
	//
	this.timer = null;
	this.timeout = 30;
	this.scrollStep = 6;
	//
	this.container = Get(containerID);
	this.content = Get(contentID);
	this.arrowUp = Get(arrowUpID);
	this.arrowDown = Get(arrowDownID);
	//
	this.content.style.top = '0px';
	//
	this.UpdateArrows();
	//
	this.maxScroll = this.content.scrollHeight - this.container.clientHeight + Math.floor(this.container.clientHeight / 3);
	if (this.maxScroll < 0)
	{
		this.UpdateArrows();
		return;
	}
	//
	this.arrowUp.Scroller = this;
	this.arrowUp.onmouseover = function()
	{
		this.Scroller.StartScroll(this.Scroller.scrollStep);
	};
	//
	this.arrowDown.Scroller = this;
	this.arrowDown.onmouseover = function()
	{
		this.Scroller.StartScroll(-this.Scroller.scrollStep);
	};
	//
	this.arrowUp.onmouseout = this.arrowDown.onmouseout = function()
	{
		this.Scroller.StopScroll();
	};
	//
	this.guid = 'Scroller_' + containerID;
	eval('window.' + this.guid + '=this');
};

Scroller.prototype.StartScroll = function(val)
{
	//
	this.PropertyAddValue(this.content.style, 'top', val, -this.maxScroll, 0);
	this.timer = window.setTimeout('window.' + this.guid + ".StartScroll(" + val + ")", 50)
	//
	this.UpdateArrows();
};

Scroller.prototype.UpdateArrows = function()
{
	var offset = this.GetPropertyValue(this.content.style.top);
	var arrowUpFinalOpacity = (this.maxScroll < 0 || offset == 0) ? this.alphaOff : this.alphaOn;
	Fade.To(this.arrowUp, arrowUpFinalOpacity);
	//
	var arrowDownFinalOpacity = (this.maxScroll < 0 || offset == -this.maxScroll) ? this.alphaOff : this.alphaOn;
	Fade.To(this.arrowDown, arrowDownFinalOpacity);
};

Scroller.prototype.StopScroll = function(val)
{
	window.clearTimeout(this.timer);
};

Scroller.prototype.GetPropertyValue = function(prop)
{
	return parseInt(prop.substring(0, prop.length - 2));
};

Scroller.prototype.PropertyAddValue = function(obj, prop, val, min, max)
{
	var v = this.GetPropertyValue(obj[prop]);
	v += val;
	v = Math.min(v, max);
	v = Math.max(v, min);
	obj[prop] = v.toString() + 'px';
};
