var cptmptest="";function getAnchorPosition(b){var k=false;var g=new Object();var c=0,j=0;var d=false,a=false,f=false;if(document.getElementById){d=true}else{if(document.all){a=true}else{if(document.layers){f=true}}}if(d&&document.all){c=AnchorPosition_getPageOffsetLeft(document.all[b]);j=AnchorPosition_getPageOffsetTop(document.all[b])}else{if(d){var e=document.getElementById(b);c=AnchorPosition_getPageOffsetLeft(e);j=AnchorPosition_getPageOffsetTop(e)}else{if(a){c=AnchorPosition_getPageOffsetLeft(document.all[b]);j=AnchorPosition_getPageOffsetTop(document.all[b])}else{if(f){var h=0;for(var l=0;l<document.anchors.length;l++){if(document.anchors[l].name==b){h=1;break}}if(h==0){g.x=0;g.y=0;return g}c=document.anchors[l].x;j=document.anchors[l].y}else{g.x=0;g.y=0;return g}}}}g.x=c;g.y=j;return g}function getAnchorWindowPosition(c){var a=getAnchorPosition(c);var b=0;var d=0;if(document.getElementById){if(isNaN(window.screenX)){b=a.x-document.body.scrollLeft+window.screenLeft;d=a.y-document.body.scrollTop+window.screenTop}else{b=a.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;d=a.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset}}else{if(document.all){b=a.x-document.body.scrollLeft+window.screenLeft;d=a.y-document.body.scrollTop+window.screenTop}else{if(document.layers){b=a.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;d=a.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset}}}a.x=b;a.y=d;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=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(a,c){var b=getDateFromFormat(a,c);if(b==0){return false}return true}function compareDates(f,d,c,a){var e=getDateFromFormat(f,d);var b=getDateFromFormat(c,a);if(e==0||b==0){return -1}else{if(e>b){return 1}}return 0}function formatDate(q,o){o=o+"";var G="";var z=0;var J="";var n="";var l=q.getYear()+"";var j=q.getMonth()+1;var p=q.getDate();var D=q.getDay();var b=q.getHours();var r=q.getMinutes();var N=q.getSeconds();var v,C,t,u,a,x,f,e,L,w,F,b,A,I,O,g;var B=new Object();if(l.length<4){l=""+(l-0+1900)}B.y=""+l;B.yyyy=l;B.yy=l.substring(2,4);B.M=j;B.MM=LZ(j);B.MMM=MONTH_NAMES[j-1];B.NNN=MONTH_NAMES[j+11];B.d=p;B.dd=LZ(p);B.E=DAY_NAMES[D+7];B.EE=DAY_NAMES[D];B.H=b;B.HH=LZ(b);if(b==0){B.h=12}else{if(b>12){B.h=b-12}else{B.h=b}}B.hh=LZ(B.h);if(b>11){B.K=b-12}else{B.K=b}B.k=b+1;B.KK=LZ(B.K);B.kk=LZ(B.k);if(b>11){B.a="PM"}else{B.a="AM"}B.m=r;B.mm=LZ(r);B.s=N;B.ss=LZ(N);while(z<o.length){J=o.charAt(z);n="";while((o.charAt(z)==J)&&(z<o.length)){n+=o.charAt(z++)}if(B[n]!=null){G=G+B[n]}else{G=G+n}}return G}function _isInteger(b){var a="1234567890";for(var c=0;c<b.length;c++){if(a.indexOf(b.charAt(c))==-1){return false}}return true}function _getInt(a,e,f,c){for(var d=c;d>=f;d--){var b=a.substring(e,e+d);if(b.length<f){return null}if(_isInteger(b)){return b}}return null}function getDateFromFormat(u,a){u=u+"";a=a+"";var h=0;var e=0;var p="";var q="";var b="";var r,o;var g=new Date();var v=g.getYear();var m=g.getMonth()+1;var k=1;var n=g.getHours();var t=g.getMinutes();var l=g.getSeconds();var w="";while(e<a.length){p=a.charAt(e);q="";while((a.charAt(e)==p)&&(e<a.length)){q+=a.charAt(e++)}if(q=="yyyy"||q=="yy"||q=="y"){if(q=="yyyy"){r=4;o=4}if(q=="yy"){r=2;o=2}if(q=="y"){r=2;o=4}v=_getInt(u,h,r,o);if(v==null){return 0}h+=v.length;if(v.length==2){if(v>70){v=1900+(v-0)}else{v=2000+(v-0)}}}else{if(q=="MMM"||q=="NNN"){m=0;for(var j=0;j<MONTH_NAMES.length;j++){var s=MONTH_NAMES[j];if(u.substring(h,h+s.length).toLowerCase()==s.toLowerCase()){if(q=="MMM"||(q=="NNN"&&j>11)){m=j+1;if(m>12){m-=12}h+=s.length;break}}}if((m<1)||(m>12)){return 0}}else{if(q=="EE"||q=="E"){for(var j=0;j<DAY_NAMES.length;j++){var f=DAY_NAMES[j];if(u.substring(h,h+f.length).toLowerCase()==f.toLowerCase()){h+=f.length;break}}}else{if(q=="MM"||q=="M"){m=_getInt(u,h,q.length,2);if(m==null||(m<1)||(m>12)){return 0}h+=m.length}else{if(q=="dd"||q=="d"){k=_getInt(u,h,q.length,2);if(k==null||(k<1)||(k>31)){return 0}h+=k.length}else{if(q=="hh"||q=="h"){n=_getInt(u,h,q.length,2);if(n==null||(n<1)||(n>12)){return 0}h+=n.length}else{if(q=="HH"||q=="H"){n=_getInt(u,h,q.length,2);if(n==null||(n<0)||(n>23)){return 0}h+=n.length}else{if(q=="KK"||q=="K"){n=_getInt(u,h,q.length,2);if(n==null||(n<0)||(n>11)){return 0}h+=n.length}else{if(q=="kk"||q=="k"){n=_getInt(u,h,q.length,2);if(n==null||(n<1)||(n>24)){return 0}h+=n.length;n--}else{if(q=="mm"||q=="m"){t=_getInt(u,h,q.length,2);if(t==null||(t<0)||(t>59)){return 0}h+=t.length}else{if(q=="ss"||q=="s"){l=_getInt(u,h,q.length,2);if(l==null||(l<0)||(l>59)){return 0}h+=l.length}else{if(q=="a"){if(u.substring(h,h+2).toLowerCase()=="am"){w="AM"}else{if(u.substring(h,h+2).toLowerCase()=="pm"){w="PM"}else{return 0}}h+=2}else{if(u.substring(h,h+q.length)!=q){return 0}else{h+=q.length}}}}}}}}}}}}}}if(h!=u.length){return 0}if(m==2){if(((v%4==0)&&(v%100!=0))||(v%400==0)){if(k>29){return 0}}else{if(k>28){return 0}}}if((m==4)||(m==6)||(m==9)||(m==11)){if(k>30){return 0}}if(n<12&&w=="PM"){n=n-0+12}else{if(n>11&&w=="AM"){n-=12}}var d=new Date(v,m-1,k,n,t,l);return d.getTime()}function parseDate(c){var a=(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 h=new Array("generalFormats",a?"dateFirst":"monthFirst",a?"monthFirst":"dateFirst");var b=null;for(var e=0;e<h.length;e++){var f=window[h[e]];for(var g=0;g<f.length;g++){b=getDateFromFormat(c,f[g]);if(b!=0){return new Date(b)}}}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(){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(b){this.getXYPosition(b);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 a=window.opera||(document.layers&&!navigator.mimeTypes["*"])||navigator.vendor=="KDE"||(document.childNodes&&!document.all&&!navigator.taintEnabled);this.popupWindow=window.open(a?"":"about:blank","window_"+b,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(a){if(this.divName!=null){if(this.use_layers){var b=a.pageX;var d=a.pageY;var c=document.layers[this.divName];if((b>c.left)&&(b<c.left+c.clip.width)&&(d>c.top)&&(d<c.top+c.clip.height)){return true}else{return false}}else{if(document.all){var c=window.event.srcElement;while(c.parentElement!=null){if(c.id==this.divName){return true}c=c.parentElement}return false}else{if(this.use_gebi&&a){var c=a.originalTarget;while(c.parentNode!=null){if(c.id==this.divName){return true}c=c.parentNode}return false}}}return false}return false}function PopupWindow_hideIfNotClicked(a){if(this.autoHideEnabled&&!this.isClicked(a)){this.hidePopup();CP_hideFrame("calframe")}this.autoHideEnabled=true}function PopupWindow_autoHide(){this.autoHideEnabled=true}function PopupWindow_hidePopupWindows(a){for(var c=0;c<popupWindowObjects.length;c++){if(popupWindowObjects[c]!=null){var b=popupWindowObjects[c];b.hideIfNotClicked(a)}}}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(175,200)}a.offsetX=30;a.offsetY=-10;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.eventFunction="CP_tmpEventFunction";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=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.setEventFunction=CP_setEventFunction;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_tmpEventFunction(b,a,c){if(window.CP_targetInput!=null){return true}else{alert("Use setEventFunction() to define which function will get the clicked results!")}}function CP_tmpReturnFunction(b,a,c){if(window.CP_targetInput!=null){var e=new Date(b,a-1,c,0,0,0);if(window.CP_calendarObject!=null){window.CP_calendarObject.copyMonthNamesToWindow()}window.CP_targetInput.value=formatDate(e,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_setEventFunction(a){this.eventFunction=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();CP_hideFrame("calframe")}else{this.hidePopup();CP_hideFrame("calframe")}}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(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(e,d,a){var c=(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(e.type!="text"&&e.type!="hidden"&&e.type!="textarea"){alert("calendar.select: Input object passed is not a valid form input object");window.CP_targetInput=null;return}if(e.disabled){return}window.CP_targetInput=e;window.CP_calendarObject=this;this.currentDate=null;var b=0;if(c!=null){b=getDateFromFormat(c,a)}else{if(e.value!=""){b=getDateFromFormat(e.value,a)}}if(c!=null||e.value!=""){if(b==0){this.currentDate=null}else{this.currentDate=new Date(b)}}window.CP_dateFormat=a;this.showCalendar(d)}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=169 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=169 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>"}result+="<TR>\n";var refresh=windowref+"CP_refreshCalendar";var refreshLink="javascript:"+refresh;if(this.type+" - "+this.isShowNavigationDropdowns){this.autoHideEnabled=false;result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="98" COLSPAN="3" style="padding:2px 0;"><select CLASS="'+this.cssPrefix+'cpMonthNavigation" style="background-color:#ffffff;" name="cpMonth" onChange="'+refresh+"("+this.index+",this.options[this.selectedIndex].value-0,"+(year-0)+');">';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" style="padding:2px 0;"><select CLASS="'+this.cssPrefix+'cpYearNavigation" style="background-color:#ffffff; margin-right:2px;" name="cpYear" onChange="'+refresh+"("+this.index+","+month+',this.options[this.selectedIndex].value-0);">';for(var yearCounter=year;yearCounter<=year+this.yearSelectStartOffset;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=145 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+this.eventFunction+"("+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=169 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=145 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=145 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=169 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=145 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}function CP_showFrame(a){document.getElementById(a).style.display="inline"}function CP_hideFrame(a){var b=document.getElementsByTagName("IFRAME");for(i=0;i<b.length;i++){if(b[i].className==a){b[i].style.display="none"}}}function frm_cal_validRange(a){var b=new Date();var c=1000*60*60*24;var d=a*c;b.setTime(b.getTime()+d);return formatDate(b,"MM/dd/yyyy")};

