﻿function IndexNoticeClick(vindex) {
    $("div[id^='DvINotic']").each(function () { $(this).attr("class", "Bulletin"); });
    $("#DvINotic" + vindex).attr("class", "BulletinGrow");
    $("div[id^='DvIFNotice']").each(function () { $(this).hide(); });
    $("#DvIFNotice" + vindex).show();

}

function ShowLogedDV(Name, SaleGrade, SalePoint, BuyGrade, BuyPoint, JB, IsMobileAtten, Ugrade, HasShop, IdRecheck,ShopID) {
    $("#dvIndexLoged").show();

    $("#SpaLogName").html(Name);
    $("#SpaSaleGrade").html(SaleGrade);
    $("#SpaSalePoint").html(SalePoint);
    $("#SpaBuyGrade").html(BuyGrade);
    $("#SpaBuyPoint").html(BuyPoint);
    $("#SpaJB").html(JB);

    if (!IsMobileAtten) $("#AMobileAtten").show();
    if (Ugrade == 0) $("#AAtten").show();
    if (HasShop && !IdRecheck) $("#AIdRecheck").show();
    if (Ugrade == 1) $("AVip").show();
    if (!HasShop) $("#AOpenShop").show();
    if (HasShop) {
        $("#AMyShop").show();
        $("#AMyShop").attr("href", "/Mall/Shop/shop" + ShopID + ".htm");
    }
}

function IndexRight2HeadClick(objDV, vi) {
    var dvF = $(objDV).parent().parent();
    var dvHead = dvF.children(".head");
    var dvBody = dvF.children(".body");
    var dvLeft = dvHead.children("div").eq(0);
    var dvRight = dvHead.children("div").eq(1);
    var dvB1 = dvBody.children("div[id$='1']");
    var dvB2 = dvBody.children("div[id$='2']");

    switch (vi) {
        case 0:
            dvLeft.attr("class", "text leftlocal");
            dvRight.attr("class", "text right");
            dvB1.show();
            dvB2.hide();
            break;
        case 1:
            dvLeft.attr("class", "text left");
            dvRight.attr("class", "text");
            dvB1.hide();
            dvB2.show();
            break;
    }
}
