Help on some simple action script

Does anyone know how to solve this simple but yet to me tricky task?!?! :crazy: i need to make a map with a function to mesure the distance from a given point! Take a look at http://www.bueslaget.no then enter the third link in the top " beliggenheten"!

Guess this is peanuts for the most of u guys, but i’m just a rooky with a big mouth! :ko: