Get the current anchor in javascript

Anatoly Mironov