﻿// JScript 文件

function CityTeTuiHotel1(cityID){
    $.ajax({
        type:"get",
        url:"/ajax/GetTThotel.aspx",
        data:"cityID="+cityID+"&d="+new Date().getTime(),
        success:function(data){
            alert(data);
        }
    });
}


function CityTeTuiHotel(cityID){
    chooseHotelCity(cityID);
    $.ajax({
        type:'get',
        url:'/ajax/GetTThotel.aspx?cityID='+cityID+'&d='+new Date().getTime(),
        beforeSend:function(){
              $("#hotellist").html("<center><img src='/images/ajax-loader.gif' style='width:32px; height:32px;'></center>");
        },
        success:function(data){
            $("#hotellist").html(data);
        }
    });
}

function CityTeTuiHotel1(cityID){
    chooseHotelCity(cityID);
    
}

function chooseHotelCity(cityID){
   if(cityID==undefined||cityID==null||cityID=="") setCityColor('2001');
   else setCityColor(cityID);
}

function setCityColor(cityID)
{
   var tempChildren = $(".hotelcity > li");
   var i=0;
   var tcArr=['2001','0201','0101','2002','1402','1201'];
   tempChildren.removeClass("current");
   tempChildren.each(function(){
      if(cityID == tcArr[i]) {
        $(this).addClass("current");
        $("#hotellist"+tcArr[i]).css("display","block");
        $("#cityTitle").text($(this).text().replace(" ",""));
      }
      else {
        $("#hotellist"+tcArr[i]).css("display","none");
      }
      i++;
   });
}
