function get_scrollHeight()
{
	if (document.body == null)
		return 0;
	if (window.innerHeight && window.scrollMaxY) { // Firefox 
		pageWidth = window.innerWidth + window.scrollMaxX;
		pageHeight = window.innerHeight + window.scrollMaxY;
	}
	else if( document.body.scrollHeight > document.body.offsetHeight ) { // all but Explorer Mac
		pageWidth = document.body.scrollWidth;
		pageHeight = document.body.scrollHeight;
	}
	else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari
		pageWidth = document.body.offsetWidth + document.body.offsetLeft;
		pageHeight = document.body.offsetHeight + document.body.offsetTop;
	}
	return pageHeight;
}

function get_scrollWidth()
{
	if (document.body == null)
		return 0;
	if (window.innerHeight && window.scrollMaxY) { // Firefox 
		pageWidth = window.innerWidth + window.scrollMaxX;
		pageHeight = window.innerHeight + window.scrollMaxY;
	}
	else if( document.body.scrollHeight > document.body.offsetHeight ) { // all but Explorer Mac
		pageWidth = document.body.scrollWidth;
		pageHeight = document.body.scrollHeight;
	}
	else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari
		pageWidth = document.body.offsetWidth + document.body.offsetLeft;
		pageHeight = document.body.offsetHeight + document.body.offsetTop;
	}
	return pageWidth;
}

function get_scrollY()
{
	if (window.pageYOffset) {
		return window.pageYOffset;
	}
	else {
		if (!document.body)
			return 0;
		return document.body.scrollTop;
	}
}

function set_scrollY(pos)
{
	window.scroll(0, pos);
}
