// Creation du menu pour la partie saison

 // Variable globale de la liste de lien
 var monthlist = ["janvier.htm", "fevrier.htm", "mars.htm", "avril.htm", "mai.htm", "juin.htm", "septembre.htm", "octobre.htm", "novembre.htm", "decembre.htm"];
 

 
 // Fonction retournant le mois en cours (entier entre 0 et 11)
 function Month(){
   var date = new Date();
   var month = date.getMonth();
   return month;
 }


// Fonction retournant le liens correspondant au mois en cours
 function CurrentMonth(){
	// Recuperation du moi courant
	var month = Month();
	// si le lien du mois courant - juillet et aout retournent "septembre.htm"
	//Test de la correspondance des tables
	if(month<6){
		return monthlist[month];
	}else{
		if(month == 6 || month == 7){
			return monthlist[6];
		}
		else{
			var n = month - 2;
			// sinon on retourne l'adresse du mois correspondant
			return monthlist[n];
		}
	}
 }
 
 // Fonction permettant la redirection
 function ChangeLink( baseUrl){
	//récupération du mois
	var month = CurrentMonth();
	//concaténation du path et du lien
	var url = baseUrl+month;
	//redirection
	document.location.href = url ;
 }
