function setScrollPos() 
{
	var top;
	if (document.documentElement && document.documentElement.scrollTop)
	{
		top = document.documentElement.scrollTop;
	}
	else if (document.body)
	{
		top = document.body.scrollTop
	}
	document.Form1.hidScrollPos.value = top;
} 

function initScrollPos()
{
	var top = parseInt(document.Form1.hidScrollPos.value) != NaN ? document.Form1.hidScrollPos.value : 0;

	document.documentElement.scrollTop = top;
	document.body.scrollTop = top;
}

window.onscroll = setScrollPos;
