function sendSimpleData(data, onProcessing, onReceive) {
	var xmlHttp;
	
	try {
		// Firefox, Opera 8.0+, Safari
		xmlHttp = new XMLHttpRequest();
    }
  
	catch (e) {
		// Internet Explorer
		try {
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		
		catch (e) {
			try {
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			
			catch (e) {
				alert("Your browser does not support AJAX.");
				return false;
			}
		}
    }
	
	xmlHttp.onreadystatechange=function() {
		if (xmlHttp.readyState == 2) {
			if (onProcessing != 'undefined' && onProcessing != null) onProcessing();
		}
		
		if(xmlHttp.readyState == 4) {
			if (onReceive != 'undefined' && onReceive != null) processAjaxData(xmlHttp.responseText, onReceive);
		}
	}
	

	xmlHttp.open("POST", "scripts/callscript.php", true);
	xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	xmlHttp.setRequestHeader('Connection', 'close');
    xmlHttp.send(data);
}

function sendSimpleDataRemote(server, data, onProcessing, onReceive) {
	var xmlHttp;
	
	try {
		// Firefox, Opera 8.0+, Safari
		xmlHttp = new XMLHttpRequest();
    }
  
	catch (e) {
		// Internet Explorer
		try {
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		
		catch (e) {
			try {
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			
			catch (e) {
				alert("Your browser does not support AJAX.");
				return false;
			}
		}
    }
	
	xmlHttp.onreadystatechange=function() {
		if (xmlHttp.readyState == 2) {
			if (onProcessing != 'undefined' && onProcessing != null) onProcessing();
		}
		
		if(xmlHttp.readyState == 4) {
			if (onReceive != 'undefined' && onReceive != null) processAjaxData(xmlHttp.responseText, onReceive);
		}
	}
	

	xmlHttp.open("POST", server + "/scripts/callscript.php", true);
	xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	xmlHttp.setRequestHeader('Connection', 'close');
    xmlHttp.send(data);
}

function processAjaxData(answer, targetFunction) {
	var data = answer.split(";");
	
	var comm = "";
	for (var x = 1; x < data.length; x++) {
		comm += data[x];
		if (x < data.length - 1) comm += ";";
	}
	
	targetFunction(data[0], comm);
}