var cbcalDefaultDateFormat="MM/DD/YYYY";var cbcalHideWait=4;var cbcalY2kPivotPoint=76;var cbcalUnselectedMonthText="";var cbcalFontSize=11;var cbcalFontSizeDay=14;var cbcalFontFamily="Tahoma";var cbcalCellWidth=26;var cbcalCellHeight=24;var cbcalImageURL=cbTemplateDir+"calendar_icon.jpg";var cbcalNextURL=cbTemplateDir+"calendar_next.gif";var cbcalPrevURL=cbTemplateDir+"calendar_prev.gif";var cbcalCalBGColor="#F4F4F4";var cbcalTopRowBGColor="#DDD";var cbcalDayBGColor="#CCCCFF";var cbcalZCounter=100;var cbcalToday=new Date();var cbcalWeekDays=Calendar._SDN;var cbcalMonthDays=new Array(31,28,31,30,31,30,31,31,30,31,30,31);var cbcalMonthNames=Calendar._MN;function cbcalYearDigitsOnly(b){var a=(b.keyCode)?b.keyCode:b.which;return((a==8)||(a==9)||(a==37)||(a==39)||(a==46)||((a>47)&&(a<58)))}function cbcalGetTagPixels(a,c){var b=(c=="LEFT")?a.offsetLeft:a.offsetTop;while((a.tagName!="BODY")&&(a.tagName!="HTML")){a=a.offsetParent;b+=(c=="LEFT")?a.offsetLeft:a.offsetTop}return b}function cbcalBehindCal(c,e,f,b,i,g){var a=cbcalGetTagPixels(c,"LEFT");var d=a+c.offsetWidth;var h=g+c.offsetHeight;return(((gb))&&((ae)))}function cbcalFixSelectLists(k){if(navigator.appName=="Microsoft Internet Explorer"){var g=this.getCalendar();var e=g.offsetLeft;var f=e+g.offsetWidth;var a=g.offsetTop;var h=a+(cbcalCellHeight*9);var b=false;formLoop:for(var c=this.formNumber;c4))||((this.displayed.dayCount==30)&&(this.displayed.firstDay==6))){c=6}else{if((this.displayed.dayCount==28)&&(this.displayed.firstDay==0)){c=4}}var d='';for(var a=0;a";for(var b=1;b<=7;b++){Day=(a*7)+(b-this.displayed.firstDay);if((Day>=1)&&(Day<=this.displayed.dayCount)){if((this.displayed.yearValue==this.picked.yearValue)&&(this.displayed.monthIndex==this.picked.monthIndex)&&(Day==this.picked.day)){TextStyle="color:white;font-weight:bold;";BackColor=cbcalDayBGColor}else{TextStyle="color:black;";BackColor=cbcalCalBGColor}if((this.displayed.yearValue==cbcalToday.getFullYear())&&(this.displayed.monthIndex==cbcalToday.getMonth())&&(Day==cbcalToday.getDate())){TextStyle+="border:1px solid darkred;padding:0px;"}d+='"}else{d+=''}}d+=""}return d+="
"+Day+" 
"}function cbcalGetGoodYear(c){if(c>100){return c}else{var b=parseInt(c,10)%100;var a=(b=f)?c.options[f+e]=null:c.options[b+e]=new Option(b+1,b+1)}a=Math.min(a,f);c.options[a-1+e].selected=true}return a}function cbcalFixYearList(e,b){var c=((e.options[0].value=="")?1:0);if(e.options[1].value<100){b=b%100}var d=e.options[e.selectedIndex].value;for(var a=c;a=0){var a="/"}else{if(e.indexOf("-")>=0){var a="-"}else{if(e.indexOf(".")>=0){var a="."}else{var a=""}}}if(/DD?.?((MON)|(MM?M?))/.test(e)){this.formatted=this.dayPad+a;this.formatted+=(RegExp.$1.length==3)?this.monthShort:this.monthPad}else{if(/((MON)|(MM?M?))?.?DD?/.test(e)){this.formatted=(RegExp.$1.length==3)?this.monthShort:this.monthPad;this.formatted+=a+this.dayPad}}this.formatted=(e.substr(0,2)=="YY")?this.yearPad+a+this.formatted:this.formatted+a+this.yearPad}function cbcalDisplayMonthObject(d,c,b,a){(Function.call)?cbcalDateObject.call(this,c,b,a):cbcalDateObject(this,c,b,a);this.displayID=d.hiddenFieldName+"_Current_ID";this.getDisplay=new Function("return document.getElementById(this.displayID)");this.dayHover=cbcalDayCellHover;this.goCurrent=new Function(d.objName+".getCalendar().style.zIndex=++cbcalZCounter;"+d.objName+".setDisplayed(cbcalToday.getFullYear(),cbcalToday.getMonth());");if(d.formNumber>=0){this.getDisplay().innerHTML=this.fullName}}function cbcalNeighborMonthObject(b,a,c){(Function.call)?cbcalDateObject.call(this,c):cbcalDateObject(this,c);this.buttonID=b.hiddenFieldName+"_"+a+"_ID";this.hover=new Function("C","O","cbcalNeighborHover(C,O,this)");this.getButton=new Function("return document.getElementById(this.buttonID)");this.go=new Function(b.objName+".getCalendar().style.zIndex=++cbcalZCounter;"+b.objName+".setDisplayed(this.yearValue,this.monthIndex);");if(b.formNumber>=0){this.getButton().title=this.monthName}}function cbcalSetDisplayedMonth(b,a){this.displayed=new cbcalDisplayMonthObject(this,b,a,1);this.previous=new cbcalNeighborMonthObject(this,"Previous",this.displayed.date.getTime()-86400000);this.next=new cbcalNeighborMonthObject(this,"Next",this.displayed.date.getTime()+(86400000*(this.displayed.dayCount+1)));if(this.formNumber>=0){this.getDayTable().innerHTML=this.buildCalendar()}}function cbcalSetPickedMonth(b,c,a){this.picked=new cbcalStoredMonthObject(this.format,b,c,a);this.setHidden(this.picked.formatted);this.setDisplayed(b,c)}function cbcalCalendarObject(g,k,f,a){this.hiddenFieldName=g;this.monthListID=g+"_Month_ID";this.dayListID=g+"_Day_ID";this.yearFieldID=g+"_Year_ID";this.monthDisplayID=g+"_Current_ID";this.calendarID=g+"_ID";this.dayTableID=g+"_DayTable_ID";this.calendarLinkID=this.calendarID+"_Link";this.timerID=this.calendarID+"_Timer";this.objName=g+"_Object";this.format=k;this.formNumber=-1;this.picked=null;this.displayed=null;this.previous=null;this.next=null;this.yeardropdownstop=a;this.setPicked=cbcalSetPickedMonth;this.setDisplayed=cbcalSetDisplayedMonth;this.checkYear=cbcalCheckYearInput;this.fixYear=FixYearInput;this.changeYear=cbcalCheckYearChange;this.changeMonth=cbcalCheckMonthChange;this.changeDay=cbcalCheckDayChange;this.resetTimer=cbcalCalTimerReset;this.hideElements=cbcalSetElementStatus;this.show=cbcalShowCalendar;this.handleTimer=cbcalDoTimer;this.iconHover=cbcalCalIconHover;this.buildCalendar=cbcalBuildCalendarDays;this.pickDay=cbcalPickDisplayDay;this.fixSelects=cbcalFixSelectLists;this.setHidden=new Function("D","if (this.formNumber >= 0) this.getHiddenField().value=D");this.getHiddenField=new Function("return document.forms[this.formNumber].elements[this.hiddenFieldName]");this.getMonthList=new Function("return document.getElementById(this.monthListID)");this.getDayList=new Function("return document.getElementById(this.dayListID)");this.getYearField=new Function("return document.getElementById(this.yearFieldID)");this.getCalendar=new Function("return document.getElementById(this.calendarID)");this.getDayTable=new Function("return document.getElementById(this.dayTableID)");this.getCalendarLink=new Function("return document.getElementById(this.calendarLinkID)");this.getMonthDisplay=new Function("return document.getElementById(this.monthDisplayID)");this.isShowing=new Function("return !(this.getCalendar().style.visibility != 'visible')");function i(l){for(var m=0;m';if(!Required){var NoneSelected=(DefaultDate=="")?" selected":"";r+='"}for(var i=0;i<12;i++){var MonthSelected=((DefaultDate!="")&&(eval(DateName+"_Object.picked.monthIndex")==i))?" selected":"";r+='"}r+="";return r}function cbcalHtmlDay(DateName,Required,DefaultDate,InitialStatus){var r='";return r}function cbcalHtmlYearDropDown(DateName,Required,DefaultDate,InitialStatus,YearDropDownStop,YearMin,YearMax){var r='";return r}function cbcalHtmlYear(DateName,Required,DefaultDate,InitialStatus){return"'}function cbcalHtmlYmdReplace(i,f,o,h,b,a,j,p){var e=cbcalHtmlMonth(i,f,h,b);var k=cbcalHtmlDay(i,f,h,b);if(a==""){var n=cbcalHtmlYear(i,f,h,b)}else{var n=cbcalHtmlYearDropDown(i,f,h,b,a,j,p)}var l=0;var g=o.replace(/(Y{2,4})|((MON)|(MM?M?))|(DD?)/g,function(c){var d="";if(/(Y{2,4})/g.test(c)){d=n}else{if(/((MON)|(MM?M?))/.test(c)){d=e}else{if(/(DD?)/.test(c)){d=k}}}if(l++){d="  "+d}d+=" ";return d});return g}function cbcalDateHtml(DateName,Required,DateFormat,DefaultDate,DateFieldName,AdditionalInputAttributes,YearDropDownStop,YearMin,YearMax){var calhtml;if(arguments.length==0){calhtml=("ERROR: Missing required parameter in call to 'cbcalDateInput': [name of hidden date field].")}else{if(arguments.length<3){DateFormat=cbcalDefaultDateFormat;if(arguments.length<2){Required=false}}else{if(/^(Y{2,4}(-|\/|\.)?)?((MON)|(MM?M?)|(DD?))(-|\/|\.)?((MON)|(MM?M?)|(DD?))((-|\/|\.)Y{2,4})?$/i.test(DateFormat)){DateFormat=DateFormat.toUpperCase()}else{var AlertMessage="WARNING: The supplied date format for the '"+DateName+"' field is not valid: "+DateFormat+"\nTherefore, the default date format will be used instead: "+cbcalDefaultDateFormat;DateFormat=cbcalDefaultDateFormat;if(arguments.length==4){var CurrentDate=new cbcalStoredMonthObject(DateFormat,cbcalToday.getFullYear(),cbcalToday.getMonth(),cbcalToday.getDate());AlertMessage+="\n\nThe supplied date ("+DefaultDate+") cannot be interpreted with the invalid format.\nTherefore, the current system date will be used instead: "+CurrentDate.formatted;DefaultDate=CurrentDate.formatted}alert(AlertMessage)}}if(!CurrentDate){var CurrentDate=new cbcalStoredMonthObject(DateFormat,cbcalToday.getFullYear(),cbcalToday.getMonth(),cbcalToday.getDate())}if((arguments.length<4)||(DefaultDate=="")){DefaultDate=(Required)?CurrentDate.formatted:""}if(arguments.length<5){DateFieldName=DateName}if(arguments.length<6){AdditionalInputAttributes=""}if(arguments.length<7){YearDropDownStop="1"}if(arguments.length<8){YearMin=null}if(arguments.length<9){YearMax=null}eval(DateName+"_Object=new cbcalCalendarObject('"+DateName+"','"+DateFormat+"','"+DefaultDate+"','"+YearDropDownStop+"')");if((Required)||((arguments.length>=4)&&(DefaultDate!=""))){var InitialStatus="";var InitialDate=eval(DateName+"_Object.picked.formatted")}else{var InitialStatus=' style="visibility:hidden"';var InitialDate="";eval(DateName+"_Object.setPicked("+cbcalToday.getFullYear()+","+cbcalToday.getMonth()+","+cbcalToday.getDate()+")")}calhtml=('');for(var f=0;f ');calhtml+=('"+String.fromCharCode(13)+"")}return calhtml}function cbcalDateInput(e,c,h,d,b,i,a,f,g){if(arguments.length<5){b=e}if(arguments.length<6){i=""}if(arguments.length<7){a="1"}if(arguments.length<8){f=null}if(arguments.length<9){g=null}document.write('");document.write(cbcalDateHtml(e,c,h,d,b,i,a,f,g))};