function gooddateorder(strEndDate, strStartDate) { if(Date.parse(strStartDate) <= Date.parse(strEndDate)) return true; else return false; } function validatedate(strDate) { var blnGoodDate; var lngPos; var strMonth; var strDay; var strYear; var intDaysInMonth = 0; blnGoodDate = false; if((strDate != "mm/dd/yyyy") && (strDate != "")) { lngPos = strDate.split("/"); if(lngPos.length < 3) return false; else { strMonth = lngPos[0]; strDay = lngPos[1]; strYear = lngPos[2]; } if(strMonth > 0 && strMonth <= 12) { if(strYear > 1899 && strYear < 99999) { if(strMonth == 2) { if (((strYear % 4 == 0) && strMonth == 2 && (strYear % 100 != 0)) || (strYear % 400 == 0)) intDaysInMonth = 29; else intDaysInMonth = 28; } else if(strMonth % 2 == 0) { if(strMonth < 8) intDaysInMonth = 30; else intDaysInMonth = 31; } else { if(strMonth < 8) intDaysInMonth = 31; else intDaysInMonth = 30; } if(strDay > 0 && strDay <= intDaysInMonth) blnGoodDate = true; } } if(blnGoodDate == false) return false; else return true; } else return false; }