JavaScript improvements - respond to hashchange events, thereby handling the anchor links.
Always put the ToC's hash on the end of the document URL if there's none present initially.