// JavaScript Document
function attachToBody()
{
	var function_onscroll = function()
	{
		var o = document.getElementById('__SCROLLPOS');
		if (o)
		{
			if (document.documentElement && document.documentElement.scrollTop != 'undefined')
				o.value = document.documentElement.scrollTop;
			else if (document.body)
				o.value = document.body.scrollTop;
		}
	}
	
	window.onscroll = function_onscroll;
}

function refreshScrollPos()
{
	var o = document.getElementById('__SCROLLPOS');
	if (o)
	{
		if (document.documentElement && document.documentElement.scrollTop != 'undefined')
		{
			document.documentElement.scrollTop = o.value;
		}
		else if (document.body)
			document.body.scrollTop = o.value;
	}
}

attachToBody();

ie ? window.attachEvent('onload',refreshScrollPos) : window.addEventListener('load',refreshScrollPos,false);