var _mainWebDomain = '//live3.bongdalu808.com/';var _livescoreWebDomain = '//live3.bongdalu808.com/';var _dataWebDomain = '//data.bongdalu808.com/';var _basketballWebDomain = '//basketball.bongdalu808.com/';var _footballWebDomain = '//football1.bongdalu808.com/';var _cmsWebDomain = 'https://tips.bongdalu808.com/';var _infoWebDomain = '//football1.bongdalu808.com/';var _touchWebDomain = '//www.bongdalu42.com/';var _freeWebDomain = '//free.bongdalulink.com/';var _freeAppDomain = '//www.bongdpro.com/';var _domain = 'bongdalu808';var _tail = 'com';var _defaultOddsType = '5';var _defaultTimeZone = '7';var _leagueNameIdx = '8';var _isNewOddsTxt = '1';var _upDownColorType = '0';var _oddsOrder = '1-3-2';var _moduleKey = 'Vn';var _websocket = true;var _wsUrl = 'live3.bongdalu808.com:9800';var _cdnWebDomain = '//img_cms.thscore.fun/';var _substationType = 0;var _isForApp = false;var _needToken = false;;
var ICONFONT = {
DETAIL: "",
LINEUP: "",
ANALYSIS: "",
ODDS: "",
FLASH: "",
FLASHON: "",
BASKETBALL: "",
HIGHLIGHT: "",
FLASH_LQ: "",
FLASHON_LQ: "",
FAV_MATCH: "",
FAV_LEAGUE: ""
}
var ODDSTYPE = {
NONE : 0,
//让球
AH : 1,
//欧赔
OP : 2,
//大小
OU : 3,
//角球大小
CORNEROU : 4,
//波胆
BODAN : 5,
//欧洲让分
EUROAH : 6,
//双色彩
DOUBLECHANCE : 7
}
Object.freeze(ODDSTYPE);
//篮球盘口类型
var LQHANDICAP = {
//第一节
FIRST : 1,
//第二节
SECOND : 2,
//上半场
HALF : 3,
//第三节
THREE : 4,
//第四节
FOUR : 5,
//全场
FULL : 6,
//滚球
RUNNING : 7
}
Object.freeze(LQHANDICAP);;
var headtime = new Date();
var timeZone = new Date().getTimezoneOffset() / -60;
function _$(id) {
return document.getElementById(id);
}
function _$$(name) {
return document.getElementsByName(name);
}
function getCookie(name) {
var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
if (arr = document.cookie.match(reg))
return unescape(arr[2]);
return null;
}
function writeCookie(name, value, expireVal) {
if (typeof (_appModule) != 'undefined' && (_appModule == "Ind" || _appModule == "Bola")) {
writeShareCookie(name, value, expireVal);
return;
}
var expire = expireVal;
var hours = 365;
if (expire == undefined)
expire = new Date((new Date()).getTime() + hours * 3600000);
expire = ";path=/;expires=" + expire.toGMTString();
document.cookie = name + "=" + escape(value) + expire;
}
function clearCookie(name) {
writeCookie(name, "", new Date());
}
function getDoMain() {
var arrDoms = location.href.split("/")[2].split(".");
var isNum = /^\d+$/;
if (isNum.test(arrDoms[1]))
return arrDoms[0] + "." + arrDoms[1] + "." + arrDoms[2] + "." + arrDoms[3].split(":")[0];
else
return arrDoms[1] + "." + arrDoms[2];
}
//写跨子域cookie
function writeShareCookie(name, value, expireVal) {
var expire = expireVal;
var hours = 365;
if (expire == undefined)
expire = new Date((new Date()).getTime() + hours * 3600000);
expire = ";path=/;expires=" + expire.toGMTString() + ";domain=" + getDoMain();
document.cookie = name + "=" + escape(value) + expire;
}
function WriteSession(name, value) {
window.sessionStorage.setItem(name, value);
}
function GetSession(name) {
return window.sessionStorage.getItem(name)
}
function MM_findObj(n, d) { //v4.01
var p, i, x; if (!d) d = document; if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
d = parent.frames[n.substring(p + 1)].document; n = n.substring(0, p);
}
if (!(x = d[n]) && d.all) x = d.all[n]; for (i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n];
for (i = 0; !x && d.layers && i < d.layers.length; i++) x = MM_findObj(n, d.layers[i].document);
if (!x && d.getElementById) x = d.getElementById(n); return x;
}
function MM_showHideLayers() { //v6.0
var i, p, v, obj, args = MM_showHideLayers.arguments;
for (i = 0; i < (args.length - 2); i += 3) if ((obj = MM_findObj(args[i])) != null) {
v = args[i + 2];
if (obj.style) { obj = obj.style; v = (v == 'show') ? 'visible' : (v == 'hide') ? 'hidden' : v; }
if (v == "none" || v == "block") {
obj.display = v;
} else {
obj.visibility = v;
}
}
}
function getIENumber() {
var ieNum = 0;
try {
if (document.all && typeof (document.documentMode) != "undefined")
ieNum = document.documentMode;
return ieNum;
}
catch (e) {
ieNum = 0;
return ieNum;
}
}
function getNodeContent(node) {
if (!node) return null;
var ret = node.textContent;
if (!ret) return node.text;
else return ret;
}
var startani_C, startani_A, startani_B, pop_TC;
var oPopup;
try { oPopup = window.createPopup(); }
catch (e) { }
/*进球弹窗*/
function ShowCHWindow(str, matchnum) {
imagewidth = 460;
/*imageheight = 28 + 27 * matchnum;*/
imageheight = 28 + 27;
x = 280;
x = (screen.width - imagewidth) / 2;
y = 1;
oPopupBody = oPopup.document.body;
oPopupBody.innerHTML = str;
oPopupBody.style.cursor = "pointer";
oPopupBody.title = "Hit to close";
oPopupBody.onclick = dismisspopup;
oPopupBody.oncontextmenu = dismisspopup;
pop_TC = 40;
pop();
}
function pop() {
try {
oPopup.show(x, y, imagewidth, imageheight);
startani_A = setTimeout("pop()", 300); //显示15秒
if (pop_TC < 0) { dismisspopup(); };
pop_TC = pop_TC - 1;
} catch (e) { }
}
function dismisspopup() {
clearTimeout(startani_A);
oPopup.hide();
}
var goal = 0, goalTime;
function ShowCHWindow123(str) {
document.getElementById("div_goal").innerHTML = str;
document.getElementById("div_goal").style.display = "";
document.getElementById('div_goal').style.left = (document.body.parentElement.offsetWidth / 2 - 230) + "px";
goal = 20;
window.clearTimeout(goalTime);
showTime();
}
function showTime(opt) {
if (opt == 1) {
goal = -1;
}
if (goal < 0) {
document.getElementById("div_goal").innerHTML = "";
document.getElementById("div_goal").style.display = "none";
window.clearTimeout(goalTime);
return;
}
goal -= 1;
goalTime = window.setTimeout("showTime()", 1000);
}
function convertIntToTimeText(t1, t2, t3, t4, t5, t6, type) {
var ot = new Date(t1, t2, t3, t4, t5, t6);
t = ToLocalTime(ot);
var str = "" + timeToText(ToLocalTime(ot), 14) + "";
if (type == 1) {
str = "" + timeToText(ToLocalTime(ot), 6) + "";
} else if (type == 2) {
str = "" + timeToText(ToLocalTime(ot), 16) + "";
} else if (type == 3) {
str = "" + timeToText(ToLocalTime(ot), 21) + "";
} else if (type == 4) {
str = "" + timeToText(ToLocalTime(ot), 19) + "";
}
document.write(str);
}
//去除Html标签(连带标签里面内容)
function skipHtmlTagBoth(str) {
if (str != null) str = str.replace(/<.*>.*<\/.*>/gi, "");
return str;
}
//去除Html标签(保留标签里面内容)
function skipHtmlTag(str) {
if (str != null) str = str.replace(/<[^>]+>/g, "");
return str;
}
function isTouch() {
return (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent) || /Android/i.test(navigator.userAgent));
}
function OpenMobile() {
if (!CheckEmpty(_touchWebDomain)) {
if (_appModule == "Pt" || _appModule == "World" || _appModule == "Kor" || _appModule == "Bola" || _appModule == "Ind") {
/* 统计两端流转用 */
window.open(_touchWebDomain + "?from=pc")
} else {
window.open(_touchWebDomain);
}
}
}
function OpenFreeApp() {
if (!CheckEmpty(_freeAppDomain)) window.open(_freeAppDomain);
}
function OpenFbSclass(ID) {
if (ID == null || ID == '' || ID == 0) return false;
window.open(_footballWebDomain + "leagueinfo/" + ID);
}
function goFbInfoRank(id) {
if (id == null)
return false;
window.open(_footballWebDomain + "standing/" + id);
}
function goBkInfoRank(id) {
if (id == null)
return false;
window.open(_basketballWebDomain + "standing/" + id);
}
var zXml = {
useActiveX: (typeof ActiveXObject != "undefined"),
useXmlHttp: (typeof XMLHttpRequest != "undefined")
};
zXml.ARR_XMLHTTP_VERS = ["Msxml2.XMLHTTP", "Microsoft.XMLHTTP"];
function zXmlHttp() { }
zXmlHttp.createRequest = function () {
if (zXml.useXmlHttp) return new XMLHttpRequest();
if (zXml.useActiveX) {
if (!zXml.XMLHTTP_VER) {
for (var i = 0; i < zXml.ARR_XMLHTTP_VERS.length; i++) {
try {
new ActiveXObject(zXml.ARR_XMLHTTP_VERS[i]);
zXml.XMLHTTP_VER = zXml.ARR_XMLHTTP_VERS[i];
break;
} catch (oError) { }
}
}
if (zXml.XMLHTTP_VER) return new ActiveXObject(zXml.XMLHTTP_VER);
}
alert("Sorry,XML object unsupported by your computer,please setup XML object or change explorer.");
};
function GetLocalTime(t) {
var t1 = t.split(",");
var t2 = new Date(t1[0], t1[1], t1[2], t1[3], t1[4], t1[5]);
return new Date(Date.UTC(t2.getFullYear(), t2.getMonth(), t2.getDate(), t2.getHours(), t2.getMinutes(), t2.getSeconds()));
}
//时间类型转换
function TransferTimeType(curType) {
if (curType == 1) {
return 13;
}
else if (curType == 2) {
return 18;
}
else if (curType == 3) {
return 2;
}
else if (curType == 4) {
return 4;
}
else if (curType == 6) {
return 6;
}
else if (curType == 7) {
return 7;
}
else if (curType == 20) {
return 20;
}
else if (curType == 30) {
return 3;
}
else {
return 1;
}
}
function formatDate(t, type) {
var strTime = "";
var t1 = t.split(",");
var t2 = new Date(t1[0], eval(t1[1]), t1[2], t1[3], t1[4], t1[5]);
t2 = new Date(Date.UTC(t2.getFullYear(), t2.getMonth(), t2.getDate(), t2.getHours(), t2.getMinutes(), t2.getSeconds()));
strTime = timeToText(t2, TransferTimeType(type));
document.write(strTime);
}
function formatTime2(t) {
var h = t.getHours();
var m = t.getMinutes();
var result = "";
if (h < 10) h = "0" + h;
if (m < 10) m = "0" + m;
return h + ":" + m;
}
//兼容三种日期格式[2019,4,30,07,00,00],[2019,5-1,30,07,00,00],[2019-4-30 07:00:00]
function convertTime(t, moonfix) {
var d = moonfix == 1 ? 1 : 0;
if (t.indexOf(':') != -1) {
t = t.replace(/-/g, ",").replace(/\ /g, ",").replace(/:/g, ",");
d = 1;
}
var t = t.split(",");
t[1] = eval(t[1]) - d;
var t2 = new Date(t[0], t[1], t[2], t[3], t[4]);
return t2;
}
//针对yyyyMMdd这种格式字符窜转为日期
function ParseTime(t, isUtc) {
var strTime = "";
var t1 = new Date(t.substr(0, 4), parseInt(t.substr(4, 2).replace(/0(\d)/, "$1")) - 1, t.substr(6, 2), t.substr(8, 2), t.substr(10, 2));
var localT = new Date(t1.getTime() + (_timeZone * 60 * 60000) - (8 * 3600000));
if (isUtc) {
localT = new Date(t1.getTime() + (_timeZone * 60 * 60000));
}
strTime = localT;
if (strTime) {
return strTime;
}
return t;
}
function dateToTime(time) {
var tReg = /(\d{2})-(\d{1,2})-(\d{1,2})([\s\d\:]*)/;
if (tReg.test(time)) {
time = ("20" + time).replaceAll("-", "/");
return timeToText(new Date(time), 2);
}
return time;
}
function timeToText(t2, type) {
type = type || 0;
var fmts = [
"dd-MM-yyyy hh:mm:ss",/*0*/
"dd-MM-yyyy hh:mm:ss",/*1*/
"dd-MM-yyyy",/*2*/
"dd-MM",/*3*/
"hh:mm",/*4*/
"t2 dd",/*5*/
"dd-MM hh:mm",/*6*/
"dd-MM-yy",/*7*/
"yyyy",/*8*/
"dd.MM.yyyy",/*9*/
"t2 dd hh:mm",/*10*/
"hh:mm,ww,dd-MM-yyyy",/*11*/
"dd-MM-yyyy(w)",/*12*/
"dd-MM-yyyy hh:mm w",/*13*/
"dd-MM hh:mm",/*14*/
"dd-MM hh:mm",/*15*/
"dd-MM-yy",/*16*/
"dd-MM-yyyy",/*17*/
"dd-MM-yyyy hh:mm",/*18*/
"d-M-yyyy hh:mm",/*19*/
"yyyy.MM.dd hh:mm",/*20*/
"M-d hh:mm", /*21*/
"dd t2 yyyy,hh:mm", /*22*/
"dd/MM/yyyy hh:mm" /*23*/
];
return dateFtt(fmts[type] || fmts[0], t2);
}
function setTimeByFormat() {
var elems = document.querySelectorAll("[data-time]");
for (var i = 0; i < elems.length; i++) {
var elem = elems[i], t2;
t2 = getTimeByUtcStr(elem.getAttribute("data-time"));
elem.innerHTML = timeToText(t2, elem.getAttribute("data-fmt"));
}
}
function setPublishTime() {
$("[data-pubtime]").each(function () {
var pubTime = this.getAttribute("data-pubtime");
this.innerHTML = publishTimeDesc(pubTime, this.getAttribute("data-fmt"));
});
}
function publishTimeDesc(dtSplit, format) {
var time = null;
if (dtSplit instanceof Date) {
time = dtSplit;
}
else {
time = getTimeByUtcStr(dtSplit);
}
var timeZoneHour = -((new Date()).getTimezoneOffset() / 60);
var customTimeZone = getCookie("Time_Zone");
if (customTimeZone != undefined && customTimeZone != "") {
timeZoneHour = customTimeZone;
}
//time和now均为utc+所选时区的时间,直接求差即可
var d1 = new Date();
var d2 = new Date(d1.getUTCFullYear(), d1.getUTCMonth(), d1.getUTCDate(), d1.getUTCHours(), d1.getUTCMinutes(), d1.getUTCSeconds());
var now = new Date(d2.getTime() + (timeZoneHour * 60 * 60000));
var t_jb = _locModel.T.T_JustBefore || "Just now";
var t_hb = _locModel.T.T_FM_HoursBefore || "{0} Hours Ago";
var t_mb = _locModel.T.T_FM_MinutesBefore || "{0} Minutes Ago";
var timespan = (now - time) / (3600 * 1000);
if (timespan < 0.1) {
return t_jb;
}
else if (timespan < 1) {
return t_mb.replace("{0}", (parseFloat(timespan).toFixed(2) * 60).toFixed(0));
}
else if (timespan < 24) {
return t_hb.replace("{0}", parseInt(timespan));
}
return timeToText(time, format);
}
//2015,01,01,12,30,00
function getTimeByUtcStr(val) {
var t = splitTime(val);
var timeZoneHour = -((new Date()).getTimezoneOffset() / 60);
var customTimeZone = getCookie("Time_Zone");
if (customTimeZone != undefined && customTimeZone != "") {
timeZoneHour = customTimeZone;
}
var t2 = new Date(t[0], t[1], t[2], t[3], t[4], t[5]);
t2 = new Date(t2.getFullYear(), t2.getMonth(), t2.getDate(), t2.getHours(), t2.getMinutes(), t2.getSeconds());
t2 = new Date(t2.getTime() + (timeZoneHour * 60 * 60000));
return t2;
}
//兼容三种日期格式[2019,4,30,07,00,00],[2019,5-1,30,07,00,00],[2019-4-30 07:00:00]
function splitTime(t) {
var d = 0;
if (t.indexOf(':') != -1) {
t = t.replace(/(-|\s|:)/g, ",");
d = 1;
}
var t = t.split(",");
t[1] = eval(t[1]) - d;
return t;
}
var _months2 = (typeof (_locModel) != "undefined" && typeof (_locModel.T.T_S_Jan) != "undefined") ? [_locModel.T.T_S_Jan, _locModel.T.T_S_Feb, _locModel.T.T_S_Mar, _locModel.T.T_S_Apr, _locModel.T.T_S_May, _locModel.T.T_S_Jun, _locModel.T.T_S_Jul, _locModel.T.T_S_Aug, _locModel.T.T_S_Sep, _locModel.T.T_S_Oct, _locModel.T.T_S_Nov, _locModel.T.T_S_Dec] : ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
var _months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
var _weeks = (typeof (_locModel) != "undefined" && typeof (_locModel.T.T_Sunday) != "undefined") ? [_locModel.T.T_Sunday, _locModel.T.T_Monday, _locModel.T.T_Tuesday, _locModel.T.T_Wednesday, _locModel.T.T_Thursday, _locModel.T.T_Friday, _locModel.T.T_Saturday] : ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
var _weeks2 = (typeof (_locModel) != "undefined" && typeof (_locModel.T.T_S_Sunday) != "undefined") ? [_locModel.T.T_S_Sunday, _locModel.T.T_S_Monday, _locModel.T.T_S_Tuesday, _locModel.T.T_S_Wednesday, _locModel.T.T_S_Thursday, _locModel.T.T_S_Friday, _locModel.T.T_S_Saturday] : ["Sun.", "Mon.", "Tue.", "Wed.", "Thu.", "Fri.", "Sat."];
var _hasInitDateFormat = 0;
function dateFtt(fmt, t) {
if (_hasInitDateFormat == 0) {
_months2 = (typeof (_locModel) != "undefined" && typeof (_locModel.T.T_S_Jan) != "undefined") ? [_locModel.T.T_S_Jan, _locModel.T.T_S_Feb, _locModel.T.T_S_Mar, _locModel.T.T_S_Apr, _locModel.T.T_S_May, _locModel.T.T_S_Jun, _locModel.T.T_S_Jul, _locModel.T.T_S_Aug, _locModel.T.T_S_Sep, _locModel.T.T_S_Oct, _locModel.T.T_S_Nov, _locModel.T.T_S_Dec] : ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
_weeks = (typeof (_locModel) != "undefined" && typeof (_locModel.T.T_Sunday) != "undefined") ? [_locModel.T.T_Sunday, _locModel.T.T_Monday, _locModel.T.T_Tuesday, _locModel.T.T_Wednesday, _locModel.T.T_Thursday, _locModel.T.T_Friday, _locModel.T.T_Saturday] : ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
_weeks2 = (typeof (_locModel) != "undefined" && typeof (_locModel.T.T_S_Sunday) != "undefined") ? [_locModel.T.T_S_Sunday, _locModel.T.T_S_Monday, _locModel.T.T_S_Tuesday, _locModel.T.T_S_Wednesday, _locModel.T.T_S_Thursday, _locModel.T.T_S_Friday, _locModel.T.T_S_Saturday] : ["Sun.", "Mon.", "Tue.", "Wed.", "Thu.", "Fri.", "Sat."];
_hasInitDateFormat = 1;
}
var o = {
"M+": t.getMonth() + 1,//month
"d+": t.getDate(),//day
"h+": t.getHours(),//hours
"m+": t.getMinutes(),//minutes
"s+": t.getSeconds(),//second
"t1": _months[t.getMonth()],//month name
"t2": _months2[t.getMonth()],//simp month
"w+": _weeks[t.getDay()]//week
};
if (/(y+)/.test(fmt))
fmt = fmt.replace(RegExp.$1, (t.getFullYear() + "").substr(4 - RegExp.$1.length));
for (var k in o)
if (new RegExp("(" + k + ")").test(fmt))
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1 || /[tw]/.test(k)) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
return fmt;
}
function ToLocalTime(t) {
t = typeof (t) != 'string' ? new Date(t) : new Date(t.replace(/-/g, '/')); //兼容旧苹果横杠日期格式报错问题
var localT = new Date(t.getTime() + (_timeZone * 60 * 60000));
return localT;
}
function ServiceTimeToLocal(t) {
localT = new Date(t * 1000 - (8 * 60 * 60000) + (_timeZone * 60 * 60000));
return localT;
}
Array.prototype.contains = function (obj) {
var i = this.length;
while (i--) {
if (this[i] == obj) {
return true;
}
}
return false;
}
if (!Array.prototype.indexOf) {
Array.prototype.indexOf = function (elt /*, from*/) {
var len = this.length >>> 0;
var from = Number(arguments[1]) || 0;
from = (from < 0)
? Math.ceil(from)
: Math.floor(from);
if (from < 0)
from += len;
for (; from < len; from++) {
if (from in this &&
this[from] === elt)
return from;
}
return -1;
};
}
function checkExlink(a22) {
var spSymbel = "$";
if (a22.indexOf(spSymbel) != -1) {
var retArr = a22.split(spSymbel);
if (retArr.length == 3)
return retArr[0] + retArr[2];
else return retArr[0];
}
return a22;
}
function showExplain(exlist, hometeam, guestteam) {
// 广东体育; 1 | 1; 2 | 5; 12 | 90, 1 - 1; 2 - 2; 1, 2 - 2; 5 - 4; 1
//;|1;2|;|90,3-3;2-5;2,2-2;;
hometeam = hometeam.replace(/<[^>].*?>/g, "");
guestteam = guestteam.replace(/<[^>].*?>/g, "");
hometeam = hometeam.replace("(N)", "");
guestteam = guestteam.replace("(N)", "");
var explainList = "";
if (exlist != "") {
if (exlist.indexOf('|') > -1) {
var arrExplain = exlist.split('|');
if (arrExplain[1].split(';')[0] != "") {
explainList += _locModel.T.T_KickOff + "(";
if (arrExplain[1].split(';')[0] == "1")
explainList += hometeam + ")";
else if (arrExplain[1].split(';')[0] == "2")
explainList += guestteam + ")";
}
if (arrExplain[1].split(';')[1] != "" && window.location.href.toLowerCase().indexOf("asianbookie") == -1 && window.location.href.toLowerCase().indexOf("free") == -1) {
if (arrExplain[1].split(';')[1] == "3" || arrExplain[1].split(';')[1] == "4" || arrExplain[1].split(';')[1] == "5") {
if (explainList != "")
explainList += "
";
explainList += "[Live TV]";
}
}
if (arrExplain[2].split(';')[0] != "") {
if (explainList != "")
explainList += "
";
explainList += _locModel.T.T_Corner + "(" + arrExplain[2].split(';')[0] + ") | ";
explainList += _locModel.T.T_Corner + "(" + arrExplain[2].split(';')[1] + ")";
}
var scoresList = arrExplain[3].split(';');
if (scoresList[0] != "") {
if (explainList != "")
explainList += "
";
explainList += scoresList[0].split(',')[0] + _locModel.T.T_S_Minutes + "[" + scoresList[0].split(',')[1] + "], ";
if (scoresList[1] != "")
explainList += _locModel.T.T_TwoRounds + "[" + scoresList[1] + "], ";
if (scoresList[2] != "") {
if (scoresList[2].split(',')[0] == "1")
explainList += "120" + _locModel.T.T_S_Minutes + "[" + scoresList[2].split(',')[1] + "], ";
else
explainList += _locModel.T.T_ST_Ot + "[" + scoresList[2].split(',')[1] + "], ";
}
if (scoresList[3] != "")
explainList += _locModel.T.T_Explain_Pen + "[" + scoresList[3] + "], ";
if (scoresList[4] != "") {
if (scoresList[4] == "1") explainList += hometeam + " " + _locModel.T.T_Win;
else if (scoresList[4] == "2") explainList += guestteam + " " + _locModel.T.T_Win;
}
}
}
}
return explainList;
}
if (!window.ActiveXObject) {
HTMLElement.prototype.insertAdjacentElement = function (where, parsedNode) {
if (parsedNode) {
switch (where) {
case "beforeBegin":
this.parentNode.insertBefore(parsedNode, this);
break;
case "afterBegin":
this.insertBefore(parsedNode, this.firstChild);
break;
case "beforeEnd":
this.appendChild(parsedNode);
break;
case "afterEnd":
if (this.nextSibling)
this.parentNode.insertBefore(parsedNode, this.nextSibling);
else
this.parentNode.appendChild(parsedNode);
break;
}
}
}
}
function getTopHeight() {
var adTop = 0;
if (document.documentElement && document.documentElement.scrollTop)
adTop = document.documentElement.scrollTop;
else if (document.body)
adTop = document.body.scrollTop
else
adTop = window.pageYOffset;
return adTop;
}
function getPageHeight() {
var pageHeight = window.innerHeight;
if (typeof pageWindth != "number") {
if (document.compatMode == "CSS1Compat") {
pageHeight = document.documentElement.clientHeight;
}
else {
pageHeight = document.body.clientHeight;
}
}
return pageHeight;
}
function getElementPos(elementId, elem) {
var ua = navigator.userAgent.toLowerCase();
var isOpera = (ua.indexOf('opera') != -1);
var isIE = (ua.indexOf('msie') != -1 && !isOpera); // not opera spoof
var el = document.getElementById(elementId);
if (elem) el = elem;
if (el.parentNode === null || el.style.display == 'none') {
return false;
}
var parent = null;
var pos = [];
var box;
if (el.getBoundingClientRect) //IE
{
box = el.getBoundingClientRect();
var scrollTop = Math.max(document.documentElement.scrollTop, document.body.scrollTop);
var scrollLeft = Math.max(document.documentElement.scrollLeft, document.body.scrollLeft);
return { x: box.left + scrollLeft, y: box.top + scrollTop };
} else if (document.getBoxObjectFor) // gecko
{
box = document.getBoxObjectFor(el);
var borderLeft = (el.style.borderLeftWidth) ? parseInt(el.style.borderLeftWidth) : 0;
var borderTop = (el.style.borderTopWidth) ? parseInt(el.style.borderTopWidth) : 0;
pos = [box.x - borderLeft, box.y - borderTop];
} else // safari & opera
{
pos = [el.offsetLeft, el.offsetTop];
parent = el.offsetParent;
if (parent != el) {
while (parent) {
pos[0] += parent.offsetLeft;
pos[1] += parent.offsetTop;
parent = parent.offsetParent;
}
}
if (ua.indexOf('opera') != -1 || (ua.indexOf('safari') != -1 && el.style.position == 'absolute')) {
pos[0] -= document.body.offsetLeft;
pos[1] -= document.body.offsetTop;
}
}
if (el.parentNode) {
parent = el.parentNode;
} else {
parent = null;
}
while (parent && parent.tagName != 'BODY' && parent.tagName != 'HTML') { // account for any scrolled ancestors
pos[0] -= parent.scrollLeft;
pos[1] -= parent.scrollTop;
if (parent.parentNode) {
parent = parent.parentNode;
} else {
parent = null;
}
}
return { x: pos[0], y: pos[1] };
}
function returnTop() {
var top = getTopHeight();
var scrollHeight = document.documentElement.scrollHeight || document.body.scrollHeight; //滚动条总高度
var windowHeight = document.documentElement.clientHeight || document.body.clientHeight; //可视区域高度
var bottom = scrollHeight - top - windowHeight; //滚动条距底部距离
var rt = document.getElementById("backTop");
var rb = document.getElementById("toBottom");
if (top > 150) {
rt.style.display = "";
}
else rt.style.display = "none";
if (bottom == 0 && rb) {
rb.style.display = "none";
}
else if (rb) rb.style.display = "";
setTimeout("returnTop();", 100);
}
var X2 = {} //my namespace:)
X2.Eval = function (code) {
if (!!(window.attachEvent && !window.opera)) {
//ie
execScript(code);
} else {
//not ie
window.eval(code);
}
}
var FloatHelper = {
DecimalLength: function (num) { //The length of the decimal
var eSplit = num.toString().split(/[eE]/);
var len = (eSplit[0].split('.')[1] || '').length - Number(eSplit[1] || 0);
return len > 0 ? len : 0;
},
Operator: function (arg1, arg2, sign) {//sign:1 is subtraction, 2 is multiplication, 3 is division, others are addition
var r1 = this.DecimalLength(arg1), r2 = this.DecimalLength(arg2);
var n = Math.max(r1, r2);
var m = Math.pow(10, n);
switch (sign) {
case "*": case 2: n = r1 + r2, rv = ((arg1 * Math.pow(10, r1)) * (arg2 * Math.pow(10, r2))) / Math.pow(10, n); break;
case "/": case 3:
if (n < 3) n = 3;
rv = (arg1 * m) / (arg2 * m);
break;
case "%": case 4: rv = ((arg1 * m) % (arg2 * m)) / m; break;
case "-": case 1: rv = (arg1 * m - arg2 * m) / m; break;
default: rv = (arg1 * m + arg2 * m) / m; break;//"+"
}
return parseFloat(rv.toFixed(n));
}
}
var oTool = {
USJson: { 0.22: -450, 0.28: -350, 0.33: -300, 0.36: -275, 0.38: -267, 0.44: -225, 0.47: -212.5, 0.53: -187.5, 0.57: -175, 0.62: -162.5, 0.63: -160, 0.66: -150, 0.72: -137.5, 0.83: -120, 0.88: -114, 0.91: -110, 0.95: -105 },
fractionJson: { 0.22: "2/9", 0.28: "2/7", 0.33: "1/3", 0.36: "4/11", 0.38: "3/8", 0.44: "4/9", 0.47: "40/85", 0.53: "8/15", 0.57: "4/7", 0.62: "8/13", 0.63: "5/8", 0.66: "4/6", 0.72: "8/11", 0.83: "5/6", 0.88: "7/8", 0.91: "10/11", 0.95: "20/21" },
getPL: function (ot, hVal, pVal, gVal, isEu) {
if (isEu && ot != 3 && ot != '3' && ot != 6 && ot != '6') return [this.toFixZero(hVal), this.toFixZero(pVal), this.toFixZero(gVal)];
switch (ot) {
case 1: case '1'://HK
return [hVal, pVal, gVal];
break;
case 2: case '2'://Ind
if (isEu) return [hVal, pVal, gVal];
return [this.toIN(hVal), pVal, this.toIN(gVal)];
break;
case 3: case '3'://US
if (isEu) return [this.toUSEu(hVal), this.toUSEu(pVal), this.toUSEu(gVal)];
return [this.toUS(hVal), pVal, this.toUS(gVal)];
break;
case 4: case '4'://Europe
return [this.toEU(hVal), pVal, this.toEU(gVal)];
break;
case 5: case '5'://ML
if (isEu) return [hVal, pVal, gVal];
return [this.toML(hVal), pVal, this.toML(gVal)];
break;
case 6: case '6'://Fraciton
if (isEu) return [this.toFractionEu(hVal), this.toFractionEu(pVal), this.toFractionEu(gVal)];
return [this.toFraction(hVal), pVal, this.toFraction(gVal)];
break;
}
},
changePL: function (ot, val, isEu) {
if (!parseFloat(val)) return val;
if (isEu && ot != 3 && ot != '3' && ot != 6 && ot != '6') return this.toFixZero(val);
switch (ot) {
case 1: case '1'://HK
return this.toFixZero(val);
break;
case 2: case '2'://Ind
return this.toIN(val);
break;
case 3: case '3'://US
if (isEu) return this.toUSEu(val);
return this.toUS(val);
break;
case 4: case '4'://Europe
return this.toEU(val);
break;
case 5: case '5'://ML
return this.toML(val);
break;
case 6: case '6'://Fraciton
if (isEu) return this.toFractionEu(val);
return this.toFraction(val);
break;
}
},
toIN: function (val) {
if (!val) return "";
var fVal = parseFloat(val);
var p = this.countDecimal(fVal) > 2 ? 3 : 2;
return (fVal < 1) ? (0 - 1 / fVal).toFixed(p) : this.toFixZero(val);
},
toML: function (val) {
if (!val) return "";
var fVal = parseFloat(val);
var p = this.countDecimal(fVal) > 2 ? 3 : 2;
return (fVal > 1) ? (0 - 1 / fVal).toFixed(p) : this.toFixZero(val);
},
toEU: function (val) {
if (!val) return "";
var fVal = parseFloat(val);
var p = this.countDecimal(fVal) > 2 ? 3 : 2;
return (fVal + 1).toFixed(p);
},
toUS: function (val) {
if (!val) return "";
var fVal = parseFloat(val);
var p = this.countDecimal(fVal) > 2 ? 3 : 2;
var oJson = oTool.USJson;
if (fVal in oJson)
return oJson[fVal];
var res = 0;
if (fVal <= 0)
res = 0;
else if (fVal < 1)
res = Math.round(0 - 100 * ((1 / fVal).toFixed(p)));
else
res = Math.round(100 * fVal);
return res > 0 ? "+" + res : res;
},
toUSEu: function (val) {
if (!val) return "";
var fVal = parseFloat(val);
var p = this.countDecimal(fVal) > 2 ? 3 : 2;
if (!fVal || isNaN(fVal)) return "";
fVal = FloatHelper.Operator(fVal, 1, "-");
var oJson = oTool.USJson;
if (fVal in oJson)
return oJson[fVal];
if (fVal == 0) return "0";
var res = 0;
if (fVal < 1)
res = Math.round(0 - 100 * ((1 / fVal).toFixed(p)));
else
res = Math.round(100 * fVal);
return res > 0 ? "+" + res : res;
},
toFraction: function (val) {//Fractional conversion
var fVal = parseFloat(val);
if (fVal.toString() == "NaN") return "";
var f = fVal < 0;
if (f) fVal = Math.abs(fVal);
var fra = { n: 0, m: 1 };//n/m
var num = 0;
if (fVal > 1)
fVal = FloatHelper.Operator(fVal, num = fVal | 0, "-");
var oJson = oTool.fractionJson;
if (fVal in oJson) {
var arr = oJson[fVal].split("/");
fra.n = parseInt(arr[0]);
fra.m = parseInt(arr[1]);
}
else if (fVal > 0) {
var GCD = function (a, b) { return b == 0 ? a : GCD(b, a % b); }//Greatest Common Divisor
var m = Math.pow(10, FloatHelper.DecimalLength(fVal));
var n = parseInt(fVal * m);
var d = GCD(m, n);
fra.n = n / d;
fra.m = m / d;
}
return (f ? "-" : "") + (num * fra.m + fra.n) + "/" + fra.m;
},
toFractionEu: function (val) {//Fractional conversion
var fVal = parseFloat(val);
if (fVal.toString() == "NaN") return "";
fVal = FloatHelper.Operator(fVal, 1, "-");
var f = fVal < 0;
if (f) fVal = Math.abs(fVal);
var fra = { n: 0, m: 1 };//n/m
var num = 0;
if (fVal > 1)
fVal = FloatHelper.Operator(fVal, num = fVal | 0, "-");
var oJson = oTool.fractionJson;
if (fVal in oJson) {
var arr = oJson[fVal].split("/");
fra.n = parseInt(arr[0]);
fra.m = parseInt(arr[1]);
}
else if (fVal > 0) {
var GCD = function (a, b) { return b == 0 ? a : GCD(b, a % b); }//Greatest Common Divisor
var m = Math.pow(10, FloatHelper.DecimalLength(fVal));
var n = parseInt(fVal * m);
var d = GCD(m, n);
fra.n = n / d;
fra.m = m / d;
}
return (f ? "-" : "") + (num * fra.m + fra.n) + "/" + fra.m;
},
toFixZero: function (val, num) {
if (!num) {
num = this.countDecimal(val) > 2 ? 3 : 2;
}
var fVal = parseFloat(val);
if (fVal.toString() == "NaN") return val;
return fVal.toFixed(num)
},
countDecimal: function (num) {
var match = ('' + num).match(/\.(\d+)$/);
if (match === null) {
return 0;
}
return match[1].length;
}
};
var _handicapTypeArray = ["/-", "+/-", "/*", "让/受让"];
var _handicapType = 1;
var _handicapAccept = "-";
var _handicapGive = "";
var _ouTrimEndZero = true;
var GoalCn = ["0", "0/{0}0.5", "{0}0.5", "{0}0.5/1", "{0}1", "{0}1/1.5", "{0}1.5", "{0}1.5/2", "{0}2", "{0}2/2.5", "{0}2.5", "{0}2.5/3", "{0}3", "{0}3/3.5", "{0}3.5", "{0}3.5/4", "{0}4", "{0}4/4.5", "{0}4.5", "{0}4.5/5", "{0}5", "{0}5/5.5", "{0}5.5", "{0}5.5/6", "{0}6", "{0}6/6.5", "{0}6.5", "{0}6.5/7", "{0}7", "{0}7/7.5", "{0}7.5", "{0}7.5/8", "{0}8", "{0}8/8.5", "{0}8.5", "{0}8.5/9", "{0}9", "{0}9/9.5", "{0}9.5", "{0}9.5/10", "{0}10", "{0}10/10.5", "{0}10.5", "{0}10.5/11", "{0}11", "{0}11/11.5", "{0}11.5", "{0}11.5/12", "{0}12", "{0}12/12.5", "{0}12.5", "{0}12.5/13", "{0}13", "{0}13/13.5", "{0}13.5", "{0}13.5/14", "{0}14"];
var GoalCnOU = ["0", "0/0.5", "0.5", "0.5/1", "1", "1/1.5", "1.5", "1.5/2", "2", "2/2.5", "2.5", "2.5/3", "3", "3/3.5", "3.5", "3.5/4", "4", "4/4.5", "4.5", "4.5/5", "5", "5/5.5", "5.5", "5.5/6", "6", "6/6.5", "6.5", "6.5/7", "7", "7/7.5", "7.5", "7.5/8", "8", "8/8.5", "8.5", "8.5/9", "9", "9/9.5", "9.5", "9.5/10", "10", "10/10.5", "10.5", "10.5/11", "11", "11/11.5", "11.5", "11.5/12", "12", "12/12.5", "12.5", "12.5/13", "13", "13/13.5", "13.5", "13.5/14", "14"];
function GetHandicapType() {
var detault = 1;
var handicapType = getCookie("Handicap_Type");
if (handicapType) detault = parseInt(handicapType);
return detault;
}
function initHandicap() {
_handicapType = GetHandicapType();
if (_handicapType <= _handicapTypeArray.length) {
_handicapGive = _handicapTypeArray[_handicapType - 1].split('/')[0];
_handicapAccept = _handicapTypeArray[_handicapType - 1].split('/')[1];
}
}
initHandicap();
function Goal2GoalCn(goal) { //handicap conversion
if ((!goal && goal != "0") || isNaN(goal))
return "";
else {
if (goal > 14) return _handicapGive + Math.abs(goal);
if (goal < -14) return _handicapAccept + Math.abs(goal);
var i = Math.abs(parseInt(goal * 4));
if (goal >= 0) return GoalCn[i].replace("{0}", _handicapGive);
else return GoalCn[i].replace("{0}", _handicapAccept);
}
}
function Goal2GoalCn2(goal) {
return Goal2GoalCn(goal);
}
function Goal2CnOU(goal) { //ou conversion
if ((!goal && goal != "0") || isNaN(goal))
return "";
else {
if (goal > 14 || goal < -14) return _ouTrimEndZero ? parseFloat(goal).toString() : goal;
var newGoal = GoalCnOU[Math.abs(parseInt(goal * 4))];
/*if (_ouTrimEndZero) return parseFloat(newGoal).toString();*/
return newGoal
}
}
function Goal2Num(goal) {
if (typeof (goal) == "undefined") return "";
if (!isNaN(goal) || goal.indexOf("/") == -1) return parseFloat(goal);
var isMinus = false;
if (goal.indexOf("-") > -1) isMinus = true;
goal = goal.replace("+", "").replace("-", "");
var nums = goal.split('/');
goal = (parseFloat(nums[0]) + parseFloat(nums[1])) / 2;
return isMinus ? (0 - goal) : goal;
}
function insertAfter(newEl, targetEl) {
var parentEl = targetEl.parentNode;
if (parentEl.lastChild == targetEl) {
parentEl.appendChild(newEl);
} else {
parentEl.insertBefore(newEl, targetEl.nextSibling);
}
}
function IsMobile() {
if (navigator.userAgent.toLowerCase().indexOf("android") != -1
|| navigator.userAgent.toLowerCase().indexOf("iphone") != -1
|| navigator.userAgent.toLowerCase().indexOf("mobile") != -1) return true;
else return false;
}
var _cnzzLoaded = false;
var _cnzzUrls = new Array();
function showCountDefer(opt) {
if (_cnzzLoaded) return;
var allCnzz = document.getElementById("allCnzz");
allCnzz.removeChild(allCnzz.firstChild);
for (var i = 0; i < _cnzzUrls.length; i++) {
addScript(allCnzz, _cnzzUrls[i]);
}
_cnzzLoaded = true;
}
function addScript(container, url) {
var s = document.createElement("script");
s.src = url;
container.appendChild(s, "script");
}
function GetBasketState(state, type) {
var rs;
switch (state) {
case -5: rs = _locModel.T.T_ST_Postp; break;
case -4: rs = _locModel.T.T_ST_Cancel; break;
case -3: rs = "" + _locModel.T.T_ST_Interrupt + ""; break;
case -2: rs = "" + _locModel.T.T_ST_Pend + ""; break;
case -1: rs = "" + _locModel.T.T_ST_Finish + ""; break;
case 0: rs = " "; break;
case 1: rs = _locModel.T.T_ST_Qtr1; break;
case 2: rs = _locModel.T.T_ST_Qtr2; break;
case 3: rs = type == 2 ? _locModel.T.T_ST_Qtr2 : _locModel.T.T_ST_Qtr3; break;
case 4: rs = _locModel.T.T_ST_Qtr4; break;
case 5: rs = _locModel.T.T_ST_Ot; break;
case 6: rs = _locModel.T.T_ST_Ot; break;
case 7: rs = _locModel.T.T_ST_Ot; break;
case 50: rs = _locModel.T.T_ST_Halftime; break;
}
return rs;
}
function OpenBkSclass(ID) {
if (ID == null || ID == '' || ID == 0) return false;
window.open(_basketballWebDomain + "leagueinfo/" + ID);
}
//获取URL参数
function getQueryVariable(variable) {
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split("=");
if (pair[0] == variable) { return pair[1]; }
}
return (false);
}
//不影响原来的onload情况下添加新的事件
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function () {
oldonload();
func();
}
}
}
function NoDataHtml(type) {
if (type == 2) {
return "
>>=p,w-=p),w<15&&(u+=R[i++]< l){e.msg="invalid distance too far back",Z.mode=a;break e}if(u>>>=p,w-=p,p=r-o,x>p){if(p=x-p,p>f&&Z.sane){e.msg="invalid distance too far back",Z.mode=a;break e}if(y=0,E=h,0===c){if(y+=d-p,p