JSREF
onhashchange Event
Execute a JavaScript when the anchor part has been changed: