<!--

// XMLHTTPRequest Enable
function createObject() {
	var request_type;
	var browser = navigator.appName;

	if(browser == "Microsoft Internet Explorer") { request_type = new ActiveXObject("Microsoft.XMLHTTP"); }
	else { request_type = new XMLHttpRequest(); }

	return request_type;
}
var http = createObject();

// SEARCH
function autosuggest() {
	q = document.getElementById('searchw').value;

	nocache = Math.random(); //set the random number to add to URL request

	http.open('get', '../inc/ajax/search.asp?q=' + q + '&nocache=' + nocache);
	http.onreadystatechange = autosuggestReply;
	http.send(null);
}
function autosuggestReply() {
	if(http.readyState == 4) {
		var response = http.responseText;

		e = document.getElementById('results');
		if(response != "") {
			e.innerHTML = response;
			e.style.display = "block";
			e.style.visibility = "visible";
		} else {
			e.style.display = "none";
		}
	}
}

//-->