function byipm.init()
	-- Connect Menu
	gui_load_gss("menu-common")
	gui_load_gss("connect-menu")
	gui_load_gss("byip-menu")
	local menu = gui_load_xml("byip-menu")
	local win = menu:child("byip-win")
	local connectBtn = win:child("connect")
	local backBtn = win:child("back")
	local ipfield = win:child("ipfield")

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

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

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

	function connectBtn:onAction()
		local ip = ipfield:get_text()
		if ip then
			print(ip)
			connect(ip)
		end
	end
	
	function backBtn:onAction()
		byipm.hide()
		connectm.show()
	end

	function ipfield:onAction()
		local ip = ipfield:get_text()
		if ip then
			print(ip)
			connect(ip)
		end
	end
	

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

	byipm.hide()

end