﻿//私有变量
var TransJson = [];

function $(id) {
    return document.getElementById(id);
}

function SetTranCssDefault(id, obj) {
    TransJson[id] = obj;
}

//设置选中的交替CSS
function TransCss(id,objId, defaultCss, actCss) {
    if (TransJson[id] != objId) {
        $(objId+"div").style.display = "block";
        $(objId).className = actCss;
        $(TransJson[id]).className = defaultCss;
        $(TransJson[id]+"div").style.display = "none";
        TransJson[id] = objId;
    }
}
