
   var toolbox_ajax_httpRequest = false;

   function toolbox_ajax_makePOSTRequest(url, parameters, handler, async)
   {

      if(window.XMLHttpRequest)
      {
      	 // Mozilla, Safari,...
         toolbox_ajax_httpRequest = new XMLHttpRequest();
         if(toolbox_ajax_httpRequest.overrideMimeType)
         {
         	// set type accordingly to anticipated content type
            // toolbox_ajax_httpRequest.overrideMimeType('text/xml');
            toolbox_ajax_httpRequest.overrideMimeType('text/html');

	      }
	      else if(window.ActiveXObject)
	      {
	      // IE
				var e;
				var i;

			    try
				{
					toolbox_ajax_httpRequest = new XMLHttpRequest();
				}
				catch(e)
				{

					XmlHttpVersions = new Array('MSXML2.XMLHTTP.7.0',
												'MSXML2.XMLHTTP.6.0',
												'MSXML2.XMLHTTP.5.0',
												'MSXML2.XMLHTTP.4.0',
												'MSXML2.XMLHTTP.3.0',
												'MSXML2.XMLHTTP',
												'Microsoft.XMLHTTP');

					for(i = 0; i < XmlHttpVersions.length && !request; i++)
					{
						try
						{
							toolbox_ajax_httpRequest = new ActiveXObject(XmlHttpVersions[i]);
						}
						catch(e) { }
					}
				}
			}
      	}

		if(!toolbox_ajax_httpRequest)
		{
		 alert('Cannot create XMLHTTP instance');
		 return false;
		}

		toolbox_ajax_httpRequest.onreadystatechange = handler;
		toolbox_ajax_httpRequest.open('POST', url, async);
		toolbox_ajax_httpRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		toolbox_ajax_httpRequest.setRequestHeader("Content-length", parameters.length);
		toolbox_ajax_httpRequest.setRequestHeader("Connection", "close");
		toolbox_ajax_httpRequest.send(parameters);
	}

