Ok, well I went crazy and started trying any goofy thing I could imagine and I found the solution. Just so everyone knows this isn't explained anywere, at least not in context.
Here's the new code.
<html>
<head>
<style type="text/css">
#m2 {position: absolute; border: 2px solid #000000; background: #CCCCCC;}
</style>
<script type="text/javascript" language="javascript">
function showcalevent(obj, event) {
var agent = navigator.userAgent.toLowerCase();
var scrollp = [0, 0];
if (typeof document.documentElement.scrollTop != "undefined" && document.documentElement.scrollTop > 0 ){
scrollp = [document.documentElement.scrollLeft,
document.documentElement.scrollTop];
}
else if (typeof document.body.scrollTop != "undefined" ){
scrollp = [document.body.scrollLeft,
document.body.scrollTop];
}
else if (typeof window.pageYOffset != "undefined" ){
scrollp = [window.pageXOffset,
window.pageYOffset];
}
var cursorp = [0, 0];
if(typeof event.pageX != "undefined" && typeof event.x != "undefined"){
cursorp[0] = event.pageX - 400;
cursorp[1] = event.pageY - 80;
}
else if (agent.indexOf("gecko") != -1){
cursorp[0] = event.clientX + scrollp[0] - 200;
cursorp[1] = event.clientY + scrollp[1] + 10;
}
else{
cursorp[0] = event.clientX + scrollp[0] - 400;
cursorp[1] = event.clientY + scrollp[1] - 100;
}
obj.style.top = cursorp[1] + "px";
obj.style.left = cursorp[0] + "px";
obj.style.display = "block"
}
function hidecalevent(obj, event) {
obj.style.top = "-300px";
obj.style.left = "-300px";
obj.style.display = "none"
}
</script>
</head>
<body>
<div style="top: -200px; left: -200px;" id="m2">
<br>
<br>
We can place tons of content here<br>
<br>
<br>
</div>
<center>
<div id="Mmenu" onMouseover="showcalevent(m2, event)" onMouseout="hidecalevent(m2, event)">
<b>Menu</b>
</div>
</center>
</body>
</html>
Now the functions are a slight bit different from my earlier post but they show how I am using them on the site. Now the testing for the browser is just there for different positioning settings.
The point to note is "onMouseover" and onMouseout" now have the "event" in the brackets like such: onMouseover="showcalevent(m2, event)". And the "event" is then picked up by the functions like so: showcalevent(obj, event).
I am guessing that the actual event has to be passed for Firefox (mozilla) to actually get the cursors position. In all reality I don't know why it worked but it does.
I hope my explanation helps someone else.
Any critique is welcome.