var RadTreeView_KeyboardHooked= false; var RadTreeView_Active=null; var RadTreeView_DragActive=null; var RadTreeView_MouseMoveHooked= false; var RadTreeView_MouseUpHooked= false; var RadTreeView_MouseY=0; var RadTreeViewGlobalFirstParam=null; var RadTreeViewGlobalSecondParam=null; var RadTreeViewGlobalThirdParam=null; var contextMenuToBeHidden=null; if (typeof(window.RadControlsNamespace)=="undefined"){window.RadControlsNamespace=new Object(); } ; RadControlsNamespace.AppendStyleSheet= function (O,o,I){if (!I){return; }if (!O){document.write("\074"+"\x6cink"+"\x20rel=\047\x73ty\x6c\145sh\x65et\047\x20type\x3d\x27te\x78\164\x2fcss\x27\040h\x72ef=\047"+I+"\047\x20/>"); }else {var U=document.createElement("LINK"); U.rel="stylesh\x65\x65t"; U.type="\x74ext/css"; U.href=I; document.getElementById(o+"StyleS\x68\x65etHol\x64\x65r").appendChild(U); }} ; function RadTreeNode(){ this.Parent=null; this.TreeView=null; this.Nodes=new Array(); this.ID=null; this.ClientID=null; this.SignImage=null; this.SignImageExpanded=null; this.Image=0; this.ImageExpanded=0; this.Action=null; this.Index=0; this.Level=0; this.Text=null; this.Value=null; this.Category=null; this.NodeCss=null; this.NodeCssOver=null; this.NodeCssSelect=null; this.ContextMenuName=null; this.Enabled= true; this.Expanded= false; this.Checked= false; this.Selected= false; this.DragEnabled=1; this.DropEnabled=1; this.EditEnabled=1; this.ExpandOnServer=0; this.IsClientNode=0; this.Attributes=new Array(); this.Z= false; } ; RadTreeNode.prototype.Next= function (){var z=(this.Parent!=null)?this.Parent.Nodes: this.TreeView.Nodes; return (this.Index>=z.length)?null:z[this.Index+1]; } ; RadTreeNode.prototype.Prev= function (){var z=(this.Parent!=null)?this.Parent.Nodes: this.TreeView.Nodes; return (this.Index<=0)?null:z[this.Index-1]; } ; RadTreeNode.prototype.NextVisible= function (){if (this.Expanded)return this.Nodes[0]; if (this.Next()!=null)return this.Next(); var W=this ; while (W.Parent!=null){if (W.Parent.Next()!=null)return W.Parent.Next(); W=W.Parent; }return null; } ; RadTreeNode.prototype.PrevVisible= function (){if (this.Prev()!=null){return this.Prev(); }if (this.Parent!=null){return this.Parent; }return null; } ; RadTreeNode.prototype.Toggle= function (){if (this.Enabled){if (this.TreeView.FireEvent(this.TreeView.BeforeClientToggle,this )== false){return; } (this.Expanded)?this.Collapse(): this.Expand(); this.TreeView.FireEvent(this.TreeView.AfterClientToggle,this ); }} ; RadTreeNode.prototype.CollapseNonParentNodes= function (){for (var i=0; i<this.TreeView.AllNodes.length; i++){if (this.TreeView.AllNodes[i].Expanded && !this.IsParent(this.TreeView.AllNodes[i])){ this.TreeView.AllNodes[i].CollapseNoEffect(); }}} ; RadTreeNode.prototype.V= function (s){try {return encodeURIComponent(s); }catch (e){return escape(s); }} ; RadTreeNode.prototype.v= function (){ throw new Error("No \x52\x61\x64Tre\x65\x56iew\x20instanc\x65\040\x68as bee\x6e\040\x63reat\x65\144 \x6fn the\x20\163e\x72ver.\012"+"M\x61\x6be sur\x65\x20tha\x74\x20yo\x75\040h\x61\166e\x20\x74he\x20contr\x6f\154 \x69nstan\x63\145 \x63reat\x65\144\x2e\012"+"\x50lease revi\x65\x77 th\x69\x73 a\x72\x74icl\x65\040f\x6f\162 \x61dditi\x6f\156a\x6c info\x72\155a\x74ion."); };RadTreeNode.prototype.T= function (){var url=this.TreeView.LoadOnDemandUrl+"\x26rtnCl\x69\x65ntID\x3d"+this.ClientID+"&rtnL\x65\x76el="+this.Level+"\x26rtnID\x3d"+this.ID+"&rtnParent\x50\x6fsit\x69\x6fn="+this.GetParentPositions()+"\x26\162tn\x54\x65xt="+this.V(this.Text)+"\x26rtnVal\x75\x65="+this.V(this.Value)+"\x26rtnCate\x67\x6fry="+this.V(this.Category)+"&\x72\x74nChecke\x64\x3d"+this.Checked; var S; if (typeof(XMLHttpRequest)!="unde\x66\x69ned"){S=new XMLHttpRequest(); }else {S=new ActiveXObject("\x4dicrosoft.XM\x4c\x48TTP"); }url=url+"\x26timeSt\x61\x6dp="+encodeURIComponent((new Date()).getTime()); S.open("GET",url, true); var R=this ; S.onreadystatechange= function (){if (S.readyState!=4)return; var html=S.responseText; var index=html.indexOf(","); var Q=parseInt(html.substring(0,index)); var P=html.substring(index+1,Q+index+1); var N=html.substring(Q+index+1); R.LoadNodesOnDemand(P,S.status,url); R.ImageOn(); R.SignOn(); R.Expanded= true; R.ExpandOnServer=0; var M=R.TextElement().parentNode; var m=M.parentNode; switch (R.TreeView.LoadingMessagePosition){case 0:case 1:if (M.tagName=="\x41"){M.firstChild.innerHTML=R.Text; }else {m=R.TextElement().parentNode; if (R.TextElement().innerText){R.TextElement().innerText=R.Text; }else {R.TextElement().innerHTML=R.Text; }}break; case 2:M.removeChild(document.getElementById(R.ClientID+"Loading")); m=R.TextElement().parentNode; break; case 3:m=R.TextElement().parentNode; }if (R.Nodes.length>0){rtvInsertHTML(m,N); var images=m.getElementsByTagName("IM\x47"); for (var i=0; i<images.length; i++){RadTreeView.L(images[i]); }var l=m.getElementsByTagName("\x49NPUT"); for (var i=0; i<l.length; i++){l[i].style.verticalAlign="m\x69\x64\x64le"; }}R.Z= false; R.TreeView.FireEvent(R.TreeView.AfterClientToggle,R); } ; S.send(null); } ; RadTreeNode.prototype.Expand= function (){if (this.ExpandOnServer){if (!this.TreeView.FireEvent(this.TreeView.BeforeClientToggle,this )){return; }if (this.ExpandOnServer==1){ this.TreeView.K("NodeExpa\x6ed",this.ClientID); return; }if (this.ExpandOnServer==2){if (!this.Z){ this.Z= true; switch (this.TreeView.LoadingMessagePosition){case 0: this.TextElement().innerHTML="<\x73\x70an cla\x73\x73="+this.TreeView.LoadingMessageCssClass+">"+this.TreeView.LoadingMessage+"</sp\x61\x6e> "+this.TextElement().innerHTML; break; case 1: this.TextElement().innerHTML=this.TextElement().innerHTML+" "+"<sp\x61\x6e class\x3d"+this.TreeView.LoadingMessageCssClass+">"+this.TreeView.LoadingMessage+"</span> "; break; case 2:rtvInsertHTML(this.TextElement().parentNode,"<di\x76\x20id="+this.ClientID+"Loa\x64\x69ng "+" class="+this.TreeView.LoadingMessageCssClass+"\x3e"+this.TreeView.LoadingMessage+"\x3c\x2fdiv>"); break; }var R=this ; window.setTimeout( function (){R.T();} ,20); return; }}}if (!this.Nodes.length){return; }if (this.TreeView.SingleExpandPath){ this.CollapseNonParentNodes(); }var k=document.getElementById("\x47"+this.ClientID); if (this.TreeView.ExpandDelay>0){k.style.overflow="hi\x64\x64en"; k.style.height="1px"; k.style.display="\142\x6c\x6fck"; k.firstChild.style.position="\x72\x65lative"; window.setTimeout("rtv\x4e\x6fdeExpa\x6e\x64(1,\x27"+k.id+"\047\x2c"+this.TreeView.ExpandDelay+");",20); }else {k.style.display="\x62\x6cock"; } this.ImageOn(); this.SignOn(); this.Expanded= true; if (!this.IsClientNode){ this.TreeView.UpdateExpandedState(); }} ; RadTreeNode.prototype.GetParentPositions= function (){var parentNode=this ; var J=""; while (parentNode!=null){if (parentNode.Next()!=null){J=J+"\x31"; }else {J=J+"\x30"; }parentNode=parentNode.Parent; }return J; } ; RadTreeNode.prototype.Collapse= function (){if (this.Nodes.length>0){if (this.TreeView.ExpandDelay>0){var k=document.getElementById("G"+this.ClientID); if (k.scrollHeight!="undefined"){k.style.overflow="hidden"; k.style.display="block"; k.firstChild.style.position="\x72elative"; window.setTimeout("\x72tvNod\x65\x43ol\x6c\x61pse("+k.scrollHeight+"\x2c\047"+k.id+"\x27\x2c"+this.TreeView.ExpandDelay+" );",20); }else { this.CollapseNoEffect(); }}else { this.CollapseNoEffect(); } this.ImageOff(); this.SignOff(); this.Expanded= false; this.TreeView.UpdateExpandedState(); }} ; RadTreeNode.prototype.CollapseNoEffect= function (){if (this.Nodes.length>0){var k=document.getElementById("G"+this.ClientID); k.style.display="non\x65"; this.ImageOff(); this.SignOff(); this.Expanded= false; this.TreeView.UpdateExpandedState(); }} ; RadTreeNode.prototype.Highlight= function (e){if (!this.Enabled){return; }if (e){if (this.TreeView.MultipleSelect && (e.ctrlKey || e.shiftKey)){if (this.Selected){ this.TextElement().className=this.NodeCss; this.Selected= false; if (this.TreeView.SelectedNode==this ){ this.TreeView.SelectedNode=null; } this.TreeView.UpdateSelectedState(); return; }}else { this.TreeView.UnSelectAllNodes(); }} this.TextElement().className=this.NodeCssSelect; this.TreeView.SelectNode(this ); this.TreeView.FireEvent(this.TreeView.AfterClientHighlight,this ); } ; RadTreeNode.prototype.ExecuteAction= function (e){if (this.IsClientNode){return; }if (this.TextElement().tagName=="A"){ this.TextElement().click(); }else if (this.Action){ this.TreeView.K("\x4e\x6f\x64eClic\x6b",this.ClientID); }if (e){ (document.all)?e.returnValue= false :e.preventDefault(); }} ; RadTreeNode.prototype.Select= function (e){if (this.TreeView.FireEvent(this.TreeView.BeforeClientClick,this,e)== false)return; if (this.Enabled){ this.Highlight(e); this.TreeView.LastHighlighted=this ; this.ExecuteAction(); }else { (document.all)?e.returnValue= false :e.preventDefault(); } this.TreeView.FireEvent(this.TreeView.AfterClientClick,this,e); } ; RadTreeNode.prototype.UnSelect= function (){if (this.TextElement().parentNode && this.TextElement().parentNode.tagName=="A"){ this.TextElement().parentNode.className=this.NodeCss; } this.TextElement().className=this.NodeCss; this.Selected= false; } ; RadTreeNode.prototype.Disable= function (){ this.TextElement().className=this.TreeView.NodeCssDisable; this.Enabled= false; this.Selected= false; if (this.CheckElement()!=null)this.CheckElement().disabled= true; } ; RadTreeNode.prototype.Enable= function (){ this.TextElement().className=this.NodeCss; this.Enabled= true; if (this.CheckElement()!=null){ this.CheckElement().disabled= false; }} ; RadTreeNode.prototype.Hover= function (){if (this.Enabled){if (this.TreeView.FireEvent(this.TreeView.BeforeClientHighlight,this )== false){return; } this.TreeView.LastHighlighted=this ; if (RadTreeView_DragActive!=null && RadTreeView_DragActive.DragClone!=null && (!this.Expanded) && this.ExpandOnServer!=1){var R=this ; window.setTimeout( function (){R.H(); } ,1000); }if (!this.Selected){ this.TextElement().className=this.NodeCssOver; if (this.Image){ this.ImageElement().style.cursor="han\x64"; }} this.TreeView.FireEvent(this.TreeView.AfterClientHighlight,this ); }} ; RadTreeNode.prototype.H= function (){if (RadTreeView_DragActive!=null && RadTreeView_DragActive.DragClone!=null && (!this.Expanded)){if (RadTreeView_Active.LastHighlighted==this ){ this.Expand(); }}} ; RadTreeNode.prototype.UnHover= function (){if (this.Enabled){ this.TreeView.LastHighlighted=null; if (!this.Selected){ this.TextElement().className=this.NodeCss; if (this.Image){ this.ImageElement().style.cursor="\x64efau\x6c\x74"; }} this.TreeView.FireEvent(this.TreeView.AfterClientMouseOut,this ); }} ; RadTreeNode.prototype.CheckBoxClick= function (e){if (this.Enabled){if (this.TreeView.FireEvent(this.TreeView.BeforeClientCheck,this )== false){ (this.Checked)?this.Check(): this.UnCheck(); return; } (this.Checked)?this.UnCheck(): this.Check(); this.TreeView.FireEvent(this.TreeView.AfterClientCheck,this ); if (this.TreeView.AutoPostBackOnCheck){ this.TreeView.K("\x4eodeCheck",this.ClientID); return; }}} ; RadTreeNode.prototype.Check= function (){if (this.CheckElement()!=null){ this.CheckElement().checked= true; this.Checked= true; this.TreeView.UpdateCheckedState(); }} ; RadTreeNode.prototype.UnCheck= function (){if (this.CheckElement()!=null){ this.CheckElement().checked= false; this.Checked= false; this.TreeView.UpdateCheckedState(); }} ; RadTreeNode.prototype.IsSet= function (a){return (a!=null && a!=""); } ; RadTreeNode.prototype.ImageOn= function (){var h=document.getElementById(this.ClientID+"i"); if (this.ImageExpanded!=0){h.src=this.ImageExpanded; }} ; RadTreeNode.prototype.ImageOff= function (){var h=document.getElementById(this.ClientID+"\151"); if (this.Image!=0){h.src=this.Image; }} ; RadTreeNode.prototype.SignOn= function (){var g=document.getElementById(this.ClientID+"\x63"); if (this.IsSet(this.SignImageExpanded)){g.src=this.SignImageExpanded; }} ; RadTreeNode.prototype.SignOff= function (){var g=document.getElementById(this.ClientID+"c"); if (this.IsSet(this.SignImage)){g.src=this.SignImage; }} ; RadTreeNode.prototype.TextElement= function (){var F=document.getElementById(this.ClientID); var f=F.getElementsByTagName("span")[0]; if (f==null){f=F.getElementsByTagName("a")[0]; }return f; } ; RadTreeNode.prototype.ImageElement= function (){return document.getElementById(this.ClientID+"\x69"); } ; RadTreeNode.prototype.CheckElement= function (){return document.getElementById(this.ClientID).getElementsByTagName("\x69\x6eput")[0]; } ; RadTreeNode.prototype.IsParent= function (node){var parent=this.Parent; while (parent!=null){if (node==parent)return true; parent=parent.Parent; }return false; } ; RadTreeNode.prototype.StartEdit= function (){if (this.EditEnabled){var D=this.Text; this.TreeView.EditMode= true; var parentElement=this.TextElement().parentNode; this.TreeView.EditTextElement=this.TextElement().cloneNode( true); this.TextElement().parentNode.removeChild(this.TextElement()); var d=this ; var C=document.createElement("input"); C.setAttribute("type","\x74ext"); C.setAttribute("size",this.Text.length+3); C.setAttribute("\x76alue",D); C.className=this.TreeView.NodeCssEdit; var B=this ; C.onblur= function (){B.EndEdit(); } ; C.onchange= function (){B.EndEdit(); } ; C.onkeypress= function (e){B.AnalyzeEditKeypress(e); } ; C.onsubmit= function (){return false; } ; parentElement.appendChild(C); this.TreeView.EditInputElement=C; C.focus(); C.onselectstart= function (e){if (!e)e=window.event; if (e.stopPropagation){e.stopPropagation(); }else {e.cancelBubble= true; }} ; var o0=0; var O0=this.Text.length; if (C.createTextRange){var l0=C.createTextRange(); l0.moveStart("chara\x63ter",o0); l0.moveEnd("character",O0); l0.select(); }else {C.setSelectionRange(o0,O0); }}} ; RadTreeNode.prototype.EndEdit= function (){ this.TreeView.EditInputElement.onblur=null; this.TreeView.EditInputElement.onchange=null; var parentElement=this.TreeView.EditInputElement.parentNode; if (this.TreeView.FireEvent(this.TreeView.AfterClientEdit,this,this.Text,this.TreeView.EditInputElement.value)!= false){if (this.Text!=this.TreeView.EditInputElement.value){var i0=this.ClientID+"\x3a"+this.TreeView.I0(this.TreeView.EditInputElement.value); this.TreeView.K("\x4eodeEdit",i0); return; } this.TreeView.EditTextElement.innerHTML=this.TreeView.EditInputElement.value; this.Text=this.TreeView.EditInputElement.value; } this.TreeView.EditInputElement.parentNode.removeChild(this.TreeView.EditInputElement); parentElement.appendChild(this.TreeView.EditTextElement); this.TreeView.EditMode= false; this.TreeView.EditInputElement=null; this.TreeView.EditTextElement=null; } ; RadTreeNode.prototype.AnalyzeEditKeypress= function (e){if (document.all)e=event; if (e.keyCode==13){ (document.all)?e.returnValue= false :e.preventDefault(); this.EndEdit(); return false; }if (e.keyCode==27){ this.TreeView.EditInputElement.value=this.TreeView.EditTextElement.innerHTML; this.EndEdit(); }return true; } ; RadTreeNode.prototype.LoadNodesOnDemand= function (s,o1,url){if (o1==404){var O1="CallBac\x6b\x20URL\x20\x6eot \x66ound:\x20\x0a\x0d\x0a\015"+url+"\012\x0d\012\x0d\x41re \x79\x6fu \x75\163i\x6e\x67 U\x52\x4c R\x65writ\x65r? Pl\x65ase, \x74\162y\x20sett\x69\156g\x20the \x43all\x42ack\x55rl p\x72oper\x74y t\x6f mat\x63h t\x68e c\x6frre\x63t U\x52L y\x6fu n\x65ed"; alert(O1); }else {eval(s); var l1=eval(this.ClientID+"\x43\154ien\x74\x44ata"); for (var i=0; i<l1.length; i++){l1[i][17]=0; this.TreeView.LoadNode(l1[i],null,this ); }}} ; function RadTreeView(i1){if (window.tlrkTreeViews==null){window.tlrkTreeViews=new Array(); }if (window.tlrkTreeViews[i1]!=null){I1=window.tlrkTreeViews[i1]; I1.Dispose(); }tlrkTreeViews[i1]=this ; this.Nodes=new Array(); this.AllNodes=new Array(); this.ClientID=null; this.SelectedNode=null; this.DragMode= false; this.DragSource=null; this.DragClone=null; this.LastHighlighted=null; this.MouseInside= false; this.HtmlElementID=""; this.EditMode= false; this.EditTextElement=null; this.EditInputElement=null; this.BeforeClientClick=null; this.BeforeClientHighlight=null; this.AfterClientHighlight=null; this.AfterClientMouseOut=null; this.BeforeClientDrop=null; this.AfterClientDrop=null; this.BeforeClientToggle=null; this.AfterClientToggle=null; this.BeforeClientContextClick=null; this.BeforeClientContextMenu=null; this.AfterClientContextClick=null; this.BeforeClientCheck=null; this.AfterClientCheck=null; this.AfterClientMove=null; this.AfterClientFocus=null; this.BeforeClientDrag=null; this.AfterClientEdit=null; this.AfterClientClick=null; this.BeforeClientDoubleClick=null; this.AutoPostBackOnCheck= false; this.CausesValidation= true; this.ContextMenuVisible= false; this.ContextMenuName=null; this.o2=null; this.SingleExpandPath= false; this.ExpandDelay=2; this.TabIndex=0; this.AllowNodeEditing= false; this.LoadOnDemandUrl=null; this.LoadingMessage="(loading\x20...)"; this.LoadingMessagePosition=0; this.LoadingMessageCssClass="LoadingM\x65\x73sage"; this.O2= false; } ; RadTreeView.L= function (l2){l2.align="\x61bsmiddle"; l2.style.display="\x69nline"; if (!document.all || window.opera){l2.nextSibling.style.verticalAlign="m\x69\x64dle"; }};RadTreeView.prototype.OnInit= function (){var ImageList=new Array(); this.PreloadImages(ImageList); i2=ImageList; var images=document.getElementById(this.Container).getElementsByTagName("IMG"); for (var i=0; i<images.length; i++){var index=images[i].className; if (index!=null && index!=""){images[i].src=ImageList[index].src; RadTreeView.L(images[i]); }} this.LoadTree(ImageList); var l=document.getElementById(this.Container).getElementsByTagName("\111\x4ePUT"); for (var i=0; i<l.length; i++){l[i].style.verticalAlign="\x6d\151ddl\x65"; }if (document.addEventListener && (!RadTreeView_KeyboardHooked)){RadTreeView_KeyboardHooked= true; document.addEventListener("keydo\x77\x6e",this.KeyDownMozilla, false); }if ((!RadTreeView_MouseMoveHooked) && (this.DragAndDrop)){RadTreeView_MouseMoveHooked= true; if (document.attachEvent){document.attachEvent("onmouse\x6d\x6fve",rtvMouseMove); }if (document.addEventListener){document.addEventListener("mousemove",rtvMouseMove, false); }}if (!RadTreeView_MouseUpHooked){RadTreeView_MouseUpHooked= true; if (document.attachEvent){document.attachEvent("on\x6d\x6fuseup",rtvMouseUp); }if (document.addEventListener){document.addEventListener("mouseup",rtvMouseUp, false); }} this.I2(); this.O2= true; } ; RadTreeView.prototype.I2= function (){var d=this ; var o3=document.getElementById(this.Container); o3.onfocus= function (e){rtvDispatcher(d.ClientID,"\x66ocus",e); } ; o3.onmouseover= function (e){rtvDispatcher(d.ClientID,"\x6dover",e); } ; o3.onmouseout= function (e){rtvDispatcher(d.ClientID,"\155\x6f\x75t",e); } ; o3.oncontextmenu= function (e){rtvDispatcher(d.ClientID,"\x63ontext",e); } ; o3.onscroll= function (e){rtvDispatcher(d.ClientID,"scroll",e); } ; o3.onclick= function (e){rtvDispatcher(d.ClientID,"mcl\x69\x63k",e); } ; o3.ondblclick= function (e){rtvDispatcher(d.ClientID,"mdclic\x6b",e); } ; o3.onkeydown= function (e){rtvDispatcher(d.ClientID,"\x6b\x65ydown",e); } ; o3.onselectstart= function (){return false; } ; o3.ondragstart= function (){return false; } ; if (this.DragAndDrop){o3.onmousedown= function (e){rtvDispatcher(d.ClientID,"md\x6f\x77n",e); } ; }if (window.attachEvent){window.attachEvent("onunload", function (){d.Dispose(); } ); } this.O3=o3; } ; RadTreeView.prototype.Dispose= function (){if (this.l3)return; this.l3= true; try {var o3=this.O3; if (o3!=null){for (var i3 in o3){if (typeof(o3[i3])=="f\x75nction"){o3[i3]=null; }}for (var i3 in this ){if (i3!="\x44ispose"){ this[i3]=null; }}} this.O3=null; }catch (I3){}};RadTreeView.prototype.PreloadImages= function (images){var imageData=eval(this.ClientID+"ImageData"); for (var i=0; i<imageData.length; i++){var o4=new Image(); o4.src=imageData[i]; images[i]=o4; }} ; RadTreeView.prototype.FindNode= function (node){for (var i=0; i<this.AllNodes.length; i++){if (this.AllNodes[i].ClientID==node){return this.AllNodes[i]; }}return null; } ; RadTreeView.prototype.FindNodeByText= function (text){for (var i=0; i<this.AllNodes.length; i++){if (this.AllNodes[i].Text==text){return this.AllNodes[i]; }}return null; } ; RadTreeView.prototype.FindNodeByValue= function (value){for (var i=0; i<this.AllNodes.length; i++){if (this.AllNodes[i].Value==value){return this.AllNodes[i]; }}return null; } ; RadTreeView.prototype.LoadTree= function (O4){var l4=eval(this.ClientID+"\x43\x6c\x69entD\x61ta"); for (var i=0; i<l4.length; i++){ this.LoadNode(l4[i],O4); }} ; RadTreeView.prototype.LoadNode= function (l4,O4,parentNode){var i4=new RadTreeNode(); i4.ClientID=l4[0]; i4.TreeView=this ; var I4=l4[17]; if (I4>0){i4.Parent=this.AllNodes[I4-1]; }if (parentNode!=null){i4.Parent=parentNode; }i4.NodeCss=this.NodeCss; i4.NodeCssOver=this.NodeCssOver; i4.NodeCssSelect=this.NodeCssSelect; i4.Text=l4[1]; i4.Value=l4[2]; i4.Category=l4[3]; if (O4!=null){i4.SignImage=O4[l4[4]].src; i4.SignImageExpanded=O4[l4[5]].src; }else {i4.SignImage=i2[l4[4]].src; i4.SignImageExpanded=i2[l4[5]].src; }if (l4[6]>0){i4.Image=O4[l4[6]].src; }if (l4[7]>0){i4.ImageExpanded=O4[l4[7]].src; }i4.Selected=l4[8]; if (i4.Selected){ this.SelectedNode=i4; }i4.Checked=l4[9]; i4.Enabled=l4[10]; i4.Expanded=l4[11]; i4.Action=l4[12]; if (this.IsSet(l4[13]))i4.NodeCss=l4[13]; if (this.IsSet(l4[14]))i4.ContextMenuName=l4[14]; this.AllNodes[this.AllNodes.length]=i4; if (i4.Parent!=null){i4.Parent.Nodes[i4.Parent.Nodes.length]=i4; }else { this.Nodes[this.Nodes.length]=i4; }i4.Index=l4[16]; i4.DragEnabled=l4[18]; i4.DropEnabled=l4[19]; i4.ExpandOnServer=l4[20]; if (this.IsSet(l4[21]))i4.NodeCssOver=l4[21]; if (this.IsSet(l4[22]))i4.NodeCssSelect=l4[22]; i4.Level=l4[23]; i4.ID=l4[24]; i4.IsClientNode=l4[25]; i4.EditEnabled=l4[26]; i4.Attributes=l4[27]; } ; RadTreeView.prototype.Toggle= function (node){ this.FindNode(node).Toggle(); } ; RadTreeView.prototype.Select= function (node,e){ this.FindNode(node).Select(e); } ; RadTreeView.prototype.Hover= function (node){var node=this.FindNode(node); if (node)node.Hover(); } ; RadTreeView.prototype.UnHover= function (node){var node=this.FindNode(node); if (node)node.UnHover(); } ; RadTreeView.prototype.CheckBoxClick= function (node,e){ this.FindNode(node).CheckBoxClick(e); } ; RadTreeView.prototype.Highlight= function (node,e){ this.FindNode(node).Highlight(e); } ; RadTreeView.prototype.SelectNode= function (node){ this.SelectedNode=node; node.Selected= true; this.UpdateSelectedState(); } ; RadTreeView.prototype.GetSelectedNodes= function (){var o5=new Array(); for (var i=0; i<this.AllNodes.length; i++){if (this.AllNodes[i].Selected)o5[o5.length]=this.AllNodes[i]; }return o5; } ; RadTreeView.prototype.UnSelectAllNodes= function (node){for (var i=0; i<this.AllNodes.length; i++){if (this.AllNodes[i].Selected && this.AllNodes[i].Enabled){ this.AllNodes[i].UnSelect(); }}} ; RadTreeView.prototype.KeyDownMozilla= function (e){var LastActiveRadTreeView=RadTreeView_Active; if (LastActiveRadTreeView){if (!LastActiveRadTreeView.O2)return; if (LastActiveRadTreeView!=null && LastActiveRadTreeView.SelectedNode!=null){if (LastActiveRadTreeView.EditMode)return; if (e.keyCode==107 || e.keyCode==109 || e.keyCode==37 || e.keyCode==39)LastActiveRadTreeView.SelectedNode.Toggle(); if (e.keyCode==40 && LastActiveRadTreeView.SelectedNode.NextVisible()!=null)LastActiveRadTreeView.SelectedNode.NextVisible().Highlight(e); if (e.keyCode==38 && LastActiveRadTreeView.SelectedNode.PrevVisible()!=null)LastActiveRadTreeView.SelectedNode.PrevVisible().Highlight(e); if (e.keyCode==13){if (LastActiveRadTreeView.FireEvent(LastActiveRadTreeView.BeforeClientClick,LastActiveRadTreeView.SelectedNode,e)== false){return; }LastActiveRadTreeView.SelectedNode.ExecuteAction(); LastActiveRadTreeView.FireEvent(LastActiveRadTreeView.AfterClientClick,LastActiveRadTreeView.SelectedNode,e); }if (e.keyCode==32)LastActiveRadTreeView.SelectedNode.CheckBoxClick(); if (e.keyCode==113 && LastActiveRadTreeView.AllowNodeEditing)LastActiveRadTreeView.SelectedNode.StartEdit(); }}} ; RadTreeView.prototype.KeyDown= function (e){if (this.EditMode)return; var node=this.SelectedNode; if (node!=null){if (e.keyCode==107 || e.keyCode==109 || e.keyCode==37 || e.keyCode==39)node.Toggle(); if (e.keyCode==40 && node.NextVisible()!=null)node.NextVisible().Highlight(e); if (e.keyCode==38 && node.PrevVisible()!=null)node.PrevVisible().Highlight(e); if (e.keyCode==13){if (this.FireEvent(this.BeforeClientClick,this.SelectedNode,e)== false){return; }node.ExecuteAction(e); this.FireEvent(this.AfterClientClick,this.SelectedNode,e); }if (e.keyCode==32){node.CheckBoxClick(); (document.all)?e.returnValue= false :e.preventDefault(); }if (e.keyCode==113 && this.AllowNodeEditing){node.StartEdit(); }}else {if (e.keyCode==38 || e.keyCode==40 || e.keyCode==13 || e.keyCode==32){ this.Nodes[0].Highlight(); }}} ; RadTreeView.prototype.UpdateState= function (){ this.UpdateExpandedState(); this.UpdateCheckedState(); this.UpdateSelectedState(); } ; RadTreeView.prototype.UpdateExpandedState= function (){var O5=""; for (var i=0; i<this.AllNodes.length; i++){var l5=(this.AllNodes[i].Expanded)?"\x31": "\x30"; O5+=l5; }document.getElementById(this.ClientID+"_expande\x64").value=O5; } ; RadTreeView.prototype.UpdateCheckedState= function (){var i5=""; for (var i=0; i<this.AllNodes.length; i++){var I5=(this.AllNodes[i].Checked)?"1": "0"; i5+=I5; }document.getElementById(this.ClientID+"_\x63\x68ecked").value=i5; } ; RadTreeView.prototype.UpdateSelectedState= function (){var o6=""; for (var i=0; i<this.AllNodes.length; i++){var O6=(this.AllNodes[i].Selected)?"1": "\x30"; o6+=O6; }document.getElementById(this.ClientID+"_sele\x63\x74ed").value=o6; } ; RadTreeView.prototype.Scroll= function (e){document.getElementById(this.ClientID+"_scroll").value=document.getElementById(this.Container).scrollTop; } ; RadTreeView.prototype.ContextMenuClick= function (e,l6,i6,I6){d=this ; window.setTimeout( function (){d.HideContextMenu();} ,10); if (this.FireEvent(this.BeforeClientContextClick,this.o2,l6,I6)== false){return; }if (i6){var o7=this.o2.ClientID+"\x3a"+this.I0(l6)+"\x3a"+this.I0(I6); this.K("\x43ontextMenu\x43\x6cick",o7); }} ; RadTreeView.prototype.ContextMenu= function (e,O7){var src=(e.srcElement)?e.srcElement:e.target; var node=this.FindNode(O7); if (node!=null && this.BeforeClientContextMenu!=null){var l7=this.SelectedNode; if (this.FireEvent(this.BeforeClientContextMenu,node,e,l7)== false){return; } this.Highlight(O7,e,l7); }if (node!=null && node.ContextMenuName!=null && node.Enabled){if (!this.ContextMenuVisible){ this.o2=node; if (!node.Selected){ this.Highlight(O7,e); } this.ShowContextMenu(node.ContextMenuName,e); document.all?e.returnValue= false :e.preventDefault(); }}} ; RadTreeView.prototype.ShowContextMenu= function (name,e){if (!document.readyState || document.readyState=="\x63omplete"){var i7="rtvcm"+this.ClientID+name; var menu=document.getElementById(i7); if (menu){var I7=menu.cloneNode( true); I7.id=i7+"\x5fclone"; document.body.appendChild(I7); I7=document.getElementById(i7+"_clone"); I7.style.left=this.o8(e)+"\x70x"; I7.style.top=this.O8(e)+"px"; I7.style.position="a\x62\x73olute"; I7.style.display="block"; this.ContextMenuVisible= true; this.ContextMenuName=name; document.all?e.returnValue= false :e.preventDefault(); }}} ; RadTreeView.prototype.O8= function (e){if (document.compatMode && document.compatMode=="CSS1Compa\x74"){return (e.clientY+document.documentElement.scrollTop); }return (e.clientY+document.body.scrollTop); } ; RadTreeView.prototype.o8= function (e){if (document.compatMode && document.compatMode=="\x43\x53S1Comp\x61\x74"){return (e.clientX+document.documentElement.scrollLeft); }return (e.clientX+document.body.scrollLeft); } ; RadTreeView.prototype.HideContextMenu= function (){if (!document.readyState || document.readyState=="complet\x65"){var l8=document.getElementById("\x72tvcm"+this.ClientID+this.ContextMenuName+"\x5f\x63lone"); if (l8){document.body.removeChild(l8); } this.ContextMenuVisible= false; }} ; RadTreeView.prototype.MouseClickDispatcher= function (e){var src=(e.srcElement)?e.srcElement:e.target; var O7=rtvGetNodeID(e); if (O7!=null){var i8=this.FindNode(O7); if (i8.Selected){if (this.AllowNodeEditing){i8.StartEdit(); return; }else { this.Select(O7,e); }}else { this.Select(O7,e); }}if (src.tagName=="IMG"){var I8=src.className; if (this.IsSet(I8) && this.o9(I8)){ this.Toggle(src.parentNode.id); }}if (src.tagName=="INP\x55T" && rtvInsideNode(src)){ this.CheckBoxClick(src.parentNode.id,e); }} ; RadTreeView.prototype.o9= function (O9){return (O9==1 || O9==2 || O9==5 || O9==6 || O9==7 || O9==8 || O9==10 || O9==11); } ; RadTreeView.prototype.DoubleClickDispatcher= function (e,O7){var node=this.FindNode(O7); if (this.FireEvent(this.BeforeClientDoubleClick,node)== false){return; } this.Toggle(O7); } ; RadTreeView.prototype.MouseOverDispatcher= function (e,O7){ this.Hover(O7); } ; RadTreeView.prototype.MouseOutDispatcher= function (e,O7){ this.UnHover(O7); } ; RadTreeView.prototype.MouseDown= function (e){if (this.LastHighlighted!=null && this.DragAndDrop){if (this.FireEvent(this.BeforeClientDrag,this.LastHighlighted)== false)return; if (!this.LastHighlighted.DragEnabled)return; if (e.button==2)return; this.DragSource=this.LastHighlighted; this.DragClone=document.createElement("div"); document.body.appendChild(this.DragClone); RadTreeView_DragActive=this ; var l9=""; if (this.MultipleSelect && (this.SelectedNodesCount()>1)){for (var i=0; i<this.AllNodes.length; i++){if (this.AllNodes[i].Selected){if (this.AllNodes[i].Image){var img=this.AllNodes[i].ImageElement(); var i9=img.cloneNode( true); this.DragClone.appendChild(i9); }var I9=this.AllNodes[i].TextElement().cloneNode( true); I9.className=this.AllNodes[i].NodeCss; I9.style.color="gray"; this.DragClone.appendChild(I9); this.DragClone.appendChild(document.createElement("BR")); }l9=l9+"text"; }}if (l9==""){if (this.LastHighlighted.Image){var img=this.LastHighlighted.ImageElement(); var i9=img.cloneNode( true); this.DragClone.appendChild(i9); }var I9=this.LastHighlighted.TextElement().cloneNode( true); I9.className=this.LastHighlighted.NodeCss; I9.style.color="gray"; this.DragClone.appendChild(I9); } this.DragClone.style.position="abso\x6cute"; this.DragClone.style.display="non\x65"; if (e.preventDefault){e.preventDefault(); }}} ; RadTreeView.prototype.SelectedNodesCount= function (){var count=0; for (var i=0; i<this.AllNodes.length; i++){if (this.AllNodes[i].Selected)count++; }return count; } ; RadTreeView.prototype.FireEvent= function (oa,a,b,Oa){if (!oa){return true; }RadTreeViewGlobalFirstParam=a; RadTreeViewGlobalSecondParam=b; RadTreeViewGlobalThirdParam=Oa; var s=oa+"\x28\x52\x61dTreeV\x69\x65wGl\x6fbalFi\x72\x73tP\x61\x72am,\x20Rad\x54\162\x65eViewG\x6cobalSe\x63ondPa\x72\141\x6d\054\x20RadT\x72ee\x56iew\x47\154\x6fbalT\x68irdP\x61ram\x29;"; return eval(s); } ; RadTreeView.prototype.Focus= function (e){ this.FireEvent(this.AfterClientFocus,this ); } ; RadTreeView.prototype.IsSet= function (a){return (a!=null && a!=""); } ; RadTreeView.prototype.la= function (ia){var Ia=0; if (ia.offsetParent){while (ia.offsetParent){Ia+=ia.offsetLeft; ia=ia.offsetParent; }}else if (ia.x)Ia+=ia.x; return Ia; } ; RadTreeView.prototype.ob= function (ia){var Ob=0; if (ia.offsetParent){while (ia.offsetParent){Ob+=ia.offsetTop; ia=ia.offsetParent; }}else if (ia.y)Ob+=ia.y; return Ob; } ; RadTreeView.prototype.K= function (lb,i0){var ib=lb+"\x23"+i0; if (this.PostBackOptionsClientString){var Ib=this.PostBackOptionsClientString.replace(/\x40\x40\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x40\x40/g,ib); if (typeof(WebForm_PostBackOptions)!="und\x65\x66ined" || Ib.indexOf("\x5fdoPostBa\x63\x6b")>-1 || Ib.indexOf("AsyncR\x65\x71uest")>-1){eval(Ib); }}else {if (this.CausesValidation){if (!(typeof(Page_ClientValidate)!="\x66unct\x69\x6fn" || Page_ClientValidate())){return; }}var oc=this.PostBackFunction.replace(/\x40\x40\x61\x72\x67\x75\x6d\x65\x6e\x74\x73\x40\x40/g,ib); eval(oc); }} ; RadTreeView.prototype.I0= function (param){var Oc=param.replace(/\x27/g,"\x26squote"); Oc=Oc.replace(/\x23/g,"\x26sshar\x70"); Oc=Oc.replace(/\x3a/g,"\x26scolon"); Oc=Oc.replace(/\x5c/g,"\134\x5c"); return Oc; } ; function rtvIsAnyContextMenuVisible(){for (var key in tlrkTreeViews)if ((typeof(tlrkTreeViews[key])!="\x66unction") && tlrkTreeViews[key].ContextMenuVisible)return true; return false; } ; function rtvAdjustScroll(){if (RadTreeView_DragActive==null || RadTreeView_DragActive.DragClone==null){return; }var lc=RadTreeView_Active; var ic=document.getElementById(RadTreeView_Active.Container); var Ic,od; Ic=lc.ob(ic); od=Ic+ic.offsetHeight; if ((RadTreeView_MouseY-Ic)<50 && ic.scrollTop>0){ic.scrollTop=ic.scrollTop-10; lc.Scroll(); RadTreeView_ScrollTimeout=window.setTimeout( function (){rtvAdjustScroll(); } ,100); }else if ((od-RadTreeView_MouseY)<50 && ic.scrollTop<(ic.scrollHeight-ic.offsetHeight+16)){ic.scrollTop=ic.scrollTop+10; lc.Scroll(); RadTreeView_ScrollTimeout=window.setTimeout( function (){rtvAdjustScroll(); } ,100); }} ; function rtvMouseUp(e){if (RadTreeView_Active==null)return; if (e && !e.ctrlKey){for (var key in tlrkTreeViews){if ((typeof(tlrkTreeViews[key])!="funct\x69o\x6e") && tlrkTreeViews[key].ContextMenuVisible){contextMenuToBeHidden=tlrkTreeViews[key]; window.setTimeout( function (){if (contextMenuToBeHidden){contextMenuToBeHidden.HideContextMenu(); }} ,10); return; }}}if (RadTreeView_DragActive==null || RadTreeView_DragActive.DragClone==null){return; } (document.all)?e.returnValue= false :e.preventDefault(); var Od=RadTreeView_DragActive.DragSource; var ld=RadTreeView_Active.LastHighlighted; var oe=RadTreeView_Active; document.body.removeChild(RadTreeView_DragActive.DragClone); RadTreeView_DragActive.DragClone=null; if (ld!=null && ld.DropEnabled== false)return; if (Od==ld)return; if (RadTreeView_DragActive.FireEvent(RadTreeView_DragActive.BeforeClientDrop,Od,ld,e)== false)return; if (Od.IsClientNode || ((ld!=null) && ld.IsClientNode))return; var Oe=RadTreeView_DragActive.ClientID+"\x23"+Od.ClientID+"\x23"; var le=""; if (ld==null){le="\156\x75\x6cl"+"#"+RadTreeView_DragActive.HtmlElementID; }else {le=oe.ClientID+"\x23"+ld.ClientID; }if (ld==null && RadTreeView_DragActive.HtmlElementID==""){return; }RadTreeView_DragActive.K("\x4eodeDrop",Oe+le); RadTreeView_DragActive.FireEvent(RadTreeView_DragActive.AfterClientDrop,Od,ld,e); RadTreeView_DragActive=null; } ; function rtvMouseMove(e){if (rtvIsAnyContextMenuVisible()){return; }if (RadTreeView_DragActive!=null && RadTreeView_DragActive.DragClone!=null){var ie,Ie; ie=RadTreeView_DragActive.o8(e)+8; Ie=RadTreeView_DragActive.O8(e)+4; RadTreeView_MouseY=Ie; rtvAdjustScroll(); RadTreeView_DragActive.DragClone.style.zIndex=999; RadTreeView_DragActive.DragClone.style.top=Ie+"px"; RadTreeView_DragActive.DragClone.style.left=ie+"\x70x"; RadTreeView_DragActive.DragClone.style.display="block"; RadTreeView_DragActive.FireEvent(RadTreeView_DragActive.AfterClientMove,e); (document.all)?e.returnValue= false :e.preventDefault(); }} ; function rtvNodeExpand(a,id,of){var Of=document.getElementById(id); var If=Of.scrollHeight; var og=(If-a)/of; var height=a+og; if (height>If-1){Of.style.height=""; Of.firstChild.style.position=""; }else {Of.style.height=height+"\x70x"; window.setTimeout("\x72tvNodeExp\x61\156\x64\x28"+height+","+"\x27"+id+"\047\x2c"+of+"\x29\073",5); }} ; function rtvNodeCollapse(a,id,of){var Of=document.getElementById(id); var If=Of.scrollHeight; var og=(If-Math.abs(If-a))/of; var height=a-og; if (height<=3){Of.style.height=""; Of.style.display="none"; Of.firstChild.style.position=""; }else {Of.style.height=height+"\x70x"; window.setTimeout("rtvNodeColl\x61\x70se("+height+","+"\047"+id+"\047\x2c"+of+"\x20\x29;",5); }} ; function rtvGetNodeID(e){if (RadTreeView_Active==null)return; var target=(e.srcElement)?e.srcElement:e.target; if (target.tagName=="\x49MG" && target.nextSibling){var index=target.className; if (index){index=parseInt(index); if (index>12){target=target.nextSibling; }}}while (target!=null){if ((target.tagName=="SPAN" || target.tagName=="A") && rtvInsideNode(target)){return target.parentNode.id; }target=target.parentNode; }return null; } ; function rtvInsideNode(Og){if (Og.parentNode && Og.parentNode.tagName=="DIV" && Og.parentNode.id.indexOf(RadTreeView_Active.ID)>-1){return Og.parentNode.id; }} ; function rtvDispatcher(t,w,e,l6,i6,I6){if (!e){e=window.event; }if (tlrkTreeViews){var O7=rtvGetNodeID(e); var lg=tlrkTreeViews[t]; if (!lg.O2)return; if (rtvIsAnyContextMenuVisible() && w!="\x6dcl\x69\x63k" && w!="\x63click")return; if (lg.EditMode)return; RadTreeView_Active=lg; switch (w){case "mo\x76\x65r":if (O7!=null)lg.MouseOverDispatcher(e,O7); break; case "mout":if (O7!=null)lg.MouseOutDispatcher(e,O7); break; case "mclick":lg.MouseClickDispatcher(e); break; case "mdclick":if (O7!=null)lg.DoubleClickDispatcher(e,O7); break; case "m\x64\x6fwn":lg.MouseDown(e); break; case "mup":lg.ig(e); break; case "c\x6f\x6etext":if (O7!=null){lg.ContextMenu(e,O7); return false; }break; case "cclic\x6b":lg.ContextMenuClick(e,l6,i6,I6); break; case "\x73\x63roll":lg.Scroll(e); break; case "foc\x75\x73":lg.Focus(e); case "keydown":lg.KeyDown(e); }}} ; function rtvAppendStyleSheet(o,I){var Ig=(navigator.appName=="\x4d\x69crosof\x74\x20Inte\x72\x6ee\x74\040\x45xplore\x72") && ((navigator.userAgent.toLowerCase().indexOf("\x6dac")!=-1) || (navigator.appVersion.toLowerCase().indexOf("\x6dac")!=-1)); var oh=(navigator.userAgent.toLowerCase().indexOf("safar\x69")!=-1); if (Ig || oh){document.write("<"+"\x6cink"+" rel=\047\x73tyles\x68\x65et\047 type=\x27\x74ext\x2f\x63ss\x27 hr\x65\146=\x27"+I+"\x27>"); }else {var U=document.createElement("LI\x4e\x4b"); U.rel="styleshe\x65\x74"; U.type="\x74\x65xt/cs\x73"; U.href=I; document.getElementById(o+"\x53\x74yleShe\x65\x74Hold\x65\x72").appendChild(U); }} ; function rtvInsertHTML(Oh,html){if (Oh.tagName=="\x41"){Oh=Oh.parentNode; }if (document.all){Oh.insertAdjacentHTML("beforeEnd",html); }else {var r=Oh.ownerDocument.createRange(); r.setStartBefore(Oh); var lh=r.createContextualFragment(html); Oh.appendChild(lh); }} ;
