Revised active page functions

Uses the global active_page rather than the document URL
Revised initImprovedPageTitles()

Uses isOnCatalog() and isOnThread(), as well as fixed indentation.
Add missing favorites links to the catalog