But the clientx and clienty gives the current mouse position and not the image's position on a screen.
You can do as follows:

Code:
var x = document.images.imagename.offsetLeft;
var y = document.images.imagename.offsetTop;