if(document.all&&!document.getElementById){document.getElementById=function(id){return document.all[id];}}
function ajax_do(action,j_id){if(action=='search'||action=='view_events'||action=='sitemap'){var loader=document.getElementById('search_loader');loader.innerHTML='<input class="sub_load" type="submit" onclick="javascript:alert(\'Please wait, your search will be finished shortly.  If you continue having trouble, please try and refresh your browser.\');" value="" />';var wrap=document.getElementById('twocol_container');if(j_id==''||j_id==null){var j_id=document.getElementById('input_search').value;}}
else{var loader=document.getElementById('cal_loader');loader.innerHTML='<img alt="Loading" src="/img/loader.gif" />';var wrap=document.getElementById('calendar');}
var call='action='+encodeURIComponent(action)+'&j_id='+encodeURIComponent(j_id);var postReq=new XHR();postReq.connect(url,"POST",call,showContent);function showContent(XML){if(XML.responseText!=''&&wrap.value!=XML.responseText){wrap.innerHTML=XML.responseText;tb_init('a.thickbox, input.thickbox');}
else{wrap.innerHTML="There was a issue loading this content.  Please refresh the page and try again.";}
loader.innerHTML='<input class="sub" type="submit" onclick="javascript:ajax_do(\'search\');" value="" />';evenCols();}}
if(document.layers)
document.captureEvents(Event.KEYDOWN);document.onkeydown=function(evt){var keyCode=evt?(evt.which?evt.which:evt.keyCode):event.keyCode;var search_box=document.getElementById('input_search');if(keyCode==13&&search_box.hasfocus=='yes'){ajax_do('search');}}
function XHR(){var xmlhttp,fStat=false;try{xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e){try{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}
catch(e){try{xmlhttp=new XMLHttpRequest();}
catch(e){xmlhttp=false;}}}
if(!xmlhttp){return null;}
this.connect=function(sURL,fType,sVars,fnDone){if(!xmlhttp)return false;fStat=false;fType=fType.toUpperCase();try{xmlhttp.open(fType,sURL,true);xmlhttp.setRequestHeader("Method","POST "+sURL+" HTTP/1.1");xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4&&!fStat){fStat=true;fnDone(xmlhttp);}};xmlhttp.send(sVars);}
catch(x){alert(x);return false;}
return true;};return this;}