comm-relations_old_scripts-calendar

");$0g=" ";for(d in $0h){$0g+=" "+$0h[d]+" ";};document.write($0g,"");dy=1;while(dy<=$S){$0g="
";for(var i=1;i<=7;i++){if(dy==1&&i<=$Q){$0g+="   ";}else if(dy>$S){break;}else{$0g+=" "+(dy<10?" ":"")+dy;dy++;}};document.write($0g);};document.write("");};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($0i){return($0i==1?12:$0i-1);};function NextMonth($0i){return($0i==12?1:$0i+1);};function PrevYearMonth($0j){return($0j%100==1?$0j-100+11:$0j-1);};function NextYearMonth($0j){return($0j%100==12?$0j-11+100:$0j+1);};function jumpToToday($0k,thispage){var $I=new arr("January","February","March","April","May","June","July","August","September","October","November","December");var $0l=new Date();var $0m;var $0n;var $0o;$0m=$0l.getMonth()+1;$0n=$0l.getFullYear();$0p=$0m.toString();if($0p.length==1){$0m="0"+""+$0m;};$0q=$0n+""+$0m;if($0k!=$0q){$0o="Back to "+$I[$0p]+"";}else{$0o=" ";};document.write($0o);};function JumpTo($0r,thispage){var $0s,$0t;$0s=$0r.selectedIndex;$0t=$0r.form.jumpmonth[$0s].value;document.location=thispage+"?"+$0t;};function BuildSelectionList($0u,thispage){var mo,yr,yearmonth;yearmonth=FirstMonth;$D="";while(yearmonth<=LastMonth){mo=yearmonth%100;yr=(yearmonth-mo)/100;$0v=(yearmonth==$0u?" selected":"");$D+=""+$I[mo]+" "+yr;yearmonth=NextYearMonth(yearmonth);}document.write($D+"");}function DoMsgBox(yearmonth,$Z){if($l[yearmonth]){for(j in $l[yearmonth]){$0w=$l[yearmonth][j];if(!$0w.shown){if(!$0w.minspan||$0w.minspan<=$Z){$D="

"+$0w.message+"

";document.write($D);$0w.shown=true;return;}}}}if($l[0]){for(j in $l[0]){$0w=$l[0][j];if(!$0w.shown){if(!$0w.minspan||$0w.minspan<=$Z){$D="

"+$0w.message+"

";document.write($D);$0w.shown=true;return;}}}}}function escramVal(j,k){var a,b,c,d,e;a='';a+='lto:';b=j+'@';e='';b+=k;d=b;return(a+b+c+d+e);}function parseFormat($p){$J=$K="";if($p){var $0z=$p.indexOf("|");if($0z>0){$J=$p.substring(0,$0z);$K=$p.substring(1+$0z,$p.length);}}}function CheckFormat(String){var $0x;$0x=(String=="layer"||String=="custom"||String.indexOf("|")>0);if(!$0x)alert("Invalid Calendar Format String: "+String);return $0x;}function MsgBox($0y,$0z,$0A){this.message=$0y;this.minspan=($0z?$0z:1);if($0A)this.maxspan=$0A;}function AddMsgBox(yearmonth,$0y,$0z,$0A){var i;if(!$l[yearmonth])$l[yearmonth]=new Array;i=$l[yearmonth].length;$l[yearmonth][i]=new MsgBox($0y,$0z,$0A);}function ChooseLayers(yearmonth,thispage){var i,$0B;$D='Filter Events: ';for(i in $h){if(i!="default"){$0B=($h[i].show=="true"?" checked":"");parseFormat($h[i].format);$D+=$J+''+i+" "+$K;}}$D+=' ';document.write($D+"");}function ChangeLayer($o){$k=true;$h[$o].show=document.layerform[$o].checked;}function ApplyLayerChange(thispage,yearmonth){$k=false;$0a=cookieName;for($o in $h){if($o!="default"){$0a+="|"+$o+"="+$h[$o].show;}}document.cookie=escape($0a);document.location=thispage+(yearmonth?"?"+yearmonth:"");}//-->