function loadContent(url,ele)
{  
	var xmlHttp;
  try
  {   
		xmlHttp=new XMLHttpRequest();
	}
  catch (e)
  {       
		try
    {     
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");      
		}
    catch (e)
    {      
			try
      {        
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");        
			}
      catch (e)
      {        
				alert("Your browser does not support AJAX!");        
				return false;        
			}      
		}    
	}

  xmlHttp.onreadystatechange=function()
  {
  	if(xmlHttp.readyState==4)
    {
		if(xmlHttp.status==200){
			document.getElementById(ele).innerHTML=xmlHttp.responseText;
		} else {
			document.getElementById(ele).innerHTML='Error'+xmlHttp.status;
		}
    } else {

		document.getElementById(ele).innerHTML='<img src="../img/ajax-loader.gif" style="width:16px;height:16px;"/> Loading...';
	}
  }
	
	xmlHttp.open("GET",url+"&ticket="+Math.random()*10,true);
	xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8'); 
	xmlHttp.send(null);  
}

function loadCalendar(year,month){
	loadContent("Calendar.action?year="+year+"&month="+month,"calendar_div");
}


function prevCalendar(year,month){
	month-=1;
	if(month<1){
		month=12;
		year=year-1;
	}
	loadContent("Calendar.action?year="+year+"&month="+month,"calendar_div");
}


function nextCalendar(year,month){
	month+=1;
	if(month>12){
		month=1;
		year=year+1;
	}
	loadContent("Calendar.action?year="+year+"&month="+month,"calendar_div");
}