var val = 70;
var interval;

var timeout = 5;
var settedSteps = 2;

function init ()
{

}

function ScrollUp (steps)
{
	if ( settedSteps != steps && interval )
		Stop();
	if ( !interval ) interval = window.setInterval("Scroll(" + steps + ")", timeout);
}

function ScrollDown (steps)
{
	if ( settedSteps != steps && interval )
		Stop();
	if ( !interval ) interval = window.setInterval("Scroll(-" + steps + ")", timeout);
}

function Scroll ( inc )
{
	if ( inc > 0 && parseInt(document.getElementById("innercontent").style.top) <= 70 ) 
	{
		document.getElementById("innercontent").style.top = val;
		val = val+inc;
	}
	if ( inc < 0 )
	{
		document.getElementById("innercontent").style.top = val;
		val = val+inc;
	}
}

function Stop ()
{
	window.clearInterval(interval);
	interval = null;
}

