referencestrip.js: move variable declaration to the top of loadPanels