
function getMouseX(e) {
  var IE = document.all?true:false
  if (!e) e = window.event;
  if (IE) { // grab the x-y pos.s if browser is IE
    tempX = e.clientX + document.body.scrollLeft;
  } else {  // grab the x-y pos.s if browser is NS
    tempX = e.clientX ;
  }
  return tempX;
}
function getMouseY(e) {
  var IE = document.all?true:false
  if (!e) e = window.event;
  if (IE) { // grab the x-y pos.s if browser is IE
    tempY = e.clientY + document.body.scrollTop;
  } else {  // grab the x-y pos.s if browser is NS
    tempY = e.clientY + document.body.scrollTop;
  }
  return tempY
}
function positionitem (itemid, X, Y) {
 document.getElementById(itemid).style.top = Y;
 document.getElementById(itemid).style.left = X;
}

function settooltip (itemid, itemcontent, e) {
 if (itemcontent!=='') {
  document.getElementById(itemid).innerHTML = itemcontent;
  positionitem (itemid, getMouseX(e), getMouseY(e));
  document.getElementById(itemid).style.display = "block";
 }
}

function cleartooltip (itemid) {
 document.getElementById(itemid).style.display = "none";
}
