code: function(node, root) {
      var pn = node.parentNode;
      while (pn) {
        if (pn == root) {
          break;
        }
        pn = pn.parentNode;
      }
      return !!pn;
    }
docs: test to see if node is below root