function setFootTag(id) {
    for (var i = 1; i < 3; i++) {
        if (i == parseInt(id)) {
            document.getElementById("footTag" + i).className = 'sel';
        }
        else {
            document.getElementById("footTag" + i).className = '';
        }
    }
    for (var i = 1; i < 3; i++) {
        if (i == parseInt(id)) {
            document.getElementById("footContent" + i).className = 'footContent';
        }
        else {
            document.getElementById("footContent" + i).className = 'footContent hidden';
        }
    }
}

function setTopTag(showContent, selfObj) {
    // 操作标签
    var tag = document.getElementById("top_menu_right").getElementsByTagName("a");
    var taglength = tag.length;
    for (i = 0; i < taglength; i++) {
        tag[i].className = "";
    }
    selfObj.className = "sel";
    // 操作内容
    for (i = 1; j = document.getElementById("top_menu_content" + i); i++) {
        j.className = "hidden";
    }
    document.getElementById(showContent).className = "";
}

function setSearchMenu(showContent,selfObj)
{
 var tag = document.getElementById("top_search_menu").getElementsByTagName("a");
    var taglength = tag.length;
    for (i = 0; i < taglength; i++) {
        tag[i].className = "";
    }
    selfObj.className = "sel";
    // 操作内容
    for (i = 1; j = document.getElementById("sub_content" + i); i++) {
        j.className = "sub_content1 hidden";
    }
    document.getElementById(showContent).className = "sub_content1";
}


function selSearch(id) {
    for (var i = 1; i < 6; i++) {
        if (i == parseInt(id)) {
            document.getElementById("search_title" + i).className = 'sel';
        }
        else {
            document.getElementById("search_title" + i).className = '';
        }
    }
    for (var i = 1; i < 6; i++) {
        if (i == parseInt(id)) {
            document.getElementById("search_content" + i).className = 'search_content_sub';
        }
        else {
            document.getElementById("search_content" + i).className = 'search_content_sub hidden';
        }
    }
}

function categoryShow(id) {
    $("#pop_title" + id).addClass("show");
    $("#pop_content" + id).show();
}
function categoryHide(id) {
    $("#pop_title" + id).removeClass("show");
    $("#pop_content" + id).hide();
}

function showDeparture() { $("#divDeparture").css("left", $("#Departure").offset().left); $("#divDeparture").css("top", $("#Departure").offset().top + $("#Departure").outerHeight()); $("#divDeparture").show(); }
function hideDeparture() { $("#divDeparture").hide(); }

function showDestination() { if ($("#divDestination").css("display") == "none") { $("#divDestination").css("left", $("#Destination").offset().left - 160); $("#divDestination").css("top", $("#Destination").offset().top + $("#Destination").outerHeight()); $("#divDestination").show(); } }
function hideDestination() { $("#divDestination").hide(); }

function setDeparture(str) { $("#Departure").val(str); hideDeparture(); }
function setDestination(str) { $("#Destination").val(str); hideDestination(); }





function getCaterogy(pinyin) {
    $.ajax({
        url: "/ajax/Category.ashx?pinyin="+pinyin,
        type: "POST",
        cache: false,
        success: function(html) {
            $("#Left_Category").html(html);
        }
    });
}

function SearchSight() {
    var keyword = $("#keywords").val();
    document.location = '/Search-Sight.aspx?keywords=' + escape(keyword);
}

function getYearMonthDay() {
    var curData = new Date();
   // document.write(curData.toLocaleDateString().toString());
    document.write(curData.getFullYear() + "年" + (curData.getMonth()+1) + "月" + curData.getDate() + "日"); 
}



