In the XPCOM library there is a function called getBoundingClientRect() that is accesible for any visible element.
So, if you want to get a XUL element’s position:

var rect = item.getBoundingClientRect();
var x = rect.left;
var y = rect.top;
var height = rect.height;
var width = rect.width;

Remember, ‘item’ can be any XULElement. For example:

var item = document.getElementById('myObject');
var rect = item.getBoundingClientRect();
var x = rect.left;
var y = rect.top;
var height = rect.height;
var width = rect.width;
alert('X position: ' + x + ' , Y position: ' + y);

As you can see you can get the width and the height of the element too.