// JavaScript Document
function listSuburbs(form, input, div) {
if(input.id == "input-address-suburb") {
var str = input.value;
var div = document.getElementById(div);
if(str.length == 0) {
div.innerHTML = "";
div.style.visibility = "hidden";
return;
}
if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); }
else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState == 0) { div.innerHTML = "
"; }
if (xmlhttp.readyState == 1) { div.innerHTML = ""; }
if (xmlhttp.readyState == 2) { div.innerHTML = ""; }
if (xmlhttp.readyState == 3) { div.innerHTML = ""; }
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
div.style.visibility = "visible";
div.innerHTML = xmlhttp.responseText;
}
}
xmlhttp.open("GET", "/includes/ajax/suburbData.php?SUBURB=" + str + "&DOCID=" + div.id, true);
xmlhttp.send();
}
if(input.id == "input-post-office-suburb") {
var str = input.value;
var div = document.getElementById(div);
if(str.length == 0) {
div.innerHTML = "";
div.style.visibility = "hidden";
return;
}
if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); }
else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState == 0) { div.innerHTML = ""; }
if (xmlhttp.readyState == 1) { div.innerHTML = ""; }
if (xmlhttp.readyState == 2) { div.innerHTML = ""; }
if (xmlhttp.readyState == 3) { div.innerHTML = ""; }
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
div.style.visibility = "visible";
div.innerHTML = xmlhttp.responseText;
}
}
xmlhttp.open("GET", "/includes/ajax/suburbData.php?SUBURB=" + str + "&DOCID=" + div.id, true);
xmlhttp.send();
}
if(input.id == "input-government-post-office-suburb") {
var str = input.value;
var div = document.getElementById(div);
if(str.length == 0) {
div.innerHTML = "";
div.style.visibility = "hidden";
return;
}
if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); }
else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState == 0) { div.innerHTML = ""; }
if (xmlhttp.readyState == 1) { div.innerHTML = ""; }
if (xmlhttp.readyState == 2) { div.innerHTML = ""; }
if (xmlhttp.readyState == 3) { div.innerHTML = ""; }
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
div.style.visibility = "visible";
div.innerHTML = xmlhttp.responseText;
}
}
xmlhttp.open("GET", "/includes/ajax/suburbData.php?SUBURB=" + str + "&DOCID=" + div.id, true);
xmlhttp.send();
}
if(input.id == "input-locked-bag-suburb") {
var str = input.value;
var div = document.getElementById(div);
if(str.length == 0) {
div.innerHTML = "";
div.style.visibility = "hidden";
return;
}
if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); }
else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState == 0) { div.innerHTML = ""; }
if (xmlhttp.readyState == 1) { div.innerHTML = ""; }
if (xmlhttp.readyState == 2) { div.innerHTML = ""; }
if (xmlhttp.readyState == 3) { div.innerHTML = ""; }
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
div.style.visibility = "visible";
div.innerHTML = xmlhttp.responseText;
}
}
xmlhttp.open("GET", "/includes/ajax/suburbData.php?SUBURB=" + str + "&DOCID=" + div.id, true);
xmlhttp.send();
}
if(input.id == "input-mailing-address-suburb") {
var str = input.value;
var div = document.getElementById(div);
if(str.length == 0) {
div.innerHTML = "";
div.style.visibility = "hidden";
return;
}
if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); }
else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState == 0) { div.innerHTML = ""; }
if (xmlhttp.readyState == 1) { div.innerHTML = ""; }
if (xmlhttp.readyState == 2) { div.innerHTML = ""; }
if (xmlhttp.readyState == 3) { div.innerHTML = ""; }
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
div.style.visibility = "visible";
div.innerHTML = xmlhttp.responseText;
}
}
xmlhttp.open("GET", "/includes/ajax/suburbData.php?SUBURB=" + str + "&DOCID=" + div.id, true);
xmlhttp.send();
}
}