Need some help with a scale map of the solar system

[COLOR=#000000][FONT=Arial]I’m working on a scale map of the solar system (just for fun) and I’m pretty far along, but I’m trying to implement a feature that’s a little over my head. I was hoping someone smarter might have some insight.[/FONT][/COLOR][COLOR=#000000][FONT=Arial]
[/FONT][/COLOR]
[COLOR=#000000][FONT=Arial]You can see the site here: [/FONT][/COLOR]

[COLOR=#000000][FONT=Arial]http://joshworth.com/dev/pixelspace/pixelspace_solarsystem.html[/FONT][/COLOR][COLOR=#000000][FONT=Arial]
[/FONT][/COLOR]
[COLOR=#000000][FONT=Arial](I haven’t looked at it on a PC, so there might be some other problems.)[/FONT][/COLOR]

[COLOR=#000000][FONT=Arial]In the area that currently shows 0000kM (near the bottom) I’d like to display a continuously updated number that indicates the current distance from the sun.[/FONT][/COLOR]

[COLOR=#000000][FONT=Arial]It seems like if I can get the x coordinates of an element within the div that contains the map, then I could multiply that by the map scale (1px = 3474.8 kM) in order to get the measurement.[/FONT][/COLOR][COLOR=#000000][FONT=Arial]
[/FONT][/COLOR]
[COLOR=#000000][FONT=Arial]I was looking at this article[/FONT][/COLOR]
[COLOR=#000000][FONT=Arial]http://www.kirupa.com/html5/get_element_position_using_javascript.htm which seems like it would be helpful, but I’m not familiar enough with javascript to create a listener that updates and displays the measurement in real-time.[/FONT][/COLOR]

[COLOR=#000000][FONT=Arial]Anybody have any thoughts? [/FONT][/COLOR]