added javascript callback for header buttons