k;
      }      
    }
    
  }
}

function findActiveClause(root, path) {
  var clauses = new ClauseWalker(root);
  var $clause;
  var found = false;
  var path = path || [];
  
  while ($clause = clauses.nextNode()) {
    var rect = $clause.getBoundingClientRect();
    var $header = $clause.children[0];
    var marginTop = parseInt(getComputedStyle($header)["margin-top"]);
    
    if ((rect.top - marginTop) <= 0 && rect.bottom > 0) {
      found = true;
      return findActiveClause($clause, path.concat(