function jquery_dump($obj) {
var dumphtml = [];
for(var i = 0; i < $obj.length; i++) {
dumphtml.push('[' + i + '] '
+ '<' + $obj[i].nodeName.toLowerCase());
for(var j = 0; j < $obj[i].attributes.length; j++) {
dumphtml.push(' ' + $obj[i].attributes[j].nodeName + '="'
+ $obj[i].attributes[j].nodeValue + '"');
}
dumphtml.push('>' + $obj[i].innerHTML);
dumphtml.push('<\/' + $obj[i].nodeName.toLowerCase() + '>');
dumphtml.push("\n");
}
alert(dumphtml.join(''));
}