function setDate()
{
	var fday = document.getElementById("jour_arrivee");	
	var fmonth = document.getElementById("mois_arrivee");	
	var fyear = document.getElementById("annee_arrivee");	
	var oggi = new Date();
	
	if(fday && fmonth && fyear)
	{
		fday.options[(oggi.getDate()-1)].selected = true;
		fmonth.options[(oggi.getMonth())].selected = true;
		for(i=0; i<10; i++)
		{
			if(fyear.options[i])
			{
				if(fyear.options[i].value == oggi.getFullYear()) fyear.options[i].selected = true;
			}
		}
	}	
}

function frmcheck()
{
	frm = document.getElementById("myform");
	if (!(frm)) return false;
	
	var oggi = new Date();

	if (parseInt(frm.fyear.value) < oggi.getFullYear())
	{
		alert ("Warning: Specified date is in the past. Please select a date and retry.");
		frm.fyear.focus();
		return false;
	}
	if (parseInt(frm.fyear.value) == oggi.getFullYear())
	{
		if (parseInt(frm.fmonth.value) < (parseInt(oggi.getMonth())+1))
		{
			alert ("Warning: Specified date is in the past. Please select a date and retry.");
			frm.fmonth.focus();
			return false;
		}
		if (parseInt(frm.fmonth.value) == (parseInt(oggi.getMonth())+1))
		{
			if (parseInt(frm.fday.value) < parseInt(oggi.getDate()))
			{
				alert ("Warning: Specified date is in the past. Please select a date and retry.");
				frm.fday.focus();
				return false;
			}
		}
	}
	frm.submit();
}

