wm=new Array();

wm[1]=new weather_mod('1','Clear','sun.gif');

wm[2]=new weather_mod('2','Cloudy','yun.gif');



wm[3]=new weather_mod('3','Light rain','yu.gif');



wm[4]=new weather_mod('4','Clear to Cloudy','yun.gif');



wm[5]=new weather_mod('5','Wind','feng.gif');



wm[6]=new weather_mod('6','Light snow','xue.gif');



wm[7]=new weather_mod('7','Light rain to Cloudy','yu.gif');



wm[8]=new weather_mod('8','Overcast to Cloudy','yin.gif');



wm[9]=new weather_mod('9','Cloudy to Clear','yun.gif');



wm[10]=new weather_mod('10','Rain to Overcast','yu.gif');



wm[11]=new weather_mod('11','Light snow to Cloudy','xue.gif');



wm[12]=new weather_mod('12','Clear to Fog','sun.gif');



wm[13]=new weather_mod('13','Overcast','yin.gif');



wm[14]=new weather_mod('14','Light rain to Overcast','yu.gif');



wm[15]=new weather_mod('15','Rain','yu.gif');



wm[16]=new weather_mod('16','Cloudy to Light snow','xue.gif');



wm[17]=new weather_mod('17','Cloudy to Overcast','yin.gif');



wm[18]=new weather_mod('18','Light snow to Overcast','xue.gif');



wm[19]=new weather_mod('19','Fog','wu.gif');



wm[20]=new weather_mod('20','Heavy Fog','wu.gif');



wm[21]=new weather_mod('21','Light rain to Sleet','xue.gif');



wm[22]=new weather_mod('22','Cloudy to Sleet','xue.gif');



wm[23]=new weather_mod('23','Thundershower to Overcast','yu.gif');



wm[24]=new weather_mod('24','Overcast to Light snow','xue.gif');



wm[25]=new weather_mod('25','Overcast to Light rain','yu.gif');



wm[26]=new weather_mod('26','Rain to Light rain','yu.gif');



wm[27]=new weather_mod('27','Rain to Cloudy','yu.gif');



wm[28]=new weather_mod('28','Sleet to Light snow','xue.gif');



wm[29]=new weather_mod('29','Overcast to Clear','sun.gif');



wm[30]=new weather_mod('30','Sleet to Cloudy','xue.gif');



wm[31]=new weather_mod('31','Thunder Shower','yu.gif');



wm[32]=new weather_mod('32','Sleet','xue.gif');



wm[33]=new weather_mod('33','Cloudy to Light Rain','yu.gif');



wm[34]=new weather_mod('34','Fog to Cloudy','yun.gif');



wm[35]=new weather_mod('35','Clear to Overcast','yin.gif');



wm[36]=new weather_mod('36','Fog to Clear','sun.gif');



wm[37]=new weather_mod('37','Fog to Light rain','yu.gif');



wm[38]=new weather_mod('38','Clear to Light rain','yu.gif');



wm[39]=new weather_mod('39','Light rain to Rain','yu.gif');



wm[40]=new weather_mod('40','Cloudy to Fog','yun.gif');



wm[41]=new weather_mod('41','Snow to Light snow','xue.gif');



wm[42]=new weather_mod('42','Heavy snow to Light snow','xue.gif');



wm[43]=new weather_mod('43','Light snow to Clear','xue.gif');



wm[44]=new weather_mod('44','Clear to Light snow','xue.gif');



wm[45]=new weather_mod('45','Heavy rain','yu.gif');



wm[46]=new weather_mod('46','Cloudy to Thunder Shower','yu.gif');



wm[47]=new weather_mod('47','Fog to Overcast','yin.gif');



wm[48]=new weather_mod('48','Cloudy to Rain','yu.gif');



wm[49]=new weather_mod('49','Light snow to Snow','xue.gif');



wm[50]=new weather_mod('50','Overcast to Sleet','xue.gif');



wm[51]=new weather_mod('51','Fog to Sleet','xue.gif');



wm[52]=new weather_mod('52','Light snow to Heavy snow','xue.gif');



wm[53]=new weather_mod('53','Snow','xue.gif');



wm[54]=new weather_mod('54','Heavy snow to Snow','xue.gif');



wm[55]=new weather_mod('55','Thundershower to Cloudy','yun.gif');



wm[56]=new weather_mod('56','Snow to Clear','sun.gif');



wm[57]=new weather_mod('57','Clear to Thudershower','yun.gif');



wm[58]=new weather_mod('58','Rain to Clear', 'yu.gif');



wm[59]=new weather_mod('59','Sleet to Snow','xue.gif');



wm[60]=new weather_mod('60','Rain to Heavy rain','yu.gif');



wm[61]=new weather_mod('61','Overcast to Snow','xue.gif');



wm[62]=new weather_mod('62','Cloudy to Snow','xue.gif');



wm[63]=new weather_mod('63','Rainstorm','yu.gif');



