built the javascript to toggle button tray and sections