Try using window.location to retrieve what was entered in the address bar (including the # data).
You'd probably just use the Javascript split() function to split the string on the # symbol, and use the 2nd array item (index 1) to get what was entered after the # symbol.
EDIT: Here's an example I managed to type up:
<script type="text/javascript">
var pound_tag = window.location.toString().split('#')[1];
if(!pound_tag) {
alert('No data after # !');
} else {
alert('Data after #: ' + pound_tag);
}
</script>