var nlsTree=new Object();var nlsTreeIc=new Object();var _ua=window.navigator.userAgent;var nls_isIE=(_ua.indexOf("MSIE")>=0);var nls_isSafari=(_ua.indexOf("Safari")>=0);var nls_isOpera=(_ua.indexOf("Opera")>=0);if(nls_isOpera){nls_isIE=false}var NLSTREE=NlsTree.prototype;function NlsTree(E){this.tId=E;this.opt=new StdOpt();this.nLst=new Object();this.ctxMenu=null;this.rt=null;this.selNd=null;this.defImgPath="";this.selElm=null;this.tmId=null;this.nCnt=0;this._fl=true;this.msNds=new Object();if(nlsTree[this.tId]!=null){alert("The tree with id "+this.tId+" already exist, please change the tree id.")}else{nlsTree[this.tId]=this}var D=(document.getElementsByTagName?document.getElementsByTagName("SCRIPT"):document.scripts);for(var F=0;F<D.length;F++){if(D[F].src.toLowerCase().indexOf("nlstree.js")>=0){this.defImgPath=D[F].src.replace(/nlstree.js/gi,"img/");break}}this.useIconSet(new StdIco(this.defImgPath));this.renderer=new DefRenderer(E);return this}function StdIco(B){this.pnb=B+"plusnb.gif";this.pb=B+"plusb.gif";this.mnb=B+"minusnb.gif";this.mb=B+"minusb.gif";this.opf=B+"folderopen.gif";this.clf=B+"folder.gif";this.chd=B+"leaf.gif";this.rot=B+"root.gif";this.lnb=B+"lineang.gif";this.lb=B+"lineints.gif";this.lin=B+"line.gif";this.bln=B+"blank.gif";this.pnl=B+"blank.gif";this.mnl=B+"blank.gif";this.toString=function(){return"Standard Icons"};return this}function StdOpt(){this.trg="_self";this.stlprf="";this.sort="asc";this.icon=true;this.check=false;this.editable=false;this.selRow=false;this.editKey=113;this.oneExp=false;this.enableCtx=true;this.oneClick=false;this.mntState=false;this.icAsSel=false;this.checkIncSub=true;this.indent=true;this.hideRoot=false;this.showExpdr=false;this.checkOnLeaf=false;this.evDblClick=false;this.evCtxMenu=false;this.evMouseUp=false;this.evMouseDown=false;this.evMouseMove=false;this.evMouseOut=false;this.evMouseOver=false;return this}function NlsNode(O,M,N,I,K,P,J,L){this.orgId=O;this.id="";this.capt=M;this.url=(N==null||N=="")?"":N;this.ic=(I==null||I=="")?null:I.split(",");this.exp=K==null?false:K;this.chk=(P?P:false);this.xtra=J==null?false:J;this.ctxMenu=null;this.cstStyle="";this.trg=null;this.custom=null;this.title=L==null?M:L;this.editablity=true;this.checkbox=true;this.sortFunc=NLSTREE.compareNode;if(this.ic){preloadIcon(this.ic[0]);if(this.ic.length>1){preloadIcon(this.ic[1])}}this.isCustomNode=function(){return this.custom==null};this.nx=null;this.pv=null;this.fc=null;this.lc=null;this.pr=null;this.equals=function(A){return(this.id==A.id)}}NLSTREE.genIntId=function(B){return this.tId+B};NLSTREE.genOrgId=function(B){return B.substr(this.tId.length)};NLSTREE.compareNode=function(C,D){return(C.capt>=D.capt)};NLSTREE.compareNodeById=function(C,D){return(C.id>=D.id)};NLSTREE.add=function(N,R,X,O,M,W,U,P,S){var V=new NlsNode(((N==null||String(N)=="")?("int"+(++this.nCnt)):N),X,O,M,W,U,P,S);V.id=this.genIntId(V.orgId);if(this.nLst[V.id]!=null){return }if(this.rt==null){this.rt=V}else{var T=this.nLst[this.genIntId(R)];if(T==null){return }V.pr=T;if(T.lc==null){T.fc=V;T.lc=V}else{var Q=T.fc;if(this.opt.sort!="no"){do{if(T.sortFunc!=null){if(this.opt.sort=="asc"?T.sortFunc(Q,V):T.sortFunc(V,Q)){break}}Q=Q.nx}while(Q!=null);if(Q!=null){if(Q.pv==null){Q.pv=V;T.fc=V}else{V.pv=Q.pv;Q.pv.nx=V;Q.pv=V}V.nx=Q}}if(this.opt.sort=="no"||Q==null){V.pv=T.lc;T.lc.nx=V;T.lc=V}}}this.nLst[V.id]=V;return V};NLSTREE.addCustomNode=function(F,G,E){var H=this.add(F,G,"");H.capt="";H.custom=E;return H};NLSTREE.addBefore=function(M,V,U,N,L,T,Q,O,P){var S=this.getNodeById(V);if(S==null){return }var R=new NlsNode(((M==null||M=="")?("int"+(++this.nCnt)):M),U,N,L,T,Q,O,P);R.id=this.genIntId(R.orgId);if(this.nLst[R.id]!=null){alert("Item with id "+M+" already exist");return }this.nLst[R.id]=R;R.pr=S.pr;R.nx=S;if(S.pv==null){S.pv=R;S.pr.fc=R}else{R.pv=S.pv;S.pv.nx=R;S.pv=R}return R};NLSTREE.addAfter=function(M,V,U,N,L,T,Q,O,P){var S=this.getNodeById(V);if(S==null){return }var R=new NlsNode(((M==null||M=="")?("int"+(++this.nCnt)):M),U,N,L,T,Q,O,P);
R.id=this.genIntId(R.orgId);if(this.nLst[R.id]!=null){alert("Item with id "+M+" already exist");return }this.nLst[R.id]=R;R.pr=S.pr;R.pv=S;if(S.nx==null){S.nx=R;S.pr.lc=R}else{R.nx=S.nx;S.nx.pv=R;S.nx=R}return R};NLSTREE.append=function(L,O,T,M,K,S,Q,N,P){var R=this.add(L,O,T,M,K,S,Q,N,P);this.reloadNode(O);return R};NLSTREE.remove=function(G,J){var F=(G!=null?this.nLst[this.genIntId(G)]:this.selNd);if(F!=null){if(this.rt.equals(F)){this.rt=null;this.nLst=new Object();this.selNd=null;this.selElm=null;return F}if(this.selNd&&F.equals(this.selNd)){this.selNd=null;this.selElm=null}var H=F.pr;if(H.lc.equals(F)){H.lc=F.pv}if(H.fc.equals(F)){H.fc=F.nx}if(F.pv!=null){F.pv.nx=F.nx}if(F.nx!=null){F.nx.pv=F.pv}F.nx=null;F.pv=null;F.pr=null;var I=this.tId;this.loopTree(F,function(A){nlsTree[I].nLst[A.id]=null});if(this.opt.multiSel){delete this.msNds[F.id]}if(J==null||J){this.reloadNode(this.genOrgId(H.id))}}return F};NLSTREE.removeSelected=function(){var D=this.getSelNodes();for(var C=0;C<D.length;C++){this.remove(D[C].orgId)}};NLSTREE.removeChilds=function(E,F){var D=(E!=null?this.nLst[this.genIntId(E)]:this.selNd);if(D!=null){while(D.fc){this.remove(D.fc.orgId,false)}if(F==null||F){this.reloadNode(E)}}};NLSTREE.getSelNode=function(){return this.selNd};NLSTREE.getSelNodes=function(){var C=[];if(this.opt.multiSel){for(var D in this.msNds){C[C.length]=this.msNds[D]}}else{if(this.selNd!=null){C[0]=this.selNd}}return C};NLSTREE.isSelected=function(E){var G=this.getNodeById(E);var F=this.getSelNodes();for(var H=0;H<F.length;H++){if(G.id==F[H].id){return true}}return false};NLSTREE.genTree=function(){return this.renderer.genTree()};NLSTREE.renderAttributes=function(D){if(D&&D!=""){NlsGetElementById(D).innerHTML=""}var C="<input id='ndedt"+this.tId+"' type='text' class='"+this.opt.stlprf+"nodeedit' style='display:none' value='' onblur='if (nlsTree."+this.tId+"._fl) nlsTree."+this.tId+".liveNodeWrite()'>"+(!NlsGetElementById("ddGesture")?"<div id='ddGesture' style='position:absolute;border:#f0f0f0 1px solid;left:0px;top:0px;display:none'></div>":"");if(typeof (nlsctxmenu)!="undefined"){for(it in nlsctxmenu){if(!NlsGetElementById(it)){C+=nlsctxmenu[it].genMenu()}}}if(D&&D!=""){NlsGetElementById(D).innerHTML=C}else{document.write(C)}};NLSTREE.render=function(D){this.renderer.render(D);this.initEvent();var C=null;if(this.opt.mntState&&nls_getCookie){var C=nls_getCookie(this.tId+"_selnd");nls_maintainNodeState(this.tId,true)}if(C&&C!=""){this.selectNodeById(C)}};function DefRenderer(D){var C=nlsTree[D];this.rat=new Object();this.dsp=new Object();this.initRender=function(){var I=C.opt;var B=C.ico;var H="onclick=\"return nls_c2(event, '"+D+"','@id')\" ";if(I.evDblClick){H+="ondblclick=\"return nls_c3(event, '"+D+"', '@id')\" "}if(I.evCtxMenu){H+="oncontextmenu=\"return nls_c4(event, '"+D+"', '@id')\" "}if(I.evMouseUp){H+="onmouseup=\"return nls_c5(event, '"+D+"', '@id')\" "}if(I.evMouseDown){H+="onmousedown=\"return nls_c6(event, '"+D+"', '@id')\" "}if(I.evMouseOver){H+="onmouseover=\"return nls_c7(event, '"+D+"', '@id')\" "}if(I.evMouseOut){H+="onmouseout=\"return nls_c8(event, '"+D+"', '@id')\" "}if(I.evMouseMove){H+="onmousemove=\"return nls_c9(event, '"+D+"', '@id')\" "}var A="onclick=\"nls_cb1(event, '"+D+"','@id')\"";var J=["<img src='@expdr' onclick=\"nls_c1(event, '"+D+"', '@id')\" class=\"pagetree2 plusminus\">","<img src='@expdr' class='pagetree2 angleline'>","<img src='@ic' class='pagetree2 icon' "+H+">"];this.rat.cnt=["<div id='@id' class='"+I.stlprf+'row @indent\' title="@title">',"<div id='@id' class='"+I.stlprf+"row @indent' title=\"@title\" style='display:none'>","</div><div style='display:block' id='ch_@id'>","</div><div style='display:none' id='ch_@id'>"];this.rat.ex=[[[J[1].replace(/@expdr/gi,B.lnb),J[1].replace(/@expdr/gi,B.lb)],[J[1].replace(/@expdr/gi,B.lnb),J[1].replace(/@expdr/gi,B.lb)]],[[J[0].replace(/@expdr/gi,B.pnb),J[0].replace(/@expdr/gi,B.pb)],[J[0].replace(/@expdr/gi,B.mnb),J[0].replace(/@expdr/gi,B.mb)]]];this.rat.mn=['<table cellspacing=0 cellpadding=0><tr><td class="pagetree2 lines">','</td><td class="pagetree2 plusminus-and-icon">','</td><td class="pagetree2 cell3">','</td><td class="pagetree2 nodename">',"</td><td class=\"pagetree2 cell5\" width='100%'>","</td></tr></table>"];
this.rat.ics=J[2];this.rat.ic=[[J[2].replace(/@ic/gi,B.chd),J[2].replace(/@ic/gi,B.chd)],[J[2].replace(/@ic/gi,B.clf),J[2].replace(/@ic/gi,(C.opt.icAsSel?B.clf:B.opf))]];this.rat.rt=J[2].replace(/@ic/gi,B.rot);this.rat.ln=['<img src="'+B.bln+"\" class='pagetree2 icon'>",'<img src="'+B.lin+"\" class='pagetree2 line'>"];this.rat.ac=['<a class="@nstyle" style=\'display:block\' href="javascript:void(0);" '+H+" >@capt</a>","<a class=\"@nstyle\" style='display:block' target='@trg' "+H+' href="'];this.rat.st=[I.stlprf+"node",I.stlprf+"prnnode"];this.rat.cb=["<input style='height:14px;margin:1px' type='checkbox' id='cb_@id' name='cb_@id' "+A+" >","<input style='height:14px;margin:1px' type='checkbox' checked id='cb_@id' name='cb_@id' "+A+" >"];this.rat.rd=["<input style='height:14px;margin:1px' type='radio' name='rd_@id'>","<input style='height:14px;margin:1px' type='radio' checked name='rd_@id'>"]};this.genANode=function(L){this.dsp.ln="";this.dsp.ic="";this.dsp.chk="";var A=L.pr;if(C.opt.indent){while(true){if(!A||A.equals(C.rt)||(C.opt.hideRoot&&!C.opt.showExpdr&&A.pr.equals(C.rt))){break}this.dsp.ln=this.rat.ln[(A.nx!=null?1:0)]+this.dsp.ln;A=A.pr}}if(L.custom!=null){this.dsp.nd=L.custom;this.dsp.ip=this.rat.ln[0];return this.rat.mn[0]+this.dsp.ln+this.rat.mn[1]+this.dsp.ip+this.dsp.ic+this.rat.mn[2]+this.dsp.chk+this.rat.mn[4]+this.dsp.nd+this.rat.mn[5]}else{var J=1,K=0,N=1,M=0;if(!L.fc){J=0;L.exp=false}if(L.exp){K=1}if(!L.nx){N=0}if(L.id==C.rt.id){M=1}this.dsp.ip=this.rat.ex[J][K][N];if(M==1||(C.opt.hideRoot&&!C.opt.showExpdr&&L.pr.id==C.rt.id)){this.dsp.ip=""}if(C.opt.icon||M==1){if(L.ic!=null){this.dsp.ic=this.rat.ics.replace(/@ic/gi,L.ic[(!C.opt.icAsSel&&L.ic[K]?K:0)])}else{this.dsp.ic=this.rat.ic[J][K];if(M==1){this.dsp.ic=this.rat.rt}}}if(L.url){this.dsp.nd=this.rat.ac[1].replace(/@trg/gi,(L.trg==null?C.opt.trg:L.trg))+L.url+'">'+L.capt+"</a>"}else{this.dsp.nd=this.rat.ac[0].replace(/@capt/gi,L.capt)}if(L.cstStyle!=""){this.dsp.nd=this.dsp.nd.replace(/@nstyle/gi,L.cstStyle)}else{this.dsp.nd=this.dsp.nd.replace(/@nstyle/gi,this.rat.st[J])}if(C.opt.check&&L.checkbox){var B=C.opt.checkOnLeaf;if(!B||(B&&J==0)){this.dsp.chk=this.rat.cb[(L.chk?1:0)]}}if(L.pr&&L.pr.rad){this.dsp.chk=this.rat.rd[(L.chk?1:0)].replace(/@id/gi,L.pr.id)}return this.rat.mn[0]+this.dsp.ln+this.rat.mn[1]+this.dsp.ip+this.dsp.ic+this.rat.mn[2]+this.dsp.chk+this.rat.mn[3]+this.dsp.nd+this.rat.mn[5]}};this.genNodes=function(L,N,B){var K="";var J=0;var A=L.pr;while(A!=null){A=A.pr;J++}if(N){K=this.rat.cnt[(C.opt.hideRoot&&L.equals(C.rt)?1:0)]+this.genANode(L)+this.rat.cnt[(L.fc&&L.exp?2:3)]}K=K.replace(/@id/gi,L.id).replace(/@title/gi,L.title).replace(/@indent/gi,"indent"+J);if(B){document.write(K)}if(L.fc!=null){var M=L.fc;do{if(B){this.genNodes(M,true,B)}else{K=K+this.genNodes(M,true,B)}M=M.nx}while(M!=null)}if(B){if(N){document.write("</div>")}return""}else{K=N?(K+"</div>"):K;return K}};this.genTree=function(){this.initRender();return this.genNodes(C.rt,true,false)};this.render=function(A){if(A&&A!=""){NlsGetElementById(A).innerHTML='<div id="'+D+'">'+this.genTree()+"</div>"}else{this.initRender();document.write('<div id="'+D+'">');this.genNodes(C.rt,true,true);document.write("</div>")}};return this}NLSTREE.initEvent=function(){var C=(nls_isIE?document.body.onkeydown:window.onkeydown);if(!C||C.toString().search(/orgEvent/gi)<0){var D=function(A){if(nlsTree.selectedTree){nlsTree.selectedTree.liveNodePress(nls_isIE?event:A)}if(C){return C()}};if(nls_isIE){document.body.onkeydown=D}else{window.onkeydown=D}}};NLSTREE.reloadNode=function(I,H){this.renderer.initRender();var N=this.genIntId(I);var L=this.nLst[N];var J=NlsGetElementById("ch_"+N);if(H!=false){var K=this.renderer.genNodes(L,false);J.innerHTML=K;if(J.innerHTML==""){J.style.display="none"}}if(L.exp==true&&L.fc!=null){J.style.display=""}J=NlsGetElementById(N);J.innerHTML="";J.innerHTML=this.renderer.genANode(L).replace(/@id/gi,N);if(this.selNd!=null){var M=this.selNd.id;this.selNd=null;this.selElm=null;
this.selectNode(M)}};NLSTREE.selNToggle=function(B){this.toggleNode(B);if(!this.selNd||this.selNd.id!=B){this.selectNode(B)}if(this.tmId!=null){clearTimeout(this.tmId);this.tmId=null}};function nls_setStyle(H,M,N,L){var K=(L?"sel":"");var J=0;var I=M.pr;while(I!=null){I=I.pr;J++}if(H.opt.selRow){N.className=H.opt.stlprf+K+"row indent"+J}ac=N.childNodes[0].childNodes[0].childNodes[0].childNodes[3].childNodes[0];ac.className=(M.cstStyle!=""?K+M.cstStyle:H.opt.stlprf+K+(M.fc?"prnnode":"node"))}function nls_setNodeIcon(E,G,H,F){if(E.opt.icon){ic=H.childNodes[0].childNodes[0].childNodes[0].childNodes[1];if(ic.childNodes.length==2){ic=ic.childNodes[1]}else{ic=ic.childNodes[0]}if(F){if(G.ic!=null){ic.src=nlsTreeIc[G.ic[1]?G.ic[1]:G.ic[0]].src}else{ic.src=nlsTreeIc[(G.id==E.rt.id?E.ico.rot:(G.fc?E.ico.opf:E.ico.chd))].src}}else{if(G.ic!=null){ic.src=nlsTreeIc[G.ic[0]].src}else{ic.src=nlsTreeIc[(G.id==E.rt.id?E.ico.rot:(G.fc?E.ico.clf:E.ico.chd))].src}}}}NLSTREE.selectNode=function(H){nlsTree.selectedTree=this;if(this.opt.editable){var K=this.selNd;if(K!=null&&K.id!=H){if(this.tmId){clearTimeout(this.tmId);this.tmId=null}}if(K!=null&&K.id==H&&!NlsTree._blockEdit){this.tmId=setTimeout("nlsTree."+this.tId+".liveNodeEdit('"+H+"')",1000)}var I=NlsGetElementById("ndedt"+this.tId);if(I&&I.style.display==""){I.style.display="none";I.disabled=true}}var J=null;var G=null;var K=this.selNd;var L=this.selElm;if(L!=null){nls_setStyle(this,K,L,false);if(this.opt.icAsSel){nls_setNodeIcon(this,K,L,false)}}K=this.nLst[H];this.selNd=K;this.selElm=NlsGetElementById(H);L=this.selElm;nls_setStyle(this,K,L,true);if(this.opt.icAsSel){nls_setNodeIcon(this,K,L,true)}if(this.opt.mntState&&nls_setCookie){nls_setCookie(this.tId+"_selnd",K.orgId)}if(this.opt.multiSel){this.msRemoveAll();this.msAdd(K)}};NLSTREE.selectNodeById=function(E){var F=this.getNodeById(E);if(!F){return }var D=F.pr;while(D!=null){this.expandNode(D.orgId);D=D.pr}this.selectNode(F.id)};NLSTREE.unselectNodeById=function(E){var F=this.getNodeById(E);if(this.selNd!=null&&this.selNd.equals(F)){var D=NlsGetElementById(F.id);if(this.opt.icAsSel){nls_setNodeIcon(this,F,D,false)}if(this.opt.mntState&&nls_setCookie){nls_removeCookie(this.tId+"_selnd")}this.selNd=null;this.selElm=null;nls_setStyle(this,F,D,false)}};NLSTREE.isChild=function(F,H){var G=this.getNodeById(F);if(!G){return false}var E=G.pr;while(E!=null){if(E.orgId==H){return true}E=E.pr}return false};NLSTREE.hasChild=function(D){var C=this.getNodeById(D);return(C.fc!=null)};NLSTREE.expandNode=function(D){var C=this.nLst[this.genIntId(D)];if(!C.exp&&C.fc){this.toggleNode(C.id)}};NLSTREE.collapseNode=function(D){var C=this.nLst[this.genIntId(D)];if(C.exp&&C.fc){this.toggleNode(C.id)}};NLSTREE.prepareToggle=function(D){var C=this.selNd;if(C==null){this.selectNode(D);return }if(C.id==D){return }while(C!=null&&C.id!=D){C=C.pr}if(C==null){return }if(C.id==D){this.selectNode(D)}};NLSTREE.toggleNode=function(G){var H=NlsGetElementById("ch_"+G);var I=null;if(G!=this.rt.id){I=NlsGetElementById(G).childNodes[0].childNodes[0].childNodes[0].childNodes[1].childNodes[0]}var F=this.nLst[G];if(this.opt.hideRoot&&!this.opt.showExpdr&&F.pr&&F.pr.equals(this.rt)){I=null}if(F.exp){F.exp=false;H.style.display="none";if(I!=null&&F.fc!=null){I.src=F.nx?this.ico.pb:this.ico.pnb}if(!this.opt.icAsSel){nls_setNodeIcon(this,F,NlsGetElementById(G),false)}if(this.opt.mntState&&nls_delExpandedId){nls_delExpandedId(this.tId+"_ndstate",F.orgId)}this.treeOnCollapse(F.orgId)}else{if(this.opt.oneExp&&F.pr){var J=F.pr.fc;while(J){if(J.id!=G&&J.exp){this.collapseNode(J.orgId)}J=J.nx}}F.exp=true;H.style.display="block";if(I!=null&&F.fc!=null){I.src=F.nx?this.ico.mb:this.ico.mnb}if(!this.opt.icAsSel){nls_setNodeIcon(this,F,NlsGetElementById(G),true)}if(this.opt.mntState&&nls_addExpandedId){nls_addExpandedId(this.tId+"_ndstate",F.orgId)}this.treeOnExpand(F.orgId)}};NLSTREE.expandAll=function(E){var F=this.tId;var D=(!E?this.rt:this.getNodeById(E));this.loopTree(D,function(A){if(A.fc){nlsTree[F].expandNode(A.orgId)
}})};NLSTREE.collapseAll=function(H,F){var G=this.tId;var E=(!F?this.rt:this.getNodeById(F));this.loopTree(E,function(A){if(A.fc&&(!E.equals(A)||H)){nlsTree[G].collapseNode(A.orgId)}})};NLSTREE.checkNode=function(G,E){var F=NlsGetElementById("cb_"+G);var H=this.nLst[G];if(arguments.length>1){F.checked=E}H.chk=F.checked;if(this.opt.checkIncSub){if(F.checked==true){this.loopTree(H,actCheckNode)}else{this.loopTree(H,actUncheckNode)}}};function actCheckNode(C){if(!C.checkbox){return }var D=NlsGetElementById("cb_"+C.id);D.checked=true;C.chk=true}function actUncheckNode(C){if(!C.checkbox){return }var D=NlsGetElementById("cb_"+C.id);D.checked=false;C.chk=false}NLSTREE.setNodeStyle=function(H,L,G){var I=this.getNodeById(H);I.cstStyle=L;if(G){var J=NlsGetElementById(I.id);if(J){var K=J.childNodes[0].childNodes[0].childNodes[0].childNodes[3].childNodes[0];K.className=L}}};NLSTREE.setNodeCaption=function(G,I){var J=this.genIntId(G);var H=NlsGetElementById(J).childNodes[0].childNodes[0].childNodes[0].childNodes[3].childNodes[0];var F=this.nLst[J];H.innerHTML=I;F.capt=I};NLSTREE.getNodeById=function(B){return this.nLst[this.genIntId(B)]};NLSTREE.setGlobalCtxMenu=function(B){this.opt.evCtxMenu=true;this.ctxMenu=B;B.container=this};NLSTREE.setNodeCtxMenu=function(E,D){this.opt.evCtxMenu=true;var F=this.nLst[this.genIntId(E)];F.ctxMenu=D;if(D.mId){D.container=this}};NLSTREE.setNodeTarget=function(E,D){var F=this.nLst[this.genIntId(E)];F.trg=D};NLSTREE.setEditablity=function(E,D){var F=this.nLst[this.genIntId(E)];F.editablity=D};NLSTREE.enableCheckbox=function(E,D){var F=this.nLst[this.genIntId(E)];F.checkbox=D};NLSTREE.useIconSet=function(B){this.ico=B;preloadIcon(this.ico.pnb,this.ico.pb,this.ico.pnl,this.ico.mnb,this.ico.mb,this.ico.mnl,this.ico.opf,this.ico.clf,this.ico.chd,this.ico.rot,this.ico.lnb,this.ico.lb,this.ico.lin,this.ico.bln)};NLSTREE.contextMenu=function(K,I){if(!this.opt.enableCtx){return false}var N=this.nLst[I];var H=null;if(N.ctxMenu&&N.ctxMenu.mId){H=N.ctxMenu}else{if(N.ctxMenu=="DEFAULT"){H=null}else{if(N.ctxMenu=="NONE"){return false}else{H=this.ctxMenu}}}if(!H){return true}if(this.opt.multiSel&&this.isSelected(N.orgId)){var J=this.getSelNodes();for(var L=0;L<J.length;L++){var M=(J[L].ctxMenu==null?this.ctxMenu:J[L].ctxMenu);if(M!=null&&M.mId!=H.mId){this.selectNode(I);break}}}else{this.selectNode(I)}if(this.tmId){clearTimeout(this.tmId)}H.showMenu(K.clientX,K.clientY);return false};NLSTREE.loopTree=function(E,D){D(E);if(E.fc!=null){var F=E.fc;do{this.loopTree(F,D);F=F.nx}while(F!=null)}};NLSTREE.liveNodeEditStart=function(B){this.tmId=setTimeout("nlsTree."+this.tId+".liveNodeEdit('"+B+"')",0)};NLSTREE.liveNodeEdit=function(I){if(!this.nLst[I].editablity){this.tmId=null;return }if(this.tmId!=null){var L=NlsGetElementById("ndedt"+this.tId);var M=NlsGetElementById(I).childNodes[0].childNodes[0].childNodes[0].childNodes[3].childNodes[0];var N=0,J=0,K=M;while(K){N+=K.offsetLeft;J+=K.offsetTop;K=K.offsetParent}K=NlsGetElementById(this.tId);if(K){J-=K.scrollTop;N-=K.scrollLeft}L.disabled=false;var H=this.editBoxPosAdj();L.style.top=J+H[1]+"px";L.style.left=N+H[0]+"px";L.style.display="block";L.focus();L.value=this.nLst[I].capt;this.tmId=null;this.$editing=true}};NLSTREE.liveNodeWrite=function(){var D=NlsGetElementById("ndedt"+this.tId);if(D.style.display=="none"){return }var C=NlsGetElementById(this.selNd.id).childNodes[0].childNodes[0].childNodes[0].childNodes[3].childNodes[0];if(D.value!=""&&D.value!=this.selNd.capt){if(this.treeOnBeforeNodeChange(this.selNd.orgId)){C.innerHTML=D.value;this.selNd.capt=D.value;this.treeOnNodeChange(this.selNd.orgId)}else{return }}D.style.display="none";D.disabled=true;this.$editing=false};NLSTREE.liveNodePress=function(C){if(!this.opt.editable){return }if(C.keyCode==13){this._fl=false;this.liveNodeWrite();this._fl=true}else{if(C.keyCode==27){var D=NlsGetElementById("ndedt"+this.tId);D.style.display="none";D.disabled=true}else{if(C.keyCode==this.opt.editKey){this.tmId=setTimeout("nlsTree."+this.tId+".liveNodeEdit('"+this.selNd.id+"')",10)
}}}};NLSTREE.editBoxPosAdj=function(){return[0,0]};function nls_c1(F,E,D){nlsTree[E].prepareToggle(D);nlsTree[E].toggleNode(D)}function nls_c2(I,G,F){var J=nlsTree[G];var H=J.nLst[F];if(I.ctrlKey&&I.altKey){if(I.stopPropagation){I.stopPropagation()}else{I.cancelBubble=true}return J.contextMenu(I,F)}if(J.opt.multiSel){if(!nls_msTreeOnClick(I,G,F)){return false}}if((J.opt.oneClick||(J.opt.hideRoot&&J.rt.equals(H.pr)))&&J.nLst[F].fc){J.selNToggle(F)}else{J.selectNode(F)}return J.treeOnClick(I,J.genOrgId(F))}function nls_c3(G,F,E){var H=nlsTree[F];if(H.nLst[E].fc){H.selNToggle(E)}return H.treeOnDblClick(G,H.genOrgId(E))}function nls_c4(G,F,E){var H=nlsTree[F];return H.contextMenu(G,E)}function nls_c5(G,F,E){var H=nlsTree[F];return H.treeOnMouseUp(G,H.genOrgId(E))}function nls_c6(G,F,E){var H=nlsTree[F];return H.treeOnMouseDown(G,H.genOrgId(E))}function nls_c7(G,F,E){var H=nlsTree[F];return H.treeOnMouseOver(G,H.genOrgId(E))}function nls_c8(G,F,E){var H=nlsTree[F];return H.treeOnMouseOut(G,H.genOrgId(E))}function nls_c9(G,F,E){var H=nlsTree[F];return H.treeOnMouseMove(G,H.genOrgId(E))}function nls_cb1(G,F,E){var H=nlsTree[F];H.checkNode(E);H.treeOnCheck(H.genOrgId(E))}NLSTREE.treeOnClick=function(C,D){return true};NLSTREE.treeOnDblClick=function(C,D){};NLSTREE.treeOnMouseOver=function(C,D){};NLSTREE.treeOnMouseMove=function(C,D){};NLSTREE.treeOnMouseOut=function(C,D){};NLSTREE.treeOnMouseDown=function(C,D){};NLSTREE.treeOnMouseUp=function(C,D){};NLSTREE.treeOnCheck=function(B){};NLSTREE.treeOnExpand=function(B){};NLSTREE.treeOnCollapse=function(B){};NLSTREE.treeOnNodeChange=function(B){};NLSTREE.treeOnBeforeNodeChange=function(B){return true};function preloadIcon(){var C=preloadIcon.arguments;for(var D=0;D<C.length;D++){if(!nlsTreeIc[C[D]]){nlsTreeIc[C[D]]=new Image();nlsTreeIc[C[D]].src=C[D]}}}function NlsGetElementById(B){if(document.all){return document.all(B)}else{if(document.getElementById){return document.getElementById(B)}}};
