

// Author: Kris Purdy
// Date: 03/04/2007

//======================================================================
function getAbsLeft(a_Element) {
//pre: any HTML object in a page.
//pst: the absolute left position relative to the top left of the page.
	var l_Left = 0;
	var l_Ele = a_Element;
  while (l_Ele) {
  	l_Left += l_Ele.offsetLeft;
  	l_Ele = l_Ele.offsetParent;
  }
	return l_Left;
}

//======================================================================
function getAbsTop(a_Element) {
//pre: any HTML object in a page.
//pst: the absolute top position relative to the top left of the page.
	var l_Top = 0;
	var l_El = null;
	for (l_El = a_Element; l_El; l_El = l_El.offsetParent) {
	  l_Top += l_El.offsetTop;
	}
	for (l_El = a_Element.parentNode; l_El && 
	    l_El != document.body; l_El = l_El.parentNode) {
	  if (l_El.scrollTop) {
	    l_Top -= l_El.scrollTop;
	  }
	}
	return l_Top;
}

//======================================================================
function selectTextOnClick(a_Elem) {
//pre: any HTML input DOM object in a page.
//pst: the text selected in the DOM object.
    a_Elem.select();
}

