function qryPostcode(q) {
	document.getElementById("postid").length = 0;
    easyhttp = GetXmlHttpObject();
    if (easyhttp==null) {
        alert ("Browser is not compatible")
        return
    } else {
        url = "http://www.netstart.be/api/postcode/?q="+q+"&"+Math.random()
        easyhttp.onreadystatechange=updateStatus
        easyhttp.open("GET",url,true)
        easyhttp.send(null)
    } //end-if
} //end-func

function updateStatus() {
	theselect = document.getElementById("postid");
    if(easyhttp.readyState==4) {
    if(easyhttp.status == 200) {
    	if(easyhttp.responseText == "") {
    		theselect.options[0] = new Option("Postcode niet gevonden",0);
		} else {
            var data = eval('(' + easyhttp.responseText + ')');
			for (var i=0;i<data.length;i++) {
        		theselect.options[i] = new Option(data[i][1],data[i][0]);
			} //end-for
		} //end-if
    } //end-if
    } //end-if
} //end-func