// Title: COOLjsTree
// URL: http://javascript.cooldev.com/scripts/cooltree/
// Version: 2.6.3
// Last Modify: 3 Mar 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

// Options: PROFESSIONAL, COMPRESSED

function COOLjsTreePRO(_a,_g,_){this.name=this._a=_a;this.bw=new _1l();var _8={};_8.left=_[0];_8.top=_[1];_8._Q={nb:_[2],nf:_[5]};_8.clB=_[3][0];_8.exB=_[3][1];_8.iE=_[3][2];_8._15=_[4][0];_8._14=_[4][1];_8.Ew=_[4][2];_8.clF=_[6][0];_8.exF=_[6][1];_8.iF=_[6][2];_8._16=_[7][0];_8._12=_[7][1];_8.ident=_[8];_8._B=_[10];_8._2a=_[11];_8.so=_[12];_8.pg=_[13][0];_8.sp=_[13][1];_8.exp=_[14];_8.expimg=_[15];_8.expimgsize=_[16];_8.cook=_[17];_8.rel=_[18];_8.rels=_[19];_8.resize=_[20];_8.sel=_[21];_8.selC=_[22];_8._29=_[22]?_[22][2]:'';_8._2f=_[22]?_[22][3]:'';_8._1Y=_[23]||0;_8._2g=_[24]||'middle';if(_8._Q.nb)_23(_[3]);if(_8._Q.nf)_23(_[6]);this._=_8;if(!this.bw._M)this._C=new _25(_[9],this);if(_d(window.CTrees))window.CTrees=[];window.CTrees[_a]=this;this.jsPath="window.CTrees['"+_a+"']";this.Nodes=this._g=[];this._2b=-1;this._2c=0;this._1g={};this._j=this._Z(([{id:null},'',null,null,{format:{}}]).concat(_g));this.__=this.bw._U?'':'px';this._W=this.bw.dom&&!this.bw._U;this._1G=document.body&&document.body.dir=='rtl';this._z=-1};$=COOLjsTreePRO.prototype;$._11={};$._H=function(_1v,_b,_1b){return _y('on'+_1v,'return '+this.jsPath+'.'+_b+'_on'+_1v+'('+_1b+')')};$._1x=function(_b,_1b){if(_d(this._11[_b])){this._11[_b]={};for(var _H in this)if(_H.match(new RegExp('^'+_b+'_on(.+)$')))this._11[_b][RegExp.$1]=true};var _7='';for(var _H in this._11[_b])_7+=this._H(_H,_b,_1b);return _7};$.getAdditionalColumns=function(_2){return''};$.getRoot=$._1d=function(){if(!this._A){this._j._k=this._A=new _1t(this._j,this,null);this._A._E(true)};return this._A};$._1E=function(_4){var _n=this._1q('n',_4,this._j._3);if(!_n)return null;var _5=this._j,i=0;for(var i=0;i<_n.length-1;i++)_5=_5._3[_n[i]];return[_5,_n[i]]};$._10=function(_2){if(this._A&&_2._4==this._A._4)this._A=null;if(_2._k){_2._k._1r();_2._u=null;_2._k=null};for(var i in _2._3)if(_2._3[i]._k)this._10(_2._3[i])};$._2C=function(_1H,_l,_6){var _5;if(_1H==this._j._4)_5=this._j;else{var _s=this._1E(_1H);if(_s)_5=_s[0]._3[_s[1]]};if(_5){this._10(_5);for(var i in _6)_6[i]=this._Z(_6[i]);_l=Math.max(0,Math.min(_l,_5._3.length));if(_l==_5._3.length){_5._3=_5._3.concat(_6)}else{var _3=_5._3;_5._3=[];for(var i in _3){if(i==_l)_5._3=_5._3.concat(_6);_5._3[_5._3.length]=_3[i]}};return _l}else return null};$._1C=function(_4,_6,_2B,_2G,_19){var _s=this._1E(_4);if(_s){var _5=_s[0],_3=_5._3,_4=_s[1];this._10(_5);var _6=this._Z(_6);if(_2B)_6[0]=_5._3[_4][0];if(_2G)_6[4]=_5._3[_4][4];if(_19)_6._3=_5._3[_4]._3;_5._3[_4]=_6}};$._2I=function(_5,_4){if(!_d(_5._3[_4])){var _3=_5._3;this._10(_5);_5._3=[];for(var i in _3)if(i!=_4)_5._3[_5._3.length]=_3[i]}};$.dump=function(_2,_b){var _7='';if(!_2){_2=this._j;_b=''};_7=_b+"{"+_2._4+"} - [";if(_2[0].id!==null)_7+='{id:'+_2[0].id+'}, ';_7+='"'+_2[1]+'", ';_7+=(_2[2]===null?'null':'"'+_2[2]+'"')+', ';_7+=_2[3]===null?'null':'"'+_2[3]+'"';if(_2._3.length){_7+=",\n";for(var i in _2._3)_7+=this.dump(_2._3[i],_b+"\t");_7+=_b+"],\n"}else _7+="],\n";return _7};$.getSelectedNode=function(){return this.nodeByIndex(this._1e)};$._2M=function(_2){return this._1e===_2._4};$._1k=function(){return this._W&&this._._1Y&&this._.exp};$._1A=function(_P){for(var i in _P){this._1j[_P[i].id]=_P[i];if(_P[i].layers)this._1A(_P[i].layers)}};$._1i=function(_h){if(this.bw.ns4){if(!this._1j){this._1j={};this._1A(document.layers)};return this._1j[_h]}else return(document.all&&document.all[_h])||document.getElementById(_h)};$.moveTo=function(x,y){this._C.top=y;this._C.left=y;this._C.moveTo(x,y);this._.top=y;this._.left=x;this.draw()};$.ensureVisible=function(_4,_2N){var _2=this.nodeByIndex(_4);var _o=false;while(_2){_2=_2._u;if(_2._1n())break;if(!_2._f()){this.expandNode(_2._4,1);_o=true}};if(_o&&!_2N)this.draw()};$._1q=function(_O,_9,_g){for(var i in _g){if(typeof(_9)!='object'?_g[i][_O]==_9:(''+_g[i][_O]).match(_9))return[i];var _20=this._1q(_O,_9,_g[i]._3);if(_20)return[i].concat(_20)};return null};$._T=function(_O,_9){return this._1d()._1_(this._1q(_O,_9,this._j._3))};$.nbn=$.nodeByName=function(_9){return this._T('c',_9)};$.nodeByID=function(_9){return this._T('i',_9)};$.nodeByURL=function(_9){return this._T('u',_9)};$.nodeByIndex=function(_9){if(!this._g[_9])this._g[_9]=this._T('n',_9);return this._g[_9]};$.nodeByXY=function(_X,_Y){for(var i in this._g)if(this._g[i])with(this._g[i])if(visible&&_p<=_X&&_e<=_Y&&_p+w>_X&&_e+h>_Y)return this._g[i];return null};$._o=function(_e){if(!this._21)this._21=window.setTimeout(this.jsPath+'.draw()',1);if(typeof(_e)=='number')this._z=Math.min(_e,this._z);else this._z=-1};$._1r=function(_2){if(this._27)_2._L();else{this._1g[_2._4]=true;this._o()}};$._L=function(){if(this._W)for(var _4 in this._1g){var _2=this.nodeByIndex(_4);if(_2)_2._L()};this._1g={}};$.draw=function(){if(this.bw._M||!this._2K)return;this._L();this._27=true;this._w=0;this._r=0;with(this._1d()){draw(true);if(this._1G)draw(true)};if(this._.rel&&this._.resize||!this._.rel)this._C._2J(this._r,this._w);this._21=null;this._z=10000000;if(this.ondraw)this.ondraw(this);this._27=false};$.expandNode=function(_4,_2O,_1c){if(!this.bw._M){var _2=this.nodeByIndex(_4);if(_1c)this.selectNode(_4);if(_2&&_2._v()){var _2z=!_2._f();if(this._.so){this.collapseAll();this.ensureVisible(_2.index,true)};_2._E(_2z);this._o(_2._e)}}};$._1c=$.selectNode=function(_4){this._1e=_4;this._o()};$._2y=function(_D,_5,_t){var _2=this._g[_D._4]=new _1t(_D,this,_5);_2._t=_t;_2._2o();return _2};$._1X=function(_m,_2){for(var i in _2._3){this._1X(_m,_2._3[i]);if(_2._3[i]._3.length)if(_2._3[i]._k)_2._3[i]._k._E(_m);else _2._3[i][4].format.expanded=_m}};$._1O=function(_m){this._1X(_m,this._j);this._o()};$.collapseAll=function(){this._1O(false)};$.expandAll=function(){this._1O(true)};$._Z=function(_2){if(_d(_2[_2.length-1]))_2=_2.slice(0,_2.length-1);if(_d(_2[0].id))_2=([{id:null}]).concat(_2);if(_d(_2[4])||_d(_2[4].format))_2=_2.slice(0,4).concat([{format:{}}]).concat(_2.slice(4));var _4=this._2b++;var _3=_2.slice(5);_2=_2.slice(0,5);_2._3=[];for(var i in _3)_2._3[i]=this._Z(_3[i]);_2.i=_2[0].id;_2.c=_2[1];_2.u=_2[2];_2.t=_2[3];_2.f=_2[4].format;_2.n=_2._4=_4;_2._k=null;return _2};$.init=function(){var s=this._1d()._1o(!this._W);if(this._.cook){this._1c(this._1M('Selected'));this._2l(this._1M('State'))};if(!this.bw._M)s=this._C._2j(s);if(this.bw.ns4)s='<div id="'+this._a+'dummytreediv" style="position:absolute;"></div>'+s;document.write(s)};$._1M=function(_a){return document.cookie.match(new RegExp('(\\W|^)'+this._a+_a+'=([^;]+)'))?RegExp.$2:null};$._1P=function(_a,_9){document.cookie=this._a+_a+'='+_9+'; path=/'};$._1Q=function(_2){var _7='';for(var i in _2._3)if(_2._3[i]._3.length)_7+=(_2._3[i][4].format.expanded?1:0)+this._1Q(_2._3[i]);return _7};$._2k=function(){return this._1Q(this._j)};$._1V=function(_2,_m,_4){for(var i in _2._3){if(_2._3[i]._3.length){if(_2._3[i]._k)_2._3[i]._k._E(_m.charAt(_4)=='1');else _2._3[i][4].format.expanded=_m.charAt(_4)=='1';_4=this._1V(_2._3[i],_m,_4+1)}};return _4};$._2l=function(_m){this._1V(this._j,_m||'',0)};$.image_onclick=$.button_onclick=$.caption_onclick=function(_2){this.expandNode(_2.index,1,1);return true};$.button_onclick=function(_2){this.expandNode(_2.index);return true};$.image_onmouseover=$.button_onmouseover=$.caption_onmouseover=function(_2){window.status=_2.text;return true};$.image_onmouseout=$.button_onmouseout=$.caption_onmouseout=function(node){window.status=window.defaultStatus;return true};function _1t(_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._u=this.parentNode=_5;this.text=_6[1];this.url=_6[2];this.target=_6[3];this.nodeID=_6[0].id;this._=_6[4].format;this._S=null;this._E(this._6[4].format.expanded);this.children=this._3=[];this._q=this.level=_5?_5._q+1:-1;this.visible=false;this._G={};this._1s=false;this._18={}};$=_1t.prototype;$._1n=function(){return this._1._j._4==this._4};$._f=function(){return this._6[4].format.expanded};$.id=function(){return this._h};$._1u=function(_1U,_I,_1T){this._1._1C(this._4,[_d(_1U)?this._2p():_1U,_d(_I)?this._2q():_I,_d(_1T)?this._2v():_1T],true,true,true);this._1._o()};$.getTree=function(){return this._1};$.getParent=function(){return this._u};$.getId=function(){return this._6[0].id};$._2p=$.getCaption=function(){return this._6[1]};$._2q=$.getUrl=function(){return this._6[2]};$._2v=$.getTarget=function(){return this._6[3]};$.getFormat=function(){return this._6[4].format};$.setCaption=function(_9){this._1u(_9,this._J,this._J)};$.setUrl=function(_9){this._1u(this._J,_9,this._J)};$.setTarget=function(_9){this._1u(this._J,this._J,_9)};$.hasChildren=$._v=function(){return!!this._6._3.length};$._1p=function(){return this._v()||this._6[4].format.isFolder};$._1_=function(_n){if(_n)return _n.length?this._13(_n[0])._1_(_n.slice(1)):this;return null};$._E=function(_9){this.expanded=this._6[4].format.expanded=!!_9;if(this._F){this._1R('nb',this._1S());this._1R('nf',this._1J())}};$._1S=function(){if(!this._1._._Q.nb||this._.nobuttons)return null;if(!this._v())return null;if(this._1._.exp){var _K=this._.eimages||this._1._.expimg;if(this._t)return _K[this._f()?3:5];else return _K[this._f()?4:6]};if(this._.buttons)return this._f()?this._.buttons[1]:this._.buttons[0];else return this._f()?this._1._.exB:this._1._.clB};$._1J=function(){if(!this._1._._Q.nf||this._.nofolders)return null;if(this._1._.exp){var _K=this._.eimages||this._1._.expimg;return this._1p()?_K[this._f()?1:0]:_K[2]};if(this._.folders)return this._1p()?(this._f()?this._.folders[1]:this._.folders[0]):this._.folders[2];else return this._1p()?(this._f()?this._1._.exF:this._1._.clF):this._1._.iF};$._1R=function(_c,_1a){if(_1a){var _1m=(this._i().document||document).images[this._h+_c];if((this._1._._Q[_c]||this._1._.exp)&&_1m&&_1m.src!=_1a)this._18[_c]={_2x:_1m,_n:_1a}}};$._2o=function(){if(this._1._.exp){var esz=this._1._.expimgsize;this.wimg=this._16=this._15=esz[0];this.himg=this._12=this._14=esz[1]}else{this._15=_d(this._.bsize)?this._1._._15:this._.bsize[0];this._14=_d(this._.bsize)?this._1._._14:this._.bsize[1];this._16=_d(this._.fsize)?this._1._._16:this._.fsize[0];this._12=_d(this._.fsize)?this._1._._12:this._.fsize[1]}};$._1o=function(_1N){var _7='';if(!this._1n()){this._h='nt'+this._1._a+'_'+this._1._2c++;_7+=this._1.bw._M?this._24():'<div'+this._1._1x('layer',this.jsPath)+' id="'+this._h+'d" style="position:absolute;visibility:hidden;z-index:'+(this.index+10)+';">'+this._24()+'</div>'};if(_1N)for(var i=0;i<this._1f();i++)_7+=this._13(i)._1o(_1N);return _7};$._28=function(_I,_b,_2u,_B,_2t){return'<a'+this._1._1x(_b,this.jsPath)+' href="'+(_I||'javascript:void(0)')+'"'+_y('target',_I&&this.target)+_y('id',_2t&&(this._h+'an'))+_y('class',_B)+'>'+_2u+'</a>'};$._N=function(_b,_c,_17,_2r,_2s,w,h,_1h){if(!w||!_17)return'';if(!this._1._1k()&&_1h&&_17==this._1._.iE)_17=_1h;var i='<img'+(_c?' name="'+this._h+_c+'" id="'+this._h+_c+'"':'')+' src="'+_17+'" width="'+w+'" height="'+h+'" border="0"'+(this._1.bw.ns4?'':' style="display: block"')+' />';return'<td'+(this._1._1k()?_y('background',_1h):'')+' style="font-size: 1px;" valign="'+(this._1._.exp?'top':this._1._._2g)+'" width="'+w+'">'+(_2r?this._28(_2s&&this.url,_b,i):i)+'</td>'};$._1K=function(){return this._q>=0?this._u._1K()+this._N('','',this._1._.iE,false,false,this._1._.expimgsize[0],this._1._.expimgsize[1],this._t&&this._1._.expimg[7]):''};$._2w=function(){with(this._1._)return _d(ident[this._q])?ident[0]*this._q:ident[this._q]};$._24=function(){var w=this._1._._1Y;var s='<table'+_y('width',w)+' cellpadding="'+this._1._.pg+'" cellspacing="'+this._1._.sp+'" border="0" class="cls'+this._1._a+'_C'+this._q+'"><tbody><tr>';if(this._1._.exp){s+=this._u._1K();if(!this._v())s+=this._N('','',(this._t?this._1._.expimg[8]:this._1._.expimg[9]),false,false,this._1._.expimgsize[0],this._1._.expimgsize[1],this._t&&this._1._.exp&&this._1._.expimg[7])}else s+=this._N('','',this._1._.iE,false,false,this._2w()+(this._v()?0:this._1._.Ew),1);s+=this._N('button','nb',this._1S(),true,false,this._15,this._14,this._t&&this._1._.exp&&this._1._.expimg[7]);s+=this._N('image','nf',this._1J(),true,true,this._16,this._12,this._f()&&this._v()&&this._1._.exp&&this._1._.expimg[7]);s+='<td'+(w?'':' nowrap="nowrap"')+'><div id="'+this._h+'a" style="position:relative;">'+this._28(this.url,'caption',this.text,this._1W(),true)+'</div></td>';return s+this._1.getAdditionalColumns(this).replace(/\{node\}/g,this.jsPath)+'</tr></tbody></table>'};$._1W=function(){var _7;if(this._1._.sel)if(this._R())_7=this._1._._29;else if(this._v()&&this._f())_7=this._1._._2f;if(!_7)with(this._1._)_7=_2a[this._q]||_B;if(typeof(_7)!='string')_7=_7[this._q];return _7||''};$._2m=function(_p,_e){if(this._p!=_p||this._e!=_e){with(this._i())if(this._1.bw.ns4)moveTo(_p,_e);else{style.left=_p+this._1.__;style.top=_e+this._1.__};this._p=_p;this._e=_e}};$._2n=function(){if(!this._F){if(this._1._W){var _V=this._V=document.createElement('div');_V.style.position=this._1._.rel?'relative':'absolute';_V.innerHTML=this._1o();this._1._C._i().appendChild(_V)};this._F=true;this._G={}}};$._1r=function(){this._1._1r(this)};$._L=function(){if(this._F&&this._i()){with(this._i()){style.visibility='hidden';innerHTML=''};this._F=false;this._G={};this.w=this.h=0;this._p=this._e=0}};$._1I=function(){with(this._i())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._18)with(this._18[i])_2x.src=_n;this._18={}}};$._26=function(){this._2m(this._1._1G?(this._1.bw.gecko?this._1._r:0)-this.w:0,this._1._$)};$._2H=function(){if(this._1._.sel){if(this._R()==!this._2L){var _1L=this._1._.selC[this._R()?1:0];with(this._i('a'))if(this._1.bw.ns4)bgColor=_1L;else style.backgroundColor=_1L;this._2L=this._R()};if(this._1.bw.dom){if(_d(this._2h))this._1y=this._2h=this._1._1i(this._h+'an').className;var _B=this._1W();if(_B!=this._1y){this._i('an').className=this._1y=_B;this.h=0}}}};$._1B=function(_2A){if(!this.h||_2A){if(this._1.bw.gecko)with(this._i().childNodes[0]){this.w=offsetWidth;this.h=offsetHeight}else if(this._1.bw.ns4)with(this._i()){this.w=clip.width;this.h=clip.height}else with(this._i()){this.w=offsetWidth||scrollWidth||style.pixelWidth;this.h=offsetHeight||scrollHeight||style.pixelHeight};if(this._1._1k())this._1s=this._1._.exp&&this.h>this._1._.expimgsize[1]}};$.draw=function(_x){var _2D=this.visible!=_x;var _1w=this._F;var _2P=this._1s;if(this._1n()){this._1._$=0;this.visible=_x}else if(this._e<this._1._z){this._1._$=this._e+this.h;this._1._r=this._r;this._1._w=this._w}else if(this.visible||_x){this._1._z=-1;this.visible=_x;this._1I();if(this.visible){this._26();if(_1w)this._2H();this._1B();if(this._1s&&this._S!=this._f()&&_1w){this._L();this.visible=_x;this._1B();this._26();this._1I()};this._1._r=Math.max(this._1._.left+this.w,this._1._r);this._1._$+=this.h;this._1._w=Math.max(this._1._$,this._1._w);this._r=this._1._r;this._w=this._1._w}};if((this.visible&&(this._S||this._f()))||(!this.visible&&_2D&&this._S))this._2F(this._f()&&this.visible);this._S=this._f()};$._2F=function(_x){for(var i=0;i<this._1f();i++)this._13(i).draw(_x)};$._R=function(){return this._1._2M(this)};$._1f=function(){return this._6._3.length};$._13=function(_l){with(this._6._3[_l]){if(!_k)_k=this._1._2y(this._6._3[_l],this,_l<this._1f()-1);return _k}};$.getMinorIndex=function(){var _7=0;while(_7<this._u._6._3.length)if(this._u._6._3[_7]._4==this._4)return _7;else _7++;return null};$.addNode=function(_l,_D){return this._13(this._1._2C(this._4,_l,[_D]))};$.recreate=function(_D,_19){this._1._1C(this._4,_D,false,false,_19);this._1._o()};$.deleteNode=function(_4){this._1._2I(this._6,_4)};$.getLayer=$._i=function(_c){if(!_c)_c='d';if(!this._G[_c]){this._2n();return this._G[_c]=this._1._1i(this._h+_c)};return this._G[_c]};function _25(_2E,_1){this._1=_1;this.left=_1._.left;this.top=_1._.top;this._a='cls'+_1._a+'_C';this.color=_2E};$=_25.prototype;$._i=function(_c){return this._1._1i(this._a+(_c||''))};$._2J=function(_1D,_1F){if(this._1.bw._U&&!this._2i){this._2i=true}else{with(this._i()){if(this._1.bw.ns4)resizeTo(_1D,_1F);else{style.width=_1D+this._1.__;style.height=_1F+this._1.__}}}};$._2j=function(_1z){var p='relative',l=0,t=0,w=1,h=1;if(this._1._.rel){w=this._1._.rels[0];h=this._1._.rels[1]}else{l=this.left;t=this.top;p='absolute'};var _7='<div style="overflow:'+(this._1._U?'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._.iE+'" width="'+w+'" height="'+h+'" />':'');return _7+(this._1._.rel?_1z+'</div>':'</div>'+_1z)};function _d(_9){return typeof(_9)=='undefined'};_y=function(_a,_9){return _9?' '+_a+'="'+_9+'"':''};function _2d(){for(var i in window.CTrees){window.CTrees[i]._2K=true;window.CTrees[i].draw()}};function RedrawAllTrees(){if(!new _1l().ns4)_2d()};function _1l(){var _2e=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/)&&_2e<4;this.hotjava=this.agent.match(/hotjava/i);this.ns4=document.layers&&!this.dom&&!this.hotjava;this._M=this.hotjava||this.ie3;this.opera7=this.agent.match(/opera.7/i);this.gecko=this.agent.match(/gecko/i);this._U=this.opera&&!this.opera7};function _23(_22){for(var i in _22)(new Image()).src=_22[i]};window._1Z=window.onload;window._1$=window.onunload;window.onload=function(){var bw=new _1l();if(typeof(window._1Z)=='function')window._1Z()};window.onunload=function(){for(var i in window.CTrees)with(window.CTrees[i])if(_.cook){_1P('Selected',_1e);_1P('State',_2k())};if(typeof(window._1$)=='function')window._1$()}

