//右边标题赛季选择 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 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 < 70) imgObj.height = 70; } catch (e) { } } //改版赛季 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 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("") for (var i = 0; i < scheData.length; i++) { var oneRecord = scheData[i]; var color = "#E3EEF9"; if (i % 2 != 0) color = "#ffffff"; arrHtml.push(""); } arrHtml.push(""); scheDiv.innerHTML = arrHtml.join(''); } function ShowMatchKind(kind) { var name = ""; switch (kind) { case 1: name = "常规赛"; break; case 2: name = "季后赛"; break; case 3: name = "季前赛"; break; } return name; } var dropHomeTeam = document.getElementById("dropHomeTeam"); var dropGuestTeam = document.getElementById("dropGuestTeam"); var homeTeamID = dropHomeTeam.options[dropHomeTeam.selectedIndex].value; var guestTeamID = dropGuestTeam.options[dropGuestTeam.selectedIndex].value; var season = document.getElementById("seasonList"); var seasonVal = season.options[season.selectedIndex].value; var seasonVal = seasonVal.split(",")[0]; bomHelper.ajaxPost("TeamSearchAjax.aspx", "SclassID=" + arrLeague[0] + "&HomeTeamID=" + homeTeamID + "&GuestTeamID=" + guestTeamID + "&matchSeason=" + seasonVal, function(data) { try { eval(data); ShowSeachTeamSche(arrData); document.getElementById("spnLoading").style.display = "none"; } catch (e) { var a = 0; } }); } 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; }