<!--
//-- Moteur classique
function init_date(){
//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
//mettre jour menu déroulant
document.write('<select name=JJ size=1 class="select-moteur">');
for(var i=1;i<=31;i++){
	document.write('<option value="'+ i+'" ');
	if(i==jour) { document.write(' selected ');}
		document.write('>'+ i +'</option>');
	}
document.write('</select>')
//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.");

document.write('<select name=MMAAAA size=1 class="select-moteur">');
for(var i=mois_courant;i<=12;i++){// à partir du mois courant, affiche tous les mois de l'année courante
	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="' + annee +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>');
}
}
document.write('</select>');
// pour passer MM & AAAA séparément
document.write('<INPUT type="hidden" name="MM" value="'+mois+'" class="select-moteur">');
document.write('<INPUT type="hidden" name="AAAA" value="'+annee+'" class="select-moteur">');
// Ajout de la combo définissant le DELTA
if (navigator.appName == 'Microsoft Internet Explorer') {
document.write('<span class="txt-moteur">&nbsp;+/-&nbsp;</span>');
}else{
document.write('<span class="txt-moteur">+/-&nbsp;</span>');
}
document.write('<SELECT  class="select-moteur" name="DELTA">');
document.write('<OPTION value="4">4j</OPTION>');
document.write('<OPTION value="8">8j</OPTION>');
document.write('<OPTION value="15">15j</OPTION>');
// Ajouter des valeurs ici si besoin est
document.write('</SELECT>');

}

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);
	return true;	
}
function MM_jumpMenu(selObj,valid){
VILLEDEPART = selObj.options[selObj.selectedIndex].value;
	if (valid=="NON") selObj.selectedIndex=0;
	if (valid=="YES")
	document.location.href="?VILLEDEPART=" + VILLEDEPART + "";
}
// Submit Button 
function rechercher(){
	isValidForm();
	document.forms["moteur"].submit();
}
// Radio Button
function checke (link){
	var new_url=link;
	if( (new_url != "") && (new_url != null) )
		window.location=new_url;
}
// -->