﻿function SetBodyCoordinates() {
	var f = document.forms[0];
	if (navigator.appName == "Netscape") {
		f["__sx"].value = window.pageXOffset;
		f["__sy"].value = window.pageYOffset;
	}
	else
	{
		// IE6 or DTD +4.01
		if (document.documentElement)
		{
			f["__sx"].value = document.documentElement.scrollLeft;
			f["__sy"].value = document.documentElement.scrollTop;
		}
		// IE5 or DTD 3.2
		else if (document.body)
		{
			f["__sx"].value = document.body.scrollLeft;
			f["__sy"].value = document.body.scrollTop;
		}
	}
}
function ScrollPage() {
	f = document.forms[0];
	window.scrollTo(f["__sx"].value, f["__sy"].value);
}
function SetScrollListenerByTimeout() {
	window.setInterval(SetBodyCoordinates, 50);
}

//add the on scroll to set the body coordinates
OnScrollFunctions.AddFunction(SetBodyCoordinates);





