');
          child.setAttribute('branch', b.toString());
          child.setAttribute('depth', d.toString());
          current.appendChild(child);
          current = child;
        }
        frag.appendChild(node);
      }
      document.body.appendChild(frag);
    };
  </script>
</html>
