I am not sure what you need it for, and such things are always relative (screen, window, document). But when I needed to figure that out, I found this site helpful:
http://www.mattkruse.com/javascript/anchorposition/source.html
And I also found that the tooltip plugin someone made for jQuery had all sorts of interesting insight to x,y positioning tricks (look at its viewport class and the underlying support jQuery provides for it).
http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/