This answer is not prototypejs, but you can always use the DOM API directly to assign a handler.
document.onmousemove = function() {
You will have good cross-browser support if you do not try to place the event on a window . So use document or some other element.
http://www.quirksmode.org/dom/events/mousemove.html
To remove the handler later, assign null .
document.onmousemove = null;
source share