 function AfficherAnneedepart()
   {
 
       if( MoisActuel + 11 > 12) { AnneeNext = AnneeActuel + 1;}
	    
	   //-------------------------------------------------------------------------------------------------------------
   	   var  NombreAnnee= window.document.form1.annee_dep.options.length;
	   //-------------------------------------------------------------------------------------------------------------
	    for(j=0;j<NombreAnnee;j++){
	     window.document.form1.annee_dep.options[0] = null;
	    }
		//------------------------------------------------------------------------------------------------------------
         for( i = AnneeActuel; i <= AnneeNext ; i++ )
		    {
		    window.document.form1.annee_dep.options[window.document.form1.annee_dep.options.length]=new Option(i,i);
		    }
      //--------------------------------------------------------------------------------------------------------------
   }
    function AfficherAnneeRetour()
   {
 
       if( MoisActuel + 11 > 12) { AnneeNext = AnneeActuel + 1;}
	    
	   //-------------------------------------------------------------------------------------------------------------
   	   var  NombreAnnee= window.document.form1.annee_arr.options.length;
	   //-------------------------------------------------------------------------------------------------------------
	    for(j=0;j<NombreAnnee;j++){
	     window.document.form1.annee_arr.options[0] = null;
	    }
		//------------------------------------------------------------------------------------------------------------
         for( i = AnneeActuel; i <= AnneeNext ; i++ )
		    {
		    window.document.form1.annee_arr.options[window.document.form1.annee_arr.options.length]=new Option(i,i);
		    }
      //--------------------------------------------------------------------------------------------------------------
   }
   //------------------------------------------------------------------------------------------------------------------
   function AfficherMoisDepart()
   {
   	  var  MoisDeb  = MoisActuel;
	  var  Val      = MoisActuel   +   11 ;
	  var  MoisFin  = ( Val <= 12 ) ?  Val : 12;	  
	  
	  //---------------------
      if( window.document.form1.annee_dep.options[window.document.form1.annee_dep.selectedIndex].value > AnneeActuel )
	  {
	  MoisDeb = 1;
	  MoisFin  = (11 + MoisActuel) % 12 ;
	  }
	  NombreMois = window.document.form1.mois_dep.options.length;
      //----------------------------
	  
	    for( j=0 ; j< NombreMois ; j++ )
		 {
	      window.document.form1.mois_dep.options[0] = null ;
	     }
		//-------------------------------------------------------------------------------------------------------
         for(j=MoisDeb;j<=MoisFin;j++)
		    {
		     window.document.form1.mois_dep.options[window.document.form1.mois_dep.options.length]=new Option(TabMois[j],j);
		    }
   }
//--------------------------------------**********************----------------------------------------------------------------
function AfficherMoisArrive()
   {
   	  var  MoisDeb  = MoisActuel;
	  var  Val      = MoisActuel   +   11 ;
	  var  MoisFin  = ( Val <= 12 ) ?  Val : 12;	  
      if( window.document.form1.annee_arr.options[window.document.form1.annee_arr.selectedIndex].value > AnneeActuel )
	  {
	  MoisDeb = 1;
	  MoisFin = (11 + MoisActuel) % 12 ;
	  }
      //----------------------------
	  	  NombreMois = window.document.form1.mois_arr.options.length;

	    for( j=0 ; j < NombreMois ; j++ )
		 {
	      window.document.form1.mois_arr.options[0] = null ;
	     }
		//-------------------------------------------------------------------------------------------------------
         for(j=MoisDeb;j<=MoisFin;j++)
		    {
		     window.document.form1.mois_arr.options[window.document.form1.mois_arr.options.length]=new Option(TabMois[j],j);
		    }
   }
   //---------------------------------------------------------------------------------------------------------------------
   function AfficherJoursDepart()
   {
 //--------------------------------------------------------------------------------------------------------------------
 		var AnneeSelect=window.document.form1.annee_dep.options[window.document.form1.annee_dep.selectedIndex].value;
		var MoisSelect=window.document.form1.mois_dep.options[window.document.form1.mois_dep.selectedIndex].value
		var JourMaxDeb=( (MoisSelect > MoisActuel) || (AnneeSelect > AnneeActuel))?1:JourActuel


		 ValeurDepart();
		NombreJour= window.document.form1.j_dep.options.length;
	    for(j=0; j< NombreJour ; j++)
		{
	    window.document.form1.j_dep.options[0] = null;
	    }
//----------------------------------------------------------------------------------------------------------------------
        for(j=JourMaxDeb ;j < JourMax ; j++)
		{
		window.document.form1.j_dep.options[window.document.form1.j_dep.options.length]=new Option(j,j);
		}
	}
