// events.js
// -----------
// cross browser compatibility for events
// - has to be included after browsers.js because we need the context in myCtx
// - handles browser specific mouse movement events
//----------------------------------------------------------------------------

//
// GLOBALS
//

// global mouse stuff - browserspecific
var mouseX;      // x-coordinate of the mouse
var mouseY;      // y-coordinate of the mouse


//
// FUNCTIONS
//

// browser specific mouse handling
if (myCtx.NET) {
    window.captureEvents(Event.MOUSEMOVE);
    window.onMouseMove = moveHandler;
}
else document.onmousemove=moveHandler;


// capture mouse movements, browserspecific
function moveHandler(e)
{
    mouseX = (myCtx.MI4 || myCtx.MIC)?event.x:e.pageX
    mouseY = (myCtx.MI4 || myCtx.MIC)?event.y:e.pageY
}


