function Menu(label,divTop,divLeft){
	this.label=label;
	this.divTop=divTop;
	this.divLeft=divLeft;
	this.node=new Array();
	
	this.COLOR=[
		null,
		'#cdd242',
		'#980031',
		'#f7c761',
		'#95d1b5'
	];
	
	this.REP=[
		'bleu_service',
		'jaune_particuliers',
		'rouge_entreprises',
		'orange_associations',
		'vert_collectivite'
	];
	
	
	this.current=null;
	this.selected=null;
	
	
	this.show=function(){
		this.showTop();
		this.showLeft();
	}
	
	this.showTop=function(){
		var content='<table border="0" cellspacing="0" cellpadding="0" class="mainMenu"></tr>';
		
		for(var i in this.node){
			if(i>4) break;
			var node=this.node[i];
			node.rep=this.REP[i];
			content+='<td class="menu'+i+'" valign="top">';
			if(this.isActive(node)) this.selected=node;
			if(i==0) {
				content+='<table border="0"><tr><td valign="top"><img src="/assets/pref95/img/arrow_topmenu_'+i+'.gif"/></td><td><a href="'+this.getUrl(node)+'">'+node.name+'</a></td></tr></table>';
			} else {
				content+='<table border="0" cellspacing="0" cellpadding="0" class="insideMenu">'
				+'<tr><td colspan="2" nowrap="true">'
				+'<table border="0"><tr><td><img src="/assets/pref95/img/arrow_topmenu_'+i+'.gif"/></td>'
				+'<td><a href="'+this.getUrl(node)+'" onmouseover="'+this.label+'.changeColor('+i+',true)" '
				+'onmouseout="'+this.label+'.changeColor('+i+',false)">'+node.name+'</a>'
				+'</td></tr></table>'
				+'</td></tr>'
				+'<tr><td class="image" id="image'+i+'" style="background-color:'+this.getColor(i)+'"><img src="/assets/pref95/img/img_topmenu_'+i+'.gif"/></td><td class="empty"><br/></td></tr>'
				+'</table>'
			}
			content+='</td>';
		}
		content+'</tr></table>';
	
		this.divTop.innerHTML=content;
	}
	
	this.showLeft=function(){
	
		if(this.selected==null && this.node[0]!=null) this.selected=this.node[0];
		var node=this.selected;
		
		var content='<p class="title">'+node.comment+'</p>';
		
		for(var i in node.child){
			var child=node.child[i];
			content+='<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr class="topic">'
			+'<td classs="topic" valign="top" style="padding:0px;"><img src="/assets/pref95/img/'+node.rep+'/arrow_leftmenu.gif"/></td>'
			+'<td classs="topic" width="100%"><a href="'+this.getUrl(child)+'">'+child.name+'</a></td>'
			+'</tr></table>'
			+this.showContent(child);
		}
		content+='<table width="100%" cellspacing="0" cellpadding="0"><tr><td class="topic" style="height:3px;"></td></tr></table>';
		
		
		this.divLeft.innerHTML=content;
	}
	
	this.showContent=function(node){
		var content='';
		if(this.isActive(node) && node.child.length>0){
			content='<p class="content" style="height:5px"><br/></p>';
			for(var i in node.child){
				var child=node.child[i];
				var bold=(this.isActive(child))?'style="font-weight:bold;"':'';
				content+='<p class="content">- <a href="'+this.getUrl(child)+'" '+bold+'>'+child.name+'</a></p>';
			}
			content+='<p class="content" style="height:5px"><br/></p>';
		}
		if(content=='') content+='<p class="comment">'+node.comment+'</p>';
		return content;
	}
	
	
	this.getUrl=function(node){
		var content='/heading/heading'+node.id+'.html';
		return content;
	}
	
	this.isActive=function(node){
		if(node.id==this.current) return true;
		for(var i in node.child){
			if(this.isActive(node.child[i])) return true;
		}
		return false;
	}
	
	this.changeColor=function(pos,fill){
		obj=document.getElementById('image'+pos);
		obj.style.background=(fill)?this.COLOR[pos]:this.getColor(pos);
	}
	
	this.getColor=function(pos){
		return (this.isActive(this.node[pos]))?this.COLOR[pos]:'';
	}
	
}