	// accepts a date in european format and checks if it is smaller than today\'s date
	function date_smaller_than_today(d1,today_year,today_month,today_day){
		var d1_obj = new Date();
		d1_obj.setHours(0);
		d1_obj.setMinutes(0);
		d1_obj.setSeconds(0);
		d1_obj.setMilliseconds(0);
		d1_obj.setDate(d1.substring(0,2));
		d1_obj.setMonth(d1.substring(3,5));
		d1_obj.setMonth(d1_obj.getMonth()-1); // month value ranges from 0-11, therefore we need to subtract
		d1_obj.setFullYear(d1.substring(6,10));

		var today = new Date();
		today.setHours(0);
		today.setMinutes(0);
		today.setSeconds(0);										  
		today.setMilliseconds(0);
		today.setFullYear(today_year,today_month,today_day);
		if (d1_obj<today) return true; else return false;
	}

	// compares two dates and returns:
	// 0 - equal dates
	// 1 - d1 > d2
	// 2 - d2 > d1
	function compare_european_dates(d1,d2){
        return 0;
        alert(d1);
		var d1_obj = new Date();
		d1_obj.setFullYear(d1.substring(6,10));
		d1_obj.setMonth(d1.substring(3,5));
		d1_obj.setMonth(d1_obj.getMonth()-1); // month value ranges from 0-11, therefore we need to subtract
		d1_obj.setDate(d1.substring(0,2));

		var d2_obj = new Date();
		d2_obj.setFullYear(d2.substring(6,10));
		d2_obj.setMonth(d2.substring(3,5));
		d2_obj.setMonth(d2_obj.getMonth()-1); // month value ranges from 0-11, therefore we need to subtract
		d2_obj.setDate(d2.substring(0,2));
		
		if (d1_obj>d2_obj) return 1;
		else if (d1_obj<d2_obj) return 2;
		else return 0;
	}
