function calendrier(date)
         {
         //si pas de parametre  passes,  utilise la date courante.
         if(date == null)
            date = new Date();
         
         day = date.getDate();
         month = date.getMonth();
         year = date.getFullYear();
         
         months = new Array('Janvier',
                            'Février',
                            'Mars',
                            'Avril',
                            'Mai',
                            'Juin',
                            'Juillet',
                            'Aout',
                            'Septembre',
                            'Octobre',
                            'Novembre',
                            'Decembre');

       jours = new Array('DIM', 'LUN', 'MAR', 'MER', 'JEU','VEN','SAM');   
         
         this_month = new Date(year, month, 1);
         next_month = new Date(year, month + 1, 1);
         
         //Debut et fin du mois ?.         
         first_week_day = this_month.getDay();
         days_in_this_month = Math.floor((next_month.getTime() - this_month.getTime()) / (1000 * 60 * 60 * 24));
         
// Première couleur de fond - caractère  ANCIEN
// calendar_html = '<table style="background-color:336799; color:ffffff; font-family: Verdana, Geneva, Arial, helvetica, sans-serif; font-size: 12px"  width="100%" >';

// Première couleur de fond - caractère
         calendar_html = '<table  border="0" cellspacing="1"  cellpadding="0" height="200"    style="background-color:000000; color:ffffff; font-family: Verdana, Geneva, Arial, helvetica, sans-serif;"  width="100%" >';
         
  //calendar_html = '<table style="background-color:166699; color:ffffff; font-family: Verdana, Geneva, Arial, helvetica, sans-serif;">';


// ANCIENNE Couleur du titre du mois, fond - caractères   // Ancienne 003399
//         calendar_html += '<tr><td colspan="7" align="center" style="background-color:336799; color:FFFFFF; font-family: Verdana, Geneva, Arial, helvetica, sans-serif;">' +  '<B>' +
                          months[month] + ' ' + year + '</B>' + '</td></tr>';



//Couleur du titre du mois, fond - caractères   // Ancienne 003399
         calendar_html += '<tr><td colspan="7" align="center" style="background-color:336799; color:FFFFFF; font-family: Verdana, Geneva, Arial, helvetica, sans-serif; font-size: 14px; font-weight: bold;">   <A href="PHP/Membres/Affcalendrier.php"  TARGET=\"_BLANK\">'   +  ' <FONT SIZE="2" COLOR=white> <B>' +
                  months[month] + ' ' + year +  '</B> </FONT>' + '  </A></td></tr>';

//calendar_html +='<tr>';  //Ajout

//Affichage des jours
    calendar_html += '<tr>';
         //Remplir la premiere semaine du mois avec le nombre d'espaces ou blancs requis.       
         for(i = 0; i < 7; i++)
            {
            calendar_html += '<td style="background-color:000000; color:FFFFFF; font-family: Verdana, Geneva, Arial, helvetica, sans-serif;  font-size: 10px; font-weight: bold;"> <A href="PHP/Membres/Affcalendrier.php"  TARGET=\"_BLANK\">'  +    '<FONT color="#FFFFFF" >' + jours[i] +   '</FONT>' +' </A></td>';  

//ANCIENNE
   // calendar_html += '<td style="background-color:FFFFFF; color:000000;"> <A href=\"../index.html\">'   + jours[i] + ' </A></td>';  

            }
 // calendar_html += '<tr>';  // Fin Ajout
//  Fin Affichage jours


         calendar_html += '<tr>';
          
         //Remplir la premiere semaine du mois avec le nombre d'espaces ou blancs requis.       
         for(week_day = 0; week_day < first_week_day; week_day++)
            {
            calendar_html += '<td style="background-color:FFFFFF; color:000000; font-family: Verdana, Geneva, Arial, helvetica, sans-serif; font-size: 12px;"> <A href="PHP/Membres/Affcalendrier.php"  TARGET=\"_BLANK\">  &nbsp; &nbsp; </A></td>';  

// ancienne 2007-11-12       <A href="acces_calendrier.html">

 
            }
          
         week_day = first_week_day;
         for(day_counter = 1; day_counter <= days_in_this_month; day_counter++)
            {
            week_day %= 7;
            
            if(week_day == 0)
               calendar_html += '</tr><tr>';
            
            //Si journee courante couleur differente ou fond different. FF9933
            if(day == day_counter)    //EFF4FD ancienne couleur
               calendar_html += '<td align="center" style="background-color:808000; color:000000; font-family: Verdana, Geneva, Arial, helvetica, sans-serif; font-size: 12px;"> <A href="PHP/Membres/Affcalendrier.php"   TARGET="_BLANK">  <b>'  +  '<FONT COLOR=white>' + day_counter +  '</FONT>' + ' </A> </b></td>';
            else

  //ANCIENNE  
 //http://www.symposiumdepeinture.com/PHP/Membres/Affcalendrier.php         
// calendar_html += '<td align="center" style="background-color:336799; color:FFFFFF; font-family: Verdana, Geneva, Arial, helvetica, sans-serif; font-size: 12px;">    <A href=\"../index.html\"> &nbsp;' + day_counter + '&nbsp;  </A> </td>';
            


// ancienne 2007-11-12       <A href="acces_calendrier.html">


calendar_html += '<td align="center" style="background-color:FFFFFF; color:000000; font-family: Verdana, Geneva, Arial, helvetica, sans-serif; font-size: 12px;"> <A href="PHP/Membres/Affcalendrier.php"  TARGET=\"_BLANK\"> &nbsp;'   + '<FONT COLOR=black>' + day_counter + '</FONT>' + '&nbsp;  </A> </td>';

            week_day++;
            }
            
         calendar_html += '</tr>';
         calendar_html += '</table>';
         
         //Afficher le  calendrier.     
         document.write(calendar_html);                  
         }















































































