var scrolling = false;
var velement = null;

function scroll_up(element)
{
	if(!scrolling)
	{
		scrolling = true;
		velement = element;
		scroll_up_loop();
	}
}

function scroll_up_loop()
{
	if(scrolling)
	{
		document.getElementById(velement).scrollTop -= 10;
		setTimeout('scroll_up_loop()', 20);
	}
}

function scroll_down(element)
{
	if(!scrolling)
	{
		scrolling = true;
		velement = element;
		scroll_down_loop();
	}
}

function scroll_down_loop()
{
	if(scrolling)
	{
		document.getElementById(velement).scrollTop += 10;
		setTimeout('scroll_down_loop()', 20);
	}
}

function scroll_stop()
{
	scrolling = false;
}