function GetDomainName()
{
	return document.domain;
}

function GetMousePositionX(e)
{
	var e = (e) ? e : ((window.event) ? window.event : null);
	var x = 0;
	
	if (isIE)
	{
		x = window.event.clientX + GetScrollLeft();
	}
	else
	{
		x = e.pageX;
		
		if (x < 0)
		{
			x = 0;
		}
	}
	
	return x;
}

function GetMousePositionY(e)
{
	var e = (e) ? e : ((window.event) ? window.event : null);
	var y = 0;
	
	if (isIE)
	{
		y = window.event.clientY + GetScrollTop();
	}
	else
	{
		y = e.pageY;
		
		if (y < 0)
		{
			y = 0;
		}
	}
	
	return y;
}

function GetClientWidth() {
	return GetFilterResults (
		window.innerWidth ? window.innerWidth : 0,
		document.documentElement ? document.documentElement.clientWidth : 0,
		document.body ? document.body.clientWidth : 0
	);
}

function GetClientHeight() {
	return GetFilterResults (
		window.innerHeight ? window.innerHeight : 0,
		document.documentElement ? document.documentElement.clientHeight : 0,
		document.body ? document.body.clientHeight : 0
	);
}

function GetScrollLeft() {
	return GetFilterResults (
		window.pageXOffset ? window.pageXOffset : 0,
		document.documentElement ? document.documentElement.scrollLeft : 0,
		document.body ? document.body.scrollLeft : 0
	);
}

function GetScrollTop() {
	return GetFilterResults (
		window.pageYOffset ? window.pageYOffset : 0,
		document.documentElement ? document.documentElement.scrollTop : 0,
		document.body ? document.body.scrollTop : 0
	);
}

//Ref: http://www.softcomplex.com/docs/get_window_size_and_scrollbar_position.html
function GetFilterResults(n_win, n_docel, n_body) {
	var n_result = n_win ? n_win : 0;
	if (n_docel && (!n_result || (n_result > n_docel)))
		n_result = n_docel;
	return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
}

