adding scrolling function for selectPanels