function WindowOnload(f){var a=window.onload;window.onload=function(){if(a)a();f()}}function ec3(){WindowOnload(function(){var a=document.getElementById('ec3_prev');var b=document.getElementById('ec3_next');if(a&&b){var c=new RegExp('&cat=[0-9]+$');var d=c.exec(a.href);if(d){ec3.catClause=d[0]}a.href='javascript:ec3.go_prev()';b.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(a){if(!ec3.unencodeDiv){ec3.unencodeDiv=document.createElement('div')}ec3.unencodeDiv.innerHTML=a;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(a,b,c){if(ec3.today_day_num==a&&ec3.today_month_num==b&&ec3.today_year_num==c){return'today'}else{return'ec3_'+c+'_'+b+'_'+a}}function create_calendar(b,d,e){var f=b.cloneNode(1);var g=d-1;var h=get_child_by_tag_name(f,'caption');if(h){var c=get_child_by_tag_name(h,'a');var i=ec3.month_of_year[g]+' '+e;if(c&&c.firstChild&&c.firstChild.nodeType==ec3.TEXT_NODE){if(d<10){c.href=ec3.home+'/?m='+e+'0'+d}else{c.href=ec3.home+'/?m='+e+d}if(ec3.catClause){c.href+=ec3.catClause}c.title=ec3.viewpostsfor;c.title=c.title.replace(/%1\$s/,ec3.month_of_year[g]);c.title=c.title.replace(/%2\$s/,e);c.firstChild.data=i}}if(h&&h.firstChild&&h.firstChild.nodeType==ec3.TEXT_NODE){h.firstChild.data=ec3.month_of_year[g]+' '+e}var j=get_child_by_tag_name(f,'tbody');while(j.lastChild){j.removeChild(j.lastChild)}var k=new Date(e,g,1,12,00,00);var l=document.createElement('tr');var m,div;j.appendChild(l);var n=0;var o=0;while(k.getMonth()==g&&n<40){var p=(k.getDay()+7-ec3.start_of_week)%7;if(o>6){l=document.createElement('tr');j.appendChild(l);o=0}if(o<p){m=document.createElement('td');m.colSpan=p-o;m.className='pad';l.appendChild(m);o=p}m=document.createElement('td');m.appendChild(document.createTextNode(k.getDate()));m.id=calc_day_id(k.getDate(),d,e);l.appendChild(m);o++;n++;k.setDate(k.getDate()+1)}if(o<7){m=document.createElement('td');m.colSpan=7-o;m.className='pad';l.appendChild(m)}if((7-o)>1&&!ec3.hide_logo){a=document.createElement('a');a.href='http://blog.firetree.net/?ec3_version='+ec3.version;a.title='Event Calendar '+ec3.version;m.style.verticalAlign='bottom';m.appendChild(a);div=document.createElement('div');div.className='ec3_ec';div.align='right';a.appendChild(div)}f.id='ec3_'+e+'_'+d;return f}function loadDates(a,b){var c=new XMLHttpRequest();if(c){ec3.reqs.push(c);c.onreadystatechange=process_xml;c.open("GET",ec3.home+'/?ec3_xml='+b+'_'+a,true);set_spinner(1);c.send(null)}}function get_calendars(){var a=document.getElementById('wp-calendar');var b=new Array();for(var i=0;i<a.childNodes.length;i++){var c=a.childNodes[i];if(c.id&&c.id.search('ec3_[0-9]')==0&&c.style.display!='none')b.push(a.childNodes[i])}if(b.length>0)return b;else return 0}ec3.get_calendars=get_calendars;function rewrite_controls(a,b){var c=document.getElementById('ec3_prev');if(c&&c.firstChild&&c.firstChild.nodeType==ec3.TEXT_NODE)c.firstChild.data='\u00ab\u00a0'+ec3.month_abbrev[a%12];var d=document.getElementById('ec3_next');if(d&&d.firstChild&&d.firstChild.nodeType==ec3.TEXT_NODE)d.firstChild.data=ec3.month_abbrev[b%12]+'\u00a0\u00bb'}function set_spinner(a){var b=document.getElementById('ec3_spinner');var c=document.getElementById('ec3_publish');if(b){if(a){b.style.display='inline';if(c)c.style.display='none'}else{b.style.display='none';if(c)c.style.display='inline'}}}function go_prev(){var a=get_calendars();if(!a)return;var b=a[0].parentNode;var c=a[0].id.split('_');if(c.length<3)return;var d=parseInt(c[1]);var e=parseInt(c[2])-1;if(e==0){e=12;d--}var f=document.getElementById('ec3_'+d+'_'+e);if(f){f.style.display=ec3.calendar_display}else{f=create_calendar(a[0],e,d);b.insertBefore(f,a[0]);loadDates(e,d)}ec3.calendar_display=a[a.length-1].style.display;a[a.length-1].style.display='none';rewrite_controls(e+10,e+a.length-1)}ec3.go_prev=go_prev;function go_next(){var a=get_calendars();if(!a)return;var b=a[0].parentNode;var c=a[a.length-1];var d=c.id.split('_');if(d.length<3)return;var e=parseInt(d[1]);var f=1+parseInt(d[2]);if(f==13){f=1;e++}var g=document.getElementById('ec3_'+e+'_'+f);if(g){g.style.display=ec3.calendar_display}else{g=create_calendar(a[0],f,e);if(c.nextSibling)b.insertBefore(g,c.nextSibling);else b.appendChild(g);loadDates(f,e)}ec3.calendar_display=a[0].style.display;a[0].style.display='none';rewrite_controls(f-a.length+11,f)}ec3.go_next=go_next;function process_xml(){var a=0;for(var i=0;i<ec3.reqs.length;i++){var b=ec3.reqs[i];if(b){if(b.readyState==4){ec3.reqs[i]=0;if(b.status==200)update_days(b.responseXML.documentElement)}else a=1}}if(!a){while(ec3.reqs.shift&&ec3.reqs.length&&!ec3.reqs[0])ec3.reqs.shift();set_spinner(0)}}function update_days(b){var c=b.getElementsByTagName('day');if(!c)return;for(var i=0;i<c.length;i++){var d=document.getElementById(c[i].getAttribute('id'));if(d&&d.firstChild&&d.firstChild.nodeType==ec3.TEXT_NODE){d.className='ec3_postday';var e=d.removeChild(d.firstChild);var a=document.createElement('a');a.href=c[i].getAttribute('link');a.title=c[i].getAttribute('titles');if(c[i].getAttribute('is_event')){d.className+=' ec3_eventday';a.className='eventday'}a.appendChild(e);d.appendChild(a)}}if(typeof ec3_Popup!='undefined'){var f=document.getElementById(b.childNodes[0].getAttribute('id'));if(f)ec3_Popup.add_tbody(get_child_by_tag_name(f,'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.4';