 var http_request = false;
	   function makeRequest(url, parameters) {
	      http_request = false;
	      if (window.XMLHttpRequest) { // Mozilla, Safari,...
		 http_request = new XMLHttpRequest();
		 if (http_request.overrideMimeType) {
			// set type accordingly to anticipated content type
		    http_request.overrideMimeType('text/html');
		 }
	      } 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 = processResponse;
	     /* http_request.open('GET', url + parameters, true);
	      http_request.send(null);*/
	      http_request.open('POST', url, true);
	      http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	      http_request.setRequestHeader("Content-length", parameters.length);
	      http_request.setRequestHeader("Connection", "close");
	      http_request.send(parameters);
	   }

	   function processResponse() {
	      if (http_request.readyState == 4) {
		 if (http_request.status == 200) {
		    result = http_request.responseText;
		    //alert(result);
		    document.getElementById('easyAjaxResponse').innerHTML = result;    
			document.getElementById('easyAjaxForm').style.display = "none";
			document.getElementById('easyAjaxResponse').style.display = "block";
		 } else {
		    alert('There was a problem with the request.');
		 }
	      }
	   }
	   
	   function easyAjaxEnquiry(obj) {
		var getstr = "";
		// Loop through all the input objects within this form
		var arInputs = obj.getElementsByTagName("input");
		for (i=0; i< arInputs.length; i++) {
	      
			if (arInputs[i].type == "text" || arInputs[i].type == "hidden") {
			   getstr += arInputs[i].name + "=" + 
				   escape(arInputs[i].value) + "&";
			}
			if (arInputs[i].type == "checkbox") {
			   if (arInputs[i].checked) {
			      getstr += arInputs[i].name + "=" + 
				   arInputs[i].value + "&";
			   } else {
			      getstr += arInputs[i].name + "=&";
			   }
			}
			if (arInputs[i].type == "radio") {
			   if (arInputs[i].checked) {
			      getstr += arInputs[i].name + "=" + 
				   arInputs[i].value + "&";
			   }
			}  
			
		  }
		// Loop through all the selects
		var arInputs = obj.getElementsByTagName("select");
		for (i=0; i< arInputs.length; i++) {
			getstr+= arInputs[i].name + "=" + arInputs[i].options[arInputs[i].selectedIndex].value + "&";
		}
		  // Loop through all the textareas
		  var arInputs = obj.getElementsByTagName("textarea");
		for (i=0; i< arInputs.length; i++) {
			getstr+= arInputs[i].name + "=" + escape(arInputs[i].value) + "&";
		}
		makeRequest(obj.action, getstr);
		
	   }
	   
	   function easyAjaxShowForm(resetForm) {
			if(resetForm) {
				document.getElementById('easyAjaxForm').reset();
			}
			document.getElementById('easyAjaxResponse').style.display = "none";
			document.getElementById('easyAjaxForm').style.display = "block";
			
			return false;
	}