function getData(whatPHP, whatID) {	// This calls the php file specified by "whatPHP" and inserts the returned value in the HTML tag specified by "whatID" 
	var info;
	var answer;
	if (window.XMLHttpRequest) {
		info = new XMLHttpRequest();
	} else if (window.ActiveXObject) {
		info = new ActiveXObject("Microsoft.XMLHTTP");
	}
	info.onreadystatechange = function() {
		if ( info.readyState == 4 ) {
			whatID.innerHTML = info.responseText;
		}
	}
	info.open("GET", whatPHP, true);
	info.send(null);
} 

function postData(whatPHP, whatID, whatCode) {	// This calls the php file specified by "whatPHP", passing it the data contained in "whatCode" and inserts the returned value in the HTML tag specified by "whatID"
	var info;
	var answer;
	if (window.XMLHttpRequest) {
		info = new XMLHttpRequest();
	} else if (window.ActiveXObject) {
		info = new ActiveXObject("Microsoft.XMLHTTP");
	}
	info.onreadystatechange = function() {
		if ( info.readyState == 4 ) {
			whatID.innerHTML = info.responseText;
		}
	}
	info.open("POST", whatPHP, true);
	info.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	info.send(whatCode);
}
