function xget(obj){
	if(document.getElementById)
		return document.getElementById(obj);
	else if(document.all)
		return document.all[obj];
	else
		return false;
}

function state_selected(theUrl, theId) {
	new Ajax.Updater(theId, theUrl, {asynchronous: true, evalScripts: true, onLoading: function(){ xget(theId).innerHTML; }, update: 'theId', onSuccess: function(r){  }});
}

function add_city(id, value) {
	city = xget(id);
	city.value=value;
}