wm[64]=new weather_mod('64','Light rain to Heavy rain','yu.gif');



wm[65]=new weather_mod('65','Thundershower to Light rain','yu.gif');



wm[66]=new weather_mod('66','Thundershower to Heavy rain','yu.gif');



wm[67]=new weather_mod('67','Light snow','xue.gif');



wm[68]=new weather_mod('68','Light snow to Snow','xue.gif');



wm[69]=new weather_mod('69','Heavy rain to Light rain','yu.gif');



wm[70]=new weather_mod('70','Sleet to Heavy snow','xue.gif');



wm[71]=new weather_mod('71','Heavy rain to Rain','yu.gif');



wm[72]=new weather_mod('72','Snow to Cloudy','xue.gif');



wm[73]=new weather_mod('73','Light rain to Thundershower','yu.gif');



wm[74]=new weather_mod('74','Rain to Sleet','xue.gif');



wm[75]=new weather_mod('75','Thunder Shower to Rain','yu.gif');



wm[76]=new weather_mod('76','Snow to Overcast','xue.gif');



wm[77]=new weather_mod('77','Overcast to Rain','yu.gif');



wm[78]=new weather_mod('78','Fog to Light snow','xue.gif');



wm[79]=new weather_mod('79','Light rain to Clear','yu.gif');



wm[80]=new weather_mod('80','Sleet to Overcast','yu.gif');



wm[81]=new weather_mod('81','Clear to Sleet','xue.gif');



wm[82]=new weather_mod('82','Ice rain to Overcast','yin.gif');



wm[83]=new weather_mod('83','Light snow to Fog','xue.gif');



wm[84]=new weather_mod('84','Sleet to Fog','xue.gif');



wm[85]=new weather_mod('85','Heavy snow','xue.gif');



wm[86]=new weather_mod('86','Snow to Heavy Snow','xue.gif');



wm[87]=new weather_mod('87','Overcast to Fog','yin.gif');



wm[88]=new weather_mod('88','Sleet to Clear','xue.gif');



wm[89]=new weather_mod('89','Heavy rain to Overcast','yu.gif');



wm[90]=new weather_mod('90','Thundershower to Clear','yu.gif');







function pollution(city_name,air_quatity,chief_item)



{



	this.city_name=city_name;



	this.air_quatity=air_quatity;



	this.chief_item=chief_item;



}







function today_weather(city_name,pos_ltx,pos_lty,weather_id,top_tem,bottom_tem,air_pol,if_show)



{



	this.city_name=city_name;



	this.pos_ltx=pos_ltx;



	this.pos_lty=pos_lty;



	this.weather_id=weather_id;



	this.top_tem=top_tem;



	this.bottom_tem=bottom_tem;



	this.air_pol=air_pol;



	this.showcity=City_show;



	this.if_show=if_show;



}







function City_show(divname,ddw,ddh,isns,n)



{



	//cc='<a href=# onmouseover=show_detail('+n+',isns'+')><img src='+wm[this.weather_id].weather_img+' width=17 height=17 border=0 alt='+cw[n].city_name+'></a>';



	if(!isns)



	{



		divname.style.left=ddw+this.pos_ltx+12;



		divname.style.top=ddh+this.pos_lty+65;



		divname.style.visibility='visible';



		//divname.innerHTML=cc;



	}



	if(isns) 



	{



		divname.left=ddw+this.pos_ltx+19;



		divname.top=ddh+this.pos_lty+78;



		divname.visibility='visible';



		//divname.document.open();



		//divname.document.write(cc);



		//divname.document.close();



	}



}







function weather_mod(weather_id,weather_text,weather_img)



{



	this.weather_id=weather_id;



	this.weather_text=weather_text;



	this.weather_img=weather_img;



}







divwy=new Array(20,85,110,240,360,293,341,389);



isns = navigator.appName == "Netscape";







function init()



