function findPos(obj)
{
  return findRelativePos(obj, null)
}

function findRelativePos(obj, ancestor)
{
  var curleft = curtop = 0

  do
  {
    curleft += obj.offsetLeft
    curtop += obj.offsetTop
    obj = obj.offsetParent
  }
  while (obj != ancestor)

  return { left:curleft, top:curtop }
}

function getText(object)
{
  return (document.all ? object.innerText : object.textContent)
}

function setText(object, text)
{
  if (document.all) { object.innerText = text }
  else              { object.textContent = text }
}
