<!doctype html>
<html>
<head>
  <title>Websockets With Mochiweb Demo</title>
</head>
<body>
<h1>Mochiweb websocket demo</h1>

  <div id="connect">
     <button id="btnConn">Connect</button>
     &nbsp; State: <span id="connstate" style="font-weight:bold;"></span>
  </div>
    <br/><i>Protip: open your javascript error console, just in case..</i><br/>
  <hr/>
  <div id="connected">
    <form id="sendForm">
      <input id="phrase" type="text"/>
      <input id="btnSend" class="button" type="submit" name="con