public void join()
        {
            Util.cancelServerQuery();
            int index = ((GuiTextListCtrl) "JS_serverList").getSelectedId();
            // The server info index is stored in the row along with the
            // rest of displayed info.

            if (Util.setServerInfo((uint) index))
                {
                ((GuiCanvas) "Canvas").setContent("LoadingGui");
                ((GuiProgressBitmapCtrl) "LoadingProgress").setValue("1");
                ((GuiTextCtrl) "LoadingProgressTxt").setValue("WAITING FOR SERVER");
                ((GuiCanvas) "Canvas").repaint(-1);

                if ("ServerConnection".isObject())
                    "ServerConnection".delete();

                GameConnection conn = new ObjectCreator("GameConnection", "ServerConnection").Create();
                conn.setConnectArgs(sGlobal["$pref::Player::Name"]);
                conn.setJoinPassword(sGlobal["$Client::Password"]);
                conn.connect(sGlobal["$ServerInfo::Address"]);
                }
        }
        //
        //----------------------------------------------------------------------------
        //Helper functions
        //----------------------------------------------------------------------------

        public static void connect(string server)
        {
            GameConnection conn = new ObjectCreator("ServerConnection").Create();
            ((SimGroup) "RootGroup").add(conn);
            conn.setConnectArgs(omni.sGlobal["$pref::Player::Name"]);
            conn.setJoinPassword(omni.sGlobal["$Client::Password"]);
            conn.connect(server);
        }
            public void initialize(string callback)
            {
                RSSFeedObject RSSFeedObject = "RSSFeedObject";

                RSSFeedObject = new ObjectCreator("TCPObject", "RSSFeedObject", typeof (RSSFeedObject)).Create();
                RSSFeedObject["_callback"] = callback;

                RSSFeedObject.connect(sGlobal["$RSSFeed::serverName"] + ":" + sGlobal["$RSSFeed::serverPort"]);
            }