function viewTip (id, event)
{
  moveTip (id, event);
  tip = document.getElementById (id);
  tip.style.visibility = "visible";
}

function moveTip (id, event)
{
  tip = document.getElementById (id);
  mouseX = event.clientX + document.documentElement.scrollLeft;
  mouseY = event.clientY + document.documentElement.scrollTop;
  pageWidth = document.documentElement.clientWidth;

  x = mouseX - (tip.offsetWidth * 0.75);
  if (x < 1)
    x = 1;
  if (x + tip.offsetWidth > pageWidth)
    x = pageWidth - tip.offsetWidth - 1;

  tip.style.left = x + 'px';
  tip.style.top = (mouseY + 20) + 'px';
}

function hideTip (id)
{
  tip = document.getElementById (id);
  tip.style.visibility = "hidden";
}
