scripttable.NextLevelTrigger=function()
	TeleportToLevel("level10",1)
end

scripttable.OpenDoorSwitch=function()
	ForeachNamedObject("BigDoor",function(o) o:Delete() end)
	ForeachNamedObject("DoorLights",function(o) o:SetFrame(1) end)
	
	local ch=PlaySound("suur_uks",1)
	Wait(0.2)
	for i=0,10000 do
		if not ChannelIsPlaying(ch) then
			StopChannel(ch)
			break
		end
		Wait(1/30)
		if i<30*4.6 then
			ShakeScreen(0.2)
		end
	end
	ShowSmallMessage("BLAST DOORS OPENED")
end

scripttable.SquadActivateTrigger=function()
	ForeachNamedObject("Squad",function(o) o:SetPosition(o.startx,o.starty) end)
	scripttable.SquadActivateTrigger=function() end
end

scripttable.LevelStart=function()
	ForeachNamedObject("Squad",
	function(o) 
		o.startx,o.starty=o:GetPosition()
		o:SetPosition(10000,10000)
	end)
	StandardIntro()
	if progress.level7==0 then
		ShowSmallMessage("LEVEL5 UNLOCKED!")
		progress.level7=1
		menu.EnableItem(level7i)
		menu.SetItemText(level7i,"")
	end

end
