


function Rect(top, bottom, left, right)
{
	if (isNaN(left))
	{
		alert("Rect::Rect: left is NaN, setting to 0");
		left = 0;
	}

	if (isNaN(right))
	{
		alert("Rect::Rect: right is NaN, setting to 0");
		right = 0;
	}
	
	if (isNaN(top))
	{
		alert("Rect::Rect: top is NaN, setting to 0");
		top = 0;
	}

	if (isNaN(bottom))
	{
		alert("Rect::Rect: bottom is NaN, setting to 0");
		bottom = 0;
	}

	this._left = left;
	this._right = right;	
	this._top = top;
	this._bottom = bottom;
}

Rect.prototype.GetLeft = function()
{
	//alert("Rect::GetLeft: will return: " + parseInt(document.body.clientWidth * this._left));
	return parseInt(window.innerWidth * this._left);
}

Rect.prototype.GetRight = function()
{
	//alert("Rect::GetRight");
	return parseInt(window.innerWidth * this._right);
}

Rect.prototype.GetTop = function()
{
	return parseInt(window.innerHeight * this._top);
}

Rect.prototype.GetBottom = function()
{
	return parseInt(window.innerHeight * this._bottom);
}



