| 
							- function poll() {
 -     var xmlhttp = new XMLHttpRequest();
 -     xmlhttp.onreadystatechange = function() {
 -         if (xmlhttp.readyState == XMLHttpRequest.DONE) {
 -            if (xmlhttp.status == 200) {
 -                update(xmlhttp.responseText);
 -            }
 -         }
 -     };
 - 
 -     // Send the request
 -     xmlhttp.open("GET", "/graph", true);
 -     xmlhttp.send();
 - };
 - 
 - 
 - function update(s) {
 -     json = JSON.parse(s);
 -     graph.update(json);
 - }
 - 
 - // Launch the polling loop
 - setInterval(poll, 1000);
 
 
  |