function loadParentEntityTypes(n,t,i){$("#loadingDiv").fadeIn();$.ajax({type:"GET",url:n,datatype:"html",cache:!1,data:{entityTypeId:t,domesticForeignType:i},success:function(n){$("#EntityTypeFormsDiv").html(n);$("#DomesticForeignEntitySelectionDiv").show();$("#loadingDiv").fadeOut()},error:function(){$("#loadingDiv").fadeOut()}})}function GetPendingFilingNotifications(){$.ajax({type:"GET",url:siteRoot+"/Entity/GetPendingFilingNotifications",datatype:"html",cache:!1,success:function(n){n.message==="NoFlash"&&$("#notificationFlash").hide();var t=n.count;t!==undefined&&t!=="undefined"&&($("#pendingFilingNotification").show(),t===1?$("#pendingFilingCount").html(t+' <span class="pendingNumberText">Pending Filing<\/span>'):$("#pendingFilingCount").html(t+' <span class="pendingNumberText">Pending Filings<\/span>'),$(".pendingFilingItem").remove(),$.each(n.pendingFilingNotifications,function(n,t){if(n<7){var i='<li class="pendingFilingItem">'+t.CreatedDate.split(" ")[0]+': <em class="noCollapse">'+t.MainFilingName+'<\/em> for <strong class="noCollapse">'+t.MainEntityName+"<\/strong><\/li>";$("#listedPendingFilings").append(i)}}))},error:function(){$("#loadingDiv").fadeOut()}})}function sessionWarning(){window.window.location.href.toLowerCase()!==siteRoot.toLowerCase()&&window.window.location.href.toLowerCase()!==siteRoot.toLowerCase()+"/home/sessiontimedout"&&window.location.href.toLowerCase().indexOf("login")===-1&&(confirm("Your session is about to expire (at "+expDateTime.toString("h:mm")+")\nFor security reasons you are automatically logged out after 45 minutes of inactivity.\nYour session will expire in 2 minutes.\nIf you would like to continue, please click on OK to renew your session.\nIf you would like to log out now, press Cancel.")?expDateTime.compareTo(new Date)===-1?window.window.location.href=location.href.toLowerCase().match("/inhouse/")?siteRoot+"/Account/Logout":siteRoot+"/Home/SessionTimedOut":(KeepAlive(),expDateTime=(new Date).addMinutes(20),setTimeout("sessionWarning()",timeOutms)):window.window.location.href=location.href.toLowerCase().match("/inhouse/")?siteRoot+"/Account/Logout":siteRoot+"/Home/SessionTimedOut")}function KeepAlive(){$.get(siteRoot+"/Home/KeepAlive",null,function(){})}var showfeestext,hidefeestext,customValidation,expDateTime,timeOutms;$("#ResendEmailButton").click(function(){$(this).val("Please wait..");$(this).attr("disabled","disabled");$("#ResendEmailSpan").text("Please wait..");$("#ResendEmailSubmitButton").click()});$("#ForgotPasswordContinueButton").click(function(){$(this).val("Please wait..");$(this).attr("disabled","disabled");$("#ForgotPasswordSpan").text("Please wait..");$("#ForgotPasswordSubmitButton").click()});$("#AnswerQuestionContinueButton").click(function(){$(this).val("Please wait..");$(this).attr("disabled","disabled");$("#AnswerQuestionSpan").text("Please wait..");$("#AnswerQuestionSubmitButton").click()});$("#CheckoutButton").click(function(){$(this).val("Please wait..");$(this).attr("disabled","disabled");$("#CheckoutSpan").text("Please wait..");$("#CheckoutSubmitButton").click()});$("#InitiateVoidButton").click(function(){$(this).val("Please wait..");$(this).attr("disabled","disabled");$("#InitiateVoidSpan").text("Please wait..");$("#InitiateVoidSubmitButton").click()});$("#ConfirmVoidButton").click(function(){if($("#VoidComment").val()===""){$("#ConfirmVoidForm").validate().showErrors({VoidComment:"Required"});return}$(this).val("Please wait..");$(this).attr("disabled","disabled");$("#ConfirmVoidSpan").text("Please wait..");$("#ConfirmVoidSubmitButton").click()});$("#ConfirmRefundButton").click(function(){if($("#RefundReason").val()===""){$("#ConfirmRefundForm").validate().showErrors({RefundReason:"Required"});return}$(this).val("Please wait..");$(this).attr("disabled","disabled");$("#ConfirmRefundSpan").text("Please wait..");$("#ConfirmRefundSubmitButton").click()});$(function(){$("#EntityTypes").length>0&&$("#EntityTypes").val()!==""&&loadParentEntityTypes(siteRoot+"/Entity/GetParentEntityTypeForms",$("#EntityTypes").val(),$("input[name='DomesticForeignType']:checked").val());$(".DomesticForeignEntityType").change(function(){var n=$("#EntityTypes").val(),t=$("input[name='DomesticForeignType']:checked").val(),i=siteRoot+"/Entity/GetParentEntityTypeForms";$("#loadingDiv").fadeIn();$("#DomesticEntityTypeRadioButton").prop("checked")?loadParentEntityTypes(i,n,t):loadParentEntityTypes(i,n,t)})});showfeestext="View Electronic Records Access pricing structure";hidefeestext="Hide pricing structure";$(document).ready(function(){$("a.viewMoreLink").click(function(){$(this).siblings("p.formDescription").fadeIn();$(this).siblings("a.viewLessLink").fadeIn();$(this).hide()});$("a.viewLessLink").click(function(){$(this).siblings("p.formDescription").fadeOut();$(this).siblings("a.viewMoreLink").fadeIn();$(this).hide()});$(window).scroll(function(){var n=$(window).scrollTop();n>=250?$(".advantagesCollapsable").addClass("advantages-collapsed"):$(".advantagesCollapsable").removeClass("advantages-collapsed")});$("#showAdvantagesLink").click(function(){$(this).siblings("div.advantagesList").fadeIn();$(this).siblings("p.advantagesInfo").fadeIn();$(this).siblings("div.salesFilingButtons").fadeIn();$(this).siblings("a#hideAdvantagesLink").fadeIn();$(this).hide()});$("#hideAdvantagesLink").click(function(){$(this).siblings("div.advantagesList").fadeOut();$(this).siblings("p.advantagesInfo").fadeOut();$(this).siblings("div.salesFilingButtons").fadeOut();$(this).siblings("a#showAdvantagesLink").fadeIn();$(this).hide()});$(".hasDatepicker").on("click",function(n){n.preventDefault();$(this).attr("autocomplete","off")})});$(document).ready(function(){var o=window.location.pathname,u,f,i,t,e;o.toLowerCase().indexOf("inhouse")>=0||GetPendingFilingNotifications();$(":input:enabled:visible:not([readonly]):not(button):first").focus();var n=70,s="...",r="more",h="less";$(".sectionInstructions").each(function(){var t=$(this).text();if(t.length>n){var i=t.substr(0,n),u=t.substr(n,t.length-n),f=i+'<span class="moreelipses">'+s+'<\/span><span class="morecontent"><span>'+u+'<\/span>&nbsp;&nbsp;<a href="" class="morelink">'+r+"<\/a><\/span>";$(this).html(f)}});$(".morelink").click(function(){return $(this).hasClass("less")?($(this).removeClass("less"),$(this).html(r)):($(this).addClass("less"),$(this).html(h)),$(this).parent().prev().toggle(),$(this).prev().toggle(),!1});u="Show Notice";f="Hide Notice";$("em.noticeContent").hide();$(".showNoticeLink").click(function(){return $(this).hasClass("visibleNotice")?($(this).removeClass("visibleNotice"),$(this).html(u)):($(this).addClass("visibleNotice"),$(this).html(f)),$(this).siblings("em.noticeContent").toggle(),!1});$("ul.hiddenInstructions").hide();$("a.showMoreLink").click(function(){return $(this).parent("p").parent("div").siblings("ul.hiddenInstructions").toggle(),!1});$("#showFeesLink").click(function(){$(this).hasClass("visibleNotice")?($(this).removeClass("visibleNotice"),$(this).html(showfeestext),$(this).parent("p").siblings("#pricingStructure").fadeOut()):($(this).addClass("visibleNotice"),$(this).html(hidefeestext),$(this).parent("p").siblings("#pricingStructure").fadeIn())});$("a.closePricing").click(function(){$(this).parent("#pricingStructure").fadeOut();$("#showFeesLink").html(showfeestext);$("#showFeesLink").removeClass("visibleNotice")});$("#EntitySearchTypeEnumId > option").each(function(){var n=$(this).html().replace("{replaceforspace}","&nbsp;").replace("{replaceforspace}","&nbsp;").replace("{replaceforspace}","&nbsp;");$(this).html(n)});$("#EntitySearchTypeEnumId").length>0&&($("#EntitySearchTypeEnumId").val()==="1"?$("#SearchTextBox").attr("placeholder","Business name contains..."):$("#EntitySearchTypeEnumId").val()==="2"?$("#SearchTextBox").attr("placeholder","Business name begins with..."):$("#EntitySearchTypeEnumId").val()==="3"&&$("#SearchTextBox").attr("placeholder","Business name is exactly..."));$("#EntitySearchTypeEnumId").change(function(){$("#EntitySearchTypeEnumId").val()==="1"?$("#SearchTextBox").attr("placeholder","Business name contains..."):$("#EntitySearchTypeEnumId").val()==="2"?$("#SearchTextBox").attr("placeholder","Business name begins with..."):$("#EntitySearchTypeEnumId").val()==="3"&&$("#SearchTextBox").attr("placeholder","Business name is exactly...")});$("#TransactionSearchTypeEnumId").length>0&&($("#TransactionSearchTypeEnumId").val()==="1"?$("#TransactionLookupSearchTextBox").attr("placeholder","Transaction ID"):$("#TransactionSearchTypeEnumId").val()==="2"?$("#TransactionLookupSearchTextBox").attr("placeholder","Filing Number"):$("#TransactionSearchTypeEnumId").val()==="3"&&$("#TransactionLookupSearchTextBox").attr("placeholder","Entity Name"));$("#TransactionSearchTypeEnumId").change(function(){$("#TransactionSearchTypeEnumId").val()==="1"?$("#TransactionLookupSearchTextBox").attr("placeholder","Transaction ID"):$("#TransactionSearchTypeEnumId").val()==="2"?$("#TransactionLookupSearchTextBox").attr("placeholder","Filing Number"):$("#TransactionSearchTypeEnumId").val()==="3"&&$("#TransactionLookupSearchTextBox").attr("placeholder","Entity Name")});$("#searchFilters .filterFields").hide();$("#searchFilters .searchFilters").hide();$("#ShowFilterButton").click(function(){return $(this).siblings(".searchFilters").slideDown(),$(this).hide(),!1});$("#hideFilters").click(function(){return $("#searchFilters .searchFilters").slideUp(),$("#ShowFilterButton").delay(200).fadeIn("slow"),!1});$("#searchFilters .filterGroup:first-child .filterFields").slideDown();$("#searchFilters .filterGroup:first-child").addClass("activeFilter");$("#searchFilters .filterGroup .displayLabel").click(function(){return $(this).siblings(".filterFields").slideToggle(),$(this).parent(".filterGroup").toggleClass("activeFilter"),!1});$("#DocumentRequestAssociatedFilingsTable th").each(function(){$.trim($(this).text().toString().toLowerCase())==="{checkall}"&&($(this).text(""),$("<input />",{type:"checkbox",id:"cbSelectAll",value:""}).appendTo($(this)),$(this).append("<label for='cbSelectAll' class='checkBoxLabel'>Select All<\/label>"))});$("#cbSelectAll").on("click",function(){var n=this.checked;$("#DocumentRequestAssociatedFilingsTable").find("input:checkbox").each(function(){this.checked=n})});if($("input[name='ids']").click(function(){var n=$("#DocumentRequestAssociatedFilingsTable td :checkbox").length,t=$("#DocumentRequestAssociatedFilingsTable td :checkbox:checked").length;t===n?$("#DocumentRequestAssociatedFilingsTable").find("input:checkbox").each(function(){this.checked=!0}):$("#cbSelectAll").removeAttr("checked")}),$("#SelectedDocuments").length>0)for(i=$("#SelectedDocuments").val().split("|"),t=0,e=i.length;t<e;t++)$("#"+i[t]).prop("checked",!0)});$(document).keydown(function(n){n.keyCode===27&&($("#pricingStructure").fadeOut(),$("#showFeesLink").html(showfeestext),$("#showFeesLink").removeClass("visibleNotice"))});$(".DomesticForeignRadioButton").length>0&&$("#hiddenIsLimitedPartnership").val()==="True"&&($("#DomesticRadioButton").prop("disabled",!0),$("#ForeignRadioButton").prop("checked",!0),$("#hiddenAssumedNameButton").show());$(".DomesticForeignRadioButton").change(function(){$("#DomesticRadioButton").prop("checked")?($("#hiddenIndistinguishableButton").show(),$("#hiddenFictitiousButton").hide(),$("#hiddenAssumedNameButton").hide()):$("#hiddenIsLimitedPartnership").val()==="True"?($("#hiddenIndistinguishableButton").hide(),$("#hiddenFictitiousButton").hide(),$("#hiddenAssumedNameButton").show()):($("#hiddenAssumedNameButton").show(),$("#hiddenIndistinguishableButton").show(),$("#hiddenFictitiousButton").show())});$("#AddFictitiousEntityButton").on("click",function(n){var t=$("#SearchTextBox").val();($("#searchMessageDiv").hide(),t!=="")&&($("#loadingDiv").show(),n.preventDefault(),$.ajax({type:"POST",url:siteRoot+"/Entity/AddFictitiousEntity",data:$("#AddUnavailableEntityForm").serialize(),cache:!1,success:function(n){n.result==="redirect"&&($("#loadingDiv").hide(),console.log("Url:"+n.url),window.location.replace(n.url))},error:function(n){$("#loadingDiv").hide();console.log(n)}}))});$("#AddIndistinguishableEntityButton").on("click",function(n){var t=$("#SearchTextBox").val();($("#searchMessageDiv").hide(),t!=="")&&($("#loadingDiv").show(),n.preventDefault(),$.ajax({type:"POST",url:siteRoot+"/Entity/AddIndistinguishableEntity",data:$("#AddUnavailableEntityForm").serialize(),cache:!1,success:function(n){$("#loadingDiv").hide();n.result==="redirect"&&($("#loadingDiv").hide(),console.log("Url:"+n.url),window.location.replace(n.url))},error:function(n){$("#loadingDiv").hide();console.log(n)}}))});$("#AddAssumedNameEntityButton").on("click",function(n){var t=$("#SearchTextBox").val();($("#searchMessageDiv").hide(),t!=="")&&($("#loadingDiv").show(),n.preventDefault(),$.ajax({type:"POST",url:siteRoot+"/Entity/AddAssumedNameEntity",data:$("#AddUnavailableEntityForm").serialize(),cache:!1,success:function(n){$("#loadingDiv").hide();n.result==="redirect"&&($("#loadingDiv").hide(),console.log("Url:"+n.url),window.location.replace(n.url))},error:function(n){$("#loadingDiv").hide();console.log(n)}}))});customValidation=function(){};customValidation.is=function(n,t,i,r){if(r){var u=function(n){return n==null||n==undefined||n==""},f=u(n),e=u(i);if(f&&!e||e&&!f)return!0}var o=function(n){return+n===n&&n.length>0},s=function(n){var t=new RegExp(/(?=\d)^(?:(?!(?:10\D(?:0?[5-9]|1[0-4])\D(?:1582))|(?:0?9\D(?:0?[3-9]|1[0-3])\D(?:1752)))((?:0?[13578]|1[02])|(?:0?[469]|11)(?!\/31)(?!-31)(?!\.31)|(?:0?2(?=.?(?:(?:29.(?!000[04]|(?:(?:1[^0-6]|[2468][^048]|[3579][^26])00))(?:(?:(?:\d\d)(?:[02468][048]|[13579][26])(?!\x20BC))|(?:00(?:42|3[0369]|2[147]|1[258]|09)\x20BC))))))|(?:0?2(?=.(?:(?:\d\D)|(?:[01]\d)|(?:2[0-8])))))([-.\/])(0?[1-9]|[12]\d|3[01])\2(?!0000)((?=(?:00(?:4[0-5]|[0-3]?\d)\x20BC)|(?:\d{4}(?!\x20BC)))\d{4}(?:\x20BC)?)(?:$|(?=\x20\d)\x20))?((?:(?:0?[1-9]|1[012])(?::[0-5]\d){0,2}(?:\x20[aApP][mM]))|(?:[01]\d|2[0-3])(?::[0-5]\d){1,2})?$/);return t.test(n)},h=function(n){return n===!0||n===!1||n==="true"||n==="false"};s(n)?(n=Date.parse(n),i=Date.parse(i)):h(n)?(n==="false"&&(n=!1),i==="false"&&(i=!1),n=!!n,i=!!i):o(n)&&(n=parseFloat(n),i=parseFloat(i));switch(t){case"EqualTo":if(n==i)return!0;break;case"NotEqualTo":if(n!=i)return!0;break;case"GreaterThan":if(n>i)return!0;break;case"LessThan":if(n<i)return!0;break;case"GreaterThanOrEqualTo":if(n>=i)return!0;break;case"LessThanOrEqualTo":if(n<=i)return!0;break;case"RegExMatch":return new RegExp(i).test(n);case"NotRegExMatch":return!new RegExp(i).test(n)}return!1};customValidation.getId=function(n,t){var i=n.id.lastIndexOf("_")+1;return n.id.substr(0,i)+t.replace(/\./g,"_")};customValidation.getName=function(n,t){var i=n.name.lastIndexOf(".")+1;return n.name.substr(0,i)+t},function(){jQuery.validator.addMethod("is",function(n,t,i){var r=customValidation.getId(t,i.dependentproperty),u=i.operator,f=i.passonnull,e=document.getElementById(r).value;return customValidation.is(n,u,e,f)?!0:!1});jQuery.validator.addMethod("requiredif",function(n,t,i){var o=customValidation.getName(t,i.dependentproperty),s=i.dependentvalue,h=i.operator,e=i.pattern,r=document.getElementsByName(o),u=null,f;if(r.length>1){for(f=0;f!=r.length;f++)if(r[f].checked){u=r[f].value;break}u==null&&(u=!1)}else u=r[0].value;if(customValidation.is(u,h,s))if(e==null){if(n!=null&&n.toString().replace(/^\s\s*/,"").replace(/\s\s*$/,"")!=="")return!0}else return new RegExp(e).test(n);else return!0;return!1});jQuery.validator.addMethod("requiredifempty",function(n,t,i){var u=customValidation.getId(t,i.dependentproperty),r=document.getElementById(u).value;if(r==null||r.toString().replace(/^\s\s*/,"").replace(/\s\s*$/,"")===""){if(n!=null&&n.toString().replace(/^\s\s*/,"").replace(/\s\s*$/,"")!=="")return!0}else return!0;return!1});jQuery.validator.addMethod("requiredifnotempty",function(n,t,i){var u=customValidation.getId(t,i.dependentproperty),r=document.getElementById(u).value;if(r!=null&&r.toString().replace(/^\s\s*/,"").replace(/\s\s*$/,"")!==""){if(n!=null&&n.toString().replace(/^\s\s*/,"").replace(/\s\s*$/,"")!=="")return!0}else return!0;return!1});jQuery.validator.addMethod("mustbetrue",function(n,t,i){return this.depend(i,t)?t.checked:"dependency-mismatch"});var n=function(n,t,i){n.rules[t]=i;n.message&&(n.messages[t]=n.message)},t=$.validator.unobtrusive;t.adapters.add("requiredif",["dependentproperty","dependentvalue","operator","pattern"],function(t){var i={dependentproperty:t.params.dependentproperty,dependentvalue:t.params.dependentvalue,operator:t.params.operator,pattern:t.params.pattern};n(t,"requiredif",i)});t.adapters.add("mustbetrue",function(t){n(t,"mustbetrue",!0)});t.adapters.add("is",["dependentproperty","operator","passonnull"],function(t){n(t,"is",{dependentproperty:t.params.dependentproperty,operator:t.params.operator,passonnull:t.params.passonnull})});t.adapters.add("requiredifempty",["dependentproperty"],function(t){n(t,"requiredifempty",{dependentproperty:t.params.dependentproperty})});t.adapters.add("requiredifnotempty",["dependentproperty"],function(t){n(t,"requiredifnotempty",{dependentproperty:t.params.dependentproperty})})}();$("#CancelButton").on("click",function(n){n.preventDefault();var t=confirm("All progress will be lost. Are you sure you want to cancel this filing?");t===!0&&(window.location.href=siteRoot+"/Home/ProcessCancel")});$("#InhouseCancelButton").on("click",function(n){n.preventDefault();var t=confirm("All progress will be lost. Are you sure you want to cancel this filing?");t===!0&&(window.location.href=siteRoot+"/Inhouse/Dashboard/ProcessCancel")});$(".deletePendingFilings").on("click",function(){$(this).closest("tr").hide()});$("#pendingFilingCount").on("click",function(){if($("#pendingFilingList").is(":hidden"))return $("#pendingFilingList").fadeIn().addClass("visible"),$("#pendingFilingCount").addClass("filingListActive"),$.ajax({type:"GET",url:siteRoot+"/Entity/UpdatePendingFilingNotifications",datatype:"html",cache:!1,success:function(){},error:function(){}}),!1;$("#pendingFilingList").fadeOut();$("#pendingFilingCount").removeClass("filingListActive")});$("html").click(function(n){var t=$(n.target).attr("class");t=="pendingFilingItem"||t=="pendingFilingHeading"||t=="noCollapse"||t=="pendingFilingList visible"||t=="listedPendingFilings"||t=="pendingFilingLink"||($("#pendingFilingList").fadeOut(),$("#pendingFilingCount").removeClass("filingListActive"))});$(".deletePendingFiling").on("click",function(n){if(confirm("Are you sure you want to delete your progress on this filing?")===!0){var t=$(this).parent().find(".entityName").find("a").text(),i=$(this).parent().find(".filingType").text();$("#successMessage").show()}else n.preventDefault()});Date.CultureInfo={name:"en-US",englishName:"English (United States)",nativeName:"English (United States)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"mdy",formatPatterns:{shortDate:"M/d/yyyy",longDate:"dddd, MMMM dd, yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dddd, MMMM dd, yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}};Date.getMonthNumberFromName=function(n){for(var i=Date.CultureInfo.monthNames,u=Date.CultureInfo.abbreviatedMonthNames,r=n.toLowerCase(),t=0;t<i.length;t++)if(i[t].toLowerCase()==r||u[t].toLowerCase()==r)return t;return-1};Date.getDayNumberFromName=function(n){for(var i=Date.CultureInfo.dayNames,u=Date.CultureInfo.abbreviatedDayNames,f=Date.CultureInfo.shortestDayNames,r=n.toLowerCase(),t=0;t<i.length;t++)if(i[t].toLowerCase()==r||u[t].toLowerCase()==r)return t;return-1};Date.isLeapYear=function(n){return n%4==0&&n%100!=0||n%400==0};Date.getDaysInMonth=function(n,t){return[31,Date.isLeapYear(n)?29:28,31,30,31,30,31,31,30,31,30,31][t]};Date.getTimezoneOffset=function(n,t){return t||!1?Date.CultureInfo.abbreviatedTimeZoneDST[n.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[n.toUpperCase()]};Date.getTimezoneAbbreviation=function(n,t){var i=t||!1?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard;for(var r in i)if(i[r]===n)return r;return null};Date.prototype.clone=function(){return new Date(this.getTime())};Date.prototype.compareTo=function(n){if(isNaN(this))throw new Error(this);if(n instanceof Date&&!isNaN(n))return this>n?1:this<n?-1:0;throw new TypeError(n);};Date.prototype.equals=function(n){return this.compareTo(n)===0};Date.prototype.between=function(n,t){var i=this.getTime();return i>=n.getTime()&&i<=t.getTime()};Date.prototype.addMilliseconds=function(n){return this.setMilliseconds(this.getMilliseconds()+n),this};Date.prototype.addSeconds=function(n){return this.addMilliseconds(n*1e3)};Date.prototype.addMinutes=function(n){return this.addMilliseconds(n*6e4)};Date.prototype.addHours=function(n){return this.addMilliseconds(n*36e5)};Date.prototype.addDays=function(n){return this.addMilliseconds(n*864e5)};Date.prototype.addWeeks=function(n){return this.addMilliseconds(n*6048e5)};Date.prototype.addMonths=function(n){var t=this.getDate();return this.setDate(1),this.setMonth(this.getMonth()+n),this.setDate(Math.min(t,this.getDaysInMonth())),this};Date.prototype.addYears=function(n){return this.addMonths(n*12)};Date.prototype.add=function(n){if(typeof n=="number")return this._orient=n,this;var t=n;return(t.millisecond||t.milliseconds)&&this.addMilliseconds(t.millisecond||t.milliseconds),(t.second||t.seconds)&&this.addSeconds(t.second||t.seconds),(t.minute||t.minutes)&&this.addMinutes(t.minute||t.minutes),(t.hour||t.hours)&&this.addHours(t.hour||t.hours),(t.month||t.months)&&this.addMonths(t.month||t.months),(t.year||t.years)&&this.addYears(t.year||t.years),(t.day||t.days)&&this.addDays(t.day||t.days),this};Date._validate=function(n,t,i,r){if(typeof n!="number")throw new TypeError(n+" is not a Number.");else if(n<t||n>i)throw new RangeError(n+" is not a valid value for "+r+".");return!0};Date.validateMillisecond=function(n){return Date._validate(n,0,999,"milliseconds")};Date.validateSecond=function(n){return Date._validate(n,0,59,"seconds")};Date.validateMinute=function(n){return Date._validate(n,0,59,"minutes")};Date.validateHour=function(n){return Date._validate(n,0,23,"hours")};Date.validateDay=function(n,t,i){return Date._validate(n,1,Date.getDaysInMonth(t,i),"days")};Date.validateMonth=function(n){return Date._validate(n,0,11,"months")};Date.validateYear=function(n){return Date._validate(n,1,9999,"seconds")};Date.prototype.set=function(n){var t=n;return t.millisecond||t.millisecond===0||(t.millisecond=-1),t.second||t.second===0||(t.second=-1),t.minute||t.minute===0||(t.minute=-1),t.hour||t.hour===0||(t.hour=-1),t.day||t.day===0||(t.day=-1),t.month||t.month===0||(t.month=-1),t.year||t.year===0||(t.year=-1),t.millisecond!=-1&&Date.validateMillisecond(t.millisecond)&&this.addMilliseconds(t.millisecond-this.getMilliseconds()),t.second!=-1&&Date.validateSecond(t.second)&&this.addSeconds(t.second-this.getSeconds()),t.minute!=-1&&Date.validateMinute(t.minute)&&this.addMinutes(t.minute-this.getMinutes()),t.hour!=-1&&Date.validateHour(t.hour)&&this.addHours(t.hour-this.getHours()),t.month!==-1&&Date.validateMonth(t.month)&&this.addMonths(t.month-this.getMonth()),t.year!=-1&&Date.validateYear(t.year)&&this.addYears(t.year-this.getFullYear()),t.day!=-1&&Date.validateDay(t.day,this.getFullYear(),this.getMonth())&&this.addDays(t.day-this.getDate()),t.timezone&&this.setTimezone(t.timezone),t.timezoneOffset&&this.setTimezoneOffset(t.timezoneOffset),this};Date.prototype.clearTime=function(){return this.setHours(0),this.setMinutes(0),this.setSeconds(0),this.setMilliseconds(0),this};Date.prototype.isLeapYear=function(){var n=this.getFullYear();return n%4==0&&n%100!=0||n%400==0};Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun())};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth())};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1})};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()})};Date.prototype.moveToDayOfWeek=function(n,t){var i=(n-this.getDay()+7*(t||1))%7;return this.addDays(i===0?i+=7*(t||1):i)};Date.prototype.moveToMonth=function(n,t){var i=(n-this.getMonth()+12*(t||1))%12;return this.addMonths(i===0?i+=12*(t||1):i)};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/864e5)};Date.prototype.getWeekOfYear=function(n){var t=this.getFullYear(),e=this.getMonth(),o=this.getDate(),s=n||Date.CultureInfo.firstDayOfWeek,r=8-new Date(t,0,1).getDay(),f,i,u;return r==8&&(r=1),f=(Date.UTC(t,e,o,0,0,0)-Date.UTC(t,0,1,0,0,0))/864e5+1,i=Math.floor((f-r+7)/7),i===s&&(t--,u=8-new Date(t,0,1).getDay(),i=u==2||u==8?53:52),i};Date.prototype.isDST=function(){return console.log("isDST"),this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D"};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST())};Date.prototype.setTimezoneOffset=function(n){var t=this.getTimezoneOffset(),i=Number(n)*-6/10;return this.addMinutes(i-t),this};Date.prototype.setTimezone=function(n){return this.setTimezoneOffset(Date.getTimezoneOffset(n))};Date.prototype.getUTCOffset=function(){var t=this.getTimezoneOffset()*-10/6,n;return t<0?(n=(t-1e4).toString(),n[0]+n.substr(2)):(n=(t+1e4).toString(),"+"+n.substr(1))};Date.prototype.getDayName=function(n){return n?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()]};Date.prototype.getMonthName=function(n){return n?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()]};Date.prototype._toString=Date.prototype.toString;Date.prototype.toString=function(n){var t=this,i=function(n){return n.toString().length==1?"0"+n:n};return n?n.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(n){switch(n){case"hh":return i(t.getHours()<13?t.getHours():t.getHours()-12);case"h":return t.getHours()<13?t.getHours():t.getHours()-12;case"HH":return i(t.getHours());case"H":return t.getHours();case"mm":return i(t.getMinutes());case"m":return t.getMinutes();case"ss":return i(t.getSeconds());case"s":return t.getSeconds();case"yyyy":return t.getFullYear();case"yy":return t.getFullYear().toString().substring(2,4);case"dddd":return t.getDayName();case"ddd":return t.getDayName(!0);case"dd":return i(t.getDate());case"d":return t.getDate().toString();case"MMMM":return t.getMonthName();case"MMM":return t.getMonthName(!0);case"MM":return i(t.getMonth()+1);case"M":return t.getMonth()+1;case"t":return t.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return t.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return""}}):this._toString()};Date.now=function(){return new Date};Date.today=function(){return Date.now().clearTime()};Date.prototype._orient=1;Date.prototype.next=function(){return this._orient=1,this};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){return this._orient=-1,this};Date.prototype._is=!1;Date.prototype.is=function(){return this._is=!0,this};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var n={};return n[this._dateElement]=this,Date.now().add(n)};Number.prototype.ago=function(){var n={};return n[this._dateElement]=this*-1,Date.now().add(n)},function(){for(var h,i,c,l,u,n=Date.prototype,s=Number.prototype,f="sunday monday tuesday wednesday thursday friday saturday".split(/\s/),e="january february march april may june july august september october november december".split(/\s/),o="Millisecond Second Minute Hour Day Week Month Year".split(/\s/),t,a=function(n){return function(){return this._is?(this._is=!1,this.getDay()==n):this.moveToDayOfWeek(n,this._orient)}},r=0;r<f.length;r++)n[f[r]]=n[f[r].substring(0,3)]=a(r);for(h=function(n){return function(){return this._is?(this._is=!1,this.getMonth()===n):this.moveToMonth(n,this._orient)}},i=0;i<e.length;i++)n[e[i]]=n[e[i].substring(0,3)]=h(i);for(c=function(n){return function(){return n.substring(n.length-1)!="s"&&(n+="s"),this["add"+n](this._orient)}},l=function(n){return function(){return this._dateElement=n,this}},u=0;u<o.length;u++)t=o[u].toLowerCase(),n[t]=n[t+"s"]=c(o[u]),s[t]=s[t+"s"]=l(t)}();Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ")};Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern)};Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern)};Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern)};Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern)};Date.prototype.getOrdinal=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}},function(){var i,o,f,u;Date.Parsing={Exception:function(n){this.message="Parse error at '"+n.substring(0,10)+" ...'"}};var t=Date.Parsing,n=t.Operators={rtoken:function(n){return function(i){var r=i.match(n);if(r)return[r[0],i.substring(r[0].length)];throw new t.Exception(i);}},token:function(){return function(t){return n.rtoken(new RegExp("^s*"+t+"s*"))(t)}},stoken:function(t){return n.rtoken(new RegExp("^"+t))},until:function(n){return function(t){for(var r=[],i=null;t.length;){try{i=n.call(this,t)}catch(u){r.push(i[0]);t=i[1];continue}break}return[r,t]}},many:function(n){return function(t){for(var i=[],r=null;t.length;){try{r=n.call(this,t)}catch(u){return[i,t]}i.push(r[0]);t=r[1]}return[i,t]}},optional:function(n){return function(t){var i=null;try{i=n.call(this,t)}catch(r){return[null,t]}return[i[0],i[1]]}},not:function(n){return function(i){try{n.call(this,i)}catch(r){return[null,i]}throw new t.Exception(i);}},ignore:function(n){return n?function(t){var i=null;return i=n.call(this,t),[null,i[1]]}:null},product:function(){for(var i=arguments[0],u=Array.prototype.slice.call(arguments,1),r=[],t=0;t<i.length;t++)r.push(n.each(i[t],u));return r},cache:function(n){var r={},i=null;return function(u){try{i=r[u]=r[u]||n.call(this,u)}catch(f){i=r[u]=f}if(i instanceof t.Exception)throw i;else return i}},any:function(){var n=arguments;return function(i){for(var r=null,u=0;u<n.length;u++)if(n[u]!=null){try{r=n[u].call(this,i)}catch(f){r=null}if(r)return r}throw new t.Exception(i);}},each:function(){var n=arguments;return function(i){for(var f=[],u=null,r=0;r<n.length;r++)if(n[r]!=null){try{u=n[r].call(this,i)}catch(e){throw new t.Exception(i);}f.push(u[0]);i=u[1]}return[f,i]}},all:function(){var t=arguments,n=n;return n.each(n.optional(t))},sequence:function(i,r,u){return(r=r||n.rtoken(/^\s*/),u=u||null,i.length==1)?i[0]:function(n){for(var f=null,e=null,s=[],o=0;o<i.length;o++){try{f=i[o].call(this,n)}catch(h){break}s.push(f[0]);try{e=r.call(this,f[1])}catch(c){e=null;break}n=e[1]}if(!f)throw new t.Exception(n);if(e)throw new t.Exception(e[1]);if(u)try{f=u.call(this,f[1])}catch(l){throw new t.Exception(f[1]);}return[s,f?f[1]:n]}},between:function(t,i,u){u=u||t;var f=n.each(n.ignore(t),i,n.ignore(u));return function(n){var t=f.call(this,n);return[[t[0][0],r[0][2]],t[1]]}},list:function(t,i,r){return i=i||n.rtoken(/^\s*/),r=r||null,t instanceof Array?n.each(n.product(t.slice(0,-1),n.ignore(i)),t.slice(-1),n.ignore(r)):n.each(n.many(n.each(t,n.ignore(i))),px,n.ignore(r))},set:function(i,r,u){return r=r||n.rtoken(/^\s*/),u=u||null,function(f){for(var y,a,s=null,l=null,h=null,c=null,e=[[],f],o=!1,v=0;v<i.length;v++){h=null;l=null;s=null;o=i.length==1;try{s=i[v].call(this,f)}catch(p){continue}if(c=[[s[0]],s[1]],s[1].length>0&&!o)try{h=r.call(this,s[1])}catch(w){o=!0}else o=!0;if(o||h[1].length!==0||(o=!0),!o){for(y=[],a=0;a<i.length;a++)v!=a&&y.push(i[a]);l=n.set(y,r).call(this,h[1]);l[0].length>0&&(c[0]=c[0].concat(l[0]),c[1]=l[1])}if(c[1].length<e[1].length&&(e=c),e[1].length===0)break}if(e[0].length===0)return e;if(u){try{h=u.call(this,e[1])}catch(b){throw new t.Exception(e[1]);}e[1]=h[1]}return e}},forward:function(n,t){return function(i){return n[t].call(this,i)}},replace:function(n,t){return function(i){var r=n.call(this,i);return[t,r[1]]}},process:function(n,t){return function(i){var r=n.call(this,i);return[t.call(this,r[0]),r[1]]}},min:function(n,i){return function(r){var u=i.call(this,r);if(u[0].length<n)throw new t.Exception(r);return u}}},s=function(n){return function(){var t=null,u=[],i,r;if(arguments.length>1?t=Array.prototype.slice.call(arguments):arguments[0]instanceof Array&&(t=arguments[0]),t)for(i=0,r=t.shift();i<r.length;i++)return t.unshift(r[i]),u.push(n.apply(null,t)),t.shift(),u;else return n.apply(null,arguments)}},e="optional not ignore cache".split(/\s/);for(i=0;i<e.length;i++)n[e[i]]=s(n[e[i]]);for(o=function(n){return function(){return arguments[0]instanceof Array?n.apply(null,arguments[0]):n.apply(null,arguments)}},f="each any all".split(/\s/),u=0;u<f.length;u++)n[f[u]]=o(n[f[u]])}(),function(){var o=function(n){for(var i=[],t=0;t<n.length;t++)n[t]instanceof Array?i=i.concat(o(n[t])):n[t]&&i.push(n[t]);return i},u,f,e;Date.Grammar={};Date.Translator={hour:function(n){return function(){this.hour=Number(n)}},minute:function(n){return function(){this.minute=Number(n)}},second:function(n){return function(){this.second=Number(n)}},meridian:function(n){return function(){this.meridian=n.slice(0,1).toLowerCase()}},timezone:function(n){return function(){var t=n.replace(/[^\d\+\-]/g,"");t.length?this.timezoneOffset=Number(t):this.timezone=n.toLowerCase()}},day:function(n){var t=n[0];return function(){this.day=Number(t.match(/\d+/)[0])}},month:function(n){return function(){this.month=n.length==3?Date.getMonthNumberFromName(n):Number(n)-1}},year:function(n){return function(){var t=Number(n);this.year=n.length>2?t:t+(t+2e3<Date.CultureInfo.twoDigitYearMax?2e3:1900)}},rday:function(n){return function(){switch(n){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=!0}}},finishExact:function(n){var r,t,i;for(n=n instanceof Array?n:[n],r=new Date,this.year=r.getFullYear(),this.month=r.getMonth(),this.day=1,this.hour=0,this.minute=0,this.second=0,t=0;t<n.length;t++)n[t]&&n[t].call(this);if(this.hour=this.meridian=="p"&&this.hour<13?this.hour+12:this.hour,this.day>Date.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");return i=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second),this.timezone?i.set({timezone:this.timezone}):this.timezoneOffset&&i.set({timezoneOffset:this.timezoneOffset}),i},finish:function(n){var f,r,t,u;if(n=n instanceof Array?o(n):[n],n.length===0)return null;for(f=0;f<n.length;f++)typeof n[f]=="function"&&n[f].call(this);if(this.now)return new Date;var i=Date.today(),e=!!(this.days!=null||this.orient||this.operator);return e?(u=this.orient=="past"||this.operator=="subtract"?-1:1,this.weekday&&(this.unit="day",r=Date.getDayNumberFromName(this.weekday)-i.getDay(),t=7,this.days=r?(r+u*t)%t:u*t),this.month&&(this.unit="month",r=this.month-i.getMonth(),t=12,this.months=r?(r+u*t)%t:u*t,this.month=null),this.unit||(this.unit="day"),(this[this.unit+"s"]==null||this.operator!=null)&&(this.value||(this.value=1),this.unit=="week"&&(this.unit="day",this.value=this.value*7),this[this.unit+"s"]=this.value*u),i.add(this)):(this.meridian&&this.hour&&(this.hour=this.hour<13&&this.meridian=="p"?this.hour+12:this.hour),this.weekday&&!this.day&&(this.day=i.addDays(Date.getDayNumberFromName(this.weekday)-i.getDay()).getDate()),this.month&&!this.day&&(this.day=1),i.set(this))}};var t=Date.Parsing.Operators,n=Date.Grammar,i=Date.Translator,r;n.datePartDelimiter=t.rtoken(/^([\s\-\.\,\/\x27]+)/);n.timePartDelimiter=t.stoken(":");n.whiteSpace=t.rtoken(/^\s*/);n.generalDelimiter=t.rtoken(/^(([\s\,]|at|on)+)/);u={};n.ctoken=function(n){var r=u[n],i;if(!r){var o=Date.CultureInfo.regexPatterns,f=n.split(/\s+/),e=[];for(i=0;i<f.length;i++)e.push(t.replace(t.rtoken(o[f[i]]),f[i]));r=u[n]=t.any.apply(null,e)}return r};n.ctoken2=function(n){return t.rtoken(Date.CultureInfo.regexPatterns[n])};n.h=t.cache(t.process(t.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),i.hour));n.hh=t.cache(t.process(t.rtoken(/^(0[0-9]|1[0-2])/),i.hour));n.H=t.cache(t.process(t.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),i.hour));n.HH=t.cache(t.process(t.rtoken(/^([0-1][0-9]|2[0-3])/),i.hour));n.m=t.cache(t.process(t.rtoken(/^([0-5][0-9]|[0-9])/),i.minute));n.mm=t.cache(t.process(t.rtoken(/^[0-5][0-9]/),i.minute));n.s=t.cache(t.process(t.rtoken(/^([0-5][0-9]|[0-9])/),i.second));n.ss=t.cache(t.process(t.rtoken(/^[0-5][0-9]/),i.second));n.hms=t.cache(t.sequence([n.H,n.mm,n.ss],n.timePartDelimiter));n.t=t.cache(t.process(n.ctoken2("shortMeridian"),i.meridian));n.tt=t.cache(t.process(n.ctoken2("longMeridian"),i.meridian));n.z=t.cache(t.process(t.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),i.timezone));n.zz=t.cache(t.process(t.rtoken(/^(\+|\-)\s*\d\d\d\d/),i.timezone));n.zzz=t.cache(t.process(n.ctoken2("timezone"),i.timezone));n.timeSuffix=t.each(t.ignore(n.whiteSpace),t.set([n.tt,n.zzz]));n.time=t.each(t.optional(t.ignore(t.stoken("T"))),n.hms,n.timeSuffix);n.d=t.cache(t.process(t.each(t.rtoken(/^([0-2]\d|3[0-1]|\d)/),t.optional(n.ctoken2("ordinalSuffix"))),i.day));n.dd=t.cache(t.process(t.each(t.rtoken(/^([0-2]\d|3[0-1])/),t.optional(n.ctoken2("ordinalSuffix"))),i.day));n.ddd=n.dddd=t.cache(t.process(n.ctoken("sun mon tue wed thu fri sat"),function(n){return function(){this.weekday=n}}));n.M=t.cache(t.process(t.rtoken(/^(1[0-2]|0\d|\d)/),i.month));n.MM=t.cache(t.process(t.rtoken(/^(1[0-2]|0\d)/),i.month));n.MMM=n.MMMM=t.cache(t.process(n.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),i.month));n.y=t.cache(t.process(t.rtoken(/^(\d\d?)/),i.year));n.yy=t.cache(t.process(t.rtoken(/^(\d\d)/),i.year));n.yyy=t.cache(t.process(t.rtoken(/^(\d\d?\d?\d?)/),i.year));n.yyyy=t.cache(t.process(t.rtoken(/^(\d\d\d\d)/),i.year));r=function(){return t.each(t.any.apply(null,arguments),t.not(n.ctoken2("timeContext")))};n.day=r(n.d,n.dd);n.month=r(n.M,n.MMM);n.year=r(n.yyyy,n.yy);n.orientation=t.process(n.ctoken("past future"),function(n){return function(){this.orient=n}});n.operator=t.process(n.ctoken("add subtract"),function(n){return function(){this.operator=n}});n.rday=t.process(n.ctoken("yesterday tomorrow today now"),i.rday);n.unit=t.process(n.ctoken("minute hour day week month year"),function(n){return function(){this.unit=n}});n.value=t.process(t.rtoken(/^\d\d?(st|nd|rd|th)?/),function(n){return function(){this.value=n.replace(/\D/g,"")}});n.expression=t.set([n.rday,n.operator,n.value,n.unit,n.orientation,n.ddd,n.MMM]);r=function(){return t.set(arguments,n.datePartDelimiter)};n.mdy=r(n.ddd,n.month,n.day,n.year);n.ymd=r(n.ddd,n.year,n.month,n.day);n.dmy=r(n.ddd,n.day,n.month,n.year);n.date=function(t){return(n[Date.CultureInfo.dateElementOrder]||n.mdy).call(this,t)};n.format=t.process(t.many(t.any(t.process(t.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(t){if(n[t])return n[t];throw Date.Parsing.Exception(t);}),t.process(t.rtoken(/^[^dMyhHmstz]+/),function(n){return t.ignore(t.stoken(n))}))),function(n){return t.process(t.each.apply(null,n),i.finishExact)});f={};e=function(t){return f[t]=f[t]||n.format(t)[0]};n.formats=function(n){var r,i;if(n instanceof Array){for(r=[],i=0;i<n.length;i++)r.push(e(n[i]));return t.any.apply(null,r)}return e(n)};n._formats=n.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","d"]);n._start=t.process(t.set([n.date,n.time,n.expression],n.generalDelimiter,n.whiteSpace),i.finish);n.start=function(t){try{var i=n._formats.call({},t);if(i[1].length===0)return i}catch(r){}return n._start.call({},t)}}();Date._parse=Date.parse;Date.parse=function(n){var t=null;if(!n)return null;try{t=Date.Grammar.start.call({},n)}catch(i){return null}return t[1].length===0?t[0]:null};Date.getParseFunction=function(n){var t=Date.Grammar.formats(n);return function(n){var i=null;try{i=t.call({},n)}catch(r){return null}return i[1].length===0?i[0]:null}};Date.parseExact=function(n,t){return Date.getParseFunction(t)(n)};expDateTime=(new Date).addMinutes(45);timeOutms=258e4;setTimeout("sessionWarning()",timeOutms)