function calendrier() {
	var Aujourdhui = new Date();
	var AnneeDepart = Aujourdhui.getFullYear();
 	var variable = new Array(); 
			
	pos_param = document.location.href.indexOf("?",0);
 	var lien = pos_param>0?document.location.href.substr(0,pos_param):location.href;

 	if (pos_param > 0) {
		parametre = unescape(document.location.href.substr(pos_param+1)).replace(/\+/g," ").split("&");
 		for (nbp in parametre) variable[parametre[nbp].split("=")[0]] = parametre[nbp].split("=")[1];
 	}
 		
 	//AnneeDepart remplacé par Aujourdhui.getYear//
 	var annee = typeof(variable["annee"])!="undefined"?(variable["annee"]*1):(AnneeDepart);
 	var mois = typeof(variable["mois"])!="undefined"?(variable["mois"]*1):Aujourdhui.getMonth();
 	var jour = typeof(variable["jour"])!="undefined"?(variable["jour"]*1):Aujourdhui.getDate();
 	var nom_jour = new Array("Dim.","Lun.","Mar.","Mer.","Jeu.","Ven.","Sam.");
 	var nom_mois = new Array("Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre");
 	var depart = new Date(Date.UTC(annee,mois,1));
 	var ladate = new Date(annee,mois,jour);
 	var titre = nom_jour[ladate.getDay()]+" "+jour+" "+nom_mois[mois]+" " + annee;
	var html = typeof(message[annee+'-'+((mois < 9) ? '0' : '')+(mois+1)+'-'+((jour < 10) ? '0' : '')+jour])=="undefined"?"&nbsp;":message[annee+'-'+((mois < 9) ? '0' : '')+(mois+1)+'-'+((jour < 10) ? '0' : '')+jour]; 		
				
 	//Tableau conteneur déclaré comme variable de texte//
 	var tableaux = "<table class='Tcalendrier' id='Tcalendrier' border='0' cellspacing='0' cellpadding='0'>" ;
	tableaux += "<tr><td align='center' valign='middle'>";
	//Tableau contenu et Ligne de la date-titre sélectionnée//
 	tableaux += "<table border='1' bordercolor='black' cellspacing='0' cellpadding='1'>";
	tableaux += "<tr class='smalltexte'><td colspan=8 align=center>" ;
	tableaux += "<b>"+titre+"</b>";
	tableaux += "<div align=right><a href='"+lien+"?&d1=2' target='_self' class='an_mois'>(Aujourd´hui)</div>" ;
	tableaux += "</td></tr><tr class='an_mois'>";
 	//Cellules des années//
 	for (i=0;i<7;i++){
 		tableaux += "<td align='center'>" ;
		tableaux += "<a class='an_mois' href='"+lien+"?jour="+jour+"&mois="+mois+"&annee="+(AnneeDepart+i)+"&d1=2' target='_self'>" ;
		tableaux += (AnneeDepart+i)+"</a></td>";
 	}
 	//Cellule contenant le tableau des 12 mois//
 	tableaux += "<td rowspan=9><table border='0' cellspacing='0' cellpadding='1'>"
 	for (i=0;i<12;i++){
 		tableaux += "<tr><td align='center'>" ;
		tableaux += "<a class='an_mois' href='"+lien+"?jour="+jour+"&mois="+i+"&annee="+annee+"&d1=2' target='_self'>" ;
		tableaux += nom_mois[i]+"</a></TD></tr>"+"\n";
 	}
 	tableaux += "</table></td>";
 	//Cellules des noms de jours//
 	tableaux += "</tr><tr class='an_mois'>"
 	for (i=0;i<7;i++){
 		tableaux += "<td align='center' width='10px'>"+nom_jour[i]+"</TD>";
 	}

 	jour_mois =1;
 	while (mois==depart.getMonth()){
 		jour_semaine = depart.getDay();
 		tableaux +="</tr><tr class='smalltexte'>";
 		for (i=0;i<jour_semaine;i++) {
			tableaux +="<td align='center' bgcolor='white'><a>&nbsp;</a></TD>";
		}
 		for (i=jour_semaine;i<7&&mois==depart.getMonth();i++) {
			ddd = typeof(message[annee+'-'+((mois < 9) ? '0' : '')+(mois+1)+'-'+((jour_mois < 10) ? '0' : '')+jour_mois])=="undefined"?"black":"red";
 			tableaux +="<td align='center'>" ;
			tableaux += "<a style='color:"+ddd+";' href='"+lien+"?jour="+jour_mois+"&mois="+mois+"&annee="+annee+"&d1=2' target='_self'>" ;
			tableaux += depart.getDate()+"</a></td>"+"\n";
			jour_mois++; 
 			depart = new Date(depart.getTime() + (24*60*60*1000) );
 		}
	}

	jour_semaine = depart.getDay();
	if (i != "7") {
		for (i=jour_semaine;i<7;i++) {
			tableaux +="</TD><TD ALIGN='center' bgcolor='white'><a>&nbsp;</a>" ;
		}
	}
			
	 //Cellule d'édition des messages//
 	tableaux += "</td></tr><tr class='annonce'><td colspan=7><div class='annonce'>"+html;

 	//Annonce permanente en bas à droite des annonces//
 	tableaux += "<hr/><div align='right'><br/>Calendrier évènementiel RCP</div>";
 	tableaux += "</div></td></tr></table></td></tr></table>";

	document.getElementById("calendrier").innerHTML = tableaux ;
 	//document.write(tableaux);
}
