

var scImgPath="./spiffyCal/images/",scIE=((navigator.appName=="Microsoft Internet Explorer")||((navigator.appName=="Netscape")&&(parseInt(navigator.appVersion)==5))),scNN6=((navigator.appName=="Netscape")&&(parseInt(navigator.appVersion)==5)),scNN=((navigator.appName=="Netscape")&&(document.layers)),img_Del=new Image(),img_Close=new Image();img_Del.src=scImgPath+"btn_del_small.gif";img_Close.src=scImgPath+"btn_close_small.gif";var scBTNMODE_DEFAULT=0,scBTNMODE_CUSTOMBLUE=1,scBTNMODE_CALBTN=2,focusHack;function spiffyCalManager(){this.showHelpAlerts=false;this.defaultDateFormat="dd-MMM-yyyy";this.lastSelectedDate=new Date();this.calendars=new Array();this.matchedFormat="";this.DefBtnImgPath=scImgPath;this.getCount=new Function("return this.calendars.length;");function addCalendar(_){var $=this.calendars.length;this.calendars[$]=_}this.addCalendar=addCalendar;function hideAllCalendars($){var _=0;for(_=0;_<this.calendars.length;_++)if($!=this.calendars[_])this.calendars[_].hide()}this.hideAllCalendars=hideAllCalendars;function swapImg(objWhatCal,strToWhat,blnStick){if(document.images)if((!(objWhatCal.visible)||(blnStick))&&(objWhatCal.enabled))document.images[objWhatCal.btnName].src=eval(objWhatCal.varName+strToWhat+".src");window.status=" "}this.swapImg=swapImg;this.Holidays=new Array("Dec-25","Jul-4","Feb-14","Mar-17","Oct-31");this.HolidaysDesc=new Array("Christmas Day","Independance Day","Valentine's Day","St. Patrick's Day","Halloween");function isHoliday($){var A=0,_=-1;for(A=0;A<this.Holidays.length;A++)if($==this.Holidays[A]){_=A;break}return _}this.isHoliday=isHoliday;this.AllowedFormats=new Array("d.M","d-M","d/M","d.MMM","d-MMM","d/MMM","d.M.yy","d-M-yy","d/M/yy","d.M.yyyy","d-M-yyyy","d/M/yyyy","d.MM.yyyy","d-MM-yyyy","d/MM/yyyy","d.MMM.yy","d-MMM-yy","d/MMM/yy","d.MMM.yyyy","d-MMM-yyyy","d/MMM/yyyy","d.MM.yy","d-MM-yy","d/MM/yy","dd.MM.yy","dd-MM-yy","dd/MM/yy","dd.M.yy","dd-M-yy","dd/M/yy","dd.MM.yyyy","dd-MM-yyyy","dd/MM/yyyy","dd.MMM.yy","dd-MMM-yy","dd/MMM/yy","dd.MMM.yyyy","dd-MMM-yyyy","dd/MMM/yyyy","M.d","M-d","M/d","MMM.d","MMM-d","MMM/d","M.d.yy","M-d-yy","M/d/yy","MM.d.yyyy","MM-d-yyyy","MM/d/yyyy","MMM.d.yy","MMM-d-yy","MMM/d/yy","MMM.d.yyyy","MMM-d-yyyy","MMM/d/yyyy","MM.d.yy","MM-d-yy","MM/d/yy","MM.dd.yy","MM-dd-yy","MM/dd/yy","M.dd.yy","M-dd-yy","M/dd/yy","MM.dd.yyyy","MM-dd-yyyy","MM/dd/yyyy","MMM.dd.yy","MMM-dd-yy","MMM/dd/yy","MMM.dd.yyyy","MMM-dd-yyyy","MMM/dd/yyyy");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");this.lastBoxValidated=null;function validateDate(H,_,P,D){var I=0,F="",E=0,N=0,K=0,A=false,O=false,G=MONTH_NAMES[P.getMonth()]+"-"+P.getDate()+"-"+P.getFullYear(),C=MONTH_NAMES[D.getMonth()]+"-"+D.getDate()+"-"+D.getFullYear(),J="This input box is set up to accept dates between:\n\n   "+G+"\n\nand\n\n   "+C+"\n\nPlease enter a date no ";this.lastBoxValidated=H;this.matchedFormat="";O=(H.value==""||H.value==null);if(!(_&&O))for(I=0;I<this.AllowedFormats.length;I++)if(isDate(H.value,this.AllowedFormats[I])==true){A=true;E+=1;if(E==1)N=I;if(E>1)if(this.AllowedFormats[I].substr(0,1)!=this.AllowedFormats[N].substr(0,1)){K=I;break}else E=1}alert("formatMatchCount="+E);if(E>1)if(this.showHelpAlerts){var Q=getDateFromFormat(H.value,this.AllowedFormats[N]),B=MONTH_NAMES[Q.getMonth()]+"-"+Q.getDate()+"-"+Q.getFullYear(),L=getDateFromFormat(H.value,this.AllowedFormats[K]),$=MONTH_NAMES[L.getMonth()]+"-"+L.getDate()+"-"+L.getFullYear();if(Q.getTime()!=L.getTime()){var M="You have entered an ambiguous date.\n\n Click OK for:\n"+B+"\n\nor Click Cancel for:\n"+$;if(confirm(M))A=true;else{N=K;A=true}H.focus();H.select()}}else A=true;alert("TEST    "+R.getDate()+"-"+R.getMonth());if(A==true){H.className="cal-TextBox";if(P!=null){var R=getDateFromFormat(H.value,this.AllowedFormats[I]);if(P>R){H.className="cal-TextBoxInvalid";if(this.showHelpAlerts)alert(J+"earlier than  "+G+".");H.focus();H.select();return false}}if(D!=null){R=getDateFromFormat(H.value,this.AllowedFormats[I]);if(D<R){H.className="cal-TextBoxInvalid";if(this.showHelpAlerts)alert(J+"later than  "+C+".");H.focus();H.select();return false}}this.matchedFormat=this.AllowedFormats[N];this.lastBoxValidated=null}else{if(_&&O){H.className="cal-TextBoxInvalid";if(this.showHelpAlerts)alert("This date field is required.\n\nPlease enter a valid date before proceeding.")}else if(!_&&O)H.className="cal-TextBox";else{H.className="cal-TextBoxInvalid";if(this.showHelpAlerts){for(I=0;I<this.AllowedFormats.length;I++)F+=this.AllowedFormats[I]+"\t";alert("Please enter a valid date.\n\nExample 01-Jan-2002\n\nValid formats are:\n\n"+F)}}H.focus();H.select();focusHack=H;setTimeout("focusHack.focus();focusHack.select();");return false}}this.validateDate=validateDate;function formatDate(A,_){if(this.matchedFormat!=""){var $=getDateFromFormat(A.value,this.matchedFormat);if($!=0)A.value=scFormatDate($,_)}}this.formatDate=formatDate;function isDate($,_){var A=getDateFromFormat($,_);if(A==0)return false;return true}this.isDate=isDate;function scFormatDate(H,E){E=E+"";var _="",O=0,B="",L="",P=H.getFullYear()+"",D=H.getMonth()+1,A=H.getDate(),I=H.getHours(),F=H.getMinutes(),K=H.getSeconds(),N,G,$,C,J;if(P.length<4)P=P-0+1900;P=""+P;N=P;G=P.substring(2,4);if(D<10)C="0"+D;else C=D;$=MONTH_NAMES[D-1+12];if(A<10)J="0"+A;else J=A;var M=new Object();M["yyyy"]=N;M["yy"]=G;M["y"]=P;M["MMM"]=$;M["MM"]=C;M["M"]=D;M["dd"]=J;M["d"]=A;while(O<E.length){B=E.charAt(O);L="";while((E.charAt(O)==B)&&(O<E.length)){L+=E.charAt(O);O++}if(M[L]!=null)_=_+M[L];else _=_+L}return _}this.scFormatDate=scFormatDate;function _isInteger($){var _="1234567890";for(var A=0;A<$.length;A++)if(_.indexOf($.charAt(A))==-1)return false;return true}function _getInt(A,C,$,_){for(x=_;x>=$;x--){var B=A.substring(C,C+x);if(_isInteger(B))return B}return null}function getDateFromFormat($,E){$=$+"";E=E+"";var _=0,L=0,B="",I="",J="",P,O,M=0,K=0,F=0,H=false;while(L<E.length){B=E.charAt(L);I="";while((E.charAt(L)==B)&&(L<E.length)){I+=E.charAt(L);L++}if(I=="yyyy"||I=="yy"||I=="y"){if(I=="yyyy"){P=4;O=4}if(I=="yy"){P=2;O=2}if(I=="y"){P=2;O=4}M=_getInt($,_,P,O);H=true;if(M==null)return 0;if(M.length!=I.length)return 0;_+=M.length}else if(I=="MMM"){K=0;for(var G=0;G<MONTH_NAMES.length;G++){var D=MONTH_NAMES[G];if($.substring(_,_+D.length).toLowerCase()==D.toLowerCase()){K=G+1;if(K>12)K-=12;_+=D.length;break}}if(K==0)return 0;if((K<1)||(K>12))return 0}else if(I=="MM"||I=="M"){P=I.length;O=2;K=_getInt($,_,P,O);if(K==null)return 0;if((K<1)||(K>12))return 0;_+=K.length}else if(I=="dd"||I=="d"){P=I.length;O=2;F=_getInt($,_,P,O);if(F==null)return 0;if((F<1)||(F>31))return 0;_+=F.length}else if($.substring(_,_+I.length)!=I)return 0;else _+=I.length}if(_!=$.length)return 0;if(K==2)if(((M%4==0)&&(M%100!=0))||(M%400==0)){if(F>29)return false}else if(F>28)return false;if((K==4)||(K==6)||(K==9)||(K==11))if(F>30)return false;K=K-1;if(H==false){var N=new Date();M=N.getFullYear()}var C=parseInt(M);if(C<=20)M=2000+C;else if(C>=21&&C<=99)M=1900+C;var A=new Date(M,K,F,0,0,0);return A}this.getDateFromFormat=getDateFromFormat}var calMgr=new spiffyCalManager();function ctlSpiffyCalendarBox(strVarName,strFormName,strTextBoxName,strBtnName,strDefaultValue,intBtnMode){var msNames=new makeArray0("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"),msDays=new makeArray0(31,28,31,30,31,30,31,31,30,31,30,31),msDOW=new makeArray0("S","M","T","W","T","F","S"),blnInConstructor=true,img_DateBtn_UP=new Image(),img_DateBtn_OVER=new Image(),img_DateBtn_DOWN=new Image(),img_DateBtn_DISABLED=new Image(),strBtnW,strBtnH,strBtnImg,dteToday=new Date,dteCur=new Date,dteMin=new Date,dteMax=new Date,scX=4,scY=4,strDefDateFmt="dd-MMM-yyyy",intDefBtnMode=0,strDefBtnImgPath=calMgr.DefBtnImgPath;this.varName=strVarName;this.enabled=true;this.readonly=false;this.focusClick=false;this.hideButton=false;this.visible=false;this.displayLeft=false;this.displayTop=false;this.formName=strFormName;this.textBoxName=strTextBoxName;this.btnName=strBtnName;this.required=false;this.x=scX;this.y=scY;this.imgUp=img_DateBtn_UP;this.imgOver=img_DateBtn_OVER;this.imgDown=img_DateBtn_DOWN;this.imgDisabled=img_DateBtn_DISABLED;this.showWeekends=true;this.showHolidays=true;this.disableWeekends=false;this.disableHolidays=false;this.textBoxWidth=160;this.textBoxHeight=20;this.btnImgWidth=strBtnW;this.btnImgHeight=strBtnH;if((intBtnMode==null)||(intBtnMode<0&&intBtnMode>2))intBtnMode=intDefBtnMode;switch(intBtnMode){case 0:strBtnImg=strDefBtnImgPath+"btn_date_up.gif";img_DateBtn_UP.src=strDefBtnImgPath+"btn_date_up.gif";img_DateBtn_OVER.src=strDefBtnImgPath+"btn_date_over.gif";img_DateBtn_DOWN.src=strDefBtnImgPath+"btn_date_down.gif";img_DateBtn_DISABLED.src=strDefBtnImgPath+"btn_date_disabled.gif";strBtnW="18";strBtnH="20";break;case 1:strBtnImg=strDefBtnImgPath+"btn_date1_up.gif";img_DateBtn_UP.src=strDefBtnImgPath+"btn_date1_up.gif";img_DateBtn_OVER.src=strDefBtnImgPath+"btn_date1_over.gif";img_DateBtn_DOWN.src=strDefBtnImgPath+"btn_date1_down.gif";img_DateBtn_DISABLED.src=strDefBtnImgPath+"btn_date1_disabled.gif";strBtnW="22";strBtnH="17";break;case 2:strBtnImg=strDefBtnImgPath+"btn_date2_up.gif";img_DateBtn_UP.src=strDefBtnImgPath+"btn_date2_up.gif";img_DateBtn_OVER.src=strDefBtnImgPath+"btn_date2_over.gif";img_DateBtn_DOWN.src=strDefBtnImgPath+"btn_date2_down.gif";img_DateBtn_DISABLED.src=strDefBtnImgPath+"btn_date2_disabled.gif";strBtnW="34";strBtnH="21";break}this.dateFormat=strDefDateFmt;this.useDateRange=false;this.minDate=new Date;this.maxDate=new Date(dteToday.getFullYear()+1,dteToday.getMonth(),dteToday.getDate());this.minDay=function(){return this.minDate.getDate()};this.minMonth=function(){return this.minDate.getMonth()};this.minYear=function(){return this.minDate.getFullYear()};this.maxDay=function(){return this.maxDate.getDate()};this.maxMonth=function(){return this.maxDate.getMonth()};this.maxYear=function(){return this.maxYear.getFullYear()};function setMinDate(A,_,$){this.minDate=new Date(A,_-1,$)}this.setMinDate=setMinDate;function setMaxDate(A,_,$){this.maxDate=new Date(A,_-1,$)}this.setMaxDate=setMaxDate;this.minYearChoice=dteToday.getFullYear()-80;this.maxYearChoice=dteToday.getFullYear()+80;this.textBox=function(){if(!blnInConstructor)return eval("document."+this.formName+"."+this.textBoxName)};this.getSelectedDate=function(){var strTempVal="",objEle;if((typeof this.formName!="undefined")&&(typeof this.textBoxName!="undefined")){objEle=eval("document."+this.formName+"."+this.textBoxName);if(objEle&&!blnInConstructor)strTempVal=eval("document."+this.formName+"."+this.textBoxName+".value");else strTempVal=strDefaultValue}else strTempVal=strDefaultValue;return strTempVal};function setSelectedDate(strWhat){var strTempVal="",objEle;eval("document."+this.formName+"."+this.textBoxName).value=strWhat;if(!calMgr.isDate(quote(strWhat),quote(this.dateFormat)))eval("document."+this.formName+"."+this.textBoxName).className="cal-TextBoxInvalid";else eval("document."+this.formName+"."+this.textBoxName).className="cal-TextBox"}this.setSelectedDate=setSelectedDate;function disable(){this.hide();calMgr.swapImg(this,".imgDisabled",false);this.enabled=false;eval("document."+this.formName+"."+this.textBoxName).disabled=true;eval("document."+this.formName+"."+this.textBoxName).className="cal-TextBoxDisabled";if(scNN)eval("document."+this.formName+"."+this.textBoxName).onFocus=function(){this.blur()}}this.disable=disable;function enable(){this.enabled=true;calMgr.swapImg(this,".imgUp",false);eval("document."+this.formName+"."+this.textBoxName).disabled=false;eval("document."+this.formName+"."+this.textBoxName).className="cal-TextBox";if(scNN)eval("document."+this.formName+"."+this.textBoxName).onFocus=null;if(!calMgr.isDate(quote(this.getSelectedDate()),quote(this.dateFormat)))eval("document."+this.formName+"."+this.textBoxName).className="cal-TextBoxInvalid"}this.enable=enable;this.JStoRunOnSelect="";this.JStoRunOnClear="";this.JStoRunOnCancel="";this.hideCombos=true;function makeCalendar(J,L,B){if(B)J-=1;var $="",F=J,K=L,E,D="",I,A=false;dteCur.setMonth(J);dteCur.setFullYear(L);dteCur.setDate(dteToday.getDate());dteCur.setHours(0);dteCur.setMinutes(0);dteCur.setSeconds(0);dteCur.setMilliseconds(0);if(!(B))D="<form name=\"spiffyCal\">";if(scNN6)$+=D+"<table width=\"185\" border=\"3\" class=\"cal-Table\" cellspacing=\"0\" cellpadding=\"0\"><tr>";else $+="<table width=\"185\" border=\"3\" class=\"cal-Table\" cellspacing=\"0\" cellpadding=\"0\">"+D+"<tr>";if(!(B)){$+="<td class=\"cal-HeadCell\" align=\"center\" width=\"100%\"><a href=\"javascript:"+this.varName+".clearDay();\"><img name=\"calbtn1\" src=\""+strDefBtnImgPath+"btn_del_small.gif\" border=\"0\" width=\"12\" height=\"10\"></a>&nbsp;&nbsp;<a href=\"javascript:"+this.varName+".scrollMonth(-1);\" class=\"cal-DayLink\">&lt;</a>&nbsp;<SELECT class=\"cal-ComboBox\" NAME=\"cboMonth\" onChange=\""+this.varName+".changeMonth();\">";for(E=0;E<12;E++)if(E==J)$+="<OPTION VALUE=\""+E+"\" SELECTED>"+msNames[E]+"</OPTION>";else $+="<OPTION VALUE=\""+E+"\">"+msNames[E]+"</OPTION>";$+="</SELECT><SELECT class=\"cal-ComboBox\" NAME=\"cboYear\" onChange=\""+this.varName+".changeYear();\">";for(E=this.minYearChoice;E<this.maxYearChoice;E++)if(E==L)$+="<OPTION VALUE=\""+E+"\" SELECTED>"+E+"</OPTION>";else $+="<OPTION VALUE=\""+E+"\">"+E+"</OPTION>";$+="</SELECT>&nbsp;<a href=\"javascript:"+this.varName+".scrollMonth(1);\" class=\"cal-DayLink\">&gt;</a>&nbsp;&nbsp;<a href=\"javascript:"+this.varName+".hide();\"><img name=\"calbtn2\" src=\""+strDefBtnImgPath+"btn_close_small.gif\" border=\"0\" width=\"12\" height=\"10\"></a></td></tr><tr><td width=\"100%\" align=\"center\">"}else $+="<td class=\"cal-HeadCell\" align=\"center\" width=\"100%\">"+msNames[J]+"-"+L+"</td></tr><tr><td width=\"100%\" align=\"center\">";firstDay=new Date(L,J,1);startDay=firstDay.getDay();if(((L%4==0)&&(L%100!=0))||(L%400==0))msDays[1]=29;else msDays[1]=28;$+="<table width=\"185\" cellspacing=\"1\" cellpadding=\"2\" border=\"0\"><tr>";for(E=0;E<7;E++){if(E==0||E==6)I="15%";else I="14%";$+="<td class=\"cal-HeadCell\" width=\""+I+"\" align=\"center\" valign=\"middle\">"+msDOW[E]+"</td>"}$+="</tr><tr>";var G=0,_=J-1,M=L;if(_==-1){_=11;M=M-1}for(E=0;E<startDay;E++,G++)$+=this.getDayLink(true,(msDays[_]-startDay+E+1),_,M,B,A);for(E=1;E<=msDays[J];E++,G++){if((G%6)==0)A=true;else A=false;$+=this.getDayLink(false,E,J,L,B,A);if(G==6){$+="</tr><tr>";G=-1}}var C=J+1,H=L;if(C==12){C=0;H=H+1}if(G>0){for(E=1;G<7;E++,G++)$+=this.getDayLink(true,E,C,H,B);$+="</tr></table></td></tr>"}else{$=$.substr(0,$.length-4);$+="</table></td></tr>"}if(scNN6)$+="</table></form>";else $+="</form></table>";dteCur.setDate(1);dteCur.setHours(0);dteCur.setMinutes(0);dteCur.setSeconds(0);dteCur.setMilliseconds(0);dteCur.setMonth(F);dteCur.setFullYear(K);return $}this.makeCalendar=makeCalendar;function writeControl(){var _="",B="",A="",$="";if(this.readonly)B=" onFocus=\"this.blur();\" readonly ";if(this.focusClick)B=" onFocus=\""+this.varName+".show();\" ";if(!(this.useDateRange))B+=" onChange=\"calMgr.validateDate(document."+this.formName+"."+this.textBoxName+","+this.varName+".required);\" onBlur=\"calMgr.formatDate(document."+this.formName+"."+this.textBoxName+","+this.varName+".dateFormat);\" ";else{A=this.minDate.getDate()+"-"+msNames[this.minDate.getMonth()]+"-"+this.minDate.getFullYear();$=this.maxDate.getDate()+"-"+msNames[this.maxDate.getMonth()]+"-"+this.maxDate.getFullYear();B+=" onChange=\"calMgr.validateDate("+"document."+this.formName+"."+this.textBoxName+","+this.varName+".required,"+this.varName+".minDate,"+this.varName+".maxDate);\" onBlur=\"calMgr.formatDate(document."+this.formName+"."+this.textBoxName+","+this.varName+".dateFormat);\" "}_="<input class=\"cal-TextBox\" type=\"text\" name=\""+this.textBoxName+"\""+B+"size=\"12\" value=\""+this.getSelectedDate()+"\">";if(!scIE)B=" href=\"javascript:calClick();return false;\" ";else B="";if((this.focusClick==false)||(this.focusClick==true&&this.hideButton==false)){_+="<a class=\"so-BtnLink\""+B;_+=" onmouseover=\"calMgr.swapImg("+this.varName+",'.imgOver',false);\" ";_+="onmouseout=\"calMgr.swapImg("+this.varName+",'.imgUp',false);\" ";_+="onclick=\"calMgr.swapImg("+this.varName+",'.imgDown',true);";_+=this.varName+".show();\">";_+="<img align=\"absmiddle\" border=\"0\" name=\""+this.btnName+"\" src=\""+strBtnImg+"\" width=\""+strBtnW+"\" height=\""+strBtnH+"\"></a>"}document.write(_)}this.writeControl=writeControl;function show(){var $=calMgr.lastSelectedDate;if(!this.enabled)return;calMgr.hideAllCalendars(this);if(this.visible)this.hide();else{if(document.images["calbtn1"]!=null)document.images["calbtn1"].src=img_Del.src;if(document.images["calbtn2"]!=null)document.images["calbtn2"].src=img_Close.src;if(this.focusClick==true&&this.hideButton==true){scX=this.x;scY=this.y}else if(scIE){if(this.displayLeft)scX=getOffsetLeft(document.images[this.btnName])-192+document.images[this.btnName].width;else scX=getOffsetLeft(document.images[this.btnName]);if(this.displayTop)scY=getOffsetTop(document.images[this.btnName])-138;else scY=getOffsetTop(document.images[this.btnName])+document.images[this.btnName].height+2}else if(scNN){if(this.displayLeft)scX=document.images[this.btnName].x-192+document.images[this.btnName].width;else scX=document.images[this.btnName].x;if(this.displayTop)scY=document.images[this.btnName].y-134;else scY=document.images[this.btnName].y+document.images[this.btnName].height+2}if(this.hideCombos)toggleCombos("hidden");if(this.getSelectedDate()==""){if(!(dteCur))domlay("spiffycalendar",1,scX,scY,this.makeCalendar(dteToday.getMonth(),dteToday.getFullYear()));else domlay("spiffycalendar",1,scX,scY,this.makeCalendar(dteCur.getMonth(),dteCur.getFullYear()))}else{if(calMgr.isDate(quote(this.getSelectedDate()),quote(this.dateFormat))){dteCur=calMgr.getDateFromFormat(quote(this.getSelectedDate()),quote(this.dateFormat));dteCur.setHours(0);dteCur.setMinutes(0);dteCur.setSeconds(0);dteCur.setMilliseconds(0)}else dteCur=calMgr.lastSelectedDate;domlay("spiffycalendar",1,scX,scY,this.makeCalendar(dteCur.getMonth(),dteCur.getFullYear()))}this.visible=true}}this.show=show;function hide(){domlay("spiffycalendar",0,scX,scY);this.visible=false;calMgr.swapImg(this,".imgUp",false);if(this.hideCombos)toggleCombos("visible")}this.hide=hide;function clearDay(){eval("document."+this.formName+"."+this.textBoxName+".value = ''");this.hide();if(this.JStoRunOnClear!=null)eval(unescape(this.JStoRunOnClear));eval("document."+this.formName+"."+this.textBoxName).className="cal-TextBox";if(this.required)eval("document."+this.formName+"."+this.textBoxName).className="cal-TextBoxInvalid"}this.clearDay=clearDay;function changeDay(intWhatDay){dteCur.setDate(intWhatDay);dteCur.setHours(0);dteCur.setMinutes(0);dteCur.setSeconds(0);dteCur.setMilliseconds(0);this.textBox().value=calMgr.scFormatDate(dteCur,this.dateFormat);this.hide();if(this.JStoRunOnSelect!=null)eval(unescape(this.JStoRunOnSelect));eval("document."+this.formName+"."+this.textBoxName).className="cal-TextBox"}this.changeDay=changeDay;function scrollMonth(_){var $,A;if(scIE)$=document.forms["spiffyCal"].cboMonth.selectedIndex+_;else if(scNN)$=document.spiffycalendar.document.forms["spiffyCal"].cboMonth.selectedIndex+_;if($<0){A=dteCur.getFullYear()-1;if(A<this.minYearChoice){A=this.minYearChoice;$=0}else $=11;dteCur.setFullYear(A)}else if($>11){A=dteCur.getFullYear()+1;if(A>this.maxYearChoice-1){A=this.maxYearChoice-1;$=11}else $=0;dteCur.setFullYear(A)}if(scIE)dteCur.setMonth(document.forms["spiffyCal"].cboMonth.options[$].value);else if(scNN)dteCur.setMonth(document.spiffycalendar.document.forms["spiffyCal"].cboMonth.options[$].value);domlay("spiffycalendar",1,scX,scY,this.makeCalendar(dteCur.getMonth(),dteCur.getFullYear()))}this.scrollMonth=scrollMonth;function changeMonth(){if(scIE){dteCur.setMonth(document.forms["spiffyCal"].cboMonth.options[document.forms["spiffyCal"].cboMonth.selectedIndex].value);domlay("spiffycalendar",1,scX,scY,this.makeCalendar(dteCur.getMonth(),dteCur.getFullYear()))}else if(scNN){dteCur.setMonth(document.spiffycalendar.document.forms["spiffyCal"].cboMonth.options[document.spiffycalendar.document.forms["spiffyCal"].cboMonth.selectedIndex].value);domlay("spiffycalendar",1,scX,scY,this.makeCalendar(dteCur.getMonth(),dteCur.getFullYear()))}}this.changeMonth=changeMonth;function changeYear(){if(scIE){dteCur.setFullYear(document.forms["spiffyCal"].cboYear.options[document.forms["spiffyCal"].cboYear.selectedIndex].value);domlay("spiffycalendar",1,scX,scY,this.makeCalendar(dteCur.getMonth(),dteCur.getFullYear()))}else if(scNN){dteCur.setFullYear(document.spiffycalendar.document.forms["spiffyCal"].cboYear.options[document.spiffycalendar.document.forms["spiffyCal"].cboYear.selectedIndex].value);domlay("spiffycalendar",1,scX,scY,this.makeCalendar(dteCur.getMonth(),dteCur.getFullYear()))}}this.changeYear=changeYear;function getDayLink(_,$,D,F,C,A){var B,I="calDay-Link",G="cal-DayCell",E="",H=-1,J="";if(A==true&&this.showWeekends==true)G="cal-WeekendCell";E=msNames[D]+"-"+$;if(this.showHolidays){H=calMgr.isHoliday(E);if(H!=-1){J=" title=\""+calMgr.HolidaysDesc[H]+"\"";G="cal-HolidayCell"}}if(!(this.useDateRange)){if(_)B="<td align=\"center\" class=\"cal-GreyDate\">"+$+"</td>";else if(isDayToday($)){if(!(C))B="<td align=\"center\" class=\""+G+"\">"+"<a class=\"cal-TodayLink\" "+J+" onmouseover=\"self.status=' ';return true\" href=\"javascript:"+this.varName+".changeDay("+$+");\">"+$+"</a></td>";else B="<td align=\"center\" class=\""+G+"\"><span class=\"cal-Today\">"+$+"</span></td>"}else if(!(C))B="<td align=\"center\" class=\""+G+"\">"+"<a class=\"cal-DayLink\" "+J+" onmouseover=\"self.status=' ';return true\" href=\"javascript:"+this.varName+".changeDay("+$+");\">"+$+"</a>"+"</td>";else B="<td align=\"center\" class=\""+G+"\"><span class=\"cal-Day\">"+$+"</span></td>"}else if(this.isDayValid($,D,F)){if(_)B="<td align=\"center\" class=\"cal-GreyDate\">"+$+"</td>";else if(isDayToday($)){if(!(C))B="<td align=\"center\" class=\""+G+"\">"+"<a class=\"cal-TodayLink\" "+J+" onmouseover=\"self.status=' ';return true\" href=\"javascript:"+this.varName+".changeDay("+$+");\">"+$+"</a>"+"</td>";else B="<td align=\"center\" class=\""+G+"\"><span class=\"cal-Today\">"+$+"</span></td>"}else if(!(C))B="<td align=\"center\" class=\""+G+"\">"+"<a class=\"cal-DayLink\" "+J+" onmouseover=\"self.status=' ';return true\" href=\"javascript:"+this.varName+".changeDay("+$+");\">"+$+"</a>"+"</td>";else B="<td align=\"center\" class=\""+G+"\"><span class=\"cal-Day\">"+$+"</span></td>"}else B="<td align=\"center\" class=\"cal-GreyInvalidDate\">"+$+"</td>";return B}this.getDayLink=getDayLink;function toggleCombos($){var C,A,_,B;for(C=0;C<document.forms.length;C++)for(A=0;A<document.forms[C].elements.length;A++)if(document.forms[C].elements[A].tagName=="SELECT")if(document.forms[C].name!="spiffyCal"){_=getOffsetLeft(document.forms[C].elements[A]);B=getOffsetTop(document.forms[C].elements[A]);if(((_>=scX-15)&&(_<=scX+200))&&((B>=scY-15)&&(B<=scY+145)))document.forms[C].elements[A].style.visibility=$;_=_+parseInt(document.forms[C].elements[A].style.width);B=B+15;if(((_>=scX+15)&&(_<=scX+200))&&((B>=scY-15)&&(B<=scY+145)))document.forms[C].elements[A].style.visibility=$}}function isDayToday($){if((dteCur.getFullYear()==dteToday.getFullYear())&&(dteCur.getMonth()==dteToday.getMonth())&&($==dteToday.getDate()))return true;else return false}function isDayValid($,_,A){dteCur.setDate($);dteCur.setMonth(_);dteCur.setFullYear(A);dteCur.setHours(0);dteCur.setMinutes(0);dteCur.setSeconds(0);dteCur.setMilliseconds(0);if((dteCur>=this.minDate)&&(dteCur<=this.maxDate))return true;else return false}this.isDayValid=isDayValid;calMgr.addCalendar(this);blnInConstructor=false}function quote($){return"'"+$+"'"}function getOffsetLeft($){var _=$.offsetLeft;while(($=$.offsetParent)!=null)_+=$.offsetLeft;return _}function getOffsetTop(_){var $=_.offsetTop;while((_=_.offsetParent)!=null)$+=_.offsetTop;return $}function calClick(){window.focus()}function domlay(_,B,A,C,$){if(B=="1"){if(document.layers)document.layers[""+_+""].visibility="show";else if(document.all)document.all[""+_+""].style.visibility="visible";else if(document.getElementById)document.getElementById(""+_+"").style.visibility="visible"}else if(B=="0")if(document.layers)document.layers[""+_+""].visibility="hide";else if(document.all)document.all[""+_+""].style.visibility="hidden";else if(document.getElementById)document.getElementById(""+_+"").style.visibility="hidden";if(A)if(document.layers)document.layers[""+_+""].left=A;else if(document.all)document.all[""+_+""].style.left=A;else if(document.getElementById)document.getElementById(""+_+"").style.left=A+"px";if(C)if(document.layers)document.layers[""+_+""].top=C;else if(document.all)document.all[""+_+""].style.top=C;else if(document.getElementById)document.getElementById(""+_+"").style.top=C+"px";if($)if(document.layers){sprite=document.layers[""+_+""].document;sprite.open();sprite.write($);sprite.close()}else if(document.all)document.all[""+_+""].innerHTML=$;else if(document.getElementById){rng=document.createRange();el=document.getElementById(""+_+"");rng.setStartBefore(el);htmlFrag=rng.createContextualFragment($);while(el.hasChildNodes())el.removeChild(el.lastChild);el.appendChild(htmlFrag)}}function makeArray0(){for(i=0;i<makeArray0.arguments.length;i++)this[i]=makeArray0.arguments[i]}
