Fijate así:
Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
<script>
function getPos(e){
var ev=e || window.event;
var obj=ev.target || ev.srcElement;
obj.style.position='relative';
posX=ev.layerX || ev.offsetX || 0;
posY=ev.layerY || ev.offsetY || 0;
return {x:posX,y:posY}
}
</script>
</head>
<body>
<img src="images/01Abrebocas.jpg" width="200" onmousemove="var pos=getPos(event);document.getElementById('log').innerHTML=pos.x+'--'+pos.y" />
<div id="log"></div>
</body>
</html>