// Ajax

function setGM(uid, pos, typoPath) {
	http.open('GET', 'fileadmin/scripts/rpc.php?func=setGM&uid='+uid+'&pos='+pos+'&typopath='+typoPath, true);
    http.onreadystatechange = cbAlert;
    http.send(null);
}

function cbAlert() {
	if (http.readyState == 4) {
		var response = http.responseText;
		//alert(response);
	}
}
function createRequestObject() {
    var ro;
	if (window.XMLHttpRequest) { // Mozilla, Safari,...
		ro = new XMLHttpRequest();
		
	} else if (window.ActiveXObject) { // IE
    	try {
			ro = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				ro = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) {}
		}
	}

	if (!ro) {
		alert('Ende :( Kann keine XMLHTTP-Instanz erzeugen');
		return false;
	}
    return ro;
}

var http = createRequestObject();




