function getpostcode(postcode,formnaam,straatveld,plaatsveld){
	var xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")
	xmlHttp.open("GET", "postcode/postcode.asp?postcode=" + postcode, false)
	xmlHttp.send()

    if (xmlHttp.readyState == 4) {
        // only if "OK"
        if (xmlHttp.status == 200) {
            // ...processing statements go here...
	      response  = xmlHttp.responseXML.documentElement;
		  if (response.getElementsByTagName('straat')[0].firstChild)
	      {  
			  straat    = response.getElementsByTagName('straat')[0].firstChild.data;
			  document.forms(formnaam).elements(straatveld).value = straat
		  }

		  if (response.getElementsByTagName('plaats')[0].firstChild)
	      {  
		      plaats    = response.getElementsByTagName('plaats')[0].firstChild.data;
			  document.forms(formnaam).elements(plaatsveld).value = plaats
		  }
	
		}else{
			document.write('Er heeft zich een fout voorgedaan. De xmlHttp.status = '+ xmlHttp.status)
		}
    }else{
		document.write('Er heeft zich een fout voorgedaan. De xmlHttp.readyState = ' + xmlHttp.readyState)
	}
}