(function(){function a(){Type._registerScript("Date.HijriCalendar.js",["MicrosoftAjaxGlobalization.js"]);__cultureInfo.dateTimeFormat.Calendar.convert={"ticks1970":6.21355968e13,monthDays:[0,30,59,89,118,148,177,207,236,266,295,325,355],minDate:-4.25216736e13,maxDate:0xe677d21fdbff,adjustment:__cultureInfo.dateTimeFormat.Calendar._adjustment||0,toGregorian:function(e,d,f){var a=this,c=a.daysToYear(e)+a.monthDays[d]+f-1-a.adjustment,b=new Date(c*8.64e7-a.ticks1970);b.setMinutes(b.getMinutes()+b.getTimezoneOffset());return b},fromGregorian:function(f){var a=this;if(f<a.minDate||f>a.maxDate)return null;var j=a.ticks1970+(f-0)-f.getTimezoneOffset()*6e4,e=Math.floor(j/8.64e7)+1+a.adjustment,i,c,d=Math.floor((e-227013)*30/10631)+1,b=a.daysToYear(d),g=a.isLeapYear(d)?355:354;if(e<b){d--;b-=g}else if(e===b){d--;b=a.daysToYear(d)}else if(e>b+g){b+=g;d++}c=0;var h=e-b;while(c<=11&&h>a.monthDays[c])c++;c--;i=h-a.monthDays[c];return [d,c,i]},daysToYear:function(d){var b=Math.floor((d-1)/30)*30,a=d-b-1,c=Math.floor(b*10631/30)+227013;while(a>0){c+=this.isLeapYear(a)?355:354;a--}return c},isLeapYear:function(a){return (a*11+14)%30<11}}}if(window.Sys&&Sys.loader)Sys.loader.registerScript("HijriCalendar",null,a);else a()})();
