var tooltip = null;
var globalSidebar = false;
document.onmousemove = updateTooltip;

function updateTooltip(e) {
	var x = (document.all) ? window.event.x + document.documentElement.scrollLeft : e.pageX;
	var y = (document.all) ? window.event.y + document.documentElement.scrollTop : e.pageY;
  
  if (!globalSidebar && document.all) {
    x += 280;
    y += 240;
  }  
  
	if (tooltip != null) {
		tooltip.style.left = (x + 20) + "px";
		tooltip.style.top 	= (y + 20) + "px";
	}
}

function showTooltip(id,tooltipImage,tooltypType,sidebar) {
  globalSidebar = sidebar;
	tooltip = document.getElementById(id+tooltypType);
  document.getElementById(id+"_image"+tooltypType).src = tooltipImage;  
	tooltip.style.display = "block"
}

function hideTooltip() {
	tooltip.style.display = "none";
}