function switchTag(tag, mrc) {
    for (i = 1; i < 6; i++) {
        /*
        if ("tag" + i == tag) {
            document.getElementById(tag).getElementsByTagName("a")[0].className = "selectli" + i;
            document.getElementById(tag).getElementsByTagName("a")[0].getElementsByTagName("span")[0].className = "selectspan" + i;
        } else {
            document.getElementById("tag" + i).getElementsByTagName("a")[0].className = "";
            document.getElementById("tag" + i).getElementsByTagName("a")[0].getElementsByTagName("span")[0].className = "";
        }*/
        if ("mrc" + i == mrc) {
            document.getElementById(mrc).className = "";
        } else {
            document.getElementById("mrc" + i).className = "hidemrc";
        }
        document.getElementById("mrc").className = mrc;
    }
}

function Load_Init() {
    var t = $(window).height() - 80;
    $("#mrc").css({ height: t });
}

function Department_Load_Init() {
    var t = $(window).height() - 80;
    $("#mrc").css({ height: t });
    var ifm = document.getElementById("frmDepartment");
    ifm.height = t - 20;
}

function frmCommon_Load_Init() {
    var t = $(window).height() - 80;
    $("#mrc").css({ height: t });
    var ifm = document.getElementById("frmCommon");
    ifm.height = t - 20;
}

function frmTabContainer_Load_Init() {
    var t = $(window).height() - 80;
    $("#mrc").css({ height: t });
    var ifm = document.getElementById("frmTabContainer");
    ifm.height = t - 50;
    ifm = document.getElementById("frmTabContainer2");
    if (ifm != null)
        ifm.height = t - 50;
}

function isInt(str) {
    var re = /^[1-9]+[0-9]*]*$/;
    if (!re.test(str))
        return false;
    else
        return true;
}

function isNum(str) {
    var re = /^[0-9]+.?[0-9]*$/;
    if (!re.test(str))
        return false;
    else
        return true;
}
