-- Main game loop
function Main()

--	DisplaySplash(
--		"splash/playfirst_animated_logo.swf",
--		"splash/playfirst_logo",4000
--		);
	--DisplaySplash("", "logo/merscom_logo.jpg",4000);
	--DisplaySplash("", "logo/elephantgames_logo.jpg",3000);
  DoModal("scripts/logo2.lua");
  DoModal("scripts/logo.lua");
  DoModal("scripts/logo1.lua");
	-- Push the game selection screen
	while true do
		--DoMainWindow("scripts/loading.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