//TIME SCRIPT (old hours) by Paul M ECI FEB 2009 v 1.0.1
function addTIME(vall1,vall2,vall3){
	var s = document.forms["destform"].elements[vall3];
	s.options[s.options.length] = new Option(vall1,vall2);
}
function time(){
	for(var i=1 ; i<24 ; i++){
		if (i.lenght == 1) { var vi = '0' + i;} else { var vi = i ;}
		addTIME(vi,vi,'DATECOhour');
		addTIME(vi,vi,'DATECIhour');
	} 
	for(i=15 ; i<46 ;  i++){
		if (i == 45 || i == 30 || i == 15){
			if (i.lenght == 1) { var vi = '0' + i;} else { var vi = i ;}
			addTIME(vi,vi,'DATECOminute');
			addTIME(vi,vi,'DATECIminute');
		}
	}
	for(i=2 ; i<32 ; i++){
		if (i.lenght == 1) { var vi = '0' + i;} else { var vi = i ;}
		addTIME(vi,vi,'DATECOday');
		addTIME(vi,vi,'DATECIday');
	} 
	document.forms.destform.DATECOhour.selectedIndex = 10;
	document.forms.destform.DATECIhour.selectedIndex = 10;
}
function is_ISO(paramValue){
	if(parseInt(paramValue.substring(5,7))==0) return true;
	else return false;
}

/* test de la version ISO */
ISODateValue=true;
function y2k(number) { return (number < 1000) ? number + 1900 : number; }
function month(xid,loc){
	var today=new Date();
	var currentMonth=(today.getMonth()+1);
	var currentYear=y2k(today.getYear());
	switch (loc){
	case "en":
		var MonthArray=['January ','February ','March ','April ','May ','June ','July ','August ','September ','October ','November ','December'];
		break;
	}
	for (i=0; i<14; i++){
		var strCurrentMonth=currentMonth.toString();
		if(strCurrentMonth.length<2) strCurrentMonth="0"+strCurrentMonth;
		
		var tmp_value=(ISODateValue)? strCurrentMonth.toString()+currentYear:+currentYear+strCurrentMonth.toString();
		var nt = MonthArray[(currentMonth-1)]+' '+currentYear;
		var nv = tmp_value;
		document.getElementById(xid).options[document.getElementById(xid).length] = new Option(nt,nv,true,true)
		
		if(currentMonth==MonthArray.length) {
			currentMonth=1;
			currentYear++;
		}
		else currentMonth++;
	}
	strCurrentMonth=(currentMonth-2).toString();
	if(strCurrentMonth.length<2) strCurrentMonth="0"+strCurrentMonth;
	document.getElementById(xid).value = strCurrentMonth+(currentYear-1);
}
