function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}



function unMenu(_declancheur, _idImg, _imgRep, _imgNormal, _left, _top) {

	this.idImg = _idImg;
	this.imgRep = _imgRep;
	this.imgNormal = _imgNormal;
	this.declancheur = _declancheur;
	this.left = _left;
	this.top = _top;
}

var tabMenus = new Array();

tabMenus['menu-produits'] = new unMenu('menu-produits', 'img-produits', '/images/produits_over.gif', '/images/produits.gif', 57, 48);
tabMenus['menu-detaillants'] = new unMenu('menu-detaillants', 'img-detaillants', '/images/detaillants_over.gif', '/images/detaillants.gif', 229, 48);
tabMenus['menu-achat'] = new unMenu('menu-achat', 'img-achat', '/images/achat_over.gif', '/images/achat.gif', 432, 48);
tabMenus['menu-activites'] = new unMenu('menu-activites', 'img-activites', '/images/activites_over.gif', '/images/activites.gif', 644, 48);
tabMenus['menu-recettes'] = new unMenu('menu-recettes', 'img-recettes', '/images/recettes_over.gif', '/images/recettes.gif', 811, 48);


function changerImage(_id, _src) {
	var cible = document.getElementById(_id);
	
	if(cible) { 
		cible.src = _src;	
	}
}

function clearAllMenus() {
	
	changerImage(tabMenus['menu-produits'].idImg, tabMenus['menu-produits'].imgNormal);
	changerImage(tabMenus['menu-detaillants'].idImg, tabMenus['menu-detaillants'].imgNormal);
	changerImage(tabMenus['menu-achat'].idImg, tabMenus['menu-achat'].imgNormal);
	changerImage(tabMenus['menu-activites'].idImg, tabMenus['menu-activites'].imgNormal);
	changerImage(tabMenus['menu-recettes'].idImg, tabMenus['menu-recettes'].imgNormal);

		
}


		
function afficherMenuOver(haut, etat) {
	var menuHaut = document.getElementById(haut);
	if(etat == 1)
		menuHaut.style.display = "block";
	else
		menuHaut.style.display = "none";

}


