function onSelectSubnav(dn)
{
    location.href = url + "&tn=" + tabName  + "&dn=" + dn;
}

function onSelectCid(cid)
{
    location.href = url + "&tn=" + tabName  + "&dn=" + detailName  + "&stp=" + statFilter + "&cid=" + cid;
}

function onSelectCgid(cgid)
{
    if (cgid == -1) {
        location.href = url + "&tn=" + tabName + "&dn=" + detailName  +  "&stp=gs";
    }
    else {
        location.href = url + "&tn=" + tabName +  "&dn=" + detailName  +  "&stp=" + statFilter + "&cgid=" + cgid;
    }
}

function onSelectTid(tid)
{
    if (tid == -1) {
        location.href = url + "&tn=" + tabName + "&dn=" + detailName  +  "&stp=sts";
    }
    else {
        location.href = url + "&tn=" + tabName +  "&dn=" + detailName  +  "&stp=" + statFilter + "&tid=" + tid;
    }

}

function onSelectGame(gdid) {
    location.href = url + "&tn=" + tabName + "&dn=" + detailName  +  "&stp=" + statFilter + "&d=" + gdid;
}
function onSelectStat(statid) {
    location.href = url + "&tn=" + tabName + "&dn=" + detailName  +  "&stp=" + statid + "&d=" + game_derivative_id;
}
function onSelectCard(cardid) {
    location.href = url + "&tn=" + tabName + "&cardid=" + cardid;
}

function onSelectNflweekid(nflweekid) {
    location.href = url + "&tn=" + tabName + "&dn=" + detailName  +  "&nflweekid=" + nflweekid;
}

// don't need if we're using filter
function onSelectSeason(s)
{
    //add season to url
    location.href = url + "&tn=" + tabName  +  "&dn=" + detailName  +  "&stp=" + statFilter + "&rds=" + s;
}

function getRaces()
{
    var season,filter;
   //add season and filter to url
   if (document.getElementById("selSeason"))
        season=document.getElementById("selSeason").value;
   if (document.getElementById("selFilter"))
        filter=document.getElementById("selFilter").value;
    url = url + "&tn=" + tabName + "&dn=" + detailName  +  "&stp=" + statFilter;
    url = url  + "&rds=" + season + "&rdf=" + filter;
    location.href=url;
}
