﻿// 个人中心Js


// 选择一张选项卡
function Js_personalCenter_SelectOneCard(cardID, contentID) {
    $("#" + cardID).attr("class", "y_tab_03 y_tab_li");
    $("#" + contentID).css("display", "");
    
    $("li[id^='c_tab']").each(function(i) {
        if($(this).attr("id") != cardID) {
            $(this).attr("class", "y_tab_03");
        }
    })
    
    $("div[id^='c_content']").each(function(i) {
        if($(this).attr("id") != contentID) {
            $(this).css("display", "none");
        }
    })
}

// 顶部导航样式（原个人中心）
function Js_personalCenter_TopNavigate(TopNaviID) {
    
    $("#PC_Top_Navi_" + TopNaviID).attr("class", "a_01");
    
    $("a[id^='PC_Top_Navi_']").each(function(i) {
        if($(this).attr("id") != "PC_Top_Navi_" + TopNaviID) {
            $(this).attr("class", "a_02");
        }
    })
}

// 左部导航样式（原个人中心）
function Js_personalCenter_LeftNavigate(LeftNaviID) {
    $("#PC_Left_Navi_" + LeftNaviID).attr("class", "a_01");
    
    $("a[id^='PC_Left_Navi_']").each(function(i) {
        if($(this).attr("id") != "PC_Left_Navi_" + LeftNaviID) {
            $(this).attr("class", "a_02");
        }
    })
}










// 左部导航样式（现个人空间)
function Js_personalCommunity_LeftNavigate(LeftNaviID) {

    if(LeftNaviID=="0") {
        $("a[id^='home_']").each(function(i) {
            $(this).removeAttr("class");
        })
        return;
    }

    $("#home_" + LeftNaviID).attr("class", "on");
    
    $("a[id^='home_']").each(function(i) {
        if($(this).attr("id") != "home_" + LeftNaviID) {
            $(this).removeAttr("class");
        }
    })
}
// 左部导航样式(首页导航)
function Js_personalCommunity_indexNavigate(LeftNaviID) {

    if(LeftNaviID=="0") {
        $("a[id^='index_']").each(function(i) {
            $(this).removeAttr("class");
        })
        return;
    }

    $("#index_" + LeftNaviID).attr("class", "aa_02");
    
    $("a[id^='index_']").each(function(i) {
        if($(this).attr("id") != "index_" + LeftNaviID) {
            $(this).removeAttr("class");
        }
    })
}

// 顶部导航样式（现个人空间）
function Js_personalCommunity_TopNavigate(TopNaviID) {
    $("#PC_TopNavi_" + TopNaviID).attr("class", "on");
    
    $("a[id^='PC_TopNavi_']").each(function(i) {
        if($(this).attr("id") != "PC_TopNavi_" + LeftNaviID) {
            $(this).removeAttr("class");
        }
    })
}

// 退出个人中心
function Js_personalCenter_ExitWeb() {
    if(confirm('您确定退出登录？')) {
        window.location.href= softRootPath + "/Index.aspx?PageState=99";
    }
}
