function init_onup() {

   var ajaxRequest;  // The variable that makes Ajax possible!
	
	try {
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} 
	
	catch (e) {
		// Internet Explorer Browsers
		try {
		
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} 
		
		catch (e)  {
		
			try {
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} 
			
			catch (e) {
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	
	return ajaxRequest;
}

function getCalendar(action,id) {

	var ajaxRequest;
	ajaxRequest=init_onup();
	resTextFlag = 0;
	ajaxRequest.onreadystatechange = function(){
	
		if(ajaxRequest.readyState == 4) {
	
			resText=ajaxRequest.responseText;
			//alert(resText);
			
			
			document.getElementById("calender").innerHTML=resText;
				
				
			
		} else {
		
				//document.getElementById("calender").innerHTML = "<font color=red>Loading Calendar...</font>";
		}
		
	} //call back function
		
	
		
		//alert(param);
		
		//alert(id);
		ajaxRequest.open("GET", "/other/calender2.php?action="+action+"&monthn1="+id, true);
		ajaxRequest.send(null);

}
