var scrollId;
function scroll(dirrection)
{
	var frame = frames[0].document.getElementById("foto");
	var pos;
	if(frame.style.top.length == 0)
		pos = 0;
	else
		pos = eval(frame.style.top.substr(0,frame.style.top.indexOf("p")));
	if(frame.clientHeight < 350)
		return;
	var tVal = 350 - frame.clientHeight;
	var bVal = 0;
	var newY;
	if(dirrection == "up")
		newY = pos + 10;
	else	
		newY = pos - 10;
	if(newY < tVal)
	{
		newY = tVal;
		clearInterval(scrollId);
	}
	if(newY > bVal)
	{
		newY = bVal;
		clearInterval(scrollId);
	}
	frame.style.top = newY;
}

function scrollUp()
{
	scroll('up');
}

function scrollDown()
{
	scroll('down');
}

function scrolling(dirrection)
{
	if(dirrection == 'up')
		scrollId = setInterval(scrollUp, 20);
	else
		scrollId = setInterval(scrollDown, 20);
	return false;
}

function stopScrolling()
{
	clearInterval(scrollId);
	return false;
}
