/*
Copyright Scand LLC http://www.scbr.com
To use this component please contact info@scbr.com to obtain license

*/var _all_used_trees=new Array();
dhtmlXTreeObject.prototype._createSelfA2=dhtmlXTreeObject.prototype._createSelf;
dhtmlXTreeObject.prototype._createSelf=function(){
 _all_used_trees[_all_used_trees.length]=this;
 return this._createSelfA2();
}

function dhtmlxtreeErrorReport(a,b,c){
 var str=a+" ["+b+"]";
 if(a=='LoadXML')
{
 str+="<br/>"+c[0].responseText+"</br>"+c[0].status;
}

 window.onerror(str,"none","none");
}

function dhtmlxtreeReport(node){
 var that=node.parentNode;
 that.lastChild.innerHTML="<textarea style='width:100%;height:300px;'></textarea>";
 var rep=that.childNodes[1].innerHTML;
 for(var a=0;a<_all_used_trees.length;a++){
 var atree=_all_used_trees[a];
 rep+="\n\n Tree "+a+"\n";
 for(b in atree){
 if(typeof(atree[b])=="function")continue;
 rep+=b+"="+atree[b]+"\n";
}
 rep+="---------------------\n";
 if(atree.XMLLoader){
 try{
 var z=atree.XMLLoader.getXMLTopNode("tree")
 if(document.all)
 rep+=z.xml+"\n";
 else{
 var xmlSerializer = new XMLSerializer();
 rep+=xmlSerializer.serializeToString(z)+"\n";
}
}
 catch(e){
 rep+="XML not recognised\n";
}
}

 rep+="---------------------\n";
 for(var i=0;i<atree.globalNodeStorage.length;i++){
 var n=atree.globalNodeStorage[i];
 rep+="Node: "+n.id;
 rep+=" Childs: "+n.childsCount;
 for(var j=0;j<n.childsCount;j++)
 rep+=" ch"+j+":"+n.childNodes[j].id;
 rep+="\n";
}

}
 that.lastChild.childNodes[0].value=rep;
}

dhtmlxError.catchError("ALL",dhtmlxtreeErrorReport);



