Grazie, avevo visto la funzione:
codice:
function getPageCoords (element) { // thanks to 'Martin Honnen' for this function 
   var coords = {x: 0, y: 0}; 
   while (element) { 
      coords.x += element.offsetLeft; 
      coords.y += element.offsetTop; 
      element = element.offsetParent; 
   } 
   return coords; 
}
come posso adattare la funzione in modo che riceva come parametro l'id dell'oggetto invece di this ?