/**
 *	gibt das XMLHttpRequest-Object zurueck
 */
function getReq() {
	var req;
	/*@cc_on 
	@if (@_jscript_version >= 5)
	try {
		req = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try {
			req = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (E) {
			req = false;
		}
	} 
	@else 
	req = false;
	@end @*/ 
	if (!req && typeof XMLHttpRequest != 'undefined') { 
		try {
			req = new XMLHttpRequest();
		} catch (e) {
			req = false;
		}
	} 
	return req;
}


/**
 *	Gibt bei erfolgreicher Anfrage die Antwort,
 *	ansonsten false zurueck. 
 *	Parameter (bool): 1 = als XML, 0 = als Text
 */
function getResponse(asXML) {
	if (req.readyState == 4) { // Anfrage beendet
		if(req.status == 200) { // Anfrage erfolgreich
			return (asXML) ? req.responseXML : req.responseText;
		} else {
			return false;
		}
	}
}
