function DataCompare(e,c){var d=e.substring(6,10);var f=e.substring(0,2);var b=e.substring(3,5);var a=new Date(d,f,b);d=c.substring(6,10);f=c.substring(0,2);b=c.substring(3,5);var g=new Date(d,f,b);return a<g}function fnDateSelected(f,d){var b=f.substring(6,10);var c=f.substring(0,2);var a=f.substring(3,5);var e=new Date(b,c,a);e.setMonth(e.getMonth()-1);e.setDate(e.getDate()+1);$("#dTo,#dFrom").removeClass("noDate");$("#dTo").datepicker("option","minDate",e)}function checkDate(b){var a,e,i;var h=b.value;var j=/\b\d{1,2}[\/-]\d{1,2}[\/-]\d{4}\b/;if(j.test(h)){var g=(h.indexOf("/")!=-1)?"/":"-";var d=h.indexOf(g);var c=h.lastIndexOf(g);a=parseInt(h.substring(0,d),10);e=parseInt(h.substring(d+1,c),10);i=parseInt(h.substring(c+1),10);var f=new Date(i,a-1,e);if(f.getDate()==e){if(f.getMonth()+1==a){if(f.getFullYear()==i){return true}else{alert("There is a problem with the year entry.")}}else{alert("There is a problem with the month entry.")}}else{alert("There is a problem with the date entry.")}}else{alert("Incorrect date format. Enter as mm/dd/yyyy.")}$(b).addClass("noDate");return false}function validateDate(a){if(!checkDate(a)){a.focus();a.select();return false}return true};