function set_new_date()
{
	alert(getElementById("hidden_date_temp").value);
}
function catcalc(cal)
{
	var date = cal.date;
	var i;
	month=date.getMonth()
	month++;
	if(month<10) month="0"+month;
	day=date.getDate();
	if(day<10) day="0"+day;
	year=date.getFullYear();
	document.sform.from_day.value=day;
	document.sform.from_month.value=month;
	document.sform.from_year.value=year;
}
function catcalc_to(cal,the_date)
{
	var date = cal.date;
	month=date.getMonth()
	month++;
	if(month<10) month="0"+month;
	day=date.getDate();
	if(day<10) day="0"+day;
	year=date.getFullYear();
	document.sform.to_day.value=day;
	document.sform.to_month.value=month;
	document.sform.to_year.value=year;
}
function disable_past_dates_to(caldate,y, m, d)
{
	tomorrow=new Date();
	month=caldate.getMonth()
	if(month<10) month="0"+month;
	day=caldate.getDate();
	if(day<10) day="0"+day;
	year=caldate.getFullYear();
	month2=tomorrow.getMonth()
	if(month2<10) month2="0"+month2;
	day2=tomorrow.getDate();
	if(day2<10) day2="0"+day2;
	year2=tomorrow.getFullYear();
	if((year+""+month+""+day)<=(year2+""+month2+""+day2)){return true;}
	return false;
}
function disable_past_dates(caldate,y, m, d)
{
	tomorrow=new Date();
	month=caldate.getMonth()
	if(month<10) month="0"+month;
	day=caldate.getDate();
	if(day<10) day="0"+day;
	year=caldate.getFullYear();
	month2=tomorrow.getMonth()
	if(month2<10) month2="0"+month2;
	day2=tomorrow.getDate();
	if(day2<10) day2="0"+day2;
	year2=tomorrow.getFullYear();
	if((year+""+month+""+day)<(year2+""+month2+""+day2)) return true;
	return false;
}
Calendar.setup({
button: "from_month_cal",onUpdate: catcalc,disableFunc: disable_past_dates,singleClick: true,firstDayOfWeek: 1,daFormat: "%d.%m.%Y",displayArea: "von_datum"
});
Calendar.setup({
button: "to_month_cal",onUpdate: catcalc_to,singleClick: true,firstDayOfWeek: 1,disableFunc: disable_past_dates_to,daFormat: "%d.%m.%Y",displayArea: "bis_datum"
});