 else { reply = "" + data; } return reply; }  function indent(count, options) { var strarr = []; strarr.push(options.baseIndent); for (var i=0; i<count; i++) { strarr.push(options.childIndent); } return strarr.join(""); };  return recursive(data, showLevels, 0, opt); 
function indent(count, options) { var strarr = []; strarr.push(options.baseIndent); for (var i=0; i<count; i++) { strarr.push(options.childIndent); } return strarr.join(""); };  return recursive(data, showLevels, 0, opt); 
dwr.util.toDescriptiveString2 = function(data, showLevels, options) {	if (showLevels === undefined) showLevels = 1;	var opt = {};	if (dwr.util._isObject(options)) opt = options;	var defaultoptions = {		escapeHtml:false,		baseIndent: "",		childIndent: "\u00A0\u00A0",		lineTerminator: "\n",		oneLineMaxItems: 5,		oneLineStringMaxLength: 13,		propertyNameMaxLength: 30 	};	for (var p in defaultoptions) if (!(p in opt)) opt[p] = defaultoptions[p];	if (typeof options == "number") {		var baseDepth = options;		opt.baseIndent = dwr.util._indent2(baseDepth, opt);	}	var skipDomProperties = {		document:true, ownerDocument:true,		all:true,		parentElement:true, parentNode:true, offsetParent:true,		children:true, firstChild:true, lastChild:true,		previousSibling:true, nextSibling:true,		innerHTML:true, outerHTML:true,		innerText:true, outerText:true, textContent:true,		attributes:true,		style:true, currentStyle:true, runtimeStyle:true,		parentTextEdit:true	};		function recursive(data, showLevels, indentDepth, options) {		var reply = "";				// string		if (typeof data == "string") {			var str = data;			if (showLevels == 0 && str.length > options.oneLineStringMaxLength)				str = str.substring(0, options.oneLineStringMaxLength-3) + "...";			if (options.escapeHtml) {				// Do the escape separately for every line as escapeHtml() on some 				// browsers (IE) will strip line breaks and we want to preserve them				var lines = str.split("\n");				for (var i = 0; i < lines.length; i++) lines[i] = dwr.util.escapeHtml(lines[i]);				str = lines.join("\n");			}			if (showLevels == 0) { // Short format				str = str.replace(/\n|\r|\t/g, function(ch) {					switch (ch) {						case "\n": return "\\n";						case "\r": return "";						case "\t": return "\\t";					}				});			}			else { // Long format				str = str.replace(/\n|\r|\t/g, function(ch) {					switch (ch) {						case "\n": return options.lineTerminator + indent(indentDepth+1, options);						case "\r": return "";						case "\t": return "\\t";					}				});			}			reply = '"' + str + '"';		}				// function		else if (typeof data == "function") {			reply = "function";		}			// Array		else if (dwr.util._isArray(data)) {			if (showLevels == 0) { // Short format (don't show items)				if (data.length > 0)					reply = "[...]";				else					reply = "[]";			}			else { // Long format (show items)				var strarr = [];				strarr.push("[");				var count = 0;				for (var i = 0; i < data.length; i++) {					if (! (i in data)) continue;					var itemvalue = data[i];					if (count > 0) strarr.push(", ");					if (showLevels == 1) { // One-line format						if (count == options.oneLineMaxItems) {							strarr.push("...");							break;						}					}					else { // Multi-line format						strarr.push(options.lineTerminator + indent(indentDepth+1, options));					}					if (i != count) {						strarr.push(i);						strarr.push(":");					}					strarr.push(recursive(itemvalue, showLevels-1, indentDepth+1, options));					count++;				}				if (showLevels > 1) strarr.push(options.lineTerminator + indent(indentDepth, options));				strarr.push("]");				reply = strarr.join("");			}		}				// Objects except Date		else if (dwr.util._isObject(data) && !dwr.util._isDate(data)) {			if (showLevels == 0) { // Short format (don't show properties)				reply = dwr.util._detailedTypeOf(data);			}			else { // Long format (show properties)				var strarr = [];				if (dwr.util._detailedTypeOf(data) != "Object") {					strarr.push(dwr.util._detailedTypeOf(data));					if (typeof data.valueOf() != "object") {						strarr.push(":");						strarr.push(recursive(data.valueOf(), 1, indentDepth, options));					}					strarr.push(" ");				}				strarr.push("{");				var isDomObject = dwr.util._isHTMLElement(data); 				var count = 0;				for (var prop in data) {					var propvalue = data[prop];					if (isDomObject) {						if (!propvalue) continue;						if (typeof propvalue == "function") continue;						if (skipDomProperties[prop]) continue;						if (prop.toUpperCase() == prop) continue;					}					if (count > 0) strarr.push(", ");					if (showLevels == 1) { // One-line format						if (count == options.oneLineMaxItems) {							strarr.push("...");							break;						}					}					else { // Multi-line format						strarr.push(options.lineTerminator + indent(indentDepth+1, options));					}					strarr.push(prop.length > options.propertyNameMaxLength ? prop.substring(0, options.propertyNameMaxLength-3) + "..." : prop);					strarr.push(":");					strarr.push(recursive(propvalue, showLevels-1, indentDepth+1, options));					count++;				}				if (showLevels > 1 && count > 0) strarr.push(options.lineTerminator + indent(indentDepth, options));				strarr.push("}");				reply = strarr.join("");			}		}		// undefined, null, number, boolean, Date		else {			reply = "" + data;		}				return reply;	}	function indent(count, options) {		var strarr = [];		strarr.push(options.baseIndent);		for (var i=0; i<count; i++) {			strarr.push(options.childIndent);		}		return strarr.join("");	};		return recursive(data, showLevels, 0, opt);}
266	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/266/86af64c94d7f11076cb710a350ae4aff2de7554c/util.js/buggy/java/org/directwebremoting/util.js