﻿var tablink_idname = new Array("tablink")
var tabcontent_idname = new Array("tabcontent")
var tabcount = new Array("2")
var loadtabs = new Array("1")

function easytabs(menunr, active) {
    menunr = menunr - 1;
    if (active == 1) {
        $("#link_news").attr("href", "/Pknowlege.aspx");
    } else if (active == 2) {
        $("#link_news").attr("href", "/Pknowlege.aspx");
    }
    for (i = 1; i <= tabcount[menunr]; i++) {
        document.getElementById(tablink_idname[menunr] + i).className = 'tab' + i;
        document.getElementById(tabcontent_idname[menunr] + i).style.display = 'none';
    }
    document.getElementById(tablink_idname[menunr] + active).className = 'tab' + active + ' tabactive';
    document.getElementById(tabcontent_idname[menunr] + active).style.display = 'block';
}
window.onload = function () {
    var menucount = loadtabs.length; var a = 0; var b = 1; do { easytabs(b, loadtabs[a]); a++; b++; } while (b <= menucount);
}
