function stats_goto(tab) {

    var file = document.location.href.toString().split('/').pop();

    var url = "";
    var season  = document.getElementById("year").options[document.getElementById("year").selectedIndex].value;

    var league = "";

    if (document.location.href.toString().match(/_nla.php/)) {
        league = "nla";
    }
    if (document.location.href.toString().match(/_nlb.php/)) {
        league = "nlb";
    }
    if (document.location.href.toString().match(/_junb.php/)) {
        league = "junb";
    }
    if (document.location.href.toString().match(/_juna.php/)) {
        league = "juna";
    }

    switch (tab) {
        case "plusminus":
            url = "./pm_"+league+".php";
            break;
        case "post":
            url = "./post_topscorer_"+league+".php";
            break;
        case "fouls":
            url = "./fouls_"+league+".php";
            break;
        case "goalkeeper":
            url = "./goalkeepers_"+league+".php";
            break;
        case "specs":
            url = "./spectators_"+league+".php";
            break;
        case "scorer":
        default:
            url = "./statistik_"+league+".php";
            break;
    }

        url += "?season="+season;
//    alert(url);
    document.location.href = url;
}


