function helpWindow(b){var a=new xWindow("helpWin",750,700,-1,-1,0,0,1,1,0,1);a.load(b);return true}function appPopupWindow(b){var a=new xWindow("appPopupWin",750,700,-1,-1,1,1,1,1,0,1);a.load(b);return true}function showTooltip(b){var a=b||window.event;e=new xEvent(a);e.target.onmousemove=onTooltipMouseMove;e.target.onmouseout=hideAllTooltips}function onTooltipMouseMove(c){var b=c||window.event;e=new xEvent(b);t=xGetElementById(e.target.className);var a=xGetElementById("wrapper1");x=e.pageX-xPageX(a)+10;y=e.pageY-xPageY(a)+10;xLeft(t,x);xTop(t,y);if(t.style.display=="none"){t.style.display="block"}}function hideAllTooltips(){var b=xGetElementsByClassName("tooltip");for(var a=0;a<b.length;a++){b[a].style.display="none"}}var currentMenu=null;if(!document.getElementById){document.getElementById=function(){return null}}function initializeMenu(d,a){var c=document.getElementById(d);var b=document.getElementById(a);if(c==null||b==null){return}b.onmouseover=function(){if(currentMenu){currentMenu.style.visibility="hidden";this.showMenu()}};b.onclick=function(){if(currentMenu==null){this.showMenu()}else{currentMenu.style.visibility="hidden";currentMenu=null}return false};b.showMenu=function(){c.style.left=this.offsetLeft+"px";c.style.top=this.offsetTop+this.offsetHeight+"px";c.style.visibility="visible";currentMenu=c}}function expandMenus(){}function initMenuTab(){var a=xGetElementById("menuTabList");if(!a){return}activateMenuTab()}function activateMenuTab(){var g=xGetElementById("menuTabList");var h=xGetElementById("menuTabBody");var b=g.getElementsByTagName("li");var a;for(var d=0;d<b.length;d++){var c=b[d].getElementsByTagName("a")[0].getAttribute("href");var f=document.location.pathname.toString();if(c.indexOf(f)!=-1){if(b[d].parentNode.className=="menuTabSubmenu"){b[d].firstChild.className="menuTabSelected";b[d].parentNode.parentNode.className="menuTabSelected";b[d].parentNode.style.width=xWidth(h);h.style.padding="30px 5px 5px 5px"}else{b[d].className+="menuTabSelected"}}}}function getAnchorPosition(b){var f=false;var l=new Object();var k=0,h=0;var d=false,g=false,j=false;if(document.getElementById){d=true}else{if(document.all){g=true}else{if(document.layers){j=true}}}if(d&&document.all){k=AnchorPosition_getPageOffsetLeft(document.all[b]);h=AnchorPosition_getPageOffsetTop(document.all[b])}else{if(d){var a=document.getElementById(b);k=AnchorPosition_getPageOffsetLeft(a);h=AnchorPosition_getPageOffsetTop(a)}else{if(g){k=AnchorPosition_getPageOffsetLeft(document.all[b]);h=AnchorPosition_getPageOffsetTop(document.all[b])}else{if(j){var m=0;for(var c=0;c<document.anchors.length;c++){if(document.anchors[c].name==b){m=1;break}}if(m==0){l.x=0;l.y=0;return l}k=document.anchors[c].x;h=document.anchors[c].y}else{l.x=0;l.y=0;return l}}}}l.x=k;l.y=h;return l}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(f,g,c,d){var b=getDateFromFormat(f,g);var a=getDateFromFormat(c,d);if(b==0||a==0){return -1}else{if(b>a){return 1}}return 0}function formatDate(N,I){I=I+"";var n="";var z=0;var L="";var g="";var l=N.getYear()+"";var i=N.getMonth()+1;var J=N.getDate();var p=N.getDay();var o=N.getHours();var B=N.getMinutes();var r=N.getSeconds();var v,w,b,u,O,f,G,F,C,q,Q,o,P,j,a,D;var A=new Object();if(l.length<4){l=""+(l-0+1900)}A.y=""+l;A.yyyy=l;A.yy=l.substring(2,4);A.M=i;A.MM=LZ(i);A.MMM=MONTH_NAMES[i-1];A.NNN=MONTH_NAMES[i+11];A.d=J;A.dd=LZ(J);A.E=DAY_NAMES[p+7];A.EE=DAY_NAMES[p];A.H=o;A.HH=LZ(o);if(o==0){A.h=12}else{if(o>12){A.h=o-12}else{A.h=o}}A.hh=LZ(A.h);if(o>11){A.K=o-12}else{A.K=o}A.k=o+1;A.KK=LZ(A.K);A.kk=LZ(A.k);if(o>11){A.a="PM"}else{A.a="AM"}A.m=B;A.mm=LZ(B);A.s=r;A.ss=LZ(r);while(z<I.length){L=I.charAt(z);g="";while((I.charAt(z)==L)&&(z<I.length)){g+=I.charAt(z++)}if(A[g]!=null){n=n+A[g]}else{n=n+g}}return n}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(g,d,f,c){for(var a=c;a>=f;a--){var b=g.substring(d,d+a);if(b.length<f){return null}if(_isInteger(b)){return b}}return null}function getDateFromFormat(A,q){A=A+"";q=q+"";var z=0;var m=0;var s="";var g="";var w="";var j,h;var b=new Date();var k=b.getYear();var v=b.getMonth()+1;var u=1;var d=b.getHours();var r=b.getMinutes();var o=b.getSeconds();var l="";while(m<q.length){s=q.charAt(m);g="";while((q.charAt(m)==s)&&(m<q.length)){g+=q.charAt(m++)}if(g=="yyyy"||g=="yy"||g=="y"){if(g=="yyyy"){j=4;h=4}if(g=="yy"){j=2;h=2}if(g=="y"){j=2;h=4}k=_getInt(A,z,j,h);if(k==null){return 0}z+=k.length;if(k.length==2){if(k>70){k=1900+(k-0)}else{k=2000+(k-0)}}}else{if(g=="MMM"||g=="NNN"){v=0;for(var p=0;p<MONTH_NAMES.length;p++){var f=MONTH_NAMES[p];if(A.substring(z,z+f.length).toLowerCase()==f.toLowerCase()){if(g=="MMM"||(g=="NNN"&&p>11)){v=p+1;if(v>12){v-=12}z+=f.length;break}}}if((v<1)||(v>12)){return 0}}else{if(g=="EE"||g=="E"){for(var p=0;p<DAY_NAMES.length;p++){var n=DAY_NAMES[p];if(A.substring(z,z+n.length).toLowerCase()==n.toLowerCase()){z+=n.length;break}}}else{if(g=="MM"||g=="M"){v=_getInt(A,z,g.length,2);if(v==null||(v<1)||(v>12)){return 0}z+=v.length}else{if(g=="dd"||g=="d"){u=_getInt(A,z,g.length,2);if(u==null||(u<1)||(u>31)){return 0}z+=u.length}else{if(g=="hh"||g=="h"){d=_getInt(A,z,g.length,2);if(d==null||(d<1)||(d>12)){return 0}z+=d.length}else{if(g=="HH"||g=="H"){d=_getInt(A,z,g.length,2);if(d==null||(d<0)||(d>23)){return 0}z+=d.length}else{if(g=="KK"||g=="K"){d=_getInt(A,z,g.length,2);if(d==null||(d<0)||(d>11)){return 0}z+=d.length}else{if(g=="kk"||g=="k"){d=_getInt(A,z,g.length,2);if(d==null||(d<1)||(d>24)){return 0}z+=d.length;d--}else{if(g=="mm"||g=="m"){r=_getInt(A,z,g.length,2);if(r==null||(r<0)||(r>59)){return 0}z+=r.length}else{if(g=="ss"||g=="s"){o=_getInt(A,z,g.length,2);if(o==null||(o<0)||(o>59)){return 0}z+=o.length}else{if(g=="a"){if(A.substring(z,z+2).toLowerCase()=="am"){l="AM"}else{if(A.substring(z,z+2).toLowerCase()=="pm"){l="PM"}else{return 0}}z+=2}else{if(A.substring(z,z+g.length)!=g){return 0}else{z+=g.length}}}}}}}}}}}}}}if(z!=A.length){return 0}if(v==2){if(((k%4==0)&&(k%100!=0))||(k%400==0)){if(u>29){return 0}}else{if(u>28){return 0}}}if((v==4)||(v==6)||(v==9)||(v==11)){if(u>30){return 0}}if(d<12&&l=="PM"){d=d-0+12}else{if(d>11&&l=="AM"){d-=12}}var a=new Date(k,v-1,u,d,r,o);return a.getTime()}function parseDate(k){var g=(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",g?"dateFirst":"monthFirst",g?"monthFirst":"dateFirst");var h=null;for(var f=0;f<b.length;f++){var a=window[b[f]];for(var c=0;c<a.length;c++){h=getDateFromFormat(k,a[c]);if(h!=0){return new Date(h)}}}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=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(){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(f,a,c){if(window.CP_targetInput!=null){var b=new Date(f,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,f){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,f)}else{if(c.value!=""){d=getDateFromFormat(c.value,f)}}if(b!=null||c.value!=""){if(d==0){this.currentDate=null}else{this.currentDate=new Date(d)}}window.CP_dateFormat=f;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:0 0 1 0;}\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:1;border:solid thin #800000;}\n";a+="TD."+b+"cpCurrentDateDisabled{border-width:1;border:solid thin #FFAAAA;}\n";a+="TD."+b+"cpTodayText, TD."+b+"cpTodayTextDisabled{border:solid thin #C0C0C0;border-width:1 0 0 0;}\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+"("+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"><select CLASS="'+this.cssPrefix+'cpYearNavigation" name="cpYear" onChange="'+refresh+"("+this.index+","+month+',this.options[this.selectedIndex].value-0);">';for(var yearCounter=year-this.yearSelectStartOffset;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=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};
