Added handler to include #id on document version link click.

When you change document versions while on a page you lose the # anchor in the url.  This JavaScript handler ensures that the # anchor is retained.