var HTML_WAITING = "calendarWaiting";

function xhr_getMonth(pDate,pAjaxFile,pHtmlElement,pNext){

	targetHTML = new Array(pHtmlElement);

	XHR_waiting(HTML_WAITING);

	data = "date=" + pDate + "&next=" + pNext;
	XHR_Request(pAjaxFile,data,"GET",xhr_setCalendar,targetHTML);	

}

function xhr_getPreviousMonth(pDate,pAjaxFile,pHtmlElement){

	xhr_getMonth(pDate,pAjaxFile,pHtmlElement,0);

}

function xhr_getNextMonth(pDate,pAjaxFile,pHtmlElement){

	xhr_getMonth(pDate,pAjaxFile,pHtmlElement,1);

}

function xhr_setCalendar(pXhrObject,pTargetHTML){

	document.getElementById(pTargetHTML[0]).innerHTML = pXhrObject.responseText;

	XHR_closeWaiting(HTML_WAITING);

}