document.onmousemove = moveTip;

function moveTip(e) 
{
  floatTipStyle = document.getElementById("floatTip").style;
  if (document.all) 
  { 
    x = event.x + document.body.scrollLeft; 
    y = event.y + document.body.scrollTop; 
  } 
  else 
  { 
    x = e.pageX; 
    y = e.pageY; 
  } 
  if ((x + 10) < document.body.clientWidth) 
  { 
    floatTipStyle.left = x + 'px';
  } 
  else 
  { 
    floatTipStyle.left = x + 'px';
  }
  floatTipStyle.top = y + 20 + 'px';
}

function toolTip(msg) 
{
  floatTipStyle = document.getElementById("floatTip").style;
  if (msg) 
  {
    document.getElementById("floatTip").innerHTML = "<img src='" + msg + "'>";
    floatTipStyle.display = "block";
  } 
  else 
  { 
    floatTipStyle.display = "none";
  } 
}
