function RetourAlaNormal(){	
u=5;
A=0;
		document.getElementById('BG_agence').style.backgroundImage = "url("+chemin+"images/spacer.gif)";
		document.getElementById('BG_metier').style.backgroundImage = "url("+chemin+"images/spacer.gif)";
		document.getElementById('BG_thematique').style.backgroundImage = "url("+chemin+"images/spacer.gif)";
		document.getElementById('BG_book').style.backgroundImage = "url("+chemin+"images/spacer.gif)";
		document.getElementById('BG_contact').style.backgroundImage = "url("+chemin+"images/spacer.gif)";
		
		document.getElementById('BG_agence').style.paddingTop="5px";
		document.getElementById('BG_metier').style.paddingTop="5px";
		document.getElementById('BG_thematique').style.paddingTop="5px";
		document.getElementById('BG_book').style.paddingTop="5px";
		document.getElementById('BG_contact').style.paddingTop="5px";
	
		document.getElementById('agence').style.color= "#FFFFFF";
		document.getElementById('metier').style.color= "#FFFFFF";
		document.getElementById('thematique').style.color= "#FFFFFF";
		document.getElementById('book').style.color= "#FFFFFF";
		document.getElementById('contact').style.color= "#FFFFFF";
	
		document.getElementById('IMG_agence').style.display= "none";
		document.getElementById('IMG_metier').style.display= "none";
		document.getElementById('IMG_thematique').style.display= "none";
		document.getElementById('IMG_book').style.display= "none";
		document.getElementById('IMG_contact').style.display= "none";
}

var u=2;
var A=0;
 function AnimMenu(id, Taille){
	idDiv = 'Sous_'+ id;	
					 if(u<Taille){ 
						document.getElementById(idDiv).style.height = u+'px';
						document.getElementById(idDiv).style.filter = 'alpha(opacity=' +A+')';
						document.getElementById(idDiv).style.MozOpacity = A/100;
						document.getElementById(idDiv).style.KhtmlOpacity = A/100;
						document.getElementById(idDiv).style.opacity = A/100;
						u=u*1.+(Taille/10);
						A=A+13;
						
						window.setTimeout("AnimMenu('"+id+"', "+Taille+")",20);
						}
}
var h=2;
var B=0;
function OuvreTab(id, Taille){
					document.getElementById(id).style.display='block';
					document.getElementById('voir').style.display='none';
					 if(h<Taille){
					 	document.getElementById(id).style.height = h+'px';
						document.getElementById(id).style.MozOpacity = B/100;
						document.getElementById(id).style.opacity = B/100;
						B=B+13;
						h=h*1.+(Taille/10);
						
						
						joue= window.setTimeout("OuvreTab('"+id+"', "+Taille+")",20);
						
						}else{
						clearTimeout(joue);
						}
					
						
}
function FermeTab(id, Taille){
					 
					 	document.getElementById(id).style.height = h+'px';
						document.getElementById(id).style.MozOpacity = B/100;
						document.getElementById(id).style.opacity = B/100;
						B=B-13;
						h=h*1.-(Taille/10);
						
						
						joue=window.setTimeout("FermeTab('"+id+"', "+Taille+")",20);
						if(B<10){
						clearTimeout(joue);
						h=2;
						B=0;
						document.getElementById('voir').style.display='block';
						document.getElementById(id).style.display='none';
						}
						
						
}

function VireSousMenu(){
document.getElementById('Sous_agence').style.display='none';
document.getElementById('Sous_metier').style.display='none';
document.getElementById('Sous_thematique').style.display='none';
document.getElementById('Sous_book').style.display='none';
document.getElementById('Sous_contact').style.display='none';
RetourAlaNormal();
}

function ChangeMenu(TD, PosD, TailleMax){
	VireSousMenu();
	AnimMenu(TD, TailleMax);
			
			document.getElementById('BG_' + TD).style.backgroundImage = "url("+chemin+"images/BG_survol.gif)";
			document.getElementById('BG_' + TD).style.paddingTop="3px";
			document.getElementById(TD).style.color= "#c3d56c";
			document.getElementById('IMG_'+TD).style.display= "inline-block";
			var larg = (document.body.clientWidth);
			if (larg<1170){
			var pos = 110;
			}else{
			var pos = (larg-950)/2;
			}
			
			idDiv = 'Sous_'+ TD;
			document.getElementById(idDiv).style.display='block';
			document.getElementById(idDiv).style.left = pos + PosD+'px';				
}