function showTooltip(id) {
  tooltip = document.getElementById(id);
  tooltip.style.display = "block";
}

document.onmousemove = updateTooltip;
 
function updateTooltip(e) {
  if (tooltip != null) {
    x = (document.all) ? window.event.x + tooltip.offsetParent.scrollLeft : e.pageX;
    y = (document.all) ? window.event.y + tooltip.offsetParent.scrollTop  : e.pageY;
    tooltip.style.left = (x + 20) + "px";
    tooltip.style.top  = (y + 20) + "px";
  }
}

function hideTooltip() {
  tooltip.style.display = "none";
}
  
function showDropDown(id) {
  dropdown = document.getElementById(id);
  dropdown.style.display = "block";
  setTimeout("hideDropDown()",1000);
}

function hideDropDown() {
  dropdown.style.display = "none";
}

document.onclick = hideDropDown;