code: function drawAddGuest() {
      $(ADDGUEST).show();
  
      function submit() {
          var name =  $(ADDGUESTFRM+"> input")[0].value;
          if (!NAMERE.test(name)) {
              if(name) {
                  alert("Your input text is too long!");
              }
              return false;
          }
          $.cookie("player", name);
          main();
      }
      $(ADDGUESTFRM+"> button").click(submit);
      $(ADDGUESTFRM+"> input:visible").focus();
      $(ADDGUESTFRM+"> input").keydown(function(event) {
          if (event.keyCode === 13) {
              submit();
          }
      });
  }
docs: Draw the add guest widget.
  - Set the player cookie when the user submits and switch to displaying the
  chat input.