function modifier (jour)
 {
 window.location.href = "mycalendar.php?form=<?=$form?>&elem=<?=$elem?>&mois=" + document.forms["MyCalendar"].elements['month'].options[document.forms["MyCalendar"].elements['month'].selectedIndex].value + "&jour=" + jour +"&annee=" + document.forms["MyCalendar"].elements['year'].options[document.forms["MyCalendar"].elements['year'].selectedIndex].value
 var test = document.forms["MyCalendar"].elements['month'].options[document.forms["MyCalendar"].elements['month'].selectedIndex].value + "&jour=" + jour +"&annee=" + document.forms["MyCalendar"].elements['year'].options[document.forms["MyCalendar"].elements['year'].selectedIndex].value;
 alert(test);
 }
 <?
 if (!isset($jour))
 $jour = date("j") ;

 if (!isset($mois))
 $mois = date("m") ;

 if (!isset($annee))
 $annee = date("Y") ;

 // nombre de jours par mois
 $nbjmonth[0] = 31 ;
 $nbjmonth[1] = ($annee%4==0?($annee%100==0?($annee%400?29:28):29):28) ;
 $nbjmonth[2] = 31 ;
 $nbjmonth[3] = 30 ;
 $nbjmonth[4] = 31 ;
 $nbjmonth[5] = 30 ;
 $nbjmonth[6] = 31;
 $nbjmonth[7] = 31 ;
 $nbjmonth[8] = 30 ;
 $nbjmonth[9] = 31 ;
 $nbjmonth[10] = 30 ;
 $nbjmonth[11] = 31 ;

 if(!checkdate($mois,$jour,$annee))
 {
 echo "alert('$error01')\n" ;
 $jour = date("j") ;
 $mois = date("m") ;
 $annee = date("Y") ;
 }

 // Calcul du jour julien et du numéro du jour
 $HR = 0;
 $GGG = 1;
 if( $annee < 1582 ) $GGG = 0;
 if( $annee <= 1582 && $mois < 10 ) $GGG = 0;
 if( $annee <= 1582 && $mois == 10 && 1 < 5 ) $GGG = 0;
 $JD = -1 * floor(7 * (floor(($mois + 9) / 12) + $annee) / 4);
 $S = 1;
 if (($mois - 9)<0) $S=-1;
 $A = abs($mois - 9);
 $J1 = floor($mois + $S * floor($A / 7));
 $J1 = -1 * floor((floor($J1 / 100) + 1) * 3 / 4);
 $JD = $JD + floor(275 * $mois / 9) + 1 + ($GGG * $J1);
 $JD = $JD + 1721027 + 2 * $GGG + 367 * $annee - 0.5;



 /*$tmp = ((int)(($mois>2?$annee:$annee-1)/100)) ;
 $jj = (int)((((int)(365.25*($mois>2?$annee:$annee-1))) + ((int)(30.6001*($mois>2?$mois+1:$mois+13))) + $jour + 1720994.5 + ($annee > 1582 && $mois > 10 && $jour > 15?2-$tmp+((int)($tmp/4)):0))) ;
 $jj = (int)(($jj) % 7)*/
 $jj = (($JD+.5)%7) ;
