header script update, mainmenu update
new file for global function