// Title: COOLjsTree Professional
// URL: http://javascript.cooldev.com/scripts/cooltreepro/
// Version: 2.5.1
// Last Modify: 14 Nov 2004
// Author: Sergey Nosenko <darknos@cooldev.com>
// Notes: Registration needed to use this script on your web site.
// Copyright (c) 2001-2004 by CoolDev.Com
// Copyright (c) 2001-2004 by Sergey Nosenko

function COOLjsTreePRO(_7,_5,_0){this.name=this._7=_7;this.bw=new _P();this._g=this.bw._g;this.ns4=this.bw.ns4;this.fmt=this._0=new _1T(_0);if(!this._g)this._i=new _1N(_0[9],this);if(_9(window.CTrees))window.CTrees=[];window.CTrees[_7]=this;this.jsPath="window.CTrees['"+_7+"']";this.Nodes=this._5=[];this._a=[];this.rootNode=this._Y=new _13(this,"","","",null,-1);this.rootNode._d=true;this.rootNode._c=_5;this._px=this.bw._A?'':'px';this._x=this.bw.dom&&!this.bw._A;this._W=document.body.dir=='rtl';this._m=[];this.missingImagesFix=false};$=COOLjsTreePRO.prototype;$.getSelectedNode=function(){return this.nodeByIndex(this._11)};$._w=function(_id){return(this.ns4&&this._1j[_id])||(document.all&&document.all[_id])||document.getElementById(_id)};$.moveTo=function(x,y){this._i.top=y;this._i.left=y;this._i.moveTo(x,y);this._0.top=y;this._0.left=x;this.draw()};$.ensureVisible=function(_3,_25){var _2=this.nodeByIndex(_3);var _1x=false;while(_2){_2=_2._n;if(_2!=this.rootNode&&!_2._a){this.expandNode(_2._3,1);_1x=true}};if(_1x&&!_25)this.draw()};$._1c=function(_N,_6,_5){for(var i=0;i<_5.length;i++){if(_9(_5[i]))continue;if(_5[i][_N]==_6)return[_5[i]._3];if(_5[i]._4){var _l=this._1c(_N,_6,_5[i]._4);if(_l)return[_5[i]._3].concat(_l)}};return null};$._J=function(_N,_6){var _p=this._1c(_N,_6,this.rootNode._c);return _p?this.rootNode._1s(_p):null};$.nbn=$.nodeByName=function(_6){return this._J('c',_6)};$.nodeByID=function(_6){return this._J('i',_6)};$.nodeByURL=function(_6){return this._J('u',_6)};$.nodeByIndex=function(_6){return this._5[_6]?this._5[_6]:this._J('n',_6)};$._1A=function(_z){for(var i in _z){this._1j[_z[i].id]=_z[i];if(_z[i].layers)this._1A(_z[i].layers)}};$._G=function(){if(!this._24){if(this.ns4){this._1j={};this._1A(document.layers)};this._i.el=this._w(this._i._7);this._24=true}};$.draw=function(){if(this._g||!this._22)return;this._G();this._V=0;this._I=0;for(var j=this._W?2:1;j>0;j--){this.currTop=this._0.top;for(var i in this._Y._4)this._Y._4[i].draw(true)};if(this._0.rel&&this._0.resize||!this._0.rel)this._i.resize(this._I-this._0.left,this._V-this._0.top);if(this.ondraw)this.ondraw(this)};$.expandNode=function(_3,_26,_1$){if(!this._g){var _2=this.nodeByIndex(_3);if(_1$)this.selectNode(_3);if(!_9(this._a[_3]))this._a[_3]=1;if(_2&&_2._d){var _1Y=!_2._a;if(this._0.so){this.collapseAll();this.ensureVisible(_2.index,true)};_2._Q(_1Y);if(!_26){this.draw();if(this._0.cook)this.saveState()}}}};$.selectNode=function(_3){this._11=_3;if(this._0.cook)this.saveState()};$._1D=function(_b,_f,_r){var _2=this._5[_b._3]=new _13(this,_f,_b.c,_b.u||'',_b.t||'',_b._3);_2.nodeID=_b.i;_2._0=_b.f;if(!_9(_2._0.expanded))_2._Q(_2._0.expanded);_2._1P=!_9(_2._0.isFolder);_2._r=_r;if(_b._4){_2._d=true;_2._q=this._x?_b._4:null;_2._c=_b._4;if(!this._x)this._D(_b._4,_2)}else _2._c=[];_2._17();return _2};$._D=function(_5,_f){if(_9(_5[_5.length-1]))_5.splice(-1,1);for(var i=0;i<_5.length;i++)_f._4[_f._4.length]=this._1D(_5[i],_f,i<_5.length-1)};$._1m=function(_y,_u){if(!this._g){for(var i=0;i<this._1l;i++)this._a[i]=_y;for(var i in this._5)this._5[i]._Q(_y);if(this._0.cook)this.saveState();if(_u)this.draw()}};$.collapseAll=function(_u){this._1m(0,_u)};$.expandAll=function(_u){this._1m(1,_u)};$._1u=function(_2,_3){var _p=3;if(!_9(_2[0].id)){_2.i=_2[0].id;_p++};_2.c=_2[_p-3];_2.u=_2[_p-2];_2.t=_2[_p-1];if(!_9(_2[_p])&&!_9(_2[_p].format)){_2.f=_2[_p].format;_p++}else _2.f={};this._a[_3]=0;_2.n=_2._3=_3++;if(!_9(_2[_p])){_2._4=_2.slice(_p);_3=this._1C(_2._4,_3)};return _3};$._1C=function(_5,_3){for(var i=0;i<_5.length;i++)if(_5[i])_3=this._1u(_5[i],_3);return _3};$.init=function(){this._1l=this._1C(this.rootNode._c,0);if(this._0.cook)this.restoreState();this._D(this.rootNode._c,this._Y);var s='';for(var i in this._5)s+=this._5[i]._O();if(!this._g)s=this._i._O(s);if(this.ns4)s='<div id="'+this._7+'dummytreediv" style="position:absolute;"></div>'+s;document.write(s)};$._X=function(_7){return document.cookie.match(new RegExp('(\\W|^)'+_7+'=([^;]+)'))?RegExp.$2:null};$._1b=function(_7,_6){document.cookie=this._7+_7+'='+_6+'; path=/'};$._23=function(){return this._a.join('')};$.saveState=function(){this._1b('Selected',this._11);this._1b('State',this._23())};$.restoreState=function(){var _y=this._X(this._7+'State');if(_y){this.stateRestored=true;for(var i=0;i<this._1l;i++)this._a[i]=_y.charAt(i)=='1'?1:0;var sel=this._X(this._7+'Selected');this.selectNode(this._X(this._7+'Selected'))}};$.image_onclick=$.button_onclick=$.caption_onclick=function(_2){this.expandNode(_2.index,1);this.selectNode(_2.index);this.draw();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};$._1h=function(_h,_v){if(!this.missingImagesFix||!this.bw.ie){_h.src=_v;return};if(_h._1q)return;_h._1q=true;this._m[this._m.length]=[_h,_v];if(!this._1p)this._1p=window.setTimeout(this.jsPath+'.$updateImages()',1)};$.$updateImages=function(){for(var i in this._m){this._m[i][0].src=this._m[i][1];this._m[i][0]._1q=false};this._m=[];this._1p=null};function _13(_1,_f,_1F,_F,_1W,_3){this._3=this.index=_3;this.jsPath=_1.jsPath+'.Nodes['+_3+']';this._id='nt'+_1._7+_3;this.treeView=this._1=_1;this._n=this.parentNode=_f;this.text=_1F;this.url=_F;this.target=_1W;this._0=[];this._Q(this._1._a[this._3]);this.children=this._4=[];this._e=this.level=_f?_f._e+1:-1};$=_13.prototype;$.id=function(){return this._id};$.hasChildren=function(){return this._d};$.__=function(){return this._d||this._1P};$._1s=function(_p){if(!_p.length)return this;if(this._d){if(this._q){this._1._D(this._q,this);this._q=null};for(var i in this._4)if(_p[0]==this._4[i]._3)return this._4[i]._1s(_p.slice(1))};return null};$._Q=function(_6){this._1._a[this._3]=this.expanded=this._a=_6?1:0};$._1g=function(_s,_1R,_1L){var _h=(this._8.document||document).images[this._id+_s],_v=this._a?_1L:_1R;if((this._1._0._t[_s]||this._1._0.exp)&&_h&&_h.src!=_v)this._1._1h(_h,_v)};$._17=function(){if(this._1._0.exp){var ei=this._0.eimages||this._1._0.expimg;var esz=this._1._0.expimgsize;var img=ei[2];this._Z=this.__()?ei[0]:img;this._12=this.__()?ei[1]:img;var ii=this._r?3:4;this._U=this._d?ei[ii]:ei[ii+5];this._$=this._d?ei[ii+2]:ei[ii+5];this.wimg=this._E=this._K=esz[0];this.himg=this._R=this._M=esz[1]}else{this._Z=this._B('folders','clF','iF');this._12=this._B('folders','exF','iF');this._$=this._B('buttons','clB','iE');this._U=this._B('buttons','exB','iE');this._K=_9(this._0.bsize)?this._1._0._K:this._0.bsize[0];this._M=_9(this._0.bsize)?this._1._0._M:this._0.bsize[1];this._E=_9(this._0.fsize)?this._1._0._E:this._0.fsize[0];this._R=_9(this._0.fsize)?this._1._0._R:this._0.fsize[1]}};$._B=function(a,b,c){return this.__()?!_9(this._0[a])?this._0[a][0]:this._1._0[b]:!_9(this._0[a])?this._0[a][2]:this._1._0[c]};$._O=function(_1U){if(!_1U&&this._1._x)return'';return this._1._g?this._1o():'<div id="'+this._id+'d" style="position:absolute;visibility:hidden;'+'z-index:'+(this.index+10)+';">'+this._1o()+'</div>'};$._14=function(_7,_6){return _6?' '+_7+'="'+_6+'"':''};$._1a=function(_F,_k,_1Z,_j,_1J){return'<a'+this._S('click',_k)+this._S('mouseover',_k)+this._S('mouseout',_k)+' href="'+(_F||'javascript:void(0)')+'"'+this._14('target',_F&&this.target)+this._14('id',_1J&&(this._id+'an'))+this._14('class',_j)+'>'+_1Z+'</a>'};$._S=function(ev,_k){return' on'+ev+'="'+(ev=='click'?'this.blur && this.blur();':'')+'return '+this._1.jsPath+'.'+_k+'_on'+ev+'('+this.jsPath+')"'};$._C=function(_k,_s,_1K,_1M,_21,w,h){if(!w)return'';var i='<img'+(_s?' name="'+this._id+_s+'" id="'+this._id+_s+'"':'')+' src="'+_1K+'" width="'+w+'" height="'+h+'" border="0"'+(this._1.bw.ns4?'':' style="display: block"')+' />';return'<td style="font-size: 1px;" valign="'+(this._1._0.exp?'top':this._1._0._1S)+'" width="'+w+'">'+(_1M?this._1a(_21&&this.url,_k,i):i)+'</td>'};$._1f=function(){return this._e>=0?this._n._1f()+this._C('','',this._r?this._1._0.expimg[7]:this._1._0.iE,false,false,this._1._0.expimgsize[0],this._1._0.expimgsize[1]):''};$._1o=function(){var _1X=this._1._0._1V(this._e);var w=this._1._0._1Q;var s='<table'+(w?' width="'+w+'"':'')+' cellpadding="'+this._1._0.pg+'" cellspacing="'+this._1._0.sp+'" border="0" class="cls'+this._1._7+'_i'+this._e+'"><tr>';if(this._1._0.exp)s+=this._n._1f();else s+=this._C('','',this._1._0.iE,false,false,_1X+(this._d?0:this._1._0.Ew),1);if((this._1._0._t.nb&&!this._0.nobuttons&&this._d)||this._1._0.exp)s+=this._C('button','nb',this._a?this._U:this._$,this._d,false,this._K,this._M);if(this._1._0._t.nf&&!this._0.nofolders)s+=this._C('image','nf',this._a?this._12:this._Z,true,true,this._E,this._R);s+='<td'+(w?'':' nowrap="nowrap"')+'><div id="'+this._id+'a" style="position:relative;">'+this._1a(this.url,'caption',this.text,this._1._0._1_(this._e),true)+'</div></td>';return s+'</tr></table>'};$._1d=function(_x,_y){if(this._1.ns4)this.el.moveTo(_x,_y);else{this.el.style.left=_x+this._1._px;this.el.style.top=_y+this._1._px}};$._16=function(_2){if(_2.tagName&&_2.tagName=='IMG')this._1._1h(_2,_2.src);else if(_2.childNodes)for(var i=0;i<_2.childNodes.length;i++)this._16(_2.childNodes[i])};$._G=function(){if(!this._8){if(this._1._x){this._id+='_';var el=this._1._0.rel?this._1._i.el:document.body;this._el=document.createElement('div');this._el.style.position=this._1._0.rel?'relative':'absolute';this._el.style.left=this._el.style.top='0px';this._el.innerHTML=this._O(true);el.appendChild(this._el)};this.el=this._8=this._1._w(this._id+'d')}};$._1z=function(){if(this._1._x&&this._8){this.el.style.visibility='hidden';this.el.innerHTML='';this.el=this._8=null;this.w=this.h=null;this.visible=false}};$._L=function(_1r){this._1z();this._17();if(_1r)for(var i in this._4)this._4[i]._L(_1r)};$.draw=function(_o){if(!this.visible&&!_o)return;if(this.visible!=_o){this._G();this.visible=_o;if(this._1.ns4)this._8.visibility=_o?'show':'hide';else this._8.style.visibility=_o?'visible':'hidden'};if(this.visible){this._G();if(this._1._0.sel){var _H=this._1._11==this._3;if(_H==!this._1n){var _1k=this._1._0.selC[_H?1:0];var _el=this._1._w(this._id+'a');if(this._1.bw.ns4)_el.bgColor=_1k;else if(_el.style)_el.style.backgroundColor=_1k;this._1n=_H};if(this._1.bw.dom){if(_9(this._T)){var el=this._1._w(this._id+'an');this._10=this._T=el.className};var _j=(_H?this._1._0._1I:this._d&&this._a?this._1._0._1O:this._T)||this._T;if(typeof(_j)!='string')_j=_j[this._e];if(_j!=this._10){var el=this._1._w(this._id+'an');el.className=_j;this.h=0;this._10=_j}}};if(!this.h)if(this._1.bw.gecko){this.w=this._8.childNodes[0].offsetWidth;this.h=this._8.childNodes[0].offsetHeight}else{this.w=this._8.offsetWidth||this._8.scrollWidth||(this._8.clip&&this._8.clip.width)||this._8.style.pixelWidth;this.h=this._8.offsetHeight||this._8.scrollHeight||(this._8.clip&&this._8.clip.height)||this._8.style.pixelHeight};if(this.visible){this._1g('nb',this._$,this._U);this._1g('nf',this._Z,this._12)};if(this._1.missingImagesFix&&this._1.ie)this._16(this._8);this._1d(this._1._0.left+(this._1._W?(this._1.bw.gecko?this._1._I:0)-this.w:0),this._1.currTop);this._1._I=Math.max(this._1._0.left+this.w,this._1._I);this._1.currTop+=this.h;this._1._V=Math.max(this._1.currTop,this._1._V)}else this._1d(this._1._W?(this._1.bw.gecko?0:-this.w):0,0);if(this._d){if(this._q){this._1._D(this._q,this);this._q=null};for(var i in this._4)this._4[i].draw(this._a&&_o)}};$.getMinorIndex=function(){var _l=0;while(_l<this._n._4.length)if(this._n._4[_l]==this)return _l;else _l++;return null};$._1v=function(){for(var i in this._4)this._4[i]._1v();this._1._5[this._3]=null;this._1z()};$._1e=function(_3){this._L();for(var i=0;i<Math.min(_3,this._4.length);i++)this._4[i]._L(true)};$.deleteNode=function(_3){if(!_9(this._4[_3])){this._4[_3]._1v();this._4[_3]=null;this._4=this._4.slice(0,_3).concat(this._4.slice(_3+1));this._c=this._c.slice(0,_3).concat(this._c.slice(_3+1));if(this._4.length)this._4[this._4.length-1]._r=false;else this._d=false;this._1e(_3);this._1.draw()}};$.recreate=function(_b,_1G){var _1t=this.getMinorIndex();if(_1G&&this._c)_b.concat(this._c);with(this._n)deleteNode(_1t),addNode(_1t,_b)};$.setCaption=function(_6){this.text=_6;this._L();this._1.draw()};$.addNode=function(_3,_b){if(_3<0)_3=0;if(_3>this._4.length)_3=this._4.length;for(var i=this._4.length;i>_3;i--){this._4[i]=this._4[i-1];this._c[i]=this._c[i-1]};this._c[_3]=_b;this._1._1u(this._c[_3],this._1._5.length);this._4[_3]=this._1._1D(this._c[_3],this,_3<this._4.length-1);if(_3>0)this._4[_3-1]._r=true;this._d=true;this._4[_3]._1n=false;this._10=null;this._1e(_3+1);this._1.draw();return this._4[_3]};function _1N(_1E,_1){this._1=_1;this.left=_1._0.left;this.top=_1._0.top;this._7='cls'+_1._7+'_i';this.color=_1E;this.resize=function(_1B,_1i){if(this._1.ns4)this.el.resizeTo(_1B,_1i);else{if(this._1.bw._A&&!this._1H){this._1H=true;return};this.el.style.width=_1B+this._1._px;this.el.style.height=_1i+this._1._px}};this._O=function(_19){var p='relative',l=0,t=0,w=1,h=1;if(this._1._0.rel){w=this._1._0.rels[0];h=this._1._0.rels[1]}else{l=this.left;t=this.top;p='absolute'};return'<div style="'+(this.color==""?"":(this._1.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._7+'">'+(this._1.ns4?'<img src="'+this._1._0.iE+'" width="'+w+'" height="'+h+'" />':'')+(this._1._0.rel?_19+'</div>':'</div>'+_19)}};function _9(_6){return typeof(_6)=='undefined'};function _15(){for(var i in window.CTrees){window.CTrees[i]._22=true;window.CTrees[i].draw()}};function RedrawAllTrees(){if(!new _P().ns4)_15()};function _P(){var _20=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/)&&_20<4;this.hotjava=this.agent.match(/hotjava/i);this.ns4=document.layers&&!this.dom&&!this.hotjava;this._g=this.hotjava||this.ie3;this.opera7=this.agent.match(/opera.7/i);this.gecko=this.agent.match(/gecko/i);this._A=this.opera&&!this.opera7};function _18(_1w){for(var i in _1w)(new Image()).src=_1w[i]};function _1T(_0){this.left=_0[0];this.top=_0[1];this._t={nb:_0[2],nf:_0[5]};this.clB=_0[3][0];this.exB=_0[3][1];this.iE=_0[3][2];this._K=_0[4][0];this._M=_0[4][1];this.Ew=_0[4][2];this.clF=_0[6][0];this.exF=_0[6][1];this.iF=_0[6][2];this._E=_0[7][0];this._R=_0[7][1];this.ident=_0[8];this.nst=_0[10];this.nstl=_0[11];this.so=_0[12];this.pg=_0[13][0];this.sp=_0[13][1];this.exp=_0[14];this.expimg=_0[15];this.expimgsize=_0[16];this.cook=_0[17];this.rel=_0[18];this.rels=_0[19];this.resize=_0[20];this.sel=_0[21];this.selC=_0[22];this._1I=_0[22]?_0[22][2]:'';this._1O=_0[22]?_0[22][3]:'';this._1Q=_0[23]||0;this._1S=_0[24]||'middle';if(this._t.nb)_18(_0[3]);if(this._t.nf)_18(_0[6]);this._1_=function(_e){return this.nstl[_e]||this.nst};this._1V=function(_e){return _9(this.ident[_e])?this.ident[0]*_e:this.ident[_e]}};window._1y=window.onload;window.onload=function(){var bw=new _P();if(bw._A)window.operaResizeTimer=setTimeout('resizeHandler()',1000);if(typeof(window._1y)=='function')window._1y();if(bw.ns4){window.onresize=resizeHandler;_15()}};function resizeHandler(){if(window.reloading)return;if(!window.origWidth){window.origWidth=window.innerWidth;window.origHeight=window.innerHeight};var reload=window.innerWidth!=window.origWidth||window.innerHeight!=window.origHeight;window.origWidth=window.innerWidth;window.origHeight=window.innerHeight;if(window.operaResizeTimer)clearTimeout(window.operaResizeTimer);if(reload){window.reloading=1;document.location.reload();return};if(new _P()._A){window.operaResizeTimer=setTimeout('resizeHandler()',500)}}
