// JavaScript Document
/*
	This works for calls to .php or .xml  files
*/
function doPost( fileName, params, method) {
	xmlHttp = returnXmlHttp();

	if (xmlHttp == null)  {
		alert ("Browser does not support HTTP Request");
		return;
	}
	
	xmlHttp.open("POST", fileName, true);

	//Send the proper header information along with the request
	xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttp.onreadystatechange = method;
	xmlHttp.send(params);
}

/*
	Description:
*/
function returnXmlHttp() {
	//Setup the xmlHttp variable for the appropriate browser
	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;
			}
		}
	}
	return xmlHttp;
}