	function makeRequest(pageName,extraParms,location)
	{
		var http_request = false;
		var url = pageName;

		if (window.XMLHttpRequest)
		{ 					// Mozilla, Safari,...
			http_request = new XMLHttpRequest();

			if (http_request.overrideMimeType)
			{
					http_request.overrideMimeType('text/xml');
			}
		}
		else if (window.ActiveXObject)
		{ 					// IE

			try
			{
				http_request = new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (e)
			{
				try
				{
					http_request = new ActiveXObject("Microsoft.XMLHTTP");
				}
				catch (e)
				{
				}
			}
		}

		if (!http_request)
		{
			alert('Cannot create XMLHTTP instance');
			return false;
		}

		http_request.onreadystatechange = function()
													{alertContents(http_request, location)}

		http_request.open('POST', url, true);
		http_request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');

		// alert(extraParms);

		http_request.send(extraParms);
	}

	function alertContents(http_request,id)
	{
		// alert("state=" + http_request.readyState + "\nstatus=" + http_request.status + "\nid=" + id);

		if (http_request.readyState == 4)
		{

			// alert(http_request.status);

			if (http_request.status == 200)
			{
				// alert(id);

				el = document.getElementById(id);

				if (id == "errorDiv")
				{
					// store the response text in a temporary variable
					var tempString = http_request.responseText;

					var str = tempString;

					alert(str + " " + str.indexOf("<span></span>"));

					// look to see if the "<span></span>" declared in the the function is the same
					// if there is something between the span tags then it means there was an 
					// additional error that needs to be outputted...
					var pos = str.indexOf("<span></span>");

					// ...so we will tag the instructional error message to end.
					if (pos<=0)
					{
						tempString += "<span class=\"instructions\">There was a problem with the request. Please try again and if the problem persists send an email to: cresswga@gmail.com</span><br clear=\"all\">";
					}

					el.innerHTML = tempString;
				}
				else
				{
					// alert(http_request.responseText)
					el.innerHTML = http_request.responseText;
				}


				// alert(id);
				// alert(http_request.responseText);
				// document.getElementById(id).class = "gameButtonPressed";
			}
			else
			{
				el = document.getElementById("errorDiv");
				el.innerHTML = '<span>There was a problem with the request. Please try again and if the problem persists send an email to: cresswga@gmail.com</span>';

				// alert('There was a problem with the request.\n\nPlease try again and if the problem persists \nsend an email to: cresswga@gmail.com');
			}
		}
	}


