﻿var op2, ob_tb, ob_url, selected_node_id, ob_xmlhttp_xp;

function ob_wk(os, url) {
    var ot = os.parentNode.nextSibling.firstChild.nextSibling;
    var lensrc = (os.src.length - 8);
    var s = os.src.substr(lensrc, 8);

    if (s == 'inus.gif') {
        ot.style.display = 'none';
        os.src = obTreeXP_TreeStyle_Path + '/plusik.gif';
    }
    
    if (s == 'usik.gif') {
        ot.style.display = 'block';
        os.src = obTreeXP_TreeStyle_Path + '/minus.gif';
        
        if (url != '') {
            var s = os.parentNode.nextSibling.firstChild.nextSibling.innerHTML;
            if (s != 'Loading ...') {
                return;
            }
            ob_url = url;
            ob_tb = os.parentNode.nextSibling.firstChild.nextSibling;
            
            window.setTimeout('ob_tm()', 100);
        }
    }
}

function ob_ft(e) {
    if (e.tagName == 'TABLE' && e.className == 'ob_zz') {
        if (typeof op2 != 'undefined') {
            op2.style.backgroundColor = 'transparent';
            if(obTreeXP_Condensed) {
                op2.style.border = '0px solid #999999';
                op2.style.margin = '1px';
            }
        }
    
        e.style.backgroundColor = obTreeXP_SelectedNode_Background_Color;

        if(!obTreeXP_Condensed) {
            e.style.border = obTreeXP_SelectedNode_Border;
            e.style.margin = '0px';
        }
    
        op2 = e;
        selected_node_id = e.firstChild.firstChild.childNodes[obTreeXP_ChildID].id;
    } else {
        ob_ft(e.parentNode);
    }
}

function ob_os(e){
    var os = e.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.firstChild.firstChild;
    if (os != null) {
        if ((typeof os != 'undefined') && (os.tagName == 'IMG')) {
            var lensrc = (os.src.length - 8);
            var s = os.src.substr(lensrc, 8);
            
            if ((s == 'inus.gif') || (s == 'usik.gif')) {
                e.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.firstChild.firstChild.onclick();
            }
        } else {
            ob_os(e.parentNode);
        }
    }
}

function ob_rsc_xp() {
    if (ob_xmlhttp_xp.readyState==4){
        ob_tb.innerHTML=ob_xmlhttp_xp.responseText;
    }
}

function ob_tm(){
    if(!ob_xmlhttp_xp) {
        create_ob_xmlhttp_xp();
    }
    if(ob_xmlhttp_xp){
        ob_xmlhttp_xp.open('GET', ob_url,true);
        ob_xmlhttp_xp.onreadystatechange=ob_rsc_xp;
        ob_xmlhttp_xp.send(null);
    }
}

function create_ob_xmlhttp_xp() {
    try {
		ob_xmlhttp_xp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch(e) {
		try {
			ob_xmlhttp_xp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch(oc) {
			ob_xmlhttp_xp = null;
		}
	}

	if(!ob_xmlhttp_xp && typeof XMLHttpRequest!="undefined") {
		ob_xmlhttp_xp = new XMLHttpRequest();
	}
}
