function getAnchorPosition(b){var e=false;var k=new Object();var j=0,g=0;var d=false,f=false,h=false;if(document.getElementById){d=true}else{if(document.all){f=true}else{if(document.layers){h=true}}}if(d&&document.all){j=AnchorPosition_getPageOffsetLeft(document.all[b]);g=AnchorPosition_getPageOffsetTop(document.all[b])}else{if(d){var a=document.getElementById(b);j=AnchorPosition_getPageOffsetLeft(a);g=AnchorPosition_getPageOffsetTop(a)}else{if(f){j=AnchorPosition_getPageOffsetLeft(document.all[b]);g=AnchorPosition_getPageOffsetTop(document.all[b])}else{if(h){var l=0;for(var c=0;c<document.anchors.length;c++){if(document.anchors[c].name==b){l=1;break}}if(l==0){k.x=0;k.y=0;return k}j=document.anchors[c].x;g=document.anchors[c].y}else{k.x=0;k.y=0;return k}}}}k.x=j;k.y=g;return k}function getAnchorWindowPosition(b){var c=getAnchorPosition(b);var a=0;var d=0;if(document.getElementById){if(isNaN(window.screenX)){a=c.x-document.body.scrollLeft+window.screenLeft;d=c.y-document.body.scrollTop+window.screenTop}else{a=c.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;d=c.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset}}else{if(document.all){a=c.x-document.body.scrollLeft+window.screenLeft;d=c.y-document.body.scrollTop+window.screenTop}else{if(document.layers){a=c.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;d=c.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset}}}c.x=a;c.y=d;return c}function AnchorPosition_getPageOffsetLeft(b){var a=b.offsetLeft;while((b=b.offsetParent)!=null){a+=b.offsetLeft}return a}function AnchorPosition_getWindowOffsetLeft(a){return AnchorPosition_getPageOffsetLeft(a)-document.body.scrollLeft}function AnchorPosition_getPageOffsetTop(a){var b=a.offsetTop;while((a=a.offsetParent)!=null){b+=a.offsetTop}return b}function AnchorPosition_getWindowOffsetTop(a){return AnchorPosition_getPageOffsetTop(a)-document.body.scrollTop}var MONTH_NAMES=new Array("January","February","March","April","May","June","July","August","September","October","November","December","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");var DAY_NAMES=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sun","Mon","Tue","Wed","Thu","Fri","Sat");function LZ(a){return(a<0||a>9?"":"0")+a}function isDate(c,b){var a=getDateFromFormat(c,b);if(a==0){return false}return true}function compareDates(e,f,c,d){var b=getDateFromFormat(e,f);var a=getDateFromFormat(c,d);if(b==0||a==0){return -1}else{if(b>a){return 1}}return 0}function formatDate(J,F){F=F+"";var l="";var w=0;var I="";var f="";var j=J.getYear()+"";var g=J.getMonth()+1;var G=J.getDate();var o=J.getDay();var n=J.getHours();var z=J.getMinutes();var r=J.getSeconds();var u,v,b,t,L,e,D,C,A,q,O,n,N,i,a,B;var x=new Object();if(j.length<4){j=""+(j-0+1900)}x.y=""+j;x.yyyy=j;x.yy=j.substring(2,4);x.M=g;x.MM=LZ(g);x.MMM=MONTH_NAMES[g-1];x.NNN=MONTH_NAMES[g+11];x.d=G;x.dd=LZ(G);x.E=DAY_NAMES[o+7];x.EE=DAY_NAMES[o];x.H=n;x.HH=LZ(n);if(n==0){x.h=12}else{if(n>12){x.h=n-12}else{x.h=n}}x.hh=LZ(x.h);if(n>11){x.K=n-12}else{x.K=n}x.k=n+1;x.KK=LZ(x.K);x.kk=LZ(x.k);if(n>11){x.a="PM"}else{x.a="AM"}x.m=z;x.mm=LZ(z);x.s=r;x.ss=LZ(r);while(w<F.length){I=F.charAt(w);f="";while((F.charAt(w)==I)&&(w<F.length)){f+=F.charAt(w++)}if(x[f]!=null){l=l+x[f]}else{l=l+f}}return l}function _isInteger(c){var b="1234567890";for(var a=0;a<c.length;a++){if(b.indexOf(c.charAt(a))==-1){return false}}return true}function _getInt(f,d,e,c){for(var a=c;a>=e;a--){var b=f.substring(d,d+a);if(b.length<e){return null}if(_isInteger(b)){return b}}return null}function getDateFromFormat(z,q){z=z+"";q=q+"";var w=0;var l=0;var s="";var f="";var v="";var h,g;var b=new Date();var j=b.getYear();var u=b.getMonth()+1;var t=1;var d=b.getHours();var r=b.getMinutes();var n=b.getSeconds();var k="";while(l<q.length){s=q.charAt(l);f="";while((q.charAt(l)==s)&&(l<q.length)){f+=q.charAt(l++)}if(f=="yyyy"||f=="yy"||f=="y"){if(f=="yyyy"){h=4;g=4}if(f=="yy"){h=2;g=2}if(f=="y"){h=2;g=4}j=_getInt(z,w,h,g);if(j==null){return 0}w+=j.length;if(j.length==2){if(j>70){j=1900+(j-0)}else{j=2000+(j-0)}}}else{if(f=="MMM"||f=="NNN"){u=0;for(var o=0;o<MONTH_NAMES.length;o++){var e=MONTH_NAMES[o];if(z.substring(w,w+e.length).toLowerCase()==e.toLowerCase()){if(f=="MMM"||(f=="NNN"&&o>11)){u=o+1;if(u>12){u-=12}w+=e.length;break}}}if((u<1)||(u>12)){return 0}}else{if(f=="EE"||f=="E"){for(var o=0;o<DAY_NAMES.length;o++){var m=DAY_NAMES[o];if(z.substring(w,w+m.length).toLowerCase()==m.toLowerCase()){w+=m.length;break}}}else{if(f=="MM"||f=="M"){u=_getInt(z,w,f.length,2);if(u==null||(u<1)||(u>12)){return 0}w+=u.length}else{if(f=="dd"||f=="d"){t=_getInt(z,w,f.length,2);if(t==null||(t<1)||(t>31)){return 0}w+=t.length}else{if(f=="hh"||f=="h"){d=_getInt(z,w,f.length,2);if(d==null||(d<1)||(d>12)){return 0}w+=d.length}else{if(f=="HH"||f=="H"){d=_getInt(z,w,f.length,2);if(d==null||(d<0)||(d>23)){return 0}w+=d.length}else{if(f=="KK"||f=="K"){d=_getInt(z,w,f.length,2);if(d==null||(d<0)||(d>11)){return 0}w+=d.length}else{if(f=="kk"||f=="k"){d=_getInt(z,w,f.length,2);if(d==null||(d<1)||(d>24)){return 0}w+=d.length;d--}else{if(f=="mm"||f=="m"){r=_getInt(z,w,f.length,2);if(r==null||(r<0)||(r>59)){return 0}w+=r.length}else{if(f=="ss"||f=="s"){n=_getInt(z,w,f.length,2);if(n==null||(n<0)||(n>59)){return 0}w+=n.length}else{if(f=="a"){if(z.substring(w,w+2).toLowerCase()=="am"){k="AM"}else{if(z.substring(w,w+2).toLowerCase()=="pm"){k="PM"}else{return 0}}w+=2}else{if(z.substring(w,w+f.length)!=f){return 0}else{w+=f.length}}}}}}}}}}}}}}if(w!=z.length){return 0}if(u==2){if(((j%4==0)&&(j%100!=0))||(j%400==0)){if(t>29){return 0}}else{if(t>28){return 0}}}if((u==4)||(u==6)||(u==9)||(u==11)){if(t>30){return 0}}if(d<12&&k=="PM"){d=d-0+12}else{if(d>11&&k=="AM"){d-=12}}var a=new Date(j,u-1,t,d,r,n);return a.getTime()}function parseDate(h){var f=(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",f?"dateFirst":"monthFirst",f?"monthFirst":"dateFirst");var g=null;for(var e=0;e<b.length;e++){var a=window[b[e]];for(var c=0;c<a.length;c++){g=getDateFromFormat(h,a[c]);if(g!=0){return new Date(g)}}}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 CP_stop(a){if(a&&a.stopPropagation){a.stopPropagation()}}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(e,a,c){if(window.CP_targetInput!=null){var b=new Date(e,a-1,c,0,0,0);if(window.CP_calendarObject!=null){window.CP_calendarObject.copyMonthNamesToWindow()}window.CP_targetInput.value=formatDate(b,window.CP_dateFormat)}else{alert("Use setReturnFunction() to define which function will get the clicked results!")}}function CP_tmpReturnMonthFunction(b,a){alert("Use setReturnMonthFunction() to define which function will get the clicked results!\nYou clicked: year="+b+" , month="+a)}function CP_tmpReturnQuarterFunction(b,a){alert("Use setReturnQuarterFunction() to define which function will get the clicked results!\nYou clicked: year="+b+" , quarter="+a)}function CP_tmpReturnYearFunction(a){alert("Use setReturnYearFunction() to define which function will get the clicked results!\nYou clicked: year="+a)}function CP_setReturnFunction(a){this.returnFunction=a}function CP_setReturnMonthFunction(a){this.returnMonthFunction=a}function CP_setReturnQuarterFunction(a){this.returnQuarterFunction=a}function CP_setReturnYearFunction(a){this.returnYearFunction=a}function CP_setMonthNames(){for(var a=0;a<arguments.length;a++){this.monthNames[a]=arguments[a]}this.copyMonthNamesToWindow()}function CP_setMonthAbbreviations(){for(var a=0;a<arguments.length;a++){this.monthAbbreviations[a]=arguments[a]}this.copyMonthNamesToWindow()}function CP_setDayHeaders(){for(var a=0;a<arguments.length;a++){this.dayHeaders[a]=arguments[a]}}function CP_setWeekStartDay(a){this.weekStartDay=a}function CP_showYearNavigation(){this.isShowYearNavigation=(arguments.length>0)?arguments[0]:true}function CP_setDisplayType(a){if(a!="date"&&a!="week-end"&&a!="month"&&a!="quarter"&&a!="year"){alert("Invalid display type! Must be one of: date,week-end,month,quarter,year");return false}this.displayType=a}function CP_setYearSelectStartOffset(a){this.yearSelectStartOffset=a}function CP_setDisabledWeekDays(){this.disabledWeekDays=new Object();for(var a=0;a<arguments.length;a++){this.disabledWeekDays[arguments[a]]=true}}function CP_addDisabledDates(b,a){if(arguments.length==1){a=b}if(b==null&&a==null){return}if(this.disabledDatesExpression!=""){this.disabledDatesExpression+="||"}if(b!=null){b=parseDate(b);b=""+b.getFullYear()+LZ(b.getMonth()+1)+LZ(b.getDate())}if(a!=null){a=parseDate(a);a=""+a.getFullYear()+LZ(a.getMonth()+1)+LZ(a.getDate())}if(b==null){this.disabledDatesExpression+="(ds<="+a+")"}else{if(a==null){this.disabledDatesExpression+="(ds>="+b+")"}else{this.disabledDatesExpression+="(ds>="+b+"&&ds<="+a+")"}}}function CP_setTodayText(a){this.todayText=a}function CP_setCssPrefix(a){this.cssPrefix=a}function CP_showNavigationDropdowns(){this.isShowNavigationDropdowns=(arguments.length>0)?arguments[0]:true}function CP_showYearNavigationInput(){this.isShowYearNavigationInput=(arguments.length>0)?arguments[0]:true}function CP_hideCalendar(){if(arguments.length>0){window.popupWindowObjects[arguments[0]].hidePopup()}else{this.hidePopup()}}function CP_refreshCalendar(a){var b=window.popupWindowObjects[a];if(arguments.length>1){b.populate(b.getCalendar(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]))}else{b.populate(b.getCalendar())}b.refresh()}function CP_showCalendar(a){if(arguments.length>1){if(arguments[1]==null||arguments[1]==""){this.currentDate=new Date()}else{this.currentDate=new Date(parseDate(arguments[1]))}}this.populate(this.getCalendar());this.showPopup(a)}function CP_select(c,a,e){var b=(arguments.length>3)?arguments[3]:null;if(!window.getDateFromFormat){alert("calendar.select: To use this method you must also include 'date.js' for date formatting");return}if(this.displayType!="date"&&this.displayType!="week-end"){alert("calendar.select: This function can only be used with displayType 'date' or 'week-end'");return}if(c.type!="text"&&c.type!="hidden"&&c.type!="textarea"){alert("calendar.select: Input object passed is not a valid form input object");window.CP_targetInput=null;return}if(c.disabled){return}window.CP_targetInput=c;window.CP_calendarObject=this;this.currentDate=null;var d=0;if(b!=null){d=getDateFromFormat(b,e)}else{if(c.value!=""){d=getDateFromFormat(c.value,e)}}if(b!=null||c.value!=""){if(d==0){this.currentDate=null}else{this.currentDate=new Date(d)}}window.CP_dateFormat=e;this.showCalendar(a)}function getCalendarStyles(){var a="";var b="";if(this!=null&&typeof(this.cssPrefix)!="undefined"&&this.cssPrefix!=null&&this.cssPrefix!=""){b=this.cssPrefix}a+="<STYLE>\n";a+="."+b+"cpYearNavigation,."+b+"cpMonthNavigation{background-color:#C0C0C0;text-align:center;vertical-align:center;text-decoration:none;color:#000000;font-weight:bold;}\n";a+="."+b+"cpDayColumnHeader, ."+b+"cpYearNavigation,."+b+"cpMonthNavigation,."+b+"cpCurrentMonthDate,."+b+"cpCurrentMonthDateDisabled,."+b+"cpOtherMonthDate,."+b+"cpOtherMonthDateDisabled,."+b+"cpCurrentDate,."+b+"cpCurrentDateDisabled,."+b+"cpTodayText,."+b+"cpTodayTextDisabled,."+b+"cpText{font-family:arial;font-size:8pt;}\n";a+="TD."+b+"cpDayColumnHeader{text-align:right;border:solid thin #C0C0C0;border-width:0px 0px 1px 0px;}\n";a+="."+b+"cpCurrentMonthDate, ."+b+"cpOtherMonthDate, ."+b+"cpCurrentDate{text-align:right;text-decoration:none;}\n";a+="."+b+"cpCurrentMonthDateDisabled, ."+b+"cpOtherMonthDateDisabled, ."+b+"cpCurrentDateDisabled{color:#D0D0D0;text-align:right;text-decoration:line-through;}\n";a+="."+b+"cpCurrentMonthDate, .cpCurrentDate{color:#000000;}\n";a+="."+b+"cpOtherMonthDate{color:#808080;}\n";a+="TD."+b+"cpCurrentDate{color:white;background-color: #C0C0C0;border-width:1px;border:solid thin #800000;}\n";a+="TD."+b+"cpCurrentDateDisabled{border-width:1px;border:solid thin #FFAAAA;}\n";a+="TD."+b+"cpTodayText, TD."+b+"cpTodayTextDisabled{border:solid thin #C0C0C0;border-width:1px 0px 0px 0px;}\n";a+="A."+b+"cpTodayText, SPAN."+b+"cpTodayTextDisabled{height:20px;}\n";a+="A."+b+"cpTodayText{color:black;}\n";a+="."+b+"cpTodayTextDisabled{color:#D0D0D0;}\n";a+="."+b+"cpBorder{border:solid thin #808080;}\n";a+="</STYLE>\n";return a}function CP_getCalendar(){var now=new Date();if(this.type=="WINDOW"){var windowref="window.opener."}else{var windowref=""}var result="";if(this.type=="WINDOW"){result+="<HTML><HEAD><TITLE>Calendar</TITLE>"+this.getStyles()+"</HEAD><BODY MARGINWIDTH=0 MARGINHEIGHT=0 TOPMARGIN=0 RIGHTMARGIN=0 LEFTMARGIN=0>\n";result+="<CENTER><TABLE WIDTH=100% BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>\n"}else{result+='<TABLE CLASS="'+this.cssPrefix+'cpBorder" WIDTH=144 BORDER=1 BORDERWIDTH=1 CELLSPACING=0 CELLPADDING=1>\n';result+="<TR><TD ALIGN=CENTER>\n";result+="<CENTER>\n"}if(this.displayType=="date"||this.displayType=="week-end"){if(this.currentDate==null){this.currentDate=now}if(arguments.length>0){var month=arguments[0]}else{var month=this.currentDate.getMonth()+1}if(arguments.length>1&&arguments[1]>0&&arguments[1]-0==arguments[1]){var year=arguments[1]}else{var year=this.currentDate.getFullYear()}var daysinmonth=new Array(0,31,28,31,30,31,30,31,31,30,31,30,31);if(((year%4==0)&&(year%100!=0))||(year%400==0)){daysinmonth[2]=29}var current_month=new Date(year,month-1,1);var display_year=year;var display_month=month;var display_date=1;var weekday=current_month.getDay();var offset=0;offset=(weekday>=this.weekStartDay)?weekday-this.weekStartDay:7-this.weekStartDay+weekday;if(offset>0){display_month--;if(display_month<1){display_month=12;display_year--}display_date=daysinmonth[display_month]-offset+1}var next_month=month+1;var next_month_year=year;if(next_month>12){next_month=1;next_month_year++}var last_month=month-1;var last_month_year=year;if(last_month<1){last_month=12;last_month_year--}var date_class;if(this.type!="WINDOW"){result+="<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>"}result+="<TR>\n";var refresh=windowref+"CP_refreshCalendar";var refreshLink="javascript:"+refresh;if(this.isShowNavigationDropdowns){result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="78" COLSPAN="3"><select CLASS="'+this.cssPrefix+'cpMonthNavigation" name="cpMonth" onmouseup="CP_stop(event)" 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" onmouseup="CP_stop(event)" 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}function getAnchorPosition(b){var e=false;var k=new Object();var j=0,g=0;var d=false,f=false,h=false;if(document.getElementById){d=true}else{if(document.all){f=true}else{if(document.layers){h=true}}}if(d&&document.all){j=AnchorPosition_getPageOffsetLeft(document.all[b]);g=AnchorPosition_getPageOffsetTop(document.all[b])}else{if(d){var a=document.getElementById(b);j=AnchorPosition_getPageOffsetLeft(a);g=AnchorPosition_getPageOffsetTop(a)}else{if(f){j=AnchorPosition_getPageOffsetLeft(document.all[b]);g=AnchorPosition_getPageOffsetTop(document.all[b])}else{if(h){var l=0;for(var c=0;c<document.anchors.length;c++){if(document.anchors[c].name==b){l=1;break}}if(l==0){k.x=0;k.y=0;return k}j=document.anchors[c].x;g=document.anchors[c].y}else{k.x=0;k.y=0;return k}}}}k.x=j;k.y=g;return k}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("janvier","f&egrave;vrier","mars","avril","mai","juin","juillet","ao&ucirc;t","septembre","octobre","novembre","d&egrave;cembre","janv","fevr","mars","avril","mai","juin","juil","aout","sept","oct","nov","dec");var DAY_NAMES=new Array("dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi","D","L","Ma","Me","J","V","S");function LZ(a){return(a<0||a>9?"":"0")+a}function isDate(c,b){var a=getDateFromFormat(c,b);if(a==0){return false}return true}function compareDates(e,f,c,d){var b=getDateFromFormat(e,f);var a=getDateFromFormat(c,d);if(b==0||a==0){return -1}else{if(b>a){return 1}}return 0}function formatDate(J,F){F=F+"";var l="";var w=0;var I="";var f="";var j=J.getYear()+"";var g=J.getMonth()+1;var G=J.getDate();var o=J.getDay();var n=J.getHours();var z=J.getMinutes();var r=J.getSeconds();var u,v,b,t,L,e,D,C,A,q,O,n,N,i,a,B;var x=new Object();if(j.length<4){j=""+(j-0+1900)}x.y=""+j;x.yyyy=j;x.yy=j.substring(2,4);x.M=g;x.MM=LZ(g);x.MMM=MONTH_NAMES[g-1];x.NNN=MONTH_NAMES[g+11];x.d=G;x.dd=LZ(G);x.E=DAY_NAMES[o+7];x.EE=DAY_NAMES[o];x.H=n;x.HH=LZ(n);if(n==0){x.h=12}else{if(n>12){x.h=n-12}else{x.h=n}}x.hh=LZ(x.h);if(n>11){x.K=n-12}else{x.K=n}x.k=n+1;x.KK=LZ(x.K);x.kk=LZ(x.k);if(n>11){x.a="PM"}else{x.a="AM"}x.m=z;x.mm=LZ(z);x.s=r;x.ss=LZ(r);while(w<F.length){I=F.charAt(w);f="";while((F.charAt(w)==I)&&(w<F.length)){f+=F.charAt(w++)}if(x[f]!=null){l=l+x[f]}else{l=l+f}}return l}function _isInteger(c){var b="1234567890";for(var a=0;a<c.length;a++){if(b.indexOf(c.charAt(a))==-1){return false}}return true}function _getInt(f,d,e,c){for(var a=c;a>=e;a--){var b=f.substring(d,d+a);if(b.length<e){return null}if(_isInteger(b)){return b}}return null}function getDateFromFormat(z,q){z=z+"";q=q+"";var w=0;var l=0;var s="";var f="";var v="";var h,g;var b=new Date();var j=b.getYear();var u=b.getMonth()+1;var t=1;var d=b.getHours();var r=b.getMinutes();var n=b.getSeconds();var k="";while(l<q.length){s=q.charAt(l);f="";while((q.charAt(l)==s)&&(l<q.length)){f+=q.charAt(l++)}if(f=="yyyy"||f=="yy"||f=="y"){if(f=="yyyy"){h=4;g=4}if(f=="yy"){h=2;g=2}if(f=="y"){h=2;g=4}j=_getInt(z,w,h,g);if(j==null){return 0}w+=j.length;if(j.length==2){if(j>70){j=1900+(j-0)}else{j=2000+(j-0)}}}else{if(f=="MMM"||f=="NNN"){u=0;for(var o=0;o<MONTH_NAMES.length;o++){var e=MONTH_NAMES[o];if(z.substring(w,w+e.length).toLowerCase()==e.toLowerCase()){if(f=="MMM"||(f=="NNN"&&o>11)){u=o+1;if(u>12){u-=12}w+=e.length;break}}}if((u<1)||(u>12)){return 0}}else{if(f=="EE"||f=="E"){for(var o=0;o<DAY_NAMES.length;o++){var m=DAY_NAMES[o];if(z.substring(w,w+m.length).toLowerCase()==m.toLowerCase()){w+=m.length;break}}}else{if(f=="MM"||f=="M"){u=_getInt(z,w,f.length,2);if(u==null||(u<1)||(u>12)){return 0}w+=u.length}else{if(f=="dd"||f=="d"){t=_getInt(z,w,f.length,2);if(t==null||(t<1)||(t>31)){return 0}w+=t.length}else{if(f=="hh"||f=="h"){d=_getInt(z,w,f.length,2);if(d==null||(d<1)||(d>12)){return 0}w+=d.length}else{if(f=="HH"||f=="H"){d=_getInt(z,w,f.length,2);if(d==null||(d<0)||(d>23)){return 0}w+=d.length}else{if(f=="KK"||f=="K"){d=_getInt(z,w,f.length,2);if(d==null||(d<0)||(d>11)){return 0}w+=d.length}else{if(f=="kk"||f=="k"){d=_getInt(z,w,f.length,2);if(d==null||(d<1)||(d>24)){return 0}w+=d.length;d--}else{if(f=="mm"||f=="m"){r=_getInt(z,w,f.length,2);if(r==null||(r<0)||(r>59)){return 0}w+=r.length}else{if(f=="ss"||f=="s"){n=_getInt(z,w,f.length,2);if(n==null||(n<0)||(n>59)){return 0}w+=n.length}else{if(f=="a"){if(z.substring(w,w+2).toLowerCase()=="am"){k="AM"}else{if(z.substring(w,w+2).toLowerCase()=="pm"){k="PM"}else{return 0}}w+=2}else{if(z.substring(w,w+f.length)!=f){return 0}else{w+=f.length}}}}}}}}}}}}}}if(w!=z.length){return 0}if(u==2){if(((j%4==0)&&(j%100!=0))||(j%400==0)){if(t>29){return 0}}else{if(t>28){return 0}}}if((u==4)||(u==6)||(u==9)||(u==11)){if(t>30){return 0}}if(d<12&&k=="PM"){d=d-0+12}else{if(d>11&&k=="AM"){d-=12}}var a=new Date(j,u-1,t,d,r,n);return a.getTime()}function parseDate(h){var f=(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",f?"dateFirst":"monthFirst",f?"monthFirst":"dateFirst");var g=null;for(var e=0;e<b.length;e++){var a=window[b[e]];for(var c=0;c<a.length;c++){g=getDateFromFormat(h,a[c]);if(g!=0){return new Date(g)}}}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 CP_stop(a){if(a&&a.stopPropagation){a.stopPropagation()}}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("janvier","f&egrave;vrier","mars","avril","mai","juin","juillet","ao&ucirc;t","septembre","octobre","novembre","d&egrave;cembre");a.monthAbbreviations=new Array("janv","fevr","mars","avril","mai","juin","juil","aout","sept","oct","nov","dec");a.dayHeaders=new Array("D","L","M","M","J","V","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="aujourd'hui";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(e,a,c){if(window.CP_targetInput!=null){var b=new Date(e,a-1,c,0,0,0);if(window.CP_calendarObject!=null){window.CP_calendarObject.copyMonthNamesToWindow()}window.CP_targetInput.value=formatDate(b,window.CP_dateFormat)}else{alert("Use setReturnFunction() to define which function will get the clicked results!")}}function CP_tmpReturnMonthFunction(b,a){alert("Use setReturnMonthFunction() to define which function will get the clicked results!\nYou clicked: year="+b+" , month="+a)}function CP_tmpReturnQuarterFunction(b,a){alert("Use setReturnQuarterFunction() to define which function will get the clicked results!\nYou clicked: year="+b+" , quarter="+a)}function CP_tmpReturnYearFunction(a){alert("Use setReturnYearFunction() to define which function will get the clicked results!\nYou clicked: year="+a)}function CP_setReturnFunction(a){this.returnFunction=a}function CP_setReturnMonthFunction(a){this.returnMonthFunction=a}function CP_setReturnQuarterFunction(a){this.returnQuarterFunction=a}function CP_setReturnYearFunction(a){this.returnYearFunction=a}function CP_setMonthNames(){for(var a=0;a<arguments.length;a++){this.monthNames[a]=arguments[a]}this.copyMonthNamesToWindow()}function CP_setMonthAbbreviations(){for(var a=0;a<arguments.length;a++){this.monthAbbreviations[a]=arguments[a]}this.copyMonthNamesToWindow()}function CP_setDayHeaders(){for(var a=0;a<arguments.length;a++){this.dayHeaders[a]=arguments[a]}}function CP_setWeekStartDay(a){this.weekStartDay=a}function CP_showYearNavigation(){this.isShowYearNavigation=(arguments.length>0)?arguments[0]:true}function CP_setDisplayType(a){if(a!="date"&&a!="week-end"&&a!="month"&&a!="quarter"&&a!="year"){alert("Invalid display type! Must be one of: date,week-end,month,quarter,year");return false}this.displayType=a}function CP_setYearSelectStartOffset(a){this.yearSelectStartOffset=a}function CP_setDisabledWeekDays(){this.disabledWeekDays=new Object();for(var a=0;a<arguments.length;a++){this.disabledWeekDays[arguments[a]]=true}}function CP_addDisabledDates(b,a){if(arguments.length==1){a=b}if(b==null&&a==null){return}if(this.disabledDatesExpression!=""){this.disabledDatesExpression+="||"}if(b!=null){b=parseDate(b);b=""+b.getFullYear()+LZ(b.getMonth()+1)+LZ(b.getDate())}if(a!=null){a=parseDate(a);a=""+a.getFullYear()+LZ(a.getMonth()+1)+LZ(a.getDate())}if(b==null){this.disabledDatesExpression+="(ds<="+a+")"}else{if(a==null){this.disabledDatesExpression+="(ds>="+b+")"}else{this.disabledDatesExpression+="(ds>="+b+"&&ds<="+a+")"}}}function CP_setTodayText(a){this.todayText=a}function CP_setCssPrefix(a){this.cssPrefix=a}function CP_showNavigationDropdowns(){this.isShowNavigationDropdowns=(arguments.length>0)?arguments[0]:true}function CP_showYearNavigationInput(){this.isShowYearNavigationInput=(arguments.length>0)?arguments[0]:true}function CP_hideCalendar(){if(arguments.length>0){window.popupWindowObjects[arguments[0]].hidePopup()}else{this.hidePopup()}}function CP_refreshCalendar(a){var b=window.popupWindowObjects[a];if(arguments.length>1){b.populate(b.getCalendar(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]))}else{b.populate(b.getCalendar())}b.refresh()}function CP_showCalendar(a){if(arguments.length>1){if(arguments[1]==null||arguments[1]==""){this.currentDate=new Date()}else{this.currentDate=new Date(parseDate(arguments[1]))}}this.populate(this.getCalendar());this.showPopup(a)}function CP_select(c,a,e){var b=(arguments.length>3)?arguments[3]:null;if(!window.getDateFromFormat){alert("calendar.select: To use this method you must also include 'date.js' for date formatting");return}if(this.displayType!="date"&&this.displayType!="week-end"){alert("calendar.select: This function can only be used with displayType 'date' or 'week-end'");return}if(c.type!="text"&&c.type!="hidden"&&c.type!="textarea"){alert("calendar.select: Input object passed is not a valid form input object");window.CP_targetInput=null;return}if(c.disabled){return}window.CP_targetInput=c;window.CP_calendarObject=this;this.currentDate=null;var d=0;if(b!=null){d=getDateFromFormat(b,e)}else{if(c.value!=""){d=getDateFromFormat(c.value,e)}}if(b!=null||c.value!=""){if(d==0){this.currentDate=null}else{this.currentDate=new Date(d)}}window.CP_dateFormat=e;this.showCalendar(a)}function getCalendarStyles(){var a="";var b="";if(this!=null&&typeof(this.cssPrefix)!="undefined"&&this.cssPrefix!=null&&this.cssPrefix!=""){b=this.cssPrefix}a+="<STYLE>\n";a+="."+b+"cpYearNavigation,."+b+"cpMonthNavigation{background-color:#C0C0C0;text-align:center;vertical-align:center;text-decoration:none;color:#000000;font-weight:bold;}\n";a+="."+b+"cpDayColumnHeader, ."+b+"cpYearNavigation,."+b+"cpMonthNavigation,."+b+"cpCurrentMonthDate,."+b+"cpCurrentMonthDateDisabled,."+b+"cpOtherMonthDate,."+b+"cpOtherMonthDateDisabled,."+b+"cpCurrentDate,."+b+"cpCurrentDateDisabled,."+b+"cpTodayText,."+b+"cpTodayTextDisabled,."+b+"cpText{font-family:arial;font-size:8pt;}\n";a+="TD."+b+"cpDayColumnHeader{text-align:right;border:solid thin #C0C0C0;border-width:0px 0px 1px 0px;}\n";a+="."+b+"cpCurrentMonthDate, ."+b+"cpOtherMonthDate, ."+b+"cpCurrentDate{text-align:right;text-decoration:none;}\n";a+="."+b+"cpCurrentMonthDateDisabled, ."+b+"cpOtherMonthDateDisabled, ."+b+"cpCurrentDateDisabled{color:#D0D0D0;text-align:right;text-decoration:line-through;}\n";a+="."+b+"cpCurrentMonthDate, .cpCurrentDate{color:#000000;}\n";a+="."+b+"cpOtherMonthDate{color:#808080;}\n";a+="TD."+b+"cpCurrentDate{color:white;background-color: #C0C0C0;border-width:1px;border:solid thin #800000;}\n";a+="TD."+b+"cpCurrentDateDisabled{border-width:1px;border:solid thin #FFAAAA;}\n";a+="TD."+b+"cpTodayText, TD."+b+"cpTodayTextDisabled{border:solid thin #C0C0C0;border-width:1px 0px 0px 0px;}\n";a+="A."+b+"cpTodayText, SPAN."+b+"cpTodayTextDisabled{height:20px;}\n";a+="A."+b+"cpTodayText{color:black;}\n";a+="."+b+"cpTodayTextDisabled{color:#D0D0D0;}\n";a+="."+b+"cpBorder{border:solid thin #808080;}\n";a+="</STYLE>\n";return a}function CP_getCalendar(){var now=new Date();if(this.type=="WINDOW"){var windowref="window.opener."}else{var windowref=""}var result="";if(this.type=="WINDOW"){result+="<HTML><HEAD><TITLE>Calendar</TITLE>"+this.getStyles()+"</HEAD><BODY MARGINWIDTH=0 MARGINHEIGHT=0 TOPMARGIN=0 RIGHTMARGIN=0 LEFTMARGIN=0>\n";result+="<CENTER><TABLE WIDTH=100% BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>\n"}else{result+='<TABLE CLASS="'+this.cssPrefix+'cpBorder" WIDTH=144 BORDER=1 BORDERWIDTH=1 CELLSPACING=0 CELLPADDING=1>\n';result+="<TR><TD ALIGN=CENTER>\n";result+="<CENTER>\n"}if(this.displayType=="date"||this.displayType=="week-end"){if(this.currentDate==null){this.currentDate=now}if(arguments.length>0){var month=arguments[0]}else{var month=this.currentDate.getMonth()+1}if(arguments.length>1&&arguments[1]>0&&arguments[1]-0==arguments[1]){var year=arguments[1]}else{var year=this.currentDate.getFullYear()}var daysinmonth=new Array(0,31,28,31,30,31,30,31,31,30,31,30,31);if(((year%4==0)&&(year%100!=0))||(year%400==0)){daysinmonth[2]=29}var current_month=new Date(year,month-1,1);var display_year=year;var display_month=month;var display_date=1;var weekday=current_month.getDay();var offset=0;offset=(weekday>=this.weekStartDay)?weekday-this.weekStartDay:7-this.weekStartDay+weekday;if(offset>0){display_month--;if(display_month<1){display_month=12;display_year--}display_date=daysinmonth[display_month]-offset+1}var next_month=month+1;var next_month_year=year;if(next_month>12){next_month=1;next_month_year++}var last_month=month-1;var last_month_year=year;if(last_month<1){last_month=12;last_month_year--}var date_class;if(this.type!="WINDOW"){result+="<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>"}result+="<TR>\n";var refresh=windowref+"CP_refreshCalendar";var refreshLink="javascript:"+refresh;if(this.isShowNavigationDropdowns){result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="78" COLSPAN="3"><select CLASS="'+this.cssPrefix+'cpMonthNavigation" name="cpMonth" onmouseup="CP_stop(event)" 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" onmouseup="CP_stop(event)" 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}(function(h){var k="2.71";if(h.support==undefined){h.support={opacity:!(h.browser.msie)}}function e(){if(window.console&&window.console.log){window.console.log("[cycle] "+Array.prototype.join.call(arguments," "))}}h.fn.cycle=function(r,q){var s={s:this.selector,c:this.context};if(this.length===0&&r!="stop"){if(!h.isReady&&s.s){e("DOM not ready, queuing slideshow");h(function(){h(s.s,s.c).cycle(r,q)});return this}e("terminating; zero elements found by selector"+(h.isReady?"":" (DOM not ready)"));return this}return this.each(function(){var u=l(this,r,q);if(u===false){return}if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=this.cyclePause=0;var v=h(this);var w=u.slideExpr?h(u.slideExpr,this):v.children();var t=w.get();if(t.length<2){e("terminating; too few slides: "+t.length);return}var o=j(v,w,t,u,s);if(o===false){return}if(o.timeout||o.continuous){this.cycleTimeout=setTimeout(function(){d(t,o,0,!o.rev)},o.continuous?10:o.timeout+(o.delay||0))}})};function l(o,s,q){if(o.cycleStop==undefined){o.cycleStop=0}if(s===undefined||s===null){s={}}if(s.constructor==String){switch(s){case"stop":o.cycleStop++;if(o.cycleTimeout){clearTimeout(o.cycleTimeout)}o.cycleTimeout=0;h(o).removeData("cycle.opts");return false;case"pause":o.cyclePause=1;return false;case"resume":o.cyclePause=0;if(q===true){s=h(o).data("cycle.opts");if(!s){e("options not found, can not resume");return false}if(o.cycleTimeout){clearTimeout(o.cycleTimeout);o.cycleTimeout=0}d(s.elements,s,1,1)}return false;case"prev":case"next":var t=h(o).data("cycle.opts");if(!t){e('options not found, "prev/next" ignored');return false}h.fn.cycle[s](t);return false;default:s={fx:s}}return s}else{if(s.constructor==Number){var r=s;s=h(o).data("cycle.opts");if(!s){e("options not found, can not advance slide");return false}if(r<0||r>=s.elements.length){e("invalid slide index: "+r);return false}s.nextSlide=r;if(o.cycleTimeout){clearTimeout(o.cycleTimeout);o.cycleTimeout=0}if(typeof q=="string"){s.oneTimeFx=q}d(s.elements,s,1,r>=s.currSlide);return false}}return s}function a(o,q){if(!h.support.opacity&&q.cleartype&&o.style.filter){try{o.style.removeAttribute("filter")}catch(r){}}}function j(y,J,u,t,E){var C=h.extend({},h.fn.cycle.defaults,t||{},h.metadata?y.metadata():h.meta?y.data():{});if(C.autostop){C.countdown=C.autostopCount||u.length}var r=y[0];y.data("cycle.opts",C);C.$cont=y;C.stopCount=r.cycleStop;C.elements=u;C.before=C.before?[C.before]:[];C.after=C.after?[C.after]:[];C.after.unshift(function(){C.busy=0});if(!h.support.opacity&&C.cleartype){C.after.push(function(){a(this,C)})}if(C.continuous){C.after.push(function(){d(u,C,0,!C.rev)})}m(C);if(!h.support.opacity&&C.cleartype&&!C.cleartypeNoBg){f(J)}if(y.css("position")=="static"){y.css("position","relative")}if(C.width){y.width(C.width)}if(C.height&&C.height!="auto"){y.height(C.height)}if(C.startingSlide){C.startingSlide=parseInt(C.startingSlide)}if(C.random){C.randomMap=[];for(var H=0;H<u.length;H++){C.randomMap.push(H)}C.randomMap.sort(function(w,o){return Math.random()-0.5});C.randomIndex=0;C.startingSlide=C.randomMap[0]}else{if(C.startingSlide>=u.length){C.startingSlide=0}}C.currSlide=C.startingSlide=C.startingSlide||0;var x=C.startingSlide;J.css({position:"absolute",top:0,left:0}).hide().each(function(o){var w=x?o>=x?u.length-(o-x):x-o:u.length-o;h(this).css("z-index",w)});h(u[x]).css("opacity",1).show();a(u[x],C);if(C.fit&&C.width){J.width(C.width)}if(C.fit&&C.height&&C.height!="auto"){J.height(C.height)}var D=C.containerResize&&!y.innerHeight();if(D){var v=0,B=0;for(var F=0;F<u.length;F++){var q=h(u[F]),K=q[0],A=q.outerWidth(),I=q.outerHeight();if(!A){A=K.offsetWidth}if(!I){I=K.offsetHeight}v=A>v?A:v;B=I>B?I:B}if(v>0&&B>0){y.css({width:v+"px",height:B+"px"})}}if(C.pause){y.hover(function(){this.cyclePause++},function(){this.cyclePause--})}if(b(C)===false){return false}if(!C.multiFx){var G=h.fn.cycle.transitions[C.fx];if(h.isFunction(G)){G(y,J,C)}else{if(C.fx!="custom"&&!C.multiFx){e("unknown transition: "+C.fx,"; slideshow terminating");return false}}}var s=false;t.requeueAttempts=t.requeueAttempts||0;J.each(function(){var M=h(this);this.cycleH=(C.fit&&C.height)?C.height:M.height();this.cycleW=(C.fit&&C.width)?C.width:M.width();if(M.is("img")){var w=(h.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var N=(h.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var L=(h.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var o=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(w||N||L||o){if(E.s&&C.requeueOnImageNotLoaded&&++t.requeueAttempts<100){e(t.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){h(E.s,E.c).cycle(t)},C.requeueTimeout);s=true;return false}else{e("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}}}return true});if(s){return false}C.cssBefore=C.cssBefore||{};C.animIn=C.animIn||{};C.animOut=C.animOut||{};J.not(":eq("+x+")").css(C.cssBefore);if(C.cssFirst){h(J[x]).css(C.cssFirst)}if(C.timeout){C.timeout=parseInt(C.timeout);if(C.speed.constructor==String){C.speed=h.fx.speeds[C.speed]||parseInt(C.speed)}if(!C.sync){C.speed=C.speed/2}while((C.timeout-C.speed)<250){C.timeout+=C.speed}}if(C.easing){C.easeIn=C.easeOut=C.easing}if(!C.speedIn){C.speedIn=C.speed}if(!C.speedOut){C.speedOut=C.speed}C.slideCount=u.length;C.currSlide=C.lastSlide=x;if(C.random){C.nextSlide=C.currSlide;if(++C.randomIndex==u.length){C.randomIndex=0}C.nextSlide=C.randomMap[C.randomIndex]}else{C.nextSlide=C.startingSlide>=(u.length-1)?0:C.startingSlide+1}var z=J[x];if(C.before.length){C.before[0].apply(z,[z,z,C,true])}if(C.after.length>1){C.after[1].apply(z,[z,z,C,true])}if(C.next){h(C.next).bind(C.prevNextEvent,function(){return n(C,C.rev?-1:1)})}if(C.prev){h(C.prev).bind(C.prevNextEvent,function(){return n(C,C.rev?1:-1)})}if(C.pager){c(u,C)}i(C,u);return C}function m(o){o.original={before:[],after:[]};o.original.cssBefore=h.extend({},o.cssBefore);o.original.cssAfter=h.extend({},o.cssAfter);o.original.animIn=h.extend({},o.animIn);o.original.animOut=h.extend({},o.animOut);h.each(o.before,function(){o.original.before.push(this)});h.each(o.after,function(){o.original.after.push(this)})}function b(v){var t,r,q=h.fn.cycle.transitions;if(v.fx.indexOf(",")>0){v.multiFx=true;v.fxs=v.fx.replace(/\s*/g,"").split(",");for(t=0;t<v.fxs.length;t++){var u=v.fxs[t];r=q[u];if(!r||!q.hasOwnProperty(u)||!h.isFunction(r)){e("discarding unknown transition: ",u);v.fxs.splice(t,1);t--}}if(!v.fxs.length){e("No valid transitions named; slideshow terminating.");return false}}else{if(v.fx=="all"){v.multiFx=true;v.fxs=[];for(p in q){r=q[p];if(q.hasOwnProperty(p)&&h.isFunction(r)){v.fxs.push(p)}}}}if(v.multiFx&&v.randomizeEffects){var s=Math.floor(Math.random()*20)+30;for(t=0;t<s;t++){var o=Math.floor(Math.random()*v.fxs.length);v.fxs.push(v.fxs.splice(o,1)[0])}e("randomized fx sequence: ",v.fxs)}return true}function i(q,o){q.addSlide=function(t,u){var r=h(t),v=r[0];if(!q.autostopCount){q.countdown++}o[u?"unshift":"push"](v);if(q.els){q.els[u?"unshift":"push"](v)}q.slideCount=o.length;r.css("position","absolute");r[u?"prependTo":"appendTo"](q.$cont);if(u){q.currSlide++;q.nextSlide++}if(!h.support.opacity&&q.cleartype&&!q.cleartypeNoBg){f(r)}if(q.fit&&q.width){r.width(q.width)}if(q.fit&&q.height&&q.height!="auto"){$slides.height(q.height)}v.cycleH=(q.fit&&q.height)?q.height:r.height();v.cycleW=(q.fit&&q.width)?q.width:r.width();r.css(q.cssBefore);if(q.pager){h.fn.cycle.createPagerAnchor(o.length-1,v,h(q.pager),o,q)}if(h.isFunction(q.onAddSlide)){q.onAddSlide(r)}else{r.hide()}}}h.fn.cycle.resetState=function(q,o){o=o||q.fx;q.before=[];q.after=[];q.cssBefore=h.extend({},q.original.cssBefore);q.cssAfter=h.extend({},q.original.cssAfter);q.animIn=h.extend({},q.original.animIn);q.animOut=h.extend({},q.original.animOut);q.fxFn=null;h.each(q.original.before,function(){q.before.push(this)});h.each(q.original.after,function(){q.after.push(this)});var r=h.fn.cycle.transitions[o];if(h.isFunction(r)){r(q.$cont,h(q.elements),q)}};function d(w,o,v,x){if(v&&o.busy&&o.manualTrump){h(w).stop(true,true);o.busy=false}if(o.busy){return}var t=o.$cont[0],z=w[o.currSlide],y=w[o.nextSlide];if(t.cycleStop!=o.stopCount||t.cycleTimeout===0&&!v){return}if(!v&&!t.cyclePause&&((o.autostop&&(--o.countdown<=0))||(o.nowrap&&!o.random&&o.nextSlide<o.currSlide))){if(o.end){o.end(o)}return}if(v||!t.cyclePause){var u=o.fx;z.cycleH=z.cycleH||h(z).height();z.cycleW=z.cycleW||h(z).width();y.cycleH=y.cycleH||h(y).height();y.cycleW=y.cycleW||h(y).width();if(o.multiFx){if(o.lastFx==undefined||++o.lastFx>=o.fxs.length){o.lastFx=0}u=o.fxs[o.lastFx];o.currFx=u}if(o.oneTimeFx){u=o.oneTimeFx;o.oneTimeFx=null}h.fn.cycle.resetState(o,u);if(o.before.length){h.each(o.before,function(A,B){if(t.cycleStop!=o.stopCount){return}B.apply(y,[z,y,o,x])})}var r=function(){h.each(o.after,function(A,B){if(t.cycleStop!=o.stopCount){return}B.apply(y,[z,y,o,x])})};if(o.nextSlide!=o.currSlide){o.busy=1;if(o.fxFn){o.fxFn(z,y,o,r,x)}else{if(h.isFunction(h.fn.cycle[o.fx])){h.fn.cycle[o.fx](z,y,o,r)}else{h.fn.cycle.custom(z,y,o,r,v&&o.fastOnEvent)}}}o.lastSlide=o.currSlide;if(o.random){o.currSlide=o.nextSlide;if(++o.randomIndex==w.length){o.randomIndex=0}o.nextSlide=o.randomMap[o.randomIndex]}else{var s=(o.nextSlide+1)==w.length;o.nextSlide=s?0:o.nextSlide+1;o.currSlide=s?w.length-1:o.nextSlide-1}if(o.pager){h.fn.cycle.updateActivePagerLink(o.pager,o.currSlide)}}var q=0;if(o.timeout&&!o.continuous){q=g(z,y,o,x)}else{if(o.continuous&&t.cyclePause){q=10}}if(q>0){t.cycleTimeout=setTimeout(function(){d(w,o,0,!o.rev)},q)}}h.fn.cycle.updateActivePagerLink=function(o,q){h(o).find("a").removeClass("activeSlide").filter("a:eq("+q+")").addClass("activeSlide")};function g(u,r,s,q){if(s.timeoutFn){var o=s.timeoutFn(u,r,s,q);if(o!==false){return o}}return s.timeout}h.fn.cycle.next=function(o){n(o,o.rev?-1:1)};h.fn.cycle.prev=function(o){n(o,o.rev?1:-1)};function n(q,t){var o=q.elements;var s=q.$cont[0],r=s.cycleTimeout;if(r){clearTimeout(r);s.cycleTimeout=0}if(q.random&&t<0){q.randomIndex--;if(--q.randomIndex==-2){q.randomIndex=o.length-2}else{if(q.randomIndex==-1){q.randomIndex=o.length-1}}q.nextSlide=q.randomMap[q.randomIndex]}else{if(q.random){if(++q.randomIndex==o.length){q.randomIndex=0}q.nextSlide=q.randomMap[q.randomIndex]}else{q.nextSlide=q.currSlide+t;if(q.nextSlide<0){if(q.nowrap){return false}q.nextSlide=o.length-1}else{if(q.nextSlide>=o.length){if(q.nowrap){return false}q.nextSlide=0}}}}if(h.isFunction(q.prevNextClick)){q.prevNextClick(t>0,q.nextSlide,o[q.nextSlide])}d(o,q,1,t>=0);return false}function c(q,r){var o=h(r.pager);h.each(q,function(s,t){h.fn.cycle.createPagerAnchor(s,t,o,q,r)});h.fn.cycle.updateActivePagerLink(r.pager,r.startingSlide)}h.fn.cycle.createPagerAnchor=function(t,u,r,s,v){var q;if(h.isFunction(v.pagerAnchorBuilder)){q=v.pagerAnchorBuilder(t,u)}else{q='<a href="#">'+(t+1)+"</a>"}if(!q){return}var w=h(q);if(w.parents("body").length===0){var o=[];if(r.length>1){r.each(function(){var x=w.clone(true);h(this).append(x);o.push(x)});w=h(o)}else{w.appendTo(r)}}w.bind(v.pagerEvent,function(z){z.preventDefault();v.nextSlide=t;var y=v.$cont[0],x=y.cycleTimeout;if(x){clearTimeout(x);y.cycleTimeout=0}if(h.isFunction(v.pagerClick)){v.pagerClick(v.nextSlide,s[v.nextSlide])}d(s,v,1,v.currSlide<t);return false});if(v.pagerEvent!="click"){w.click(function(){return false})}if(v.pauseOnPagerHover){w.hover(function(){v.$cont[0].cyclePause++},function(){v.$cont[0].cyclePause--})}};h.fn.cycle.hopsFromLast=function(s,r){var q,o=s.lastSlide,t=s.currSlide;if(r){q=t>o?t-o:s.slideCount-o}else{q=t<o?o-t:o+s.slideCount-t}return q};function f(r){function q(t){t=parseInt(t).toString(16);return t.length<2?"0"+t:t}function o(u){for(;u&&u.nodeName.toLowerCase()!="html";u=u.parentNode){var s=h.css(u,"background-color");if(s.indexOf("rgb")>=0){var t=s.match(/\d+/g);return"#"+q(t[0])+q(t[1])+q(t[2])}if(s&&s!="transparent"){return s}}return"#ffffff"}r.each(function(){h(this).css("background-color",o(this))})}h.fn.cycle.commonReset=function(u,s,t,q,r,o){h(t.elements).not(u).hide();t.cssBefore.opacity=1;t.cssBefore.display="block";if(q!==false&&s.cycleW>0){t.cssBefore.width=s.cycleW}if(r!==false&&s.cycleH>0){t.cssBefore.height=s.cycleH}t.cssAfter=t.cssAfter||{};t.cssAfter.display="none";h(u).css("zIndex",t.slideCount+(o===true?1:0));h(s).css("zIndex",t.slideCount+(o===true?0:1))};h.fn.cycle.custom=function(A,u,o,r,q){var z=h(A),v=h(u);var s=o.speedIn,y=o.speedOut,t=o.easeIn,x=o.easeOut;v.css(o.cssBefore);if(q){if(typeof q=="number"){s=y=q}else{s=y=1}t=x=null}var w=function(){v.animate(o.animIn,s,t,r)};z.animate(o.animOut,y,x,function(){if(o.cssAfter){z.css(o.cssAfter)}if(!o.sync){w()}});if(o.sync){w()}};h.fn.cycle.transitions={fade:function(q,r,o){r.not(":eq("+o.currSlide+")").css("opacity",0);o.before.push(function(u,s,t){h.fn.cycle.commonReset(u,s,t);t.cssBefore.opacity=0});o.animIn={opacity:1};o.animOut={opacity:0};o.cssBefore={top:0,left:0}}};h.fn.cycle.ver=function(){return k};h.fn.cycle.defaults={fx:"fade",timeout:4000,timeoutFn:null,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,prevNextClick:null,prevNextEvent:"click",pager:null,pagerClick:null,pagerEvent:"click",pagerAnchorBuilder:null,before:null,after:null,end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:"auto",startingSlide:0,sync:1,random:0,fit:0,containerResize:1,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:!h.support.opacity,cleartypeNoBg:false,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:true,requeueOnImageNotLoaded:true,requeueTimeout:250}})(jQuery);
