Mouse movement utilities for JavaScript