function WindowOnload(f){var _2=window.onload;window.onload=function(){if(_2){_2();}f();};}function ec3(){WindowOnload(function(){var _3=document.getElementById("ec3_prev");var _4=document.getElementById("ec3_next");if(_3&&_4){var _5=new RegExp("&cat=[0-9]+$");var _6=_5.exec(_3.href);if(_6){ec3.catClause=_6[0];}_3.href="javascript:ec3.go_prev()";_4.href="javascript:ec3.go_next()";ec3.imgwait=new Image(14,14);ec3.imgwait.src=ec3.myfiles+"/ec_load.gif";ec3.viewpostsfor=unencode(ec3.viewpostsfor);for(var i=0;i<ec3.month_of_year.length;i++){ec3.month_of_year[i]=unencode(ec3.month_of_year[i]);}for(var j=0;j<ec3.month_abbrev.length;j++){ec3.month_abbrev[j]=unencode(ec3.month_abbrev[j]);}}});function unencode(_9){if(!ec3.unencodeDiv){ec3.unencodeDiv=document.createElement("div");}ec3.unencodeDiv.innerHTML=_9;return (ec3.unencodeDiv.innerText||ec3.unencodeDiv.firstChild.nodeValue);}function get_child_by_tag_name(_a,_b){var _c=_a.getElementsByTagName(_b);if(_c){for(var i=0;i<_c.length;i++){if(_c[i].parentNode==_a){return _c[i];}}}return 0;}ec3.get_child_by_tag_name=get_child_by_tag_name;function calc_day_id(_e,_f,_10){if(ec3.today_day_num==_e&&ec3.today_month_num==_f&&ec3.today_year_num==_10){return "today";}else{return "ec3_"+_10+"_"+_f+"_"+_e;}}function create_calendar(_11,_12,_13){var _14=_14.cloneNode(1);var _15=_12-1;var _16=get_child_by_tag_name(_14,"caption");if(_16){var c=get_child_by_tag_name(_16,"a");var _18=ec3.month_of_year[_15]+" "+_13;if(c&&c.firstChild&&c.firstChild.nodeType==ec3.TEXT_NODE){c.href=ec3.home+"/?year="+_13+"&monthnum="+_12;if(ec3.catClause){c.href+=ec3.catClause;}c.title=ec3.viewpostsfor;c.title=c.title.replace(/%1\$s/,ec3.month_of_year[_15]);c.title=c.title.replace(/%2\$s/,_13);c.firstChild.data=_18;}}if(_16&&_16.firstChild&&_16.firstChild.nodeType==ec3.TEXT_NODE){_16.firstChild.data=ec3.month_of_year[_15]+" "+_13;}var _19=get_child_by_tag_name(_14,"tbody");while(_19.lastChild){_19.removeChild(_19.lastChild);}var _1a=new Date(_13,_15,1,12,0,0);var tr=document.createElement("tr");var td,div;_19.appendChild(tr);var _1d=0;var col=0;while(_1a.getMonth()==_15&&_1d<40){var day=(_1a.getDay()+7-ec3.start_of_week)%7;if(col>6){tr=document.createElement("tr");_19.appendChild(tr);col=0;}if(col<day){td=document.createElement("td");td.colSpan=day-col;td.className="pad";tr.appendChild(td);col=day;}td=document.createElement("td");td.appendChild(document.createTextNode(_1a.getDate()));td.id=calc_day_id(_1a.getDate(),_12,_13);tr.appendChild(td);col++;_1d++;_1a.setDate(_1a.getDate()+1);}if(col<7){td=document.createElement("td");td.colSpan=7-col;td.className="pad";tr.appendChild(td);}if((7-col)>1&&!ec3.hide_logo){a=document.createElement("a");a.href="http://blog.firetree.net/?ec3_version="+ec3.version;a.title="Event Calendar "+ec3.version;td.style.verticalAlign="bottom";td.appendChild(a);div=document.createElement("div");div.className="ec3_ec";div.align="right";a.appendChild(div);}_14.id="ec3_"+_13+"_"+_12;return _14;}function loadDates(_20,_21){var req=new XMLHttpRequest();if(req){ec3.reqs.push(req);req.onreadystatechange=process_xml;req.open("GET",ec3.home+"/?ec3_xml="+_21+"_"+_20,true);set_spinner(1);req.send(null);}}function get_calendars(){var div=document.getElementById("wp-calendar");var _24=new Array();for(var i=0;i<div.childNodes.length;i++){var c=div.childNodes[i];if(c.id&&c.id.search("ec3_[0-9]")==0&&c.style.display!="none"){_24.push(div.childNodes[i]);}}if(_24.length>0){return _24;}else{return 0;}}ec3.get_calendars=get_calendars;function rewrite_controls(_27,_28){var _29=document.getElementById("ec3_prev");if(_29&&_29.firstChild&&_29.firstChild.nodeType==ec3.TEXT_NODE){_29.firstChild.data="\xab\xa0"+ec3.month_abbrev[_27%12];}var _2a=document.getElementById("ec3_next");if(_2a&&_2a.firstChild&&_2a.firstChild.nodeType==ec3.TEXT_NODE){_2a.firstChild.data=ec3.month_abbrev[_28%12]+"\xa0\xbb";}}function set_spinner(on){var _2c=document.getElementById("ec3_spinner");var _2d=document.getElementById("ec3_publish");if(_2c){if(on){_2c.style.display="inline";if(_2d){_2d.style.display="none";}}else{_2c.style.display="none";if(_2d){_2d.style.display="inline";}}}}function go_prev(){var _2e=get_calendars();if(!_2e){return;}var pn=_2e[0].parentNode;var _30=_2e[0].id.split("_");if(_30.length<3){return;}var _31=parseInt(_30[1]);var _32=parseInt(_30[2])-1;if(_32==0){_32=12;_31--;}var _33=document.getElementById("ec3_"+_31+"_"+_32);if(_33){_33.style.display=ec3.calendar_display;}else{_33=create_calendar(_2e[0],_32,_31);pn.insertBefore(_33,_2e[0]);loadDates(_32,_31);}ec3.calendar_display=_2e[_2e.length-1].style.display;_2e[_2e.length-1].style.display="none";rewrite_controls(_32+10,_32+_2e.length-1);}ec3.go_prev=go_prev;function go_next(){var _34=get_calendars();if(!_34){return;}var pn=_34[0].parentNode;var _36=_34[_34.length-1];var _37=_36.id.split("_");if(_37.length<3){return;}var _38=parseInt(_37[1]);var _39=1+parseInt(_37[2]);if(_39==13){_39=1;_38++;}var _3a=document.getElementById("ec3_"+_38+"_"+_39);if(_3a){_3a.style.display=ec3.calendar_display;}else{_3a=create_calendar(_34[0],_39,_38);if(_36.nextSibling){pn.insertBefore(_3a,_36.nextSibling);}else{pn.appendChild(_3a);}loadDates(_39,_38);}ec3.calendar_display=_34[0].style.display;_34[0].style.display="none";rewrite_controls(_39-_34.length+11,_39);}ec3.go_next=go_next;function process_xml(){var _3b=0;for(var i=0;i<ec3.reqs.length;i++){var req=ec3.reqs[i];if(req){if(req.readyState==4){ec3.reqs[i]=0;if(req.status==200){update_days(req.responseXML.documentElement);}}else{_3b=1;}}}if(!_3b){while(ec3.reqs.shift&&ec3.reqs.length&&!ec3.reqs[0]){ec3.reqs.shift();}set_spinner(0);}}function update_days(_3e){var _3f=_3e.getElementsByTagName("day");if(!_3f){return;}for(var i=0;i<_3f.length;i++){var td=document.getElementById(_3f[i].getAttribute("id"));if(td&&td.firstChild&&td.firstChild.nodeType==ec3.TEXT_NODE){td.className="ec3_postday";var txt=td.removeChild(td.firstChild);var a=document.createElement("a");a.href=_3f[i].getAttribute("link");a.title=_3f[i].getAttribute("titles");if(_3f[i].getAttribute("is_event")){td.className+=" ec3_eventday";a.className="eventday";}a.appendChild(txt);td.appendChild(a);}}if(typeof ec3_Popup!="undefined"){var _44=document.getElementById(_3e.childNodes[0].getAttribute("id"));if(_44){ec3_Popup.add_tbody(get_child_by_tag_name(_44,"tbody"));}}}}ec3();ec3.today=new Date();ec3.today_day_num=ec3.today.getDate();ec3.today_month_num=1+ec3.today.getMonth();ec3.today_year_num=ec3.today.getFullYear();ec3.reqs=new Array();ec3.ELEMENT_NODE=1;ec3.TEXT_NODE=3;ec3.version="3.1.1._rc1";