'
+ '
' + DOMAIN_STR + '
'
+ GoalTips
+ '
';
sPopup = window.createPopup();
sPopupBody = sPopup.document.body;
sPopupBody.style.cursor="hand";
sPopupBody.innerHTML = GoalTips;
sPopup.document.body.onmouseover = new Function("clearTimeout(topMost)");
sPopup.document.body.onmouseout = PopupSoccerShow;
sPopup.document.body.oncontextmenu = PopupSoccerClose;
sPopup.document.body.onclick = PopupSoccerClose;
TipsC = 30;
PopupSoccerShow();
}
}
function PopupSoccerShow()
{
try{
sPopup.show(0, 0, tipswidth, 28 + tipsheight);
if (typeof(topMost) == "number")
clearTimeout(topMost);
topMost = setTimeout("PopupSoccerShow()", 500);
if (TipsC < 0)
PopupSoccerClose();
--TipsC;
}catch(e){
}
}
function PopupSoccerClose()
{
clearTimeout(topMost);
sPopup.hide();
}
function LoadJS(fileUrl, callback, jsID)
{
var oHead = document.getElementsByTagName('HEAD').item(0);
try{oHead.removeChild(document.getElementById(jsID));}catch(e){}
var oScript= document.createElement("script");
oScript.type = "text/javascript";
oScript.id = jsID;
oScript.src=fileUrl ;
oHead.appendChild(oScript);
if(document.addEventListener)
{
oScript.onload = callback;
oScript.onerror = callback;
}
else
{
oScript.onreadystatechange =function(){ LoadJsReady(oScript,callback);};
}
}
function LoadJsReady(obj,callBack)
{
if (obj.readyState == "loaded")
{
callBack();
}
}
var xmlhttpSearch = null;
var isIE = true;
var parser = null;
var oSerializer = null;
var searchXmlDoc = null;
if(window.ActiveXObject)
{
try
{
xmlhttpSearch = new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e)
{
xmlhttpSearch = new ActiveXObject("MsXml2.XMLHTTP");
}
}
else
{
xmlhttpSearch = new XMLHttpRequest();
parser = new DOMParser();
oSerializer = new XMLSerializer();
isIE = false;
}
var sxl = null;
var oldfn = "";
function OpenXml()
{
try
{
sxl = null;
// LoadJS("//js-live.7mdt.com/livedts/sxl.js?c="+ Number(new Date()).toString().substring(0,11), livexmlonreadystatechange, "LiveDtScript");
LoadJS("/7mdata/sxl.php?c="+ Number(new Date()).toString().substring(0,10), livexmlonreadystatechange, "LiveDtScript");
}
catch(e)
{
}
if (typeof(OpenXml_Timer) == "number")
clearTimeout(OpenXml_Timer);
OpenXml_Timer = setTimeout("OpenXml()", bfRefreshTime);
}
function livexmlonreadystatechange()
{
if (sxl == null)
return;
var nextfn = sxl.fn;
if (nextfn == "" || oldfn == nextfn)
return;
GoalTips = "";
GoalTips_Count = 0;
var ResetPage = sxl.rst;
if (!setRefreshValue)
{
reflag = ResetPage;
setRefreshValue = true;
}
if (reflag != ResetPage)
{
setRefreshValue = false;
var Rnd = Math.round(Math.random()*19000)+1000;
setTimeout("live_f.location.reload()", Rnd);
return;
}
if ((nextfn - 1) > live_f.GetFlagNum)
{
OpenXml2();
return;
}
var cArr = sxl.c;
for (var i = 0; i < cArr.length; ++i)
{
eval("Update_Live('" + cArr[i].join("','") + "')");
}
oldfn = nextfn;
live_f.GetFlagNum++;
if ($$("sound").checked)
{
if(GoalSound)
{
PlaySound();
GoalSound = false;
}
if(ErrorGoalSound)
{
PlayErrorSound();
ErrorGoalSound = false;
}
if(RedSound)
{
PlayRedSound();
RedSound = false;
}
}
if (GoalTips_Count > 0)
{
ShowGoalTips();
}
}
function OpenXml2()
{
try
{
sxl = null;
// LoadJS("//js-live.7mdt.com/livedts/sxl_"+ live_f.GetFlagNum +".js?c="+ Number(new Date()).toString().substring(0,10), livexmlonreadystatechange2, "LiveDtScript2");
LoadJS("/7mdata/sxl_.php?d="+ live_f.GetFlagNum +"&c="+ Number(new Date()).toString().substring(0,10), livexmlonreadystatechange2, "LiveDtScript2");
}
catch(e)
{
}
}
function livexmlonreadystatechange2()
{
if(sxl == null)
return;
GoalTips = "";
GoalTips_Count = 0;
var cArr = sxl.c;
for (var i = 0; i < cArr.length; ++i)
{
eval("Update_Live('" + cArr[i].join("','") +"')");
}
live_f.GetFlagNum = sxl.fn;
if ($$("sound").checked)
{
if(GoalSound)
{
PlaySound();
GoalSound = false;
}
if(ErrorGoalSound)
{
PlayErrorSound();
ErrorGoalSound = false;
}
if(RedSound)
{
PlayRedSound();
RedSound = false;
}
}
if (GoalTips_Count > 0)
{
ShowGoalTips();
}
}
var pkdata = null;
function OpenPkXml(fn)
{
try
{
pkdata = null;
LoadJS("//js-live.7mdt.com/"+fn + "?" + Number(new Date()).toString().substring(0,10), pkxmlonreadystatechange, "PkDtScript");
}
catch(e)
{
}
if (typeof(OpenPkXml_Timer) == "number")
clearTimeout(OpenPkXml_Timer);
OpenPkXml_Timer = setTimeout("OpenPkXml('" + fn + "')", pkRefreshTime);
}
function pkxmlonreadystatechange()
{
if (pkdata == null)
return;
var cArr = pkdata.c;
for(var i=0;i
= 1 && IsStart <= 4) || IsStart == 15)
{
if (IsStart == 1 || IsStart == 3)
{
if (TStart_Time != "")
{
var GetBeginTime = TStart_Time.split(",");
if (GetBeginTime.length == 6)
{
TStart_Time = new Date(GetBeginTime[0], parseFloat(GetBeginTime[1])-1, GetBeginTime[2], GetBeginTime[3], GetBeginTime[4], GetBeginTime[5]);
live_f.sDt2[bh][5] = TStart_Time;
}
}
live_f.ObjArr[bh].ptime.style.display = "";
}
else
{
live_f.ObjArr[bh].ptime.style.display = "none";
}
if (live_f.ObjArr[bh].lA.innerHTML == "")
{
live_f.sDt2[bh][1] = 0;
live_f.ObjArr[bh].lA.innerHTML = "0";
}
if (live_f.ObjArr[bh].lB.innerHTML == "")
{
live_f.sDt2[bh][2] = 0;
live_f.ObjArr[bh].lB.innerHTML = "0";
}
}
else
{
live_f.ObjArr[bh].ptime.style.display = "none";
}
if (live_a != live_f.sDt2[bh][1])
{
var live_atmp=isNaN(parseInt(live_a,10))?0:parseInt(live_a,10);
if (live_atmp < live_f.sDt2[bh][1])
{
speakAinefficacy = true;
ErrorGoalSound = true;
}
else
{
GoalSound = true;
}
live_f.sDt2[bh][1] = live_a;
live_f.ObjArr[bh].lA.style.color = "#FF0000";
live_f.ObjArr[bh].lA.innerHTML = live_a;
live_f.ObjArr[bh].teamA.className = "team0G";
clearTimeout(laT1[bh]);
laT1[bh] = setTimeout("set_Attribute(" + bh + ", 'lA', 'style.color', '')", 180000);
clearTimeout(laT2[bh]);
laT2[bh] = setTimeout("set_Attribute(" + bh + ", 'teamA', 'className', 'team0')", 180000);
if ($$("win").checked)
{
Gold(0,
"" + live_f.sDt2[bh][1] + "-" + live_f.sDt2[bh][2],
"" + Replace_Team_name(live_f.sDt[bh][2]) + "",
Replace_Team_name(live_f.sDt[bh][3]),
live_f.sDt[bh][0] + (live_f.ObjArr[bh].ptime.style.display == "" ? "[" + live_f.ObjArr[bh].ptime.innerHTML + "]": ""),
"#" + live_f.sDt[bh][1]);
}
Agent_SayGoal += "(" + live_f.sDt[bh][0] + ") " +
Replace_Team_name(live_f.sDt[bh][2]) + " " +
live_f.sDt2[bh][1] + "-" +
live_f.sDt2[bh][2] + " " +
Replace_Team_name(live_f.sDt[bh][3]);
speakgoal = true;
}
if (live_b != live_f.sDt2[bh][2])
{
var live_btmp=isNaN(parseInt(live_b,10))?0:parseInt(live_b,10); //"9"<"10"情况下出现false
if (live_btmp < live_f.sDt2[bh][2])
{
speakBinefficacy = true;
ErrorGoalSound = true;
}
else
{
GoalSound = true;
}
live_f.sDt2[bh][2] = live_b;
live_f.ObjArr[bh].lB.style.color = "#FF0000";
live_f.ObjArr[bh].lB.innerHTML = live_b;
live_f.ObjArr[bh].teamB.className = "team1G";
clearTimeout(lbT1[bh]);
lbT1[bh] = setTimeout("set_Attribute(" + bh + ", 'lB', 'style.color', '')", 180000);
clearTimeout(lbT2[bh]);
lbT2[bh] = setTimeout("set_Attribute(" + bh + ", 'teamB', 'className', 'team1')", 180000);
if ($$("win").checked)
{
Gold(1,
live_f.sDt2[bh][1] + "-" + live_f.sDt2[bh][2] + "",
Replace_Team_name(live_f.sDt[bh][2]),
"" + Replace_Team_name(live_f.sDt[bh][3]) + "",
live_f.sDt[bh][0] + (live_f.ObjArr[bh].ptime.style.display == "" ? "[" + live_f.ObjArr[bh].ptime.innerHTML + "]": ""),
"#" + live_f.sDt[bh][1]);
}
Agent_SayGoal += "(" + live_f.sDt[bh][0] + ") " +
Replace_Team_name(live_f.sDt[bh][2]) + " " +
live_f.sDt2[bh][1] + "-" +
live_f.sDt2[bh][2] + " " +
Replace_Team_name(live_f.sDt[bh][3]);
speakgoal = true;
}
if ((IsStart >= 1 && IsStart <= 3) || IsStart == 5 || (IsStart >=7 && IsStart <= 9) || IsStart == 11)
{
live_f.ObjArr[bh].rA.style.display = "";
live_f.ObjArr[bh].rB.style.display = "";
live_f.ObjArr[bh].score.style.display = "";
if (IsStart == 2)
{
live_f.ObjArr[bh].ptime.innerHTML = "46'";
live_f.ObjArr[bh].hscore.innerHTML = live_f.sDt2[bh][1] + "-" + live_f.sDt2[bh][2];
live_f.sDt2[bh][6] = live_f.sDt2[bh][1] + "-" + live_f.sDt2[bh][2];
}
}
else if (IsStart == 4 || IsStart == 12 || IsStart == 15)
{
live_f.ObjArr[bh].ptime.style.display = "none";
live_f.ObjArr[bh].score.style.display = "";
}
if (IsStart == 4 || IsStart == 6 || IsStart == 10 || (IsStart >= 12 && IsStart <= 15))
setTimeout("MoveGame(" + bh + ")", 60000);
if (a_r > 0)
{
if (live_f.sDt2[bh][3] != a_r)
{
live_f.sDt2[bh][3] = a_r;
live_f.ObjArr[bh].rA.innerHTML = " ";
if ($$("win").checked)
{
Gold(0,
live_f.sDt2[bh][1] + "-" + live_f.sDt2[bh][2],
"" + Replace_Team_name(live_f.sDt[bh][2]) + " ",
Replace_Team_name(live_f.sDt[bh][3]),
live_f.sDt[bh][0] + (live_f.ObjArr[bh].ptime.style.display == "" ? "[" + live_f.ObjArr[bh].ptime.innerHTML + "]": ""),
"#" + live_f.sDt[bh][1]);
}
RedSound = true;
speakAred = true;
}
}
else
{
live_f.sDt2[bh][3] = a_r;
live_f.ObjArr[bh].rA.innerHTML = "";
}
if (b_r > 0)
{
if (live_f.sDt2[bh][4] != b_r)
{
live_f.sDt2[bh][4] = b_r;
live_f.ObjArr[bh].rB.innerHTML = " ";
if ($$("win").checked)
{
Gold(1,
live_f.sDt2[bh][1] + "-" + live_f.sDt2[bh][2],
Replace_Team_name(live_f.sDt[bh][2]),
" " + Replace_Team_name(live_f.sDt[bh][3]) + "",
live_f.sDt[bh][0] + (live_f.ObjArr[bh].ptime.style.display == "" ? "[" + live_f.ObjArr[bh].ptime.innerHTML + "]": ""),
"#" + live_f.sDt[bh][1]);
}
RedSound = true;
speakBred = true;
}
}
else
{
live_f.sDt2[bh][4] = b_r;
live_f.ObjArr[bh].rB.innerHTML = "";
}
if (Banc != "")
{
if (Banc == "-")
Banc = "";
live_f.sDt2[bh][6] = Banc;
live_f.ObjArr[bh].hscore.innerHTML = Banc;
}
}
if (typeof(voiArr[bh]) == "number")
{
var tmpA_gb="";
var tmpA_big="";
var tmpA_big2="";
var tmpB_gb="";
var tmpB_big="";
var tmpB_big2="";
if(typeof(live_f.voi_gb)!="undefined"){
tmpA_gb=live_f.voi_gb[live_f.sDt[bh][9]]!=null?live_f.voi_gb[live_f.sDt[bh][9]]:"";
tmpB_gb=live_f.voi_gb[live_f.sDt[bh][10]]!=null?live_f.voi_gb[live_f.sDt[bh][10]]:"";
}
if(typeof(live_f.voi_big)!="undefined"){
tmpA_big=live_f.voi_big[live_f.sDt[bh][9]]!=null?live_f.voi_big[live_f.sDt[bh][9]]:"";
tmpB_big=live_f.voi_big[live_f.sDt[bh][10]]!=null?live_f.voi_big[live_f.sDt[bh][10]]:"";
}
if(typeof(live_f.voi_big2)!="undefined"){
tmpA_big2=live_f.voi_big2[live_f.sDt[bh][9]]!=null?live_f.voi_big2[live_f.sDt[bh][9]]:"";
tmpB_big2=live_f.voi_big2[live_f.sDt[bh][10]]!=null?live_f.voi_big2[live_f.sDt[bh][10]]:"";
}
if (speakgoal || speakst || speakht || speakhts || speakft)
{
if (speakAinefficacy || !speakBinefficacy)
SetVoiLs(live_f.sDt[bh][9],tmpA_gb,tmpA_big,tmpA_big2);
if (speakAinefficacy)
SetVoiLs("#WX","","","");
if (speakBinefficacy)
{
SetVoiLs(live_f.sDt[bh][10],tmpB_gb,tmpB_big,tmpB_big2);
SetVoiLs("#WX","","","");
}
else
{
if (!speakAinefficacy && speak_away == 1)
{
SetVoiLs("#VS","","","");
SetVoiLs(live_f.sDt[bh][10],tmpB_gb,tmpB_big,tmpB_big2);
}
}
}
if (speakgoal || speakht || speakft){
SetVoiLs("#" + live_f.sDt2[bh][1] + "-" + live_f.sDt2[bh][2],"","","");
}
if (speakst)
SetVoiLs("#ST","","","");
else if (speakht)
SetVoiLs("#HT","","","");
else if (speakhts)
SetVoiLs("#HTS","","","");
else if (speakft)
SetVoiLs("#FT","","","");
if (speakAred)
{
SetVoiLs(live_f.sDt[bh][9],tmpA_gb,tmpA_big,tmpA_big2);
SetVoiLs("#" + live_f.sDt2[bh][3] + "r","","","");
}
if (speakBred)
{
SetVoiLs(live_f.sDt[bh][10],tmpB_gb,tmpB_big,tmpB_big2);
SetVoiLs("#" + live_f.sDt2[bh][4] + "r","","","");
}
}
//}
//catch(e){}
}
function InitMSAGENT()
{
if ($$("cartoon").checked)
{
try
{
var partName = "Merlin";
live_f.Agent = new ActiveXObject("Agent.Control.2");
live_f.Agent.Connected = true;
live_f.Agent.Characters.Load(partName, partName + ".acs");
live_f.Agent_part = live_f.Agent.Characters(partName);
live_f.Agent_part.LanguageID = live_f.Agent_Lng;
live_f.Agent_part.moveto(event.x, event.y);
live_f.Agent_part.Show();
live_f.Agent_part.Play("Greet");
live_f.Agent_part.Balloon.Style = 0x532000D;
live_f.Agent_part.speak(live_f.Agent_Hello);
live_f.ShowAgent = true;
}
catch(e)
{
if (confirm(live_f.Agent_Err))
window.open(live_f.Agent_RAR);
}
}
else
{
if (live_f.Agent_part != null)
{
live_f.Agent_part.play("Wave");
live_f.Agent_part.speak(live_f.Agent_Bye);
live_f.Agent_part.Hide();
live_f.Agent = null;
live_f.Agent_part = null;
}
live_f.ShowAgent = false;
}
}
function MSAGENTSAY(str)
{
if (live_f.ShowAgent && live_f.Agent_part != null)
{
live_f.Agent_part.Show();
live_f.Agent_part.Play("Announce");
live_f.Agent_part.speak(str);
}
}
function showCustomerWordAd()
{
if(typeof(customer_word_link)!="undefined") {
var obj = $$("live_Table");
if (obj != null)
{
var count=0;
var maxcount=5;
for(var idx in customer_word_link){
if ($$("ad_"+idx) != null)
obj.deleteRow($$("ad_"+idx).rowIndex);
var j = 0, i = 0;
for (;i 1 ? obj.rows[0].cells.length : obj.rows[0].cells[0].colSpan);
obj.rows[i].cells[0].bgColor = "#F7F8F3";
obj.rows[i].cells[0].align = "center";
obj.rows[i].cells[0].innerHTML = STRAD + "" + customer_word_link[idx][0] + "";
obj.insertRow(i+1);
obj.rows[i+1].insertCell(0);
obj.rows[i+1].style.display = "none";
obj.rows[i+1].cells[0].colSpan = (obj.rows[0].cells.length > 1 ? obj.rows[0].cells.length : obj.rows[0].cells[0].colSpan);
count++;
if(count>=maxcount)break;
}
}
}
}
function ShowWordAd()
{
if(typeof(customer_word_link)!="undefined") {
showCustomerWordAd();
return;
}
var obj = $$("live_Table");
if (obj != null)
{
if (typeof(wordAd) == "string" && wordAd != "")
{
if ($$("ad1") != null)
obj.deleteRow($$("ad1").rowIndex);
var j = 0, i = 0;
for (;i 1 ? obj.rows[0].cells.length : obj.rows[0].cells[0].colSpan);
obj.rows[i].cells[0].bgColor = "#F7F8F3";
obj.rows[i].cells[0].align = "center";
obj.rows[i].cells[0].innerHTML = STRAD + "" + wordAd + "";
obj.insertRow(i+1);
obj.rows[i+1].insertCell(0);
obj.rows[i+1].style.display = "none";
obj.rows[i+1].cells[0].colSpan = (obj.rows[0].cells.length > 1 ? obj.rows[0].cells.length : obj.rows[0].cells[0].colSpan);
}
}
}
function ChangePkData(i)
{
if (i > 24)
return "";
return RQ_ARR[i];
}
var sg_move = false;
var mb_pki = 18;
var cb_pki = 19;
function sg(bh, event)
{
if (typeof(live_f.sDt2) != "object") return;
if (typeof(live_f.sDt2[bh]) != "object") return;
if (live_f.sDt2[bh][0] == 6 || live_f.sDt2[bh][0] == 13 || live_f.sDt2[bh][0] == 14)
return;
var ecd = live_f.Encode;
if (ecd == "big")
ecd = 'ft';
else if (ecd == "gb")
ecd = 'jt';
var temp_h1 = document.body.clientHeight;
var temp_h2 = document.documentElement.clientHeight;
var isXhtml = (temp_h2<=temp_h1&&temp_h2!=0)?true:false;
var htmlbody = isXhtml?document.documentElement:document.body;
$$("sg").style.left = (event.clientX + htmlbody.scrollLeft - 170) + "px";
$$("sg").style.top = (event.clientY + document.body.scrollTop + document.documentElement.scrollTop + 20) + "px";
sg_move = true;
d_pi = undefined;
var detail = $$("goaldetail");
var s = document.createElement("script");
s.type = "text/javascript";
s.src = "//data.7mdt.com/goaldata/" + ecd + "/" + bh + ".js?" +Date.parse(new Date());
detail.appendChild(s, "script");
detail.removeChild(detail.firstChild);
s.onload = s.onreadystatechange = function() {
if(!this.readyState || this.readyState=="loaded" || this.readyState=="complete")
{
if (sg_move)
{
var ghtm = '';
if ((typeof(live_f.sDt[bh][mb_pki]) != "undefined" && live_f.sDt[bh][mb_pki] != "") || (typeof(live_f.sDt[bh][cb_pki]) != "undefined" && live_f.sDt[bh][cb_pki] != ""))
{
if (live_f.sDt[bh][mb_pki] != '')
ghtm += '' + BASE_HANDICAP + (parseFloat(live_f.sDt[bh][mb_pki]) > 0 ? AWAY_HANDICAP_STR : HOME_HANDICAP_STR).replace("?", ChangePkData(Math.abs(live_f.sDt[bh][mb_pki]) * 4)) + ' |
';
else if (live_f.sDt[bh][cb_pki] != '')
ghtm += '' + BASE_HANDICAP + (parseFloat(live_f.sDt[bh][cb_pki]) > 0 ? AWAY_HANDICAP_STR : HOME_HANDICAP_STR).replace("?", ChangePkData(Math.abs(live_f.sDt[bh][cb_pki]) * 4)) + ' |
';
}
else
{
if (live_f.sDt2[bh][0] == 17)
return;
}
if (typeof(d_pi) != "undefined" && d_pi.length > 0)
{
for (var i = 0; i | ' + d_pn[i] + ' | ' + d_tm[i] + '\' | | | ';
else
ghtm += ' | | ' + d_tm[i] + '\' | ' + d_pn[i] + ' | |
';
}
ghtm += '' + GOALDETAIL + ' |
';
}
if (ghtm != '')
{
$$("sg").innerHTML = '';
if($$("bh"+bh).rowIndex > $$("live_Table").rows.length-15){
$$("sg").style.top = (parseInt($$("sg").style.top,10) - parseInt($$("sgtable").clientHeight,10) - 30)+'px';
}
$$("sg").style.visibility = "visible";
}
}
}
};
}
function cg()
{
sg_move = false;
$$("sg").innerHTML = "";
$$("sg").style.visibility = "hidden";
}
function ReadSetting(lang,voi,away,red,alls)
{
if(lang == 'big')
{
if (voi == '4')
{
$$("voi_lng2").checked = true;
}
else
{
$$("voi_lng1").checked = true;
}
}
$$("speak_away").checked = (away == "1");
$$("speak_red").checked = (red == "1");
$$("speak_all").checked = (alls == "1");
}
function SaveSetting(lang,url)
{
if(lang == "big")
{
voi_lng = ($$("voi_lng1").checked ? 0 : 4);
}
speak_away = ($$("speak_away").checked ? 1 : 0);
speak_red = ($$("speak_red").checked ? 1 : 0);
speak_all = ($$("speak_all").checked ? 1 : 0);
location.href = url + "&voi=" + voi_lng + "&away=" + speak_away + "&red=" + speak_red + "&all=" + speak_all;
}
if(window.navigator.userAgent.indexOf("MSIE")==-1)
{
HTMLElement.prototype.insertAdjacentElement = function (sWhere, parsedNode) {
switch(sWhere){
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 setCookie(n, v){
var exp = new Date();
exp.setTime(exp.getTime() + (365*24*60*60*1000));
document.cookie = n + "=" + v + ";expires=" + exp.toGMTString();
}
function getCookie(sName){
var reg1=new RegExp("(?: |\\b)"+sName+"(?:=)?([^ =;]*)","i");
var ma1=document.cookie.match(reg1);
if(!ma1) return "";
return ma1[1];
}
var TopCookiestr = (getCookie("TopM") == ""?"%":getCookie("TopM"));
function SetTop(matchNo,isTop){
if($$("bh"+matchNo)==null) return;
var tbMain=$$("trTop").parentNode;
var trobj=$$("bh"+matchNo);
try{
$$("trTop").style.display = "";
var row = $$("bh" + matchNo);
var resRow = $$("resume_" + matchNo);
if(row==null) return;
if(isTop==false){//将赛事置顶
$$("SetTop"+matchNo).innerHTML= '';
$$("SetTop"+matchNo).parentNode.innerHTML=$$("SetTop"+matchNo).parentNode.innerHTML.replace("false","true");
InsertTop(matchNo,row,resRow);
if(TopCookiestr.indexOf('%'+matchNo+'%')<0){
TopCookiestr += matchNo +'%';
setCookie("TopM",TopCookiestr);
}
if($$("gameover") != null){
if($$("gameover").rowIndex == tbMain.rows.length-1)
$$("gameover").style.display = "none";
}
}else{//取消置顶 //liveman.net/7mdata/img/
$$("SetTop"+matchNo).innerHTML= '';
$$("SetTop"+matchNo).parentNode.innerHTML=$$("SetTop"+matchNo).parentNode.innerHTML.replace("true","false");
InsertMain(matchNo,row,resRow);
if($$("trTop").nextSibling.id=="trTopOver" && $$("trTopOver").nextSibling.id=="trMain" )$$("trTop").style.display = "none";
if(TopCookiestr.indexOf('%'+matchNo+'%')>=0){
TopCookiestr = TopCookiestr.replace('%'+matchNo+'%',"%")
setCookie("TopM",TopCookiestr);
}
}
}catch(error){}
if (typeof(updateRowColor_Timer) == "number")
clearTimeout(updateRowColor_Timer);
updateRowColor_Timer = setTimeout("updateRowColor()", 500);
}
function InsertTop(matchNo,rowobj,resobj){
var tbMain=$$("trTop").parentNode;
var trTop=$$("trTop").rowIndex;
var trTopOver=$$("trTopOver").rowIndex;
var trMain=$$("trMain").rowIndex;
var trOver=($$("gameover") != null)?$$("gameover").rowIndex:0;
if(trOver != 0 && (live_f.sDt2[matchNo][0] == 4 || live_f.sDt2[matchNo][0] == 6 || live_f.sDt2[matchNo][0] == 10 || (live_f.sDt2[matchNo][0] >= 12 && live_f.sDt2[matchNo][0] <= 15))){
//插入置顶完场
var isInserted = false;
if(tbMain.rows[trTopOver+1].id != "trMain" && tbMain.rows[trTopOver+1].tabIndex > rowobj.tabIndex){
isInserted=true;
tbMain.rows[trTopOver+1].insertAdjacentElement("beforeBegin",resobj);
resobj.insertAdjacentElement("beforeBegin",rowobj);
}else{
for(var i=trTopOver+1;i rowobj.tabIndex){
isInserted=true;
tbMain.rows[i+2].insertAdjacentElement("beforeBegin",resobj);
resobj.insertAdjacentElement("beforeBegin",rowobj);
break;
}
}
}
if(isInserted==false){
$$("trMain").insertAdjacentElement("beforeBegin",resobj);
resobj.insertAdjacentElement("beforeBegin",rowobj);
}
}else{
//插入置顶主体
var isInserted = false;
if(tbMain.rows[trTop+1].id != "trTopOver" && tbMain.rows[trTop+1].tabIndex > rowobj.tabIndex){
isInserted=true;
tbMain.rows[trTop+1].insertAdjacentElement("beforeBegin",resobj);
resobj.insertAdjacentElement("beforeBegin",rowobj);
}else{
for(var i=trTop+1;i rowobj.tabIndex){
isInserted=true;
tbMain.rows[i+2].insertAdjacentElement("beforeBegin",resobj);
resobj.insertAdjacentElement("beforeBegin",rowobj);
break;
}
}
}
if(isInserted==false){
$$("trTopOver").insertAdjacentElement("beforeBegin",resobj);
resobj.insertAdjacentElement("beforeBegin",rowobj);
}
}
}
function InsertMain(matchNo,rowobj,resobj){
var tbMain=$$("trTop").parentNode;
var trTop=$$("trTop").rowIndex;
var trTopOver=$$("trTopOver").rowIndex;
var trMain=$$("trMain").rowIndex;
var trOver=0;
if($$("gameover") != null){
trOver=$$("gameover").rowIndex;
}else{
trOver=0;
tbMain=$$("live_Table");
}
if(trOver != 0 && (live_f.sDt2[matchNo][0] == 4 || live_f.sDt2[matchNo][0] == 6 || live_f.sDt2[matchNo][0] == 10 || (live_f.sDt2[matchNo][0] >= 12 && live_f.sDt2[matchNo][0] <= 15))){
//插入完场
var isInserted = false;
if(trOver+1 < tbMain.rows.length ){
if(tbMain.rows[trOver+1].tabIndex > rowobj.tabIndex)
{
tbMain.rows[trOver+1].insertAdjacentElement("beforeBegin",resobj);
resobj.insertAdjacentElement("beforeBegin",rowobj);
isInserted=true;
}else{
for(var i=trOver+1;i rowobj.tabIndex){
isInserted=true;
tbMain.rows[i+2].insertAdjacentElement("beforeBegin",resobj);
resobj.insertAdjacentElement("beforeBegin",rowobj);
break;
}
}
}
}
if(isInserted==false){
tbMain.appendChild(rowobj);
tbMain.appendChild(resobj);
}
$$("gameover").style.display = "";
}else{
//插入主体
var isInserted = false;
if(tbMain.rows[trMain+1].id != "gameover" && tbMain.rows[trMain+1].tabIndex > rowobj.tabIndex){
isInserted=true;
tbMain.rows[trMain+1].insertAdjacentElement("beforeBegin",resobj);
resobj.insertAdjacentElement("beforeBegin",rowobj);
}else{
var total_tr = trOver == 0?tbMain.rows.length:trOver;
for(var i=trMain+1;i rowobj.tabIndex){
isInserted=true;
tbMain.rows[i+2].insertAdjacentElement("beforeBegin",resobj);
resobj.insertAdjacentElement("beforeBegin",rowobj);
break;
}
}
}
if(isInserted==false){
if($$("gameover") != null){
$$("gameover").insertAdjacentElement("beforeBegin",resobj);
resobj.insertAdjacentElement("beforeBegin",rowobj);
}
}
}
}
function updateTop(){
if(TopCookiestr=='%') return;
var TempTopstr = TopCookiestr.substring(1, TopCookiestr.length-1);
var topArr=TempTopstr.split("%");
for(var i in topArr){
if(live_f.sDt[topArr[i]] == null){
TopCookiestr=TopCookiestr.replace('%'+topArr[i]+'%',"%")
}else{
SetTop(topArr[i],false);
}
}
setCookie("TopM",TopCookiestr);
}
function CancelTop(){
if(TopCookiestr=='%') return;
var TempTopstr=TopCookiestr.substring(1, TopCookiestr.length-1);
var topArr=TempTopstr.split("%");
for(var i in topArr){
if(live_f.sDt[topArr[i]]==null){
TopCookiestr=TopCookiestr.replace('%'+topArr[i]+'%',"%")
}else{
SetTop(topArr[i],true);
}
}
setCookie("TopM","");
}