on error resume next dim xmlScore Set xmlScore = CreateObject("Microsoft.XMLDOM") dim i,html0(20),html,m_language dim xml1_xml,loaded, LoadTime,nofityTimer LoadTime=0 dim flash_sound flash_sound = "" dim lastUpdateTime, oldUpdateTime oldUpdateTime="" dim lastUpdateFileTime lastUpdateFileTime=0 dim state_ch(17) state_ch(0)="推迟,推遲,Defer" state_ch(1)="中断,中斷,Halt" state_ch(2)="腰斩,腰斬,Halt" state_ch(3)="待定,待定,Wait" state_ch(13)="完,完,Over" state_ch(14)="未,未," state_ch(15)="上,上,Part1" state_ch(16)="中,中,Half" state_ch(17)="下,下,Part2" sub loadodds(language) m_language=language Call MakeTable() call MakeSclass() document.getElementById("loading").style.display="none" end sub i=instr(location.href,"?") if(i<>0) then lang=mid(location.href,i+1) loadodds(lang) else loadodds(1) end if sub MakeTable() on error resume next bg1="#F5F5F5" bg2="#F5F4EB" html="
| 選 | " & month(matchdate) & "月" & day(matchdate) & "日 | 开賽時間 | 主场球隊 | 比分 | 客场球隊 | 半場 | 数据 | Sel | " html=html& "" & month(matchdate) & "-" & day(matchdate) & " | " html=html& "K O | " html=html& "Team A | " html=html& "Score | " html=html& "Team B | " html=html& "HT | " html=html& "Info | " case else '简体 html=html& "选 | " html=html& "" & month(matchdate) & "月" & day(matchdate) & "日 | " html=html& "开赛时间 | " html=html& "主场球队 | " html=html& "比分 | " html=html& "客场球队 | " html=html& "半场 | " html=html& "数据 | " end select for i=1 to matchcount Select Case A(i,6) Case 0 if A(i,23)="1" then match_score = "阵容" else match_score = " - " match_half = "-" Case 1 match_score = A(i,12) & " - " & A(i,13) match_half = "-" Case -11,-12,-13,-14 match_score = "" match_half = "" Case Else match_score = A(i,12) & " - " & A(i,13) match_half=A(i,14) & "-" & A(i,15) End Select If A(i,16) <> 0 Then H_redcard = "
| " html0(2) = " | " & split(A(i,3),",")(m_language) & " | " html0(3) = "" & formatdatetime(A(i,4),vbshorttime) & " | " If A(i,6) =-1 Then classx1 = "td_statusR" classx2 = "td_scoreR" Else classx1 = "td_status" classx2 = "td_score" End If html0(4) = "" If A(i,6) =1 Or A(i,6) =3 Or A(i,6) =0 Then html0(5) = " | " else html0(5) = split(state_ch(A(i,6)+14),",")(m_language)&"" end if html0(6) = "" & H_redcard & "" & split(A(i,8),",")(m_language) & " | " html0(7) = "" & match_score & " | " html0(8) = "" & split(A(i,9),",")(m_language)& "" & G_redcard & " | " Select case A(i,6) Case 0,1,-11,-12,-13,-14 classx = "td_half" Case else classx = "td_halfR" End Select html0(9) = "" & match_half & " | " if A(i,22) Then 'html0(10) = "资料 推介" html0(10) = " | "
if A(i,18)="True" then
html0(10) = html0(10) +" | " end if If A(i,19) = "" Then classx = "none" Else classx = "none" End If html0(11) = " |
| " & A(i,19) & " | |||||||||
| " + live_txt_1 + " | |||||||||
| " + live_txt_2 + " | |||||||||
| " + live_txt_3 + " | |||||||||
| " + live_txt_4 + " | |||||||||
| " + live_txt_5 + " | |||||||||
| 服务器忙,请重新刷新本页面。” | |||||||||
"
case 3
goTime = datediff("n",dateadd("s",difftime,A(matchindex,5)),now)+46
goTime = goTime-63
if goTime>90 then goTime = "90+"
if goTime<46 then goTime = "46"
document.getElementById("time_" & xml_id).innerHTML = goTime & "
"
end select
end if
'score
select case A(matchindex,6)
case -11,-12,-13,-14
document.getElementById("score_" & xml_id).innertext=""
document.getElementById("half_" & xml_id).innertext=""
case 0
if lineup="1" then document.getElementById("score_" & xml_id).innertext="阵容" else document.getElementById("score_" & xml_id).innertext=" - "
case 1
document.getElementById("score_" & xml_id).innertext=A(matchindex,12) & " - " & A(matchindex,13)
case else '2 3 -1
document.getElementById("score_" & xml_id).innertext=A(matchindex,12) & " - " & A(matchindex,13)
document.getElementById("half_" & xml_id).innertext=A(matchindex,14) & "-" & A(matchindex,15)
document.getElementById("half_" & xml_id).style.color="red"
end select
if scorechange then
call showflash(xml_id,matchindex)
if document.getElementById("tr1_" & xml_id).style.display<>"none" then
hometeam=split(a(matchindex,8),",")(m_language)
guestteam=split(a(matchindex,9),",")(m_language)
sclassname=split(a(matchindex,3),",")(m_language)
if score1change then hometeam="" & hometeam &""
if score2change then guestteam="" & guestteam &""
window.clearTimeout(nofityTimer)
if document.getElementById("notify").innerHTML="" then document.getElementById("notify").innerHTML="入球提示:"
document.getElementById("notify").innerHTML=document.getElementById("notify").innerHTML & sclassname &":"& hometeam & " " & xml_score1 &"-" & xml_score2 & " " &guestteam &" "
nofityTimer=window.setTimeout("clearNotify()",20000)
if document.getElementById("windowCheck").checked and xml_matchstate>=-1 then '动态创建窗口方式
call ShowCHWindow(sclassname,hometeam,guestteam,xml_score1,xml_score2 ,document.getElementById("time_" & xml_id).innertext ,colorx)
end if
end if
end if
end if
next
end sub
sub ShowFlash(m,n)
on error resume next
dim addHtml
if A(n,6)>=-1 then
if document.getElementById("tr1_" & m).style.display<>"none" then
'addHtml=flash_sound
'document.getElementById("half_" & m).innerhtml=addHtml
playSound()
end if
end if
window.setTimeout "timecolors(" & m &","& n & ")",120000
end sub
sub timecolors(matchid,n)
on error resume next
if A(n,6)=0 then document.getElementById("score_" & matchid).innertext=" - "
document.getElementById("td_team1_" & matchid).style.backgroundColor=""
document.getElementById("td_team2_" & matchid).style.backgroundColor=""
document.getElementById("td_score_" & matchid).style.backgroundColor=""
select case A(n,6)
case 0,1
document.getElementById("half_" & matchid).innerhtml="-"
case 2,3,-1
document.getElementById("half_" & matchid).innerhtml=A(n,14) & "-" & A(n,15)
case -11,-12,-13,-14
document.getElementById("half_" & matchid).innerhtml=""
end select
end sub
sub clearNotify()
document.getElementById("notify").innerhtml=""
end sub
sub ShowAllMatch()
dim i,j
for i=1 to sclasscount
document.getElementById("checkboxleague_" & i).checked=true
next
for j=1 to matchcount
document.getElementById("tr1_" & A(j,1)).style.display=""
if document.getElementById("tr2_" & A(j,1)).cells(0).innerhtml<>"" then
'document.getElementById("tr2_" & A(j,1)).style.display=""
end if
next
document.getElementById("hiddencount").innerText=0
end sub
sub SelectOtherLeague()
dim i,j,hh
dim matchid
hh=0
for i=1 to sclasscount
if document.getElementById("checkboxleague_" & i).checked then
document.getElementById("checkboxleague_" & i).checked=false
for j=1 to matchcount
if split(A(j,3),",")(0)=split(B(i),",")(0) then
document.getElementById("tr1_" & A(j,1)).style.display="none"
document.getElementById("tr2_" & A(j,1)).style.display="none"
hh=hh+1
end if
next
else
document.getElementById("checkboxleague_" & i).checked=true
for j=1 to matchcount
if split(A(j,3),",")(0)=split(B(i),",")(0) then
document.getElementById("tr1_" & A(j,1)).style.display=""
if document.getElementById("tr2_" & A(j,1)).cells(0).innerhtml<>"" then
'document.getElementById("tr2_" & A(j,1)).style.display=""
end if
end if
next
end if
next
document.getElementById("hiddencount").innerText=hh
end sub
sub ShowMatch(n)
select case n
case 0 call ShowAllMatch()
case else ShowMatchByMatchState(n)
end select
end sub
sub ShowMatchByMatchState(n)
dim i,j
hh=0
Set trs=document.getElementById("table_live").getElementsByTagName("tr")
for i=1 to trs.Length-1
if not isnull(trs(i).getAttribute("index")) then
trs(i).style.display="none"
trs(i+1).style.display="none"
end if
next
select case n
case 1 '正在进行中
for j=1 to matchcount
if A(j,6)>0 then
document.getElementById("tr1_" & A(j,1)).style.display=""
if A(j,19)<>"" then
'document.getElementById("tr2_" & A(j,1)).style.display=""
end if
hh=hh+1
end if
next
case 2 '完场
for j=1 to matchcount
if A(j,6)=-1 then
document.getElementById("tr1_" & A(j,1)).style.display=""
if A(j,19)<>"" then
'document.getElementById("tr2_" & A(j,1)).style.display=""
end if
hh=hh+1
end if
next
case 3 '未开场
for j=1 to matchcount
if A(j,6)=0 then
document.getElementById("tr1_" & A(j,1)).style.display=""
if A(j,19)<>"" then
'document.getElementById("tr2_" & A(j,1)).style.display=""
end if
hh=hh+1
end if
next
case 4 '走地
for j=1 to matchcount
if A(j,18)="True" then
document.getElementById("tr1_" & A(j,1)).style.display=""
if A(j,19)<>"" then
'document.getElementById("tr2_" & A(j,1)).style.display=""
end if
hh=hh+1
end if
next
end select
document.getElementById("hiddencount").innerText=matchcount -hh
end sub
sub CheckLeague(i)
dim j
dim matchid
hh=document.getElementById("hiddencount").innerText
if document.getElementById("checkboxleague_" & i).checked=true then
for j=1 to matchcount
if split(A(j,3),",")(0)=split(B(i),",")(0) then
document.getElementById("tr1_" & A(j,1)).style.display=""
if document.getElementById("tr2_" & A(j,1)).cells(0).innerhtml<>"" then
'document.getElementById("tr2_" & A(j,1)).style.display=""
end if
hh=hh-1
end if
next
else
for j=1 to matchcount
if split(A(j,3),",")(0)=split(B(i),",")(0) then
document.getElementById("tr1_" & A(j,1)).style.display="none"
document.getElementById("tr2_" & A(j,1)).style.display="none"
hh=hh+1
end if
next
end if
document.getElementById("hiddencount").innerText=hh
end sub
sub showgoallist(i)
window.open "http://www.totou.com/live/liveDetail.jsp?mId=" & (Number(A(i,1))+102030), "","top=50,left=300,scrollbars=no,resizable=no,width=350, height=330"
end sub
sub sms(i)
window.open "http://live.totou.com/sms.aspx?id=" & A(i,1) &"&team=" & split(A(i,8),",")(m_language) &" VS " & split(A(i,9),",")(m_language), "","scrollbars=no,resizable=no,width=420, height=360"
end sub
sub analysis(ID)
window.open "/jsp/data.jsp?dId=" & (Number(ID)+102030), "","top=0,left=0,scrollbars=yes,resizable=yes,width=800, height=600"
end sub
sub hidematch(i)
dim matchindex
document.getElementById("tr1_" & A(i,1)).style.display="none"
document.getElementById("tr2_" & A(i,1)).style.display="none"
document.getElementById("hiddencount").innerText=document.getElementById("hiddencount").innerText+1
end sub
sub MoveToBottom(m)
on error resume next
document.getElementById("tr1_" & m).parentElement.insertAdjacentElement "BeforeEnd",document.getElementById("tr1_" & m)
document.getElementById("tr2_" & m).parentElement.insertAdjacentElement "BeforeEnd",document.getElementById("tr2_" & m)
document.getElementById("table_live").rows(4).insertAdjacentElement "BeforeBegin", document.getElementById("tr_ad1")
document.getElementById("table_live").rows(9).insertAdjacentElement "BeforeBegin", document.getElementById("tr_ad2")
document.getElementById("table_live").rows(14).insertAdjacentElement "BeforeBegin", document.getElementById("tr_ad3")
document.getElementById("table_live").rows(19).insertAdjacentElement "BeforeBegin", document.getElementById("tr_ad4")
end sub
sub AsianOdds(ID)
theURL="/jsp/odds.jsp?aId=" & (Number(ID)+8888)
'window.open theURL,"","width=620,height=560,top=20,left=90,resizable=yes,scrollbars=yes"
end sub
sub EuropeOdds(ID)
theURL="/jsp/odds2.jsp?oId=" & (Number(ID)+8888)
'window.open theURL,"","width=650,height=520,top=40,left=40,resizable=yes,scrollbars=yes"
end sub
sub TeamPanlu_10(ID)
theURL="/jsp/panlu.jsp?tId=" & (Number(ID)+8888)
'window.open theURL,"","width=580,height=596,top=10,left=100,resizable=yes,scrollbars=yes"
end sub
'更新比赛进行的时间
sub setMatchTime()
on error resume next
for i =1 to matchcount
if A(i,6)=1 then '上半场进行中
goTime = datediff("n",dateadd("s",difftime,A(i,4)),now)
if goTime>45 then goTime = "45+"
if goTime<1 then goTime = "1"
document.getElementById("time_" & A(i,1)).innerHTML = goTime & "
"
elseif A(i,6)=3 then'下半场进行中
goTime = datediff("n",dateadd("s",difftime,A(i,5)),now)+46
goTime = goTime-63
if goTime > 90 then goTime = "90+"
if goTime < 46 then goTime = "46"
document.getElementById("time_" & A(i,1)).innerHTML = goTime & "
"
end if
next
window.setTimeout "setMatchTime()" , 30000
end sub
sub check()
if (oldUpdateTime = lastUpdateTime and oldUpdateTime <> "") then
if (confirm("由于服务器忙或者网络问题,你已经和服务器断开连接超过 2 分钟,是否要重新连接观看比分?")) then window.location.reload
end if
oldUpdateTime = lastUpdateTime
window.setTimeout "check()" , 120000
end Sub
sub ChangeBgColor(color)
for j=1 to matchcount
if j mod 2 = 0 then
document.getElementById("tr1_" & A(j,1)).style.backgroundColor = color
end if
next
end sub
sub winReload()
window.location.reload
end sub
call setMatchTime()
window.setTimeout "getxml()",2000
window.setTimeout "check()" , 120000