{



	



	ddw=0;



	ddh=0;



	if (window.screen.width>800) {ddw=0;ddh=0;}



		



	dt=new Date();



	yy=dt.getYear();



	mm=dt.getMonth()+1;



	dd=dt.getDate();



	if(mm<10) mm="0"+mm;



	if(dd<10) dd="0"+dd;







	



	if(isns)



	{



		document.back.left=ddw;



		document.back.top=ddh;



		document.loading.visibility='hidden';



		document.back.visibility='visible'



		for(i=0;i<=7;i++) 



		{



			eval('document.weath'+i+'.left=ddw+525+130');



			eval('document.weath'+i+'.top=95+ddh+divwy['+i+']');



		}



		with(cw[1])



		{



			document.weath1.document.open();document.weath1.document.write('<H3>'+city_name+'</H3>');document.weath1.document.close();



			document.weath2.document.open();document.weath2.document.write('<Span class=Body>'+wm[weather_id].weather_text+'</Span>');document.weath2.document.close();



			document.weath3.document.open();document.weath3.document.write('<Span class=Body>'+top_tem+'</Span>');document.weath3.document.close();



			document.weath4.document.open();document.weath4.document.write('<Span class=Body>'+bottom_tem+'</Span>');document.weath4.document.close();



			document.weath5.document.open();document.weath5.document.write('<p>'+air_pol+'</p>');document.weath5.document.close();



			document.weath6.document.open();document.weath6.document.write('<p>'+''+'</p>');document.weath6.document.close();



			document.weath7.document.open();document.weath7.document.write('<p>'+''+'</p>');document.weath7.document.close();



			for (j=1;j<=pw.length-1;j++)



			{



				if (pw[j].city_name==city_name) 



				{	document.weath6.document.open();document.weath6.document.write('<p>'+pw[j].air_quatity+'</p>');document.weath6.document.close();



					document.weath7.document.open();document.weath7.document.write('<p>'+pw[j].chief_item+'</p>');document.weath7.document.close();



				}



			}



		}



		document.weath0.document.open();document.weath0.document.write('<b>'+yy+'.'+mm+'.'+dd+'</b>');document.weath0.document.close();



	}



	else 



	{ 



		back.style.left=ddw;



		back.style.top=ddh;



		loading.style.visibility='hidden';



		back.style.visibility='visible'



		for(i=0;i<=7;i++) 



		{



			eval('weath'+i+'.style.left=ddw+645');



			eval('weath'+i+'.style.top=80+ddh+divwy['+i+']');



		}



		with(cw[1])



		{



			weath1.innerHTML='<H3>'+city_name+'</H3>';



			weath2.innerHTML='<Span class=Body>'+wm[weather_id].weather_text+'</Span>';



			weath3.innerHTML='<Span class=Body>'+top_tem+'</Span>';



			weath4.innerHTML='<Span class=Body>'+bottom_tem+'</Span>';



			weath5.innerHTML=air_pol;



			weath6.innerHTML='';



			weath7.innerHTML='';



			for (j=1;j<=pw.length-1;j++)



			{



				if (pw[j].city_name==city_name) 



				{	weath6.innerHTML=pw[j].air_quatity;



					weath7.innerHTML=pw[j].chief_item;



				}



			}



		}



		weath0.innerHTML='<b>'+yy+'.'+mm+'.'+dd+'</b>';



	}



	for(i=1;i<=cw.length-1;i++)



	{



		if (cw[i].if_show==1)



		{



		if(!isns)



			eval('cw['+i+'].showcity(city'+i+',ddw,ddh,isns,'+i+')');



		else 



			eval('cw['+i+'].showcity(document.city'+i+',ddw,ddh,isns,'+i+')');



		}



	}



	



}	







function show_detail(n,isns)



{



	if(isns)



	{



		with(cw[n])



		{



			document.weath1.document.open();document.weath1.document.write('<H3>'+city_name+'</H3>');document.weath1.document.close();



			document.weath2.document.open();document.weath2.document.write('<Span class=Body>'+wm[weather_id].weather_text+'</Span>');document.weath2.document.close();



			document.weath3.document.open();document.weath3.document.write('<Span class=Body>'+top_tem+'</Span>');document.weath3.document.close();



			document.weath4.document.open();document.weath4.document.write('<Span class=Body>'+bottom_tem+'</Span>');document.weath4.document.close();



			document.weath5.document.open();document.weath5.document.write('<p>'+air_pol+'</p>');document.weath5.document.close();



			document.weath6.document.open();document.weath6.document.write('<p>'+''+'</p>');document.weath6.document.close();



			document.weath7.document.open();document.weath7.document.write('<p>'+''+'</p>');document.weath7.document.close();



			for (j=1;j<=pw.length-1;j++)



			{



				if (pw[j].city_name==city_name) 



				{	document.weath6.document.open();document.weath6.document.write('<p>'+pw[j].air_quatity+'</p>');document.weath6.document.close();



					document.weath7.document.open();document.weath7.document.write('<p>'+pw[j].chief_item+'</p>');document.weath7.document.close();



				}



			}



		}



		document.back.document.scf.scs.options[n-1].selected=true;



	}



	else



	{



		with(cw[n])



		{



			weath1.innerHTML='<H3>'+city_name+'</H3>';



			weath2.innerHTML='<Span class=Body>'+wm[weather_id].weather_text+'</Span>';



			weath3.innerHTML='<Span class=Body>'+top_tem+'</Span>';



			weath4.innerHTML='<Span class=Body>'+bottom_tem+'</Span>';



			weath5.innerHTML=air_pol;



			weath6.innerHTML='';



			weath7.innerHTML='';



			for (j=1;j<=pw.length-1;j++)



			{



				if (pw[j].city_name==city_name) 



				{	weath6.innerHTML=pw[j].air_quatity;



					weath7.innerHTML=pw[j].chief_item;



				}



			}



		}



		scf.scs.options[n-1].selected=true;



	}



}



