function getInnerHeight() {
	// gets the inner height of the window (cross-browser safe)
	win = window;
	var winHeight;
	if (win.innerHeight) {
		winHeight = win.innerHeight;
	}
	else if (win.document.documentElement && win.document.documentElement.clientHeight) {
		winHeight = win.document.documentElement.clientHeight;
	}
	else if (win.document.body) {
		winHeight = win.document.body.clientHeight;
	}
	return winHeight;
}



function getInnerWidth() {
	// gets the inner width of the window (cross-browser safe)
	win = window;
	var winWidth;
	if (win.innerWidth) {
		winWidth = win.innerWidth;
	}
	else if (win.document.documentElement && win.document.documentElement.clientWidth) {
		winWidth = win.document.documentElement.clientWidth;
	}
	else if (document.body) {
		winWidth = win.document.body.clientWidth;
	}
	return winWidth;
}

	
function getMousePos(e) {
	// mozilla
	if (document.layers||document.getElementById&&!document.all) {
		return (e.pageX + ',' + e.pageY);
	}
	// iexplore
	else if (document.all) {
		return (window.event.clientX + ',' + window.event.clientY);
	}
}

function getScrollWidth()
{
   var w = window.pageXOffset ||
           document.body.scrollLeft ||
           document.documentElement.scrollLeft;
           
   return w ? w : 0;
}

function getScrollHeight()
{
   var h = window.pageYOffset ||
           document.body.scrollTop ||
           document.documentElement.scrollTop;
           
   return h ? h : 0;
}

function getScrollTop()	{
	var x,y;
	if (self.pageYOffset) // all except Explorer
	{
		x = self.pageXOffset;
		y = self.pageYOffset;
	}
	else if (document.documentElement && document.documentElement.scrollTop)
		// Explorer 6 Strict
	{
		x = document.documentElement.scrollLeft;
		y = document.documentElement.scrollTop;
	}
	else if (document.body) // all other Explorers
	{
		x = document.body.scrollLeft;
		y = document.body.scrollTop;
	}
	
	return y;
}