// JavaScript Document By NMTuan

function tabcard(id1, tag1, showclass1, hiddenclass1, id2, tag2, showclass2, hiddenclass2, a) {
    x = document.getElementById(id1).getElementsByTagName(tag1);
    for (i = 0; i < x.length; i++) {
        x[i].className = hiddenclass1;
        if (i + 1 == a) x[i].className = showclass1;
    }
    y = document.getElementById(id2).getElementsByTagName(tag2);
    for (j = 0; j < y.length; j++) {
        y[j].className = hiddenclass2;
        if (j + 1 == a) y[j].className = showclass2;
    }
}

function rdm(id, i, cls) {
    var x = parseInt(i * Math.random() + 1);
    document.getElementById(id).className = cls + x;
    var ID = "#id" + id;
    $(ID).attr("className", "cls" + x);
}


function currentpage(id1, tag1, showclass1, id2, tag2, showclass2, a) {
    x = document.getElementById(id1).getElementsByTagName(tag1);
    y = document.getElementById(id2).getElementsByTagName(tag2);
    for (j = 0; j < y.length; j++) {
        if (j + 1 == a) y[j].className = showclass2;
    }
    if (a == 1) {
        x[0].className = showclass1
    } else
        if (a == 2) {
        x[2].className = showclass1
    } else
        if (a == 3) {
        x[4].className = showclass1
    } else
        if (a == 4) {
        x[6].className = showclass1
    } else
        if (a == 5) {
        x[8].className = showclass1
    } else
        if (a == 6) {
        x[10].className = showclass1
    } else
        if (a == 7) {
        x[12].className = showclass1
    } else
        if (a == 8) {
        x[14].className = showclass1
    } else
        if (a == 9) {
        x[16].className = showclass1
    } else
        if (a == 10) {
        x[18].className = showclass1
    }
}


    
