﻿function display(sid){
 $.ajax({
  url:'/include/weatherinfo.ashx?cityid='+sid+'&cache="+Math.random()+"',
  type:'get',
  dataType:'json',
  async:false,
  success:function(data){
		var json=data;
        var city = json.weatherinfo.city;
		var temp1 = json.weatherinfo.temp1;
		var img1 = json.weatherinfo.img1;
		//var img2 = json.weatherinfo.img2;
		//if(img2 == '99')
		//    $("#weather1").html('');
		//else
		//    $("#weather1").html('<img width=21 height=18 src = http://m.weather.com.cn/a_30x30/a'+img2+'.png>');
		 $("#city").html(city);
		 $("#temp1").html(temp1);
		 $("#weather").html('<img width=21 height=18 src = http://m.weather.com.cn/a_30x30/a'+img1+'.png>');
		 //$("#weather1").html('<img src = http://m.weather.com.cn/a_30x30/a'+img2+'.png>');
		 }
		 });
		 }
    
    function gettempfood(sid){
        $.ajax({
          url:'/include/weathertempfood.ashx?cityid='+sid+'&cache="+Math.random()+"',
          type:'get',
          dataType:'json',
          async:false,
          success:function(data){
		var json=data;
		var tempfood = json.weatherinfo.temp;
		$.ajax({
		  url:'/include/txtweathertempfood.ashx?s='+tempfood+'&cache="+Math.random()+"',
		  type:'get',
		  async:false,
		  success:function(data2){
			$("#divcommend").html(data2);
		 }
		 });		
		 }
		 });
    }

