function getAnchorPosition(b){var f=false,l=f,a={},d=0,e=0,g=f,i=f,h=f;if(document.getElementById)g=true;else if(document.all)i=true;else if(document.layers)h=true;if(g&&document.all){d=AnchorPosition_getPageOffsetLeft(document.all[b]);e=AnchorPosition_getPageOffsetTop(document.all[b])}else if(g){var k=document.getElementById(b);d=AnchorPosition_getPageOffsetLeft(k);e=AnchorPosition_getPageOffsetTop(k)}else if(i){d=AnchorPosition_getPageOffsetLeft(document.all[b]);e=AnchorPosition_getPageOffsetTop(document.all[b])}else if(h){for(var j=0,c=0;c<document.anchors.length;c++)if(document.anchors[c].name==b){j=1;break}if(j==0){a.x=0;a.y=0;return a}d=document.anchors[c].x;e=document.anchors[c].y}else{a.x=0;a.y=0;return a}a.x=d;a.y=e;return a}function getAnchorWindowPosition(d){var a=getAnchorPosition(d),b=0,c=0;if(document.getElementById)if(isNaN(window.screenX)){b=a.x-document.body.scrollLeft+window.screenLeft;c=a.y-document.body.scrollTop+window.screenTop}else{b=a.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;c=a.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset}else if(document.all){b=a.x-document.body.scrollLeft+window.screenLeft;c=a.y-document.body.scrollTop+window.screenTop}else if(document.layers){b=a.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;c=a.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset}a.x=b;a.y=c;return a}function AnchorPosition_getPageOffsetLeft(a){var b=a.offsetLeft;while((a=a.offsetParent)!=null)b+=a.offsetLeft;return b}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=["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=["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,a){var b=getDateFromFormat(c,a);if(b==0)return false;return true}function compareDates(e,c,f,d){var a=getDateFromFormat(e,c),b=getDateFromFormat(f,d);if(a==0||b==0)return -1;else if(a>b)return 1;return 0}function formatDate(d,c){c=c+"";var g="",f=0,j="",h="",e=d.getYear()+"",i=d.getMonth()+1,k=d.getDate(),l=d.getDay(),b=d.getHours(),m=d.getMinutes(),n=d.getSeconds(),p,z,q,w,r,t,A,x,y,o,s,v,B,u,C,a={};if(e.length<4)e=""+(e-0+1900);a["y"]=""+e;a["yyyy"]=e;a["yy"]=e.substring(2,4);a["M"]=i;a["MM"]=LZ(i);a["MMM"]=MONTH_NAMES[i-1];a["NNN"]=MONTH_NAMES[i+11];a["d"]=k;a["dd"]=LZ(k);a["E"]=DAY_NAMES[l+7];a["EE"]=DAY_NAMES[l];a["H"]=b;a["HH"]=LZ(b);if(b==0)a["h"]=12;else if(b>12)a["h"]=b-12;else a["h"]=b;a["hh"]=LZ(a["h"]);if(b>11)a["K"]=b-12;else a["K"]=b;a["k"]=b+1;a["KK"]=LZ(a["K"]);a["kk"]=LZ(a["k"]);if(b>11)a["a"]="PM";else a["a"]="AM";a["m"]=m;a["mm"]=LZ(m);a["s"]=n;a["ss"]=LZ(n);while(f<c.length){j=c.charAt(f);h="";while(c.charAt(f)==j&&f<c.length)h+=c.charAt(f++);if(a[h]!=null)g=g+a[h];else g=g+h}return g}function _isInteger(b){for(var c="1234567890",a=0;a<b.length;a++)if(c.indexOf(b.charAt(a))==-1)return false;return true}function _getInt(f,d,c,e){for(var b=e;b>=c;b--){var a=f.substring(d,d+b);if(a.length<c)return null;if(_isInteger(a))return a}return null}function getDateFromFormat(e,j){var g=null;e=e+"";j=j+"";var b=0,m=0,t="",a="",v="",p,q,n=new Date,f=n.getYear(),d=n.getMonth()+1,h=1,c=n.getHours(),k=n.getMinutes(),l=n.getSeconds(),o="";while(m<j.length){t=j.charAt(m);a="";while(j.charAt(m)==t&&m<j.length)a+=j.charAt(m++);if(a=="yyyy"||a=="yy"||a=="y"){if(a=="yyyy"){p=4;q=4}if(a=="yy"){p=2;q=2}if(a=="y"){p=2;q=4}f=_getInt(e,b,p,q);if(f==g)return 0;b+=f.length;if(f.length==2)if(f>70)f=1900+(f-0);else f=2e3+(f-0)}else if(a=="MMM"||a=="NNN"){d=0;for(var i=0;i<MONTH_NAMES.length;i++){var r=MONTH_NAMES[i];if(e.substring(b,b+r.length).toLowerCase()==r.toLowerCase())if(a=="MMM"||a=="NNN"&&i>11){d=i+1;if(d>12)d-=12;b+=r.length;break}}if(d<1||d>12)return 0}else if(a=="EE"||a=="E")for(var i=0;i<DAY_NAMES.length;i++){var s=DAY_NAMES[i];if(e.substring(b,b+s.length).toLowerCase()==s.toLowerCase()){b+=s.length;break}}else if(a=="MM"||a=="M"){d=_getInt(e,b,a.length,2);if(d==g||d<1||d>12)return 0;b+=d.length}else if(a=="dd"||a=="d"){h=_getInt(e,b,a.length,2);if(h==g||h<1||h>31)return 0;b+=h.length}else if(a=="hh"||a=="h"){c=_getInt(e,b,a.length,2);if(c==g||c<1||c>12)return 0;b+=c.length}else if(a=="HH"||a=="H"){c=_getInt(e,b,a.length,2);if(c==g||c<0||c>23)return 0;b+=c.length}else if(a=="KK"||a=="K"){c=_getInt(e,b,a.length,2);if(c==g||c<0||c>11)return 0;b+=c.length}else if(a=="kk"||a=="k"){c=_getInt(e,b,a.length,2);if(c==g||c<1||c>24)return 0;b+=c.length;c--}else if(a=="mm"||a=="m"){k=_getInt(e,b,a.length,2);if(k==g||k<0||k>59)return 0;b+=k.length}else if(a=="ss"||a=="s"){l=_getInt(e,b,a.length,2);if(l==g||l<0||l>59)return 0;b+=l.length}else if(a=="a"){if(e.substring(b,b+2).toLowerCase()=="am")o="AM";else if(e.substring(b,b+2).toLowerCase()=="pm")o="PM";else return 0;b+=2}else if(e.substring(b,b+a.length)!=a)return 0;else b+=a.length}if(b!=e.length)return 0;if(d==2)if(f%4==0&&f%100!=0||f%400==0){if(h>29)return 0}else if(h>28)return 0;if(d==4||d==6||d==9||d==11)if(h>30)return 0;if(c<12&&o=="PM")c=c-0+12;else if(c>11&&o=="AM")c-=12;var u=new Date(f,d-1,h,c,k,l);return u.getTime()}function parseDate(i){var e="monthFirst",d="dateFirst",f=arguments.length==2?arguments[1]:false;generalFormats=["y-M-d","MMM d, y","MMM d,y","y-MMM-d","d-MMM-y","MMM d"];monthFirst=["M/d/y","M-d-y","M.d.y","MMM-d","M/d","M-d"];dateFirst=["d/M/y","d-M-y","d.M.y","d-MMM","d/M","d-M"];for(var g=["generalFormats",f?d:e,f?e:d],a=null,b=0;b<g.length;b++)for(var h=window[g[b]],c=0;c<h.length;c++){a=getDateFromFormat(i,h[c]);if(a!=0)return new Date(a)}return null}function PopupWindow_getXYPosition(b){var a;if(this.type=="WINDOW")a=getAnchorWindowPosition(b);else a=getAnchorPosition(b);this.x=a.x;this.y=a.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(){var a=this;if(a.divName!=null){if(a.use_gebi)document.getElementById(a.divName).innerHTML=a.contents;else if(a.use_css)document.all[a.divName].innerHTML=a.contents;else if(a.use_layers){var b=document.layers[a.divName];b.document.open();b.document.writeln(a.contents);b.document.close()}}else if(a.popupWindow!=null&&!a.popupWindow.closed){if(a.url!="")a.popupWindow.location.href=a.url;else{a.popupWindow.document.open();a.popupWindow.document.writeln(a.contents);a.popupWindow.document.close()}a.popupWindow.focus()}}function PopupWindow_showPopup(c){var b="visible",a=this;a.getXYPosition(c);a.x+=a.offsetX;a.y+=a.offsetY;if(!a.populated&&a.contents!=""){a.populated=true;a.refresh()}if(a.divName!=null){if(a.inline)document.getElementById(a.divName).style.visibility=b;else if(a.use_gebi){document.getElementById(a.divName).style.left=a.x+"px";document.getElementById(a.divName).style.top=a.y+"px";document.getElementById(a.divName).style.visibility=b}else if(a.use_css){document.all[a.divName].style.left=a.x;document.all[a.divName].style.top=a.y;document.all[a.divName].style.visibility=b}else if(a.use_layers){document.layers[a.divName].left=a.x;document.layers[a.divName].top=a.y;document.layers[a.divName].visibility=b}}else{if(a.popupWindow==null||a.popupWindow.closed){if(a.x<0)a.x=0;if(a.y<0)a.y=0;if(screen&&screen.availHeight)if(a.y+a.height>screen.availHeight)a.y=screen.availHeight-a.height;if(screen&&screen.availWidth)if(a.x+a.width>screen.availWidth)a.x=screen.availWidth-a.width;var d=window.opera||document.layers&&!navigator.mimeTypes["*"]||navigator.vendor=="KDE"||document.childNodes&&!document.all&&!navigator.taintEnabled;a.popupWindow=window.open(d?"":"about:blank","window_"+c,a.windowProperties+",width="+a.width+",height="+a.height+",screenX="+a.x+",left="+a.x+",screenY="+a.y+",top="+a.y+"")}a.refresh()}}function PopupWindow_hidePopup(){var b="hidden",a=this;if(a.divName!=null){if(a.use_gebi)document.getElementById(a.divName).style.visibility=b;else if(a.use_css)document.all[a.divName].style.visibility=b;else if(a.use_layers)document.layers[a.divName].visibility=b}else if(a.popupWindow&&!a.popupWindow.closed){a.popupWindow.close();a.popupWindow=null}}function PopupWindow_isClicked(d){var c=false,b=this;if(b.divName!=null){if(b.use_layers){var e=d.pageX,f=d.pageY,a=document.layers[b.divName];if(e>a.left&&e<a.left+a.clip.width&&f>a.top&&f<a.top+a.clip.height)return true;else return c}else if(document.all){var a=window.event.srcElement;while(a.parentElement!=null){if(a.id==b.divName)return true;a=a.parentElement}return c}else if(b.use_gebi&&d){var a=d.originalTarget;try{while(a.parentNode!=null){if(a.id==b.divName)return true;a=a.parentNode}}catch(ex){}return c}return c}return c}function PopupWindow_hideIfNotClicked(a){this.autoHideEnabled&&!this.isClicked(a)&&this.hidePopup()}function PopupWindow_autoHide(){this.autoHideEnabled=true}function PopupWindow_hidePopupWindows(b){for(var a=0;a<popupWindowObjects.length;a++)if(popupWindowObjects[a]!=null){var c=popupWindowObjects[a];c.hideIfNotClicked(b)}}function PopupWindow_attachListener(){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(){var b=false,c=true,a=this;if(!window.popupWindowIndex)window.popupWindowIndex=0;if(!window.popupWindowObjects)window.popupWindowObjects=[];if(!window.listenerAttached){window.listenerAttached=c;PopupWindow_attachListener()}a.index=popupWindowIndex++;popupWindowObjects[a.index]=a;a.divName=null;a.popupWindow=null;a.width=0;a.height=0;a.populated=b;a.visible=b;a.autoHideEnabled=b;a.contents="";a.url="";a.windowProperties="toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable,alwaysRaised,dependent,titlebar=no";if(arguments.length>0){a.type="DIV";a.divName=arguments[0]}else a.type="WINDOW";a.use_gebi=b;a.use_css=b;a.use_layers=b;if(document.getElementById)a.use_gebi=c;else if(document.all)a.use_css=c;else if(document.layers)a.use_layers=c;else a.type="WINDOW";a.offsetX=0;a.offsetY=0;a.getXYPosition=PopupWindow_getXYPosition;a.populate=PopupWindow_populate;a.setUrl=PopupWindow_setUrl;a.setWindowProperties=PopupWindow_setWindowProperties;a.refresh=PopupWindow_refresh;a.showPopup=PopupWindow_showPopup;a.hidePopup=PopupWindow_hidePopup;a.setSize=PopupWindow_setSize;a.isClicked=PopupWindow_isClicked;a.autoHide=PopupWindow_autoHide;a.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=["January","February","March","April","May","June","July","August","September","October","November","December"];a.monthAbbreviations=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];a.dayHeaders=["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={};a.disabledDatesExpression="";a.yearSelectStartOffset=2;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(){var b=this;if(typeof window.MONTH_NAMES!="undefined"&&window.MONTH_NAMES!=null){window.MONTH_NAMES=[];for(var a=0;a<b.monthNames.length;a++)window.MONTH_NAMES[window.MONTH_NAMES.length]=b.monthNames[a];for(var a=0;a<b.monthAbbreviations.length;a++)window.MONTH_NAMES[window.MONTH_NAMES.length]=b.monthAbbreviations[a]}}function CP_tmpReturnFunction(d,c,b){if(window.CP_targetInput!=null){var a=new Date(d,c-1,b,0,0,0);window.CP_calendarObject!=null&&window.CP_calendarObject.copyMonthNamesToWindow();window.CP_targetInput.value=formatDate(a,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={};for(var a=0;a<arguments.length;a++)this.disabledWeekDays[arguments[a]]=true}function CP_addDisabledDates(a,b){var c=null,d=this;if(arguments.length==1)b=a;if(a==c&&b==c)return;if(d.disabledDatesExpression!="")d.disabledDatesExpression+="||";if(a!=c){a=parseDate(a);a=""+a.getFullYear()+LZ(a.getMonth()+1)+LZ(a.getDate())}if(b!=c){b=parseDate(b);b=""+b.getFullYear()+LZ(b.getMonth()+1)+LZ(b.getDate())}if(a==c)d.disabledDatesExpression+="(ds<="+b+")";else if(b==c)d.disabledDatesExpression+="(ds>="+a+")";else d.disabledDatesExpression+="(ds>="+a+"&&ds<="+b+")"}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(b){var a=window.popupWindowObjects[b];if(arguments.length>1)a.populate(a.getCalendar(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]));else a.populate(a.getCalendar());a.refresh()}function CP_showCalendar(b){var a=this;if(arguments.length>1)if(arguments[1]==null||arguments[1]=="")a.currentDate=new Date;else a.currentDate=new Date(parseDate(arguments[1]));a.populate(a.getCalendar());a.showPopup(b)}function CP_select(a,g,f){var c=null,b=this,e=arguments.length>3?arguments[3]:c;if(!window.getDateFromFormat){alert("calendar.select: To use this method you must also include 'date.js' for date formatting");return}if(b.displayType!="date"&&b.displayType!="week-end"){alert("calendar.select: This function can only be used with displayType 'date' or 'week-end'");return}if(a.type!="text"&&a.type!="hidden"&&a.type!="textarea"){alert("calendar.select: Input object passed is not a valid form input object");window.CP_targetInput=c;return}if(a.disabled)return;window.CP_targetInput=a;window.CP_calendarObject=b;b.currentDate=c;var d=0;if(e!=c)d=getDateFromFormat(e,f);else if(a.value!="")d=getDateFromFormat(a.value,f);if(e!=c||a.value!="")if(d==0)b.currentDate=c;else b.currentDate=new Date(d);window.CP_dateFormat=f;b.showCalendar(g)}function getCalendarStyles(){var e="TD.",f="cpYearNavigation,.",c=".",d=this,b="",a="";if(d!=null&&typeof d.cssPrefix!="undefined"&&d.cssPrefix!=null&&d.cssPrefix!="")a=d.cssPrefix;b+="<STYLE>\n";b+=c+a+f+a+"cpMonthNavigation{background-color:#C0C0C0;text-align:center;vertical-align:center;text-decoration:none;color:#000000;font-weight:bold;}\n";b+=c+a+"cpDayColumnHeader, ."+a+f+a+"cpMonthNavigation,."+a+"cpCurrentMonthDate,."+a+"cpCurrentMonthDateDisabled,."+a+"cpOtherMonthDate,."+a+"cpOtherMonthDateDisabled,."+a+"cpCurrentDate,."+a+"cpCurrentDateDisabled,."+a+"cpTodayText,."+a+"cpTodayTextDisabled,."+a+"cpText{font-family:arial;font-size:8pt;}\n";b+=e+a+"cpDayColumnHeader{text-align:right;border:solid thin #C0C0C0;border-width:0px 0px 1px 0px;}\n";b+=c+a+"cpCurrentMonthDate, ."+a+"cpOtherMonthDate, ."+a+"cpCurrentDate{text-align:right;text-decoration:none;}\n";b+=c+a+"cpCurrentMonthDateDisabled, ."+a+"cpOtherMonthDateDisabled, ."+a+"cpCurrentDateDisabled{color:#D0D0D0;text-align:right;text-decoration:line-through;}\n";b+=c+a+"cpCurrentMonthDate, .cpCurrentDate{color:#000000;}\n";b+=c+a+"cpOtherMonthDate{color:#808080;}\n";b+=e+a+"cpCurrentDate{color:white;background-color: #C0C0C0;border-width:1px;border:solid thin #800000;}\n";b+=e+a+"cpCurrentDateDisabled{border-width:1px;border:solid thin #FFAAAA;}\n";b+=e+a+"cpTodayText, TD."+a+"cpTodayTextDisabled{border:solid thin #C0C0C0;border-width:1px 0px 0px 0px;}\n";b+="A."+a+"cpTodayText, SPAN."+a+"cpTodayTextDisabled{height:20px;}\n";b+="A."+a+"cpTodayText{color:black;}\n";b+=c+a+"cpTodayTextDisabled{color:#D0D0D0;}\n";b+=c+a+"cpBorder{border:solid thin #808080;}\n";b+="</STYLE>\n";return b}function CP_getCalendar(){var R='cpYearNavigation" WIDTH="50%"><A CLASS="',Q="</TABLE></CENTER></TD></TR></TABLE>\n",P="</A></TD>",O='cpText" HREF="javascript:',N="<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n",M="CP_refreshCalendar(",L='cpYearNavigation" HREF="javascript:',K='cpYearNavigation" WIDTH="22"><A CLASS="',J="year",I="</TR>",H='\');" CLASS="',G="CP_hideCalendar('",F=");",E='\t<TD CLASS="',D="disabled=(",C="</TR></TABLE>\n",B=');">&gt;&gt;</A></TD>\n',A="</SPAN></TD>\n",z=');">&lt;&lt;</A></TD>\n',y='cpMonthNavigation" WIDTH="22"><A CLASS="',x='cpYearNavigation" HREF="',w='cpYearNavigation" WIDTH="10"><A CLASS="',v=');">&gt;</A></TD>',u="</SPAN></TD>",t='cpMonthNavigation">',s=');">&lt;</A></TD>',r='cpMonthNavigation" HREF="',q='cpMonthNavigation" WIDTH="10"><A CLASS="',p=",",o='cpMonthNavigation" WIDTH="10">&nbsp;</TD>',n="</select></TD>",m="</option>",l='<option value="',k="SELECTED",h="(",g='<TD CLASS="',f="<TR>\n",e="<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>",c="week-end",b="WINDOW",a=this,now=new Date;if(a.type==b)var windowref="window.opener.";else var windowref="";var result="";if(a.type==b){result+="<HTML><HEAD><TITLE>Calendar</TITLE>"+a.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="'+a.cssPrefix+'cpBorder" WIDTH=144 BORDER=1 BORDERWIDTH=1 CELLSPACING=0 CELLPADDING=1>\n';result+="<TR><TD ALIGN=CENTER>\n";result+="<CENTER>\n"}if(a.displayType=="date"||a.displayType==c){if(a.currentDate==null)a.currentDate=now;if(arguments.length>0)var month=arguments[0];else var month=a.currentDate.getMonth()+1;if(arguments.length>1&&arguments[1]>0&&arguments[1]-0==arguments[1])var year=arguments[1];else var year=a.currentDate.getFullYear();var daysinmonth=[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),display_year=year,display_month=month,display_date=1,weekday=current_month.getDay(),offset=0;offset=weekday>=a.weekStartDay?weekday-a.weekStartDay:7-a.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,next_month_year=year;if(next_month>12){next_month=1;next_month_year++}var last_month=month-1,last_month_year=year;if(last_month<1){last_month=12;last_month_year--}var date_class;if(a.type!=b)result+=e;result+=f;var refresh=windowref+"CP_refreshCalendar",refreshLink="javascript:"+refresh;if(a.isShowNavigationDropdowns){result+=g+a.cssPrefix+'cpMonthNavigation" WIDTH="78" COLSPAN="3"><select CLASS="'+a.cssPrefix+'cpMonthNavigation" name="cpMonth" onChange="'+refresh+h+a.index+",this.options[this.selectedIndex].value-0,"+(year-0)+');">';for(var monthCounter=1;monthCounter<=12;monthCounter++){var selected=monthCounter==month?k:"";result+=l+monthCounter+'" '+selected+">"+a.monthNames[monthCounter-1]+m}result+=n;result+=g+a.cssPrefix+o;result+=g+a.cssPrefix+'cpYearNavigation" WIDTH="56" COLSPAN="3"><select CLASS="'+a.cssPrefix+'cpYearNavigation" name="cpYear" onChange="'+refresh+h+a.index+p+month+',this.options[this.selectedIndex].value-0);">';for(var yearCounter=year-a.yearSelectStartOffset;yearCounter<=year+a.yearSelectStartOffset;yearCounter++){var selected=yearCounter==year?k:"";result+=l+yearCounter+'" '+selected+">"+yearCounter+m}result+=n}else if(a.isShowYearNavigation){result+=g+a.cssPrefix+q+a.cssPrefix+r+refreshLink+h+a.index+p+last_month+p+last_month_year+s;result+=g+a.cssPrefix+'cpMonthNavigation" WIDTH="58"><SPAN CLASS="'+a.cssPrefix+t+a.monthNames[month-1]+u;result+=g+a.cssPrefix+q+a.cssPrefix+r+refreshLink+h+a.index+p+next_month+p+next_month_year+v;result+=g+a.cssPrefix+o;result+=g+a.cssPrefix+w+a.cssPrefix+x+refreshLink+h+a.index+p+month+p+(year-1)+s;if(a.isShowYearNavigationInput)result+=g+a.cssPrefix+'cpYearNavigation" WIDTH="36"><INPUT NAME="cpYear" CLASS="'+a.cssPrefix+'cpYearNavigation" SIZE="4" MAXLENGTH="4" VALUE="'+year+'" onBlur="'+refresh+h+a.index+p+month+',this.value-0);"></TD>';else result+=g+a.cssPrefix+'cpYearNavigation" WIDTH="36"><SPAN CLASS="'+a.cssPrefix+'cpYearNavigation">'+year+u;result+=g+a.cssPrefix+w+a.cssPrefix+x+refreshLink+h+a.index+p+month+p+(year+1)+v}else{result+=g+a.cssPrefix+y+a.cssPrefix+r+refreshLink+h+a.index+p+last_month+p+last_month_year+z;result+=g+a.cssPrefix+'cpMonthNavigation" WIDTH="100"><SPAN CLASS="'+a.cssPrefix+t+a.monthNames[month-1]+" "+year+A;result+=g+a.cssPrefix+y+a.cssPrefix+r+refreshLink+h+a.index+p+next_month+p+next_month_year+B}result+=C;result+="<TABLE WIDTH=120 BORDER=0 CELLSPACING=0 CELLPADDING=1 ALIGN=CENTER>\n";result+=f;for(var j=0;j<7;j++)result+=g+a.cssPrefix+'cpDayColumnHeader" WIDTH="14%"><SPAN CLASS="'+a.cssPrefix+'cpDayColumnHeader">'+a.dayHeaders[(a.weekStartDay+j)%7]+"</TD>\n";result+="</TR>\n";for(var row=1;row<=6;row++){result+=f;for(var col=1;col<=7;col++){var disabled=false;if(a.disabledDatesExpression!=""){var ds=""+display_year+LZ(display_month)+LZ(display_date);eval(D+a.disabledDatesExpression+")")}var dateClass="";if(display_month==a.currentDate.getMonth()+1&&display_date==a.currentDate.getDate()&&display_year==a.currentDate.getFullYear())dateClass="cpCurrentDate";else if(display_month==month)dateClass="cpCurrentMonthDate";else dateClass="cpOtherMonthDate";if(disabled||a.disabledWeekDays[col-1])result+=E+a.cssPrefix+dateClass+'"><SPAN CLASS="'+a.cssPrefix+dateClass+'Disabled">'+display_date+A;else{var selected_date=display_date,selected_month=display_month,selected_year=display_year;if(a.displayType==c){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<1e3)selected_year+=1900;selected_month=d.getMonth()+1;selected_date=d.getDate()}result+=E+a.cssPrefix+dateClass+'"><A HREF="javascript:'+windowref+a.returnFunction+h+selected_year+p+selected_month+p+selected_date+F+windowref+G+a.index+H+a.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+=I}var current_weekday=now.getDay()-a.weekStartDay;if(current_weekday<0)current_weekday+=7;result+=f;result+='\t<TD COLSPAN=7 ALIGN=CENTER CLASS="'+a.cssPrefix+'cpTodayText">\n';if(a.disabledDatesExpression!=""){var ds=""+now.getFullYear()+LZ(now.getMonth()+1)+LZ(now.getDate());eval(D+a.disabledDatesExpression+")")}if(disabled||a.disabledWeekDays[current_weekday+1])result+='\t\t<SPAN CLASS="'+a.cssPrefix+'cpTodayTextDisabled">'+a.todayText+"</SPAN>\n";else result+='\t\t<A CLASS="'+a.cssPrefix+'cpTodayText" HREF="javascript:'+windowref+a.returnFunction+"('"+now.getFullYear()+"','"+(now.getMonth()+1)+"','"+now.getDate()+"');"+windowref+G+a.index+"');\">"+a.todayText+"</A>\n";result+="\t\t<BR>\n";result+="\t</TD></TR></TABLE></CENTER></TD></TR></TABLE>\n"}if(a.displayType=="month"||a.displayType=="quarter"||a.displayType==J){if(arguments.length>0)var year=arguments[0];else if(a.displayType==J)var year=now.getFullYear()-a.yearSelectStartOffset;else var year=now.getFullYear();if(a.displayType!=J&&a.isShowYearNavigation){result+=e;result+=f;result+=E+a.cssPrefix+K+a.cssPrefix+L+windowref+M+a.index+p+(year-1)+z;result+=E+a.cssPrefix+'cpYearNavigation" WIDTH="100">'+year+"</TD>\n";result+=E+a.cssPrefix+K+a.cssPrefix+L+windowref+M+a.index+p+(year+1)+B;result+=C}}if(a.displayType=="month"){result+=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="'+a.cssPrefix+O+windowref+a.returnMonthFunction+h+year+p+(monthindex+1)+F+windowref+G+a.index+H+date_class+'">'+a.monthAbbreviations[monthindex]+P}result+=I}result+=Q}if(a.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="'+a.cssPrefix+O+windowref+a.returnQuarterFunction+h+year+p+quarter+F+windowref+G+a.index+H+date_class+'">Q'+quarter+"</A><BR><BR></TD>"}result+=I}result+=Q}if(a.displayType==J){var yearColumnSize=4;result+=e;result+=f;result+=E+a.cssPrefix+R+a.cssPrefix+L+windowref+M+a.index+p+(year-yearColumnSize*2)+z;result+=E+a.cssPrefix+R+a.cssPrefix+L+windowref+M+a.index+p+(year+yearColumnSize*2)+B;result+=C;result+=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="'+a.cssPrefix+O+windowref+a.returnYearFunction+h+currentyear+F+windowref+G+a.index+H+date_class+'">'+currentyear+P}result+=I}result+=Q}if(a.type==b)result+="</BODY></HTML>\n";return result}