var IE = document.all?true:false
if (!IE) document.captureEvents(Event.MOUSEMOVE)
document.onmouseover = getMouseXY;
var tempY = 0
var Ymax = 0
var scrolldelay
var scrolling = 0

if (parseInt(navigator.appVersion)>3)
{
	if (navigator.appName=="Netscape")
	{
		Ymax = window.innerHeight;
	}
	if (navigator.appName.indexOf("Microsoft")!=-1)
	{
		Ymax = document.documentElement.clientHeight;
	}
}

function pageScroll(scrollamount)
{
	    	window.scrollBy(0,scrollamount);
		scrolling = 1
	    	scrolldelay = setTimeout('pageScroll('+scrollamount+')',50);
}

function stopScroll() {
	scrolling = 0
    	clearTimeout(scrolldelay);
}

function getMouseXY(e)
{
	if (IE)
	{
		tempY = event.clientY
	}
	else
	{
		tempY = e.clientY
	}  

	if (tempY < 0)
	{
		tempY = 0
	}

	if (tempY < 50)
	{
		if (scrolling == 0)
		{
			pageScroll(-10);
		}
	}
	else
	{
		if (Ymax - tempY < 50)
		{
			if (scrolling == 0)
			{
				pageScroll(10);
			}
		}
		else
		{
			if (scrolling == 1)
			{
				stopScroll();
			}
		}
	}

	return true
}

