add functions for menubar Js file