function GetElementArea(element)
{
	var area = new Area();

	area.Width = element.offsetWidth;
	area.Height = element.offsetHeight;
	area.Left = 0;
	area.Top = 0;

	if(element.offsetParent)
	{
		while(element.offsetParent)
		{
			area.Left += element.offsetLeft
			area.Top += element.offsetTop;
			element = element.offsetParent;
		}
	}
	else if (element.x)
	{
		area.Left += element.x;
		area.Top += element.y;
	}

	area.Bottom = area.Top + area.Height;
	area.Right = area.Left + area.Width;

	return area;
}

function Area(width, height, top, left, bottom, right)
{
	this.Width = width;
	this.Height = height;
	this.Top = top;
	this.Left = left;
	this.Bottom = bottom;
	this.Right = right;
}

Area.prototype.Intersects = function(area)
{
	return	(area.Left < this.Right) && (this.Left < area.Right) && (area.Top < this.Bottom) && (this.Top < area.Bottom);
}