function connectm.init()
	-- Connect Menu
	byipm.init()
	gui_load_gss("menu-common")
	gui_load_gss("connect-menu")
	local menu = gui_load_xml("connect-menu")
	local win = menu:child("connect-win")
	local connectBtn = win:child("connect")
	local refreshBtn = win:child("refresh")
	local byipBtn = win:child("byip")
	local backBtn = win:child("back")
	local serverListw = win:child("serverlist")
	serverListw:add_column("Name", 0.5)
	serverListw:add_column("Mod", 0.2)
	serverListw:add_column("Map", 0.3)
	win:set_sub_focus(serverListw)

	function connectm.isShown()
		return menu:is_visible() or byipm.isShown()
	end

	function connectm.refreshServers()
		common.serverList(serverListw)
	end

	function connectm.show()
		if not menu:is_visible() then
			menu:set_visibility(true)
			menu:focus()
		end
		connectm.refreshServers()
	end

	function connectm.hide()
		menu:set_visibility(false)
		byipm.hide()
	end

	function connectBtn:onAction()
		local sel = serverListw:main_selection()
		if sel then
			local ip = sel:data().ip
			if ip then
				print(ip)
				connect(ip)
			end
		end
	end
	
	function refreshBtn:onAction()
		connectm.refreshServers()
	end

	function byipBtn:onAction()
		connectm.hide()
		byipm.show()
	end

	function backBtn:onAction()
		connectm.hide()
		mainm.show()
	end

	function menu:onKeyDown(k)
		if k == Keys.ESC and map_is_loaded() then
			connectm.hide()
			mainm.show()
			return true
		end
	end

	connectm.hide()

end