function ecrireMenu ()
{
	for (i=0 ; i < layersMenus.length ; i++)
	{
		var tabTemp = layersMenus[i];
		
		// Pour Internet Explorer et Netscape 6.x (PC et Mac)
		if (IeNs6) document.write ('<div id="' + tabTemp[0] + '" style="position:absolute; width:' + tabTemp[1] + 'px; height:' + tabTemp[2] + 'px; z-index:' + tabTemp[3] + '; left:' + tabTemp[4] + 'px; top:' + tabTemp[5] + 'px; visibility:' + tabTemp[6] + ';" onMouseOver="' + tabTemp[7] + '" onMouseOut="' + tabTemp[8] + '">');
		// Pour Netscape 4.x
		else document.write ('<layer name="' + tabTemp[0] + '" width="' + tabTemp[1] + '" height="' + tabTemp[2] + '" z-index="' + tabTemp[3] + '" left="' + tabTemp[4] + '" top="' + tabTemp[5] + '" visibility="' + tabTemp[6] + '" onMouseOver="' + tabTemp[7] + '" onMouseOut="' + tabTemp[8] + '">');
		
		for (j=0 ; j < eval ("menu" + i + ".length") ; j++)
		{
			var tabTemp2 = eval ("menu" + i + "[" + j + "]");
			var selectionne = "";
			
			var tabTemp3 = sectionChoisi.split(";");
			// Boucle qui détermine si le bouton doit être affiché ou non à l'état off
			for (k=0 ; k < tabTemp3.length ; k++)
			{
				if (tabTemp3[k] == tabTemp2[0]) var selectionne = true;
			}
			ecrireBouton (tabTemp2[0],tabTemp2[1],tabTemp2[2],tabTemp2[3],tabTemp2[4],tabTemp2[5],tabTemp2[6],tabTemp2[7],selectionne);
		}
		// Pour Internet Explorer et Netscape 6.x (PC et Mac)
		if (IeNs6) document.write ('</div>');
		// Pour Netscape 4.x (PC et Mac)
		else document.write ('</layer>');
	}	
}

function ecrireBouton (nom, texte, lien, largeur, hauteur, onMouseOver, onMouseOut, sousMenu, selectionne)
{
	document.write ('<table width="' + largeur + '" height="' + hauteur + '" border="0" cellspacing="0" cellpadding="0">');
	if (sousMenu == true)
	{
		document.write ('<tr> ');
		document.write ('<td width="1" height="1" bgcolor="' + coulBrd + '"><img src="' + srcSpacer + '" width="1" height="1"></td>');
		document.write ('<td width="' + (largeur - 2) + '" height="1" bgcolor="' + coulBrd + '"><img src="' + srcSpacer + '" width="' + (largeur - 2) +' " height="1"></td>');
		document.write ('<td width="1" height="1" bgcolor="' + coulBrd + '"><img src="' + srcSpacer + '" width="1" height="1"></td>');
		document.write ('</tr>');
	}
	document.write ('<tr>');
	document.write ('<td width="1" height="' + (hauteur - 1) + '" bgcolor="' + coulBrd + '"><img src="' + srcSpacer + '" width="1" height="' + (hauteur - 1) + '"></td>');
	// Pour Internet Explorer et Netscape 6.x (PC et Mac)
	if (IeNs6)
	{
		document.write ('<td width="' + (largeur - 2) + '" height="' + (hauteur - 1) + '" align="left" class="' + styleTxtIEN6 + '">');
		if (selectionne != true) document.write ('<div id="' + nom + '" style="width:' + (largeur - 2) + '; height:' + (hauteur - 1) + '; background-color: ' + coulUp + '; layer-background-color: ' + coulUp + '; padding-Top:1px" onmouseover="this.style.backgroundColor=' + "'" + coulRoll + "'" + ';this.style.cursor=' + "'" + 'hand' + "'" + ';' + onMouseOver + '" onmouseout="this.style.backgroundColor=' + "'" + coulUp + "'" + ';this.style.cursor=' + "'" + 'default' + "'" + ';' + onMouseOut + '" onclick="javascript:self.location.href=' + "'" + lien + "'" + '">&nbsp;&nbsp;' + texte + '</div></td>');
		else document.write ('<div id="' + nom + '" style="width:' + (largeur - 2) + '; height:' + (hauteur - 1) + '; background-color: ' + coulRoll + '; layer-background-color: ' + coulRoll + '; padding-Top:1px; cursor:default" onmouseover="' + onMouseOver + '" onmouseout="' + onMouseOut + '">&nbsp;&nbsp;' + texte + '</div></td>');
	}
	// Pour Netscape 4.x (PC et Mac)	
	else
	{
		document.write ('<td width="' + (largeur - 2) + '" height="' + (hauteur - 1) + '" align="left" class="' + styleTxtNS4 + '">');		
		if (selectionne != true) document.write ('<ilayer><layer name="' + nom + '" bgcolor="' + coulUp + '" width="' + (largeur - 2) + '" height="' + (hauteur - 1) + ' " onMouseOver="bgColor=' + "'" + coulRoll + "'" + ';' + onMouseOver + '" onMouseOut="bgColor=' + "'" + coulUp + "'" + ';' + onMouseOut + '"><a href="' + lien + '" class=' + styleTxtNS4 + '>&nbsp;&nbsp;' + texte + '</a></layer></ilayer></td>');
		else document.write ('<ilayer><layer name="' + nom + '" bgcolor="' + coulRoll + '" width="' + (largeur - 2) + '" height="' + (hauteur - 1) + ' " onMouseOver="' + onMouseOver + '" onMouseOut="' + onMouseOut + '">&nbsp;&nbsp;' + texte + '</layer></ilayer></td>');
	}	
	document.write ('<td width="1" height="' + (hauteur - 1) + '" bgcolor="' + coulBrd + '"><img src="' + srcSpacer + '" width="1" height="' + (hauteur - 1) + '"></td>');
	document.write ('</tr>');
	document.write ('<tr> ');
	document.write ('<td width="1" height="1" bgcolor="' + coulBrd + '"><img src="' + srcSpacer + '" width="1" height="1"></td>');
	document.write ('<td width="' + (largeur - 2) + '" height="1" bgcolor="' + coulBrd + '"><img src="' + srcSpacer + '" width="' + (largeur - 2) +' " height="1"></td>');
	document.write ('<td width="1" height="1" bgcolor="' + coulBrd + '"><img src="' + srcSpacer + '" width="1" height="1"></td>');
	document.write ('</tr>');
	document.write ('</table>');	
}