function switchTab(tab) {
    var i;
    var x = document.getElementsByClassName("profile_tab");
    var a = document.getElementsByClassName("profile_tab_link");
    for (i = 0; i < x.length; i++) {
        x[i].style.display = "none";
    }
    for (i = 0; i < a.length; i++) {
        if (a[i].id.startsWith("Tab") && a[i].id.endsWith(tab)) {
            a[i].classList.add("active");
        } else {
            a[i].classList.remove("active");
        }
    }
    document.getElementById(tab).style.display = "block";
}
