// If NS -- that is, then set up for mouse capture
if (document.layers) document.captureEvents(Event.MOUSEMOVE)

function mouse_get_pos_x(e) {
  var l_x;

  if (document.layers) { // Netscape
    l_x = e.pageX
  }  
  else if (document.all)  { // Internet explorer
    l_x = event.clientX + document.body.scrollLeft
  }
  // catch possible negative values in NS4
  if (l_x < 0){
    l_x = 0
  }
  return l_x;
}

function mouse_get_pos_y(e) {
  var l_y;

  if (document.layers) { // Netscape
    l_y = e.pageY
  }  
  else if (document.all)  { // Internet explorer
    l_y = event.clientY + document.body.scrollTop
  }
  // catch possible negative values in NS4
  if (l_y < 0){
    l_y = 0
  }
  return l_y;
}

