// Functions for working with absolute positioned elements

//Returns left coordinate of the elem
function getAscendingLefts(elem)
{
	if (elem==null)
		return 0;
	else
	{
		if (elem.style.position=='absolute' || elem.style.position=='relative')  return 0;
		return elem.offsetLeft+getAscendingLefts(elem.offsetParent);
	}
}

//Returns left coordinate of the elem
function getAscendingTops(elem)
{
	if (elem==null)
		return 0;
	else 
	{
		if (elem.style.position=='absolute' || elem.style.position=='relative')  return 0;
		return elem.offsetTop+getAscendingTops(elem.offsetParent);
	}
}