function getXMLHTTPRequest() {
try {
req = new XMLHTTPRequest();
} catch(err1) {
   try {
   req = new ActiveXObject("Msxml2.XMLHTTP");
   } catch(err2) {
      try {
      req = new ActiveXObject("Microsoft.XMLHTTP");
      } catch(err3) {
         req = false;
      }
   }
}
return req;
}

var http = getXMLHTTPRequest();

function getCalendar(myurl) {
// random number added to URL to avoid cache problems
var modurl = myurl;
http.open("GET", modurl, true);
// set up the callback function
http.onreadystatechange = useHttpResponse;
http.send(null);
}

function useHttpResponse(type) {
if(http.readyState == 4) {
if(http.status == 200) {
var calValue = http.responseText;
document.getElementById('calDiv').innerHTML = calValue;
document.getElementById('calLoad').innerHTML = '&nbsp;';
}
}else{
document.getElementById('calLoad').innerHTML = '<img src="http://www.tacomaupc.org/scripts/calendar/images/loading.gif" style="width:19px; height:19px;">';
}
}