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 A(C,D){if(!Date.prototype[C]){Date.prototype[C]=D;
}}A("isLeapYear",function(){var C=this.getFullYear();return(C%4==0&&C%100!=0)||C%400==0;
});A("isWeekend",function(){return this.getDay()==0||this.getDay()==6;});A("isWeekDay",function(){return !this.isWeekend();
});A("getDaysInMonth",function(){return[31,(this.isLeapYear()?29:28),31,30,31,30,31,31,30,31,30,31][this.getMonth()];
});A("getDayName",function(C){return C?Date.abbrDayNames[this.getDay()]:Date.dayNames[this.getDay()];
});A("getMonthName",function(C){return C?Date.abbrMonthNames[this.getMonth()]:Date.monthNames[this.getMonth()];
});A("getDayOfYear",function(){var C=new Date("1/1/"+this.getFullYear());return Math.floor((this.getTime()-C.getTime())/86400000);
});A("getWeekOfYear",function(){return Math.ceil(this.getDayOfYear()/7);});A("setDayOfYear",function(C){this.setMonth(0);
this.setDate(C);return this;});A("addYears",function(C){this.setFullYear(this.getFullYear()+C);
return this;});A("addMonths",function(D){var C=this.getDate();this.setMonth(this.getMonth()+D);
if(C>this.getDate()){this.addDays(-this.getDate());}return this;});A("addDays",function(C){this.setTime(this.getTime()+(C*86400000));
return this;});A("addHours",function(C){this.setHours(this.getHours()+C);return this;
});A("addMinutes",function(C){this.setMinutes(this.getMinutes()+C);return this;});
A("addSeconds",function(C){this.setSeconds(this.getSeconds()+C);return this;});A("zeroTime",function(){this.setMilliseconds(0);
this.setSeconds(0);this.setMinutes(0);this.setHours(0);return this;});A("asString",function(D){var C=D||Date.format;
return C.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(B(this.getMonth()+1)).split("dd").join(B(this.getDate()));
});Date.fromString=function(E){var H=Date.format;var F=new Date("01/01/1977");var C=0;
var J=H.indexOf("mmmm");if(J>-1){for(var I=0;I<Date.monthNames.length;I++){var D=E.substr(J,Date.monthNames[I].length);
if(Date.monthNames[I]==D){C=Date.monthNames[I].length-4;break;}}F.setMonth(I);}else{J=H.indexOf("mmm");
if(J>-1){var D=E.substr(J,3);for(var I=0;I<Date.abbrMonthNames.length;I++){if(Date.abbrMonthNames[I]==D){break;
}}F.setMonth(I);}else{F.setMonth(Number(E.substr(H.indexOf("mm"),2))-1);}}var K=H.indexOf("yyyy");
if(K>-1){if(J<K){K+=C;}F.setFullYear(Number(E.substr(K,4)));}else{if(J<K){K+=C;}F.setFullYear(Number(Date.fullYearStart+E.substr(H.indexOf("yy"),2)));
}var G=H.indexOf("dd");if(J<G){G+=C;}F.setDate(Number(E.substr(G,2)));if(isNaN(F.getTime())){return false;
}return F;};var B=function(D){var C="0"+D;return C.substring(C.length-2);};})();