function xmlPointer(_1){
this.d=_1;
};
xmlPointer.prototype={text:function(){
if(!_isFF){
return this.d.xml;
}
var x=new XMLSerializer();
return x.serializeToString(this.d);
},get:function(_3){
return this.d.getAttribute(_3);
},exists:function(){
return !!this.d;
},content:function(){
return this.d.firstChild?this.d.firstChild.data:"";
},each:function(_4,f,t,i){
var a=this.d.childNodes;
var c=new xmlPointer();
if(a.length){
for(i=i||0;i<a.length;i++){
if(a[i].tagName==_4){
c.d=a[i];
if(f.apply(t,[c,i])==-1){
return;
}
}
}
}
},get_all:function(){
var a={};
var b=this.d.attributes;
for(var i=0;i<b.length;i++){
a[b[i].name]=b[i].value;
}
return a;
},sub:function(_d){
var a=this.d.childNodes;
var c=new xmlPointer();
if(a.length){
for(var i=0;i<a.length;i++){
if(a[i].tagName==_d){
c.d=a[i];
return c;
}
}
}
},up:function(_11){
return new xmlPointer(this.d.parentNode);
},set:function(_12,val){
this.d.setAttribute(_12,val);
},clone:function(_14){
return new xmlPointer(this.d);
},sub_exists:function(_15){
var a=this.d.childNodes;
if(a.length){
for(var i=0;i<a.length;i++){
if(a[i].tagName==_15){
return true;
}
}
}
return false;
},through:function(_18,_19,v,f,t){
var a=this.d.childNodes;
if(a.length){
for(var i=0;i<a.length;i++){
if(a[i].tagName==_18&&a[i].getAttribute(_19)!=null&&a[i].getAttribute(_19)!=""&&(!v||a[i].getAttribute(_19)==v)){
var c=new xmlPointer(a[i]);
f.apply(t,[c,i]);
}
var w=this.d;
this.d=a[i];
this.through(_18,_19,v,f,t);
this.d=w;
}
}
}};
function dhtmlXTreeObject(_21,_22,_23,_24){
if(_isIE){
try{
document.execCommand("BackgroundImageCache",false,true);
}
catch(e){
}
}
if(typeof (_21)!="object"){
this.parentObject=document.getElementById(_21);
}else{
this.parentObject=_21;
}
this._itim_dg=true;
this.dlmtr=",";
this.dropLower=false;
this.enableIEImageFix();
this.xmlstate=0;
this.mytype="tree";
this.smcheck=true;
this.width=_22;
this.height=_23;
this.rootId=_24;
this.childCalc=null;
this.def_img_x="18px";
this.def_img_y="18px";
this.def_line_img_x="18px";
this.def_line_img_y="18px";
this._dragged=new Array();
this._selected=new Array();
this.style_pointer="pointer";
if(_isIE){
this.style_pointer="hand";
}
this._aimgs=true;
this.htmlcA=" [";
this.htmlcB="]";
this.lWin=window;
this.cMenu=0;
this.mlitems=0;
this.dadmode=0;
this.slowParse=false;
this.autoScroll=true;
this.hfMode=0;
this.nodeCut=new Array();
this.XMLsource=0;
this.XMLloadingWarning=0;
this._idpull={};
this._pullSize=0;
this.treeLinesOn=true;
this.tscheck=false;
this.timgen=true;
this.dpcpy=false;
this._ld_id=null;
this._oie_onXLE=[];
this.imPath="treeGfx/";
this.checkArray=new Array("iconUncheckAll.gif","iconCheckAll.gif","iconCheckGray.gif","iconUncheckDis.gif","iconCheckDis.gif","iconCheckDis.gif");
this.radioArray=new Array("radio_off.gif","radio_on.gif","radio_on.gif","radio_off.gif","radio_on.gif","radio_on.gif");
this.lineArray=new Array("line2.gif","line3.gif","line4.gif","blank.gif","blank.gif","line1.gif");
this.minusArray=new Array("minus2.gif","minus3.gif","minus4.gif","minus.gif","minus5.gif");
this.plusArray=new Array("plus2.gif","plus3.gif","plus4.gif","plus.gif","plus5.gif");
this.imageArray=new Array("leaf.gif","folderOpen.gif","folderClosed.gif");
this.cutImg=new Array(0,0,0);
this.cutImage="but_cut.gif";
this.dragger=new dhtmlDragAndDropObject();
this.htmlNode=new dhtmlXTreeItemObject(this.rootId,"",0,this);
this.htmlNode.htmlNode.childNodes[0].childNodes[0].style.display="none";
this.htmlNode.htmlNode.childNodes[0].childNodes[0].childNodes[0].className="hiddenRow";
this.allTree=this._createSelf();
this.allTree.appendChild(this.htmlNode.htmlNode);
if(_isFF){
this.allTree.childNodes[0].width="100%";
}
var _25=this;
this.allTree.onselectstart=new Function("return false;");
if(_isMacOS){
this.allTree.oncontextmenu=function(e){
return _25._doContClick(e||window.event);
};
}
this.allTree.onmousedown=function(e){
return _25._doContClick(e||window.event);
};
this.XMLLoader=new dtmlXMLLoaderObject(this._parseXMLTree,this,true,this.no_cashe);
if(_isIE){
this.preventIECashing(true);
}
if(window.addEventListener){
window.addEventListener("unload",function(){
try{
_25.destructor();
}
catch(e){
}
},false);
}
if(window.attachEvent){
window.attachEvent("onunload",function(){
try{
_25.destructor();
}
catch(e){
}
});
}
this.dhx_Event();
this._onEventSet={onMouseIn:function(){
this.ehlt=true;
},onMouseOut:function(){
this.ehlt=true;
},onSelect:function(){
this._onSSCF=true;
}};
return this;
};
dhtmlXTreeObject.prototype.setDataMode=function(_28){
this._datamode=_28;
};
dhtmlXTreeObject.prototype._doContClick=function(ev){
if(ev.button!=2){
if(this._acMenu){
this.cMenu._contextEnd();
}
return true;
}
var el=(_isIE?ev.srcElement:ev.target);
while((el)&&(el.tagName!="BODY")){
if(el.parentObject){
break;
}
el=el.parentNode;
}
if((!el)||(!el.parentObject)){
return true;
}
var obj=el.parentObject;
this._acMenu=(obj.cMenu||this.cMenu);
if(this._acMenu){
el.contextMenuId=obj.id;
el.contextMenu=this._acMenu;
el.a=this._acMenu._contextStart;
if(_isIE){
ev.srcElement.oncontextmenu=function(){
event.cancelBubble=true;
return false;
};
}
el.a(el,ev);
el.a=null;
ev.cancelBubble=true;
return false;
}
return true;
};
dhtmlXTreeObject.prototype.enableIEImageFix=function(_2c){
if(!_2c){
this._getImg=function(id){
return document.createElement((id==this.rootId)?"div":"img");
};
this._setSrc=function(a,b){
a.src=b;
};
this._getSrc=function(a){
return a.src;
};
}else{
this._getImg=function(){
var z=document.createElement("DIV");
z.innerHTML="&nbsp;";
z.className="dhx_bg_img_fix";
return z;
};
this._setSrc=function(a,b){
a.style.backgroundImage="url("+b+")";
};
this._getSrc=function(a){
var z=a.style.backgroundImage;
return z.substr(4,z.length-5);
};
}
};
dhtmlXTreeObject.prototype.destructor=function(){
for(var a in this._idpull){
var z=this._idpull[a];
if(!z){
continue;
}
z.parentObject=null;
z.treeNod=null;
z.childNodes=null;
z.span=null;
z.tr.nodem=null;
z.tr=null;
z.htmlNode.objBelong=null;
z.htmlNode=null;
this._idpull[a]=null;
}
this.allTree.innerHTML="";
this.XMLLoader.destructor();
for(var a in this){
this[a]=null;
}
};
function cObject(){
return this;
};
cObject.prototype=new Object;
cObject.prototype.clone=function(){
function _dummy(){
};
_dummy.prototype=this;
return new _dummy();
};
function dhtmlXTreeItemObject(_38,_39,_3a,_3b,_3c,_3d){
this.htmlNode="";
this.acolor="";
this.scolor="";
this.tr=0;
this.childsCount=0;
this.tempDOMM=0;
this.tempDOMU=0;
this.dragSpan=0;
this.dragMove=0;
this.span=0;
this.closeble=1;
this.childNodes=new Array();
this.userData=new cObject();
this.checkstate=0;
this.treeNod=_3b;
this.label=_39;
this.parentObject=_3a;
this.actionHandler=_3c;
this.images=new Array(_3b.imageArray[0],_3b.imageArray[1],_3b.imageArray[2]);
this.id=_3b._globalIdStorageAdd(_38,this);
if(this.treeNod.checkBoxOff){
this.htmlNode=this.treeNod._createItem(1,this,_3d);
}else{
this.htmlNode=this.treeNod._createItem(0,this,_3d);
}
this.htmlNode.objBelong=this;
return this;
};
dhtmlXTreeObject.prototype._globalIdStorageAdd=function(_3e,_3f){
if(this._globalIdStorageFind(_3e,1,1)){
_3e=_3e+"_"+(new Date()).valueOf();
return this._globalIdStorageAdd(_3e,_3f);
}
this._idpull[_3e]=_3f;
this._pullSize++;
return _3e;
};
dhtmlXTreeObject.prototype._globalIdStorageSub=function(_40){
if(this._idpull[_40]){
this._unselectItem(this._idpull[_40]);
this._idpull[_40]=null;
this._pullSize--;
}
if((this._locker)&&(this._locker[_40])){
this._locker[_40]=false;
}
};
dhtmlXTreeObject.prototype._globalIdStorageFind=function(_41,_42,_43,_44){
var z=this._idpull[_41];
if(z){
return z;
}
return null;
};
dhtmlXTreeObject.prototype._escape=function(str){
switch(this.utfesc){
case "none":
return str;
break;
case "utf8":
return encodeURI(str);
break;
default:
return escape(str);
break;
}
};
dhtmlXTreeObject.prototype._drawNewTr=function(_47,_48){
var tr=document.createElement("tr");
var td1=document.createElement("td");
var td2=document.createElement("td");
td1.appendChild(document.createTextNode(" "));
td2.colSpan=3;
td2.appendChild(_47);
tr.appendChild(td1);
tr.appendChild(td2);
return tr;
};
dhtmlXTreeObject.prototype.loadXMLString=function(_4c,_4d){
var _4e=this;
if(!this.parsCount){
this.callEvent("onXLS",[_4e,null]);
}
this.xmlstate=1;
if(_4d){
this.XMLLoader.waitCall=_4d;
}
this.XMLLoader.loadXMLString(_4c);
};
dhtmlXTreeObject.prototype.loadXML=function(_4f,_50){
if(this._datamode&&this._datamode!="xml"){
return this["load"+this._datamode.toUpperCase()](_4f,_50);
}
var _51=this;
if(!this.parsCount){
this.callEvent("onXLS",[_51,this._ld_id]);
}
this._ld_id=null;
this.xmlstate=1;
this.XMLLoader=new dtmlXMLLoaderObject(this._parseXMLTree,this,true,this.no_cashe);
if(_50){
this.XMLLoader.waitCall=_50;
}
this.XMLLoader.loadXML(_4f);
};
dhtmlXTreeObject.prototype._attachChildNode=function(_52,_53,_54,_55,_56,_57,_58,_59,_5a,_5b,_5c){
if(_5b&&_5b.parentObject){
_52=_5b.parentObject;
}
if(((_52.XMLload==0)&&(this.XMLsource))&&(!this.XMLloadingWarning)){
_52.XMLload=1;
this._loadDynXML(_52.id);
}
var _5d=_52.childsCount;
var _5e=_52.childNodes;
if(_5c){
if(_5c.tr.previousSibling.previousSibling){
_5b=_5c.tr.previousSibling.nodem;
}else{
_59=_59.replace("TOP","")+",TOP";
}
}
if(_5b){
var ik,jk;
for(ik=0;ik<_5d;ik++){
if(_5e[ik]==_5b){
for(jk=_5d;jk!=ik;jk--){
_5e[1+jk]=_5e[jk];
}
break;
}
}
ik++;
_5d=ik;
}
if(_59){
var _61=_59.split(",");
for(var i=0;i<_61.length;i++){
switch(_61[i]){
case "TOP":
if(_52.childsCount>0){
_5b=new Object;
_5b.tr=_52.childNodes[0].tr.previousSibling;
}
_52._has_top=true;
for(ik=_5d;ik>0;ik--){
_5e[ik]=_5e[ik-1];
}
_5d=0;
break;
}
}
}
var n;
if(!(n=this._idpull[_53])||n.span!=-1){
n=_5e[_5d]=new dhtmlXTreeItemObject(_53,_54,_52,this,_55,1);
_53=_5e[_5d].id;
_52.childsCount++;
}
if(!n.htmlNode){
n.label=_54;
n.htmlNode=this._createItem((this.checkBoxOff?1:0),n);
n.htmlNode.objBelong=n;
}
if(_56){
n.images[0]=_56;
}
if(_57){
n.images[1]=_57;
}
if(_58){
n.images[2]=_58;
}
var tr=this._drawNewTr(n.htmlNode);
if((this.XMLloadingWarning)||(this._hAdI)){
n.htmlNode.parentNode.parentNode.style.display="none";
}
if((_5b)&&(_5b.tr.nextSibling)){
_52.htmlNode.childNodes[0].insertBefore(tr,_5b.tr.nextSibling);
}else{
if(this.parsingOn==_52.id){
this.parsedArray[this.parsedArray.length]=tr;
}else{
_52.htmlNode.childNodes[0].appendChild(tr);
}
}
if((_5b)&&(!_5b.span)){
_5b=null;
}
if(this.XMLsource){
if((_5a)&&(_5a!=0)){
n.XMLload=0;
}else{
n.XMLload=1;
}
}
n.tr=tr;
tr.nodem=n;
if(_52.itemId==0){
tr.childNodes[0].className="hiddenRow";
}
if((_52._r_logic)||(this._frbtr)){
this._setSrc(n.htmlNode.childNodes[0].childNodes[0].childNodes[1].childNodes[0],this.imPath+this.radioArray[0]);
}
if(_59){
var _61=_59.split(",");
for(var i=0;i<_61.length;i++){
switch(_61[i]){
case "SELECT":
this.selectItem(_53,false);
break;
case "CALL":
this.selectItem(_53,true);
break;
case "CHILD":
n.XMLload=0;
break;
case "CHECKED":
if(this.XMLloadingWarning){
this.setCheckList+=this.dlmtr+_53;
}else{
this.setCheck(_53,1);
}
break;
case "HCHECKED":
this._setCheck(n,"unsure");
break;
case "OPEN":
n.openMe=1;
break;
}
}
}
if(!this.XMLloadingWarning){
if((this._getOpenState(_52)<0)&&(!this._hAdI)){
this.openItem(_52.id);
}
if(_5b){
this._correctPlus(_5b);
this._correctLine(_5b);
}
this._correctPlus(_52);
this._correctLine(_52);
this._correctPlus(n);
if(_52.childsCount>=2){
this._correctPlus(_5e[_52.childsCount-2]);
this._correctLine(_5e[_52.childsCount-2]);
}
if(_52.childsCount!=2){
this._correctPlus(_5e[0]);
}
if(this.tscheck){
this._correctCheckStates(_52);
}
if(this._onradh){
if(this.xmlstate==1){
var old=this.onXLE;
this.onXLE=function(id){
this._onradh(_53);
if(old){
old(id);
}
};
}else{
this._onradh(_53);
}
}
}
return n;
};
dhtmlXTreeObject.prototype.insertNewItem=function(_67,_68,_69,_6a,_6b,_6c,_6d,_6e,_6f){
var _70=this._globalIdStorageFind(_67);
if(!_70){
return (-1);
}
var _71=this._attachChildNode(_70,_68,_69,_6a,_6b,_6c,_6d,_6e,_6f);
return _71;
};
dhtmlXTreeObject.prototype.insertNewChild=function(_72,_73,_74,_75,_76,_77,_78,_79,_7a){
return this.insertNewItem(_72,_73,_74,_75,_76,_77,_78,_79,_7a);
};
dhtmlXTreeObject.prototype._parseXMLTree=function(a,b,c,d,xml){
var p=new xmlPointer(xml.getXMLTopNode("tree"));
a._parse(p);
a._p=p;
};
dhtmlXTreeObject.prototype._parseItem=function(c,_82,_83,_84){
var id;
if(this._srnd&&(!this._idpull[id=c.get("id")]||!this._idpull[id].span)){
this._addItemSRND(_82.id,id,c);
return;
}
var a=c.get_all();
if((typeof (this.waitUpdateXML)=="object")&&(!this.waitUpdateXML[a.id])){
this._parse(c,a.id,1);
return;
}
var zST=[];
if(a.select){
zST.push("SELECT");
}
if(a.top){
zST.push("TOP");
}
if(a.call){
nodeAskingCall=a.id;
}
if(a.checked==-1){
zST.push("HCHECKED");
}else{
if(a.checked){
zST.push("CHECKED");
}
}
if(a.open){
zST.push("OPEN");
}
if(this.waitUpdateXML){
if(this._globalIdStorageFind(a.id)){
var _88=this.updateItem(a.id,a.text,a.im0,a.im1,a.im2,a.checked);
}else{
if(this.npl==0){
zST.push("TOP");
}else{
_83=_82.childNodes[this.npl];
}
var _88=this._attachChildNode(_82,a.id,a.text,0,a.im0,a.im1,a.im2,zST.join(","),a.child,0,_83);
_83=null;
}
}else{
var _88=this._attachChildNode(_82,a.id,a.text,0,a.im0,a.im1,a.im2,zST.join(","),a.child,(_84||0),_83);
}
if(a.tooltip){
_88.span.parentNode.parentNode.title=a.tooltip;
}
if(a.style){
if(_88.span.style.cssText){
_88.span.style.cssText+=(";"+a.style);
}else{
_88.span.setAttribute("style",_88.span.getAttribute("style")+"; "+a.style);
}
}
if(a.radio){
_88._r_logic=true;
}
if(a.nocheckbox){
_88.span.parentNode.previousSibling.previousSibling.childNodes[0].style.display="none";
_88.nocheckbox=true;
}
if(a.disabled){
if(a.checked!=null){
this._setCheck(_88,convertStringToBoolean(a.checked));
}
this.disableCheckbox(_88,1);
}
_88._acc=a.child||0;
if(this.parserExtension){
this.parserExtension._parseExtension(node.childNodes[i],this.parserExtension,a.id,parentId);
}
this.setItemColor(_88,a.aCol,a.sCol);
if(a.locked=="1"){
this.lockItem(_88.id,true,true);
}
if((a.imwidth)||(a.imheight)){
this.setIconSize(a.imwidth,a.imheight,_88);
}
if((a.closeable=="0")||(a.closeable=="1")){
this.setItemCloseable(_88,a.closeable);
}
var _89="";
if(a.topoffset){
this.setItemTopOffset(_88,a.topoffset);
}
if((!this.slowParse)||(typeof (this.waitUpdateXML)=="object")){
if(c.sub_exists("item")){
_89=this._parse(c,a.id,1);
}
}
if(_89!=""){
this.nodeAskingCall=_89;
}
c.each("userdata",function(u){
this.setUserData(c.get("id"),u.get("name"),u.content());
},this);
};
dhtmlXTreeObject.prototype._parse=function(p,_8c,_8d,_8e){
if(this._srnd&&!this.parentObject.offsetHeight){
var _8f=this;
return window.setTimeout(function(){
_8f._parse(p,_8c,_8d,_8e);
},100);
}
if(!p.exists()){
return;
}
this.skipLock=true;
this.parsCount=this.parsCount?(this.parsCount+1):1;
this.XMLloadingWarning=1;
this.nodeAskingCall="";
if(!_8c){
_8c=p.get("id");
if(p.get("radio")){
this.htmlNode._r_logic=true;
}
this.parsingOn=_8c;
this.parsedArray=new Array();
this.setCheckList="";
}
var _90=this._globalIdStorageFind(_8c);
if(!_90){
return dhtmlxError.throwError("DataStructure","XML reffers to not existing parent");
}
if((_90.childsCount)&&(!_8e)&&(!this._edsbps)&&(!_90._has_top)){
var _91=_90.childNodes[_90.childsCount-1];
}else{
var _91=0;
}
this.npl=0;
p.each("item",function(c,i){
_90.XMLload=1;
if((this._epgps)&&(this._epgpsC==this.npl)){
this._setNextPageSign(_90,this.npl+1*(_8e||0),_8d,node);
return -1;
}
this._parseItem(c,_90,_91);
this.npl++;
},this,_8e);
if(!_8d){
p.each("userdata",function(u){
this.setUserData(p.get("id"),u.get("name"),u.content());
},this);
_90.XMLload=1;
if(this.waitUpdateXML){
this.waitUpdateXML=false;
for(var i=_90.childsCount-1;i>=0;i--){
if(_90.childNodes[i]._dmark){
this.deleteItem(_90.childNodes[i].id);
}
}
}
var _96=this._globalIdStorageFind(this.parsingOn);
for(var i=0;i<this.parsedArray.length;i++){
_90.htmlNode.childNodes[0].appendChild(this.parsedArray[i]);
}
this.lastLoadedXMLId=_8c;
this.XMLloadingWarning=0;
var _97=this.setCheckList.split(this.dlmtr);
for(var n=0;n<_97.length;n++){
if(_97[n]){
this.setCheck(_97[n],1);
}
}
if((this.XMLsource)&&(this.tscheck)&&(this.smcheck)&&(_90.id!=this.rootId)){
if(_90.checkstate===0){
this._setSubChecked(0,_90);
}else{
if(_90.checkstate===1){
this._setSubChecked(1,_90);
}
}
}
if(this.onXLE){
this.onXLE(this,_8c);
}
this._redrawFrom(this,null,_8e);
if(p.get("order")&&p.get("order")!="none"){
this._reorderBranch(_90,p.get("order"),true);
}
if(this.nodeAskingCall!=""){
this.selectItem(this.nodeAskingCall,true);
}
if(this._branchUpdate){
this._branchUpdateNext(p);
}
}
if(this.parsCount==1){
this.parsingOn=null;
if((!this._edsbps)||(!this._edsbpsA.length)){
var _99=this;
window.setTimeout(function(){
_99.callEvent("onXLE",[_99,_8c]);
},1);
this.xmlstate=0;
}
this.skipLock=false;
}
this.parsCount--;
if((this._epgps)&&(_8e)){
this._setPrevPageSign(_90,(_8e||0),_8d,node);
}
return this.nodeAskingCall;
};
dhtmlXTreeObject.prototype._branchUpdateNext=function(p){
p.each("item",function(c){
var nid=c.get("id");
if(this._idpull[nid]&&(!this._idpull[nid].XMLload)){
return;
}
this._branchUpdate++;
this.smartRefreshItem(c.get("id"),c);
},this);
this._branchUpdate--;
};
dhtmlXTreeObject.prototype.checkUserData=function(_9d,_9e){
if((_9d.nodeType==1)&&(_9d.tagName=="userdata")){
var _9f=_9d.getAttribute("name");
if((_9f)&&(_9d.childNodes[0])){
this.setUserData(_9e,_9f,_9d.childNodes[0].data);
}
}
};
dhtmlXTreeObject.prototype._redrawFrom=function(_a0,_a1,_a2,_a3){
if(!_a1){
var _a4=_a0._globalIdStorageFind(_a0.lastLoadedXMLId);
_a0.lastLoadedXMLId=-1;
if(!_a4){
return 0;
}
}else{
_a4=_a1;
}
var acc=0;
for(var i=(_a2?_a2-1:0);i<_a4.childsCount;i++){
if((!this._branchUpdate)||(this._getOpenState(_a4)==1)){
if((!_a1)||(_a3==1)){
_a4.childNodes[i].htmlNode.parentNode.parentNode.style.display="";
}
}
if(_a4.childNodes[i].openMe==1){
this._openItem(_a4.childNodes[i]);
_a4.childNodes[i].openMe=0;
}
_a0._redrawFrom(_a0,_a4.childNodes[i]);
}
if((!_a4.unParsed)&&((_a4.XMLload)||(!this.XMLsource))){
_a4._acc=acc;
}
_a0._correctLine(_a4);
_a0._correctPlus(_a4);
};
dhtmlXTreeObject.prototype._createSelf=function(){
var div=document.createElement("div");
div.className="containerTableStyle";
div.style.width=this.width;
div.style.height=this.height;
this.parentObject.appendChild(div);
return div;
};
dhtmlXTreeObject.prototype._xcloseAll=function(_a8){
if(_a8.unParsed){
return;
}
if(this.rootId!=_a8.id){
var _a9=_a8.htmlNode.childNodes[0].childNodes;
var _aa=_a9.length;
for(var i=1;i<_aa;i++){
_a9[i].style.display="none";
}
this._correctPlus(_a8);
}
for(var i=0;i<_a8.childsCount;i++){
if(_a8.childNodes[i].childsCount){
this._xcloseAll(_a8.childNodes[i]);
}
}
};
dhtmlXTreeObject.prototype._xopenAll=function(_ac){
this._HideShow(_ac,2);
for(var i=0;i<_ac.childsCount;i++){
this._xopenAll(_ac.childNodes[i]);
}
};
dhtmlXTreeObject.prototype._correctPlus=function(_ae){
if(!_ae.htmlNode){
return;
}
var _af=_ae.htmlNode.childNodes[0].childNodes[0].childNodes[0].lastChild;
var _b0=_ae.htmlNode.childNodes[0].childNodes[0].childNodes[2].childNodes[0];
var _b1=this.lineArray;
if((this.XMLsource)&&(!_ae.XMLload)){
var _b1=this.plusArray;
this._setSrc(_b0,this.imPath+_ae.images[2]);
if(this._txtimg){
return (_af.innerHTML="[+]");
}
}else{
if((_ae.childsCount)||(_ae.unParsed)){
if((_ae.htmlNode.childNodes[0].childNodes[1])&&(_ae.htmlNode.childNodes[0].childNodes[1].style.display!="none")){
if(!_ae.wsign){
var _b1=this.minusArray;
}
this._setSrc(_b0,this.imPath+_ae.images[1]);
if(this._txtimg){
return (_af.innerHTML="[-]");
}
}else{
if(!_ae.wsign){
var _b1=this.plusArray;
}
this._setSrc(_b0,this.imPath+_ae.images[2]);
if(this._txtimg){
return (_af.innerHTML="[+]");
}
}
}else{
this._setSrc(_b0,this.imPath+_ae.images[0]);
}
}
var _b2=2;
if(!_ae.treeNod.treeLinesOn){
this._setSrc(_af,this.imPath+_b1[3]);
}else{
if(_ae.parentObject){
_b2=this._getCountStatus(_ae.id,_ae.parentObject);
}
this._setSrc(_af,this.imPath+_b1[_b2]);
}
};
dhtmlXTreeObject.prototype._correctLine=function(_b3){
if(!_b3.htmlNode){
return;
}
var _b4=_b3.parentObject;
if(_b4){
if((this._getLineStatus(_b3.id,_b4)==0)||(!this.treeLinesOn)){
for(var i=1;i<=_b3.childsCount;i++){
if(!_b3.htmlNode.childNodes[0].childNodes[i]){
break;
}
_b3.htmlNode.childNodes[0].childNodes[i].childNodes[0].style.backgroundImage="";
_b3.htmlNode.childNodes[0].childNodes[i].childNodes[0].style.backgroundRepeat="";
}
}else{
for(var i=1;i<=_b3.childsCount;i++){
if(!_b3.htmlNode.childNodes[0].childNodes[i]){
break;
}
_b3.htmlNode.childNodes[0].childNodes[i].childNodes[0].style.backgroundImage="url("+this.imPath+this.lineArray[5]+")";
_b3.htmlNode.childNodes[0].childNodes[i].childNodes[0].style.backgroundRepeat="repeat-y";
}
}
}
};
dhtmlXTreeObject.prototype._getCountStatus=function(_b6,_b7){
if(_b7.childsCount<=1){
if(_b7.id==this.rootId){
return 4;
}else{
return 0;
}
}
if(_b7.childNodes[0].id==_b6){
if(!_b7.id){
return 2;
}else{
return 1;
}
}
if(_b7.childNodes[_b7.childsCount-1].id==_b6){
return 0;
}
return 1;
};
dhtmlXTreeObject.prototype._getLineStatus=function(_b8,_b9){
if(_b9.childNodes[_b9.childsCount-1].id==_b8){
return 0;
}
return 1;
};
dhtmlXTreeObject.prototype._HideShow=function(_ba,_bb){
if((this.XMLsource)&&(!_ba.XMLload)){
if(_bb==1){
return;
}
_ba.XMLload=1;
this._loadDynXML(_ba.id);
return;
}
var _bc=_ba.htmlNode.childNodes[0].childNodes;
var _bd=_bc.length;
if(_bd>1){
if(((_bc[1].style.display!="none")||(_bb==1))&&(_bb!=2)){
this.allTree.childNodes[0].border="1";
this.allTree.childNodes[0].border="0";
nodestyle="none";
}else{
nodestyle="";
}
for(var i=1;i<_bd;i++){
_bc[i].style.display=nodestyle;
}
}
this._correctPlus(_ba);
};
dhtmlXTreeObject.prototype._getOpenState=function(_bf){
var z=_bf.htmlNode.childNodes[0].childNodes;
if(z.length<=1){
return 0;
}
if(z[1].style.display!="none"){
return 1;
}else{
return -1;
}
};
dhtmlXTreeObject.prototype.onRowClick2=function(){
var _c1=this.parentObject.treeNod;
if(!_c1.callEvent("onDblClick",[this.parentObject.id,_c1])){
return 0;
}
if((this.parentObject.closeble)&&(this.parentObject.closeble!="0")){
_c1._HideShow(this.parentObject);
}else{
_c1._HideShow(this.parentObject,2);
}
if(_c1.checkEvent("onOpenEnd")){
if(!_c1.xmlstate){
_c1.callEvent("onOpenEnd",[this.parentObject.id,_c1._getOpenState(this.parentObject)]);
}else{
_c1._oie_onXLE.push(_c1.onXLE);
_c1.onXLE=_c1._epnFHe;
}
}
};
dhtmlXTreeObject.prototype.onRowClick=function(){
var _c2=this.parentObject.treeNod;
if(!_c2.callEvent("onOpenStart",[this.parentObject.id,_c2._getOpenState(this.parentObject)])){
return 0;
}
if((this.parentObject.closeble)&&(this.parentObject.closeble!="0")){
_c2._HideShow(this.parentObject);
}else{
_c2._HideShow(this.parentObject,2);
}
if(_c2.checkEvent("onOpenEnd")){
if(!_c2.xmlstate){
_c2.callEvent("onOpenEnd",[this.parentObject.id,_c2._getOpenState(this.parentObject)]);
}else{
_c2._oie_onXLE.push(_c2.onXLE);
_c2.onXLE=_c2._epnFHe;
}
}
};
dhtmlXTreeObject.prototype._epnFHe=function(_c3,id,_c5){
if(id!=this.rootId){
this.callEvent("onOpenEnd",[id,_c3.getOpenState(id)]);
}
_c3.onXLE=_c3._oie_onXLE.pop();
if(!_c5&&!_c3._oie_onXLE.length){
if(_c3.onXLE){
_c3.onXLE(_c3,id);
}
}
};
dhtmlXTreeObject.prototype.onRowClickDown=function(e){
e=e||window.event;
var _c7=this.parentObject.treeNod;
_c7._selectItem(this.parentObject,e);
};
dhtmlXTreeObject.prototype.getSelectedItemId=function(){
var str=new Array();
for(var i=0;i<this._selected.length;i++){
str[i]=this._selected[i].id;
}
return (str.join(this.dlmtr));
};
dhtmlXTreeObject.prototype._selectItem=function(_ca,e){
if(this._onSSCF){
this._onSSCFold=this.getSelectedItemId();
}
this._unselectItems();
this._markItem(_ca);
if(this._onSSCF){
var z=this.getSelectedItemId();
if(z!=this._onSSCFold){
this.callEvent("onSelect",[z]);
}
}
};
dhtmlXTreeObject.prototype._markItem=function(_cd){
if(_cd.scolor){
_cd.span.style.color=_cd.scolor;
}
_cd.span.className="selectedTreeRow";
_cd.i_sel=true;
this._selected[this._selected.length]=_cd;
};
dhtmlXTreeObject.prototype.getIndexById=function(_ce){
var z=this._globalIdStorageFind(_ce);
if(!z){
return null;
}
return this._getIndex(z);
};
dhtmlXTreeObject.prototype._getIndex=function(w){
var z=w.parentObject;
for(var i=0;i<z.childsCount;i++){
if(z.childNodes[i]==w){
return i;
}
}
};
dhtmlXTreeObject.prototype._unselectItem=function(_d3){
if((_d3)&&(_d3.i_sel)){
_d3.span.className="standartTreeRow";
if(_d3.acolor){
_d3.span.style.color=_d3.acolor;
}
_d3.i_sel=false;
for(var i=0;i<this._selected.length;i++){
if(!this._selected[i].i_sel){
this._selected.splice(i,1);
break;
}
}
}
};
dhtmlXTreeObject.prototype._unselectItems=function(){
for(var i=0;i<this._selected.length;i++){
var _d6=this._selected[i];
_d6.span.className="standartTreeRow";
if(_d6.acolor){
_d6.span.style.color=_d6.acolor;
}
_d6.i_sel=false;
}
this._selected=new Array();
};
dhtmlXTreeObject.prototype.onRowSelect=function(e,_d8,_d9){
e=e||window.event;
var obj=this.parentObject;
if(_d8){
obj=_d8.parentObject;
}
var _db=obj.treeNod;
var _dc=_db.getSelectedItemId();
if((!e)||(!e.skipUnSel)){
_db._selectItem(obj,e);
}
if(!_d9){
if((e)&&(e.button==2)){
_db.callEvent("onRightClick",[obj.id,e]);
}
if(obj.actionHandler){
obj.actionHandler(obj.id,_dc);
}else{
_db.callEvent("onClick",[obj.id,_dc]);
}
}
};
dhtmlXTreeObject.prototype._correctCheckStates=function(_dd){
if(!this.tscheck){
return;
}
if(!_dd){
return;
}
if(_dd.id==this.rootId){
return;
}
var act=_dd.childNodes;
var _df=0;
var _e0=0;
if(_dd.childsCount==0){
return;
}
for(var i=0;i<_dd.childsCount;i++){
if(act[i].dscheck){
continue;
}
if(act[i].checkstate==0){
_df=1;
}else{
if(act[i].checkstate==1){
_e0=1;
}else{
_df=1;
_e0=1;
break;
}
}
}
if((_df)&&(_e0)){
this._setCheck(_dd,"unsure");
}else{
if(_df){
this._setCheck(_dd,false);
}else{
this._setCheck(_dd,true);
}
}
this._correctCheckStates(_dd.parentObject);
};
dhtmlXTreeObject.prototype.onCheckBoxClick=function(e){
if(!this.treeNod.callEvent("onBeforeCheck",[this.parentObject.id,this.parentObject.checkstate])){
return;
}
if(this.parentObject.dscheck){
return true;
}
if(this.treeNod.tscheck){
if(this.parentObject.checkstate==1){
this.treeNod._setSubChecked(false,this.parentObject);
}else{
this.treeNod._setSubChecked(true,this.parentObject);
}
}else{
if(this.parentObject.checkstate==1){
this.treeNod._setCheck(this.parentObject,false);
}else{
this.treeNod._setCheck(this.parentObject,true);
}
}
this.treeNod._correctCheckStates(this.parentObject.parentObject);
return this.treeNod.callEvent("onCheck",[this.parentObject.id,this.parentObject.checkstate]);
};
dhtmlXTreeObject.prototype._createItem=function(_e3,_e4,_e5){
var _e6=document.createElement("table");
_e6.cellSpacing=0;
_e6.cellPadding=0;
_e6.border=0;
if(this.hfMode){
_e6.style.tableLayout="fixed";
}
_e6.style.margin=0;
_e6.style.padding=0;
var _e7=document.createElement("tbody");
var tr=document.createElement("tr");
var td1=document.createElement("td");
td1.className="standartTreeImage";
if(this._txtimg){
var _ea=document.createElement("div");
td1.appendChild(_ea);
_ea.className="dhx_tree_textSign";
}else{
var _ea=this._getImg(_e4.id);
_ea.border="0";
if(_ea.tagName=="IMG"){
_ea.align="absmiddle";
}
td1.appendChild(_ea);
_ea.style.padding=0;
_ea.style.margin=0;
_ea.style.width=this.def_line_img_x;
_ea.style.height=this.def_line_img_y;
}
var _eb=document.createElement("td");
var inp=this._getImg(this.cBROf?this.rootId:_e4.id);
inp.checked=0;
this._setSrc(inp,this.imPath+this.checkArray[0]);
inp.style.width="16px";
inp.style.height="16px";
if(!_e3){
(((_isOpera)||(_isKHTML))?_eb:inp).style.display="none";
}
_eb.appendChild(inp);
if((!this.cBROf)&&(inp.tagName=="IMG")){
inp.align="absmiddle";
}
inp.onclick=this.onCheckBoxClick;
inp.treeNod=this;
inp.parentObject=_e4;
_eb.width="20px";
var _ed=document.createElement("td");
_ed.className="standartTreeImage";
var img=this._getImg(this.timgen?_e4.id:this.rootId);
img.onmousedown=this._preventNsDrag;
img.ondragstart=this._preventNsDrag;
img.border="0";
if(this._aimgs){
img.parentObject=_e4;
if(img.tagName=="IMG"){
img.align="absmiddle";
}
img.onclick=this.onRowSelect;
}
if(!_e5){
this._setSrc(img,this.imPath+this.imageArray[0]);
}
_ed.appendChild(img);
img.style.padding=0;
img.style.margin=0;
if(this.timgen){
img.style.width=this.def_img_x;
img.style.height=this.def_img_y;
}else{
img.style.width="0px";
img.style.height="0px";
if(_isOpera){
_ed.style.display="none";
}
}
var td2=document.createElement("td");
td2.className="standartTreeRow";
_e4.span=document.createElement("span");
_e4.span.className="standartTreeRow";
if(this.mlitems){
_e4.span.style.width=this.mlitems;
_e4.span.style.display="block";
}else{
td2.noWrap=true;
}
if(!_isKHTML){
td2.style.width="100%";
}
_e4.span.innerHTML=_e4.label;
td2.appendChild(_e4.span);
td2.parentObject=_e4;
td1.parentObject=_e4;
td2.onclick=this.onRowSelect;
td1.onclick=this.onRowClick;
td2.ondblclick=this.onRowClick2;
if(this.ettip){
tr.title=_e4.label;
}
if(this.dragAndDropOff){
if(this._aimgs){
this.dragger.addDraggableItem(_ed,this);
_ed.parentObject=_e4;
}
this.dragger.addDraggableItem(td2,this);
}
_e4.span.style.paddingLeft="5px";
_e4.span.style.paddingRight="5px";
td2.style.verticalAlign="";
td2.style.fontSize="10pt";
td2.style.cursor=this.style_pointer;
tr.appendChild(td1);
tr.appendChild(_eb);
tr.appendChild(_ed);
tr.appendChild(td2);
_e7.appendChild(tr);
_e6.appendChild(_e7);
if(this.ehlt){
tr.onmousemove=this._itemMouseIn;
tr[(_isIE)?"onmouseleave":"onmouseout"]=this._itemMouseOut;
}
if(this.checkEvent&&this.checkEvent("onRightClick")){
tr.oncontextmenu=Function("e","this.childNodes[0].parentObject.treeNod.callEvent('onRightClick',[this.childNodes[0].parentObject.id,(e||window.event)]); return false;");
}
return _e6;
};
dhtmlXTreeObject.prototype.setImagePath=function(_f0){
this.imPath=_f0;
};
dhtmlXTreeObject.prototype.setOnRightClickHandler=function(_f1){
this.attachEvent("onRightClick",_f1);
};
dhtmlXTreeObject.prototype.setOnClickHandler=function(_f2){
this.attachEvent("onClick",_f2);
};
dhtmlXTreeObject.prototype.setOnSelectStateChange=function(_f3){
this.attachEvent("onSelect",_f3);
this._onSSCF=true;
};
dhtmlXTreeObject.prototype.setXMLAutoLoading=function(_f4){
this.XMLsource=_f4;
};
dhtmlXTreeObject.prototype.setOnCheckHandler=function(_f5){
this.attachEvent("onCheck",_f5);
};
dhtmlXTreeObject.prototype.setOnOpenHandler=function(_f6){
this.attachEvent("onOpenStart",_f6);
};
dhtmlXTreeObject.prototype.setOnOpenStartHandler=function(_f7){
this.attachEvent("onOpenStart",_f7);
};
dhtmlXTreeObject.prototype.setOnOpenEndHandler=function(_f8){
this.attachEvent("onOpenEnd",_f8);
};
dhtmlXTreeObject.prototype.setOnDblClickHandler=function(_f9){
this.attachEvent("onDblClick",_f9);
};
dhtmlXTreeObject.prototype.openAllItems=function(_fa){
var _fb=this._globalIdStorageFind(_fa);
if(!_fb){
return 0;
}
this._xopenAll(_fb);
};
dhtmlXTreeObject.prototype.getOpenState=function(_fc){
var _fd=this._globalIdStorageFind(_fc);
if(!_fd){
return "";
}
return this._getOpenState(_fd);
};
dhtmlXTreeObject.prototype.closeAllItems=function(_fe){
if(_fe===window.undefined){
_fe=this.rootId;
}
var _ff=this._globalIdStorageFind(_fe);
if(!_ff){
return 0;
}
this._xcloseAll(_ff);
this.allTree.childNodes[0].border="1";
this.allTree.childNodes[0].border="0";
};
dhtmlXTreeObject.prototype.setUserData=function(_100,name,_102){
var _103=this._globalIdStorageFind(_100,0,true);
if(!_103){
return;
}
if(name=="hint"){
_103.htmlNode.childNodes[0].childNodes[0].title=_102;
}
if(typeof (_103.userData["t_"+name])=="undefined"){
if(!_103._userdatalist){
_103._userdatalist=name;
}else{
_103._userdatalist+=","+name;
}
}
_103.userData["t_"+name]=_102;
};
dhtmlXTreeObject.prototype.getUserData=function(_104,name){
var _106=this._globalIdStorageFind(_104,0,true);
if(!_106){
return;
}
return _106.userData["t_"+name];
};
dhtmlXTreeObject.prototype.getItemColor=function(_107){
var temp=this._globalIdStorageFind(_107);
if(!temp){
return 0;
}
var res=new Object();
if(temp.acolor){
res.acolor=temp.acolor;
}
if(temp.acolor){
res.scolor=temp.scolor;
}
return res;
};
dhtmlXTreeObject.prototype.setItemColor=function(_10a,_10b,_10c){
if((_10a)&&(_10a.span)){
var temp=_10a;
}else{
var temp=this._globalIdStorageFind(_10a);
}
if(!temp){
return 0;
}else{
if(temp.i_sel){
if(_10c){
temp.span.style.color=_10c;
}
}else{
if(_10b){
temp.span.style.color=_10b;
}
}
if(_10c){
temp.scolor=_10c;
}
if(_10b){
temp.acolor=_10b;
}
}
};
dhtmlXTreeObject.prototype.getItemText=function(_10e){
var temp=this._globalIdStorageFind(_10e);
if(!temp){
return 0;
}
return (temp.htmlNode.childNodes[0].childNodes[0].childNodes[3].childNodes[0].innerHTML);
};
dhtmlXTreeObject.prototype.getParentId=function(_110){
var temp=this._globalIdStorageFind(_110);
if((!temp)||(!temp.parentObject)){
return "";
}
return temp.parentObject.id;
};
dhtmlXTreeObject.prototype.changeItemId=function(_112,_113){
if(_112==_113){
return;
}
var temp=this._globalIdStorageFind(_112);
if(!temp){
return 0;
}
temp.id=_113;
temp.span.contextMenuId=_113;
this._idpull[_113]=this._idpull[_112];
delete this._idpull[_112];
};
dhtmlXTreeObject.prototype.doCut=function(){
if(this.nodeCut){
this.clearCut();
}
this.nodeCut=(new Array()).concat(this._selected);
for(var i=0;i<this.nodeCut.length;i++){
var _116=this.nodeCut[i];
_116._cimgs=new Array();
_116._cimgs[0]=_116.images[0];
_116._cimgs[1]=_116.images[1];
_116._cimgs[2]=_116.images[2];
_116.images[0]=_116.images[1]=_116.images[2]=this.cutImage;
this._correctPlus(_116);
}
};
dhtmlXTreeObject.prototype.doPaste=function(_117){
var tobj=this._globalIdStorageFind(_117);
if(!tobj){
return 0;
}
for(var i=0;i<this.nodeCut.length;i++){
if(this._checkPNodes(tobj,this.nodeCut[i])){
continue;
}
this._moveNode(this.nodeCut[i],tobj);
}
this.clearCut();
};
dhtmlXTreeObject.prototype.clearCut=function(){
for(var i=0;i<this.nodeCut.length;i++){
var _11b=this.nodeCut[i];
_11b.images[0]=_11b._cimgs[0];
_11b.images[1]=_11b._cimgs[1];
_11b.images[2]=_11b._cimgs[2];
this._correctPlus(_11b);
}
this.nodeCut=new Array();
};
dhtmlXTreeObject.prototype._moveNode=function(_11c,_11d){
return this._moveNodeTo(_11c,_11d);
};
dhtmlXTreeObject.prototype._fixNodesCollection=function(_11e,_11f){
var flag=0;
var _121=0;
var _122=_11e.childNodes;
var _123=_11e.childsCount-1;
if(_11f==_122[_123]){
return;
}
for(var i=0;i<_123;i++){
if(_122[i]==_122[_123]){
_122[i]=_122[i+1];
_122[i+1]=_122[_123];
}
}
for(var i=0;i<_123+1;i++){
if(flag){
var temp=_122[i];
_122[i]=flag;
flag=temp;
}else{
if(_122[i]==_11f){
flag=_122[i];
_122[i]=_122[_123];
}
}
}
};
dhtmlXTreeObject.prototype._recreateBranch=function(_126,_127,_128,_129){
var i;
var st="";
if(_128){
for(i=0;i<_127.childsCount;i++){
if(_127.childNodes[i]==_128){
break;
}
}
if(i!=0){
_128=_127.childNodes[i-1];
}else{
st="TOP";
_128="";
}
}
var t2=this._onradh;
this._onradh=null;
var _12d=this._attachChildNode(_127,_126.id,_126.label,0,_126.images[0],_126.images[1],_126.images[2],st,0,_128);
_12d._userdatalist=_126._userdatalist;
_12d.userData=_126.userData.clone();
_12d.XMLload=_126.XMLload;
if(t2){
this._onradh=t2;
this._onradh(_12d.id);
}
for(var i=0;i<_126.childsCount;i++){
this._recreateBranch(_126.childNodes[i],_12d,0,1);
}
return _12d;
};
dhtmlXTreeObject.prototype._moveNodeTo=function(_12e,_12f,_130){
if(_12e.treeNod._nonTrivialNode){
return _12e.treeNod._nonTrivialNode(this,_12f,_130,_12e);
}
if(_12f.mytype){
var _131=(_12e.treeNod.lWin!=_12f.lWin);
}else{
var _131=(_12e.treeNod.lWin!=_12f.treeNod.lWin);
}
if(!this.callEvent("onDrag",[_12e.id,_12f.id,(_130?_130.id:null),_12e.treeNod,_12f.treeNod])){
return false;
}
if((_12f.XMLload==0)&&(this.XMLsource)){
_12f.XMLload=1;
this._loadDynXML(_12f.id);
}
this.openItem(_12f.id);
var _132=_12e.treeNod;
var c=_12e.parentObject.childsCount;
var z=_12e.parentObject;
if((_131)||(_132.dpcpy)){
var _135=_12e.id;
_12e=this._recreateBranch(_12e,_12f,_130);
if(!_132.dpcpy){
_132.deleteItem(_135);
}
}else{
var _136=_12f.childsCount;
var _137=_12f.childNodes;
if(_136==0){
_12f._open=true;
}
_132._unselectItem(_12e);
_137[_136]=_12e;
_12e.treeNod=_12f.treeNod;
_12f.childsCount++;
var tr=this._drawNewTr(_137[_136].htmlNode);
if(!_130){
_12f.htmlNode.childNodes[0].appendChild(tr);
if(this.dadmode==1){
this._fixNodesCollection(_12f,_130);
}
}else{
_12f.htmlNode.childNodes[0].insertBefore(tr,_130.tr);
this._fixNodesCollection(_12f,_130);
_137=_12f.childNodes;
}
}
if((!_132.dpcpy)&&(!_131)){
var zir=_12e.tr;
if((document.all)&&(navigator.appVersion.search(/MSIE\ 5\.0/gi)!=-1)){
window.setTimeout(function(){
zir.parentNode.removeChild(zir);
},250);
}else{
_12e.parentObject.htmlNode.childNodes[0].removeChild(_12e.tr);
}
if((!_130)||(_12f!=_12e.parentObject)){
for(var i=0;i<z.childsCount;i++){
if(z.childNodes[i].id==_12e.id){
z.childNodes[i]=0;
break;
}
}
}else{
z.childNodes[z.childsCount-1]=0;
}
_132._compressChildList(z.childsCount,z.childNodes);
z.childsCount--;
}
if((!_131)&&(!_132.dpcpy)){
_12e.tr=tr;
tr.nodem=_12e;
_12e.parentObject=_12f;
if(_132!=_12f.treeNod){
if(_12e.treeNod._registerBranch(_12e,_132)){
return;
}
this._clearStyles(_12e);
this._redrawFrom(this,_12e.parentObject);
}
this._correctPlus(_12f);
this._correctLine(_12f);
this._correctLine(_12e);
this._correctPlus(_12e);
if(_130){
this._correctPlus(_130);
}else{
if(_12f.childsCount>=2){
this._correctPlus(_137[_12f.childsCount-2]);
this._correctLine(_137[_12f.childsCount-2]);
}
}
this._correctPlus(_137[_12f.childsCount-1]);
if(this.tscheck){
this._correctCheckStates(_12f);
}
if(_132.tscheck){
_132._correctCheckStates(z);
}
}
if(c>1){
_132._correctPlus(z.childNodes[c-2]);
_132._correctLine(z.childNodes[c-2]);
}
_132._correctPlus(z);
_132._correctLine(z);
this.callEvent("onDrop",[_12e.id,_12f.id,(_130?_130.id:null),_132,_12f.treeNod]);
return _12e.id;
};
dhtmlXTreeObject.prototype._clearStyles=function(_13b){
if(!_13b.htmlNode){
return;
}
var td1=_13b.htmlNode.childNodes[0].childNodes[0].childNodes[1];
var td3=td1.nextSibling.nextSibling;
_13b.span.innerHTML=_13b.label;
_13b.i_sel=false;
if(_13b._aimgs){
this.dragger.removeDraggableItem(td1.nextSibling);
}
if(this.checkBoxOff){
td1.childNodes[0].style.display="";
td1.childNodes[0].onclick=this.onCheckBoxClick;
this._setSrc(td1.childNodes[0],this.imPath+this.checkArray[_13b.checkstate]);
}else{
td1.childNodes[0].style.display="none";
}
td1.childNodes[0].treeNod=this;
this.dragger.removeDraggableItem(td3);
if(this.dragAndDropOff){
this.dragger.addDraggableItem(td3,this);
}
if(this._aimgs){
this.dragger.addDraggableItem(td1.nextSibling,this);
}
td3.childNodes[0].className="standartTreeRow";
td3.onclick=this.onRowSelect;
td3.ondblclick=this.onRowClick2;
td1.previousSibling.onclick=this.onRowClick;
this._correctLine(_13b);
this._correctPlus(_13b);
for(var i=0;i<_13b.childsCount;i++){
this._clearStyles(_13b.childNodes[i]);
}
};
dhtmlXTreeObject.prototype._registerBranch=function(_13f,_140){
if(_140){
_140._globalIdStorageSub(_13f.id);
}
_13f.id=this._globalIdStorageAdd(_13f.id,_13f);
_13f.treeNod=this;
for(var i=0;i<_13f.childsCount;i++){
this._registerBranch(_13f.childNodes[i],_140);
}
return 0;
};
dhtmlXTreeObject.prototype.enableThreeStateCheckboxes=function(mode){
this.tscheck=convertStringToBoolean(mode);
};
dhtmlXTreeObject.prototype.setOnMouseInHandler=function(func){
this.ehlt=true;
this.attachEvent("onMouseIn",func);
};
dhtmlXTreeObject.prototype.setOnMouseOutHandler=function(func){
this.ehlt=true;
this.attachEvent("onMouseOut",func);
};
dhtmlXTreeObject.prototype.enableTreeImages=function(mode){
this.timgen=convertStringToBoolean(mode);
};
dhtmlXTreeObject.prototype.enableFixedMode=function(mode){
this.hfMode=convertStringToBoolean(mode);
};
dhtmlXTreeObject.prototype.enableCheckBoxes=function(mode,_148){
this.checkBoxOff=convertStringToBoolean(mode);
this.cBROf=(!(this.checkBoxOff||convertStringToBoolean(_148)));
};
dhtmlXTreeObject.prototype.setStdImages=function(_149,_14a,_14b){
this.imageArray[0]=_149;
this.imageArray[1]=_14a;
this.imageArray[2]=_14b;
};
dhtmlXTreeObject.prototype.enableTreeLines=function(mode){
this.treeLinesOn=convertStringToBoolean(mode);
};
dhtmlXTreeObject.prototype.setImageArrays=function(_14d,_14e,_14f,_150,_151,_152){
switch(_14d){
case "plus":
this.plusArray[0]=_14e;
this.plusArray[1]=_14f;
this.plusArray[2]=_150;
this.plusArray[3]=_151;
this.plusArray[4]=_152;
break;
case "minus":
this.minusArray[0]=_14e;
this.minusArray[1]=_14f;
this.minusArray[2]=_150;
this.minusArray[3]=_151;
this.minusArray[4]=_152;
break;
}
};
dhtmlXTreeObject.prototype.openItem=function(_153){
var temp=this._globalIdStorageFind(_153);
if(!temp){
return 0;
}else{
return this._openItem(temp);
}
};
dhtmlXTreeObject.prototype._openItem=function(item){
var _156=this._getOpenState(item);
if((_156<0)||(((this.XMLsource)&&(!item.XMLload)))){
if(!this.callEvent("onOpenStart",[item.id,_156])){
return 0;
}
this._HideShow(item,2);
if(this.checkEvent("onOpenEnd")){
if(this.onXLE==this._epnFHe){
this._epnFHe(this,item.id,true);
}
if(!this.xmlstate||!this.XMLsource){
this.callEvent("onOpenEnd",[item.id,this._getOpenState(item)]);
}else{
this._oie_onXLE.push(this.onXLE);
this.onXLE=this._epnFHe;
}
}
}else{
if(this._srnd){
this._HideShow(item,2);
}
}
if(item.parentObject){
this._openItem(item.parentObject);
}
};
dhtmlXTreeObject.prototype.closeItem=function(_157){
if(this.rootId==_157){
return 0;
}
var temp=this._globalIdStorageFind(_157);
if(!temp){
return 0;
}
if(temp.closeble){
this._HideShow(temp,1);
}
};
dhtmlXTreeObject.prototype.getLevel=function(_159){
var temp=this._globalIdStorageFind(_159);
if(!temp){
return 0;
}
return this._getNodeLevel(temp,0);
};
dhtmlXTreeObject.prototype.setItemCloseable=function(_15b,flag){
flag=convertStringToBoolean(flag);
if((_15b)&&(_15b.span)){
var temp=_15b;
}else{
var temp=this._globalIdStorageFind(_15b);
}
if(!temp){
return 0;
}
temp.closeble=flag;
};
dhtmlXTreeObject.prototype._getNodeLevel=function(_15e,_15f){
if(_15e.parentObject){
return this._getNodeLevel(_15e.parentObject,_15f+1);
}
return (_15f);
};
dhtmlXTreeObject.prototype.hasChildren=function(_160){
var temp=this._globalIdStorageFind(_160);
if(!temp){
return 0;
}else{
if((this.XMLsource)&&(!temp.XMLload)){
return true;
}else{
return temp.childsCount;
}
}
};
dhtmlXTreeObject.prototype._getLeafCount=function(_162){
var a=0;
for(var b=0;b<_162.childsCount;b++){
if(_162.childNodes[b].childsCount==0){
a++;
}
}
return a;
};
dhtmlXTreeObject.prototype.setItemText=function(_165,_166,_167){
var temp=this._globalIdStorageFind(_165);
if(!temp){
return 0;
}
temp.label=_166;
temp.span.innerHTML=_166;
temp.span.parentNode.parentNode.title=_167||"";
};
dhtmlXTreeObject.prototype.getItemTooltip=function(_169){
var temp=this._globalIdStorageFind(_169);
if(!temp){
return "";
}
return (temp.span.parentNode.parentNode._dhx_title||temp.span.parentNode.parentNode.title||"");
};
dhtmlXTreeObject.prototype.refreshItem=function(_16b){
if(!_16b){
_16b=this.rootId;
}
var temp=this._globalIdStorageFind(_16b);
this.deleteChildItems(_16b);
this._loadDynXML(_16b);
};
dhtmlXTreeObject.prototype.setItemImage2=function(_16d,_16e,_16f,_170){
var temp=this._globalIdStorageFind(_16d);
if(!temp){
return 0;
}
temp.images[1]=_16f;
temp.images[2]=_170;
temp.images[0]=_16e;
this._correctPlus(temp);
};
dhtmlXTreeObject.prototype.setItemImage=function(_172,_173,_174){
var temp=this._globalIdStorageFind(_172);
if(!temp){
return 0;
}
if(_174){
temp.images[1]=_173;
temp.images[2]=_174;
}else{
temp.images[0]=_173;
}
this._correctPlus(temp);
};
dhtmlXTreeObject.prototype.getSubItems=function(_176){
var temp=this._globalIdStorageFind(_176,0,1);
if(!temp){
return 0;
}
var z="";
for(i=0;i<temp.childsCount;i++){
if(!z){
z=temp.childNodes[i].id;
}else{
z+=this.dlmtr+temp.childNodes[i].id;
}
}
return z;
};
dhtmlXTreeObject.prototype._getAllScraggyItems=function(node){
var z="";
for(var i=0;i<node.childsCount;i++){
if((node.childNodes[i].unParsed)||(node.childNodes[i].childsCount>0)){
if(node.childNodes[i].unParsed){
var zb=this._getAllScraggyItemsXML(node.childNodes[i].unParsed,1);
}else{
var zb=this._getAllScraggyItems(node.childNodes[i]);
}
if(zb){
if(z){
z+=this.dlmtr+zb;
}else{
z=zb;
}
}
}else{
if(!z){
z=node.childNodes[i].id;
}else{
z+=this.dlmtr+node.childNodes[i].id;
}
}
}
return z;
};
dhtmlXTreeObject.prototype._getAllFatItems=function(node){
var z="";
for(var i=0;i<node.childsCount;i++){
if((node.childNodes[i].unParsed)||(node.childNodes[i].childsCount>0)){
if(!z){
z=node.childNodes[i].id;
}else{
z+=this.dlmtr+node.childNodes[i].id;
}
if(node.childNodes[i].unParsed){
var zb=this._getAllFatItemsXML(node.childNodes[i].unParsed,1);
}else{
var zb=this._getAllFatItems(node.childNodes[i]);
}
if(zb){
z+=this.dlmtr+zb;
}
}
}
return z;
};
dhtmlXTreeObject.prototype._getAllSubItems=function(_181,z,node){
if(node){
temp=node;
}else{
var temp=this._globalIdStorageFind(_181);
}
if(!temp){
return 0;
}
z="";
for(var i=0;i<temp.childsCount;i++){
if(!z){
z=temp.childNodes[i].id;
}else{
z+=this.dlmtr+temp.childNodes[i].id;
}
var zb=this._getAllSubItems(0,z,temp.childNodes[i]);
if(zb){
z+=this.dlmtr+zb;
}
}
return z;
};
dhtmlXTreeObject.prototype.selectItem=function(_187,mode,_189){
mode=convertStringToBoolean(mode);
var temp=this._globalIdStorageFind(_187);
if((!temp)||(!temp.parentObject)){
return 0;
}
if(this.XMLloadingWarning){
temp.parentObject.openMe=1;
}else{
this._openItem(temp.parentObject);
}
var ze=null;
if(_189){
ze=new Object;
ze.ctrlKey=true;
if(temp.i_sel){
ze.skipUnSel=true;
}
}
if(mode){
this.onRowSelect(ze,temp.htmlNode.childNodes[0].childNodes[0].childNodes[3],false);
}else{
this.onRowSelect(ze,temp.htmlNode.childNodes[0].childNodes[0].childNodes[3],true);
}
};
dhtmlXTreeObject.prototype.getSelectedItemText=function(){
var str=new Array();
for(var i=0;i<this._selected.length;i++){
str[i]=this._selected[i].span.innerHTML;
}
return (str.join(this.dlmtr));
};
dhtmlXTreeObject.prototype._compressChildList=function(_18e,_18f){
_18e--;
for(var i=0;i<_18e;i++){
if(_18f[i]==0){
_18f[i]=_18f[i+1];
_18f[i+1]=0;
}
}
};
dhtmlXTreeObject.prototype._deleteNode=function(_191,_192,skip){
if((!_192)||(!_192.parentObject)){
return 0;
}
var _194=0;
var _195=0;
if(_192.tr.nextSibling){
_194=_192.tr.nextSibling.nodem;
}
if(_192.tr.previousSibling){
_195=_192.tr.previousSibling.nodem;
}
var sN=_192.parentObject;
var _197=sN.childsCount;
var _198=sN.childNodes;
for(var i=0;i<_197;i++){
if(_198[i].id==_191){
if(!skip){
sN.htmlNode.childNodes[0].removeChild(_198[i].tr);
}
_198[i]=0;
break;
}
}
this._compressChildList(_197,_198);
if(!skip){
sN.childsCount--;
}
if(_194){
this._correctPlus(_194);
this._correctLine(_194);
}
if(_195){
this._correctPlus(_195);
this._correctLine(_195);
}
if(this.tscheck){
this._correctCheckStates(sN);
}
if(!skip){
this._globalIdStorageRecSub(_192);
}
};
dhtmlXTreeObject.prototype.setCheck=function(_19a,_19b){
var _19c=this._globalIdStorageFind(_19a,0,1);
if(!_19c){
return;
}
if(_19b==="unsure"){
this._setCheck(_19c,_19b);
}else{
_19b=convertStringToBoolean(_19b);
if((this.tscheck)&&(this.smcheck)){
this._setSubChecked(_19b,_19c);
}else{
this._setCheck(_19c,_19b);
}
}
if(this.smcheck){
this._correctCheckStates(_19c.parentObject);
}
};
dhtmlXTreeObject.prototype._setCheck=function(_19d,_19e){
if(!_19d){
return;
}
if(((_19d.parentObject._r_logic)||(this._frbtr))&&(_19e)){
if(this._frbtrs){
if(this._frbtrL){
this._setCheck(this._frbtrL,0);
}
this._frbtrL=_19d;
}else{
for(var i=0;i<_19d.parentObject.childsCount;i++){
this._setCheck(_19d.parentObject.childNodes[i],0);
}
}
}
var z=_19d.htmlNode.childNodes[0].childNodes[0].childNodes[1].childNodes[0];
if(_19e=="unsure"){
_19d.checkstate=2;
}else{
if(_19e){
_19d.checkstate=1;
}else{
_19d.checkstate=0;
}
}
if(_19d.dscheck){
_19d.checkstate=_19d.dscheck;
}
this._setSrc(z,this.imPath+((_19d.parentObject._r_logic||this._frbtr)?this.radioArray:this.checkArray)[_19d.checkstate]);
};
dhtmlXTreeObject.prototype.setSubChecked=function(_1a1,_1a2){
var _1a3=this._globalIdStorageFind(_1a1);
this._setSubChecked(_1a2,_1a3);
this._correctCheckStates(_1a3.parentObject);
};
dhtmlXTreeObject.prototype._setSubChecked=function(_1a4,_1a5){
_1a4=convertStringToBoolean(_1a4);
if(!_1a5){
return;
}
if(((_1a5.parentObject._r_logic)||(this._frbtr))&&(_1a4)){
for(var i=0;i<_1a5.parentObject.childsCount;i++){
this._setSubChecked(0,_1a5.parentObject.childNodes[i]);
}
}
if(_1a5._r_logic||this._frbtr){
this._setSubChecked(_1a4,_1a5.childNodes[0]);
}else{
for(var i=0;i<_1a5.childsCount;i++){
this._setSubChecked(_1a4,_1a5.childNodes[i]);
}
}
var z=_1a5.htmlNode.childNodes[0].childNodes[0].childNodes[1].childNodes[0];
if(_1a4){
_1a5.checkstate=1;
}else{
_1a5.checkstate=0;
}
if(_1a5.dscheck){
_1a5.checkstate=_1a5.dscheck;
}
this._setSrc(z,this.imPath+((_1a5.parentObject._r_logic||this._frbtr)?this.radioArray:this.checkArray)[_1a5.checkstate]);
};
dhtmlXTreeObject.prototype.isItemChecked=function(_1a8){
var _1a9=this._globalIdStorageFind(_1a8);
if(!_1a9){
return;
}
return _1a9.checkstate;
};
dhtmlXTreeObject.prototype.deleteChildItems=function(_1aa){
var _1ab=this._globalIdStorageFind(_1aa);
if(!_1ab){
return;
}
var j=_1ab.childsCount;
for(var i=0;i<j;i++){
this._deleteNode(_1ab.childNodes[0].id,_1ab.childNodes[0]);
}
};
dhtmlXTreeObject.prototype.deleteItem=function(_1ae,_1af){
if((!this._onrdlh)||(this._onrdlh(_1ae))){
var z=this._deleteItem(_1ae,_1af);
}
this.allTree.childNodes[0].border="1";
this.allTree.childNodes[0].border="0";
};
dhtmlXTreeObject.prototype._deleteItem=function(_1b1,_1b2,skip){
_1b2=convertStringToBoolean(_1b2);
var _1b4=this._globalIdStorageFind(_1b1);
if(!_1b4){
return;
}
var pid=this.getParentId(_1b1);
var _1b6=_1b4.parentObject;
this._deleteNode(_1b1,_1b4,skip);
this._correctPlus(_1b6);
this._correctLine(_1b6);
if((_1b2)&&(pid!=this.rootId)){
this.selectItem(pid,1);
}
return _1b6;
};
dhtmlXTreeObject.prototype._globalIdStorageRecSub=function(_1b7){
for(var i=0;i<_1b7.childsCount;i++){
this._globalIdStorageRecSub(_1b7.childNodes[i]);
this._globalIdStorageSub(_1b7.childNodes[i].id);
}
this._globalIdStorageSub(_1b7.id);
var z=_1b7;
z.span=null;
z.tr.nodem=null;
z.tr=null;
z.htmlNode=null;
};
dhtmlXTreeObject.prototype.insertNewNext=function(_1ba,_1bb,_1bc,_1bd,_1be,_1bf,_1c0,_1c1,_1c2){
var _1c3=this._globalIdStorageFind(_1ba);
if((!_1c3)||(!_1c3.parentObject)){
return (0);
}
var _1c4=this._attachChildNode(0,_1bb,_1bc,_1bd,_1be,_1bf,_1c0,_1c1,_1c2,_1c3);
return _1c4;
};
dhtmlXTreeObject.prototype.getItemIdByIndex=function(_1c5,_1c6){
var z=this._globalIdStorageFind(_1c5);
if((!z)||(_1c6>z.childsCount)){
return null;
}
return z.childNodes[_1c6].id;
};
dhtmlXTreeObject.prototype.getChildItemIdByIndex=function(_1c8,_1c9){
var z=this._globalIdStorageFind(_1c8);
if((!z)||(_1c9>=z.childsCount)){
return null;
}
return z.childNodes[_1c9].id;
};
dhtmlXTreeObject.prototype.setDragHandler=function(func){
this.attachEvent("onDrag",func);
};
dhtmlXTreeObject.prototype._clearMove=function(){
if(this._lastMark){
this._lastMark.className=this._lastMark.className.replace(/dragAndDropRow/g,"");
this._lastMark=null;
}
this.allTree.className=this.allTree.className.replace(" selectionBox","");
};
dhtmlXTreeObject.prototype.enableDragAndDrop=function(mode,_1cd){
if(mode=="temporary_disabled"){
this.dADTempOff=false;
mode=true;
}else{
this.dADTempOff=true;
}
this.dragAndDropOff=convertStringToBoolean(mode);
if(this.dragAndDropOff){
this.dragger.addDragLanding(this.allTree,this);
}
if(arguments.length>1){
this._ddronr=(!convertStringToBoolean(_1cd));
}
};
dhtmlXTreeObject.prototype._setMove=function(_1ce,x,y){
if(_1ce.parentObject.span){
var a1=getAbsoluteTop(_1ce);
var a2=getAbsoluteTop(this.allTree);
this.dadmodec=this.dadmode;
this.dadmodefix=0;
var zN=_1ce.parentObject.span;
zN.className+=" dragAndDropRow";
this._lastMark=zN;
this._autoScroll(null,a1,a2);
}
};
dhtmlXTreeObject.prototype._autoScroll=function(node,a1,a2){
if(this.autoScroll){
if(node){
a1=getAbsoluteTop(node);
a2=getAbsoluteTop(this.allTree);
}
if((a1-a2-parseInt(this.allTree.scrollTop))>(parseInt(this.allTree.offsetHeight)-50)){
this.allTree.scrollTop=parseInt(this.allTree.scrollTop)+20;
}
if((a1-a2)<(parseInt(this.allTree.scrollTop)+30)){
this.allTree.scrollTop=parseInt(this.allTree.scrollTop)-20;
}
}
};
dhtmlXTreeObject.prototype._createDragNode=function(_1d7,e){
if(!this.dADTempOff){
return null;
}
var obj=_1d7.parentObject;
if(!this.callEvent("onBeforeDrag",[obj.id])){
return null;
}
if(!obj.i_sel){
this._selectItem(obj,e);
}
var _1da=document.createElement("div");
var text=new Array();
if(this._itim_dg){
for(var i=0;i<this._selected.length;i++){
text[i]="<table cellspacing='0' cellpadding='0'><tr><td><img width='18px' height='18px' src='"+this._getSrc(this._selected[i].span.parentNode.previousSibling.childNodes[0])+"'></td><td>"+this._selected[i].span.innerHTML+"</td></tr><table>";
}
}else{
text=this.getSelectedItemText().split(this.dlmtr);
}
_1da.innerHTML=text.join("");
_1da.style.position="absolute";
_1da.className="dragSpanDiv";
this._dragged=(new Array()).concat(this._selected);
return _1da;
};
dhtmlXTreeObject.prototype._focusNode=function(item){
var z=getAbsoluteTop(item.htmlNode)-getAbsoluteTop(this.allTree);
if((z>(this.allTree.scrollTop+this.allTree.offsetHeight-30))||(z<this.allTree.scrollTop)){
this.allTree.scrollTop=z;
}
};
dhtmlXTreeObject.prototype._preventNsDrag=function(e){
if((e)&&(e.preventDefault)){
e.preventDefault();
return false;
}
return false;
};
dhtmlXTreeObject.prototype._drag=function(_1e0,_1e1,_1e2){
if(this._autoOpenTimer){
clearTimeout(this._autoOpenTimer);
}
if(!_1e2.parentObject){
_1e2=this.htmlNode.htmlNode.childNodes[0].childNodes[0].childNodes[1].childNodes[0];
this.dadmodec=0;
}
this._clearMove();
var z=_1e0.parentObject.treeNod;
if((z)&&(z._clearMove)){
z._clearMove("");
}
if((!this.dragMove)||(this.dragMove())){
if((!z)||(!z._clearMove)||(!z._dragged)){
var col=new Array(_1e0.parentObject);
}else{
var col=z._dragged;
}
var trg=_1e2.parentObject;
for(var i=0;i<col.length;i++){
var _1e7=this._moveNode(col[i],trg);
if((this.dadmodec)&&(_1e7!==false)){
trg=this._globalIdStorageFind(_1e7,true,true);
}
if((_1e7)&&(!this._sADnD)){
this.selectItem(_1e7,0,1);
}
}
}
if(z){
z._dragged=new Array();
}
};
dhtmlXTreeObject.prototype._dragIn=function(_1e8,_1e9,x,y){
if(!this.dADTempOff){
return 0;
}
var fobj=_1e9.parentObject;
var tobj=_1e8.parentObject;
if((!tobj)&&(this._ddronr)){
return;
}
if(!this.callEvent("onDragIn",[fobj.id,tobj?tobj.id:null,fobj.treeNod,this])){
return 0;
}
if(!tobj){
this.allTree.className+=" selectionBox";
}else{
if(fobj.childNodes==null){
this._setMove(_1e8,x,y);
return _1e8;
}
var _1ee=fobj.treeNod;
for(var i=0;i<_1ee._dragged.length;i++){
if(this._checkPNodes(tobj,_1ee._dragged[i])){
this._autoScroll(_1e8);
return 0;
}
}
this._setMove(_1e8,x,y);
if(this._getOpenState(tobj)<=0){
this._autoOpenId=tobj.id;
this._autoOpenTimer=window.setTimeout(new callerFunction(this._autoOpenItem,this),1000);
}
}
return _1e8;
};
dhtmlXTreeObject.prototype._autoOpenItem=function(e,_1f1){
_1f1.openItem(_1f1._autoOpenId);
};
dhtmlXTreeObject.prototype._dragOut=function(_1f2){
this._clearMove();
if(this._autoOpenTimer){
clearTimeout(this._autoOpenTimer);
}
};
dhtmlXTreeObject.prototype.moveItem=function(_1f3,mode,_1f5,_1f6){
var _1f7=this._globalIdStorageFind(_1f3);
if(!_1f7){
return (0);
}
switch(mode){
case "right":
alert("Not supported yet");
break;
case "item_child":
var _1f8=(_1f6||this)._globalIdStorageFind(_1f5);
if(!_1f8){
return (0);
}
(_1f6||this)._moveNodeTo(_1f7,_1f8,0);
break;
case "item_sibling":
var _1f8=(_1f6||this)._globalIdStorageFind(_1f5);
if(!_1f8){
return (0);
}
(_1f6||this)._moveNodeTo(_1f7,_1f8.parentObject,_1f8);
break;
case "item_sibling_next":
var _1f8=(_1f6||this)._globalIdStorageFind(_1f5);
if(!_1f8){
return (0);
}
if((_1f8.tr)&&(_1f8.tr.nextSibling)&&(_1f8.tr.nextSibling.nodem)){
(_1f6||this)._moveNodeTo(_1f7,_1f8.parentObject,_1f8.tr.nextSibling.nodem);
}else{
(_1f6||this)._moveNodeTo(_1f7,_1f8.parentObject);
}
break;
case "left":
if(_1f7.parentObject.parentObject){
this._moveNodeTo(_1f7,_1f7.parentObject.parentObject,_1f7.parentObject);
}
break;
case "up":
var z=this._getPrevNode(_1f7);
if((z==-1)||(!z.parentObject)){
return;
}
this._moveNodeTo(_1f7,z.parentObject,z);
break;
case "up_strict":
var z=this._getIndex(_1f7);
if(z!=0){
this._moveNodeTo(_1f7,_1f7.parentObject,_1f7.parentObject.childNodes[z-1]);
}
break;
case "down_strict":
var z=this._getIndex(_1f7);
var _1fa=_1f7.parentObject.childsCount-2;
if(z==_1fa){
this._moveNodeTo(_1f7,_1f7.parentObject);
}else{
if(z<_1fa){
this._moveNodeTo(_1f7,_1f7.parentObject,_1f7.parentObject.childNodes[z+2]);
}
}
break;
case "down":
var z=this._getNextNode(this._lastChild(_1f7));
if((z==-1)||(!z.parentObject)){
return;
}
if(z.parentObject==_1f7.parentObject){
var z=this._getNextNode(z);
}
if(z==-1){
this._moveNodeTo(_1f7,_1f7.parentObject);
}else{
if((z==-1)||(!z.parentObject)){
return;
}
this._moveNodeTo(_1f7,z.parentObject,z);
}
break;
}
};
dhtmlXTreeObject.prototype._loadDynXML=function(id,src){
src=src||this.XMLsource;
var sn=(new Date()).valueOf();
this._ld_id=id;
this.loadXML(src+getUrlSymbol(src)+"uid="+sn+"&id="+this._escape(id));
};
dhtmlXTreeObject.prototype._checkPNodes=function(_1fe,_1ff){
if(_1ff==_1fe){
return 1;
}
if(_1fe.parentObject){
return this._checkPNodes(_1fe.parentObject,_1ff);
}else{
return 0;
}
};
dhtmlXTreeObject.prototype.preventIECaching=function(mode){
this.no_cashe=convertStringToBoolean(mode);
this.XMLLoader.rSeed=this.no_cashe;
};
dhtmlXTreeObject.prototype.preventIECashing=dhtmlXTreeObject.prototype.preventIECaching;
dhtmlXTreeObject.prototype.disableCheckbox=function(_201,mode){
if(typeof (_201)!="object"){
var _203=this._globalIdStorageFind(_201,0,1);
}else{
var _203=_201;
}
if(!_203){
return;
}
_203.dscheck=convertStringToBoolean(mode)?(((_203.checkstate||0)%3)+3):((_203.checkstate>2)?(_203.checkstate-3):_203.checkstate);
this._setCheck(_203);
if(_203.dscheck<3){
_203.dscheck=false;
}
};
dhtmlXTreeObject.prototype.setEscapingMode=function(mode){
this.utfesc=mode;
};
dhtmlXTreeObject.prototype.enableHighlighting=function(mode){
this.ehlt=true;
this.ehlta=convertStringToBoolean(mode);
};
dhtmlXTreeObject.prototype._itemMouseOut=function(){
var that=this.childNodes[3].parentObject;
var tree=that.treeNod;
tree.callEvent("onMouseOut",[that.id]);
if(that.id==tree._l_onMSI){
tree._l_onMSI=null;
}
if(!tree.ehlta){
return;
}
that.span.className=that.span.className.replace("_lor","");
};
dhtmlXTreeObject.prototype._itemMouseIn=function(){
var that=this.childNodes[3].parentObject;
var tree=that.treeNod;
if(tree._l_onMSI!=that.id){
tree.callEvent("onMouseIn",[that.id]);
}
tree._l_onMSI=that.id;
if(!tree.ehlta){
return;
}
that.span.className=that.span.className.replace("_lor","");
that.span.className=that.span.className.replace(/((standart|selected)TreeRow)/,"$1_lor");
};
dhtmlXTreeObject.prototype.enableActiveImages=function(mode){
this._aimgs=convertStringToBoolean(mode);
};
dhtmlXTreeObject.prototype.focusItem=function(_20b){
var _20c=this._globalIdStorageFind(_20b);
if(!_20c){
return (0);
}
this._focusNode(_20c);
};
dhtmlXTreeObject.prototype.getAllSubItems=function(_20d){
return this._getAllSubItems(_20d);
};
dhtmlXTreeObject.prototype.getAllChildless=function(){
return this._getAllScraggyItems(this.htmlNode);
};
dhtmlXTreeObject.prototype.getAllLeafs=dhtmlXTreeObject.prototype.getAllChildless;
dhtmlXTreeObject.prototype._getAllScraggyItems=function(node){
var z="";
for(var i=0;i<node.childsCount;i++){
if((node.childNodes[i].unParsed)||(node.childNodes[i].childsCount>0)){
if(node.childNodes[i].unParsed){
var zb=this._getAllScraggyItemsXML(node.childNodes[i].unParsed,1);
}else{
var zb=this._getAllScraggyItems(node.childNodes[i]);
}
if(zb){
if(z){
z+=this.dlmtr+zb;
}else{
z=zb;
}
}
}else{
if(!z){
z=node.childNodes[i].id;
}else{
z+=this.dlmtr+node.childNodes[i].id;
}
}
}
return z;
};
dhtmlXTreeObject.prototype._getAllFatItems=function(node){
var z="";
for(var i=0;i<node.childsCount;i++){
if((node.childNodes[i].unParsed)||(node.childNodes[i].childsCount>0)){
if(!z){
z=node.childNodes[i].id;
}else{
z+=this.dlmtr+node.childNodes[i].id;
}
if(node.childNodes[i].unParsed){
var zb=this._getAllFatItemsXML(node.childNodes[i].unParsed,1);
}else{
var zb=this._getAllFatItems(node.childNodes[i]);
}
if(zb){
z+=this.dlmtr+zb;
}
}
}
return z;
};
dhtmlXTreeObject.prototype.getAllItemsWithKids=function(){
return this._getAllFatItems(this.htmlNode);
};
dhtmlXTreeObject.prototype.getAllFatItems=dhtmlXTreeObject.prototype.getAllItemsWithKids;
dhtmlXTreeObject.prototype.getAllChecked=function(){
return this._getAllChecked("","",1);
};
dhtmlXTreeObject.prototype.getAllUnchecked=function(_216){
if(_216){
_216=this._globalIdStorageFind(_216);
}
return this._getAllChecked(_216,"",0);
};
dhtmlXTreeObject.prototype.getAllPartiallyChecked=function(){
return this._getAllChecked("","",2);
};
dhtmlXTreeObject.prototype.getAllCheckedBranches=function(){
var temp=this._getAllChecked("","",1);
if(temp!=""){
temp+=this.dlmtr;
}
return temp+this._getAllChecked("","",2);
};
dhtmlXTreeObject.prototype._getAllChecked=function(_218,list,mode){
if(!_218){
_218=this.htmlNode;
}
if(_218.checkstate==mode){
if(!_218.nocheckbox){
if(list){
list+=this.dlmtr+_218.id;
}else{
list=_218.id;
}
}
}
var j=_218.childsCount;
for(var i=0;i<j;i++){
list=this._getAllChecked(_218.childNodes[i],list,mode);
}
if(list){
return list;
}else{
return "";
}
};
dhtmlXTreeObject.prototype.setItemStyle=function(_21d,_21e){
var temp=this._globalIdStorageFind(_21d);
if(!temp){
return 0;
}
if(!temp.span.style.cssText){
temp.span.setAttribute("style",temp.span.getAttribute("style")+"; "+_21e);
}else{
temp.span.style.cssText+=(";"+_21e);
}
};
dhtmlXTreeObject.prototype.enableImageDrag=function(mode){
this._itim_dg=convertStringToBoolean(mode);
};
dhtmlXTreeObject.prototype.setOnDragIn=function(func){
this.attachEvent("onDragIn",func);
};
dhtmlXTreeObject.prototype.enableDragAndDropScrolling=function(mode){
this.autoScroll=convertStringToBoolean(mode);
};
dhtmlXTreeObject.prototype.dhx_Event=function(){
this.dhx_SeverCatcherPath="";
this.attachEvent=function(_223,_224,_225){
if(this._onEventSet&&this._onEventSet[_223]){
this._onEventSet[_223].apply(this,[]);
}
_225=_225||this;
_223="ev_"+_223;
if((!this[_223])||(!this[_223].addEvent)){
var z=new this.eventCatcher(_225);
z.addEvent(this[_223]);
this[_223]=z;
}
return (_223+":"+this[_223].addEvent(_224));
};
this.callEvent=function(name,a){
if(this["ev_"+name]){
return this["ev_"+name].apply(this,a);
}
return true;
};
this.checkEvent=function(name){
if(this["ev_"+name]){
return true;
}
return false;
};
this.eventCatcher=function(obj){
var _22b=new Array();
var _22c=obj;
var _22d=function(_22e,rpc){
_22e=_22e.split(":");
var _230="";
var _231="";
var _232=_22e[1];
if(_22e[1]=="rpc"){
_230="<?xml version=\"1.0\"?><methodCall><methodName>"+_22e[2]+"</methodName><params>";
_231="</params></methodCall>";
_232=rpc;
}
var z=function(){
var _234=new dtmlXMLLoaderObject(null,window,false);
var _235=_230;
if(_231){
for(var i=0;i<arguments.length;i++){
_235+="<param><value><string>"+(arguments[i]?arguments[i].toString():"")+"</string></value></param>";
}
_235+=_231;
}else{
for(var i=0;i<arguments.length;i++){
_235+=("&arg"+i+"="+escape(arguments[i]));
}
}
_234.loadXML(_232,true,_235,_231?true:false);
try{
if(_231){
var dt=_234.doXPath("//methodResponse/params/param/value/string");
return convertStringToBoolean(dt[0].firstChild.data);
}else{
return convertStringToBoolean(_234.xmlDoc.responseText);
}
}
catch(e){
dhtmlxError.throwError("rpcError",_234.xmlDoc.responseText);
return false;
}
};
return z;
};
var z=function(){
if(_22b){
var res=true;
}
for(var i=0;i<_22b.length;i++){
if(_22b[i]!=null){
var zr=_22b[i].apply(_22c,arguments);
res=res&&zr;
}
}
return res;
};
z.addEvent=function(ev){
if(typeof (ev)!="function"){
if(ev&&ev.indexOf&&ev.indexOf("server:")===0){
ev=new _22d(ev,_22c.rpcServer);
}else{
ev=eval(ev);
}
}
if(ev){
return _22b.push(ev)-1;
}
return false;
};
z.removeEvent=function(id){
_22b[id]=null;
};
return z;
};
this.detachEvent=function(id){
if(id!=false){
var list=id.split(":");
this[list[0]].removeEvent(list[1]);
}
};
};

