function onChkProvince(sel){
	DoCallback('/ajax/city.php?pid='+sel.value,null,cityloaded);
}
var city=0;
function cityloaded(result){
	var cities = result.split(',');
	var txtCity= $('txtCity');
	txtCity.options.length=0;
	var op,key,name;
	for(var i=0;i<cities.length;i++){
		op = document.createElement('option');
		key = cities[i].substr(0,6);
		name = cities[i].substr(7);
		op.value = key;
		if(key==city)op.selected = true;
		op.text = name;
		txtCity.options.add(op);
	}
}
function getCity(){
	var sel = window.document.forms[0].txtProvince;
	onChkProvince(sel);
}
AttachEvent(window,'load', getCity);