function GetXmlHttpRequest() {
	var xmlHttp = null;
	// Mozilla, Opera, Safari sowie Internet Explorer (ab v7)
	if (typeof XMLHttpRequest != 'undefined') {
	    xmlHttp = new XMLHttpRequest();
	}
	if (!xmlHttp) {
	    // Internet Explorer 6 und älter
	    try {
	        xmlHttp  = new ActiveXObject("Msxml2.XMLHTTP");
	    } catch(e) {
	        try {
	            xmlHttp  = new ActiveXObject("Microsoft.XMLHTTP");
	        } catch(e) {
	            xmlHttp  = null;
	        }
	    }
	}
	return xmlHttp;
}
function SelectMonth(baseUrl, year, month, day, mandantId, targetUrl) {
	var xmlHttp=GetXmlHttpRequest();

	if (xmlHttp) {
		if (mandantId!=null) {
			baseUrl+='?mandantId=' + mandantId + '&';
		}
		else {
			baseUrl+='?';
		}
	
	    xmlHttp.open('GET', baseUrl + 'year=' + year + '&month=' + month + '&day=' + day + '&isAjax=true&targetUrl=' + targetUrl, true);
	    xmlHttp.onreadystatechange = function () {
	    	//alert('test');
	        if (xmlHttp.readyState == 4) {
	        	//alert('response: ' + xmlHttp.responseText);
	            document.getElementById('divCalendar').innerHTML=xmlHttp.responseText;
	        }
	    };
	    xmlHttp.send(null);
	    
	    return true;
	}
	else {
		return false;
	}
}

