Simple date validation
Very simple, handles leaps years.
The month needs to be a 0 (zero) for Jan, upto 11 to Dec.
Purpose: return true if the date is valid, false otherwise
Arguments: day integer representing day of month
month integer representing month of year
year integer representing year
Variables: dteDate - date object
//set up a Date object based on the day, month and year arguments
return ((day==dteDate.getDate()) && (month==dteDate.getMonth()) && (year==dteDate.getFullYear()));