Can someone please tell me how I would modify the following function to get it to check if a url variable is present and if so to add it into the string variable for the url.

Code:
function ajaxFunction(pagenum){
	var ajaxRequest;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var ajaxDisplay = document.getElementById('ajaxDiv');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
	}
	var drop_1 = document.getElementById('drop_1').value;
	var model = document.getElementById('model').value;
	var mileage = document.getElementById('mileage').value;
	var colour = document.getElementById('colour').value;
	var age = document.getElementById('age').value;
	var min_price = document.getElementById('min_price').value;
	var max_price = document.getElementById('max_price').value;
	var min_engine_size = document.getElementById('min_engine_size').value;
	var max_engine_size = document.getElementById('max_engine_size').value;
	//var pics = document.getElementById('pics').value;
	if (document.getElementById("pics").checked==true) {
		var photos = "Yes";
	}
	else {
		var photos = "No";
	}
	var keywords = document.getElementById('keywords').value;
	var queryString = "?drop_1=" + drop_1 + "&model=" + model + "&mileage=" + mileage + "&colour=" + colour + "&age=" + age + "&min_price=" + min_price + "&max_price=" + max_price + "&min_engine_size=" + min_engine_size + "&max_engine_size=" + max_engine_size + "&photos=" + photos + "&keywords=" + keywords + "&page=" + pagenum;
	ajaxRequest.open("GET", "filtered.php" + queryString, true);
	ajaxRequest.send(null); 
}
If my url is index.php?make=Apolo then I need to get this added into the var queryString part of the function so that the ajax returns the correct values.


any help would be greatly appreciated.

Thanks in advance.