<!--

function init_date(ts){

	var s=ts;	
	
	// Initialisation de la date par défaut à aujourd'hui + 15 jours
	DEFAUT_DATE_AVANCE =15;
	// init jour-mois-année
	today = new Date();
	mois_courant = today.getMonth()+1; // mois calendaire
	annee_courante =today.getFullYear(); yyyy_courante=new String(annee_courante);yy_courante=yyyy_courante.substr(2,4);
	today.setDate(today.getDate() + DEFAUT_DATE_AVANCE);
	jour = today.getDate();
	mois = today.getMonth()+1; // mois par défaut correspondant à date_avance
	annee=today.getFullYear();
	yyyy=new String(annee); yy=yyyy.substr(2,4); //pour affichage annee format yy
	
	
	if(s==1){
	//  mettre jour menu déroulant
		for(var i=1;i<=31;i++)
		{	document.write('<option value="'+ i+'" ');
	//		if(i==jour) { document.write(' selected ');	}
			document.write('>'+ i +'</option>');
		
		}
		 
	
	}
	//	

	if(s==2){		
	//mettre mois + année menu déroulant
	
	var moisCodes = new Array("", "01","02","03","04","05","06","07","08","09","10","11","12");
	var moisLib = new Array("","Janv.","F&eacute;v.","Mars","Avril","Mai","Juin","Juillet","Ao&ucirc;t","Sept.","Oct.","Nov.","Déc.");
	
	
	        for(var i=mois_courant;i<=12;i++) // à partir du mois courant, affiche tous les mois de l'année courante
	        {        //alert(mois_courant+' <- courant /  + date_avance -> '+mois);
	                document.write('<option value="'+annee_courante+i+'"');
	                //if(i==mois) { document.write(' selected ');        }
	                document.write('>'+moisLib[i]+'&nbsp;'+yy_courante+'</option>');
	
	
	        }
	
	        if((mois_courant)||(mois)>9) // à partir du mois d'octobre, affiche les m mois de l'année suivante
	        {
	                if(annee_courante == annee){ annee+=1; }
	
	                for(var i=1;i<mois_courant;i++)
	                {
	                document.write('<option value="'+i+'"');
	                if(i==mois) { document.write(' selected ');        }
	                yyyy=new String(annee); yy=yyyy.substr(2,4); //pour affichage annee format yy
	                document.write('>'+moisLib[i]+'&nbsp;'+yy+'</option>');
	                }
	        }
	
	
	
	}
	
	
	// pour passer mm & aaaa séparément
	document.write('<input type="hidden" name="mm" value="'+mois+'" class="text" />');
	document.write('<input type="hidden" name="aaaa" value="'+annee+'" class="text" />');
	//alertA(mma);
	//alert(annee);
	//alert(yyyya);
	
	}
	









//--- Pour lancer recherche moteurs un ttt distinct pour affiliés .COM & .FR
//--- function blabla => affiliés.COM  et  avec ..._FR => affiliés.FR

function MM_jumpMenu(selObj,t,valid)
{
	VILLEDEPART = selObj.options[selObj.selectedIndex].value;
	if (valid=="NON") selObj.selectedIndex=0;
	if (valid=="YES")
	document.location.href="http://$$FORM:ID$$.pa.promovacances.com/dyn_moteurs_region.htm?id=$$FORM:ID$$&t=" + t + "&VILLEDEPART=" + VILLEDEPART + "";
}


function isValidForm() {
	// Cette vérification ne concerne que la date saisie
	day = document.forms["moteur"].jj.value;
	yyyy = document.forms["moteur"].mmaaaa.value;
	document.forms["moteur"].mm.value = yyyy.substr(4,2);
	document.forms["moteur"].aaaa.value = yyyy.substr(0,4);
	
//	alert(day);alert(mm);alert(aaaa);

	choix();
	return true;	

}


function choix()
{
	VILLEDEPART=document.forms["moteur"].VILLEDEPART.value;
	PAYS = document.forms["moteur"].pays.value;
	THEME = document.forms["moteur"].theme.value;
	BUDMAX = document.forms["moteur"].budmax.value;
	JOUR = document.forms["moteur"].jj.value;
	MOIS = document.forms["moteur"].mm.value;
	ANNEE = document.forms["moteur"].aaaa.value;
	DELTA = document.forms["moteur"].delta.value;


	var URLPART = "http://$$FORM:ID$$.pa.promovacances.com";

	if (VILLEDEPART=="0") { RECHERCHE=""+ URLPART +"/rech.htm?VILLEDEPART=" + VILLEDEPART + "&pays=" + PAYS + "&jj=" + JOUR + "&mm=" + MOIS + "&aaaa=" + ANNEE + "&theme=" + THEME + "&delta=" + DELTA + "&budmax=" + BUDMAX + "";  }
	if (VILLEDEPART!="0")  { RECHERCHE=""+ URLPART +"/rechregion.htm?VILLEDEPART=" + VILLEDEPART + "&pays=" + PAYS + "&jj=" + JOUR + "&mm=" + MOIS + "&aaaa=" + ANNEE + "&theme=" + THEME + "&delta=" + DELTA + "&budmax=" + BUDMAX + "";  }
	
	document.moteur.action="" + RECHERCHE + "";


}

/*

function MM_jumpMenu_FR(selObj,t,valid)
{
VILLEDEPART = selObj.options[selObj.selectedIndex].value;
   if (valid=="NON") selObj.selectedIndex=0;
   if (valid=="YES")
   document.location.href="http://$$FORM:ID$$.pa.promovacances.fr/dyn_moteurs_region-mb.htm?id=$$FORM:ID$$&t=" + t + "&VILLEDEPART=" + VILLEDEPART + "";
}


function isValidForm_FR() {
	// Cette vérification ne concerne que la date saisie
	day = document.forms["moteur"].jj.value;
	yyyy = document.forms["moteur"].mmaaaa.value;
	document.forms["moteur"].mm.value = yyyy.substr(4,2);
	document.forms["moteur"].aaaa.value = yyyy.substr(0,4);
	
//	alert(day);alert(mm);alert(aaaa);

	choix_FR();
	return true;	

}


function choix_FR()
{
	VILLEDEPART=document.forms["moteur"].VILLEDEPART.value;
	PAYS = document.forms["moteur"].pays.value;
	THEME = document.forms["moteur"].theme.value;
	BUDMAX = document.forms["moteur"].budmax.value;
	JOUR = document.forms["moteur"].jj.value;
	MOIS = document.forms["moteur"].mm.value;
	ANNEE = document.forms["moteur"].aaaa.value;
	DELTA = document.forms["moteur"].delta.value;
	
	
	var URLPART = "http://$$FORM:ID$$.pa.promovacances.fr";
	if (VILLEDEPART=="0") { RECHERCHE=""+ URLPART +"/rech.htm?VILLEDEPART=" + VILLEDEPART + "&pays=" + PAYS + "&jj=" + JOUR + "&mm=" + MOIS + "&aaaa=" + ANNEE + "&theme=" + THEME + "&delta=" + DELTA + "&budmax=" + BUDMAX + "";  }
	if (VILLEDEPART!="0")  { RECHERCHE=""+ URLPART +"/rechregion.htm?VILLEDEPART=" + VILLEDEPART + "&pays=" + PAYS + "&jj=" + JOUR + "&mm=" + MOIS + "&aaaa=" + ANNEE + "&theme=" + THEME + "&delta=" + DELTA + "&budmax=" + BUDMAX + "";  }
	document.moteur.action="" + RECHERCHE + "";
alert(document.moteur.action);

}


*/



// -->
