function SearchBar() {
this.regionObj;
this.doRegion = function() {
var countryId = document.getElementById("country").value;
this.regionObj = document.getElementById("region");
deleteChildren(this.regionObj);
createOption(this.regionObj, "loading...", "loading");
this.regionObj.value = "loading";
var url = "http://www.bulldogclub.com/ajax/region/" + countryId + ".xml"; 
var ajax = new Ajax();
ajax.doGet(url, this.changeRegion, "xml");
};
this.changeRegion = function(xml) {
// this.regionObj cannot been seen here
regionObj = document.getElementById("region");
var options = xml.getElementsByTagName("option");
deleteChildren(regionObj);
for (var i=0; i<options.length; i++) {
var option = createOption(regionObj, options[i].firstChild.nodeValue, options[i].getAttribute("value")); 
}
};
}
var searchBar = new SearchBar();