
	function triggered_zipcode() {
		if (document.getElementById('postcode').value.length == 4) {
	
			xmlHttp=GetXmlHttpObject();
			 
			var url = 'xml/xml_zipcode.xml'
			xmlHttp.onreadystatechange=stateChanged_zipcode;
			xmlHttp.open("GET",url,true);
			xmlHttp.send(null);
	
		} else {
			document.getElementById('city').value = '';
		}
	
	}
	
	function stateChanged_zipcode() { 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { 
			xmlDoc=xmlHttp.responseXML;
			
			for (i=0;i<xmlDoc.getElementsByTagName('area').length;i++) { 
				if (document.getElementById('postcode').value==xmlDoc.getElementsByTagName('zipcode')[i].childNodes[0].nodeValue) {
					document.getElementById('city').value = xmlDoc.getElementsByTagName('zipcity')[i].childNodes[0].nodeValue;
					break;
				}
			}
		} 
	}	
