﻿var MZ_cityId=cityId||getcookie('mzcityid')||0;var MZ_weather={};var MZ_type={"0":["晴","32.gif"],"1":["多云","28.gif"],"2":["阴","26.gif"],"3":["大雨","40.gif"],"4":["雷阵雨","38.gif"],"5":["雷阵雨","38.gif"],"6":["雨夹雪","10.gif"],"7":["小雨","11.gif"],"8":["中雨","12.gif"],"9":["大雨","40.gif"],"10":["中雨","12.gif"],"11":["大雨","40.gif"],"12":["大雨","40.gif"],"13":["大雪","14.gif"],"14":["中雪","16.gif"],"15":["中雪","16.gif"],"16":["大雪","14.gif"],"17":["大雪","14.gif"],"18":["雾","20.gif"],"19":["冰雹","18.gif"],"20":["扬沙","22.gif"],"21":["小雨","11.gif"],"22":["中雨","12.gif"],"23":["大雨","12.gif"],"24":["中雨","16.gif"],"25":["大雨","12.gif"],"26":["小雪","13.gif"],"27":["中雪","16.gif"],"28":["大雪","14.gif"],"29":["浮尘","22.gif"],"30":["沙尘暴","19.gif"]};function $(id){return document.getElementById(id)}function getcookie(name){var cookie_start=document.cookie.indexOf(name);var cookie_end=document.cookie.indexOf(";",cookie_start);return cookie_start==-1?'':unescape(document.cookie.substring(cookie_start+name.length+1,(cookie_end>cookie_start?cookie_end:document.cookie.length)))}function setcookie(cookieName,cookieValue,seconds,path,domain,secure){var expires=new Date();expires.setTime(expires.getTime()+seconds);document.cookie=escape(cookieName)+'='+escape(cookieValue)+(expires?'; expires='+expires.toGMTString():'')+(path?'; path='+path:'/')+(domain?'; domain='+domain:'')+(secure?'; secure':'')}function MZ_show(data){MZ_weather=data;MZ_weather.txt1=MZ_type[data.weather1][0];MZ_weather.txt2=MZ_type[data.weather2][0];MZ_weather.txt3=MZ_type[data.weather3][0];MZ_weather.pic1=MZ_type[data.weather1][1];MZ_weather.pic2=MZ_type[data.weather2][1];MZ_weather.pic3=MZ_type[data.weather3][1];$('MZ_weather').innerHTML=$('MZ_weather').innerHTML.replace(/\{.*?\}/img,function(label){label=label.replace(/^\{(.*?)\}$/,'$1');return MZ_weather[label]});$('MZ_weather').style.display=''}function MZ_load(cityId){setcookie('mzcityid',cityId,365*24*60*60*1000);document.write('<s'+'cript src=" http://weather.mzoe.com/call/js/'+cityId+'.js" language="javascript"></s'+'cript>')}if(MZ_cityId){MZ_load(MZ_cityId)}else{document.write('<s'+'cript src="/weather/MZ_weather.asp" language="javascript"></s'+'cript>')}
 

