var tempX = 0
var tempY = 0
var IE = document.all?true:false
if (!IE) document.captureEvents(Event.MOUSEMOVE)
document.onmousemove = getMouseXY;

function getMouseXY(e) {
	getMouseX(e);
	getMouseY(e);
}

function getMouseX(e) {
  if (IE) { // grab the x-y pos.s if browser is IE
    tempX = event.clientX + document.body.scrollLeft
  } else {  // grab the x-y pos.s if browser is NS
    tempX = e.pageX
  }  
  // catch possible negative values in NS4
  if (tempX < 0){tempX = 0}
}

function getMouseY(e) {
  if (IE) { // grab the x-y pos.s if browser is IE
    tempY = event.clientY + document.body.scrollTop
  } else {  // grab the x-y pos.s if browser is NS
    tempY = e.pageY
  }  
  if (tempY < 0){tempY = 0}  
}

function show_events(id) {
  $('.eventoverlay').hide();
  $('#'+id).css("left",tempX-460);
  $('#'+id).css("top",tempY+5);
  $('#'+id).show();
}

