function coordinatMouse(e){ e = e || window.event; yy=e.y+document.body.scrollTop; xx=e.x+document.body.scrollLeft; } document.onmousemove=coordinatMouse(event);