function submitContact()
{
    document.forms["contact_us"].submit();
}

var url = "/getpostcode.php?postcode="; // The server-side script

	function updateList() {
		if (http.readyState == 4) {
			// Use the XML DOM to unpack the zip, city and state values
			var xmlDocument = http.responseXML; 
			var selectSuburb = document.getElementById('city');
			while ( selectSuburb.childNodes.length >= 1 )
			{
				selectSuburb.removeChild( selectSuburb.firstChild );       
			}
			var selectState = document.getElementById('state');
			var zips = xmlDocument.getElementsByTagName('zip');
			for (i=0; i<zips.length; i++) {
				var city  = zips[i].childNodes[1].childNodes[0].nodeValue;
				var state = zips[i].childNodes[2].childNodes[0].nodeValue;
				var x = document.createElement('option');
				x.value = city;
				x.appendChild(document.createTextNode(city));
				selectSuburb.appendChild(x);

				var newIndex = 0;
				if (state == "NSW"     ) { newIndex = 1; }
				else if (state == "ACT") { newIndex = 2; }
				else if (state == "QLD") { newIndex = 3; }
				else if (state == "VIC") { newIndex = 4; }
				else if (state == "WA" ) { newIndex = 5; }
				else if (state == "TAS") { newIndex = 6; }
				else if (state == "SA" ) { newIndex = 7; }
				else if (state == "NT" ) { newIndex = 8; }
				selectState.selectedIndex = newIndex;
			}
			isWorking = false;
		}
	}

	var isWorking = false;

	function getList() {
		if (!isWorking && http) {
			var postcode = document.getElementById("postcode").value;

			http.open("GET", url + escape(postcode), true);
			http.onreadystatechange = updateList;  
			// this sets the call-back function to be invoked when a response from the HTTP request is returned
			isWorking = true;
			http.send(null);
		}
	}

	function getHTTPObject() {
		var xmlhttp;
			/*@cc_on
			@if (@_jscript_version >= 5)
			try {
				xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
			} catch (e) {
				try {
					xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
				} catch (E) {
					xmlhttp = false;
				}
			}
			@else
			xmlhttp = false;
			@end @*/
		if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
			try {
				xmlhttp = new XMLHttpRequest();
				xmlhttp.overrideMimeType("text/xml"); 
			} catch (e) {
				xmlhttp = false;
			}
		}
		return xmlhttp;
	}

	var http = getHTTPObject(); //  create the HTTP Object

