var MONTH_NAMES=new Array("January","February","March","April","May","June","July","August","September","October","November","December","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"),DAY_NAMES=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sun","Mon","Tue","Wed","Thu","Fri","Sat");function LZ(a){return(a<0||a>9?"":"0")+a}function isDate(a,c){if(getDateFromFormat(a,c)==0)return false;return true}
function compareDates(a,c,b,e){a=getDateFromFormat(a,c);b=getDateFromFormat(b,e);if(a==0||b==0)return-1;else if(a>b)return 1;return 0}
function formatDate(a,c){c+="";var b="",e=0,f="",d="";f=a.getYear()+"";d=a.getMonth()+1;var k=a.getDate(),l=a.getDay(),j=a.getHours(),i=a.getMinutes(),g=a.getSeconds();a={};if(f.length<4)f=""+(f-0+1900);a.y=""+f;a.yyyy=f;a.yy=f.substring(2,4);a.M=d;a.MM=LZ(d);a.MMM=MONTH_NAMES[d-1];a.NNN=MONTH_NAMES[d+11];a.d=k;a.dd=LZ(k);a.E=DAY_NAMES[l+7];a.EE=DAY_NAMES[l];a.H=j;a.HH=LZ(j);a.h=j==0?12:j>12?j-12:j;a.hh=LZ(a.h);a.K=j>11?j-12:j;a.k=j+1;a.KK=LZ(a.K);a.kk=LZ(a.k);a.a=j>11?"PM":"AM";a.m=i;a.mm=LZ(i);
a.s=g;for(a.ss=LZ(g);e<c.length;){f=c.charAt(e);for(d="";c.charAt(e)==f&&e<c.length;)d+=c.charAt(e++);b+=a[d]!=null?a[d]:d}return b}function _isInteger(a){for(var c=0;c<a.length;c++)if("1234567890".indexOf(a.charAt(c))==-1)return false;return true}function _getInt(a,c,b,e){for(e=e;e>=b;e--){var f=a.substring(c,c+e);if(f.length<b)return null;if(_isInteger(f))return f}return null}
function getDateFromFormat(a,c){a+="";c+="";var b=0,e=0,f="",d="",k="",l,j,i=new Date;k=i.getYear();var g=i.getMonth()+1,n=1,h=i.getHours(),m=i.getMinutes();i=i.getSeconds();for(var o="";e<c.length;){f=c.charAt(e);for(d="";c.charAt(e)==f&&e<c.length;)d+=c.charAt(e++);if(d=="yyyy"||d=="yy"||d=="y"){if(d=="yyyy")j=l=4;if(d=="yy")j=l=2;if(d=="y"){l=2;j=4}k=_getInt(a,b,l,j);if(k==null)return 0;b+=k.length;if(k.length==2)k=k>70?1900+(k-0):2E3+(k-0)}else if(d=="MMM"||d=="NNN"){for(f=g=0;f<MONTH_NAMES.length;f++){var p=
MONTH_NAMES[f];if(a.substring(b,b+p.length).toLowerCase()==p.toLowerCase())if(d=="MMM"||d=="NNN"&&f>11){g=f+1;if(g>12)g-=12;b+=p.length;break}}if(g<1||g>12)return 0}else if(d=="EE"||d=="E")for(f=0;f<DAY_NAMES.length;f++){d=DAY_NAMES[f];if(a.substring(b,b+d.length).toLowerCase()==d.toLowerCase()){b+=d.length;break}}else if(d=="MM"||d=="M"){g=_getInt(a,b,d.length,2);if(g==null||g<1||g>12)return 0;b+=g.length}else if(d=="dd"||d=="d"){n=_getInt(a,b,d.length,2);if(n==null||n<1||n>31)return 0;b+=n.length}else if(d==
"hh"||d=="h"){h=_getInt(a,b,d.length,2);if(h==null||h<1||h>12)return 0;b+=h.length}else if(d=="HH"||d=="H"){h=_getInt(a,b,d.length,2);if(h==null||h<0||h>23)return 0;b+=h.length}else if(d=="KK"||d=="K"){h=_getInt(a,b,d.length,2);if(h==null||h<0||h>11)return 0;b+=h.length}else if(d=="kk"||d=="k"){h=_getInt(a,b,d.length,2);if(h==null||h<1||h>24)return 0;b+=h.length;h--}else if(d=="mm"||d=="m"){m=_getInt(a,b,d.length,2);if(m==null||m<0||m>59)return 0;b+=m.length}else if(d=="ss"||d=="s"){i=_getInt(a,b,
d.length,2);if(i==null||i<0||i>59)return 0;b+=i.length}else if(d=="a"){if(a.substring(b,b+2).toLowerCase()=="am")o="AM";else if(a.substring(b,b+2).toLowerCase()=="pm")o="PM";else return 0;b+=2}else if(a.substring(b,b+d.length)!=d)return 0;else b+=d.length}if(b!=a.length)return 0;if(g==2)if(k%4==0&&k%100!=0||k%400==0){if(n>29)return 0}else if(n>28)return 0;if(g==4||g==6||g==9||g==11)if(n>30)return 0;if(h<12&&o=="PM")h=h-0+12;else if(h>11&&o=="AM")h-=12;return(new Date(k,g-1,n,h,m,i)).getTime()}
function parseDate(a){var c=arguments.length==2?arguments[1]:false;generalFormats=new Array("y-M-d","MMM d, y","MMM d,y","y-MMM-d","d-MMM-y","MMM d");monthFirst=new Array("M/d/y","M-d-y","M.d.y","MMM-d","M/d","M-d");dateFirst=new Array("d/M/y","d-M-y","d.M.y","d-MMM","d/M","d-M");c=new Array("generalFormats",c?"dateFirst":"monthFirst",c?"monthFirst":"dateFirst");for(var b=null,e=0;e<c.length;e++)for(var f=window[c[e]],d=0;d<f.length;d++){b=getDateFromFormat(a,f[d]);if(b>0)return new Date(b)}return null}
function getAnchorPosition(a){var c=false;c={};var b=0,e=0,f=e=b=false;if(document.getElementById)b=true;else if(document.all)e=true;else if(document.layers)f=true;if(b&&document.all){b=AnchorPosition_getPageOffsetLeft(document.all[a]);e=AnchorPosition_getPageOffsetTop(document.all[a])}else if(b){a=document.getElementById(a);b=AnchorPosition_getPageOffsetLeft(a);e=AnchorPosition_getPageOffsetTop(a)}else if(e){b=AnchorPosition_getPageOffsetLeft(document.all[a]);e=AnchorPosition_getPageOffsetTop(document.all[a])}else if(f){for(e=
b=0;e<document.anchors.length;e++)if(document.anchors[e].name==a){b=1;break}if(b==0){c.x=0;c.y=0;return c}b=document.anchors[e].x;e=document.anchors[e].y}else{c.x=0;c.y=0;return c}c.x=b;c.y=e;return c}
function getAnchorWindowPosition(a){a=getAnchorPosition(a);var c=0,b=0;if(document.getElementById)if(isNaN(window.screenX)){c=a.x-document.body.scrollLeft+window.screenLeft;b=a.y-document.body.scrollTop+window.screenTop}else{c=a.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;b=a.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset}else if(document.all){c=a.x-document.body.scrollLeft+window.screenLeft;b=a.y-document.body.scrollTop+window.screenTop}else if(document.layers){c=
a.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;b=a.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset}a.x=c;a.y=b;return a}function AnchorPosition_getPageOffsetLeft(a){for(var c=a.offsetLeft;(a=a.offsetParent)!=null;)c+=a.offsetLeft;return c}function AnchorPosition_getWindowOffsetLeft(a){return AnchorPosition_getPageOffsetLeft(a)-document.body.scrollLeft}
function AnchorPosition_getPageOffsetTop(a){for(var c=a.offsetTop;(a=a.offsetParent)!=null;)c+=a.offsetTop;return c}function AnchorPosition_getWindowOffsetTop(a){return AnchorPosition_getPageOffsetTop(a)-document.body.scrollTop}function PopupWindow_getXYPosition(a){a=this.type=="WINDOW"?getAnchorWindowPosition(a):getAnchorPosition(a);this.x=a.x;this.y=a.y}function PopupWindow_setSize(a,c){this.width=a;this.height=c}function PopupWindow_populate(a){this.contents=a;this.populated=false}
function PopupWindow_refresh(){if(this.divName!=null)if(this.use_gebi)document.getElementById(this.divName).innerHTML=this.contents;else if(this.use_css)document.all[this.divName].innerHTML=this.contents;else{if(this.use_layers){var a=document.layers[this.divName];a.document.open();a.document.writeln(this.contents);a.document.close()}}else if(this.popupWindow!=null&&!this.popupWindow.closed){this.popupWindow.document.open();this.popupWindow.document.writeln(this.contents);this.popupWindow.document.close();
this.popupWindow.focus()}}
function PopupWindow_showPopup(a){this.getXYPosition(a);this.x+=this.offsetX;this.y+=this.offsetY;if(!this.populated&&this.contents!=""){this.populated=true;this.refresh()}if(this.divName!=null)if(this.use_gebi){document.getElementById(this.divName).style.left=this.x;document.getElementById(this.divName).style.top=this.y;document.getElementById(this.divName).style.visibility="visible"}else if(this.use_css){document.all[this.divName].style.left=this.x;document.all[this.divName].style.top=this.y;document.all[this.divName].style.visibility=
"visible"}else{if(this.use_layers){document.layers[this.divName].left=this.x;document.layers[this.divName].top=this.y;document.layers[this.divName].visibility="visible"}}else{if(this.popupWindow==null||this.popupWindow.closed){if(screen&&screen.availHeight)if(this.y+this.height>screen.availHeight)this.y=screen.availHeight-this.height;if(screen&&screen.availWidth)if(this.x+this.width>screen.availWidth)this.x=screen.availWidth-this.width;this.popupWindow=window.open("about:blank","window_"+a,"toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable,alwaysRaised,dependent,titlebar=no,width="+
this.width+",height="+this.height+",screenX="+this.x+",left="+this.x+",screenY="+this.y+",top="+this.y+"")}this.refresh()}}
function PopupWindow_hidePopup(){if(this.divName!=null)if(this.use_gebi)document.getElementById(this.divName).style.visibility="hidden";else if(this.use_css)document.all[this.divName].style.visibility="hidden";else{if(this.use_layers)document.layers[this.divName].visibility="hidden"}else if(this.popupWindow&&!this.popupWindow.closed){this.popupWindow.close();this.popupWindow=null}}
function PopupWindow_isClicked(a){if(this.divName!=null){if(this.use_layers){var c=a.pageX;a=a.pageY;var b=document.layers[this.divName];return c>b.left&&c<b.left+b.clip.width&&a>b.top&&a<b.top+b.clip.height?true:false}else if(document.all){for(b=window.event.srcElement;b.parentElement!=null;){if(b.id==this.divName)return true;b=b.parentElement}return false}else if(this.use_gebi){for(b=a.originalTarget;b.parentNode!=null;){if(b.id==this.divName)return true;b=b.parentNode}return false}return false}return false}
function PopupWindow_hideIfNotClicked(a){this.autoHideEnabled&&!this.isClicked(a)&&this.hidePopup()}function PopupWindow_autoHide(){this.autoHideEnabled=true}function PopupWindow_hidePopupWindows(a){for(var c=0;c<popupWindowObjects.length;c++)popupWindowObjects[c]!=null&&popupWindowObjects[c].hideIfNotClicked(a)}
function PopupWindow_attachListener(){document.layers&&document.captureEvents(Event.MOUSEUP);window.popupWindowOldEventListener=document.onmouseup;document.onmouseup=window.popupWindowOldEventListener!=null?new Function("window.popupWindowOldEventListener();PopupWindow_hidePopupWindows();"):PopupWindow_hidePopupWindows}
function PopupWindow(){if(!window.popupWindowIndex)window.popupWindowIndex=0;if(!window.popupWindowObjects)window.popupWindowObjects=[];if(!window.listenerAttached){window.listenerAttached=true;PopupWindow_attachListener()}this.index=popupWindowIndex++;popupWindowObjects[this.index]=this;this.popupWindow=this.divName=null;this.height=this.width=0;this.autoHideEnabled=this.visible=this.populated=false;this.contents="";if(arguments.length>0){this.type="DIV";this.divName=arguments[0]}else this.type=
"WINDOW";this.use_layers=this.use_css=this.use_gebi=false;if(document.getElementById)this.use_gebi=true;else if(document.all)this.use_css=true;else if(document.layers)this.use_layers=true;else this.type="WINDOW";this.offsetY=this.offsetX=0;this.getXYPosition=PopupWindow_getXYPosition;this.populate=PopupWindow_populate;this.refresh=PopupWindow_refresh;this.showPopup=PopupWindow_showPopup;this.hidePopup=PopupWindow_hidePopup;this.setSize=PopupWindow_setSize;this.isClicked=PopupWindow_isClicked;this.autoHide=
PopupWindow_autoHide;this.hideIfNotClicked=PopupWindow_hideIfNotClicked}
function CalendarPopup(){var a;if(arguments.length>0)a=new PopupWindow(arguments[0]);else{a=new PopupWindow;a.setSize(150,175)}a.offsetX=-152;a.offsetY=25;a.autoHide();a.monthNames=new Array("January","February","March","April","May","June","July","August","September","October","November","December");a.monthAbbreviations=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");a.dayHeaders=new Array("S","M","T","W","T","F","S");a.returnFunction="CalendarPopup_tmpReturnFunction";
a.returnMonthFunction="CalendarPopup_tmpReturnMonthFunction";a.returnQuarterFunction="CalendarPopup_tmpReturnQuarterFunction";a.returnYearFunction="CalendarPopup_tmpReturnYearFunction";a.weekStartDay=0;a.isShowYearNavigation=false;a.displayType="date";a.disabledWeekDays={};a.disabledDatesExpression="";a.yearSelectStartOffset=2;a.currentDate=null;a.todayText="Today";window.CalendarPopup_targetInput=null;window.CalendarPopup_dateFormat="dd/mm/yyyy";a.setReturnFunction=CalendarPopup_setReturnFunction;
a.setReturnMonthFunction=CalendarPopup_setReturnMonthFunction;a.setReturnQuarterFunction=CalendarPopup_setReturnQuarterFunction;a.setReturnYearFunction=CalendarPopup_setReturnYearFunction;a.setMonthNames=CalendarPopup_setMonthNames;a.setMonthAbbreviations=CalendarPopup_setMonthAbbreviations;a.setDayHeaders=CalendarPopup_setDayHeaders;a.setWeekStartDay=CalendarPopup_setWeekStartDay;a.setDisplayType=CalendarPopup_setDisplayType;a.setDisabledWeekDays=CalendarPopup_setDisabledWeekDays;a.addDisabledDates=
CalendarPopup_addDisabledDates;a.setYearSelectStartOffset=CalendarPopup_setYearSelectStartOffset;a.setTodayText=CalendarPopup_setTodayText;a.showYearNavigation=CalendarPopup_showYearNavigation;a.showCalendar=CalendarPopup_showCalendar;a.hideCalendar=CalendarPopup_hideCalendar;a.getStyles=CalendarPopup_getStyles;a.refreshCalendar=CalendarPopup_refreshCalendar;a.getCalendar=CalendarPopup_getCalendar;a.select=CalendarPopup_select;return a}
function CalendarPopup_tmpReturnFunction(a,c,b){if(window.CalendarPopup_targetInput!=null)window.CalendarPopup_targetInput.value=formatDate(new Date(a,c-1,b,0,0,0),window.CalendarPopup_dateFormat);else alert("Use setReturnFunction() to define which function will get the clicked results!")}function CalendarPopup_tmpReturnMonthFunction(a,c){alert("Use setReturnMonthFunction() to define which function will get the clicked results!\nYou clicked: year="+a+" , month="+c)}
function CalendarPopup_tmpReturnQuarterFunction(a,c){alert("Use setReturnQuarterFunction() to define which function will get the clicked results!\nYou clicked: year="+a+" , quarter="+c)}function CalendarPopup_tmpReturnYearFunction(a){alert("Use setReturnYearFunction() to define which function will get the clicked results!\nYou clicked: year="+a)}function CalendarPopup_setReturnFunction(a){this.returnFunction=a}function CalendarPopup_setReturnMonthFunction(a){this.returnMonthFunction=a}
function CalendarPopup_setReturnQuarterFunction(a){this.returnQuarterFunction=a}function CalendarPopup_setReturnYearFunction(a){this.returnYearFunction=a}function CalendarPopup_setMonthNames(){for(var a=0;a<arguments.length;a++)this.monthNames[a]=arguments[a]}function CalendarPopup_setMonthAbbreviations(){for(var a=0;a<arguments.length;a++)this.monthAbbreviations[a]=arguments[a]}function CalendarPopup_setDayHeaders(){for(var a=0;a<arguments.length;a++)this.dayHeaders[a]=arguments[a]}
function CalendarPopup_setWeekStartDay(a){this.weekStartDay=a}function CalendarPopup_showYearNavigation(){this.isShowYearNavigation=true}function CalendarPopup_setDisplayType(a){if(a!="date"&&a!="week-end"&&a!="month"&&a!="quarter"&&a!="year"){alert("Invalid display type! Must be one of: date,week-end,month,quarter,year");return false}this.displayType=a}function CalendarPopup_setYearSelectStartOffset(a){this.yearSelectStartOffset=a}
function CalendarPopup_setDisabledWeekDays(){this.disabledWeekDays={};for(var a=0;a<arguments.length;a++)this.disabledWeekDays[arguments[a]]=true}
function CalendarPopup_addDisabledDates(a,c){if(arguments.length==1)c=a;if(!(a==null&&c==null)){if(this.disabledDatesExpression!="")this.disabledDatesExpression+="||";if(a!=null){a=parseDate(a);a=""+a.getFullYear()+LZ(a.getMonth()+1)+LZ(a.getDate())}if(c!=null){c=parseDate(c);c=""+c.getFullYear()+LZ(c.getMonth()+1)+LZ(c.getDate())}this.disabledDatesExpression+=a==null?"(ds<="+c+")":c==null?"(ds>="+a+")":"(ds>="+a+"&&ds<="+c+")"}}function CalendarPopup_setTodayText(a){this.todayText=a}
function CalendarPopup_hideCalendar(){arguments.length>0?window.popupWindowObjects[arguments[0]].hidePopup():this.hidePopup()}function CalendarPopup_refreshCalendar(a){var c=window.popupWindowObjects[a];arguments.length>1?c.populate(c.getCalendar(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5])):c.populate(c.getCalendar());c.refresh()}
function CalendarPopup_showCalendar(a){if(arguments.length>1)this.currentDate=arguments[1]==null||arguments[1]==""?new Date:new Date(parseDate(arguments[1]));this.populate(this.getCalendar());this.showPopup(a)}
function CalendarPopup_select(a,c,b){var e=arguments.length>3?arguments[3]:null;if(window.getDateFromFormat)if(this.displayType!="date"&&this.displayType!="week-end")alert("calendar.select: This function can only be used with displayType 'date' or 'week-end'");else if(a.type!="text"&&a.type!="hidden"&&a.type!="textarea"){alert("calendar.select: Input object passed is not a valid form input object");window.CalendarPopup_targetInput=null}else{window.CalendarPopup_targetInput=a;this.currentDate=null;
var f=0;if(e!=null)f=getDateFromFormat(e,b);else if(a.value!="")f=getDateFromFormat(a.value,b);if(e!=null||a.value!="")this.currentDate=f==0?null:new Date(f);window.CalendarPopup_dateFormat=b;this.showCalendar(c)}else alert("calendar.select: To use this method you must also include 'date.js' for date formatting")}
function CalendarPopup_getStyles(){var a="";a+="<STYLE>\n";a+="TD.cal,TD.calday,TD.calmonth,TD.caltoday,A.textlink,.disabledtextlink{font-family:arial;font-size: 8pt;}\n";a+="TD.calday{border:solid thin #C0C0C0;border-width:0 0 1 0;}\n";a+="TD.calmonth{text-align:right;}\n";a+="TD.caltoday{text-align:right;color:white;background-color:#C0C0C0;border-width:1;border:solid thing #800000;}\n";a+="TD.textlink{border:solid thin #C0C0C0;border-width:1 0 0 0;}\n";a+="A.textlink{height:20px;color:black;}\n";
a+=".disabledtextlink{height:20px;color:#808080;}\n";a+="A.cal{text-decoration:none;color:#000000;}\n";a+="A.calthismonth{text-decoration:none;color:#000000;}\n";a+="A.calothermonth{text-decoration:none;color:#808080;}\n";a+=".calnotclickable{color:#808080;}\n";a+=".disabled{color:#D0D0D0;text-decoration:line-through;}\n";a+="</STYLE>\n";return a}
function CalendarPopup_getCalendar(){var a=new Date,c=this.type=="WINDOW"?"window.opener.":"",b="";if(this.type=="WINDOW"){b+="<HTML><HEAD><TITLE>Calendar</TITLE>"+this.getStyles()+"</HEAD><BODY MARGINWIDTH=0 MARGINHEIGHT=0 TOPMARGIN=0 RIGHTMARGIN=0 LEFTMARGIN=0>\n";b+="<CENTER><TABLE WIDTH=100% BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>\n"}else{b+='<TABLE WIDTH=144 BORDER=1 BORDERWIDTH=1 BORDERCOLOR="#808080" CELLSPACING=0 CELLPADDING=1>\n';b+="<TR><TD ALIGN=CENTER>\n";b+="<CENTER>\n"}if(this.displayType==
"date"||this.displayType=="week-end"){if(this.currentDate==null)this.currentDate=a;var e=arguments.length>0?arguments[0]:this.currentDate.getMonth()+1,f=arguments.length>1?arguments[1]:this.currentDate.getFullYear(),d=new Array(0,31,28,31,30,31,30,31,31,30,31,30,31);if(f%4==0&&f%100!=0||f%400==0)d[2]=29;var k=f,l=e,j=1,i=(new Date(f,e-1,1)).getDay(),g=0;g=i>=this.weekStartDay?i-this.weekStartDay:7-this.weekStartDay+i;if(g>0){l--;if(l<1){l=12;k--}j=d[l]-g+1}g=e+1;var n=f;if(g>12){g=1;n++}var h=e-1,
m=f;if(h<1){h=12;m--}var o;if(this.type!="WINDOW")b+="<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";b+='<TR BGCOLOR="#C0C0C0">\n';var p="javascript:"+c+"CalendarPopup_refreshCalendar";i='<TD BGCOLOR="#C0C0C0" CLASS="cal" ALIGN=CENTER VALIGN=MIDDLE WIDTH=';if(this.isShowYearNavigation){b+=i+'10><B><A CLASS="cal" HREF="'+p+"("+this.index+","+h+","+m+');">&lt;</A></B></TD>';b+=i+"58>"+this.monthNames[e-1]+"</TD>";b+=i+'10><B><A CLASS="cal" HREF="'+p+"("+this.index+","+g+","+n+
');">&gt;</A></B></TD>';b+=i+"10>&nbsp;</TD>";b+=i+'10><B><A CLASS="cal" HREF="'+p+"("+this.index+","+e+","+(f-1)+');">&lt;</A></B></TD>';b+=i+"36>"+f+"</TD>";b+=i+'10><B><A CLASS="cal" HREF="'+p+"("+this.index+","+e+","+(f+1)+');">&gt;</A></B></TD>'}else{b+=i+'22><B><A CLASS="cal" HREF="'+p+"("+this.index+","+h+","+m+');">&lt;&lt;</A></B></TD>\n';b+=i+"100>"+this.monthNames[e-1]+" "+f+"</TD>\n";b+=i+'22><B><A CLASS="cal" HREF="'+p+"("+this.index+","+g+","+n+');">&gt;&gt;</A></B></TD>\n'}b+="</TR></TABLE>\n";
b+="<TABLE WIDTH=120 BORDER=0 CELLSPACING=0 CELLPADDING=1 ALIGN=CENTER>\n";b+="<TR>\n";i='\t<TD CLASS="calday" ALIGN=RIGHT WIDTH=14%>';for(g=0;g<7;g++)b+=i+this.dayHeaders[(this.weekStartDay+g)%7]+"</TD>\n";b+="</TR>\n";for(i=1;i<=6;i++){b+="<TR>\n";for(g=1;g<=7;g++){o=l==e?"calthismonth":"calothermonth";td_class=l==this.currentDate.getMonth()+1&&j==this.currentDate.getDate()&&k==this.currentDate.getFullYear()?"caltoday":"calmonth";if(this.disabledDatesExpression!=""){n=""+k+LZ(l)+LZ(j);eval("disabled=("+
this.disabledDatesExpression+")")}if(this.disabledWeekDays[g-1]){o="calnotclickable";b+='\t<TD CLASS="'+td_class+'"><SPAN CLASS="'+o+'">'+j+"</SPAN></TD>\n"}else{m=j;n=l;h=k;if(this.displayType=="week-end"){m=new Date(h,n-1,m,0,0,0,0);m.setDate(m.getDate()+(7-g));h=m.getYear();if(h<1E3)h+=1900;n=m.getMonth()+1;m=m.getDate()}b+='\t<TD CLASS="'+td_class+'"><A HREF="javascript:'+c+this.returnFunction+"("+h+","+n+","+m+");"+c+"CalendarPopup_hideCalendar('"+this.index+'\');" CLASS="'+o+'">'+j+"</A></TD>\n"}j++;
if(j>d[l]){j=1;l++}if(l>12){l=1;k++}}b+="</TR>"}e=a.getDay();b+="<TR>\n";b+='\t<TD COLSPAN=7 ALIGN=CENTER CLASS="textlink">\n';b+=this.disabledWeekDays[e+1]?'\t\t<SPAN CLASS="disabledtextlink">'+this.todayText+"</SPAN>\n":'\t\t<A CLASS="textlink" HREF="javascript:'+c+this.returnFunction+"('"+a.getFullYear()+"','"+(a.getMonth()+1)+"','"+a.getDate()+"');"+c+"CalendarPopup_hideCalendar('"+this.index+"');\">"+this.todayText+"</A>\n";b+="\t\t<BR>\n";b+="\t</TD></TR></TABLE></CENTER></TD></TR></TABLE>\n"}if(this.displayType==
"month"||this.displayType=="quarter"||this.displayType=="year"){f=arguments.length>0?arguments[0]:this.displayType=="year"?a.getFullYear()-this.yearSelectStartOffset:a.getFullYear();if(this.displayType!="year"&&this.isShowYearNavigation){b+="<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";b+='<TR BGCOLOR="#C0C0C0">\n';b+='\t<TD BGCOLOR="#C0C0C0" CLASS="cal" WIDTH=22 ALIGN=CENTER VALIGN=MIDDLE><B><A CLASS="cal" HREF="javascript:'+c+"CalendarPopup_refreshCalendar("+this.index+
","+(f-1)+');">&lt;&lt;</A></B></TD>\n';b+='\t<TD BGCOLOR="#C0C0C0" CLASS="cal" WIDTH=100 ALIGN=CENTER>'+f+"</TD>\n";b+='\t<TD BGCOLOR="#C0C0C0" CLASS="cal" WIDTH=22 ALIGN=CENTER VALIGN=MIDDLE><B><A CLASS="cal" HREF="javascript:'+c+"CalendarPopup_refreshCalendar("+this.index+","+(f+1)+');">&gt;&gt;</A></B></TD>\n';b+="</TR></TABLE>\n"}}if(this.displayType=="month"){b+="<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n";for(a=0;a<4;a++){b+="<TR>";for(g=0;g<3;g++){e=a*3+g;b+='<TD WIDTH=33% ALIGN=CENTER><A CLASS="textlink" HREF="javascript:'+
c+this.returnMonthFunction+"("+f+","+(e+1)+");"+c+"CalendarPopup_hideCalendar('"+this.index+'\');" CLASS="'+o+'">'+this.monthAbbreviations[e]+"</A></TD>"}b+="</TR>"}b+="</TABLE></CENTER></TD></TR></TABLE>\n"}if(this.displayType=="quarter"){b+="<BR><TABLE WIDTH=120 BORDER=1 CELLSPACING=0 CELLPADDING=0 ALIGN=CENTER>\n";for(a=0;a<2;a++){b+="<TR>";for(g=0;g<2;g++){e=a*2+g+1;b+='<TD WIDTH=50% ALIGN=CENTER><BR><A CLASS="textlink" HREF="javascript:'+c+this.returnQuarterFunction+"("+f+","+e+");"+c+"CalendarPopup_hideCalendar('"+
this.index+'\');" CLASS="'+o+'">Q'+e+"</A><BR><BR></TD>"}b+="</TR>"}b+="</TABLE></CENTER></TD></TR></TABLE>\n"}if(this.displayType=="year"){b+="<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";b+='<TR BGCOLOR="#C0C0C0">\n';b+='\t<TD BGCOLOR="#C0C0C0" CLASS="cal" WIDTH=50% ALIGN=CENTER VALIGN=MIDDLE><B><A CLASS="cal" HREF="javascript:'+c+"CalendarPopup_refreshCalendar("+this.index+","+(f-8)+');">&lt;&lt;</A></B></TD>\n';b+='\t<TD BGCOLOR="#C0C0C0" CLASS="cal" WIDTH=50% ALIGN=CENTER VALIGN=MIDDLE><B><A CLASS="cal" HREF="javascript:'+
c+"CalendarPopup_refreshCalendar("+this.index+","+(f+8)+');">&gt;&gt;</A></B></TD>\n';b+="</TR></TABLE>\n";b+="<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n";for(a=0;a<4;a++){for(g=0;g<2;g++){e=f+g*4+a;b+='<TD WIDTH=50% ALIGN=CENTER><A CLASS="textlink" HREF="javascript:'+c+this.returnYearFunction+"("+e+");"+c+"CalendarPopup_hideCalendar('"+this.index+'\');" CLASS="'+o+'">'+e+"</A></TD>"}b+="</TR>"}b+="</TABLE></CENTER></TD></TR></TABLE>\n"}if(this.type=="WINDOW")b+="</BODY></HTML>\n";
return b};