  tooltip = null;   
  document.onmousemove = updateTooltip;   
  var globalx = 0;
  var globaly = 0;
  var x = 0;
  var y = 0;
  
  function updateTooltip(e) {   
    
    try {   
   //   x = (document.all) ? window.event.x + document.documentElement.scrollLeft: e.pageX;   
   //   y = (document.all) ? window.event.y + document.documentElement.scrollTop: e.pageY; 
	   x = (document.all) ? window.event.x : e.pageX;   
      y = (document.all) ? window.event.y : e.pageY; 
	  globalx = x;
	  globaly = y;

      if (tooltip != null) {   
	                        if (x <= 1000)
							   {
                                tooltip.style.left = (x + 20) + "px";   
                                tooltip.style.top = (y + 20) + "px";
							   } else {
								       tooltip.style.left = (x - 150) + "px";   
                                       tooltip.style.top = (y + 20) + "px";
							
							           }
      }   
    } catch (error) { error=null; }   
  }   
  
  function showTooltip(id) {   
    try {   
      tooltip = document.getElementById(id);   
      tooltip.style.display = "block"  
    } catch (error) { error=null; }   
  }   
  
 
  
  function hideTooltip() {   
    try {   
      tooltip.style.display = "none";   
    } catch (error) { error=null; }   
  }   

