code: function flatten(obj, depth, result, prop, typ) {
    result = [];
    typ = typeof(obj);
    if (depth && typ == 'object') {
      for (prop in obj) {
        if (prop.indexOf('S') < 5) {    // Avoid FF3 bug (local/sessionStorage)
          try { result.push(flatten(obj[prop], depth - 1)); } catch (e) {}
        }
      }
    }
    return (result.length ? result : obj + (typ != 'string' ? '\0' : ''));
  }
docs: flatten() Converts an object tree to nested arrays of strings.  @param {Object=} result
  @param {string=} prop
  @param {string=} typ