//I AM A JAVASCRIPT MASTER!!!

function movePage(pos)
	{ 
    window.scroll(0,pos);
	}


function scrollTo(id, millisec)
	{
	//get the point on the page that the specified id is at
	newPos = findPos(id)
	newPos = newPos + ''; //convert it to a string so we can split it to array
	newPos = newPos.split(',')[1];
	
	//add offset
	newPos = newPos - 15;
	if (newPos < 0)
		{newPos = 0;}
	
	//alert(newPos);
	
    var speed = Math.round(millisec / 100); 
    var timer = 0;
	
	//get the current position
	if (self.pageYOffset)
		{
		curPos = self.pageYOffset;
		}
	else if (document.documentElement && document.documentElement.scrollTop)
		{
		curPos = document.documentElement.scrollTop;
		}
	else if (document.body) // all other Explorers
		{
		curPos = document.body.scrollTop;
		}

	//alert(curPos);
	
    if(curPos > newPos)
		{
        for(i = curPos; i >= newPos; i=i-20)
			{ 
            setTimeout("movePage(" + i + ");",(timer * speed)); 
            timer=timer+1; 
        	}
		setTimeout("movePage(" + newPos + ");",((timer) * speed));
		}
	else if(curPos < newPos)
		{ 
        for(i = curPos; i <= newPos; i=i+20) 
            { 
            setTimeout("movePage(" + i + ");",(timer * speed)); 
            timer=timer+1; 
        	} 
		setTimeout("movePage(" + newPos + ");",((timer) * speed));
    	} 
	} 