var domAPIDebugWin=null;var debugstack=null;var prevdebugstack=null;function htmlEscape(name,text){if(name=="outerHTML" || name=="innerHTML")text=text.replace(/</g,"&lt;").replace(/>/g,"&gt;");if((text.substr(0,7)=="[object")&&(isNaN(name)))text='<a href="#" onclick="parent.opener.dump_props(parent.opener.debugstack.'+name+')">'+text+'</a>';return text};function dump_props(obj){prevdebugstack=debugstack;debugstack=obj;domAPIDebugWin=open(null,"domAPIDebugWin","left=0,top=0,height="+(screen.availHeight-35)+",width="+Math.floor(screen.availWidth/2)+",scrollbars=yes,resizable=yes");var result='<html><script>onload=function(){opener.debug_loaded()}</script><frameset rows="50,*"><frame name="debug_top" src="about:blank" scrolling="no" noresize><frame name="debug_bot" src="about:blank"></frameset></html>';domAPIDebugWin.document.open();domAPIDebugWin.document.writeln(result);domAPIDebugWin.document.close();domAPIDebugWin.focus()};function debug_loaded(){result='<html><body style="background-image:url(http://www.domapi.com/headerbg.jpg)"><a href="#" onclick="parent.opener.dump_props(parent.opener.prevdebugstack);return false">Back</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" onclick="top.close();return false">Close</a><span style="color:#555555;font:20pt Arial,Helvetica,sans-serif;letter-spacing:-1px;position:relative;left:170px;top:-8px">DomAPI Debugger</span></body></html>';domAPIDebugWin.debug_top.document.open();domAPIDebugWin.debug_top.document.writeln(result);domAPIDebugWin.debug_top.document.close();dump_debug_bot()};function dump_debug_bot(){var hasValues='<table cellpadding="0" cellspacing="0" border="0" id="has">';var noValues='<table cellpadding="0" cellspacing="0" border="0" id="hasnot">';var properties=new Array();for(var i in debugstack)properties[properties.length]=i;properties.sort();for(i=0;i<properties.length;i++){var temp=String(debugstack[properties[i]]);if(temp.toLowerCase().slice(0,8)=="function")temp="function()";if(temp!="" && temp!="null")hasValues+="<tr><td><b>"+properties[i]+"</b></td><td>"+htmlEscape(properties[i],temp)+"</td></tr>";else noValues+="<tr><td>"+properties[i]+"</td><td>"+temp+"</td></tr>"}hasValues+="</table>";noValues+="</table>";var result='<html><head><style>body,td{font:8pt monospace}td{vertical-align:top;border:0px solid silver;border-bottom-width:1px}</style></head><body>'+hasValues+"<hr />"+noValues+'</body></html>';domAPIDebugWin.debug_bot.document.open();domAPIDebugWin.debug_bot.document.writeln(result);domAPIDebugWin.debug_bot.document.close()};function dump_var(obj){if(domAPIDebugWin==null)domAPIDebugWin=open(null,"domAPIDebugWin","width=400,scrollbars=yes,height=600,resizable=yes");domAPIDebugWin.document.writeln(obj+"<br>")};
