function checkScroll() {
	var fudgeFactor = document.all? 4: 6; // Moz only
	var docHeight, totalHeight;
	
	if (document.all && document.documentElement && document.documentElement.clientHeight)
		docHeight = document.documentElement.scrollHeight;
	else if (document.all)
		docHeight = document.body.scrollHeight;
	else
		docHeight = document.height;
	docHeight = parseInt(docHeight) + fudgeFactor;
	
	if (self.innerHeight)
		totalHeight = parseInt(self.innerHeight);
	else
		totalHeight = parseInt(document.body.offsetHeight);
	if (docHeight > totalHeight)
		return 1;
	else
		return 0;
}