Added logic for panelType in fb.js