var xmlhttp = false;

try {
	xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
	try {
		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	} catch (E) {
		xmlhttp = false;
	}
}

if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	xmlhttp = new XMLHttpRequest();
}

function getbrands(soort,phone) {
	if (xmlhttp) {
		if (xmlhttp.readyState >= 1 && xmlhttp.readyState <= 3) {
			xmlhttp.abort();
		}
		xmlhttp.open("GET", "get_brands.asp?soort="+soort+"&phone="+phone, true);
		xmlhttp.onreadystatechange = function () {
            if(xmlhttp.readyState == 4){
                outputDiv = document.getElementById('brands');
                if (outputDiv)
                    outputDiv.innerHTML = xmlhttp.responseText;
            }
		}
		xmlhttp.send(null);
	}
}
