Date.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];Date.abbrDayNames=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];Date.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"];Date.abbrMonthNames=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];Date.firstDayOfWeek=1;Date.format="dd/mm/yyyy";Date.fullYearStart="20";(function(){function C(A,B){if(!Date.prototype[A]){Date.prototype[A]=B}}C("isLeapYear",function(){var A=this.getFullYear();return(A%4==0&&A%100!=0)||A%400==0});C("isWeekend",function(){return this.getDay()==0||this.getDay()==6});C("isWeekDay",function(){return !this.isWeekend()});C("getDaysInMonth",function(){return[31,(this.isLeapYear()?29:28),31,30,31,30,31,31,30,31,30,31][this.getMonth()]});C("getDayName",function(A){return A?Date.abbrDayNames[this.getDay()]:Date.dayNames[this.getDay()]});C("getMonthName",function(A){return A?Date.abbrMonthNames[this.getMonth()]:Date.monthNames[this.getMonth()]});C("getDayOfYear",function(){var A=new Date("1/1/"+this.getFullYear());return Math.floor((this.getTime()-A.getTime())/86400000)});C("getWeekOfYear",function(){return Math.ceil(this.getDayOfYear()/7)});C("setDayOfYear",function(A){this.setMonth(0);this.setDate(A);return this});C("addYears",function(A){this.setFullYear(this.getFullYear()+A);return this});C("addMonths",function(B){var A=this.getDate();this.setMonth(this.getMonth()+B);if(A>this.getDate()){this.addDays(-this.getDate())}return this});C("addDays",function(A){this.setTime(this.getTime()+(A*86400000));return this});C("addHours",function(A){this.setHours(this.getHours()+A);return this});C("addMinutes",function(A){this.setMinutes(this.getMinutes()+A);return this});C("addSeconds",function(A){this.setSeconds(this.getSeconds()+A);return this});C("zeroTime",function(){this.setMilliseconds(0);this.setSeconds(0);this.setMinutes(0);this.setHours(0);return this});C("asString",function(B){var A=B||Date.format;return A.split("yyyy").join(this.getFullYear()).split("yy").join((this.getFullYear()+"").substring(2)).split("mmmm").join(this.getMonthName(false)).split("mmm").join(this.getMonthName(true)).split("mm").join(D(this.getMonth()+1)).split("dd").join(D(this.getDate()))});Date.fromString=function(L){var P=Date.format;var M=new Date("01/01/1977");var O=0;var B=P.indexOf("mmmm");if(B>-1){for(var R=0;R<Date.monthNames.length;R++){var A=L.substr(B,Date.monthNames[R].length);if(Date.monthNames[R]==A){O=Date.monthNames[R].length-4;break}}M.setMonth(R)}else{B=P.indexOf("mmm");if(B>-1){var A=L.substr(B,3);for(var R=0;R<Date.abbrMonthNames.length;R++){if(Date.abbrMonthNames[R]==A){break}}M.setMonth(R)}else{M.setMonth(Number(L.substr(P.indexOf("mm"),2))-1)}}var N=P.indexOf("yyyy");if(N>-1){if(B<N){N+=O}M.setFullYear(Number(L.substr(N,4)))}else{if(B<N){N+=O}M.setFullYear(Number(Date.fullYearStart+L.substr(P.indexOf("yy"),2)))}var Q=P.indexOf("dd");if(B<Q){Q+=O}M.setDate(Number(L.substr(Q,2)));if(isNaN(M.getTime())){return false}return M};var D=function(A){var B="0"+A;return B.substring(B.length-2)}})();