function getAnchorPosition(B){var E=false;var J=new Object();var I=0,G=0;var D=false,F=false,H=false;if(document.getElementById){D=true}else{if(document.all){F=true}else{if(document.layers){H=true}}}if(D&&document.all){I=AnchorPosition_getPageOffsetLeft(document.all[B]);G=AnchorPosition_getPageOffsetTop(document.all[B])}else{if(D){var A=document.getElementById(B);I=AnchorPosition_getPageOffsetLeft(A);G=AnchorPosition_getPageOffsetTop(A)}else{if(F){I=AnchorPosition_getPageOffsetLeft(document.all[B]);G=AnchorPosition_getPageOffsetTop(document.all[B])}else{if(H){var K=0;for(var C=0;C<document.anchors.length;C++){if(document.anchors[C].name==B){K=1;break}}if(K==0){J.x=0;J.y=0;return J}I=document.anchors[C].x;G=document.anchors[C].y}else{J.x=0;J.y=0;return J}}}}J.x=I;J.y=G;return J}function getAnchorWindowPosition(B){var C=getAnchorPosition(B);var A=0;var D=0;if(document.getElementById){if(isNaN(window.screenX)){A=C.x-document.body.scrollLeft+window.screenLeft;D=C.y-document.body.scrollTop+window.screenTop}else{A=C.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;D=C.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset}}else{if(document.all){A=C.x-document.body.scrollLeft+window.screenLeft;D=C.y-document.body.scrollTop+window.screenTop}else{if(document.layers){A=C.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;D=C.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset}}}C.x=A;C.y=D;return C}function AnchorPosition_getPageOffsetLeft(B){var A=B.offsetLeft;while((B=B.offsetParent)!=null){A+=B.offsetLeft}return A}function AnchorPosition_getWindowOffsetLeft(A){return AnchorPosition_getPageOffsetLeft(A)-document.body.scrollLeft}function AnchorPosition_getPageOffsetTop(A){var B=A.offsetTop;while((A=A.offsetParent)!=null){B+=A.offsetTop}return B}function AnchorPosition_getWindowOffsetTop(A){return AnchorPosition_getPageOffsetTop(A)-document.body.scrollTop}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");var 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(C,B){var A=getDateFromFormat(C,B);if(A==0){return false}return true}function compareDates(E,F,C,D){var B=getDateFromFormat(E,F);var A=getDateFromFormat(C,D);if(B==0||A==0){return -1}else{if(B>A){return 1}}return 0}function formatDate(f,a){a=a+"";var J="";var T=0;var e="";var D="";var I=f.getYear()+"";var F=f.getMonth()+1;var b=f.getDate();var N=f.getDay();var L=f.getHours();var V=f.getMinutes();var P=f.getSeconds();var R,S,B,Q,g,C,Z,Y,W,O,j,L,i,G,A,X;var U=new Object();if(I.length<4){I=""+(I-0+1900)}U.y=""+I;U.yyyy=I;U.yy=I.substring(2,4);U.M=F;U.MM=LZ(F);U.MMM=MONTH_NAMES[F-1];U.NNN=MONTH_NAMES[F+11];U.d=b;U.dd=LZ(b);U.E=DAY_NAMES[N+7];U.EE=DAY_NAMES[N];U.H=L;U.HH=LZ(L);if(L==0){U.h=12}else{if(L>12){U.h=L-12}else{U.h=L}}U.hh=LZ(U.h);if(L>11){U.K=L-12}else{U.K=L}U.k=L+1;U.KK=LZ(U.K);U.kk=LZ(U.k);if(L>11){U.a="PM"}else{U.a="AM"}U.m=V;U.mm=LZ(V);U.s=P;U.ss=LZ(P);while(T<a.length){e=a.charAt(T);D="";while((a.charAt(T)==e)&&(T<a.length)){D+=a.charAt(T++)}if(U[D]!=null){J=J+U[D]}else{J=J+D}}return J}function _isInteger(C){var B="1234567890";for(var A=0;A<C.length;A++){if(B.indexOf(C.charAt(A))==-1){return false}}return true}function _getInt(F,D,E,C){for(var A=C;A>=E;A--){var B=F.substring(D,D+A);if(B.length<E){return null}if(_isInteger(B)){return B}}return null}function getDateFromFormat(U,N){U=U+"";N=N+"";var T=0;var J=0;var P="";var E="";var S="";var G,F;var B=new Date();var H=B.getYear();var R=B.getMonth()+1;var Q=1;var C=B.getHours();var O=B.getMinutes();var L=B.getSeconds();var I="";while(J<N.length){P=N.charAt(J);E="";while((N.charAt(J)==P)&&(J<N.length)){E+=N.charAt(J++)}if(E=="yyyy"||E=="yy"||E=="y"){if(E=="yyyy"){G=4;F=4}if(E=="yy"){G=2;F=2}if(E=="y"){G=2;F=4}H=_getInt(U,T,G,F);if(H==null){return 0}T+=H.length;if(H.length==2){if(H>70){H=1900+(H-0)}else{H=2000+(H-0)}}}else{if(E=="MMM"||E=="NNN"){R=0;for(var M=0;M<MONTH_NAMES.length;M++){var D=MONTH_NAMES[M];if(U.substring(T,T+D.length).toLowerCase()==D.toLowerCase()){if(E=="MMM"||(E=="NNN"&&M>11)){R=M+1;if(R>12){R-=12}T+=D.length;break}}}if((R<1)||(R>12)){return 0}}else{if(E=="EE"||E=="E"){for(var M=0;M<DAY_NAMES.length;M++){var K=DAY_NAMES[M];if(U.substring(T,T+K.length).toLowerCase()==K.toLowerCase()){T+=K.length;break}}}else{if(E=="MM"||E=="M"){R=_getInt(U,T,E.length,2);if(R==null||(R<1)||(R>12)){return 0}T+=R.length}else{if(E=="dd"||E=="d"){Q=_getInt(U,T,E.length,2);if(Q==null||(Q<1)||(Q>31)){return 0}T+=Q.length}else{if(E=="hh"||E=="h"){C=_getInt(U,T,E.length,2);if(C==null||(C<1)||(C>12)){return 0}T+=C.length}else{if(E=="HH"||E=="H"){C=_getInt(U,T,E.length,2);if(C==null||(C<0)||(C>23)){return 0}T+=C.length}else{if(E=="KK"||E=="K"){C=_getInt(U,T,E.length,2);if(C==null||(C<0)||(C>11)){return 0}T+=C.length}else{if(E=="kk"||E=="k"){C=_getInt(U,T,E.length,2);if(C==null||(C<1)||(C>24)){return 0}T+=C.length;C--}else{if(E=="mm"||E=="m"){O=_getInt(U,T,E.length,2);if(O==null||(O<0)||(O>59)){return 0}T+=O.length}else{if(E=="ss"||E=="s"){L=_getInt(U,T,E.length,2);if(L==null||(L<0)||(L>59)){return 0}T+=L.length}else{if(E=="a"){if(U.substring(T,T+2).toLowerCase()=="am"){I="AM"}else{if(U.substring(T,T+2).toLowerCase()=="pm"){I="PM"}else{return 0}}T+=2}else{if(U.substring(T,T+E.length)!=E){return 0}else{T+=E.length}}}}}}}}}}}}}}if(T!=U.length){return 0}if(R==2){if(((H%4==0)&&(H%100!=0))||(H%400==0)){if(Q>29){return 0}}else{if(Q>28){return 0}}}if((R==4)||(R==6)||(R==9)||(R==11)){if(Q>30){return 0}}if(C<12&&I=="PM"){C=C-0+12}else{if(C>11&&I=="AM"){C-=12}}var A=new Date(H,R-1,Q,C,O,L);return A.getTime()}function parseDate(G){var E=(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");var B=new Array("generalFormats",E?"dateFirst":"monthFirst",E?"monthFirst":"dateFirst");var F=null;for(var D=0;D<B.length;D++){var A=window[B[D]];for(var C=0;C<A.length;C++){F=getDateFromFormat(G,A[C]);if(F!=0){return new Date(F)}}}return null}function PopupWindow_getXYPosition(A){var B;if(this.type=="WINDOW"){B=getAnchorWindowPosition(A)}else{B=getAnchorPosition(A)}this.x=B.x;this.y=B.y}function PopupWindow_setSize(B,A){this.width=B;this.height=A}function PopupWindow_populate(A){this.contents=A;this.populated=false}function PopupWindow_setUrl(A){this.url=A}function PopupWindow_setWindowProperties(A){this.windowProperties=A}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){if(this.url!=""){this.popupWindow.location.href=this.url}else{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+"px";document.getElementById(this.divName).style.top=this.y+"px";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(this.x<0){this.x=0}if(this.y<0){this.y=0}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}}var B=window.opera||(document.layers&&!navigator.mimeTypes["*"])||navigator.vendor=="KDE"||(document.childNodes&&!document.all&&!navigator.taintEnabled);this.popupWindow=window.open(B?"":"about:blank","window_"+A,this.windowProperties+",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(C){if(this.divName!=null){if(this.use_layers){var D=C.pageX;var B=C.pageY;var A=document.layers[this.divName];if((D>A.left)&&(D<A.left+A.clip.width)&&(B>A.top)&&(B<A.top+A.clip.height)){return true}else{return false}}else{if(document.all){var A=window.event.srcElement;while(A.parentElement!=null){if(A.id==this.divName){return true}A=A.parentElement}return false}else{if(this.use_gebi&&C){var A=C.originalTarget;while(A.parentNode!=null){if(A.id==this.divName){return true}A=A.parentNode}return false}}}return false}return false}function PopupWindow_hideIfNotClicked(A){if(this.autoHideEnabled&&!this.isClicked(A)){this.hidePopup()}}function PopupWindow_autoHide(){this.autoHideEnabled=true}function PopupWindow_hidePopupWindows(C){for(var A=0;A<popupWindowObjects.length;A++){if(popupWindowObjects[A]!=null){var B=popupWindowObjects[A];B.hideIfNotClicked(C)}}}function PopupWindow_attachListener(){if(document.layers){document.captureEvents(Event.MOUSEUP)}window.popupWindowOldEventListener=document.onmouseup;if(window.popupWindowOldEventListener!=null){document.onmouseup=new Function("window.popupWindowOldEventListener(); PopupWindow_hidePopupWindows();")}else{document.onmouseup=PopupWindow_hidePopupWindows}}function PopupWindow(){if(!window.popupWindowIndex){window.popupWindowIndex=0}if(!window.popupWindowObjects){window.popupWindowObjects=new Array()}if(!window.listenerAttached){window.listenerAttached=true;PopupWindow_attachListener()}this.index=popupWindowIndex++;popupWindowObjects[this.index]=this;this.divName=null;this.popupWindow=null;this.width=0;this.height=0;this.populated=false;this.visible=false;this.autoHideEnabled=false;this.contents="";this.url="";this.windowProperties="toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable,alwaysRaised,dependent,titlebar=no";if(arguments.length>0){this.type="DIV";this.divName=arguments[0]}else{this.type="WINDOW"}this.use_gebi=false;this.use_css=false;this.use_layers=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.offsetX=0;this.offsetY=0;this.getXYPosition=PopupWindow_getXYPosition;this.populate=PopupWindow_populate;this.setUrl=PopupWindow_setUrl;this.setWindowProperties=PopupWindow_setWindowProperties;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="CP_tmpReturnFunction";A.returnMonthFunction="CP_tmpReturnMonthFunction";A.returnQuarterFunction="CP_tmpReturnQuarterFunction";A.returnYearFunction="CP_tmpReturnYearFunction";A.weekStartDay=0;A.isShowYearNavigation=false;A.displayType="date";A.disabledWeekDays=new Object();A.disabledDatesExpression="";A.yearSelectStartOffset=8;A.currentDate=null;A.todayText="Today";A.cssPrefix="";A.isShowNavigationDropdowns=false;A.isShowYearNavigationInput=false;window.CP_calendarObject=null;window.CP_targetInput=null;window.CP_dateFormat="MM/dd/yyyy";A.copyMonthNamesToWindow=CP_copyMonthNamesToWindow;A.setReturnFunction=CP_setReturnFunction;A.setReturnMonthFunction=CP_setReturnMonthFunction;A.setReturnQuarterFunction=CP_setReturnQuarterFunction;A.setReturnYearFunction=CP_setReturnYearFunction;A.setMonthNames=CP_setMonthNames;A.setMonthAbbreviations=CP_setMonthAbbreviations;A.setDayHeaders=CP_setDayHeaders;A.setWeekStartDay=CP_setWeekStartDay;A.setDisplayType=CP_setDisplayType;A.setDisabledWeekDays=CP_setDisabledWeekDays;A.addDisabledDates=CP_addDisabledDates;A.setYearSelectStartOffset=CP_setYearSelectStartOffset;A.setTodayText=CP_setTodayText;A.showYearNavigation=CP_showYearNavigation;A.showCalendar=CP_showCalendar;A.hideCalendar=CP_hideCalendar;A.getStyles=getCalendarStyles;A.refreshCalendar=CP_refreshCalendar;A.getCalendar=CP_getCalendar;A.select=CP_select;A.setCssPrefix=CP_setCssPrefix;A.showNavigationDropdowns=CP_showNavigationDropdowns;A.showYearNavigationInput=CP_showYearNavigationInput;A.copyMonthNamesToWindow();return A}function CP_copyMonthNamesToWindow(){if(typeof(window.MONTH_NAMES)!="undefined"&&window.MONTH_NAMES!=null){window.MONTH_NAMES=new Array();for(var A=0;A<this.monthNames.length;A++){window.MONTH_NAMES[window.MONTH_NAMES.length]=this.monthNames[A]}for(var A=0;A<this.monthAbbreviations.length;A++){window.MONTH_NAMES[window.MONTH_NAMES.length]=this.monthAbbreviations[A]}}}function CP_tmpReturnFunction(D,A,C){if(window.CP_targetInput!=null){var B=new Date(D,A-1,C,0,0,0);if(window.CP_calendarObject!=null){window.CP_calendarObject.copyMonthNamesToWindow()}window.CP_targetInput.value=formatDate(B,window.CP_dateFormat)}else{alert("Use setReturnFunction() to define which function will get the clicked results!")}}function CP_tmpReturnMonthFunction(B,A){alert("Use setReturnMonthFunction() to define which function will get the clicked results!\nYou clicked: year="+B+" , month="+A)}function CP_tmpReturnQuarterFunction(B,A){alert("Use setReturnQuarterFunction() to define which function will get the clicked results!\nYou clicked: year="+B+" , quarter="+A)}function CP_tmpReturnYearFunction(A){alert("Use setReturnYearFunction() to define which function will get the clicked results!\nYou clicked: year="+A)}function CP_setReturnFunction(A){this.returnFunction=A}function CP_setReturnMonthFunction(A){this.returnMonthFunction=A}function CP_setReturnQuarterFunction(A){this.returnQuarterFunction=A}function CP_setReturnYearFunction(A){this.returnYearFunction=A}function CP_setMonthNames(){for(var A=0;A<arguments.length;A++){this.monthNames[A]=arguments[A]}this.copyMonthNamesToWindow()}function CP_setMonthAbbreviations(){for(var A=0;A<arguments.length;A++){this.monthAbbreviations[A]=arguments[A]}this.copyMonthNamesToWindow()}function CP_setDayHeaders(){for(var A=0;A<arguments.length;A++){this.dayHeaders[A]=arguments[A]}}function CP_setWeekStartDay(A){this.weekStartDay=A}function CP_showYearNavigation(){this.isShowYearNavigation=(arguments.length>0)?arguments[0]:true}function CP_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 CP_setYearSelectStartOffset(A){this.yearSelectStartOffset=A}function CP_setDisabledWeekDays(){this.disabledWeekDays=new Object();for(var A=0;A<arguments.length;A++){this.disabledWeekDays[arguments[A]]=true}}function CP_addDisabledDates(B,A){if(arguments.length==1){A=B}if(B==null&&A==null){return}if(this.disabledDatesExpression!=""){this.disabledDatesExpression+="||"}if(B!=null){B=parseDate(B);B=""+B.getFullYear()+LZ(B.getMonth()+1)+LZ(B.getDate())}if(A!=null){A=parseDate(A);A=""+A.getFullYear()+LZ(A.getMonth()+1)+LZ(A.getDate())}if(B==null){this.disabledDatesExpression+="(ds<="+A+")"}else{if(A==null){this.disabledDatesExpression+="(ds>="+B+")"}else{this.disabledDatesExpression+="(ds>="+B+"&&ds<="+A+")"}}}function CP_setTodayText(A){this.todayText=A}function CP_setCssPrefix(A){this.cssPrefix=A}function CP_showNavigationDropdowns(){this.isShowNavigationDropdowns=(arguments.length>0)?arguments[0]:true}function CP_showYearNavigationInput(){this.isShowYearNavigationInput=(arguments.length>0)?arguments[0]:true}function CP_hideCalendar(){if(arguments.length>0){window.popupWindowObjects[arguments[0]].hidePopup()}else{this.hidePopup()}}function CP_refreshCalendar(A){var B=window.popupWindowObjects[A];if(arguments.length>1){B.populate(B.getCalendar(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]))}else{B.populate(B.getCalendar())}B.refresh()}function CP_showCalendar(A){if(arguments.length>1){if(arguments[1]==null||arguments[1]==""){this.currentDate=new Date()}else{this.currentDate=new Date(parseDate(arguments[1]))}}this.populate(this.getCalendar());this.showPopup(A)}function CP_select(C,A,E){var B=(arguments.length>3)?arguments[3]:null;if(!window.getDateFromFormat){alert("calendar.select: To use this method you must also include 'date.js' for date formatting");return}if(this.displayType!="date"&&this.displayType!="week-end"){alert("calendar.select: This function can only be used with displayType 'date' or 'week-end'");return}if(C.type!="text"&&C.type!="hidden"&&C.type!="textarea"){alert("calendar.select: Input object passed is not a valid form input object");window.CP_targetInput=null;return}if(C.disabled){return}window.CP_targetInput=C;window.CP_calendarObject=this;this.currentDate=null;var D=0;if(B!=null){D=getDateFromFormat(B,E)}else{if(C.value!=""){D=getDateFromFormat(C.value,E)}}if(B!=null||C.value!=""){if(D==0){this.currentDate=null}else{this.currentDate=new Date(D)}}window.CP_dateFormat=E;this.showCalendar(A)}function getCalendarStyles(){var A="";var B="";if(this!=null&&typeof(this.cssPrefix)!="undefined"&&this.cssPrefix!=null&&this.cssPrefix!=""){B=this.cssPrefix}A+="<STYLE>\n";A+="."+B+"cpYearNavigation,."+B+"cpMonthNavigation { background-color:#C0C0C0; text-align:center; vertical-align:center; text-decoration:none; color:#000000; font-weight:bold; }\n";A+="."+B+"cpDayColumnHeader, ."+B+"cpYearNavigation,."+B+"cpMonthNavigation,."+B+"cpCurrentMonthDate,."+B+"cpCurrentMonthDateDisabled,."+B+"cpOtherMonthDate,."+B+"cpOtherMonthDateDisabled,."+B+"cpCurrentDate,."+B+"cpCurrentDateDisabled,."+B+"cpTodayText,."+B+"cpTodayTextDisabled,."+B+"cpText { font-family:arial; font-size:8pt; }\n";A+="TD."+B+"cpDayColumnHeader { text-align:right; border:solid thin #C0C0C0;border-width:0px 0px 1px 0px; }\n";A+="."+B+"cpCurrentMonthDate, ."+B+"cpOtherMonthDate, ."+B+"cpCurrentDate  { text-align:right; text-decoration:none; }\n";A+="."+B+"cpCurrentMonthDateDisabled, ."+B+"cpOtherMonthDateDisabled, ."+B+"cpCurrentDateDisabled { color:#D0D0D0; text-align:right; text-decoration:line-through; }\n";A+="."+B+"cpCurrentMonthDate, .cpCurrentDate { color:#000000; }\n";A+="."+B+"cpOtherMonthDate { color:#808080; }\n";A+="TD."+B+"cpCurrentDate { color:white; background-color: #C0C0C0; border-width:1px; border:solid thin #800000; }\n";A+="TD."+B+"cpCurrentDateDisabled { border-width:1px; border:solid thin #FFAAAA; }\n";A+="TD."+B+"cpTodayText, TD."+B+"cpTodayTextDisabled { border:solid thin #C0C0C0; border-width:1px 0px 0px 0px;}\n";A+="A."+B+"cpTodayText, SPAN."+B+"cpTodayTextDisabled { height:20px; }\n";A+="A."+B+"cpTodayText { color:black; }\n";A+="."+B+"cpTodayTextDisabled { color:#D0D0D0; }\n";A+="."+B+"cpBorder { border:solid thin #808080; }\n";A+="</STYLE>\n";return A}function CP_getCalendar(){var now=new Date();if(this.type=="WINDOW"){var windowref="window.opener."}else{var windowref=""}var result="";if(this.type=="WINDOW"){result+="<HTML><HEAD><TITLE>Calendar</TITLE>"+this.getStyles()+"</HEAD><BODY MARGINWIDTH=0 MARGINHEIGHT=0 TOPMARGIN=0 RIGHTMARGIN=0 LEFTMARGIN=0>\n";result+="<CENTER><TABLE WIDTH=100% BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>\n"}else{result+='<TABLE CLASS="'+this.cssPrefix+'cpBorder" WIDTH=144 BORDER=1 BORDERWIDTH=1 CELLSPACING=0 CELLPADDING=1>\n';result+="<TR><TD ALIGN=CENTER>\n";result+="<CENTER>\n"}if(this.displayType=="date"||this.displayType=="week-end"){if(this.currentDate==null){this.currentDate=now}if(arguments.length>0){var month=arguments[0]}else{var month=this.currentDate.getMonth()+1}if(arguments.length>1&&arguments[1]>0&&arguments[1]-0==arguments[1]){var year=arguments[1]}else{var year=this.currentDate.getFullYear()}var daysinmonth=new Array(0,31,28,31,30,31,30,31,31,30,31,30,31);if(((year%4==0)&&(year%100!=0))||(year%400==0)){daysinmonth[2]=29}var current_month=new Date(year,month-1,1);var display_year=year;var display_month=month;var display_date=1;var weekday=current_month.getDay();var offset=0;offset=(weekday>=this.weekStartDay)?weekday-this.weekStartDay:7-this.weekStartDay+weekday;if(offset>0){display_month--;if(display_month<1){display_month=12;display_year--}display_date=daysinmonth[display_month]-offset+1}var next_month=month+1;var next_month_year=year;if(next_month>12){next_month=1;next_month_year++}var last_month=month-1;var last_month_year=year;if(last_month<1){last_month=12;last_month_year--}var date_class;if(this.type!="WINDOW"){result+="<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>"}result+="<TR>\n";var refresh=windowref+"CP_refreshCalendar";var refreshLink="javascript:"+refresh;if(this.isShowNavigationDropdowns){result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="78" COLSPAN="3"><select CLASS="'+this.cssPrefix+'cpMonthNavigation" name="cpMonth" onChange="'+refresh+"('0')\";return false;\">";for(var monthCounter=1;monthCounter<=12;monthCounter++){var selected=(monthCounter==month)?"SELECTED":"";result+='<option value="'+monthCounter+'" '+selected+">"+this.monthNames[monthCounter-1]+"</option>"}result+="</select></TD>";result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10">&nbsp;</TD>';result+='<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="56" COLSPAN="3"><select CLASS="'+this.cssPrefix+'cpYearNavigation" name="cpYear" onChange="'+refresh+"("+this.index+","+month+',this.options[this.selectedIndex].value-0);return false;">';for(var yearCounter=year-this.yearSelectStartOffset;yearCounter<=year;yearCounter++){var selected=(yearCounter==year)?"SELECTED":"";result+='<option value="'+yearCounter+'" '+selected+">"+yearCounter+"</option>"}result+="</select></TD>"}else{if(this.isShowYearNavigation){result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refreshLink+"("+this.index+","+last_month+","+last_month_year+');">&lt;</A></TD>';result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="58"><SPAN CLASS="'+this.cssPrefix+'cpMonthNavigation">'+this.monthNames[month-1]+"</SPAN></TD>";result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refreshLink+"("+this.index+","+next_month+","+next_month_year+');">&gt;</A></TD>';result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10">&nbsp;</TD>';result+='<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="'+refreshLink+"("+this.index+","+month+","+(year-1)+');">&lt;</A></TD>';if(this.isShowYearNavigationInput){result+='<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="36"><INPUT NAME="cpYear" CLASS="'+this.cssPrefix+'cpYearNavigation" SIZE="4" MAXLENGTH="4" VALUE="'+year+'" onBlur="'+refresh+"("+this.index+","+month+',this.value-0);"></TD>'}else{result+='<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="36"><SPAN CLASS="'+this.cssPrefix+'cpYearNavigation">'+year+"</SPAN></TD>"}result+='<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="'+refreshLink+"("+this.index+","+month+","+(year+1)+');">&gt;</A></TD>'}else{result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refreshLink+"("+this.index+","+last_month+","+last_month_year+');">&lt;&lt;</A></TD>\n';result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="100"><SPAN CLASS="'+this.cssPrefix+'cpMonthNavigation">'+this.monthNames[month-1]+" "+year+"</SPAN></TD>\n";result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refreshLink+"("+this.index+","+next_month+","+next_month_year+');">&gt;&gt;</A></TD>\n'}}result+="</TR></TABLE>\n";result+="<TABLE WIDTH=120 BORDER=0 CELLSPACING=0 CELLPADDING=1 ALIGN=CENTER>\n";result+="<TR>\n";for(var j=0;j<7;j++){result+='<TD CLASS="'+this.cssPrefix+'cpDayColumnHeader" WIDTH="14%"><SPAN CLASS="'+this.cssPrefix+'cpDayColumnHeader">'+this.dayHeaders[(this.weekStartDay+j)%7]+"</TD>\n"}result+="</TR>\n";for(var row=1;row<=6;row++){result+="<TR>\n";for(var col=1;col<=7;col++){var disabled=false;if(this.disabledDatesExpression!=""){var ds=""+display_year+LZ(display_month)+LZ(display_date);eval("disabled=("+this.disabledDatesExpression+")")}var dateClass="";if((display_month==this.currentDate.getMonth()+1)&&(display_date==this.currentDate.getDate())&&(display_year==this.currentDate.getFullYear())){dateClass="cpCurrentDate"}else{if(display_month==month){dateClass="cpCurrentMonthDate"}else{dateClass="cpOtherMonthDate"}}if(disabled||this.disabledWeekDays[col-1]){result+='	<TD CLASS="'+this.cssPrefix+dateClass+'"><SPAN CLASS="'+this.cssPrefix+dateClass+'Disabled">'+display_date+"</SPAN></TD>\n"}else{var selected_date=display_date;var selected_month=display_month;var selected_year=display_year;if(this.displayType=="week-end"){var d=new Date(selected_year,selected_month-1,selected_date,0,0,0,0);d.setDate(d.getDate()+(7-col));selected_year=d.getYear();if(selected_year<1000){selected_year+=1900}selected_month=d.getMonth()+1;selected_date=d.getDate()}result+='	<TD CLASS="'+this.cssPrefix+dateClass+'"><A HREF="javascript:'+windowref+this.returnFunction+"("+selected_year+","+selected_month+","+selected_date+");"+windowref+"CP_hideCalendar('"+this.index+'\');" CLASS="'+this.cssPrefix+dateClass+'">'+display_date+"</A></TD>\n"}display_date++;if(display_date>daysinmonth[display_month]){display_date=1;display_month++}if(display_month>12){display_month=1;display_year++}}result+="</TR>"}var current_weekday=now.getDay()-this.weekStartDay;if(current_weekday<0){current_weekday+=7}result+="<TR>\n";result+='	<TD COLSPAN=7 ALIGN=CENTER CLASS="'+this.cssPrefix+'cpTodayText">\n';if(this.disabledDatesExpression!=""){var ds=""+now.getFullYear()+LZ(now.getMonth()+1)+LZ(now.getDate());eval("disabled=("+this.disabledDatesExpression+")")}if(disabled||this.disabledWeekDays[current_weekday+1]){result+='		<SPAN CLASS="'+this.cssPrefix+'cpTodayTextDisabled">'+this.todayText+"</SPAN>\n"}else{result+='		<A CLASS="'+this.cssPrefix+'cpTodayText" HREF="javascript:'+windowref+this.returnFunction+"('"+now.getFullYear()+"','"+(now.getMonth()+1)+"','"+now.getDate()+"');"+windowref+"CP_hideCalendar('"+this.index+"');\">"+this.todayText+"</A>\n"}result+="		<BR>\n";result+="	</TD></TR></TABLE></CENTER></TD></TR></TABLE>\n"}if(this.displayType=="month"||this.displayType=="quarter"||this.displayType=="year"){if(arguments.length>0){var year=arguments[0]}else{if(this.displayType=="year"){var year=now.getFullYear()-this.yearSelectStartOffset}else{var year=now.getFullYear()}}if(this.displayType!="year"&&this.isShowYearNavigation){result+="<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";result+="<TR>\n";result+='	<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="javascript:'+windowref+"CP_refreshCalendar("+this.index+","+(year-1)+');">&lt;&lt;</A></TD>\n';result+='	<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="100">'+year+"</TD>\n";result+='	<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="javascript:'+windowref+"CP_refreshCalendar("+this.index+","+(year+1)+');">&gt;&gt;</A></TD>\n';result+="</TR></TABLE>\n"}}if(this.displayType=="month"){result+="<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n";for(var i=0;i<4;i++){result+="<TR>";for(var j=0;j<3;j++){var monthindex=((i*3)+j);result+='<TD WIDTH=33% ALIGN=CENTER><A CLASS="'+this.cssPrefix+'cpText" HREF="javascript:'+windowref+this.returnMonthFunction+"("+year+","+(monthindex+1)+");"+windowref+"CP_hideCalendar('"+this.index+'\');" CLASS="'+date_class+'">'+this.monthAbbreviations[monthindex]+"</A></TD>"}result+="</TR>"}result+="</TABLE></CENTER></TD></TR></TABLE>\n"}if(this.displayType=="quarter"){result+="<BR><TABLE WIDTH=120 BORDER=1 CELLSPACING=0 CELLPADDING=0 ALIGN=CENTER>\n";for(var i=0;i<2;i++){result+="<TR>";for(var j=0;j<2;j++){var quarter=((i*2)+j+1);result+='<TD WIDTH=50% ALIGN=CENTER><BR><A CLASS="'+this.cssPrefix+'cpText" HREF="javascript:'+windowref+this.returnQuarterFunction+"("+year+","+quarter+");"+windowref+"CP_hideCalendar('"+this.index+'\');" CLASS="'+date_class+'">Q'+quarter+"</A><BR><BR></TD>"}result+="</TR>"}result+="</TABLE></CENTER></TD></TR></TABLE>\n"}if(this.displayType=="year"){var yearColumnSize=4;result+="<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";result+="<TR>\n";result+='	<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="50%"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="javascript:'+windowref+"CP_refreshCalendar("+this.index+","+(year-(yearColumnSize*2))+');">&lt;&lt;</A></TD>\n';result+='	<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="50%"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="javascript:'+windowref+"CP_refreshCalendar("+this.index+","+(year+(yearColumnSize*2))+');">&gt;&gt;</A></TD>\n';result+="</TR></TABLE>\n";result+="<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n";for(var i=0;i<yearColumnSize;i++){for(var j=0;j<2;j++){var currentyear=year+(j*yearColumnSize)+i;result+='<TD WIDTH=50% ALIGN=CENTER><A CLASS="'+this.cssPrefix+'cpText" HREF="javascript:'+windowref+this.returnYearFunction+"("+currentyear+");"+windowref+"CP_hideCalendar('"+this.index+'\');" CLASS="'+date_class+'">'+currentyear+"</A></TD>"}result+="</TR>"}result+="</TABLE></CENTER></TD></TR></TABLE>\n"}if(this.type=="WINDOW"){result+="</BODY></HTML>\n"}return result};

