function LoadWeatherCity(){
	var cityxml;
	var citys;
	var scity = $g("weather_citys");
	//citys = getReturn("/js/weather.asp?action=load&a="+new Date().getTime(),"text","get","");
	//cityxml = loadXML(citys.replace(/&lt;/g,"<").replace(/&gt;/g,">"),false);
	cityxml = loadXML("/js/city.xml",true);
	//alert(cityxml);
	dropSelectOption(scity);
	scity.options[0] = new Option("选择城市","");
	var citylist = cityxml.selectNodes("//ArrayOfString/string");
	var city;
	for(var i=0;i<citylist.length;i++){
		if (window.ActiveXObject){
			city = citylist[i].text;
		}
		else{
			city = citylist[i].textContent;
		}
		scity.options[i+1] = new Option(city,city);
	}
	scity.onchange = function(){Weather(this.options[this.selectedIndex].text);};
}

function Weather(city){
	if (city == "选择城市"){
		city = "北京";
	}
	var weather = getReturn("/js/weather.asp?action=weather&city="+encodeURIComponent(city)+"&a="+new Date().getTime(),"text","get","");
	//$g("weather_city").innerHTML = city;
	$g("weather_city").innerHTML = "";
	var strs = weather.split(",");
	var weatherinfo = "";
	if (strs[2] != ""){
		weatherinfo += "<img src='/js/weather/"+strs[2]+"' border='0' alt="+trim(strs[1].replace(/\d{1,2}月\d{1,2}日/g,""))+">";
	}
	if (strs[3] != ""){
		weatherinfo += "<img src='/js/weather/"+strs[3]+"' border='0' alt="+trim(strs[1].replace(/\d{1,2}月\d{1,2}日/g,""))+">";
	}
	//weatherinfo += "&nbsp;"+trim(strs[1].replace(/\d{1,2}月\d{1,2}日/g,""));
	weatherinfo += "&nbsp;"+strs[0];
	$g("weather_info").innerHTML = weatherinfo;
}

LoadWeatherCity();
//Weather($g("weather_citys").options[$g("weather_citys").selectedIndex].text);