// Title: COOLjsTree
// URL: http://javascript.cooldev.com/scripts/cooltree/
// Version: 2.6.5
// Last Modify: 30 Apr 2005
// Author: Alex Kunin <alx@cooldev.com>
// Notes: Registration needed to use this script on your web site.
// Copyright (c) 2001-2005 by CoolDev.Com
// Copyright (c) 2001-2005 by Sergey Nosenko
//434f4f4c6a7354726565
// Options: STANDARD, COMPRESSED, WATERMARK

function COOLjsTree(_a,_e,_3){this.name=this._a=_a;this.bw=new _1w();var _9={};_9.left=_3[0];_9.top=_3[1];_9._C={nb:_3[2],nf:_3[5]};_9.clB=_3[3][0];_9.exB=_3[3][1];_9.iE=_3[3][2];_9._W=_3[4][0];_9._12=_3[4][1];_9.Ew=_3[4][2];_9.clF=_3[6][0];_9.exF=_3[6][1];_9.iF=_3[6][2];_9._18=_3[7][0];_9._16=_3[7][1];_9.ident=_3[8];_9._Z=_3[10];_9._1_=_3[11];_9.so=_3[12];_9.pg=_3[13][0];_9.sp=_3[13][1];if(_9._C.nb)_1i(_3[3]);if(_9._C.nf)_1i(_3[6]);this._3=_9;if(!this.bw._D)this._x=new _1S(_3[9],this);if(_d(window.CTrees))window.CTrees=[];window.CTrees[_a]=this;this.jsPath="window.CTrees['"+_a+"']";this.Nodes=this._e=[];this._1Y=-1;this._1$=0;this._17={};this._j=this._T(([{id:null},'',null,null,{format:{}}]).concat(_e));this._G=this.bw._V?'':'px';this._15=this.bw.dom&&!this.bw._V;this._1r=document.body&&document.body.dir=='rtl';this._v=-1;this.init();this._21=true;this.draw()};$=COOLjsTree.prototype;$._Q={};$._y=function(_1u,_b,_19){return _N('on'+_1u,'return '+this.jsPath+'.'+_b+'_on'+_1u+'('+_19+')')};$._1q=function(_b,_19){if(_d(this._Q[_b])){this._Q[_b]={};for(var _y in this)if(_y.match(new RegExp('^'+_b+'_on(.+)$')))this._Q[_b][RegExp.$1]=true};var _8='';for(var _y in this._Q[_b])_8+=this._y(_y,_b,_19);return _8};$.getAdditionalColumns=function(_){return''};$.getRoot=$._1c=function(){if(!this._w){this._j._i=this._w=new _13(this._j,this,null);this._w._E(true)};return this._w};$._1y=function(_4){var _l=this._1b('n',_4,this._j._2);if(!_l)return null;var _5=this._j,i=0;for(var i=0;i<_l.length-1;i++)_5=_5._2[_l[i]];return[_5,_l[i]]};$._S=function(_){if(this._w&&_._4==this._w._4)this._w=null;if(_._i){_._i._1a();_._14=null;_._i=null};for(var i in _._2)if(_._2[i]._i)this._S(_._2[i])};$._2B=function(_1A,_o,_6){var _5;if(_1A==this._j._4)_5=this._j;else{var _s=this._1y(_1A);if(_s)_5=_s[0]._2[_s[1]]};if(_5){this._S(_5);for(var i in _6)_6[i]=this._T(_6[i]);_o=Math.max(0,Math.min(_o,_5._2.length));if(_o==_5._2.length){_5._2=_5._2.concat(_6)}else{var _2=_5._2;_5._2=[];for(var i in _2){if(i==_o)_5._2=_5._2.concat(_6);_5._2[_5._2.length]=_2[i]}};return _o}else return null};$._2r=function(_4,_6,_2q,_2p,_2i){var _s=this._1y(_4);if(_s){var _5=_s[0],_2=_5._2,_4=_s[1];this._S(_5);var _6=this._T(_6);if(_2q)_6[0]=_5._2[_4][0];if(_2p)_6[4]=_5._2[_4][4];if(_2i)_6._2=_5._2[_4]._2;_5._2[_4]=_6}};$._2t=function(_5,_4){if(!_d(_5._2[_4])){var _2=_5._2;this._S(_5);_5._2=[];for(var i in _2)if(i!=_4)_5._2[_5._2.length]=_2[i]}};$.dump=function(_,_b){var _8='';if(!_){_=this._j;_b=''};_8=_b+"{"+_._4+"} - [";if(_[0].id!==null)_8+='{id:'+_[0].id+'}, ';_8+='"'+_[1]+'", ';_8+=(_[2]===null?'null':'"'+_[2]+'"')+', ';_8+=_[3]===null?'null':'"'+_[3]+'"';if(_._2.length){_8+=",\n";for(var i in _._2)_8+=this.dump(_._2[i],_b+"\t");_8+=_b+"],\n"}else _8+="],\n";return _8};$.getSelectedNode=function(){return this.nodeByIndex(this._1n)};$._2h=function(_){return this._1n===_._4};$._1p=function(_z){for(var i in _z){this._1d[_z[i].id]=_z[i];if(_z[i].layers)this._1p(_z[i].layers)}};$._1D=function(_h){if(this.bw.ns4){if(!this._1d){this._1d={};this._1p(document.layers)};return this._1d[_h]}else return(document.all&&document.all[_h])||document.getElementById(_h)};$.moveTo=function(x,y){this._x.top=y;this._x.left=y;this._x.moveTo(x,y);this._3.top=y;this._3.left=x;this.draw()};$.ensureVisible=function(_4,_28){var _=this.nodeByIndex(_4);var _q=false;while(_){_=_._14;if(_._11())break;if(!_._m()){this.expandNode(_._4,1);_q=true}};if(_q&&!_28)this.draw()};$._1b=function(_H,_7,_e){for(var i in _e){if(typeof(_7)!='object'?_e[i][_H]==_7:(''+_e[i][_H]).match(_7))return[i];var _1T=this._1b(_H,_7,_e[i]._2);if(_1T)return[i].concat(_1T)};return null};$._U=function(_H,_7){return this._1c()._1M(this._1b(_H,_7,this._j._2))};$.nbn=$.nodeByName=function(_7){return this._U('c',_7)};$.nodeByID=function(_7){return this._U('i',_7)};$.nodeByURL=function(_7){return this._U('u',_7)};$.nodeByIndex=function(_7){if(!this._e[_7])this._e[_7]=this._U('n',_7);return this._e[_7]};$.nodeByXY=function(_X,_Y){for(var i in this._e)if(this._e[i])with(this._e[i])if(visible&&_n<=_X&&_f<=_Y&&_n+w>_X&&_f+h>_Y)return this._e[i];return null};$._q=function(_f){if(!this._1G)this._1G=window.setTimeout(this.jsPath+'.draw()',1);if(typeof(_f)=='number')this._v=Math.min(_f,this._v);else this._v=-1};$._1a=function(_){if(this._1H)_._I();else{this._17[_._4]=true;this._q()}};$._I=function(){if(this._15)for(var _4 in this._17){var _=this.nodeByIndex(_4);if(_)_._I()};this._17={}};$.draw=function(){if(this.bw._D||!this._21)return;this._I();this._1H=true;this._u=0;this._p=0;with(this._1c()){draw(true);if(this._1r)draw(true)};this._x._2f(this._p,this._u);this._1G=null;this._v=10000000;if(this.ondraw)this.ondraw(this);this._1H=false};$.expandNode=function(_4,_2z,_1Q){if(!this.bw._D){var _=this.nodeByIndex(_4);if(_1Q)this.selectNode(_4);if(_&&_._M()){var _2d=!_._m();if(this._3.so){this.collapseAll();this.ensureVisible(_.index,true)};_._E(_2d);this._q(_._f)}}};$._1Q=$.selectNode=function(_4){this._1n=_4;this._q()};$._2j=function(_1s,_5,_1E){var _=this._e[_1s._4]=new _13(_1s,this,_5);_._1E=_1E;_._2c();return _};$._1R=function(_k,_){for(var i in _._2){this._1R(_k,_._2[i]);if(_._2[i]._2.length)if(_._2[i]._i)_._2[i]._i._E(_k);else _._2[i][4].format.expanded=_k}};$._1C=function(_k){this._1R(_k,this._j);this._q()};$.collapseAll=function(){this._1C(false)};$.expandAll=function(){this._1C(true)};$._T=function(_){if(_d(_[_.length-1]))_=_.slice(0,_.length-1);if(_d(_[0].id))_=([{id:null}]).concat(_);if(_d(_[4])||_d(_[4].format))_=_.slice(0,4).concat([{format:{}}]).concat(_.slice(4));var _4=this._1Y++;var _2=_.slice(5);_=_.slice(0,5);_._2=[];for(var i in _2)_._2[i]=this._T(_2[i]);_[4]=_1m(_[4]);_.i=_[0].id;_.c=_[1];_.u=_[2];_.t=_[3];_.f=_[4].format;_.n=_._4=_4;_._i=null;return _};$.init=function(){var s=this._1c()._1f(!this._15);if(!this.bw._D)s=this._x._2n(s);if(this.bw.ns4)s='<div id="'+this._a+'dummytreediv" style="position:absolute;"></div>'+s;document.write(s)};$._2y=function(_a){return document.cookie.match(new RegExp('(\\W|^)'+this._a+_a+'=([^;]+)'))?RegExp.$2:null};$._2v=function(_a,_7){document.cookie=this._a+_a+'='+_7+'; path=/'};$._1t=function(_){var _8='';for(var i in _._2)if(_._2[i]._2.length)_8+=(_._2[i][4].format.expanded?1:0)+this._1t(_._2[i]);return _8};$._2w=function(){return this._1t(this._j)};$._1v=function(_,_k,_4){for(var i in _._2){if(_._2[i]._2.length){if(_._2[i]._i)_._2[i]._i._E(_k.charAt(_4)=='1');else _._2[i][4].format.expanded=_k.charAt(_4)=='1';_4=this._1v(_._2[i],_k,_4+1)}};return _4};$._2x=function(_k){this._1v(this._j,_k||'',0)};$.image_onclick=$.button_onclick=$.caption_onclick=function(_){this.expandNode(_.index,1,1);return true};$.button_onclick=function(_){this.expandNode(_.index);return true};$.image_onmouseover=$.button_onmouseover=$.caption_onmouseover=function(_){window.status=_.text;return true};$.image_onmouseout=$.button_onmouseout=$.caption_onmouseout=function(node){window.status=window.defaultStatus;return true};function _13(_6,_1,_5){var _4=_6._4;this._6=_6;this._4=this.index=_4;this.jsPath=_1.jsPath+'.nodeByIndex('+_4+')';this.treeView=this._1=_1;this._14=this.parentNode=_5;this.text=_6[1];this.url=_6[2];this.target=_6[3];this.nodeID=_6[0].id;this._3=_6[4].format;this._R=null;this._E(this._6[4].format.expanded);this.children=this._2=[];this._r=this.level=_5?_5._r+1:-1;this.visible=false;this._A={};this._1I=false;this._L={}};$=_13.prototype;$._11=function(){return this._1._j._4==this._4};$._m=function(){return this._6[4].format.expanded};$.id=function(){return this._h};$._1g=function(_1B,_B,_1k){this._1._2r(this._4,[_d(_1B)?this._23():_1B,_d(_B)?this._1W():_B,_d(_1k)?this._20():_1k],true,true,true);this._1._q()};$.getTree=function(){return this._1};$.getParent=function(){return this._14};$.getId=function(){return this._6[0].id};$._23=$.getCaption=function(){return this._6[1]};$._1W=$.getUrl=function(){return this._6[2]};$._20=$.getTarget=function(){return this._6[3]};$.getFormat=function(){return this._6[4].format};$.setCaption=function(_7){this._1g(_7,this._F,this._F)};$.setUrl=function(_7){this._1g(this._F,_7,this._F)};$.setTarget=function(_7){this._1g(this._F,this._F,_7)};$.hasChildren=$._M=function(){return!!this._6._2.length};$._1J=function(){return this._M()||this._6[4].format.isFolder};$._1M=function(_l){if(_l)return _l.length?this.__(_l[0])._1M(_l.slice(1)):this;return null};$._E=function(_7){this.expanded=this._6[4].format.expanded=!!_7;if(this._J){this._1l('nb',this._1x());this._1l('nf',this._1V())}};$._1x=function(){if(!this._1._3._C.nb||this._3.nobuttons)return null;if(!this._M())return null;if(this._3.buttons)return this._m()?this._3.buttons[1]:this._3.buttons[0];else return this._m()?this._1._3.exB:this._1._3.clB};$._1V=function(){if(!this._1._3._C.nf||this._3.nofolders)return null;if(this._3.folders)return this._1J()?(this._m()?this._3.folders[1]:this._3.folders[0]):this._3.folders[2];else return this._1J()?(this._m()?this._1._3.exF:this._1._3.clF):this._1._3.iF};$._1l=function(_c,_1h){if(_1h){var _1e=(this._g().document||document).images[this._h+_c];if(this._1._3._C[_c]&&_1e&&_1e.src!=_1h)this._L[_c]={_2g:_1e,_l:_1h}}};$._2c=function(){this._W=_d(this._3.bsize)?this._1._3._W:this._3.bsize[0];this._12=_d(this._3.bsize)?this._1._3._12:this._3.bsize[1];this._18=_d(this._3.fsize)?this._1._3._18:this._3.fsize[0];this._16=_d(this._3.fsize)?this._1._3._16:this._3.fsize[1]};$._1f=function(_1K){var _8='';if(!this._11()){this._h='nt'+this._1._a+'_'+this._1._1$++;_8+=this._1.bw._D?this._1L():'<div'+this._1._1q('layer',this.jsPath)+' id="'+this._h+'d" style="position:absolute;visibility:hidden;z-index:'+(this.index+10)+';">'+this._1L()+'</div>'};if(_1K)for(var i=0;i<this._$();i++)_8+=this.__(i)._1f(_1K);return _8};$._1F=function(_B,_b,_2b,_Z,_27){return'<a'+this._1._1q(_b,this.jsPath)+' href="'+(_B||'javascript:void(0)')+'"'+_N('target',_B&&this.target)+_N('id',_27&&(this._h+'an'))+_N('class',_Z)+'>'+_2b+'</a>'};$._10=function(_b,_c,_1N,_29,_2a,w,h,_2C){if(!w||!_1N)return'';var i='<img'+(_c?' name="'+this._h+_c+'" id="'+this._h+_c+'"':'')+' src="'+_1N+'" width="'+w+'" height="'+h+'" border="0"'+(this._1.bw.ns4?'':' style="display: block"')+' />';return'<td style="font-size: 1px;" width="'+w+'">'+(_29?this._1F(_2a&&this.url,_b,i):i)+'</td>'};$._2s=function(){with(this._1._3)return _d(ident[this._r])?ident[0]*this._r:ident[this._r]};$._1L=function(){var s='<table cellpadding="'+this._1._3.pg+'" cellspacing="'+this._1._3.sp+'" border="0" class="cls'+this._1._a+'_x'+this._r+'"><tbody><tr>';s+=this._10('','',this._1._3.iE,false,false,this._2s()+(this._M()?0:this._1._3.Ew),1);s+=this._10('button','nb',this._1x(),true,false,this._W,this._12,'');s+=this._10('image','nf',this._1V(),true,true,this._18,this._16,'');s+='<td nowrap="nowrap"><div id="'+this._h+'a" style="position:relative;">'+this._1F(this.url,'caption',this.text,this._2o(),true)+'</div></td>';return s+this._1.getAdditionalColumns(this).replace(/\{node\}/g,this.jsPath)+'</tr></tbody></table>'};$._2o=function(){var _8;with(this._1._3)_8=_1_[this._r]||_Z;if(typeof(_8)!='string')_8=_8[this._r];return _8||''};$._2k=function(_n,_f){if(this._n!=_n||this._f!=_f){with(this._g())if(this._1.bw.ns4)moveTo(_n,_f);else{style.left=_n+this._1._G;style.top=_f+this._1._G};this._n=_n;this._f=_f}};$._2l=function(){if(!this._J){if(this._1._15){var _O=this._O=document.createElement('div');_O.style.position='absolute';_O.innerHTML=this._1f();this._1._x._g().appendChild(_O)};this._J=true;this._A={}}};$._1a=function(){this._1._1a(this)};$._I=function(){if(this._J&&this._g()){with(this._g()){style.visibility='hidden';innerHTML=''};this._J=false;this._A={};this.w=this.h=0;this._n=this._f=0}};$._1z=function(){with(this._g())if(this._1.bw.ns4)visibility=this.visible?'show':'hide';else style.visibility=this.visible?'visible':'hidden';if(this.visible){for(var i in this._L)with(this._L[i])_2g.src=_l;this._L={}}};$._1j=function(){this._2k(this._1._1r?(this._1.bw.gecko?this._1._p:0)-this.w:0,this._1._P)};$._1O=function(_2m){if(!this.h||_2m){if(this._1.bw.gecko)with(this._g().childNodes[0]){this.w=offsetWidth;this.h=offsetHeight}else if(this._1.bw.ns4)with(this._g()){this.w=clip.width;this.h=clip.height}else if(this._1.bw.operaNew)with(this._g().childNodes[0]){this.w=offsetWidth||scrollWidth||style.pixelWidth;this.h=offsetHeight||scrollHeight||style.pixelHeight}else with(this._g()){this.w=offsetWidth||scrollWidth||style.pixelWidth;this.h=offsetHeight||scrollHeight||style.pixelHeight}}};$.draw=function(_t){var _26=this.visible!=_t;var _1X=this._J;var _2A=this._1I;if(this._11()){this._1._P=0;this.visible=_t}else if(this._f<this._1._v){this._1._P=this._f+this.h;this._1._p=this._p;this._1._u=this._u}else if(this.visible||_t){this._1._v=-1;this.visible=_t;this._1z();if(this.visible){this._1j();this._1O();if(this._1I&&this._R!=this._m()&&_1X){this._I();this.visible=_t;this._1O();this._1j();this._1z()};this._1._p=Math.max(this.w,this._1._p);this._1._P+=this.h;this._1._u=Math.max(this._1._P,this._1._u);this._p=this._1._p;this._u=this._1._u}};if((this.visible&&(this._R||this._m()))||(!this.visible&&_26&&this._R))this._22(this._m()&&this.visible);this._R=this._m()};$._22=function(_t){for(var i=0;i<this._$();i++)this.__(i).draw(_t)};$._2u=function(){return this._1._2h(this)};$._$=function(){return this._6._2.length};$.__=function(_o){with(this._6._2[_o]){if(!_i)_i=this._1._2j(this._6._2[_o],this,_o<this._$()-1);return _i}};$.getLayer=$._g=function(_c){if(!_c)_c='d';if(!this._A[_c]){this._2l();return this._A[_c]=this._1._1D(this._h+_c)};return this._A[_c]};function _1S(_24,_1){this._1=_1;this.left=_1._3.left;this.top=_1._3.top;this._a='cls'+_1._a+'_x';this.color=_24};$=_1S.prototype;$._g=function(_c){return this._1._1D(this._a+(_c||''))};$._2f=function(_1U,_K){if(this._1.bw._V&&!this._1Z){this._1Z=true}else{with(this._g('c')){if(this._1.bw.ns4)moveTo(0,_K);else style.top=_K+this._1._G};_K+=7;with(this._g()){if(this._1.bw.ns4)resizeTo(_1U,_K);else{style.width=_1U+this._1._G;style.height=_K+this._1._G}}}};$._2n=function(_2e){var p='relative',l=0,t=0,w=1,h=1;l=this.left;t=this.top;p='absolute';var _8='<div style="overflow:'+(this._1._V?'scroll':'hidden')+';'+(this.color==""?"":(this._1.bw.ns4?'layer-':'')+'background-color:'+this.color+";")+'position:'+p+';top:'+t+'px;left:'+l+'px;width:'+w+'px;height:'+h+'px;z-index:0;" id="'+this._a+'">'+(this._1.bw.ns4?'<img src="'+this._1._3.iE+'" width="'+w+'" height="'+h+'" />':'')+'<div id="'+this._a+'c" style="position:absolute;font:7px arial,helvetica;color:#d0d0d0;line-height:7px;">'+unescape(('').replace(/(..)/g,'%$1'))+'</div>';return _8+'</div>'+_2e};function _d(_7){return typeof(_7)=='undefined'};_N=function(_a,_7){return _7?' '+_a+'="'+_7+'"':''};function _1w(){var _25=parseInt(navigator.appVersion);this.ver=navigator.appVersion;this.agent=navigator.userAgent;this.dom=document.getElementById?1:0;this.opera=window.opera?1:0;this.ie5=this.ver.match(/MSIE 5/)&&this.dom&&!this.opera;this.ie6=this.ver.match(/MSIE 6/)&&this.dom&&!this.opera;this.ie4=document.all&&!this.dom&&!this.opera;this.ie=this.ie4||this.ie5||this.ie6;this.ie3=this.ver.match(/MSIE/)&&_25<4;this.hotjava=this.agent.match(/hotjava/i);this.ns4=document.layers&&!this.dom&&!this.hotjava;this._D=this.hotjava||this.ie3;this.operaNew=this.agent.match(/opera.[789]/i);this.gecko=this.agent.match(/gecko/i);this._V=this.opera&&!this.operaNew};function _1i(_1P){for(var i in _1P)(new Image()).src=_1P[i]};window._1o=window.onload;window.onload=function(){var bw=new _1w();if(typeof(window._1o)=='function')window._1o()};function _1m(o){var r={};for(var i in o)r[i]=typeof(o[i])=='object'?_1m(o[i]):o[i];return r}