//-----------------------------------------------------------------------------------------------------------------------
 function ValeurDepart(){
		  var AnneeSelectionne = window.document.form1.annee_dep.options[window.document.form1.annee_dep.selectedIndex].value;
		  var MoisSelectionne =  window.document.form1.mois_dep.options[window.document.form1.mois_dep.selectedIndex].value;
		  
		  VingtNeuf =((AnneeSelectionne % 4 ==0 && AnneeSelectionne % 100 !=0) || (AnneeSelectionne % 400 ==0) )?true:false;
		  
		  if(MoisSelectionne%2 == 0 &&  MoisSelectionne < 8 ) {JourMax = 31  ;}
		  if(MoisSelectionne%2 == 1 &&  MoisSelectionne < 8 ) {JourMax = 32  ;}
		  if(MoisSelectionne%2 == 0 &&  MoisSelectionne >= 8 ) {JourMax = 32 ;}
		  if(MoisSelectionne%2 == 1 &&  MoisSelectionne > 8 ) {JourMax = 31  ;}

		  if(MoisSelectionne ==   2 &&  VingtNeuf )           {JourMax = 30 ;}
		  if(MoisSelectionne ==   2 &&! VingtNeuf )           {JourMax = 29 ;}
	  
   }
/////////////********************************/////*****************************************************************
 function AfficherJoursRetour()
   {
 //--------------------------------------------------------------------------------------------------------------------
      
		ValeurArrive();
		var AnneeSelect=window.document.form1.annee_arr.options[window.document.form1.annee_arr.selectedIndex].value;
		var MoisSelect=window.document.form1.mois_arr.options[window.document.form1.mois_arr.selectedIndex].value
		var JourMaxDeb=( (MoisSelect > MoisActuel) || (AnneeSelect > AnneeActuel))?1:JourActuel
		NombreJour= window.document.form1.j_arr.options.length;
	    for(j=0; j< NombreJour ; j++)
		{
	    window.document.form1.j_arr.options[0] = null;
	    }
//----------------------------------------------------------------------------------------------------------------------
        for(j=JourMaxDeb ;j < JourMax ; j++)
		{
		window.document.form1.j_arr.options[window.document.form1.j_arr.options.length]=new Option(j,j);
		}
	}
//-----------------------------------------------------------------------------------------------------------------------
 function ValeurArrive(){
		  var AnneeSelectionne = window.document.form1.annee_arr.options[window.document.form1.annee_arr.selectedIndex].value;
		  var MoisSelectionne =  window.document.form1.mois_arr.options[window.document.form1.mois_arr.selectedIndex].value;
		  
		  VingtNeuf =((AnneeSelectionne % 4 ==0 && AnneeSelectionne % 100 !=0) || (AnneeSelectionne % 400 ==0) )?true:false;
		  
		  if(MoisSelectionne%2 == 0 &&  MoisSelectionne < 8 ) {JourMax = 31  ;}
		  if(MoisSelectionne%2 == 1 &&  MoisSelectionne < 8 ) {JourMax = 32  ;}
		  if(MoisSelectionne%2 == 0 &&  MoisSelectionne >= 8 ) {JourMax = 32 ;}
		  if(MoisSelectionne%2 == 1 &&  MoisSelectionne > 8 ) {JourMax = 31  ;}
		  if(MoisSelectionne==2   && VingtNeuf )          {JourMax = 30 ;}
		  if(MoisSelectionne==2   &&!VingtNeuf )          {JourMax = 29 ;}
	  
   }
