* Reworking the page index to be formatted by the template

- Document the function more
- Fix page indexes in RTL mode (Antes! Bad kitty! >:D
- Jaavascript won’t work right. The event doesn’t seem to update. I can expand the first 50 pages, but the next click adds the first 50 again. Help? :D