
var MouseX = 0;
var MouseY = 0;

if(window.Event) document.captureEvents(Event.MOUSEMOVE);
window.onload        = SaveMouseXY;
document.onmousemove = SaveMouseXY;

function SaveMouseXY (e) {
  if(navigator.appName.substring(0,1) == "N") {
    MouseX = e.pageX;
    MouseY = e.pageY;
  }
  else {
    MouseX = document.body.scrollLeft + window.event.x;
    MouseY = document.body.scrollTop  + window.event.y;
  }
}

function ShowInfo (HTMLObject, YOffset, XOffset) {
  Obj = HTMLObject.id + 'InfoBox';
  document.getElementById(Obj).style.visibility = "visible";
  document.getElementById(Obj).style.left = MouseX + 20 + (XOffset ? XOffset : 0);
  document.getElementById(Obj).style.top  = MouseY + YOffset;
}

function HideInfo (HTMLObject) {
  document.getElementById(HTMLObject.id + 'InfoBox').style.visibility = "hidden";
}

