docs: function deepCopy(obj)
  {
  	var ret, key;
  	var marker = '__deepCopy';
  
  	if (obj && obj[marker])
  		throw (new Error('attempted deep copy of cyclic object'));
  
  	if (obj && obj.constructor == Object) {
  		ret = {};
  		obj[marker] = true;
  
  		for (key in obj) {
  			if (key == marker)
  				continue;
  
  			ret[key] = deepCopy(obj[key]);
  		}
  
  		delete (obj[marker]);
  		return (ret);
  	}
  
  	if (obj && obj.constructor == Array) {
  		ret = [];
  		obj[marker] = true;
  
  		for (key = 0; key < obj.length; key++)
  			ret.push(deepCopy(obj[key]));
  
  		delete (obj[marker]);
  		return (ret);
  	}
  
  	/*
  	 * It must be a primitive type -- just return it.
  	 */
  	return (obj);
  }