﻿
$(document).ready(function(){ 
    //机票
    //flyLoader(0);
  
    //度假
    $("#ddlSearchHolidayType").change(function(){  
        $("#HolidayType").load("/UserControl/GetHomePageHolidayType.ashx?type="+$("#ddlSearchHolidayType").val());  
    });
    
    $.get("/UserControl/GetHome/GetIndexHotHotel.aspx",function(data){$("#indexhothotel").html(data);});
    
    $.get("/UserControl/GetHome/GetHotCityHotel.aspx",function(data){$("#hotCityHotel").html(data);});
    
    //$.get("/UserControl/GetHome/GetHotHoliday.aspx",function(data){$("#hot_holiday").html(data);});
    $.get("/UserControl/GetHome/GetHotHotel.aspx",function(data){$("#right_hotel").html(data);});
    $.get("/UserControl/GetHome/GetComment.aspx",function(data){
        $("#commentbox").html(data);
        $.get("/UserControl/GetAdverImg.ashx?APAdver=HomePageComment",function(data){
            data = data.replace("document.write('","").replace("');","");
            $("#divCommentAd").html(data);
        });
    });
    
    $.get("/UserControl/GetHome/GetNews.aspx",function(data){
        $("#newsbox").html(data);
        $.get("/UserControl/GetAdverImg.ashx?APAdver=HomePageNews",function(data){
            data = data.replace("document.write('","").replace("');","");
            $("#divNewsAd").html(data);
        });
    });
    $.get("/UserControl/GetHome/GetHotCity.aspx",function(data){$("#hot_city").html(data);});
    $.get("/UserControl/GetHome/GetBBS.aspx",function(data){
        $("#indexBBS").html(data);
        $.get("/UserControl/GetAdverImg.ashx?APAdver=HomeBBS",function(data){
            data = data.replace("document.write('","").replace("');","");
            $("#divBBSAd").html(data);
        });
    });
    $.get("/UserControl/GetHome/GetTalk.aspx",function(data){$("#interviewsbox").html(data);});
    
    $.get("/UserControl/GetHome/GetLinks.aspx",function(data){$("#divLinks").html(data);});
})
function GetSearchHolidayInfo()
{
    var type = $("#ddlSearchHolidayType option:selected").attr("value");
    var key1 = $("#dllSearchHoliday1 option:selected").attr("value");
    var key2 = $("#dllSearchHoliday1 option:selected").attr("value");
    var key3 = $("#dllSearchHoliday1 option:selected").attr("value");
    var keycode = $("#txtSearchHotelKeyWord").attr("value");
    
    var strInfo = type + "|" + key1 + "|" + key2 + "|" + key3 + "|" + keycode;
    
    $("#hiddSearchInfo").attr("value",strInfo);
} 

function funcCheckAir()
{
    if(check())
    {
        $("#btnAirSearch").click(); 
    }
}

function g(o){return document.getElementById(o);}
function HoverLi(m,n,counter){for(var i=1;i<=counter;i++){g('tb_'+m+i).className='';g('tbc_'+m+i).className='undis';}g('tbc_'+m+n).className='dis';g('tb_'+m+n).className='curon'+(n-1);}

