function createRequestObject() { 

       var req; 
    
       if(window.XMLHttpRequest){ 
          // Firefox, Safari, Opera... 
          req = new XMLHttpRequest(); 
       } else if(window.ActiveXObject) { 
          // Internet Explorer 5+ 
          req = new ActiveXObject("Microsoft.XMLHTTP"); 
       } else { 
          // There is an error creating the object, 
          // just as an old browser is being used. 
          alert('Problem creating the XMLHttpRequest object'); 
       } 
    
       return req; 
    
    } 
    

    // Make the XMLHttpRequest object 
    var http = createRequestObject(); 
    
    function sendRequest(q,ph,b,s,e) { 
    
       // Open PHP script for requests 
//       http.open('get', 'suggest.php?q='+q); 
//       http.onreadystatechange = handleResponse; 
//       http.send(null); 
    if (http) {
        http.open("GET", '/ziumsystem/livesearch.asp?q='+q+'&pagehandler='+ph+'&brochureid='+b+'&sessionid='+s+'&environmentid='+e, true);
		http.onreadystatechange = handleResponse; 
        http.send();
    }
    } 
    
    function handleResponse() { 
    	if (typeof http != "undefined") {//can become undefined in FF
		// only if req shows "complete"
		if (http.readyState == 4) {
			// only if "OK"
			if (http.status == 200) {	
				document.getElementById("searchResults").innerHTML = http.responseText;
			} else {
				document.getElementById("searchResults").innerHTML = 'There was a problem retrieving the XML data' + http.statusText;
//				alert("There was a problem retrieving the XML data:\n" + http.statusText);
			}
		}
	}

}