var SpecialDay=0;var ColorBackground="#ffffcc";var ColorSpecialDay="purple";var BorderSpecialDay="";var CellSpecialDay="#FFCCFF";var ReverseSpecialDay=false;var OrderSpecialDay=3;var ColorHoliday="red";var BorderHoliday=ColorHoliday;var CellHoliday="#FFCCCC";var ReverseHoliday=true;var OrderHoliday=1;var ColorAltHoly="#999999";var BorderAltHoly=ColorAltHoly;var CellAltHoly="#EEEEEE";var ReverseAltHoly=true;var OrderAltHoly=2;var ColorToday="green";var BorderToday=ColorToday;var CellToday="#CCFFCC";var ReverseToday=true;var OrderToday=0;var ColorEvent="blue";var BorderEvent=ColorEvent;var CellEvent="#CCCCFF";var ReverseEvent=false;var OrderEvent=4;var ColorAltDate="#999999";var ColorMini="black";var ColorFade="#CCCCCC";var FadeAll=true;var showAltDate=false;var showHolidays=false;var showAltHoly=false;var showMsgBox=true;var showMini=true;var showNav=true;var showImages=true;var showLinks=true;var formatLinks=false;var navColor="#ffff99";var msgBoxColor="#ffcc99";var msgBoxWidth="";var msgBoxBorder=2;var imageAlign="left";var imageScale=100;var altAlign=true;var DefaultFormat="layer";var ExportPage="";var ExportHolidays=true;var ExportAltHoly=true;var PrintPage="";var PrintPageRule="";var DateFontSize=5;var AltDateFormat="<font color="+ColorAltDate+" size=2>|</font>";var MonthFormat="<font size="+DateFontSize+"><b>|</b></font>";var AltMonthFormat="<br><font color="+ColorAltDate+" size="+DateFontSize/2+"><b>|</b></font>";var HolidayFormat="<font color="+ColorHoliday+" size=2><b><center>|</center></b></font>";var AltHolyFormat="<font color="+ColorAltHoly+" size=2><b><center>|</center></b></font>";var DefaultLayerFormat="<font color="+ColorEvent+" size=2>|</font>";var MsgBoxFormat="<font size=2>|</font>";var defaultMsgBox="Note: The information here may not be current; please confirm dates and times.<p>";var today=new Date();var FirstMonth=GetFullYear(today)*100+1;var LastMonth=FirstMonth+11;var Layers=new Array;var layerCount=0;var layerChange=false;var SpecialDays=new Array;function DefineSpecial(){for(var n=0;n<DefineSpecial.arguments.length;n++){SpecialDays[DefineSpecial.arguments[n]]=true;}}var MsgBoxes=new Array;var Events=new Array;function myEvent(description,layer,format,link,image,width,height,align,alt){this.description=description;if(link)this.link=link;if(image){this.image=image;if(width)this.width=width;if(height)this.height=height;if(align)this.align=align;if(alt)this.alt=alt;}this.layer=(layer?layer:"default");if(format){if(CheckFormat(format))this.format=format;}}function DefineEvent(Date,Description,Link,Image,Width,Height){AddEvent(Date,Description,"","",Link,Image,Width,Height,"","");}function AddEvent(Date,Description,Layer,Format,Link,Image,Width,Height,Align,Alt){var i;if(!Events[Date])Events[Date]=new Array;i=Events[Date].length;Events[Date][i]=new myEvent(Description,Layer,Format,Link,Image,Width,Height,Align,Alt);if(Date>1231){tmp=Math.floor(Date/100);if(tmp<FirstMonth)FirstMonth=tmp;if(tmp>LastMonth)LastMonth=tmp;}if(Layer&&!Layers[Layer])DefineLayer(Layer);}function Layer(format,show){if(format){if(format.indexOf("|")>0){this.format=format;}else{alert("Invalid Calendar Format String: "+format);}}else{this.format=DefaultLayerFormat;}this.show=(show=="false"?"false":"true");}function DefineLayer(LayerName,LayerFormat,LayerShow){Layers[LayerName]=new Layer(LayerFormat,LayerShow);layerCount++;}function arr(){for(var n=0;n<arr.arguments.length;n++){this[n+1]=arr.arguments[n];}this.length=arr.arguments.length;this.cycle=function(){var tmp=this[1];for(var n=2;n<=this.length;n++){this[n-1]=this[n];}this[this.length]=tmp;}}var doAltNames=false;var startWeekday=1;var months=new arr("January","February","March","April","May","June","July","August","September","October","November","December");var weekdays=new arr("Sun","Mon","Tue","Wed","Thu","Fri","Sat");var days=new arr("S","M","T","W","T","F","S");var words=new arr("<-- "," -->","Jump to month:","Export Events","Print-friendly","Filter Events:","Apply Changes");var alt_months=months;var alt_weekdays=weekdays;var alt_days=days;var alt_words=words;var cookieName="layerCalendar";var pre,post,tmp,gloMo,gloYr,gloYearmonth;var inds=new Array(3);var msgdates=new Array(3);function Calendar(){var curyr,curmo,curdy,yr,mo,dy,firstday,yearmonth,bgn,lastdate,jump;var thispage=window.location.pathname;var myMsgBox="Put this FREE calendar script on your own site; see <a href=http://calendar.pikesys.com>calendar.pikesys.com</a>.<p>";if(SpecialDay)DefineSpecial(SpecialDay);AddMsgBox(0,defaultMsgBox);AddMsgBox(0,myMsgBox);curdy=today.getDate();curmo=today.getMonth()+1;curyr=GetFullYear(today);initCal(curmo,curyr);mo=gloMo;yr=gloYr;yearmonth=gloYearmonth;getLayersVisible();bgn=new Date(yr,mo-1,1);firstday=(bgn.getDay()+8-startWeekday)%7;lastdate=NumDaysIn(mo,yr);lastday=1+(firstday+lastdate-1)%7;prev=next="&nbsp;";if(showNav){if(yearmonth>FirstMonth)prev='<a class="navlink" href="'+thispage+'?'+PrevYearMonth(yearmonth)+'">'+words[1]+months[PrevMonth(mo)]+'</a>';if(yearmonth<LastMonth)next+='<a class="navlink" href="'+thispage+'?'+NextYearMonth(yearmonth)+'">'+months[NextMonth(mo)]+words[2]+'</a>';}parseFormat(MonthFormat);tmp="<TABLE BORDER=2 BGCOLOR="+ColorBackground+"><TR BORDER=0 BGCOLOR="+navColor+">";tmp+="<TD ALIGN=CENTER BGCOLOR="+navColor+">"+prev+"</TD>";tmp+="<TD ALIGN=CENTER COLSPAN=5>"+pre+months[mo]+" "+yr+post;if(showAltDate){parseFormat(AltMonthFormat);altMonth=getAltMonth(1,mo,yr,lastdate);tmp+=pre+(altMonth?altMonth:"")+post;}tmp+="</TD><TD ALIGN=CENTER BGCOLOR="+navColor+">"+next+"</TD></TR>";document.write(tmp);document.write("<TR BGCOLOR="+navColor+">");tmp="";for(var i=1;i<=7;i++){tmp+="<TD ALIGN=CENTER WIDTH=14%"+(SpecialDays[i]&&CellSpecialDay?" bgcolor="+CellSpecialDay:"")+">";tmp+="<FONT SIZE=2"+(SpecialDays[i]&&ColorSpecialDay?" color="+ColorSpecialDay:"")+">"+weekdays[i]+"</FONT></TD>";}document.write(tmp+"</TR><TR>");dy=1;while(dy<=lastdate){for(var i=1;i<=7;i++){if(dy==1&&i<=firstday){if(i==1){if(showMini){document.write("<TD BGCOLOR="+(SpecialDays[i]&&CellSpecialDay?CellSpecialDay:ColorBackground)+">");MiniMonth(PrevYearMonth(yearmonth));}else{document.write("<TD>&nbsp;");}}else if(showMsgBox&&i==2){msgSpan=firstday-1;document.write("<TD BGCOLOR="+navColor+" COLSPAN="+msgSpan+">&nbsp;");DoMsgBox(yearmonth,msgSpan);}else if(!showMsgBox){document.write("<TD BGCOLOR="+(SpecialDays[i]&&CellSpecialDay?CellSpecialDay:ColorBackground)+">&nbsp;");}document.write("</TD>");}else if(dy>lastdate){if(i==7){if(showMini){document.write("<TD BGCOLOR="+(SpecialDays[i]&&CellSpecialDay?CellSpecialDay:ColorBackground)+">");MiniMonth(NextYearMonth(yearmonth));}else{document.write("<TD>&nbsp;");}}else if(showMsgBox&&i==(lastday+1)){msgSpan=6-lastday;document.write("<TD BGCOLOR="+navColor+" COLSPAN="+msgSpan+">&nbsp;");DoMsgBox(yearmonth,msgSpan);}else if(!showMsgBox){document.write("<TD BGCOLOR="+(SpecialDays[i]&&CellSpecialDay?CellSpecialDay:ColorBackground)+">&nbsp;");}document.write("</TD>");}else{ShowDate(yr,mo,dy,i,curyr,curmo,curdy);dy++;}}document.write("</TR>");}if(showNav){prev=next="&nbsp;";if(yearmonth>FirstMonth)prev='<a class="navlink" href="'+thispage+'?'+PrevYearMonth(yearmonth)+'">'+words[1]+months[PrevMonth(mo)]+'</a>';if(yearmonth<LastMonth)next+='<a class="navlink" href="'+thispage+'?'+NextYearMonth(yearmonth)+'">'+months[NextMonth(mo)]+words[2]+'</a>';tmp="<TR BGCOLOR="+navColor+"><TD ALIGN=CENTER BGCOLOR="+navColor+">"+prev+"</TD>";tmp+="<TD colspan=5 align=center valign=middle><FORM>";if(ExportPage)tmp+='<a class="navlink" href="'+ExportPage+'?'+yearmonth+'">'+words[4]+'</a>&nbsp;&nbsp;|&nbsp;&nbsp;';tmp+=words[3]+'&nbsp;&nbsp;';document.write(tmp);BuildSelectionList(yearmonth,thispage);if(PrintPageRule){parseFormat(PrintPageRule);PrintPage=pre+yearmonth+post;}if(PrintPage)document.write('&nbsp;&nbsp;|&nbsp;&nbsp;<a class="navlink" href="'+PrintPage+'?'+yearmonth+'">'+words[5]+'</a>');tmp="</FORM></TD><TD ALIGN=CENTER BGCOLOR="+navColor+">"+next+"</TD>";document.write(tmp+"</TR>");if(layerCount>1){document.write("<TR BGCOLOR="+navColor+"><TD colspan=7 align=center>");ChooseLayers(yearmonth,thispage);document.write("</TD></TR>");}}document.write("</TABLE>");}function ShowDate(yr,mo,dy,dayofweek,currentyear,currentmonth,currentday){var ind,dayHighlight,dayReverse,borderHighlight,cellColor,tmp,event;dayHighlight="";dayReverse="";borderHighlight="";cellColor="";orderDay=10;if((yr==currentyear)&&(mo==currentmonth)&&(dy==currentday)){orderDay=OrderToday;cellColor=CellToday;borderHighlight=BorderToday;if(ReverseToday){dayHighlight=ColorBackground;dayReverse=ColorToday;}else{dayHighlight=ColorToday;}}if(SpecialDays[dayofweek]&&OrderSpecialDay<orderDay){orderDay=OrderSpecialDay;cellColor=CellSpecialDay;borderHighlight=BorderSpecialDay;if(ReverseSpecialDay){dayHighlight=ColorBackground;dayReverse=ColorSpecialDay;}else{dayHighlight=ColorSpecialDay;}}if(showAltHoly){if(getAltHoly(dy,mo,yr)&&OrderAltHoly<orderDay){orderDay=OrderAltHoly;cellColor=CellAltHoly;borderHighlight=BorderAltHoly;if(ReverseAltHoly){dayHighlight=ColorBackground;dayReverse=ColorAltHoly;}else{dayHighlight=ColorAltHoly;}}}if(showHolidays){if(holidays(dy,mo,yr)&&OrderHoliday<orderDay){orderDay=OrderHoliday;cellColor=CellHoliday;borderHighlight=BorderHoliday;if(ReverseHoliday){dayHighlight=ColorBackground;dayReverse=ColorHoliday;}else{dayHighlight=ColorHoliday;}}}inds[0]=dy;inds[1]=dy+100*mo;inds[2]=dy+100*(mo+100*yr);for(var i in inds){ind=inds[i];if(Events[ind]){if(OrderEvent<orderDay){orderDay=OrderEvent;cellColor=CellEvent;borderHighlight=BorderEvent;if(ReverseEvent){dayHighlight=ColorBackground;dayReverse=ColorEvent;}else{dayHighlight=ColorEvent;}}}}if(ColorFade&&yr==currentyear&&mo==currentmonth&&dy<currentday)dayHighlight=(FadeAll?ColorFade:dayHighlight);document.write("<TD class='pik_cell' VALIGN=TOP"+(cellColor?" bgcolor="+cellColor:"")+(borderHighlight?" bordercolor="+borderHighlight:"")+">");tmp="<TABLE><TR VALIGN=TOP>";tmp+="<TD ALIGN=LEFT WIDTH=10%"+(dayReverse?" bgcolor="+dayReverse:"")+">";tmp+="<FONT SIZE="+DateFontSize+(dayHighlight?" COLOR="+dayHighlight:"")+">";tmp+="<B>"+dy+(dy<10?"&nbsp;":"")+"&nbsp;</B></FONT></TD>";document.write(tmp);if(showAltDate){altDate=getAltDate(dy,mo,yr);parseFormat(AltDateFormat);document.write("<TD ALIGN=RIGHT>"+pre+altDate+post+"</TD>");}else{document.write("<TD ALIGN=RIGHT></TD>");}document.write("</TR></TABLE>");if(showAltHoly){tmp=getAltHoly(dy,mo,yr);if(tmp){parseFormat(AltHolyFormat);document.write(pre+tmp+post+"<BR>");}}if(showHolidays){tmp=holidays(dy,mo,yr);if(tmp){parseFormat(HolidayFormat);document.write(pre+tmp+post+"<BR>");}}images=0;for(var i in inds){ind=inds[i];for(var j in Events[ind]){ev=Events[ind][j];tmp="";if(Layers[ev.layer].show=="true"){tmp+=(j>0?"<br>":"");if(ev.image&&showImages){if(ev.link&&showLinks)tmp+="<a class=\"eventlink\" href="+ev.link+">";if(ev.align){align=ev.align;}else if(altAlign&&images>0){align=(lastAlign=="left"?"right":"left");}else{align=imageAlign;}tmp+='<img border=0 src="'+ev.image+(ev.width?'"  width="'+ev.width*imageScale/100:'')+(ev.height?'" height="'+ev.height*imageScale/100:'')+(ev.alt?'" alt="'+ev.alt:'')+'" align="'+align+'" valign="top">';lastAlign=align;images++;if(ev.link&&showLinks)tmp+="</a>";}format="";if(ev.format=="layer"){format=Layers[ev.layer].format;}else if(ev.format=="custom"){format="";}else if(ev.format){if(CheckFormat(ev.format))format=ev.format;}else if(DefaultFormat=="layer"){format=Layers[ev.layer].format;}parseFormat(format);if(ev.link&&showLinks){hreftag="<a class=\"eventlink\" href="+ev.link+">";if(formatLinks){tmp+=hreftag+pre+ev.description+post+"</a>"+"<br>";}else{tmp+=pre+hreftag+ev.description+"</a>"+post+"<br>";}}else{tmp+=pre+ev.description+post+"<br>";}}else{}document.write("<FONT SIZE=1>"+tmp+"</FONT>");}}document.write("</TD>");}function exportCal(){var ind,curyr,curmo,curdy,yr,mo,firstday,yearmonth,lastdate,evdate;curdy=today.getDate();curmo=today.getMonth()+1;curyr=GetFullYear(today);initCal(curmo,curyr);mo=gloMo;yr=gloYr;yearmonth=gloYearmonth;getLayersVisible();lastdate=NumDaysIn(mo,yr);tmp="<textarea NAME=\"txt\"  ROWS=20 COLS=75 WRAP=VIRTUAL>";tmp+='"Subject","Start Date","Start Time","End Date","End Time","All day event","Description","Show time as","Location"\n';document.write(tmp);inds[0]=0;inds[1]=0+100*mo;inds[2]=0+100*(mo+100*yr);alert("exportCal: "+showAltHoly+","+ExportAltHoly+","+showHolidays+","+ExportHolidays);for(var dy=1;dy<=lastdate;dy++){evdate=mo+"/"+dy+"/"+yr;if(showAltHoly&&ExportAltHoly){tmp=getAltHoly(dy,mo,yr);if(tmp){alert("exportCal: exporting AltHoly "+tmp+" on "+evdate);document.write(qw(tmp)+","+qw(evdate)+",,,,"+qw("true")+",,"+qw("3")+","+qw("CalendarScript-AltHoly")+"\n");}}if(showHolidays&&ExportHolidays){tmp=holidays(dy,mo,yr);if(tmp){alert("exportCal: exporting Holidays "+tmp+" on "+evdate);document.write(qw(tmp)+","+qw(evdate)+",,,,"+qw("true")+",,"+qw("3")+","+qw("CalendarScript-Holiday")+"\n");}}for(var i in inds){ind=inds[i]+dy;for(var j in Events[ind]){ev=Events[ind][j];if(Layers[ev.layer].show=="true"){alert("(+)showing event for "+ind+" in layer "+ev.layer);tmp=qw(ev.description)+","+qw(evdate)+",,,,"+qw("true")+",,"+qw("3")+","+qw("CalendarScript-Event");if(ev.description)document.write(tmp+"\n");}else{}}}}document.write("</textarea>");}function listCal(){var ind,curyr,curmo,curdy,yr,mo,firstday,yearmonth,lastdate,evdate;curdy=today.getDate();curmo=today.getMonth()+1;curyr=GetFullYear(today);initCal(curmo,curyr);mo=gloMo;yr=gloYr;yearmonth=gloYearmonth;getLayersVisible();bgn=new Date(yr,mo-1,1);firstday=(bgn.getDay()+8-startWeekday)%7;lastdate=NumDaysIn(mo,yr);parseFormat(MonthFormat);tmp="<H1>"+pre+months[mo]+" "+yr+post;if(showAltDate){parseFormat(AltMonthFormat);altMonth=getAltMonth(1,mo,yr,lastdate);tmp+=pre+(altMonth?altMonth:"")+post;}tmp+="</H1><table border=0 cellspacing=0><tr><th width=10%></th><th></th></tr>";document.write(tmp);inds[0]=0;inds[1]=0+100*mo;inds[2]=0+100*(mo+100*yr);for(var dy=1;dy<=lastdate;dy++){evdate=dy;tmp3="";if(showAltHoly&&ExportAltHoly){tmp=getAltHoly(dy,mo,yr);if(tmp){parseFormat(AltHolyFormat);tmp3+="<TR><TD>"+pre+tmp+post+"</TD></TR>";}}if(showHolidays&&ExportHolidays){tmp=holidays(dy,mo,yr);if(tmp){parseFormat(HolidayFormat);tmp3+="<TR><TD>"+pre+tmp+post+"</TD></TR>";}}for(var i in inds){ind=inds[i]+dy;for(var j in Events[ind]){ev=Events[ind][j];if(Layers[ev.layer].show=="true"){tmp="";tmp2="";if(ev.image&&showImages){if(ev.link&&showLinks)tmp2+="<a class=\"eventlink\" href="+ev.link+">";if(ev.align){align=ev.align;}else if(altAlign&&images>0){align=(lastAlign=="left"?"right":"left");}else{align=imageAlign;}tmp2='<img border=0 src="'+ev.image+(ev.width?'"  width="'+ev.width*imageScale/100:'')+(ev.height?'" height="'+ev.height*imageScale/100:'')+(ev.alt?'" alt="'+ev.alt:'')+'" align="'+align+'" valign="top">';lastAlign=align;images++;if(ev.link&&showLinks)tmp+="</a>";}format="";if(ev.format=="layer"){format=Layers[ev.layer].format;}else if(ev.format=="custom"){format="";}else if(ev.format){if(CheckFormat(ev.format))format=ev.format;}else if(DefaultFormat=="layer"){format=Layers[ev.layer].format;}parseFormat(format);if(ev.link&&showLinks){hreftag="<a class=\"eventlink\" href="+ev.link+">";if(formatLinks){tmp+=hreftag+pre+ev.description+post+"</a>"+"<br>";}else{tmp+=pre+hreftag+ev.description+"</a>"+post+"<br>";}}else{tmp+=pre+ev.description+post+"<br>";}}else{}tmp="<TR><TD>"+tmp2+"</TD><TD>"+tmp+"</TD></TR>";if(ev.description)tmp3+=tmp;}}dateStr="<br><b><u>"+weekdays[1+(dy+firstday-1)%7]+" - "+months[mo]+" "+evdate+"</u></b>";if(tmp3)document.write("<tr><td colspan=2>"+dateStr+"</td></tr>\n"+tmp3+"\n");}document.write("</table>");}function getLayersVisible(){prefix=cookieName+"|";cookie=unescape(document.cookie);pos=cookie.indexOf(prefix);if(pos>=0){pos+=prefix.length;sep=cookie.indexOf(";");if(sep==-1)sep=cookie.length;var layerCookies=cookie.substring(pos,sep).split("|");for(var i=0;i<layerCookies.length;i++){sep=layerCookies[i].indexOf("=");name=layerCookies[i].substring(0,sep);value=layerCookies[i].substring(sep+1,layerCookies[i].length);if(Layers[name])Layers[name].show=value;}}}function initCal(curmo,curyr){if(!Layers["default"])DefineLayer("default",DefaultLayerFormat);mo=curmo;yr=curyr;yearmonth=(yr*100)+mo;if(doAltNames){for(var i=0;i<12;i++){months[i+1]=alt_months[i+1];}for(var i=0;i<7;i++){weekdays[i+1]=alt_weekdays[i+1];}for(var i=0;i<7;i++){days[i+1]=alt_days[i+1];}for(var i=0;i<words.length;i++){words[i+1]=alt_words[i+1];}}if(startWeekday>1){for(var i=1;i<startWeekday;i++){weekdays.cycle();alt_weekdays.cycle();days.cycle();alt_days.cycle();}}if(location.search.length>1){yearmonth=parseInt(location.search.substring(1,location.search.length));if((""+yearmonth).length==6){mo=yearmonth%100;yr=(yearmonth-mo)/100;}}if(yearmonth<FirstMonth){mo=FirstMonth%100;yr=(FirstMonth-mo)/100;yearmonth=FirstMonth;}if(yearmonth>LastMonth){mo=LastMonth%100;yr=(LastMonth-mo)/100;yearmonth=LastMonth;}gloMo=mo;gloYr=yr;gloYearmonth=yearmonth;}function qw(string){return "&quot;"+string+"&quot;";}function MiniMonth(yearmonth){var bgn,firstday,lastdate,miniweek;mo=yearmonth%100;yr=(yearmonth-mo)/100;bgn=new Date(yr,mo-1,1);firstday=(bgn.getDay()+8-startWeekday)%7;lastdate=NumDaysIn(mo,yr);document.write("<div align=center><b><tt><Font Size=2 color="+ColorMini+">&nbsp;"+months[mo]+"</font><br>");miniweek="<font size=1 color="+ColorMini+">&nbsp;<u>";for(var d=0;d<7;d++){miniweek+="&nbsp;"+days[d+1]+"&nbsp;";}document.write(miniweek,"</u>");dy=1;while(dy<=lastdate){miniweek="<br>";for(var i=1;i<=7;i++){if(dy==1&&i<=firstday){miniweek+="&nbsp;&nbsp;&nbsp;";}else if(dy>lastdate){miniweek+="&nbsp;&nbsp;&nbsp;";}else{miniweek+="&nbsp;"+(dy<10?"&nbsp;":"")+dy;dy++;}}document.write(miniweek);}document.write("</font></tt></b></div>");}function NumDaysIn(mo,yr){if(mo==4||mo==6||mo==9||mo==11)return 30;else if((mo==2)&&LeapYear(yr))return 29;else if(mo==2)return 28;else return 31;}function LeapYear(yr){return((yr%4==0&&yr%100!=0)||yr%400==0?true:false);}function GetFullYear(d){var yr=d.getYear();return(yr<1000?yr+1900:yr);}function PrevMonth(mth){return(mth==1?12:mth-1);}function NextMonth(mth){return(mth==12?1:mth+1);}function PrevYearMonth(yrmth){return(yrmth%100==1?yrmth-100+11:yrmth-1);}function NextYearMonth(yrmth){return(yrmth%100==12?yrmth-11+100:yrmth+1);}function JumpTo(calendar,thispage){var sel,yrmo;sel=calendar.selectedIndex;yrmo=calendar.form.jumpmonth[sel].value;document.location=thispage+"?"+yrmo;}function BuildSelectionList(current,thispage){var mo,yr,yearmonth;yearmonth=FirstMonth;tmp="<select name=\"jumpmonth\" size=1 onchange=\"JumpTo(this,'"+thispage+"')\">";while(yearmonth<=LastMonth){mo=yearmonth%100;yr=(yearmonth-mo)/100;selected=(yearmonth==current?" selected":"");tmp+="<option value="+yearmonth+selected+">"+months[mo]+" "+yr;yearmonth=NextYearMonth(yearmonth);}document.write(tmp+"</select>");}function DoMsgBox(yearmonth,msgSpan){var showMsg;parseFormat(MsgBoxFormat);msgdates[0]=yearmonth;msgdates[1]=yearmonth%100;msgdates[2]=0;for(var k in msgdates){if(MsgBoxes[msgdates[k]]){for(var j in MsgBoxes[msgdates[k]]){monthlyMsg=MsgBoxes[msgdates[k]][j];if(!monthlyMsg.shown){showMsg=true;if(monthlyMsg.minspan&&msgSpan<monthlyMsg.minspan)showMsg=false;if(monthlyMsg.maxspan&&msgSpan>monthlyMsg.maxspan)showMsg=false;if(showMsg){tmp="<table class=\"pik_msgbox\" border="+msgBoxBorder+" align=center bgcolor="+msgBoxColor+(msgBoxWidth?" width="+msgBoxWidth:"")+">";tmp+="<TR><TD>"+pre+monthlyMsg.message+post+"</TD></TR></table>";document.write(tmp);monthlyMsg.shown=true;return;}}}}}}function escramVal(j,k){var a,b,c,d,e;a='<a href=\"mai';c='\">';a+='lto:';b=j+'@';e='</a>';b+=k;d=b;return(a+b+c+d+e);}function parseFormat(format){pre=post="";if(format){var sep=format.indexOf("|");if(sep>0){pre=format.substring(0,sep);post=format.substring(1+sep,format.length);}}}function CheckFormat(String){var okay;okay=(String=="layer"||String=="custom"||String.indexOf("|")>0);if(!okay)alert("Invalid Calendar Format String: "+String);return okay;}function MsgBox(message,minspan,maxspan){this.message=message;this.minspan=(minspan?minspan:1);if(maxspan)this.maxspan=maxspan;}function AddMsgBox(yearmonth,message,minspan,maxspan){var i;if(!MsgBoxes[yearmonth])MsgBoxes[yearmonth]=new Array;i=MsgBoxes[yearmonth].length;MsgBoxes[yearmonth][i]=new MsgBox(message,minspan,maxspan);}function ChooseLayers(yearmonth,thispage){var checked;tmp='<form name="layerform"><b>'+words[6]+'</b>&nbsp;';for(var i in Layers){if(i!="default"){checked=(Layers[i].show=="true"?" checked":"");parseFormat(Layers[i].format);tmp+=pre+'<input type="checkbox" name="'+i+'" value="'+i+'"'+checked+' onClick="ChangeLayer(\''+i+'\')">'+i+"&nbsp;"+post;}}tmp+='&nbsp;<input type="button" name="ApplyChanges" value="'+words[7]+'" onClick="ApplyLayerChange(\''+thispage+'\',\''+yearmonth+'\')">';document.write(tmp+"</form>");}function ChangeLayer(layer){layerChange=true;Layers[layer].show=document.layerform[layer].checked;}function ApplyLayerChange(thispage,yearmonth){layerChange=false;cookie=cookieName;for(var layer in Layers){if(layer!="default"){cookie+="|"+layer+"="+Layers[layer].show;}}document.cookie=escape(cookie);document.location=thispage+(yearmonth?"?"+yearmonth:"");}