  //###########################################################################
  //#
  //# function redirects page
  //#
  
  function redir ( lien, cible) {
    if ( cible == "_blank" ) {
      window.open();
    } else if ( cible == "_self" || cible == "" ) {
      window.location = lien;
    } else if ( cible == "_parent" ) {
      window.parent.location = lien;
    } else if ( cible == "_top" ) {
      window.top.location = lien;
    } else {
      eval("cible.location = lien");
    }
  }

  // version sans a href
  function tree(ttmpA,ttmpB){this.a_tpl=ttmpB;this.a_config=ttmpA;this.o_root=this;this.a_index=[];this.a_nodes=[];this.o_selected=null;this.n_depth=-1;var ttmpC=new Image(),ttmpD=new Image();ttmpC.src=ttmpB['icon_e'];ttmpD.src=ttmpB['icon_l'];ttmpB['im_e']=ttmpC;ttmpB['im_l']=ttmpD;for(var i=0;i<128;i++)if(ttmpB['icon_'+i]){var ttmpE=new Image();ttmpB['im_'+i]=ttmpE;ttmpE.src=ttmpB['icon_'+i]}this.toggle=function(n_id){var ttmpF=this.a_index[n_id];ttmpF.open(ttmpF.n_state&8)};this.select=function(n_id){return this.a_index[n_id].select()};this.mover=function(n_id){var ttmpF=this.a_index[n_id];ttmpF.ttmpG();ttmpF.mover(true)};this.mout=function(n_id){var ttmpF=this.a_index[n_id];ttmpF.ttmpG(true);ttmpF.mout(true)};this.find_item=function(ttmpH){for(var i=0;i<this.a_index.length;i++)if(this.a_index[i].a_config[0]==ttmpH){return(this.a_index[i]);break}};this.ttmpI=false;this.ndom_refresh=function(){if(!B_DOM&&this.ttmpI)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<ttmpA.length;i++)this.a_children[this.a_children.length]=new ttmpJ(this,i);B_DOM=Boolean(document.body&&document.body.innerHTML);this.n_id=TREES.length;TREES[this.n_id]=this;this.a_states=[];var ttmpK=/^\s*(\S+)\s*=\s*(\S*)\s*$/,ttmpL=document.cookie.split(';'),ttmpM,ttmpN,ttmpM='tree_'+this.o_root.n_id+'_state';for(var i=0;i<ttmpL.length;i++){if(!ttmpK.exec(ttmpL[i])||RegExp.$1!=ttmpM)continue;ttmpN=RegExp.$2;this.a_states=ttmpN.split('_');break}if(ttmpB['beforeInit']){eval('var ttmpO='+ttmpB['beforeInit']+'(this);');if(!ttmpO)return}for(var i=0;i<this.a_children.length;i++){this.a_children[i].ttmpP=ttmpQ;document.write(this.a_children[i].ttmpP())}if(ttmpB['afterInit'])eval(ttmpB['afterInit']+'(this);')}function ttmpJ(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<2)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 ttmpJ(this,i-3)}function ttmpR(ttmpS,ttmpT){if(Boolean(this.n_state&8)!=Boolean(ttmpS))return;var ttmpU=(this.a_config[2]?this.a_config[2][ttmpS?'hc':'ho']:null);ttmpU=(ttmpU?ttmpU:this.o_root.a_tpl[ttmpS?'onItemClose':'onItemOpen']);if(ttmpU){eval('var ttmpO='+ttmpU+'(this);');if(!ttmpO)return}this.n_state^=8;this.o_root.ttmpI=true;this.state_lookup();this.ttmpG();this.save();if(B_DOM){var ttmpV=ttmpW('c'+this.o_root.n_id+'_'+this.n_id);if(!ttmpV.innerHTML)ttmpV.innerHTML=this.ttmpX();ttmpV.style.display=(ttmpS?'none':'block')}else if(!ttmpT)window.location=window.location}function ttmpY(ttmpZ){var ttmpU=(this.a_config[2]?this.a_config[2][ttmpZ?'hd':'hs']:null);ttmpU=(ttmpU?ttmpU:this.o_root.a_tpl[ttmpZ?'onItemDeselect':'onItemSelect']);if(ttmpU){eval('var ttmpO='+ttmpU+'(this);');if(!ttmpO)return}if(ttmpZ){this.n_state&=~4}else{var ttmpa=this.o_root.o_selected;this.o_root.o_selected=this;if(ttmpa)ttmpa.select(true);this.n_state|=4}this.state_lookup();this.ttmpG();return Boolean(this.a_config[1])}function ttmpb(){var ttmpU=(this.a_config[2]?this.a_config[2]['hv']:null);ttmpU=(ttmpU?ttmpU:this.o_root.a_tpl['onItemMover']);if(ttmpU){eval('var ttmpO='+ttmpU+'(this);');if(!ttmpO)return}this.n_state|=64;this.state_lookup()}function ttmpc(){var ttmpU=(this.a_config[2]?this.a_config[2]['hu']:null);ttmpU=(ttmpU?ttmpU:this.o_root.a_tpl['onItemMout']);if(ttmpU){eval('var ttmpO='+ttmpU+'(this);');if(!ttmpO)return}this.n_state&=~64;this.state_lookup()}function ttmpd(ttmpe){window.setTimeout("window.status=unescape('"+(ttmpe?'':(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 ttmpQ(){var commentDeb="";var commentFin="";if(this.n_id==0){commentDeb="<!--";commentFin = "-->";}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=ttmpf;this.mover=ttmpb;this.mout=ttmpc;this.select=ttmpY;this.ttmpG=ttmpd;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].ttmpP=ttmpQ;this.a_children[this.a_children.length]=a_index[n_id]}}this.open=ttmpR;this.save=ttmpg;this.load=ttmph;this.ttmpX=ttmpi}else{this.open=function(){alert("Only nodes can be opened. id="+this.n_id)};this.load=function(){return}}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 ttmpj=(this.o_root.a_tpl['style_icons']?' class="'+this.o_root.a_tpl['style_icons']+'"':''),ttmpk=[],ttmpl=this.o_parent,ttmpm=this.a_config[2];for(var i=this.n_depth;i>1;i--){/*ttmpk[i]='<img src="'+this.o_root.a_tpl[ttmpl.n_state&1?'icon_e':'icon_l']+'"'+ttmpj+' border="0">';ttmpl=ttmpl.o_parent*/}/*alert('test');*/this.load();var ttmpn=this.state_lookup(true);return commentDeb + '<table cellpadding="0" cellspacing="0" border="0"><tr onmouseover="TREES['+this.o_root.n_id+'].mover('+this.n_id+');window.status=\''+this.a_config[1]+'\';" onmouseout="TREES['+this.o_root.n_id+'].mout('+this.n_id+');window.status=\'\';" title="'+(ttmpm&&ttmpm['tt']?ttmpm['tt']:'')+'"><td '+(ttmpn[2]?' class="'+ttmpn[2]+'"':'')+' id="t'+this.o_root.n_id+'_'+this.n_id+'" onclick="TREES['+this.o_root.n_id+'].'+(this.a_children?'toggle(':'select(')+this.n_id+');redir(\''+this.a_config[1]+'\', \''+(ttmpm&&ttmpm['tw']?ttmpm['tw']:this.o_root.a_tpl['target'])+'\');" nowrap>'+this.a_config[0]+'</td></tr></table>' + commentFin + (this.a_children?'<div id="c'+this.o_root.n_id+'_'+this.n_id+'" style="display:'+(this.n_state&8?'block">'+this.ttmpX():'none">')+'</div>':'')}function ttmpi(){var ttmpo=[];for(var i=0;i<this.a_children.length;i++)ttmpo[i]=this.a_children[i].ttmpP();return ttmpo.join('')}function ttmpg(){var ttmpp=Math.floor(this.n_node_id/31);this.o_root.a_states[ttmpp]=(this.n_state&8?this.o_root.a_states[ttmpp]|(1<<(this.n_node_id%31)):this.o_root.a_states[ttmpp]&~(1<<(this.n_node_id%31)));document.cookie='tree_'+this.o_root.n_id+'_state='+this.o_root.a_states.join('_')+';path=/';}function ttmph(){var ttmpU=(ttmpU?ttmpU:this.o_root.a_tpl['onItemLoad']);if(ttmpU){eval('var ttmpO='+ttmpU+'(this);');if(!ttmpO)return}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 ttmpq=this.o_root.a_children;for(var i=0;i<ttmpq.length;i++){ttmpq[i].n_state|=8;ttmpq[i].save()}return}var ttmpp=Math.floor(this.n_node_id/31);if(Boolean(this.o_root.a_states[ttmpp]&(1<<(this.n_node_id%31))))this.n_state|=8;else this.n_state&=~8}function ttmpf(ttmpr){var ttmps=this.n_state&~3;var ttmpt=this.n_state&~68|2;var ttmpu=this.a_config[2]?this.a_config[2]['i'+(ttmps&~48)]:0;if(!ttmpu)ttmpu=this.o_root.a_tpl['icon_'+ttmps];if(!ttmpu)ttmpu=this.o_root.a_tpl['icon_'+(ttmps&~64)];var ttmpv=this.o_root.a_tpl['icon_'+ttmpt];var ttmpw=this.a_config[2]?this.a_config[2]['s'+(ttmps&~48)]:0;if(!ttmpw)ttmpw=this.o_root.a_tpl['style_'+ttmps];if(!ttmpw)ttmpw=this.o_root.a_tpl['style_'+(ttmps&~64)];if(ttmpr)return[ttmpu,ttmpv,ttmpw];var ttmpx=document.images['j'+this.o_root.n_id+'_'+this.n_id];if(ttmpx)ttmpx.src=ttmpv;ttmpx=document.images['i'+this.o_root.n_id+'_'+this.n_id];if(ttmpx)ttmpx.src=ttmpu;ttmpx=ttmpW('t'+this.o_root.n_id+'_'+this.n_id);if(ttmpx)ttmpx.className=ttmpw}var TREES=[],B_DOM;ttmpW=document.all?function(ttmpy){return document.all[ttmpy]}:(document.getElementById?function(ttmpy){return document.getElementById(ttmpy)}:function(ttmpy){return null});
  
  //  version avec a href
  //function tree(ttmpA,ttmpB){this.a_tpl=ttmpB;this.a_config=ttmpA;this.o_root=this;this.a_index=[];this.a_nodes=[];this.o_selected=null;this.n_depth=-1;var ttmpC=new Image(),ttmpD=new Image();ttmpC.src=ttmpB['icon_e'];ttmpD.src=ttmpB['icon_l'];ttmpB['im_e']=ttmpC;ttmpB['im_l']=ttmpD;for(var i=0;i<128;i++)if(ttmpB['icon_'+i]){var ttmpE=new Image();ttmpB['im_'+i]=ttmpE;ttmpE.src=ttmpB['icon_'+i]}this.toggle=function(n_id){var ttmpF=this.a_index[n_id];ttmpF.open(ttmpF.n_state&8)};this.select=function(n_id){return this.a_index[n_id].select()};this.mover=function(n_id){var ttmpF=this.a_index[n_id];ttmpF.ttmpG();ttmpF.mover(true)};this.mout=function(n_id){var ttmpF=this.a_index[n_id];ttmpF.ttmpG(true);ttmpF.mout(true)};this.find_item=function(ttmpH){for(var i=0;i<this.a_index.length;i++)if(this.a_index[i].a_config[0]==ttmpH){return(this.a_index[i]);break}};this.ttmpI=false;this.ndom_refresh=function(){if(!B_DOM&&this.ttmpI)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<ttmpA.length;i++)this.a_children[this.a_children.length]=new ttmpJ(this,i);B_DOM=Boolean(document.body&&document.body.innerHTML);this.n_id=TREES.length;TREES[this.n_id]=this;this.a_states=[];var ttmpK=/^\s*(\S+)\s*=\s*(\S*)\s*$/,ttmpL=document.cookie.split(';'),ttmpM,ttmpN,ttmpM='tree_'+this.o_root.n_id+'_state';for(var i=0;i<ttmpL.length;i++){if(!ttmpK.exec(ttmpL[i])||RegExp.$1!=ttmpM)continue;ttmpN=RegExp.$2;this.a_states=ttmpN.split('_');break}if(ttmpB['beforeInit']){eval('var ttmpO='+ttmpB['beforeInit']+'(this);');if(!ttmpO)return}for(var i=0;i<this.a_children.length;i++){this.a_children[i].ttmpP=ttmpQ;document.write(this.a_children[i].ttmpP())}if(ttmpB['afterInit'])eval(ttmpB['afterInit']+'(this);')}function ttmpJ(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<2)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 ttmpJ(this,i-3)}function ttmpR(ttmpS,ttmpT){if(Boolean(this.n_state&8)!=Boolean(ttmpS))return;var ttmpU=(this.a_config[2]?this.a_config[2][ttmpS?'hc':'ho']:null);ttmpU=(ttmpU?ttmpU:this.o_root.a_tpl[ttmpS?'onItemClose':'onItemOpen']);if(ttmpU){eval('var ttmpO='+ttmpU+'(this);');if(!ttmpO)return}this.n_state^=8;this.o_root.ttmpI=true;this.state_lookup();this.ttmpG();this.save();if(B_DOM){var ttmpV=ttmpW('c'+this.o_root.n_id+'_'+this.n_id);if(!ttmpV.innerHTML)ttmpV.innerHTML=this.ttmpX();ttmpV.style.display=(ttmpS?'none':'block')}else if(!ttmpT)window.location=window.location}function ttmpY(ttmpZ){var ttmpU=(this.a_config[2]?this.a_config[2][ttmpZ?'hd':'hs']:null);ttmpU=(ttmpU?ttmpU:this.o_root.a_tpl[ttmpZ?'onItemDeselect':'onItemSelect']);if(ttmpU){eval('var ttmpO='+ttmpU+'(this);');if(!ttmpO)return}if(ttmpZ){this.n_state&=~4}else{var ttmpa=this.o_root.o_selected;this.o_root.o_selected=this;if(ttmpa)ttmpa.select(true);this.n_state|=4}this.state_lookup();this.ttmpG();return Boolean(this.a_config[1])}function ttmpb(){var ttmpU=(this.a_config[2]?this.a_config[2]['hv']:null);ttmpU=(ttmpU?ttmpU:this.o_root.a_tpl['onItemMover']);if(ttmpU){eval('var ttmpO='+ttmpU+'(this);');if(!ttmpO)return}this.n_state|=64;this.state_lookup()}function ttmpc(){var ttmpU=(this.a_config[2]?this.a_config[2]['hu']:null);ttmpU=(ttmpU?ttmpU:this.o_root.a_tpl['onItemMout']);if(ttmpU){eval('var ttmpO='+ttmpU+'(this);');if(!ttmpO)return}this.n_state&=~64;this.state_lookup()}function ttmpd(ttmpe){window.setTimeout("window.status=unescape('"+(ttmpe?'':(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 ttmpQ(){var commentDeb="";var commentFin="";if(this.n_id==0){commentDeb="<!--";commentFin = "-->";}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=ttmpf;this.mover=ttmpb;this.mout=ttmpc;this.select=ttmpY;this.ttmpG=ttmpd;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].ttmpP=ttmpQ;this.a_children[this.a_children.length]=a_index[n_id]}}this.open=ttmpR;this.save=ttmpg;this.load=ttmph;this.ttmpX=ttmpi}else{this.open=function(){alert("Only nodes can be opened. id="+this.n_id)};this.load=function(){return}}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 ttmpj=(this.o_root.a_tpl['style_icons']?' class="'+this.o_root.a_tpl['style_icons']+'"':''),ttmpk=[],ttmpl=this.o_parent,ttmpm=this.a_config[2];for(var i=this.n_depth;i>1;i--){/*ttmpk[i]='<img src="'+this.o_root.a_tpl[ttmpl.n_state&1?'icon_e':'icon_l']+'"'+ttmpj+' border="0">';ttmpl=ttmpl.o_parent*/}/*alert('test');*/this.load();var ttmpn=this.state_lookup(true);return commentDeb + '<table cellpadding="0" cellspacing="0" border="0"><tr><td nowrap><a href="'+this.a_config[1]+'" '+(ttmpn[2]?' class="'+ttmpn[2]+'"':'')+' id="t'+this.o_root.n_id+'_'+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+')" target="'+(ttmpm&&ttmpm['tw']?ttmpm['tw']:this.o_root.a_tpl['target'])+'" title="'+(ttmpm&&ttmpm['tt']?ttmpm['tt']:'')+'" onclick="TREES['+this.o_root.n_id+'].'+(this.a_children?'toggle(':'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>' + commentFin + (this.a_children?'<div id="c'+this.o_root.n_id+'_'+this.n_id+'" style="display:'+(this.n_state&8?'block">'+this.ttmpX():'none">')+'</div>':'')}function ttmpi(){var ttmpo=[];for(var i=0;i<this.a_children.length;i++)ttmpo[i]=this.a_children[i].ttmpP();return ttmpo.join('')}function ttmpg(){var ttmpp=Math.floor(this.n_node_id/31);this.o_root.a_states[ttmpp]=(this.n_state&8?this.o_root.a_states[ttmpp]|(1<<(this.n_node_id%31)):this.o_root.a_states[ttmpp]&~(1<<(this.n_node_id%31)));document.cookie='tree_'+this.o_root.n_id+'_state='+this.o_root.a_states.join('_')+';path=/';}function ttmph(){var ttmpU=(ttmpU?ttmpU:this.o_root.a_tpl['onItemLoad']);if(ttmpU){eval('var ttmpO='+ttmpU+'(this);');if(!ttmpO)return}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 ttmpq=this.o_root.a_children;for(var i=0;i<ttmpq.length;i++){ttmpq[i].n_state|=8;ttmpq[i].save()}return}var ttmpp=Math.floor(this.n_node_id/31);if(Boolean(this.o_root.a_states[ttmpp]&(1<<(this.n_node_id%31))))this.n_state|=8;else this.n_state&=~8}function ttmpf(ttmpr){var ttmps=this.n_state&~3;var ttmpt=this.n_state&~68|2;var ttmpu=this.a_config[2]?this.a_config[2]['i'+(ttmps&~48)]:0;if(!ttmpu)ttmpu=this.o_root.a_tpl['icon_'+ttmps];if(!ttmpu)ttmpu=this.o_root.a_tpl['icon_'+(ttmps&~64)];var ttmpv=this.o_root.a_tpl['icon_'+ttmpt];var ttmpw=this.a_config[2]?this.a_config[2]['s'+(ttmps&~48)]:0;if(!ttmpw)ttmpw=this.o_root.a_tpl['style_'+ttmps];if(!ttmpw)ttmpw=this.o_root.a_tpl['style_'+(ttmps&~64)];if(ttmpr)return[ttmpu,ttmpv,ttmpw];var ttmpx=document.images['j'+this.o_root.n_id+'_'+this.n_id];if(ttmpx)ttmpx.src=ttmpv;ttmpx=document.images['i'+this.o_root.n_id+'_'+this.n_id];if(ttmpx)ttmpx.src=ttmpu;ttmpx=ttmpW('t'+this.o_root.n_id+'_'+this.n_id);if(ttmpx)ttmpx.className=ttmpw}var TREES=[],B_DOM;ttmpW=document.all?function(ttmpy){return document.all[ttmpy]}:(document.getElementById?function(ttmpy){return document.getElementById(ttmpy)}:function(ttmpy){return null});

	//##############################################################################
	//# onItemOpenHandler (o_item)
	//# gere l'evenement onItemOpen pour fermer tous les noeuds ouverts 
	//# excepté le noeud courant
	//##
	
	function onItemOpenHandler (o_item) {
  	  // get current block
  	  var a_curblock = o_item.o_parent.a_children;

      // close all nodes except current
  	  for (var i = 0; i < a_curblock.length; i++) {
        if ( a_curblock[i].n_state & 16 && a_curblock[i] != o_item ) {
	        a_curblock[i].open(true);
	      }
  	  }
  	  
      // proceed to default handler
  	  return true;
	}
    	
	//##############################################################################
	//# onItemCloseHandler (o_item)
	//# gere l'evenement onItemClose pour fermer tous les noeuds fils ouverts 
	//# 
	//##
	
	function onItemCloseHandler (o_item) {
  	  // get son block
  	  var a_sonBlock = o_item.a_children;

  	  // close all son nodes
      for (var i = 0; i < a_sonBlock.length; i++) {
        if ( a_sonBlock[i].n_state == 24 || a_sonBlock[i].n_state == 25) {
          a_sonBlock[i].open(true);
	      }
  	  }
  	  
      // proceed to default handler
  	  return true;
	}

	//##############################################################################
	//# onItemSelectHandler (o_item)
	//# gere l'evenement onItemClose pour fermer tous les noeuds fils ouverts 
	//# 
	//##
	
	function onItemSelectHandler (o_item) {
 	  // get current block
 	  var a_curBlock = o_item.o_parent.a_children;
    var o_curTree = o_item.o_root;

    // close all current level nodes of current tree if current item is leaf
    if ( o_item.n_state != 16 && o_item.n_state != 32 && o_item.n_state != 24 ) {

      for (var i = 0; i < a_curBlock.length; i++) {
        if ( a_curBlock[i].n_state == 24 || a_curBlock[i].n_state == 25) {
          a_curBlock[i].open(true);
        }
	    }
      
    }
  	  
    // close all nodes of other trees if current item is leaf
    if ( o_item.n_state != 16 || o_item.n_state != 32 ) {

      for (var i=0; i<TREES.length; i++ ) {
        a_curBlock = TREES[i].a_index;
        for (var j=0; j<a_curBlock.length; j++) {
          if ( (a_curBlock[j].n_state == 24 || a_curBlock[j].n_state == 25) && TREES[i] != o_curTree ) {
            a_curBlock[j].open(true);
          }
        }      
      }
      
    }

    // proceed to default handler
	  return true;
	}

    	
	//##############################################################################
	//# wrapStyle(sbTxt, service, niv)
	//# genere les parametres definissant les styles de l'item
	//##
	
	function wrapStyle(sbTxt, serv, niv) {
	  var mOut = "";
      var mOver = "";
      var servStr = "";

      if ( serv ) {
		servStr = "service"
	  }

	  mOut = "mout" + niv + servStr;
      mOver = "mover" + niv + servStr;

      return {'sb':''+sbTxt+'','s0':''+mOut+'','s4':''+mOut+'','s8':''+mOver+'','s12':''+mOut+'','s64':''+mOver+'','s68':''+mOver+'','s72':''+mOver+'','s76':''+mOver+''};
    }