Javascript for layer table of contents