
  var http = createRequestObject();
  var site=window.location.href.substring(0,window.location.href.indexOf("/",8)); //site url address
  var interval_on=false;

function createRequestObject(){
 try{
  var request; //declare the variable to hold the object.
  var browser = navigator.appName; //find the browser name

  if(browser == "Microsoft Internet Explorer"){
    /* Create the object using MSIE's method */
    request = new ActiveXObject("Microsoft.XMLHTTP");
  }
   else{
    /* Create the object using other browser's method */
    request = new XMLHttpRequest();
  }
  return request; //return the object
}
 catch(error){alert('createRequestObject error')}
}

function getCalendarMonth(targetlink){
  try{
  http.open('get',targetlink);
  http.onreadystatechange = handleCalendarMonth; 
  http.send(null);
  }
 catch(error){alert('getCalendarMonth error')}
}

function handleCalendarMonth(){
  try{
  if(http.readyState == 4){ //Finished loading the response
    var response = http.responseText;
    document.getElementById("ajax_calendar").innerHTML = response;
  }
  }
 catch(error){alert('handleAlbums error')}
}
