text: // Return the plain-text content of element e, recursing into child elements.
  // This method works like the textContent property
  function textContent(e) {
      var child, type, s = "";  // s holds the text of all children
      for(child = e.firstChild; child != null; child = child.nextSibling) {
          type = child.nodeType;
          if (type === 3 || type === 4)  // Text and CDATASection nodes
              s += child.nodeValue;
          else if (type === 1)           // Recurse for Element nodes
              s += textContent(child);
      }
      return s;
  }
  