function PreSave()
	SaveTasks()
	 -- ESC video play
	 if states["sys_video_play"] ~= "" and states["sys_video_play"] ~= 0 then 
		Video:StopMovie(states["sys_video_play"])
		print ("ESC video..")
		return 
	 end
end

function PostSave()
end

function PreLoad()
  local hoModule = _G[MystHiddenGroup:GetMainLuaModuleName()]
  if hoModule and hoModule.PreLoad ~= nil then hoModule.PreLoad() end
end

function PostLoad()
  s.sys_region_under_mouse = ""
  s.sys_interface_caption = ""
  s.sys_item_under_mouse = ""
  LoadTasks()
    if Widgets ~= nil then
      --Widgets.Inventory.Lock(s.sys_inventory_locked ~= 1) 
      if Widgets.Inventory ~= nil and Widgets.Inventory.PostLoad ~= nil then
        Widgets.Inventory.PostLoad()
      end
      if Widgets.notes_window ~= nil and Widgets.notes_window.PostLoad ~= nil then
        Widgets.notes_window.PostLoad()
      end
    end
  if GamePostLoad ~= nil then GamePostLoad() end
  s.hold = 0
  Audio:PlayMusic("")
  local view = MystViewportManager:GetInstance():GetFocusedViewport():GetView()
  if view:GetName() ~= "s00_0000_menu" and UI:WidgetExists("MainMenu") and Widget("MainMenu"):IsVisible() then
    --Widget("MainMenu"):SetVisible(false)
    UI:DelWidget("MainMenu")
  end
  s.sys_menu = 0
Cursors:Reset()
end
