var nextID = null; 
	function kH(e) {
		var code;

		if (!e) var e = window.event
		if (e.keyCode) code = e.keyCode;
		else if (e.which) code = e.which;

	if( code == 27 ) {
		return false;
	} else {
		return true;
	}
}
var xmlHttp;
function createXMLHttpRequest() {
	if ( window.ActiveXObject ) {
		xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	} else if ( window.XMLHttpRequest ) {
		xmlHttp = new XMLHttpRequest();
	}
}
function ajax_zoekmerk_dropdown() {
	var me_brand = document.zoekblok.merk.value;
	createXMLHttpRequest();
	xmlHttp.onreadystatechange = outputMerkDropdown;
	xmlHttp.open("GET","/Ajax/ajax_findmerk_dropdown.lasso?me_brand=" + me_brand, true);
	xmlHttp.send(null);
}
function ajax_zoekmerk_dropdown_home() {
    document.body.style.cursor = "wait";
	var me_brand = document.zoekblok2.merk.value;
	createXMLHttpRequest();
	xmlHttp.onreadystatechange = outputMerkDropdownHome;
	xmlHttp.open("GET","/Ajax/ajax_findmerk_dropdown_home.lasso?me_brand=" + me_brand, true);
	xmlHttp.send(null);
}
function ajax_zoekmerk_dropdown_home2New() {

    document.body.style.cursor = "wait";
	var me_brand = document.zoekblok3.merk.value;
	createXMLHttpRequest();
	xmlHttp.onreadystatechange = outputMerkDropdownHome2;
	xmlHttp.open("GET","/Ajax/ajax_findmerk_dropdown_home2New.lasso?me_brand=" + me_brand, true);
	xmlHttp.send(null);
}
function ajax_zoekmerk_dropdown_home3() {
    document.body.style.cursor = "wait";
	var me_brand = document.zoekblok3.typenummer.value;
	createXMLHttpRequest();
	xmlHttp.onreadystatechange = outputMerkDropdownHome3;
	xmlHttp.open("GET","/Ajax/ajax_findmerk_dropdown_home3.lasso?me_brand=" + me_brand, true);
	xmlHttp.send(null);
}
function ajax_zoekmerk_dropdown_home3New() {
    document.body.style.cursor = "wait";
	var me_brand = document.zoekblok3.typenummer.value;
	createXMLHttpRequest();
	xmlHttp.onreadystatechange = outputMerkDropdownHome3;
	xmlHttp.open("GET","/Ajax/ajax_findmerk_dropdown_home3New.lasso?me_brand=" + me_brand, true);
	xmlHttp.send(null);
}
function ajax_zoekmerk_dropdown_2(type) {
	var me_brand = document.zoekblok.merk.value;
	createXMLHttpRequest();
	xmlHttp.onreadystatechange = outputMerkDropdown;
	xmlHttp.open("GET","/Ajax/ajax_findmerk_dropdown.lasso?me_brand=" + me_brand + "&type=" + type, true);
	xmlHttp.send(null);
}
function outputMerkDropdown() {
	if ( xmlHttp.readyState == 4 ) {
		if ( xmlHttp.status == 200 ) {
			document.getElementById("type_dropdown").innerHTML = xmlHttp.responseText;
            document.body.style.cursor = "default";
		}
	}
}
function outputMerkDropdownHome() {
	if ( xmlHttp.readyState == 4 ) {
		if ( xmlHttp.status == 200 ) {
			document.getElementById("type_dropdown2").innerHTML = xmlHttp.responseText;
            document.body.style.cursor = "default";
		}
	}
}
function outputMerkDropdownHome2() {
	if ( xmlHttp.readyState == 4 ) {
		if ( xmlHttp.status == 200 ) {
			document.getElementById("type_dropdown3").innerHTML = xmlHttp.responseText;
            document.body.style.cursor = "default";
		}
	}
}
function outputMerkDropdownHome3() {
	if ( xmlHttp.readyState == 4 ) {
		if ( xmlHttp.status == 200 ) {
			document.getElementById("type_result3").innerHTML = xmlHttp.responseText;
            document.body.style.cursor = "default";
		}
	}
}
function ajax_zoekTrefwoord_dropdown() {
	var me_keyword = document.zoekblok.keywords.value;
	var lengte = me_keyword.length;
	if (lengte < 2) {
		return true;
	}
	createXMLHttpRequest();
	xmlHttp.onreadystatechange = outputKeywordDropdown;
	xmlHttp.open("GET","/Ajax/ajax_findKeyword.lasso?me_keyword=" + me_keyword, true);
	xmlHttp.send(null);
	return true;
}
function ajax_zoekTrefwoord_dropdownTest() {
	var me_keyword = document.zoekblok.keywords.value;
	var lengte = me_keyword.length;
	if (lengte < 2) {
		return true;
	}
	createXMLHttpRequest();
	xmlHttp.onreadystatechange = outputKeywordDropdown;
	xmlHttp.open("GET","/Ajax/ajax_findKeywordTest.lasso?me_keyword=" + me_keyword, true);
	xmlHttp.send(null);
	return true;
}
function outputKeywordDropdown() {
	if ( xmlHttp.readyState == 4 ) {
		if ( xmlHttp.status == 200 ) {
			document.getElementById("keyword_dropdown").innerHTML = xmlHttp.responseText;
		}
	}
}
function ajax_zoekmerk_dropdown_large(nbrOfPixels) {
	var me_brand = document.zoekblok.merk.value;
	createXMLHttpRequest();
	xmlHttp.onreadystatechange = outputMerkDropdown;
	xmlHttp.open("GET","/Ajax/ajax_findmerk_dropdown_large.lasso?me_brand=" + me_brand + "&me_px=" + nbrOfPixels, true);
	xmlHttp.send(null);
}
function ajax_zoekmerk_noDD(txt) {
	var me_brand = txt;
	createXMLHttpRequest();
	xmlHttp.onreadystatechange = outputMerkDropdown_noDD;
	xmlHttp.open("GET","/ajax/ajax_findmerk_noDD.lasso?me_brand=" + me_brand, true);
	xmlHttp.send(null);
}
function outputMerkDropdown_noDD() {
	if ( xmlHttp.readyState == 4 ) {
		if ( xmlHttp.status == 200 ) {
			document.getElementById("merk_dropdown").innerHTML = xmlHttp.responseText;
		}
	}
}
function ajax_zoektype_noDD(merk, type) {
	var me_brand = merk;
	var me_type = type;
	createXMLHttpRequest();
	xmlHttp.onreadystatechange = outputTypeDropdown_noDD;
	xmlHttp.open("GET","ajax/ajax_findtype_noDD.lasso?me_brand=" + me_brand + "&me_type=" + me_type, true);
	xmlHttp.send(null);
}
function outputTypeDropdown_noDD() {
	if ( xmlHttp.readyState == 4 ) {
		if ( xmlHttp.status == 200 ) {
			document.getElementById("type_dropdown").innerHTML = xmlHttp.responseText;
		}
	}
}
