complete header_panel.js script