/**

* getTruePosition

*

* Returns a coordinate pair of the true position of a DOM element relative to the upper left of the browser window

*

* @param d The DOM element to get the position of

*
*/

function getTruePosition( d ) {
 

	var curleft = d.offsetLeft;

	var curtop = d.offsetTop;

	

	while ( d = d.offsetParent ) {
 
		curleft += d.offsetLeft;

		curtop += d.offsetTop;
	}


	return { left: curleft, top: curtop };

}
