var scrolling, godown, position, scrolledamount, scrollamount=20;

function scrollpage(){
	var scrollby;
	status='';
	if (scrolledamount >= 390)
	{
		clearInterval(scrolling);
		scrolling=0;
	}
	else
	{
		scrollby = (390 - scrolledamount < scrollamount)? 390 - scrolledamount : scrollamount;
		(godown)? parent.fotoframe.scrollBy(0,scrollby) : parent.fotoframe.scrollBy(0,-scrollby);
		scrolledamount += scrollamount;
	}
}

function scrolldown(){
	if (scrolling) return;
	godown=1;
	scrolledamount=0;
	scrolling=setInterval("scrollpage()", 20);
}
	
function scrollup(){
	if (scrolling) return;
	godown=0;
	scrolledamount=0;
	scrolling=setInterval("scrollpage()", 20);
}
