eup(function() {
      prev = null;
      $('#cnvs').unbind('mousemove');
  });
}
else {
  document.write("Sorry - this demo requires a browser with canvas tag support.");
}

// MQTT boilerplate

var debug = function(){
  if (window.console && console.log && console.log.apply) {
    console.log.apply(console, arguments);
  }
};

var wsbroker = location.hostname;  //mqtt websocket enabled broker
var wsport = 15675; // port for above

var client = new Paho.MQTT.Client(wsbroker, wsport, "/ws",
    "myclientid_