function Node(id,_2,_3,_4,_5,_6,_7,_8,_9){this.id=id;this.pid=_2;this.name=_3;this.url=_4;this.title=_5;this.target=_6;this.icon=_7;this.iconOpen=_8;this._io=_9||false;this._is=false;this._ls=false;this._hc=false;this._ai=0;this._p;}function dTree(_a){this.config={target:null,folderLinks:true,useSelection:true,useCookies:true,useLines:false,useIcons:false,useStatusText:true,closeSameLevel:false,inOrder:false};this.icon={root:"images/dtree/base.gif",folder:"images/dtree/folder.gif",folderOpen:"images/dtree/folderopen.gif",node:"images/dtree/page.gif",empty:"images/dtree/empty.gif",line:"images/dtree/line.gif",join:"images/dtree/join.gif",joinBottom:"images/dtree/joinbottom.gif",plus:"images/dtree/plus.gif",plusBottom:"images/dtree/plusbottom.gif",minus:"images/dtree/minus.gif",minusBottom:"images/dtree/minusbottom.gif",nlPlus:"images/dtree/nolines_plus.gif",nlMinus:"images/dtree/nolines_minus.gif"};this.obj=_a;this.aNodes=[];this.aIndent=[];this.root=new Node(-1);this.selectedNode=null;this.selectedFound=false;this.completed=false;}dTree.prototype.add=function(id,_c,_d,_e,_f,_10,_11,_12,_13){this.aNodes[this.aNodes.length]=new Node(id,_c,_d,_e,_f,_10,_11,_12,_13);};dTree.prototype.openAll=function(){this.oAll(true);};dTree.prototype.closeAll=function(){this.oAll(false);};dTree.prototype.toString=function(){var str="<div class=\"dtree\">\n";if(document.getElementById){if(this.config.useCookies){this.selectedNode=this.getSelected();}str+=this.addNode(this.root);}else{str+="Browser not supported.";}str+="</div>";if(!this.selectedFound){this.selectedNode=null;}this.completed=true;return str;};dTree.prototype.addNode=function(_15){var str="";var n=0;if(this.config.inOrder){n=_15._ai;}for(n;n<this.aNodes.length;n++){if(this.aNodes[n].pid==_15.id){var cn=this.aNodes[n];cn._p=_15;cn._ai=n;this.setCS(cn);if(!cn.target&&this.config.target){cn.target=this.config.target;}if(cn._hc&&!cn._io&&this.config.useCookies){cn._io=this.isOpen(cn.id);}if(!this.config.folderLinks&&cn._hc){cn.url=null;}if(this.config.useSelection&&cn.id==this.selectedNode&&!this.selectedFound){cn._is=true;this.selectedNode=n;this.selectedFound=true;}str+=this.node(cn,n);if(cn._ls){break;}}}return str;};dTree.prototype.node=function(_19,_1a){var str="<div class=\""+((this.config.useSelection)?((_19._is?"parentSel":"")):"")+"\">"+this.indent(_19,_1a);if(this.config.useIcons){if(!_19.icon){_19.icon=(this.root.id==_19.pid)?this.icon.root:((_19._hc)?this.icon.folder:this.icon.node);}if(!_19.iconOpen){_19.iconOpen=(_19._hc)?this.icon.folderOpen:this.icon.node;}if(this.root.id==_19.pid){_19.icon=this.icon.root;_19.iconOpen=this.icon.root;}str+="<img id=\"i"+this.obj+_1a+"\" src=\""+((_19._io)?_19.iconOpen:_19.icon)+"\" alt=\"\" />";}if(_19.url){str+="<a id=\"s"+this.obj+_1a+"\" class=\""+((this.config.useSelection)?((_19._is?"nodeSel":"node")):"node")+"\" href=\""+_19.url+"\"";if(_19.title){str+=" title=\""+_19.title+"\"";}if(_19.target){str+=" target=\""+_19.target+"\"";}if(this.config.useStatusText){str+=" onmouseover=\"window.status='"+_19.name+"';return true;\" onmouseout=\"window.status='';return true;\" ";}if(this.config.useSelection&&((_19._hc&&this.config.folderLinks)||!_19._hc)){str+=" onclick=\"javascript: "+this.obj+".s("+_1a+");\"";}str+=">";}else{if((!this.config.folderLinks||!_19.url)&&_19._hc&&_19.pid!=this.root.id){str+="<a href=\"javascript: "+this.obj+".o("+_1a+");\" class=\"node\">";}}str+=_19.name;if(_19.url||((!this.config.folderLinks||!_19.url)&&_19._hc)){str+="</a>";}str+="</div>";if(_19._hc){str+="<div id=\"d"+this.obj+_1a+"\" class=\"clip\" style=\"display:"+((this.root.id==_19.pid||_19._io)?"block":"none")+";\">";str+=this.addNode(_19);str+="</div>";}this.aIndent.pop();return str;};dTree.prototype.indent=function(_1c,_1d){var str="";if(this.root.id!=_1c.pid){for(var n=0;n<this.aIndent.length;n++){str+="<img src=\""+((this.aIndent[n]==1&&this.config.useLines)?this.icon.line:this.icon.empty)+"\" alt=\"\" />";}(_1c._ls)?this.aIndent.push(0):this.aIndent.push(1);if(_1c._hc){str+="<a href=\"javascript: "+this.obj+".o("+_1d+");\"><img id=\"j"+this.obj+_1d+"\" src=\"";if(!this.config.useLines){str+=(_1c._io)?this.icon.nlMinus:this.icon.nlPlus;}else{str+=((_1c._io)?((_1c._ls&&this.config.useLines)?this.icon.minusBottom:this.icon.minus):((_1c._ls&&this.config.useLines)?this.icon.plusBottom:this.icon.plus));}str+="\" alt=\"\" /></a>";}else{str+="<img src=\""+((this.config.useLines)?((_1c._ls)?this.icon.joinBottom:this.icon.join):this.icon.empty)+"\" alt=\"\" />";}}return str;};dTree.prototype.setCS=function(_20){var _21;for(var n=0;n<this.aNodes.length;n++){if(this.aNodes[n].pid==_20.id){_20._hc=true;}if(this.aNodes[n].pid==_20.pid){_21=this.aNodes[n].id;}}if(_21==_20.id){_20._ls=true;}};dTree.prototype.getSelected=function(){var sn=this.getCookie("cs"+this.obj);return (sn)?sn:null;};dTree.prototype.s=function(id){if(!this.config.useSelection){return;}var cn=this.aNodes[id];if(cn._hc&&!this.config.folderLinks){return;}if(this.selectedNode!=id){if(this.selectedNode||this.selectedNode==0){eOld=document.getElementById("s"+this.obj+this.selectedNode);eOld.className="node";eOld.parentNode.className="dTreeNode";}eNew=document.getElementById("s"+this.obj+id);eNew.className="nodeSel";eNew.parentNode.className=eNew.parentNode.className+" parentSel";this.selectedNode=id;if(this.config.useCookies){this.setCookie("cs"+this.obj,cn.id);}}};dTree.prototype.o=function(id){var cn=this.aNodes[id];this.nodeStatus(!cn._io,id,cn._ls);cn._io=!cn._io;if(this.config.closeSameLevel){this.closeLevel(cn);}if(this.config.useCookies){this.updateCookie();}};dTree.prototype.oAll=function(_28){for(var n=0;n<this.aNodes.length;n++){if(this.aNodes[n]._hc&&this.aNodes[n].pid!=this.root.id){this.nodeStatus(_28,n,this.aNodes[n]._ls);this.aNodes[n]._io=_28;}}if(this.config.useCookies){this.updateCookie();}};dTree.prototype.openTo=function(nId,_2b,_2c){if(!_2c){for(var n=0;n<this.aNodes.length;n++){if(this.aNodes[n].id==nId){nId=n;break;}}}var cn=this.aNodes[nId];if(cn.pid==this.root.id||!cn._p){return;}cn._io=true;cn._is=_2b;if(this.completed&&cn._hc){this.nodeStatus(true,cn._ai,cn._ls);}if(this.completed&&_2b){this.s(cn._ai);}else{if(_2b){this._sn=cn._ai;}}this.openTo(cn._p._ai,false,true);};dTree.prototype.closeLevel=function(_2f){for(var n=0;n<this.aNodes.length;n++){if(this.aNodes[n].pid==_2f.pid&&this.aNodes[n].id!=_2f.id&&this.aNodes[n]._hc){this.nodeStatus(false,n,this.aNodes[n]._ls);this.aNodes[n]._io=false;this.closeAllChildren(this.aNodes[n]);}}};dTree.prototype.closeAllChildren=function(_31){for(var n=0;n<this.aNodes.length;n++){if(this.aNodes[n].pid==_31.id&&this.aNodes[n]._hc){if(this.aNodes[n]._io){this.nodeStatus(false,n,this.aNodes[n]._ls);}this.aNodes[n]._io=false;this.closeAllChildren(this.aNodes[n]);}}};dTree.prototype.nodeStatus=function(_33,id,_35){eDiv=document.getElementById("d"+this.obj+id);eJoin=document.getElementById("j"+this.obj+id);if(this.config.useIcons){eIcon=document.getElementById("i"+this.obj+id);eIcon.src=(_33)?this.aNodes[id].iconOpen:this.aNodes[id].icon;}eJoin.src=(this.config.useLines)?((_33)?((_35)?this.icon.minusBottom:this.icon.minus):((_35)?this.icon.plusBottom:this.icon.plus)):((_33)?this.icon.nlMinus:this.icon.nlPlus);eDiv.style.display=(_33)?"block":"none";};dTree.prototype.clearCookie=function(){var now=new Date();var _37=new Date(now.getTime()-1000*60*60*24);this.setCookie("co"+this.obj,"cookieValue",_37);this.setCookie("cs"+this.obj,"cookieValue",_37);};dTree.prototype.setCookie=function(_38,_39,_3a,_3b,_3c,_3d){document.cookie=escape(_38)+"="+escape(_39)+(_3a?"; expires="+_3a.toGMTString():"")+(_3b?"; path="+_3b:"")+(_3c?"; domain="+_3c:"")+(_3d?"; secure":"");};dTree.prototype.getCookie=function(_3e){var _3f="";var _40=document.cookie.indexOf(escape(_3e)+"=");if(_40!=-1){var _41=_40+(escape(_3e)+"=").length;var _42=document.cookie.indexOf(";",_41);if(_42!=-1){_3f=unescape(document.cookie.substring(_41,_42));}else{_3f=unescape(document.cookie.substring(_41));}}return (_3f);};dTree.prototype.updateCookie=function(){var str="";for(var n=0;n<this.aNodes.length;n++){if(this.aNodes[n]._io&&this.aNodes[n].pid!=this.root.id){if(str){str+=".";}str+=this.aNodes[n].id;}}this.setCookie("co"+this.obj,str);};dTree.prototype.isOpen=function(id){var _46=this.getCookie("co"+this.obj).split(".");for(var n=0;n<_46.length;n++){if(_46[n]==id){return true;}}return false;};if(!Array.prototype.push){Array.prototype.push=function array_push(){for(var i=0;i<arguments.length;i++){this[this.length]=arguments[i];}return this.length;};}if(!Array.prototype.pop){Array.prototype.pop=function array_pop(){lastElement=this[this.length-1];this.length=Math.max(this.length-1,0);return lastElement;};}
