function ScrolledDiv(height, id_scroll, id_up, id_down, step)
{
	this.eDiv = document.getElementById(id_scroll)
	this.eUp = document.getElementById(id_up)
	this.eDown = document.getElementById(id_down)
	this.height = height
	this.top = 0
	this.step = step
	this.direction = 1
	this.eDown.obj = this
	this.eUp.obj = this

	this.scroll = function()
	{
		this.top += this.step * this.direction
		this.eDiv.scrollTop = this.top
	}

	this.eDown.onclick = function()
	{
		if(this.obj.top < this.obj.eDiv.scrollHeight - this.obj.height)
		{
			this.obj.direction = 1
			this.obj.scroll();
		}

		return false;
	}

	this.eUp.onclick = function()
	{
		if(this.obj.top > 0)
		{
			this.obj.direction = -1
			this.obj.scroll();
		}

		return false;
	}

	this.scroll();
}
