codice:
function coords(el){
	var c={x: 0, y: 0};
	while (el) {
		c.x+=el.offsetLeft;
		c.y+=el.offsetTop;
		el=el.offsetParent;
	}
	return c;
}
dopo che l' immagine con id="immagine" e' stata dichiarata nell' xhtml
coords(document.getElementById('immagine')).y