"); browser.document.writeln("

document:

"); browser.document.close(); // returns false for event handlers return false; } // recurrsive function to get properties of objects function getProps(obj){ // for loop to run through properties of incoming object for(var prop in obj){ browser.document.writeln("
  • "); // if the property is an object itself, but not null... if(typeof(obj[prop])=="object" && obj[prop]!=null){ // get index of object in objects array valIndex = arrayIndexOf(objects, obj[prop], 0); // if not in index array, add it and create its key if(valIndex==-1){ valIndex = objects.length; key = ((new Date()).getTime()%10000) + "_" + (Math.floor(Math.random()*10000)); objects[valIndex] = new Array(obj[prop], key, false); } // write link for this object to call openDOMBrowser with its key browser.document.writeln(""+prop+ " : "+(new String(obj[prop])).replace(/"); // determine whether object should be expanded/was already expanded if(objects[valIndex][2] && !expanded[objects[valIndex][1]]){ // if it needs to be expanded, add to expanded array expanded[objects[valIndex][1]] = true; // write nested list tag and recurrsive call to getProps browser.document.writeln(""); } } else // if not an object, just write property, value pair browser.document.writeln(""+prop+" : " + (new String(obj[prop])).replace(/"); } } // function to find object in an array by field value function a