function movePage()
	{ 
    now = new Date();
	curY = parseInt(getPageScrollTop()[1]);
	targetY = thisA * Math.sin(thisB * (now.getTime() - thisC)) + thisD;
	targetY = Math.round(targetY);
	if ((thisA > 0 && targetY >= curY) || (thisA < 0 && targetY <= curY))
		{
		window.scroll(0,targetY);
		setTimeout("movePage();", 10);
		}
	else
		{
		//alert('done');
		}
	}
	
function scrollTo(id, slideTime)
	{
	//get the point on the page that the specified id is at
	newPos = findPos(id)[1];
	
	//add offset
	newPos = newPos - 15;
	if (newPos < 0)
		{newPos = 0;}
	
	//alert(newPos);
	
	screenSize = parseInt(getPageSize()[1]);
	pageSize = findPos('anchorBottom')[1];
	
	maxScroll = pageSize - screenSize;
	
	if (newPos > maxScroll)
		{newPos = maxScroll;}
	
	//alert(newPos);
	
    newY = newPos;
	curY = parseInt(getPageScrollTop()[1]);
	now = new Date();
	thisA = newY - curY;
	
	//choose a speed based on the difference
	if (slideTime == 0)
		{
		slideTime = parseInt(Math.abs(thisA / 1));
		//alert(thisA + ' ' + slideTime);
		}
	
	thisB = (Math.PI + 0) / (2 * slideTime);
	thisC = now.getTime();
	thisD = curY;
	movePage();
	} 