A javascript function to take a selector, and use it to create a deep link list for glossaries or table of contents.