function process_get(url, posturl, inputname)
{
	var http_req = false;

	// verify that they have entered in some text
	if (document.getElementById(inputname).value == '')
	{
		// display a message
		alert('You forgot to fill out one of the required fields.');
		return false;
	}

	// check if XMLHttpRequest is available
	if (window.XMLHttpRequest)
	{
		// create the http_req
		http_req = new XMLHttpRequest();
		if (http_req.overrideMimeType)
		{
			// override the mime type
			http_req.overrideMimeType('text/xml');
		}
	}
	else if (window.ActiveXObject)
	{
		// use try to catch errors (if any)
		try
		{
			// create the http_req
			http_req = new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch (e) { }
	}

	// check if it created the http_req
	if (!http_req)
	{
		// display error message
		alert('Failed to create the XML request object.');
		return false;
	}

	// setup the onreadystatechange function
	document.getElementById('genButton').disabled = true;
	posturl = posturl + '&' + inputname + '=' + document.getElementById(inputname).value;
	http_req.onreadystatechange = function() { alertContents(http_req); };
	http_req.open('POST', url, true);
	http_req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	http_req.send(posturl + '&ajax=1');
}

function alertContents(http_req)
{
	// check if it's ready yet
	if (http_req.readyState == 4)
	{
		// check if the status is ok
		if (http_req.status == 200)
		{
			// update the innerHTML for the object
			document.getElementById('genText').innerHTML = http_req.responseText;
			document.getElementById('genButton').disabled = false;
		}
	}
}
