// get the true offset of anything on NS4, IE4/5 & NS6, even if it's in a table!
function getAbsX(elt) { return (elt.x) ? elt.x : getAbsPos(elt,"Left"); }
function getAbsY(elt) { return (elt.y) ? elt.y : getAbsPos(elt,"Top"); }
function getAbsPos(elt,which) {
 iPos = 0;
 depth = 0;

 while (elt != null) {
  iPos += elt["offset" + which];
  elt = elt.offsetParent;
  // don't recurse forever -- this works around weird out of memory errors in MSIE
  depth++;
  if (depth > 10) { return iPos; }
 }
 return iPos;
}

function getPosXY(marker) {
  var coord = new Object();
  var item = (typeof(marker) == 'string') ? document.getElementById(marker) : marker;
  coord.x = parseInt(getAbsX(item));
  coord.y = parseInt(getAbsY(item));
  return coord;
}


