// 左邊標題
function LoadTitleLeft2() {
var titleLeftHtml = arrLeague[4] + " " + arrLeague[lang + 1] + " 總分盤路榜"; //標題
document.getElementById("TitleLeft").innerHTML = titleLeftHtml;
}
//右邊標題球隊選擇
function titleRightTeam3() {
var teamSel = document.getElementById("dropTeam");
teamSel.options.add(new Option("請選擇球隊", "0"));
for (var i = 0; i < arrTeam.length; i++) {
teamSel.options.add(new Option(arrTeam[i][1 + lang], arrTeam[i][0]));
teamHelper["T_" + arrTeam[i][0]] = arrTeam[i];
}
}
//選擇不同的數據顯示不同的數據
function SelectScore(point) {
//去除顏色
for (var i = 1; i <= 3; i++) {
var menu = document.getElementById("menu" + i);
if (point == i) {
if (menu.className)
menu.className = "nav_selected";
else
menu.setAttribute("class", "nav_selected");
} else {
if (menu.className)
menu.className = "nav_unselected";
else
menu.setAttribute("class", "nav_unselected");
}
}
switch (point) {
case 1: showData(TotalBs, 0); break;
case 2: showData(HomeBs, 1); break;
case 3: showData(GuestBs, 2); break;
}
}
//數據顯示
function showData(selectPanLu, kind) {
var dataDiv = document.getElementById("tableId");
var teamDrop = document.getElementById("dropTeam");
var teamID = teamDrop.options[teamDrop.selectedIndex].value;
var arrDiv = new Array();
arrDiv.push("
排名 | 球隊名稱 | 賽 | 大球 | 走 | 小球 | 大球% | 走% | 小球% | 盤路 |
");
for (var i = 0; i < selectPanLu.length; i++) {
var panLu = selectPanLu[i];
if (teamID > 0 && teamID != panLu[1])
continue;
try {
arrDiv.push("" + panLu[0] + " | " + showScoreTeam(panLu[1]) + " | " + panLu[2] + " | " + panLu[3] + " | " + panLu[4] + " | " + panLu[5] + " | " + panLu[6] + "% | " + panLu[7] + "% | " + panLu[8] + "% | 詳情 |
");
} catch (e) {
document.getElementById("rightLea").style.color = "red";
}
}
//BigSmallBallPuDatial.aspx?sclassid=36&teamid=22&matchseason=2011-2012&kind=3
arrDiv.push("
");
dataDiv.innerHTML = arrDiv.join('');
}
function allTongji(tongjiData, num) {
this.showTeam = function(arrTongjiTeam) {
var tempHtml = "";
for (var i = 1; i < arrTongjiTeam.length; i++) {
try {
tempHtml += ", " + teamHelper["T_" + arrTongjiTeam[i]][1 + lang];
} catch (e) { }
}
if (tempHtml == "")
return "";
return tempHtml.substring(2);
}
var allTongjiDiv = document.getElementById("allTongJi" + num);
var arrAll = new Array();
arrAll.push("");
arrAll.push(" 大球 | " + tongjiData[0] + " | " + tongjiData[1] + "% |
"); //大球
arrAll.push(" 走水 | " + tongjiData[2] + " | " + tongjiData[3] + "% |
"); //走水
arrAll.push(" 小球 | " + tongjiData[4] + " | " + tongjiData[5] + "% |
"); //小球
arrAll.push(" 大球最多球隊 | " + this.showTeam(tongjiData[6]) + " | " + tongjiData[6][0] + "% |
"); //最佳投注球隊
arrAll.push(" 小球最多球隊 | " + this.showTeam(tongjiData[7]) + " | " + tongjiData[7][0] + "% |
"); //避免投注球隊
arrAll.push(" 主場大球最多球隊 | " + this.showTeam(tongjiData[8]) + " | " + tongjiData[8][0] + "% |
"); //主場最佳球隊
arrAll.push(" 主場小球最多球隊 | " + this.showTeam(tongjiData[9]) + " | " + tongjiData[9][0] + "% |
"); //主場避免球隊
arrAll.push(" 客場大球最多球隊 | " + this.showTeam(tongjiData[10]) + " | " + tongjiData[10][0] + "% |
"); //客場最佳球隊
arrAll.push(" 客場小球最多球隊 | " + this.showTeam(tongjiData[11]) + " | " + tongjiData[11][0] + "% |
"); //客場避免球隊
arrAll.push("
");
allTongjiDiv.innerHTML = arrAll.join('');
}
//顯示球隊名
function showScoreTeam(teamID) {
var html = "";
if (lang == 2) { //英文名
html += teamHelper["T_" + teamID][1 + lang];
} else {
html += teamHelper["T_" + teamID][1 + lang] + "";
}
html = "" + html + "";
return html;
}
//改變球隊名
function changeTeam() {
for (var i = 1; i <= 6; i++) {
var menu = document.getElementById("menu" + i);
if (menu.className) {
if (menu.className == "nav_selected") {
SelectScore(i);
break;
}
} else {
if (menu.getAttribute("class") == "nav_selected") {
SelectScore(i);
break;
}
}
}
}
function changeRankSeason() {
var season = document.getElementById("seasonList");
var seasonVal = season.options[season.selectedIndex].value;
var url = document.URL;
var rg = /\/(\w+)\.aspx.*/;
var aa = url.match(rg);
window.location.href = "" + aa[1] + ".aspx?matchSeason=" + seasonVal + "&SclassID=" + arrLeague[0] + "&lang=" + lang;
}