FeaturesPluginsDocs & SupportCommunityPartners
//This is the correct script for detecting the mouse coordinates
function doSomething(evt) {
var posx = 0;
	var posy = 0;
	if (!evt) var evt = window.event;
	if (evt.pageX || evt.pageY) 	{
		posx = evt.pageX;
		posy = evt.pageY;
	}
	else if (evt.clientX || evt.clientY) 	{
		posx = evt.clientX + document.body.scrollLeft
			+ document.documentElement.scrollLeft;
		posy = evt.clientY + document.body.scrollTop
			+ document.documentElement.scrollTop;
	}
	// posx and posy contain the mouse position relative to the document
	// Do something with this information
}

//Another mouse function, duno if you can put two functions in one file
function anotherMouseFunc(evt) {
	if (!evt) var evt = window.event;
	var tg = (window.event) ? evt.srcElement : evt.target;
	if (tg.nodeName != 'DIV') return;
	var reltg = (e.relatedTarget) ? evt.relatedTarget : evt.toElement;
	while (reltg != tg && reltg.nodeName != 'BODY')
		reltg= reltg.parentNode
	if (reltg== tg) return;
	// Mouseout took place when mouse actually left layer
	// Handle event
}

 

Companion
Projects:
MySQL Database Server   Open JDK: an Open SourceJDK   GlassFish Community: an Open Source Application Server    Mobile & Embedded Community    Open Solaris   java.net - The Source for Java Technology Collaboration   Virtual Box - full virtualizer  Open ESB - The Open Enterprise Service Bus Powered by