var goodDate;
// This function takes a date string
// in the format 'dd-mm-yyyy' and checks
// it for validity.
function validDate(day, month, year) {
	
	// set Bad return status
	goodDate = false;
	
	// Test the date for validity
	var dDate = new Date(year, month-1, day, 0, 0, 0, 0);	
	
	if ((dDate.getDate() == day) && (dDate.getMonth() + 1 == month) && (dDate.getFullYear() == year)) {
		// set Good return status
		goodDate = true;
	}
}


