/*************************************
Javascript Object Tree
version 1.0
last revision:04.11.2004
S.G. Chipman
steve@slayeroffice.com
http://slayeroffice.com
Please notify me of any modifications
you make to this code so that I can
update the version hosted on slayeroffice.com
************************************/
var so_d=document;
var so_types=new Array();
var so_objs=new Array();
var so_hidden = new Array();
document.onkeydown=so_handleKeyEvent;
so_opera = window.opera;
function so_init() {
if(document.all && !so_opera)return alert("Sorry, this only works in Mozilla and Firefox currently.");
mObj=so_d.body.appendChild(so_d.createElement("div"));
mObj.id="so_mContainer";
sObj=so_d.body.appendChild(so_d.createElement("link"));
sObj.id="so_mStyle";
sObj.type="text/css";
sObj.rel="StyleSheet";
sObj.href="http://slayeroffice.com/tools/js_tree/js_tree.css";
so_parseJS();
so_buildTree();
cObj=mObj.appendChild(so_d.createElement("div"));
cObj.className="credits";
cObj.innerHTML = "[esc] to close
Javascript Object Tree
version 1.0
last revision:04.11.2004
slayeroffice.com";
window.scrollTo(0,0);
}
function so_format(str) {
str=str.replace(//g,">");
return str;
}
function so_parseJS() {
win=window;
for(js in win) {
try {
if(win[js] && js.toString().indexOf("so_")==-1 && win[js].toString().indexOf("[native code]")==-1) {
t=typeof(win[js]);
if(!so_objs[t.toString()]) {
so_types[so_types.length]=t;;
so_objs[t]=new Array();
}
if(win[js].toString().indexOf("[object")==-1) {
index=so_objs[t].length
so_objs[t][index]=new Array();
so_objs[t][index][0]=js;
so_objs[t][index][1]=so_format(win[js].toString());
}
}
} catch(err) { }
}
}
function so_show(objID) {
so_d.getElementById(objID).style.display=so_hidden[objID]?"none":"block";
so_hidden[objID]=so_hidden[objID]?0:1;
}
function so_changeSpan(spanID) {
if(so_d.getElementById(spanID).innerHTML.indexOf("+")>-1){
so_d.getElementById(spanID).innerHTML="[-]";
} else {
so_d.getElementById(spanID).innerHTML="[+]";
}
}
function so_buildTree() {
mHTML="