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