﻿function hiddenTitle() {
    try {
        Title.style.display = 'none';
    }
    catch (e) {

    }
}
function alterTab(tbid, aid) {
    if (aid == 0) {
        document.all.item('tab' + tbid).style.display = '';
        document.all.item('tab_' + tbid).style.display = 'none';
        document.all.item('tab' + tbid + '_' + tbid).style.display = '';
        document.all.item('tab_' + tbid + '_' + tbid).style.display = 'none';
    }
    else {
        document.all.item('tab' + tbid).style.display = 'none';
        document.all.item('tab_' + tbid).style.display = '';
        document.all.item('tab' + tbid + '_' + tbid).style.display = 'none';
        document.all.item('tab_' + tbid + '_' + tbid).style.display = '';
    }
}
function displaydiv(blag) {
    for (var i = 0; i < document.all.length; i++) {
        if (document.all(i).id.substring(0, 6) == "divkkk")
            document.all(i).style.display = "none";
        if (document.all(i).id.substring(0, 5) == "tdkkk")
            document.all(i).background = webpath + 'images/xzxk_anbg01.jpg';
    }

    var obj = eval('tdkkk' + blag);
    obj.background = webpath + 'images/xzxk_anbg.jpg';
    obj = eval('divkkk' + blag);
    obj.style.display = 'block';

}

function addCookie(objName, objValue) {//添加cookie
    var date = new Date();
    date.setDate(date.getDate() + 30);
    document.cookie = objName + "=" + escape(objValue) + ";expires=" + date;
}

function getCookie(objName) {
    if (document.cookie.length > 0) {
        var c_start = document.cookie.indexOf(objName + "=");
        if (c_start != -1) {
            c_start = c_start + objName.length + 1;
            var c_end = document.cookie.indexOf(";", c_start);
            if (c_end == -1) c_end = document.cookie.length;
            return unescape(document.cookie.substring(c_start, c_end));
        }
    }
    return null;
}
function setbcolor(sbcolor) {
    var gbcolor = sbcolor;
    if (gbcolor) {
        tb1.style.backgroundColor = gbcolor;
        //gbcolor = gbcolor.replace("#", "");
        //addCookie("ProtectionColor", gbcolor);
    }
}
function loadbcolor() {
//    var gbcolor = getCookie("ProtectionColor");
//    if (gbcolor) {
//        gbcolor = "#" + gbcolor;
//        tb1.style.backgroundColor = gbcolor;
//        for (var i = 0; i < ProtectionColor.options.length; i++) {
//            if (ProtectionColor.options[i].value == gbcolor)
//                ProtectionColor.options[i].selected = true;
//        }
//    }
}
