<html>
<head>
<title>controller demo</title>
</head>
<body>
<button id="control-0"></button>
<button id="control-1"></button>
<button id="control-2"></button>
<button id="control-3"></button>
<div id="status">getting status ...</div>
<script type="text/javascript">
document.addEventListener("click", setStatus);
var currentStatus = [0, 0, 0, 0];
getStatus();

function setStatus(e) {
  var target = e.target;
  var id = target.getAttribute("id");
  if(id.match("control")) {
    makeControl(id.replace("control-