function init_date(ts){
	var s=ts;	
	DEFAUT_DATE_AVANCE =15;
	today = new Date();
	mois_courant = today.getMonth()+1; 
	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; 
	annee=today.getFullYear();
	yyyy=new String(annee); yy=yyyy.substr(2,4);
	if(s==1){
		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){		
	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++)
	        {
	                document.write('<option value="'+annee_courante+i+'"');
	                document.write('>'+moisLib[i]+'&nbsp;'+yy_courante+'</option>');
	        }
	        if((mois_courant)||(mois)>9)
	        {
	                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); 
	                document.write('>'+moisLib[i]+'&nbsp;'+yy+'</option>');
	                }
	        }
	}
	document.write('<input type="hidden" name="mm" value="'+mois+'" class="text" />');
	document.write('<input type="hidden" name="aaaa" value="'+annee+'" class="text" />');
	}
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() {
	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);
	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(selObj,t,valid)
{
	VILLEDEPART = selObj.options[selObj.selectedIndex].value;
	if (valid=="NON") selObj.selectedIndex=0;
	if (valid=="YES")
	document.location.href="http://reunion.pa.promovacances.com/dyn_moteurs_region.htm?id=reunion&t=" + t + "&VILLEDEPART=" + VILLEDEPART + "";
}


function isValidForm() {
	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);
	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://reunion.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 + "";
//alert(document.moteur.action);

}

