move inclusion of javascript to fix problem if app_index pages are blank
allow hiding advanced