function boutons(page) {
    var test = new String();
    test = page;
    var couleurPageEnCours = new String();
    var couleurPage = new String();
    var couleurOn = new String();
    var liens_page = "";
    var couleurPageEnCours = "#FFBB21";
    var couleurPage = "#FFCC32";
    var couleurOnEnCours = "#EEBB21";
    var couleurOn = "#DDAA10";
    var bouton = new Array();
    var link = new Array();
    var titre = new Array();
    bouton[0] = "bouton_accueil";
    link[0] = "index.html";
    titre[0] = "Accueil";
    bouton[1] = "bouton_theatre";
    link[1] = "html/theatre.html";
    titre[1] = "Théâtre";
    bouton[2] = "bouton_musique";
    link[2] = "html/musique.html";
    titre[2] = "Musique";
    bouton[3] = "bouton_spectacles";
    link[3] = "html/spectacles.html";
    titre[3] = "Aventures";
    bouton[4] = "bouton_photos";
    link[4] = "html/photos.html";
    titre[4] = "Photos";
    bouton[5] = "bouton_liens";
    link[5] = "html/liens.html";
    titre[5] = "Liens";
    if (test == bouton[0]) {
	chemin = "";
    }
    else {
	chemin = "../";
    }
    for (i=0;i<6;++i) {
	if (bouton[i] == test) {
	    liens_page+="<td height='30'>";
	    liens_page+="<table width='130'  height='43'  cellspacing='1' cellpadding='0' background='" + chemin + "images/01_fond_boutons_en_cours.gif'>";
	    liens_page+="<tr><td class='centre'>";
	    liens_page+="<div id=" + bouton[i] + ">";
	    liens_page+="<a href=" + chemin + link[i] + ">" + titre[i] + "</a>";
	    liens_page+="</div></td></tr></table></td>";
	}
	else {
	    liens_page+="<td height='30'>";
	    liens_page+="<table width='130' height='43' cellspacing='1' cellpadding='0' background='" + chemin + "images/01_fond_boutons.gif'>";
	    liens_page+="<tr><td class='centre'>";
	    liens_page+="<div id=" + bouton[i] + ">";
	    liens_page+="<a href=" + chemin + link[i] + ">" + titre[i] + "</a>";
      liens_page+="</div></td></tr></table></td>";
	}
    }
    return liens_page;
}
function change_color(button,color) {
    var mon_bouton = new String();
    my_button = button;
    var my_color = new String();
    my_color = color;
    document.getElementById(my_button).style.backgroundColor= my_color ;
}

function former_entete(ma_page) {
    var texte_ecrit = new String();
    texte_ecrit = boutons(ma_page);
   document.write("<table width='100%' cellpadding='0' cellspacing='0' bgcolor='#000000'><tr>"); 
    document.write("<td width='110' height='110' rowspan='2'><a href='" + chemin + "index.html'><img src='" + chemin + "images/01_logo_banniere.gif' border='0'></a></td>"); 
    document.write("<td height='89'>"); 
    document.write("<table width='100%' cellpadding='0' cellspacing='0' align='center'>"); 
    document.write("<tr><td width='700' height='89' valign='top'><img src='" + chemin + "images/00_titre.gif' alt='La compagnie des fous de Bassan'>");
    document.write("</td><td>&nbsp;</td></tr></table>");
    document.write("<tr><td>"); 
    document.write("<table width='100%' cellpadding='0' cellspacing='0' bgcolor='#000000' border='0' align='center'>\n");
    document.write("<tr>\n");
    document.write(texte_ecrit);
    document.write("</tr>");
    document.write("</table>");
    document.write("</td></tr></table>"); 
}


function clore(ma_date) {
//document.write("</td></tr>\n");
document.write("<table width='100%' cellpadding='0' cellspacing='0' bgcolor='#000000'><tr><td colspan='2' bgcolor='#000000'><img src='" + chemin + "images/00_pixel_gris.gif' width='100%' height='2'></td></tr>");
document.write("<tr><td colspan='2' class='petit' bgcolor='#000000'>Mise à jour : " + ma_date);
document.write("<br>Contact : <a href='mailto:michel@michelz.com'>michel@michelz.com</a></td></tr>");
document.write("</table>");
}
