//右邊標題賽季選擇 function titleRightSeason() { var seasonSel = document.getElementById("seasonList"); for (var i = 0; i < arrSeason.length; i++) { var oneRecord = arrSeason[i]; seasonSel.options.add(new Option(oneRecord[0], oneRecord[0] + "," + oneRecord[1])); if (oneRecord[0] == selectSeason) { seasonSel.options[i].selected = true; } } } //右邊標題賽季選擇 function titleRightSeason2() { var seasonSel = document.getElementById("seasonList"); for (var i = 0; i < arrSeason.length; i++) { var oneRecord = arrSeason[i]; seasonSel.options.add(new Option(oneRecord[0], oneRecord[0])); if (oneRecord[0] == selectSeason) { seasonSel.options[i].selected = true; } } } //右邊標題球隊選擇 function titleRightTeam() { var teamHomeSel = document.getElementById("dropHomeTeam"); var teamGuestSel = document.getElementById("dropGuestTeam"); for (var i = 0; i < arrTeam.length; i++) { teamHomeSel.options.add(new Option(arrTeam[i][4 + lang], arrTeam[i][0])); teamGuestSel.options.add(new Option(arrTeam[i][4 + lang], arrTeam[i][0])); teamHelper["T_" + arrTeam[i][0]] = arrTeam[i]; } } //初始化球隊 function titleRightTeam2() { for (var i = 0; i < arrTeam.length; i++) { teamHelper["T_" + arrTeam[i][0]] = arrTeam[i]; } } //改版賽季 function changeSeason() { var seasonList = document.getElementById("seasonList"); var season = seasonList.options[seasonList.selectedIndex].value; var seas = season.split(","); if (seas[1] == "1") window.location.href = "Normal.aspx?SclassID=" + arrLeague[0] + "&matchSeason=" + seas[0]; else if (seas[1] == "2") window.location.href = "Playoffs.aspx?SclassID=" + arrLeague[0] + "&matchSeason=" + seas[0]; else window.location.href = "Preseason.aspx?SclassID=" + arrLeague[0] + "&matchSeason=" + seas[0]; } //改變賽事類型 function SelMatchKind(matchKind) { if (matchKind == 3) window.location.href = "Preseason.aspx?matchSeason=" + selectSeason + "&SclassID=" + arrLeague[0]; else if (matchKind == 2) window.location.href = "Playoffs.aspx?matchSeason=" + selectSeason + "&SclassID=" + arrLeague[0]; else window.location.href = "Normal.aspx?matchSeason=" + selectSeason + "&SclassID=" + arrLeague[0]; } //顯示比分 function ShowScore(state, homeScore, guestScore, scheID, isHaveTech) { if (state >= 0) return ""; var msg = ""; switch (state) { case -1: msg = "" + (homeScore > guestScore ? "" + homeScore + "-" + guestScore + "" : "" + homeScore + "-" + guestScore + "") + ""; break; case -2: msg = "待定"; break; case -3: msg = "中斷"; break; case -4: msg = "取消"; break; case -5: msg = "推遲"; break; } return msg; } function ImgOnload() { try { if (arrLeague[6] == "") arrLeague[6] = "/images/nopic.gif"; var imgObj = document.getElementById("leagueImgUrl"); imgObj.src = arrLeague[6]; } catch (e) { } } function imgLoad(imgObj) { try { if (imgObj.width > 96) { imgObj.width = 96; } if (imgObj.height > 83) { imgObj.height = 83; } else if (imgObj.height < 75) imgObj.height = 75; } catch (e) { } } //顯示分析 function ShowAnaly(isHaveAnaly, scheID) { if (isHaveAnaly == 1) return "[析][歐]"; else return ""; } // 左邊標題 function LoadTitleLeft(subTitle) { var titleLeftHtml = "
"; //圖片 titleLeftHtml += arrLeague[4] + " " + arrLeague[lang + 1] + (!subTitle ? "" : " " + subTitle); //标题 document.getElementById("TitleLeft").innerHTML = titleLeftHtml; } function resizeimg(obj, maxW, maxH) { var imgW = obj.width; var imgH = obj.height; if (imgW > maxW || imgH > maxH) { var ratioA = imgW / maxW; var ratioB = imgH / maxH; if (ratioA > ratioB) { imgH = maxW * (imgH / imgW); imgW = maxW; } else { imgW = maxH * (imgW / imgH); imgH = maxH; } obj.width = imgW; obj.height = imgH; } } //搜索相关球队的赛程 function SelTeam() { //显示选择球队的赛程 function ShowSeachTeamSche(scheData) { var scheDiv = document.getElementById("Div_SearchTeam"); var arrHtml = new Array(); arrHtml.push("類型 | 時間 | 主隊 | 比分 | 客隊 | 讓分 | 總分 | 資料 | 半場 |
" + ShowMatchKind(oneRecord[1]) + " | " + ShowMatchTime(oneRecord[2]) + " | " + teamHelper["T_" + oneRecord[3]][1 + lang] + " | " + ShowScore(oneRecord[9], oneRecord[5], oneRecord[6], oneRecord[0], oneRecord[12]) + " | " + teamHelper["T_" + oneRecord[4]][1 + lang] + " | " + (oneRecord[10] == undefined ? "" : oneRecord[10]) + " | " + (oneRecord[11] == undefined ? "" : oneRecord[11]) + " | " + ShowAnaly(oneRecord[13], oneRecord[0]) + " | " + oneRecord[7] + "-" + oneRecord[8] + " |