-- Main game loop
function Main()

	DoModal("scripts/logo_portal.lua");
	DoModal("scripts/logo_lifetime.lua");
	DoModal("scripts/logo_starz.lua");
	DoModal("scripts/logo_merscom.lua");
	DoModal("scripts/logo_elephant_games.lua");

	-- Push the game selection screen
	while true do
		-- DoMainWindow("scripts/loading.lua");
		-- DoMainWindow("QEScripts/gameEditor.lua");
		DoMainWindow("scripts/mainmenu.lua");
		-- DoMainWindow will exit only if there are NO windows pushed on the stack, so
		-- a PopModal()/PushModal() combination will not cause this to loop.
	end
end

-- Return a function to be executed in a thread
return Main