function rightSide() { this.Decrypt2 = function(data) { var b = (7 * (data - 6) % 10 + 10) % 10; return b.toString(); } this.Decrypt = function(playerID) { playerID = playerID.toString(); var arrID = new Array(); for (var i = 0; i < playerID.length; i = i + 1) { var a = playerID.substr(i, 1); switch (a) { case "0": arrID.push(this.Decrypt2(0)); break; case "4": arrID.push(this.Decrypt2(1)); break; case "5": arrID.push(this.Decrypt2(2)); break; case "3": arrID.push(this.Decrypt2(3)); break; case "6": arrID.push(this.Decrypt2(4)); break; case "9": arrID.push(this.Decrypt2(5)); break; case "7": arrID.push(this.Decrypt2(6)); break; case "1": arrID.push(this.Decrypt2(7)); break; case "2": arrID.push(this.Decrypt2(8)); break; case "8": arrID.push(this.Decrypt2(9)); break; } } return arrID.join(''); } // //守门员 // this.ShowGoalkeeper = function() { // var arrHtml1 = new Array(); // arrHtml1.push("
Goalkeeper
"); // arrHtml1.push(""); // for (var i = 0; i < goalkeeper.length; i++) { // var oneRecord = goalkeeper[i]; // arrHtml1.push(""); // } // arrHtml1.push("
" + oneRecord[1] + "" + ShowCaptain(oneRecord) + "" + oneRecord[2 + lang] + "
"); // return arrHtml1.join(''); // } // //后卫 // this.ShowRearguard = function() { // var arrHtml1 = new Array(); // arrHtml1.push("
Defender
"); // arrHtml1.push(""); // for (var i = 0; i < rearguard.length; i++) { // var oneRecord = rearguard[i]; // arrHtml1.push("") // } // arrHtml1.push("
" + oneRecord[1] + "" + ShowCaptain(oneRecord) + "" + oneRecord[2 + lang] + "
"); // return arrHtml1.join(''); // } // //中场 // this.ShowMidfielder = function() { // var arrHtml1 = new Array(); // arrHtml1.push("
Midfielder
"); // arrHtml1.push(""); // for (var i = 0; i < midfielder.length; i++) { // var oneRecord = midfielder[i]; // arrHtml1.push("") // } // arrHtml1.push("
" + oneRecord[1] + "" + ShowCaptain(oneRecord) + "" + oneRecord[2 + lang] + "
"); // return arrHtml1.join(''); // } // //前锋 // this.ShowVanguard = function() { // var arrHtml1 = new Array(); // arrHtml1.push("
Striker
"); // arrHtml1.push(""); // for (var i = 0; i < vanguard.length; i++) { // var oneRecord = vanguard[i]; // arrHtml1.push("") // } // arrHtml1.push("
" + oneRecord[1] + "" + ShowCaptain(oneRecord) + "" + oneRecord[2 + lang] + "
"); // return arrHtml1.join(''); // } // //转会:转出 // this.ShowTurnOut = function() { // var arrHtml1 = new Array(); // arrHtml1.push("
Departure
"); // arrHtml1.push(""); // arrHtml1.push(""); // arrHtml1.push("
 No Information
"); // return arrHtml1.join(''); // } // //转会:转入 // this.ShowTurnIn = function() { // var arrHtml1 = new Array(); // arrHtml1.push("
Join in
"); // arrHtml1.push(""); // arrHtml1.push(""); // arrHtml1.push("
 No Information
"); // return arrHtml1.join(''); // } // function ShowCaptain(oneRecord) { // if (Object.prototype.toString.call(oneRecord) !== '[object Array]' || oneRecord.length < 6) { // return ''; // } // var imageUlr = "/images/" // switch (oneRecord[5]) { // case 1: return 'captain'; break; // case 5: return 'vicecaptain'; break; // } // return ''; // } // //document.getElementById("i_right").innerHTML = "
" + this.ShowGoalkeeper() + this.ShowRearguard() + this.ShowMidfielder() + this.ShowVanguard() + this.ShowTurnOut() + this.ShowTurnIn() + "
"; } //头部信息 function mainTitle(teamDetail) { var ri = new rightSide(); var coachID = 0, coachName = ""; if (window.coach && window.coach.length) { coachID = ri.Decrypt(coach[0][0]); coachName = coach[0][2] || coach[0][4]; } var mainDiv = document.getElementById("mainTitle"); var address = teamDetail[15] && !/[\u4E00-\u9FA5]/.test(teamDetail[15]) ? teamDetail[15] : "";//忽略中文 var coachUrl = teamDetail[13]; //修正部分不是http开头的网址 if (coachUrl !== null && coachUrl.indexOf("www") == 0) { coachUrl = "//" + coachUrl; } mainDiv.innerHTML = _$("tplMainTitle").innerHTML.format( /*0*/(teamDetail[4] == "" ? _teamIcon : changeGif("/Image/team/" + teamDetail[4]) + "?" + Math.floor(Math.random() * 10)), /*1*/teamDetail[3] == "" ? teamDetail[2] : teamDetail[3], /*2*/_moduleKey == 'thai' || _moduleKey == 'vn' ? teamDetail[2] : "", /*3*/handleEmpty(teamDetail[7]), /*4*/handleEmpty(teamDetail[10]), /*5*/handleEmpty(teamDetail[11]), /*6*/handleEmpty(dateToTime(teamDetail[12])), /*7*/"", /*8*/(coachID == 0 ? handleEmpty(coachName) : "" + handleEmpty(coachName) + ""), /*9*/coachUrl, /*10*/!teamDetail[13] ? "hide" : "", /*11*/handleEmpty(address)); try { if (typeof (forLoc) != "undefined" && forLoc) { var indItem = document.getElementById("introduce1"); if (indItem && teamDetail[14] != "") indItem.innerHTML = teamDetail[14]; //把不需要显示球队简介的id给去掉则抛出异常 else { if (document.getElementById("introduce_div")) document.getElementById("introduce_div").style.display = "none"; } } else { var indItem = document.getElementById("introduce"); if(indItem) indItem.style.display = "none"; } guiderBar(); } catch (e) { } //初始化关注图标 if (Config.getFavTeamIds().indexOf(teamDetail[0].toString()) != -1) { $("#favTeamIcon").addClass("on"); $("#favTeamIcon").html(_locModel.T.T_Btn_Following + ""); }; } function guiderBar() { if (!_$("guiderBarList")) return; var html = new Array(); html.push(getGuiderLi("/", _locModel.T.T_Database)); if (typeof (arrLeague) != "undefined" && arrLeague[0]) { if (arrLeague[0] == 91) html.push(getGuiderLi("/fifa.html", arrLeague[3], 1)); //国家队转到世界排名页面 else html.push(getGuiderLi("/leagueinfo/" + arrLeague[0] + ".html", arrLeague[3], 1)); } document.getElementById('guiderBarList').innerHTML = html.join(''); } function getGuiderLi(link, title, lastf) { return [ '
  • ', '', title == '' ? '' : '' + title + '', '
  • ' ].join(''); } function handleEmpty(str) { if (CheckEmpty(str)) { return "-"; } else { return str; } };