// Title: Tigra Tree Menu PRO
// URL: http://www.softcomplex.com/products/tigra_menu_tree_pro/
// Version: 1.1 (customized)
// Date: 04-30-2003 (mm-dd-yyyy)
// Technical Support: support@softcomplex.com (specify product title and order ID)
// Notes: Registration needed to use this script legally.
// Visit official site for details.

function tree(tmp0,tmp1){this.a_tpl=tmp1;this.a_config=tmp0;this.o_root=this;this.a_index=[];this.a_nodes=[];this.o_selected=null;this.n_depth=-1;var tmp2=new Image(),tmp3=new Image();tmp2.src=tmp1['icon_e'];tmp3.src=tmp1['icon_l'];tmp1['im_e']=tmp2;tmp1['im_l']=tmp3;for(var i=0;i<128;i++)if(tmp1['icon_'+i]){var tmp4=new Image();tmp1['im_'+i]=tmp4;tmp4.src=tmp1['icon_'+i]}this.toggle=function(n_id){var tmp5=this.a_index[n_id];tmp5.open(tmp5.n_state&8)};this.select=function(n_id){return this.a_index[n_id].select()};this.mover=function(n_id){var tmp5=this.a_index[n_id];tmp5.tmp6();tmp5.mover(true)};this.mout=function(n_id){var tmp5=this.a_index[n_id];tmp5.tmp6(true);tmp5.mout(true)};this.find_item=function(tmp7){for(var i=0;i<this.a_index.length;i++)if(this.a_index[i].a_config[0]==tmp7){return(this.a_index[i]);break}};this.tmp8=false;this.ndom_refresh=function(){if(!B_DOM&&this.tmp8)window.location=window.location};this.reset_state=function(){document.cookie='tree_'+this.o_root.n_id+'_state=';this.a_states=[]};this.a_children=[];for(var i=0;i<tmp0.length;i++)this.a_children[this.a_children.length]=new tmp9(this,i);B_DOM=Boolean(document.body&&document.body.innerHTML);this.n_id=TREES.length;TREES[this.n_id]=this;this.a_states=[];var tmpA=/^\s*(\S+)\s*=\s*(\S*)\s*$/,tmpB=document.cookie.split(';'),tmpC,tmpD,tmpC='tree_'+this.o_root.n_id+'_state',tmpE='tree_'+this.o_root.n_id+'_selected';this.tmpF=-1;for(var i=0;i<tmpB.length;i++){if(!tmpA.exec(tmpB[i]))continue;if(RegExp.$1==tmpE)this.tmpF=RegExp.$2;if(RegExp.$1==tmpC){tmpD=RegExp.$2;this.a_states=tmpD.split('_')}}if(tmp1['beforeInit']){eval('var tmpG='+tmp1['beforeInit']+'(this);');if(!tmpG)return}for(var i=0;i<this.a_children.length;i++){this.a_children[i].tmpH=tmpI;document.write(this.a_children[i].tmpH())}if(tmp1['afterInit'])eval(tmp1['afterInit']+'(this);')}function tmp9(o_parent,n_order){this.o_root=o_parent.o_root;this.n_depth=o_parent.n_depth+1;this.a_config=o_parent.a_config[n_order+(this.n_depth?3:0)];while(!this.a_config[this.a_config.length-1])this.a_config.length=this.a_config.length-1;this.n_id=this.o_root.a_index.length;this.o_root.a_index[this.n_id]=this;if(this.a_config.length<4)return;this.n_node_id=this.o_root.a_nodes.length;this.o_root.a_nodes[this.n_node_id]=this;for(var i=3;i<this.a_config.length;i++)new tmp9(this,i-3)}function tmpJ(tmpK,tmpL){if(Boolean(this.n_state&8)!=Boolean(tmpK))return;var tmpM=(this.a_config[2]?this.a_config[2][tmpK?'hc':'ho']:null);tmpM=(tmpM?tmpM:this.o_root.a_tpl[tmpK?'onItemClose':'onItemOpen']);if(tmpM){eval('var tmpG='+tmpM+'(this);');if(!tmpG)return}this.n_state^=8;this.o_root.tmp8=true;this.state_lookup();this.tmp6();this.save();if(B_DOM){var tmpN=tmpO('c'+this.o_root.n_id+'_'+this.n_id);if(!tmpN.innerHTML)tmpN.innerHTML=this.tmpP();tmpN.style.display=(tmpK?'none':'block')}else if(!tmpL)window.location=window.location}function tmpQ(tmpR){var tmpM=(this.a_config[2]?this.a_config[2][tmpR?'hd':'hs']:null);tmpM=(tmpM?tmpM:this.o_root.a_tpl[tmpR?'onItemDeselect':'onItemSelect']);if(tmpM){eval('var tmpG='+tmpM+'(this);');if(!tmpG)return}if(tmpR){this.n_state&=~4}else{var tmpS=this.o_root.o_selected;this.o_root.o_selected=this;if(tmpS)tmpS.select(true);this.n_state|=4;document.cookie='tree_'+this.o_root.n_id+'_selected='+this.n_id+';path=;'}this.state_lookup();this.tmp6();return Boolean(this.a_config[1])}function tmpT(){var tmpM=(this.a_config[2]?this.a_config[2]['hv']:null);tmpM=(tmpM?tmpM:this.o_root.a_tpl['onItemMover']);if(tmpM){eval('var tmpG='+tmpM+'(this);');if(!tmpG)return}this.n_state|=64;this.state_lookup()}function tmpU(){var tmpM=(this.a_config[2]?this.a_config[2]['hu']:null);tmpM=(tmpM?tmpM:this.o_root.a_tpl['onItemMout']);if(tmpM){eval('var tmpG='+tmpM+'(this);');if(!tmpG)return}this.n_state&=~64;this.state_lookup()}function tmpV(tmpW){window.setTimeout("window.status=unescape('"+(tmpW?'':(this.a_config[2]&&this.a_config[2]['sb']?escape(this.a_config[2]['sb']):escape(this.a_config[0])+(this.a_config[1]?' ('+escape(this.a_config[1])+')':'')))+"')",10)}function tmpI(){var a_index=this.o_root.a_index,n_order=0,n_id=this.n_id,o_parent;while(true){n_id--;if(n_id<0)break;if(a_index[n_id].n_depth<this.n_depth){o_parent=a_index[n_id];break}if(a_index[n_id].n_depth==this.n_depth)n_order++}this.o_parent=o_parent?o_parent:this.o_root;this.n_order=n_order;this.state_lookup=tmpX;this.mover=tmpT;this.mout=tmpU;this.select=tmpQ;this.tmp6=tmpV;if(this.a_config.length>3){n_id=this.n_id;this.a_children=[];while(true){n_id++;if(n_id==a_index.length)break;if(a_index[n_id].n_depth<=this.n_depth)break;if(a_index[n_id].n_depth==this.n_depth+1){a_index[n_id].tmpH=tmpI;this.a_children[this.a_children.length]=a_index[n_id]}}this.open=tmpJ;this.save=tmpY;this.load=tmpZ;this.tmpP=tmpa}else{this.open=function(){alert("Only nodes can be opened. id="+this.n_id)};this.load=function(){if(!this.o_root.o_selected&&this.o_root.tmpF==this.n_id){this.o_root.o_selected=this;this.n_state|=4}}}this.n_state=(this.n_depth?0:32)+(this.a_children?16:0)+(this.n_order==this.o_parent.a_children.length-1?1:0);var tmpb=(this.o_root.a_tpl['style_icons']?' class="'+this.o_root.a_tpl['style_icons']+'"':''),tmpc=[],tmpd=this.o_parent,tmpe=this.a_config[2];for(var i=this.n_depth;i>1;i--){tmpc[i]='<img src="'+this.o_root.a_tpl[tmpd.n_state&1?'icon_e':'icon_l']+'"'+tmpb+' border="0">';tmpd=tmpd.o_parent}this.load();var tmpf=this.state_lookup(true);return '<table cellpadding="0" cellspacing="0" border="0"><tr onmouseover="TREES['+this.o_root.n_id+'].mover('+this.n_id+')" onmouseout="TREES['+this.o_root.n_id+'].mout('+this.n_id+')"><td nowrap>'+tmpc.join('')+(tmpf[1]?(this.a_children?'<a href="javascript: TREES['+this.o_root.n_id+'].toggle('+this.n_id+')" onmouseover="TREES['+this.o_root.n_id+'].mover('+this.n_id+')" onmouseout="TREES['+this.o_root.n_id+'].mout('+this.n_id+')"><img src="'+tmpf[1]+'" border="0" name="j'+this.o_root.n_id+'_'+this.n_id+'"'+tmpb+'></a>':'<img src="'+tmpf[1]+'" border="0"'+tmpb+'>'):'')+(tmpf[0]?'<a href="'+this.a_config[1]+'" target="'+(tmpe&&tmpe['tw']?tmpe['tw']:this.o_root.a_tpl['target'])+'" title="'+(tmpe&&tmpe['tt']?tmpe['tt']:'')+'" onclick="return TREES['+this.o_root.n_id+'].select('+this.n_id+')" ondblclick="TREES['+this.o_root.n_id+'].'+(this.a_children?'toggle(':'select(')+this.n_id+')"><img src="'+tmpf[0]+'" border="0" name="i'+this.o_root.n_id+'_'+this.n_id+'"'+tmpb+'></a>':'')+'</td><td nowrap'+(tmpf[2]?' class="'+tmpf[2]+'"':'')+' id="t'+this.o_root.n_id+'_'+this.n_id+'"><a href="'+this.a_config[1]+'" target="'+(tmpe&&tmpe['tw']?tmpe['tw']:this.o_root.a_tpl['target'])+'" title="'+(tmpe&&tmpe['tt']?tmpe['tt']:'')+'" onclick="return TREES['+this.o_root.n_id+'].select('+this.n_id+')" ondblclick="TREES['+this.o_root.n_id+'].'+(this.a_children?'toggle(':'select(')+this.n_id+')">'+this.a_config[0]+'</a></td></tr></table>'+(this.a_children?'<div id="c'+this.o_root.n_id+'_'+this.n_id+'" style="display:'+(this.n_state&8?'block">'+this.tmpP():'none">')+'</div>':'')}function tmpa(){var tmpg=[];for(var i=0;i<this.a_children.length;i++)tmpg[i]=this.a_children[i].tmpH();return tmpg.join('')}function tmpY(){var tmph=Math.floor(this.n_node_id/31);this.o_root.a_states[tmph]=(this.n_state&8?this.o_root.a_states[tmph]|(1<<(this.n_node_id%31)):this.o_root.a_states[tmph]&~(1<<(this.n_node_id%31)));document.cookie='tree_'+this.o_root.n_id+'_state='+this.o_root.a_states.join('_')}function tmpZ(){var tmpM=(tmpM?tmpM:this.o_root.a_tpl['onItemLoad']);if(tmpM){eval('var tmpG='+tmpM+'(this);');if(!tmpG)return}if(!this.o_root.o_selected&&this.o_root.tmpF==this.n_id){this.o_root.o_selected=this;this.n_state|=4}if(this.a_config[2]&&typeof(this.a_config[2]['st'])=='number'){if(Boolean(this.a_config[2]['st']))this.n_state|=8;else this.n_state&=~8;return}if(!this.o_root.a_states.length){var tmpi=this.o_root.a_children;for(var i=0;i<tmpi.length;i++){tmpi[i].n_state|=8;tmpi[i].save()}return}var tmph=Math.floor(this.n_node_id/31);if(Boolean(this.o_root.a_states[tmph]&(1<<(this.n_node_id%31))))this.n_state|=8;else this.n_state&=~8}function tmpX(tmpj){var tmpk=this.n_state&~3;var tmpl=this.n_state&~68|2;var tmpm=this.a_config[2]?this.a_config[2]['i'+(tmpk&~48)]:0;if(!tmpm)tmpm=this.o_root.a_tpl['icon_'+tmpk];if(!tmpm)tmpm=this.o_root.a_tpl['icon_'+(tmpk&~64)];var tmpn=this.o_root.a_tpl['icon_'+tmpl];var tmpo=this.a_config[2]?this.a_config[2]['s'+(tmpk&~48)]:0;if(!tmpo)tmpo=this.o_root.a_tpl['style_'+tmpk];if(!tmpo)tmpo=this.o_root.a_tpl['style_'+(tmpk&~64)];if(tmpj)return[tmpm,tmpn,tmpo];var tmpp=document.images['j'+this.o_root.n_id+'_'+this.n_id];if(tmpp)tmpp.src=tmpn;tmpp=document.images['i'+this.o_root.n_id+'_'+this.n_id];if(tmpp)tmpp.src=tmpm;tmpp=tmpO('t'+this.o_root.n_id+'_'+this.n_id);if(tmpp)tmpp.className=tmpo}var TREES=[],B_DOM;tmpO=document.all?function(tmpq){return document.all[tmpq]}:(document.getElementById?function(tmpq){return document.getElementById(tmpq)}:function(tmpq){return null});
