	// gets the fields from a form and returns the data in 
	// value pairs
	function getRequestBody( oForm )
	{
		
		var sParams = new Array();	// holds an array of value pairs
		
		// for each field in the form, minus the submit button
		for ( var i = 0; i < oForm.elements.length; i++ )
		{
			
			var sParam = oForm.elements[ i ].name;	// the name of the field
			sParam += "=";							// separated by a '='
			sParam += encodeURIComponent(oForm.elements[ i ].value);	// the value of the field
			sParams.push( sParam );					// add it to the array
			
		}
		
		// combine the fields into a string ended with a null character
		var result = sParams.join( "&" ) + "\0";
		
		// return the formatted fields
		return result;
		
	} // end getRequestBody function

	
	// creates a XMLHttpRequest object
	function createXMLHttp()
	{
		// if this is Mozilla, etc...
		if ( typeof XMLHttpRequest != "undefined" )
		{
			// create object
			http_request = new XMLHttpRequest();
			return http_request;
		}
		else if ( window.ActiveXObject ) // Microsoft
		{
			// list of Microsoft versions of object
			var aVersions = [ "MSXML2.XMLHttp.5.0", "MSXML2.XMLHttp.4.0",
				"MSXML2.XMLHttp.3.0", "MSXML2.XMLHttp", "Microsoft.XMLHttp" ];
			
			// for each version of the object
			for ( var i = 0; i < aVersions.length; i++ )
			{
				
				try // to create the object
				{
					var oXmlHttp = new ActiveXObject( aVersions[ i ] );
					return oXmlHttp;
				}
				catch ( oError )
				{
					// the browser doesn't support this version
				}
			}
		}
		
		// the browser doesn't support any version
		throw new Error( "XMLHttp object could be created" );
		
	} // end createXMLHttp function