dim xmlOdds,xmlScore
Set xmlOdds = CreateObject("Microsoft.XMLDOM")
Set xmlScore = CreateObject("Microsoft.XMLDOM")
Dim companyID,fullxmlfile,chxmlfile,m_language,oddskind,nofityTimer
dim company(99),companyAsia(12),companyEur(14),selCompanyID,companyCount,companyInfo(14,3),companyOrder(25),oddsdata()
dim CompanyIDDx,companyNameDx(28),companyOrderDx(28),companyDx(28,3)
dim companyInfoEur(28,4),companyNameEur(28),companyOrderEur(28),companyIDEur
oddskind=1
'亚指比较
company(0)="足彩"
company(1)="澳彩"
company(2)="波音"
company(3)="皇冠"
company(4)="立博"
company(5)="云鼎"
company(8)="Bet365"
company(11)="马来西亚"
company(12)="易胜博"
company(14)="韦德"
company(16)="三S"
company(17)="发达"
company(23)="利记"
company(24)="沙巴"
company(97)="大小比较"
company(98)="欧赔比较"
company(99)="即时赔率比较"
companyOrder(1)=1
companyOrder(2)=2
companyOrder(3)=3
companyOrder(4)=4
companyOrder(5)=5
companyOrder(8)=6
companyOrder(12)=7
companyOrder(14)=8
companyOrder(17)=9
companyOrder(23)=10
companyOrder(24)=11
selCompanyID=split("1,4,3,12,5,2,8,14,17,23,24",",")
for i=lbound(selCompanyID) to ubound(selCompanyID)
companyInfo(i,1)=trim(selCompanyID(i))
companyInfo(i,2)=company(selCompanyID(i))
companyInfo(i,3)=companyOrder(selCompanyID(i))
next
'欧指比较
companyNameEur(1)="澳门"
companyNameEur(3)="SB"
companyNameEur(4)="立博"
companyNameEur(5)="云鼎"
companyNameEur(7)="SNAI"
companyNameEur(8)="Bet365"
companyNameEur(9)="威廉希尔"
companyNameEur(12)="易胜博"
companyNameEur(14)="韦德"
companyNameEur(15)="SSP"
companyNameEur(16)="三S"
companyNameEur(18)="EuroBet"
companyNameEur(19)="Interwetten"
companyNameEur(23)="利记"
companyNameEur(24)="沙巴"
companyOrderEur(1)=1
companyOrderEur(3)=2
companyOrderEur(4)=3
companyOrderEur(5)=4
companyOrderEur(7)=5
companyOrderEur(8)=6
companyOrderEur(9)=7
companyOrderEur(12)=8
companyOrderEur(14)=9
companyOrderEur(15)=10
companyOrderEur(18)=11
companyOrderEur(19)=12
companyOrderEur(23)=13
companyOrderEur(24)=14
companyIDEur=split("9,14,4,15,1,8,19,12,18,7,3,5,23,24",",")
for i=lbound(companyidEur) to ubound(companyidEur)
companyInfoEur(i,1)=trim(companyIDEur(i))
companyInfoEur(i,2)=companyNameEur(companyIDEur(i))
companyInfoEur(i,3)=companyOrderEur(companyIDEur(i))
next
'大小比较
companyNameDx(1)="澳门"
companyNameDx(3)="SB"
companyNameDx(5)="云鼎"
companyNameDx(23)="利记"
companyNameDx(24)="沙巴"
companyOrderDx(1)=1
companyOrderDx(3)=2
companyOrderDx(5)=3
companyOrderDx(23)=4
companyOrderDx(24)=5
companyIDDx=split("1,3,5,23,24",",")
for i=lbound(companyIDDx) to ubound(companyIDDx)
companyDx(i,1)=trim(companyIDDx(i))
companyDx(i,2)=companyNameDx(companyIDDx(i))
companyDx(i,3)=companyOrderDx(companyIDDx(i))
next
companyCount=5
'亚赔比较 选择公司的列表数组
companyAsia(0)="澳彩"
companyAsia(1)="立博"
companyAsia(2)="皇冠"
companyAsia(3)="易胜博"
companyAsia(4)="云鼎"
companyAsia(5)="波音"
companyAsia(6)="BET365"
companyAsia(7)="韦德"
companyAsia(8)="发达"
companyAsia(9)="利记"
companyAsia(10)="沙巴"
'欧赔比较 选择公司的列表数组
companyEur(0)="威廉希尔"
companyEur(1)="韦德"
companyEur(2)="立博"
companyEur(3)="SSP国际"
companyEur(4)="澳门"
companyEur(5)="BET365"
companyEur(6)="Interwetten"
companyEur(7)="易胜博"
companyEur(8)="Eurobet"
companyEur(9)="SNAI"
companyEur(10)="SB"
companyEur(11)="云鼎"
companyEur(12)="利记"
companyEur(13)="沙巴"
dim state_ch(17)
state_ch(0)="推迟,推遲,Defer"
state_ch(1)="中断,中斷,Halt"
state_ch(2)="腰斩,腰斬,Halt"
state_ch(3)="待定,待定,Wait"
state_ch(13)="完,完,FT"
state_ch(14)=",,"
state_ch(15)="上,上,1"
state_ch(16)="中,中,Ha"
state_ch(17)="下,下,2"
dim xml1_xml,loaded,soundCheck,xmlbf_xml
xml1_xml=""
xmlbf_xml=""
soundCheck=true
dim riseColor,fallColor
riseColor="#FFB0B0"
fallColor="#00FF44"
dim notify
notify=""
dim i
dim flash_sound(2)'变水声,临场速变声,进球声
flash_sound(0) = ""
flash_sound(1) = ""
flash_sound(2) = ""
dim Adcount
adcount=4
dim adinfo1(10),adinfo2(10)
adinfo1(1)=""
adinfo1(2)=""
adinfo1(3)=""
adinfo1(4)=""
adinfo2(1)=""
adinfo2(2)=""
adinfo2(3)=""
adinfo2(4)=""
dim kk,matchcount
dim leaguecount
dim matchData() '保存比赛信息、赔率
dim tr_html()
dim html0(25)
dim GoalCn(25) '让球盘口
dim Goal_T_Cn(80)'大小盘盘口
GoalCn(0)="平手"
GoalCn(1)="平手/半球"
GoalCn(2)="半球"
GoalCn(3)="半球/一球"
GoalCn(4)="一球"
GoalCn(5)="一球/球半"
GoalCn(6)="球半"
GoalCn(7)="球半/两球"
GoalCn(8)="两球"
GoalCn(9)="两球/两球半"
GoalCn(10)="两球半"
GoalCn(11)="两球半/三球"
GoalCn(12)="三球"
GoalCn(13)="三球/三球半"
GoalCn(14)="三球半"
GoalCn(15)="三球半/四球"
GoalCn(16)="四球"
GoalCn(17)="四球/四球半"
GoalCn(18)="四球半"
GoalCn(19)="四球半/五球"
GoalCn(20)="五球"
GoalCn(21)="五球/五球半"
GoalCn(22)="五球半"
GoalCn(23)="五球半/六球"
GoalCn(24)="六球"
Goal_T_Cn(0)="0"
Goal_T_Cn(1)="0/0.5"
Goal_T_Cn(2)="0.5"
Goal_T_Cn(3)="0.5/1"
Goal_T_Cn(4)="1"
Goal_T_Cn(5)="1/1.5"
Goal_T_Cn(6)="1.5"
Goal_T_Cn(7)="1.5/2"
Goal_T_Cn(8)="2"
Goal_T_Cn(9)="2/2.5"
Goal_T_Cn(10)="2.5"
Goal_T_Cn(11)="2.5/3"
Goal_T_Cn(12)="3"
Goal_T_Cn(13)="3/3.5"
Goal_T_Cn(14)="3.5"
Goal_T_Cn(15)="3.5/4"
Goal_T_Cn(16)="4"
Goal_T_Cn(17)="4/4.5"
Goal_T_Cn(18)="4.5"
Goal_T_Cn(19)="4.5/5"
Goal_T_Cn(20)="5"
Goal_T_Cn(21)="5/5.5"
Goal_T_Cn(22)="5.5"
Goal_T_Cn(23)="5.5/6"
Goal_T_Cn(24)="6"
Goal_T_Cn(25)="6/6.5"
Goal_T_Cn(26)="6.5"
Goal_T_Cn(27)="6.5/7"
Goal_T_Cn(28)="7"
Goal_T_Cn(29)="7/7.5"
Goal_T_Cn(30)="7.5"
Goal_T_Cn(31)="7.5/8"
Goal_T_Cn(32)="8"
Goal_T_Cn(33)="8/8.5"
Goal_T_Cn(34)="8.5"
Goal_T_Cn(35)="8.5/9"
Goal_T_Cn(36)="9"
Goal_T_Cn(37)="9/9.5"
Goal_T_Cn(38)="9.5"
Goal_T_Cn(39)="9.5/10"
Goal_T_Cn(40)="10"
Goal_T_Cn(41)="10/10.5"
Goal_T_Cn(42)="10.5"
Goal_T_Cn(43)="10.5/11"
Goal_T_Cn(44)="11"
Goal_T_Cn(45)="11/11.5"
Goal_T_Cn(46)="11.5"
Goal_T_Cn(47)="11.5/12"
Goal_T_Cn(48)="12"
sub selCompany(ID)
if companyID<>ID then
if companyID<>24 then
document.getElementById("net"&companyID).innerhtml="["&company(companyID)&"]"
else
document.getElementById("net"&companyID).innerhtml="["&company(companyID)&"]"
end if
end if
companyID=ID
Randomize
fullxmlfile="xml/odds_all.xml?id=" & rnd(100)
chxmlfile="xml/odds_ch.xml"
'document.getElementById("loading").style.display=""
document.getElementById("odds").innerhtml=""
setTimeout "loadodds("&m_language&")",10
writeCookie "Spball_odds_SelCompanyID", companyID
writeCookie "Spball_odds_SelLanguage", m_language
'call setbgcolor(2)
'document.getElementById("net"&ID).innerhtml=""
oddskind=1
end sub
sub selRealOrCc(kind) '//打开早餐盘或即时盘,0则为早餐,1为即时,-1为完场'
if kind=0 then
fullxmlfile="xml/odds"&companyID&"_cc.xml"
chxmlfile="xml/ch_xml"&companyID&"_cc.xml"
else
fullxmlfile="xml/odds"&companyID&".xml"
chxmlfile="xml/ch_xml"&companyID&".xml"
end if
oddskind=kind '//标记是即时盘还是早餐盘'
'document.getElementById("loading").style.display=""
document.getElementById("odds").innerhtml=""
setTimeout "loadodds("&m_language&")",10
end sub
sub setbgcolor(kind)
document.getElementById("oddsKind1").style.backgroundColor=""
document.getElementById("oddsKind2").style.backgroundColor=""
document.getElementById("oddsKind1").style.Color="#000000"
document.getElementById("oddsKind2").style.Color="#000000"
document.getElementById("oddsKind"&kind).style.backgroundColor="#0000ff"
document.getElementById("oddsKind"&kind).style.Color="#FFFFFF"
end sub
sub HistoryOdds() '//打开历史胜负几率页面'
if companyid=99 then
window.open "http://www.Spball.com/history/old_AsianOdds.asp"
elseif companyid=98 then
window.open "http://www.Spball.com/history/old_Standard.asp"
elseif companyid=97 then
window.open "http://www.Spball.com/history/old_OverDown.asp"
elseif companyid=2 or companyid=3 or companyid=5 or companyid=7 or companyid=16 then
window.open "history/3in1Odds.aspx?companyid=" & companyID &"&oddsKind=" & oddskind &"&company=" & company(companyid)
else
window.open "history/AsianOdds.aspx?companyid=" & companyID &"&oddsKind=" & oddskind &"&company=" & company(companyid)
end if
end sub
function Goal2GoalCn(goal)
'数字盘口转汉汉字
if goal>=0 then Goal2GoalCn=GoalCn(cint(goal*4)) else Goal2GoalCn="受让"& GoalCn(abs(cint(goal*4)))
end function
sub loadodds(language)
loaded=0
document.getElementById("company").innerhtml=company(companyid)
m_language=language
myxml.async = false
myxml.load fullxmlfile
set kk=myxml.childNodes.item(1).childNodes.item(0)
matchcount=kk.childNodes.length
redim tr_html(matchcount-1)
redim matchData(matchcount,22)
If matchcount>0 Then
if companyid=99 then
Call MakeTable_Asia("0,1,2,6,3,")
elseif companyid=98 then
Call MakeTable_Eur("0,1,2,3,4,")
elseif companyid=97 then
Call MakeTable_dx()
elseif companyid=3 or companyid=5 or companyid=7 or companyid=16 or companyid=24 then
Call bbin_MakeTable()
else
Call MakeTable()
end if
else
document.getElementById("odds").innerhtml="
暂无相关数据!
"
end if
call matkeleague()
call makecompany()
writeCookie "Spball_odds_SelLanguage", m_language '记录所选的语言
document.getElementById("hiddencount").innerText=0
'document.getElementById("loading").style.display="none"
end sub
sub MakeTable() '澳门类赔率对阵
on error resume next
dim ii
ii=0
dim j
dim match_id
dim match_leagues
dim match_typecolor
dim match_hometeamID
dim match_guestteamID
dim match_homeorder,match_guestorder,tv
dim line
line=0
for i=0 to matchcount-1
match_id=kk.childNodes.item(i).childNodes.item(0).Text 'ID
match_typecolor=kk.childNodes.item(i).childNodes.item(1).Text '类型背景色
match_leagues=kk.childNodes.item(i).childNodes.item(2).Text'类型名称
matchData(i,0)=match_id
matchData(i,1)=kk.childNodes.item(i).childNodes.item(3).Text '开赛时间
matchData(i,2)=split(match_leagues,",")(m_language)'选择的语言对类的类型名
matchData(i,19)=split(kk.childNodes.item(i).childNodes.item(4).Text,",")(m_language)'主队名
matchData(i,20)=split(kk.childNodes.item(i).childNodes.item(5).Text,",")(m_language)'客队名
match_hometeamID=split(kk.childNodes.item(i).childNodes.item(6).Text,",")(0)
match_guestteamID=split(kk.childNodes.item(i).childNodes.item(6).Text,",")(1)
Neutrality=kk.childNodes.item(i).childNodes.item(7).Text'中立场
matchData(i,5)=kk.childNodes.item(i).childNodes.item(8).Text'上盘
if matchData(i,5)="2" then
matchData(i,21)=matchData(i,20) '上盘
matchData(i,22)=matchData(i,19) '下盘
else
matchData(i,21)=matchData(i,19)
matchData(i,22)=matchData(i,20)
end if
tmp=kk.childNodes.item(i).childNodes.item(9).Text
matchData(i,6)=split(tmp,",")(0) '赔率ID
matchData(i,7)=split(tmp,",")(1)'初盘盘口
matchData(i,8)=split(tmp,",")(2)'盘口
matchData(i,9)=split(tmp,",")(3) '上盘水位
matchData(i,10)=split(tmp,",")(4) '下盘水位
tmp=kk.childNodes.item(i).childNodes.item(10).Text
matchData(i,11)=split(tmp,",")(0) 'oddsid_s
matchData(i,12)=split(tmp,",")(4) '主胜
matchData(i,13)=split(tmp,",")(5) '客胜
matchData(i,14)=split(tmp,",")(6) '和
matchData(i,15)=split(tmp,",")(1) '初主胜
matchData(i,16)=split(tmp,",")(2) '初客胜
matchData(i,17)=split(tmp,",")(3) '初和
match_homeorder=trim(split(kk.childNodes.item(i).childNodes.item(11).Text,",")(0)) '主队排名
match_guestorder=trim(split(kk.childNodes.item(i).childNodes.item(11).Text,",")(1)) '客队排名
tv=kk.childNodes.item(i).childNodes.item(12).Text
if match_homeorder<>"" then match_homeorder="["&match_homeorder&"]"
if match_guestorder<>"" then match_guestorder="["&match_guestorder&"]"
matchData(i,4)=false
if dateadd("s", diffTime,matchData(i,1))>now() then '还没有到开场时间
line=line+1
matchData(i,4)=true '是否隐藏
html0(0) = "
"
html0(8) =""
if matchData(i,8)<>""then
html0(9)= ""&Goal2GoalCn(matchData(i,8))&""
else
html0(9)= ""
end if
'盘口是否有变 显示初盘
if matchData(i,7)<>""then
if matchData(i,7)=matchData(i,8) then html0(10) ="变 "
if cdbl(matchData(i,7))升 "
if cdbl(matchData(i,7))>cdbl(matchData(i,8)) then html0(10) ="降 "
else
html0(10) =" "
end if
HWco="#000000"
SOco=HWco
GWco=HWco
If matchData(i,12)<>matchData(i,15) or matchData(i,13)<>matchData(i,16) or matchData(i,14)<>matchData(i,17) Then '判断1x2是否有变化
If matchData(i,12) > matchData(i,15) Then HWco="red"
if matchData(i,12) < matchData(i,15) Then HWco="green"
If matchData(i,13) > matchData(i,16) Then GWco="red"
if matchData(i,13) < matchData(i,16) Then GWco="green"
If matchData(i,14) > matchData(i,17) Then SOco="red"
if matchData(i,14) < matchData(i,17) Then SOco="green"
End if
if matchData(i,5)="2" then '客队上盘
html0(11) ="" & matchData(i,13) & ""& matchData(i,14) & ""& matchData(i,12) & "
"
For ii = 0 To matchcount-1
oddshtml=oddshtml & tr_html(ii)
Next
oddshtml=oddshtml& "
"
if companyid=0 then oddshtml="
中国足彩即时指数
"& oddshtml
document.getElementById("odds").innerhtml=oddshtml
end sub
sub bbin_MakeTable() '新宝类赔率对阵
on error resume next
dim ii
ii=0
dim j
dim match_id
dim match_leagues
dim match_typecolor
dim match_hometeamID
dim match_guestteamID
dim goal_cn
dim oldmatch_type
dim match_homeorder,match_guestorder,tv
dim line
line=0
oldmatch_type=""
for i=0 to matchcount-1
match_id=kk.childNodes.item(i).childNodes.item(0).Text 'ID
match_typecolor=kk.childNodes.item(i).childNodes.item(1).Text '类型背景色
match_leagues=kk.childNodes.item(i).childNodes.item(2).Text'类型名称
matchData(i,0)=match_id
matchData(i,1)=kk.childNodes.item(i).childNodes.item(3).Text'开赛时间
matchData(i,2)=split(match_leagues,",")(m_language)'选择的语言对类的类型名
matchData(i,19)=split(kk.childNodes.item(i).childNodes.item(4).Text,",")(m_language)'主队名
matchData(i,20)=split(kk.childNodes.item(i).childNodes.item(5).Text,",")(m_language)'客队名
match_hometeamID=split(kk.childNodes.item(i).childNodes.item(6).Text,",")(0)
match_guestteamID=split(kk.childNodes.item(i).childNodes.item(6).Text,",")(1)
Neutrality=kk.childNodes.item(i).childNodes.item(7).Text'中立场
matchData(i,5)=kk.childNodes.item(i).childNodes.item(8).Text'上盘
if matchData(i,5)="2" then
matchData(i,21)=matchData(i,20) '上盘
matchData(i,22)=matchData(i,19) '下盘
else
matchData(i,21)=matchData(i,19)
matchData(i,22)=matchData(i,20)
end if
matchData(i,6)=split(kk.childNodes.item(i).childNodes.item(9).Text,",")(0)'赔率ID
matchData(i,7)=split(kk.childNodes.item(i).childNodes.item(9).Text,",")(1)'初盘口
matchData(i,8)=split(kk.childNodes.item(i).childNodes.item(9).Text,",")(2)'盘口
matchData(i,9)=split(kk.childNodes.item(i).childNodes.item(9).Text,",")(3) '上盘水位
matchData(i,10)=split(kk.childNodes.item(i).childNodes.item(9).Text,",")(4) '下盘水位
matchData(i,11)=split(kk.childNodes.item(i).childNodes.item(10).Text,",")(0)'赔率ID
matchData(i,12)=split(kk.childNodes.item(i).childNodes.item(10).Text,",")(1)'主胜
matchData(i,13)=split(kk.childNodes.item(i).childNodes.item(10).Text,",")(2) '客胜
matchData(i,14)=split(kk.childNodes.item(i).childNodes.item(10).Text,",")(3) '走水
matchData(i,15)=split(kk.childNodes.item(i).childNodes.item(11).Text,",")(0)'赔率ID
matchData(i,16)=split(kk.childNodes.item(i).childNodes.item(11).Text,",")(1)'盘口
matchData(i,17)=split(kk.childNodes.item(i).childNodes.item(11).Text,",")(2) '上盘水位
matchData(i,18)=split(kk.childNodes.item(i).childNodes.item(11).Text,",")(3) '下盘水位
matchData(i,3)=kk.childNodes.item(i).childNodes.item(12).Text '是否走地
match_homeorder=trim(split(kk.childNodes.item(i).childNodes.item(13).Text,",")(0)) '主队排名
match_guestorder=trim(split(kk.childNodes.item(i).childNodes.item(13).Text,",")(1)) '客队排名
tv=kk.childNodes.item(i).childNodes.item(14).Text
if match_homeorder<>"" then match_homeorder="["&match_homeorder&"]"
if match_guestorder<>"" then match_guestorder="["&match_guestorder&"]"
matchData(i,4)=false
if dateadd("s", diffTime,matchData(i,1))>now() then '还没有到开场时间
line=line+1
matchData(i,4)=true '是否隐藏
html0(0)="
"
if oldmatch_type<>matchData(i,2) then
html0(0) =html0(0)& "
"&matchData(i,2)&"
"
oldmatch_type=matchData(i,2)
end if
html0(1) = "
"
For ii = 0 To matchcount-1
oddshtml=oddshtml&vbCrLf & tr_html(ii)
Next
document.getElementById("odds").innerhtml=oddshtml
end sub
'赔率联赛/杯赛名列表
sub matkeleague()
on error resume next
dim kk1
dim st
dim leaguehtml
set kk1=myxml.childNodes.item(1).childNodes.item(1)
leaguecount=kk1.childNodes.length
leaguehtml=""
for i=0 to leaguecount-1
st=split(kk1.childNodes.item(i).Text,",")(m_language)
leaguehtml=leaguehtml & "
"
next
leaguehtml="
" & leaguehtml & "
"
document.getElementById("myleague").innerHTML=leaguehtml
end sub
sub CheckSelCom()
on error resume next
dim i1,j1,k1
dim strComID
strComID=""
j1=0
if companyid=99 then k1=10 else k1=13
for i1=0 to k1
if document.getElementById("checkboxcompany_" & i1+1).checked=true then
j1=j1+1
strComID = strComID & i1 &","
end if
next
if j1>5 then
msgbox"一次最多只能选择五家公司!",0,"提示"
else
if companyid=99 then
call MakeTable_Asia(strComID)
else
Call MakeTable_Eur(strComID)
end if
end if
end sub
'亚赔比较,欧指比较--选择公司显示列表
sub makecompany()
on error resume next
dim html
html=""
document.getElementById("companysel").style.display=""
if companyid=98 then
for i=0 to 13
if i<5 then
html=html & "
"
else
html=html & "
"
end if
next
elseif companyid=99 then
for i=0 to 10
if i<4 then
html=html & "
"
elseif i=6 then
html=html & "
"
else
html=html & "
"
end if
next
else
document.getElementById("companysel").style.display="none"
end if
html="
" & html & "
注: 最多选择5家公司
"
document.getElementById("mycompany").innerHTML=html
end sub
sub getoddsxml()
on error resume next
xmlOdds.load chxmlfile
xmlOdds.onreadystatechange =GetRef("refresh")
window.setTimeout "getoddsxml()",6000
end sub
sub refresh()
on error resume next
if xmlOdds.readyState<>4 then exit sub
if xmlOdds.parseError.errorCode<>0 Then exit sub
if xmlOdds.xml = "" then exit sub
xml1.XMLDocument.async = false
xml1.XMLDocument.loadXML xmlOdds.xml
if xml1.xml= xml1_xml or xml1.xml="" then exit sub
xml1_xml=xml1.xml
if loaded<> -1 then
loaded=-1
else
if xml1.childNodes.item(1).Attributes(0).text<>"0" then
call loadodds(m_language)
exit sub
end if
if companyid=99 then
Call refresh_Asia()
elseif companyid=98 then
Call refresh_Eur()
elseif companyid=97 then
Call refresh_dx()
elseif companyid=3 or companyid=5 or companyid=7 or companyid=16 or companyid=24 then
Call bbin_refresh()
else
Call ao_refresh()
end if
end if
end sub
sub ao_refresh()
on error resume next
dim i,j,match_id,matchtime,match_oddsid,match_shangpan,match_goal,match_upodds,match_downodds
dim leap, tmp,match_index
dim oddsid_s,match_homewin,match_guestwin,match_standoff
dim upoddschange, downoddschange, oddschange
For i = 0 To xml1.childNodes.Item(1).childNodes.length - 1
match_id=xml1.childNodes.Item(1).childNodes.Item(i).childNodes(0).Text
matchtime=xml1.childNodes.Item(1).childNodes.Item(i).childNodes(1).Text
match_shangpan=xml1.childNodes.item(1).childNodes.item(i).childNodes(2).Text'上盘
tmp=xml1.childNodes.item(1).childNodes.item(i).childNodes(3).text
match_oddsid=split(tmp,",")(0)'赔率ID
match_goal=split(tmp,",")(1)'盘口
match_upodds=split(tmp,",")(2) '上盘水位
match_downodds=split(tmp,",")(3) '下盘水位
tmp=xml1.childNodes.item(1).childNodes.item(i).childNodes(4).text
match_oddsid_s=split(tmp,",")(0)'欧赔ID
match_homewin=split(tmp,",")(1)'
match_guestwin=split(tmp,",")(2)
match_standoff=split(tmp,",")(3)
err.clear
match_index=document.getElementById("table_" & match_id).index
if err then tmp=false else tmp=true
err.clear
if tmp then '对象存在
if matchData(match_index,8)<>match_goal and matchData(match_index,8)="" then
call loadodds(m_language)
exit sub
end if
'判断上盘水位是否有变化
upoddschange=false
leap=false '临场急变
if matchData(match_index,9)<>match_upodds then
if matchData(match_index,9)>match_upodds then
document.getElementById("up_" & match_id).style.backgroundColor=fallColor
else
document.getElementById("up_" & match_id).style.backgroundColor=riseColor
end if
if matchData(match_index,9)<>"" and dateadd("s", 10800-diffTime,now)>cdate(matchtime) and matchData(match_index,8)=match_goal then '临场两小时速变提示
if matchData(match_index,8)=match_goal then
if matchData(match_index,9)-match_upodds>0.09 then '临场速变,降
document.getElementById("upodds_" & match_id).innerhtml=match_upodds+"★"
leap=true
elseif match_upodds-matchData(match_index,9)>0.09 then '临场速变,升
document.getElementById("upodds_" & match_id).innerhtml=match_upodds+"★"
leap=true
else
document.getElementById("upodds_" & match_id).innertext=match_upodds
end if
else
document.getElementById("upodds_" & match_id).innertext=match_upodds
end if
else
document.getElementById("upodds_" & match_id).innertext=match_upodds
end if
upoddschange=true
end if
'判断下盘水位是否有变化
downoddschange=false
if matchData(match_index,10)<>match_downodds then
if matchData(match_index,10)>match_downodds then
document.getElementById("down_" & match_id).style.backgroundColor=fallColor
else
document.getElementById("down_" & match_id).style.backgroundColor=riseColor
end if
document.getElementById("downodds_" & match_id).innertext=match_downodds
matchData(match_index,10)=match_downodds
downoddschange=true
end if
'判断盘口是否有变化
goalchange=false
if matchData(match_index,8)<>match_goal then
if match_goal<>""then
if cdbl(matchData(match_index,8))"&Goal2GoalCn(match_goal)
document.getElementById("goal_" & match_id).style.backgroundColor="#FFFF88"
elseif cdbl(matchData(match_index,8))>cdbl(match_goal) then
document.getElementById("R_goal_" & match_id).innerHTML= Goal2GoalCn(match_goal)&""
document.getElementById("goal_" & match_id).style.backgroundColor="#00CC00"
end if
if matchData(match_index,7)<>match_goal and matchData(match_index,7)<>"" then '与初盘不同,显示初盘
if matchData(match_index,7)match_goal then document.getElementById("F_goal_" & match_id).innerText="降"
document.getElementById("F_goal_" & match_id).style.display=""
else
document.getElementById("F_goal_" & match_id).style.display="none"'与初盘同,不显示初盘
end if
else
document.getElementById("R_goal_" & match_id).innertext=""
end if
matchData(match_index,6)=match_oddsid
goalchange=true
'小屏幕显示
if document.getElementById("windowCheck").checked=true then
if document.getElementById("table_" & match_id).style.display<>"none" then
'动态创建窗口方式
call ShowGoalWindow(matchData(match_index,21),matchData(match_index,22),match_upodds,match_downodds ,Goal2GoalCn(match_goal))
end if
end if
end if
oddschange=upoddschange or downoddschange or goalchange
if oddschange then
call Ch_Ao_odds(match_index,leap) '显示变盘声
'显示变水文字提示
if goalchange then
if matchData(match_index,8)>match_goal then flag="↓" else flag="↑"
document.getElementById("notify").innerHTML=document.getElementById("notify").innerHTML& matchData(match_index,21) & ":" & Goal2GoalCn(match_goal) &flag &" "
else
if matchData(match_index,9)>match_upodds then flag="↓" else flag="↑"
document.getElementById("notify").innerHTML=document.getElementById("notify").innerHTML& matchData(match_index,21) & ":" & match_upodds &flag&" "
end if
matchData(match_index,8)=match_goal
matchData(match_index,9)=match_upodds
end if
'判断标准盘
standardoddschange=false
if matchData(match_index,12)<>match_homewin then
if matchData(match_index,12)>match_homewin then
document.getElementById("hw_" & match_id).style.backgroundColor=fallColor
else
document.getElementById("hw_" & match_id).style.backgroundColor=riseColor
end if
if matchData(match_index,15)>match_homewin then
document.getElementById("hw_" & match_id).style.Color="green"
else
document.getElementById("hw_" & match_id).style.Color="red"
end if
document.getElementById("hw_" & match_id).innertext=match_homewin
matchData(match_index,12)=match_homewin
standardoddschange=true
end if
if matchData(match_index,14)<>match_standoff then
if matchData(match_index,14)>match_standoff then
document.getElementById("st_" & match_id).style.backgroundColor=fallColor
else
document.getElementById("st_" & match_id).style.backgroundColor=riseColor
end if
if matchData(match_index,17)>match_standoff then
document.getElementById("st_" & match_id).style.Color="green"
else
document.getElementById("st_" & match_id).style.Color="red"
end if
document.getElementById("st_" & match_id).innertext=match_standoff
matchData(match_index,14)=match_standoff
standardoddschange=true
end if
if matchData(match_index,13)<>match_guestwin then
if matchData(match_index,13)>match_guestwin then
document.getElementById("gw_" & match_id).style.backgroundColor=fallColor
else
document.getElementById("gw_" & match_id).style.backgroundColor=riseColor
end if
if matchData(match_index,16)>match_guestwin then
document.getElementById("gw_" & match_id).style.Color="green"
else
document.getElementById("gw_" & match_id).style.Color="red"
end if
document.getElementById("gw_" & match_id).innertext=match_guestwin
matchData(match_index,13)=match_guestwin
standardoddschange=true
end if
if standardoddschange then
matchData(match_index,11)=match_oddsid_s
if not oddschange then call Ch_Ao_odds(match_index,leap) '显示变水声
'显示变水文字提示
document.getElementById("notify").innerHTML=document.getElementById("notify").innerHTML& matchData(match_index,19) & " " & match_homewin &" " & match_standoff & " "& match_guestwin &" "& matchData(match_index,20)& " "
end if
end if
next
end sub
sub bbin_refresh()
on error resume next
dim i
dim j
dim match_id
dim matchtime
dim match_oddsid
dim match_shangpan
dim match_goal
dim match_upodds
dim match_downodds
dim upoddschange, downoddschange, oddschange
document.getElementById("notify").innerHTML= ""
For i = 0 To xml1.childNodes.Item(1).childNodes.length - 1
match_id=xml1.childNodes.Item(1).childNodes.Item(i).childNodes(0).Text
matchtime=xml1.childNodes.Item(1).childNodes.Item(i).childNodes(1).Text
match_oddsid=split(xml1.childNodes.Item(1).childNodes.Item(i).childNodes(2).Text,",")(0)'ID
match_goal=split(xml1.childNodes.Item(1).childNodes.Item(i).childNodes(2).Text,",")(1)'盘口
match_upodds=split(xml1.childNodes.Item(1).childNodes.Item(i).childNodes(2).Text,",")(2) '上盘水位
match_downodds=split(xml1.childNodes.Item(1).childNodes.Item(i).childNodes(2).Text,",")(3) '下盘水位
match_oddsID_s=split(xml1.childNodes.Item(1).childNodes.Item(i).childNodes(3).Text,",")(0)'ID
homewin=split(xml1.childNodes.Item(1).childNodes.Item(i).childNodes(3).Text,",")(1)'主胜
guestwin=split(xml1.childNodes.Item(1).childNodes.Item(i).childNodes(3).Text,",")(2) '客胜
Standoff=split(xml1.childNodes.Item(1).childNodes.Item(i).childNodes(3).Text,",")(3) '走水
match_oddsid_t=split(xml1.childNodes.Item(1).childNodes.Item(i).childNodes(4).Text,",")(0)'ID
match_goal_t=split(xml1.childNodes.Item(1).childNodes.Item(i).childNodes(4).Text,",")(1)'盘口
match_upodds_t=split(xml1.childNodes.Item(1).childNodes.Item(i).childNodes(4).Text,",")(2) '上盘水位
match_downodds_t=split(xml1.childNodes.Item(1).childNodes.Item(i).childNodes(4).Text,",")(3) '下盘水位
err.clear
match_index=document.getElementById("table_" & match_id).index
if err then tmp=false else tmp=true
err.clear
if tmp then '对象存在
oddschange_l=false
oddschange_s=false
oddschange_t=false
goalchange_l=false
goalchange_t=false
'判断让球盘上盘水位是否有变化
if matchData(match_index,9)<>match_upodds then
if matchData(match_index,9)>match_upodds then
document.getElementById("upodds_" & match_id).style.backgroundColor="#00FF44"
else
document.getElementById("upodds_" & match_id).style.backgroundColor="#F8A7A3"
end if
document.getElementById("upodds_" & match_id).innertext=match_upodds
oddschange_l=true
end if
'判断让球盘下盘水位是否有变化
if matchData(match_index,10)<>match_downodds then
if matchData(match_index,10)>match_downodds then
document.getElementById("downodds_" & match_id).style.backgroundColor="#00FF44"
else
document.getElementById("downodds_" & match_id).style.backgroundColor="#F8A7A3"
end if
document.getElementById("downodds_" & match_id).innertext=match_downodds
matchData(match_index,10)=match_downodds
oddschange_l=true
end if
'判断大小盘上盘水位是否有变化
if matchData(match_index,17)<>match_upodds_t then
if matchData(match_index,17)>match_upodds_t then
document.getElementById("upodds_t_" & match_id).style.backgroundColor="#00FF44"
else
document.getElementById("upodds_t_" & match_id).style.backgroundColor="#F8A7A3"
end if
document.getElementById("upodds_t_" & match_id).innertext=match_upodds_t
oddschange_t=true
end if
'判断大小盘下盘水位是否有变化
if matchData(match_index,18)<>match_downodds_t then
if matchData(match_index,18)>match_downodds_t then
document.getElementById("downodds_t_" & match_id).style.backgroundColor="#00FF44"
else
document.getElementById("downodds_t_" & match_id).style.backgroundColor="#F8A7A3"
end if
document.getElementById("downodds_t_" & match_id).innertext=match_downodds_t
matchData(match_index,18)=match_downodds_t
oddschange_t=true
end if
'判断标准盘主胜水位是否有变化
if matchData(match_index,12)<>homewin then
if matchData(match_index,12)>homewin then
document.getElementById("homewin_" & match_id).style.backgroundColor="#00FF44"
else
document.getElementById("homewin_" & match_id).style.backgroundColor="#F8A7A3"
end if
document.getElementById("homewin_" & match_id).innertext=homewin
matchData(match_index,12)=homewin
matchData(match_index,11)=match_oddsid_s
oddschange_s=true
end if
'判断标准盘客胜水位是否有变化
if matchData(match_index,13)<>guestwin then
if matchData(match_index,13)>guestwin then
document.getElementById("guestwin_" & match_id).style.backgroundColor="#00FF44"
else
document.getElementById("guestwin_" & match_id).style.backgroundColor="#F8A7A3"
end if
document.getElementById("guestwin_" & match_id).innertext=guestwin
matchData(match_index,13)=guestwin
oddschange_s=true
end if
'判断标准盘走水水位是否有变化
if matchData(match_index,14)<>Standoff then
if matchData(match_index,14)>Standoff then
document.getElementById("Standoff_" & match_id).style.backgroundColor="#00FF44"
else
document.getElementById("Standoff_" & match_id).style.backgroundColor="#F8A7A3"
end if
document.getElementById("Standoff_" & match_id).innertext=Standoff
matchData(match_index,14)=Standoff
oddschange_s=true
end if
'检查让球盘口
goalchange=false
if matchData(match_index,8)<>match_goal then
if match_goal<>""then
if cdbl(matchData(match_index,8))"& Goal2GoalCn(match_goal)
elseif cdbl(matchData(match_index,8))>cdbl(match_goal) then
document.getElementById("goal_" & match_id).innerHTML= Goal2GoalCn(match_goal)&""
end if
else
document.getElementById("goal_" & match_id).innertext=""
end if
matchData(match_index,6)=match_oddsid
goalchange_l=true
end if
'检查大小盘盘口
if matchData(match_index,16)<>match_goal_t then
if match_goal<>""then
if cdbl(matchData(match_index,16))"&Goal_T_Cn(match_goal_t*4)
document.getElementById("goal_t2_" & match_id).innerHTML= ""&Goal_T_Cn(match_goal_t*4)
else
document.getElementById("goal_t1_" & match_id).innerHTML= Goal_T_Cn(match_goal_t*4)&""
document.getElementById("goal_t2_" & match_id).innerHTML= Goal_T_Cn(match_goal_t*4)&""
end if
else
document.getElementById("goal_t1_" & match_id).innertext=""
document.getElementById("goal_t2_" & match_id).innertext=""
end if
matchData(match_index,15)=match_oddsid_t
goalchange_t=true
end if
oddschange=oddschange_l or oddschange_s or oddschange_t
goalchange=goalchange_l or goalchange_t
if oddschange or goalchange then
call Ch_SB_odds(match_id,goalchange) '声音提示
if goalchange_l then
if matchData(match_index,8)>match_goal then flag="↓" else flag="↑"
document.getElementById("notify").innerHTML=document.getElementById("notify").innerHTML&"让球:"& matchData(match_index,21) & ":" & Goal2GoalCn(match_goal) &flag &" "
else
if matchData(match_index,9)>match_upodds then flag="↓" else flag="↑"
document.getElementById("notify").innerHTML=document.getElementById("notify").innerHTML&"让球:"& matchData(match_index,21) & ":" & match_upodds &flag&" "
end if
matchData(match_index,8)=match_goal
matchData(match_index,9)=match_upodds
end if
if oddschange_t or goalchange_t then '大小盘有变
if goalchange_t then
if matchData(match_index,16)>match_goal_t then flag="↓" else flag="↑"
document.getElementById("notify").innerHTML=document.getElementById("notify").innerHTML&"大小:"& matchData(match_index,21) & ":" & Goal_T_Cn(match_goal_t*4) &flag &" "
else
if matchData(match_index,17)>match_upodds_t then flag="↓" else flag="↑"
document.getElementById("notify").innerHTML=document.getElementById("notify").innerHTML&"大小:"& matchData(match_index,21) & ":" & match_upodds_t &flag&" "
end if
matchData(match_index,16)=match_goal_t
matchData(match_index,17)=match_upodds_t
end if
if oddschange_s then '标准盘有变
document.getElementById("notify").innerHTML=document.getElementById("notify").innerHTML&"标准:"&matchData(match_index,21) & ":(" & homewin &","& standoff&","& guestwin &")"& matchData(match_index,22)&" "
end if
end if
next
end sub
sub Ch_Ao_odds(i,leap)
on error resume next
if soundCheck then '盘口变了并且选择了声音提示
if document.getElementById("table_" & matchData(i,0)).style.display<>"none" then '赛事没被隐藏
if leap then '临场急变水位
document.getElementById("sound").innerhtml=flash_sound(1)
else'变水
document.getElementById("sound").innerhtml=flash_sound(0)
end if
end if
end if
window.setTimeout "ComebackAoOddsColor(" & i & ")",60000
end sub
sub ComebackAoOddsColor(i) '恢复背景颜色
on error resume next
document.getElementById("up_" & matchData(i,0)).style.backgroundColor=""
document.getElementById("down_" & matchData(i,0)).style.backgroundColor=""
document.getElementById("goal_" & matchData(i,0)).style.backgroundColor=""
document.getElementById("hw_" & matchData(i,0)).style.backgroundColor=""
document.getElementById("st_" & matchData(i,0)).style.backgroundColor=""
document.getElementById("gw_" & matchData(i,0)).style.backgroundColor=""
if matchData(i,8)<>"" then
document.getElementById("R_goal_" & matchData(i,0)).innerHTML= Goal2GoalCn(matchData(i,8))
else
document.getElementById("R_goal_" & matchData(i,0)).innerHTML= ""
end if
document.getElementById("notify").innerHTML= ""
end sub
sub Ch_SB_odds(m,goalchange)
on error resume next
dim addHtml,n
'赛事没被隐藏 并且选择了声音提示
if soundCheck and document.getElementById("table_" & m).style.display<>"none" then
document.getElementById("sound").innerhtml=flash_sound(0)
end if
window.setTimeout "ComebackSBOddsColor(" & m & ")",60000
end sub
sub ComebackSBOddsColor(matchid) '恢复背景颜色
on error resume next
document.getElementById("upodds_" & matchid).style.backgroundColor=""
document.getElementById("downodds_" & matchid).style.backgroundColor=""
document.getElementById("upodds_t_" & matchid).style.backgroundColor=""
document.getElementById("downodds_t_" & matchid).style.backgroundColor=""
document.getElementById("homewin_" & matchid).style.backgroundColor=""
document.getElementById("guestwin_" & matchid).style.backgroundColor=""
document.getElementById("standoff_" & matchid).style.backgroundColor=""
document.getElementById("goal_" & matchid).innerhtml=document.getElementById("goal_" & matchid).innertext
document.getElementById("goal_t1_" & matchid).innerhtml=document.getElementById("goal_t1_" & matchid).innertext
document.getElementById("goal_t2_" & matchid).innerhtml=document.getElementById("goal_t2_" & matchid).innertext
document.getElementById("notify").innerHTML= ""
end sub
sub showallmatch()'今天所有的赛事
on error resume next
dim i
for i= 0 to matchcount-1
document.getElementById("table_" & matchData(i,0)).style.display=""
next
for i=1 to leaguecount
document.getElementById("checkboxleague_" & i).checked=true
next
document.getElementById("hiddencount").innerText=0
end sub
sub SelectOtherLeague()
on error resume next
dim i,j,hh
hh=0
for i=1 to leaguecount
document.getElementById("checkboxleague_" & i).checked=not document.getElementById("checkboxleague_" & i).checked
next
dim matchid
for i=1 to leaguecount
sclass=document.getElementById("labelleague_" & i).innertext
if document.getElementById("checkboxleague_" & i).checked=true then
for j=0 to matchcount-1
if matchData(j,2)=sclass then
document.getElementById("table_" & matchData(j,0)).style.display=""
end if
next
else
for j=0 to matchcount-1
if matchData(j,2)=sclass then
document.getElementById("table_" & matchData(j,0)).style.display="none"
hh=hh+1
end if
next
end if
next
document.getElementById("hiddencount").innerText=hh
end sub
sub CheckLeague(SclassIndex)
on error resume next
dim j,sclass, matchid,hh
sclass=document.getElementById("labelleague_" & SclassIndex).innertext
hh=document.getElementById("hiddencount").innerText
if document.getElementById("checkboxleague_" & SclassIndex).checked=true then
for j=0 to matchcount-1
if matchData(j,2)=sclass then
document.getElementById("table_" & matchData(j,0)).style.display=""
hh=hh-1
end if
next
else
for j=0 to matchcount-1
if matchData(j,2)=sclass then
document.getElementById("table_" & matchData(j,0)).style.display="none"
hh=hh+1
end if
next
end if
document.getElementById("hiddencount").innerText=hh
end sub
sub ChangeDetail(i,companyName)'让球盘(澳门格式)
if oddskind=0 then '早餐盘
call window.open("http://www.Spball.com/ChangeDetail/AsianOdds_cc.aspx?id="&matchData(i,6)&"&t1="&matchData(i,21)&"&t2="&matchData(i,22)&"&company="&companyName,"","width=500,height=300,resizable=yes,scrollbars=yes")
else
call window.open("http://www.Spball.com/ChangeDetail/AsianOdds.aspx?id="&matchData(i,6)&"&t1="&matchData(i,21)&"&t2="&matchData(i,22)&"&company="&companyName,"","width=500,height=400,resizable=yes,scrollbars=yes")
end if
end sub
sub ChangeDetail_p(i,companyName)'让球盘(澳门格式)图
dim oddsid
if oddskind=0 then '早餐盘
call window.open("http://www.Spball.com/ChangeDetail/AsianOdds_cc_p.aspx?id="&matchData(i,6)&"&t1="&matchData(i,21)&"&t2="&matchData(i,22)&"&company="&companyName&"&matchid="&matchData(i,0))
else
call window.open("http://www.Spball.com/ChangeDetail/AsianOdds_p.aspx?id="&matchData(i,6)&"&t1="&matchData(i,21)&"&t2="&matchData(i,22)&"&company="&companyName&"&matchid="&matchData(i,0))
end if
end sub
sub ChangeDetail_4in1(i,order,companyName)'让球盘(澳门格式)
Call window.open("/jsp/oddsTrend.jsp?mid="&oddsdata(i,order,0)&"&l="&matchData(i,21)&"&r="&matchData(i,22)&"&cn="&companyName,"","width=500,height=400,resizable=yes,scrollbars=yes")
end sub
sub ChangeDetail_p_4in1(i,order,companyName)'让球盘(澳门格式)图
call window.open("http://www.Spball.com/ChangeDetail/AsianOdds_p.aspx?id="&oddsdata(i,order,0)&"&t1="&matchData(i,21)&"&t2="&matchData(i,22)&"&company="&companyName&"&matchid="&matchData(i,0))
end sub
sub ChangeDetail_t(i,companyName) '大小盘
if oddskind=0 then '早餐盘
call window.open("http://www.Spball.com/ChangeDetail/OverDown_cc.aspx?id="&matchData(i,15)&"&home="&matchData(i,19)&"&guest="&matchData(i,20)&"&company="&companyName,"","width=500,height=300,resizable=yes,scrollbars=yes")
else
call window.open("http://www.Spball.com/ChangeDetail/OverDown.aspx?id="&matchData(i,15)&"&home="&matchData(i,19)&"&guest="&matchData(i,20)&"&company="&companyName,"","width=500,height=400,resizable=yes,scrollbars=yes")
end if
end sub
sub ChangeDetail_s(i,companyName) '标准盘
if matchData(i,11)="" then exit sub
if oddskind=0 then '早餐盘
call window.open("http://www.Spball.com/ChangeDetail/standard_cc.aspx?id="&matchData(i,11)&"&home="&matchData(i,19)&"&guest="&matchData(i,20)&"&company="&companyName,"","width=500,height=200,resizable=yes,scrollbars=yes")
else
call window.open ("http://www.Spball.com/ChangeDetail/standard.aspx?id="&matchData(i,11)&"&home="&matchData(i,19)&"&guest="&matchData(i,20)&"&company="&companyName,"","width=500,height=300,resizable=yes,scrollbars=yes")
end if
end sub
sub ChangeDetail_Eur(match_index,j)'欧盘比较,标准盘
dim oddsid
oddsid=oddsdata(match_index,companyInfoEur(j,3),0)
if oddsid="" then exit sub
window.open "http://www.Spball.com/ChangeDetail/Standard.aspx?ID="&oddsid&"&home="& matchData(match_index,5) &"&guest="& matchData(match_index,6) &"&company="&companyInfoEur(j,2),"","width=480,height=300,resizable=yes,scrollbars=yes"
end sub
sub ChangeDetail_dx(matchid,companyID,hometeam,guestteam,companyName)
dim oddsid
oddsid=document.getElementById("odds_" & companyID &"_"& matchid).oddsID
window.open "http://www.Spball.com/ChangeDetail/OverDown.aspx?ID="&oddsid&"&home="&hometeam&"&guest="&guestteam&"&company="&companyName,"","width=500,height=400,left=200,top=100,resizable=yes,scrollbars=yes"
end sub
sub ChangeDetail_p_dx(matchid,companyID,hometeam,guestteam,companyName)
dim oddsid
oddsid=document.getElementById("odds_" & companyID &"_"& matchid).oddsID
window.open "http://www.Spball.com/ChangeDetail/OverDown_p.aspx?ID="&oddsid&"&home="&hometeam&"&guest="&guestteam&"&company="&companyName&"&matchid="&matchid
end sub
sub autoHide()'到了开场时间,自动隐葳赛事
if companyid<>99 and companyid<>98 and companyid<>97 then '非综合比较
for i=0 to matchcount-1
if matchData(i,4) and dateadd("s", diffTime,matchData(i,1))"" then tv=""
Neutrality=kk.childNodes.item(i).childNodes.item(8).Text'中立场
matchdata(i,5)=kk.childNodes.item(i).childNodes.item(9).Text'上盘
if matchdata(i,5)="2" then
matchdata(i,21)=matchdata(i,20) '上盘
matchdata(i,22)=matchdata(i,19) '下盘
else
matchdata(i,21)=matchdata(i,19)
matchdata(i,22)=matchdata(i,20)
end if
matchData(i,4)=true
match_id=matchdata(i,0)
arr=split(kk.childNodes.item(i).childNodes.item(10).Text,";") '各公司赔率
zoudi=split(kk.childNodes.item(i).childNodes.item(11).Text,",") '走地情况
closepan=split(kk.childNodes.item(i).childNodes.item(12).Text,",") '封盘情况
for j=LBound(arr) To UBound(arr)
oddsdata(i,j+1,0)=split(arr(j),",")(0) '赔率ID
oddsdata(i,j+1,1)=split(arr(j),",")(1) '盘口
oddsdata(i,j+1,2)=split(arr(j),",")(2)'上盘水位
oddsdata(i,j+1,3)=split(arr(j),",")(3)'下盘水位
oddsdata(i,j+1,4)=split(arr(j),",")(4)'初盘口
oddsdata(i,j+1,5)=zoudi(j) '走地
oddsdata(i,j+1,6)=closepan(j) '封盘
next
matchdata(i,11)=false '是否完场
if matchdata(i,13)<0 then matchdata(i,11)=true
if (not flag2 and matchdata(i,13)<0) then
html0(0) = "
"
if oddsdata(i,companyInfo(selComID(j),3),6)="True" then
html0(6)=html0(6)&"(封)"
else
html0(6)=html0(6)&"(封)"
end if
html0(6)=html0(6)&""&oddsdata(i,companyInfo(selComID(j),3),3)&"
"
html0(6)=html0(6)&"
"
next
html0(7)=""
For j = 0 To 7
tr_html(i) = tr_html(i) & vbCrLf & html0(j)
Next
If InStr(matchdate1, formatdatetime(matchData(i,1),vbshortdate)) <= 0 Then
tr_html(i) = "
"&formatdatetime(matchData(i,1),vblongdate)&"
" & tr_html(i)
datecount=datecount+1
matchdate1=matchdate1 & formatdatetime(matchData(i,1),vbshortdate)
End If
'if i+1<=adcount then
'tr_html(i) =tr_html(i) & "
"
'end If
'广告开始
if (i=0 and asia_txt_1<>"") then
tr_html(i) = tr_html(i) & "
" + asia_txt_1 + "
"
elseif (i=1 and asia_txt_2<>"") then
tr_html(i) = tr_html(i) & "
" + asia_txt_2 + "
"
elseif (i=2 and asia_txt_3<>"") then
tr_html(i) = tr_html(i) & "
" + asia_txt_3 + "
"
elseif (i=3 and asia_txt_4<>"") then
tr_html(i) = tr_html(i) & "
" + asia_txt_4 + "
"
elseif (i=4 and asia_txt_5<>"") then
tr_html(i) = tr_html(i) & "
" + asia_txt_5 + "
"
end if
next
oddsHead="
"
oddsHead=oddsHead&"
选
"
oddsHead=oddsHead&"
赛事
"
oddsHead=oddsHead&"
对阵队伍
"
oddsHead=oddsHead&"
分
"
for i=LBound(selComID) To UBound(selComID)-1
oddsHead=oddsHead&"
"&companyInfo(selComID(i),2) & "
"
Next
oddsHead=oddsHead& "
"
oddshtml="
" & oddsHead
For ii = 0 To matchcount-1
oddshtml=oddshtml&vbCrLf & tr_html(ii)
Next
oddshtml=oddshtml& "
"
document.getElementById("odds").innerhtml=oddshtml
end sub
sub refresh_Asia()
on error resume next
dim i
dim j
dim match_id,company_id
dim leap
dim match_odds(4),match_closepan
dim upoddschange, downoddschange, oddschange
dim win(30,2),haveWin,havechange '指数是否有变化
havechange=false
For i = 0 To xml1.childNodes.Item(1).childNodes.length - 1
arr=split(xml1.childNodes.Item(1).childNodes.Item(i).Text,",")
match_id=arr(0)
err.clear
tmp=document.getElementById("upodds_" & arr(1) &"_"&match_id).innertext
match_index=document.getElementById("table_" & match_id).index
if err then tmp=false else tmp=true
err.clear
if tmp then '对象存在
shangpan=matchdata(match_index,5) '上盘
company_id=arr(1) '公司的ID号
company_order=companyOrder(company_id) '公司的排列序号
match_odds(0)=arr(2) '赔率ID
match_odds(1)=arr(3) '盘口
match_odds(2)=arr(4)'上盘水位
match_odds(3)=arr(5)'下盘水位
match_closepan=arr(6)'是否封盘
match_time=matchdata(match_index,1)
'判断上盘水位是否有变化
upoddschange=false
leap=false '临场急变
oldgoal=oddsData(match_index,company_order,1)
oldupodds=oddsData(match_index,company_order,2)
olddownodds=oddsData(match_index,company_order,3)
if oldupodds<>match_odds(2) then
if oldupodds>match_odds(2) then
document.getElementById("odds_" &company_id&"_"&match_id).style.backgroundColor=fallColor
else
document.getElementById("odds_" &company_id&"_"&match_id).style.backgroundColor=riseColor
end if
if oldupodds<>"" and dateadd("s", 10800-diffTime,now)>cdate(match_time) and oldgoal=match_odds(1) then '临场两小时速变提示
if oldupodds-match_odds(2)>0.09 then '临场速变,降
document.getElementById("upodds_" & company_id &"_"&match_id).innerHtml="●" & match_odds(2)
leap=true
elseif match_odds(2)-oldupodds>0.09 then '临场速变,升
document.getElementById("upodds_" & company_id &"_"&match_id).innerHtml="●" & match_odds(2)
leap=true
else
document.getElementById("upodds_" & company_id &"_"&match_id).innertext=match_odds(2)
end if
else
document.getElementById("upodds_" & company_id &"_"&match_id).innertext=match_odds(2)
end if
oddsData(match_index,company_order,2)=match_odds(2)
upoddschange=true
end if
'判断下盘水位是否有变化
downoddschange=false
if olddownodds<>match_odds(3) then
document.getElementById("downodds_" &company_id &"_"&match_id).innertext=match_odds(3)
oddsData(match_index,company_order,3)=match_odds(3)
downoddschange=true
end if
'判断盘口是否有变化
goalchange=false
if oldgoal<>match_odds(1) then
goalchange=true
if match_odds(1)<>""then
if cdbl(oldgoal)"&Goal2GoalCn(match_odds(1))
elseif cdbl(oldgoal)>cdbl(match_odds(1)) then
document.getElementById("goal_" & company_id & "_" & match_id).innerHTML= Goal2GoalCn(match_odds(1))&""
else
goalchange=false
end if
if oldgoal<>match_odds(1) and oldgoal<>"" then '与初盘不同,显示初盘
if oldgoalmatch_odds(1) then document.getElementById("F_goal_" & company_id &"_" & match_id).innerText="降"
document.getElementById("F_goal_" & company_id &"_" & match_id).style.display=""
else
document.getElementById("F_goal_" & company_id &"_" & match_id).style.display="none"'与初盘同,不显示初盘
end if
else
document.getElementById("goal_" & company_id & "_" & match_id).innertext=""
end if
oddsData(match_index,company_order,0)=match_odds(0)
oddsData(match_index,company_order,1)=match_odds(1)
end if
if upoddschange or downoddschange or goalchange then
havechange=true
window.setTimeout "colors_water(" & match_index & ","& company_id &")",60000
end if
if match_closepan="True" then
document.getElementById("close_" &company_id &"_"& match_id).style.display=""
else
document.getElementById("close_" &company_id &"_"& match_id).style.display="none"
end if
if matchdata(match_index,13)=0 and goalchange and company_id="1" then '变盘提示
notify=notify&""&company(company_id)&"变盘:"& matchdata(match_index,21) &" "& match_odds(2) &" "& Goal2GoalCn(match_odds(1)) &" "& match_odds(3) &" "& matchdata(match_index,22) &" | "
end if
if matchdata(match_index,13)=0 and leap and company_id="1" then '临场速变提示
notify=notify&""&company(company_id)&"临场急变水:"&matchdata(match_index,21) &" "& match_odds(2) &" "& Goal2GoalCn(match_odds(1)) &" "& match_odds(3) &" "& matchdata(match_index,220)&" | "
end if
if havechange and soundCheck and (company_id="1" or goalchange) then document.getElementById("sound").innerhtml=flash_sound(0)
end if
next
document.getElementById("notify").innerhtml=notify
end sub
'欧赔比较
sub MakeTable_Eur(strComID)
on error resume next
dim ii,sclass_js
ii=0
dim j
dim match_id
dim matchtime
dim match_leagues
dim match_type
dim match_typecolor
dim match_hometeamID
dim match_guestteamID
redim oddsdata(matchcount,24,8)
dim match_state
dim match_homescore,match_guestscore
dim riseColor,fallColor
riseColor="#ffa4d1"
fallColor="#a4ffbb"
selComID = split(strComID,",")
for i=0 to matchcount-1
tr_html(i)=""
match_id=kk.childNodes.item(i).childNodes.item(0).Text 'ID
match_typecolor=kk.childNodes.item(i).childNodes.item(1).Text '类型背景色
match_leagues=kk.childNodes.item(i).childNodes.item(2).Text'类型名称
match_type=split(match_leagues,",")(m_language)'选择的语言对类的类型名
sclass_js=split(match_leagues,",")(0)'国语
match_time=kk.childNodes.item(i).childNodes.item(3).Text'开赛时间
match_hometeamID=split(kk.childNodes.item(i).childNodes.item(6).Text,",")(0)
match_guestteamID=split(kk.childNodes.item(i).childNodes.item(6).Text,",")(1)
arr=split(kk.childNodes.item(i).childNodes.item(7).Text,";") '各公司赔率
for j=LBound(arr) To UBound(arr)
oddsdata(i,j+1,0)=split(arr(j),",")(0) '赔率ID
oddsdata(i,j+1,1)=split(arr(j),",")(1) '初盘主胜
oddsdata(i,j+1,2)=split(arr(j),",")(2)'初盘平水
oddsdata(i,j+1,3)=split(arr(j),",")(3)'初盘客胜
oddsdata(i,j+1,4)=split(arr(j),",")(4) '主胜
oddsdata(i,j+1,5)=split(arr(j),",")(5) '平水
oddsdata(i,j+1,6)=split(arr(j),",")(6) '客胜
next
matchData(i,0)=match_id
matchData(i,1)=match_time
matchData(i,2)=match_type
matchData(i,3)=true
matchData(i,4)=true
matchData(i,5)=split(kk.childNodes.item(i).childNodes.item(4).Text,",")(m_language)'主队名
matchData(i,6)=split(kk.childNodes.item(i).childNodes.item(5).Text,",")(m_language)'客队名
if matchData(i,4) then '所选公司是否有开盘
html0(0) = "
"
html0(7)=""
for j=LBound(selComID) To UBound(selComID)-1
html0(7)=html0(7)& ("
")
html0(7)=html0(7)& ("
")
html0(7)=html0(7)& ("
"&oddsdata(i,companyInfoEur(selComID(j),3),1)&"
")
html0(7)=html0(7)& ("
"&oddsdata(i,companyInfoEur(selComID(j),3),2)&"
")
html0(7)=html0(7)& ("
"&oddsdata(i,companyInfoEur(selComID(j),3),3)&"
")
html0(7)=html0(7)& ("
")
if (oddsdata(i,companyInfoEur(selComID(j),3),1)=oddsdata(i,companyInfoEur(selComID(j),3),4)) and oddsdata(i,companyInfoEur(selComID(j),3),2)=oddsdata(i,companyInfoEur(selComID(j),3),5) and oddsdata(i,companyInfoEur(selComID(j),3),3)=oddsdata(i,companyInfoEur(selComID(j),3),6) then '与初盘相同,即无变化
html0(7)=html0(7)& ("
")
html0(7)=html0(7)& ("
")
html0(7)=html0(7)& ("
")
else
html0(7)=html0(7)& ("
")
bgcolor=""
if oddsdata(i,companyInfoEur(selComID(j),3),1)>oddsdata(i,companyInfoEur(selComID(j),3),4) then bgcolor=fallColor
if oddsdata(i,companyInfoEur(selComID(j),3),1)
"&oddsdata(i,companyInfoEur(selComID(j),3),4)&"
")
bgcolor=""
if oddsdata(i,companyInfoEur(selComID(j),3),2)>oddsdata(i,companyInfoEur(selComID(j),3),5) then bgcolor=fallColor
if oddsdata(i,companyInfoEur(selComID(j),3),2)
"&oddsdata(i,companyInfoEur(selComID(j),3),5)&"
")
bgcolor=""
if oddsdata(i,companyInfoEur(selComID(j),3),3)>oddsdata(i,companyInfoEur(selComID(j),3),6) then bgcolor=fallColor
if oddsdata(i,companyInfoEur(selComID(j),3),3)
"&oddsdata(i,companyInfoEur(selComID(j),3),6)&"
")
end if
html0(7)=html0(7)&"
"
if oddsdata(i,companyEur(selComID(j),3),0)<>"" then matchData(i,4)=true
next
html0(8)=""
html0(9)="
"
For j = 0 To 9
tr_html(i) = tr_html(i) & vbCrLf & html0(j)
Next
If InStr(matchdate1, formatdatetime(matchdata(i,1),vblongdate)) <= 0 Then
tr_html(i) = ("
"&formatdatetime(matchdata(i,1),vblongdate)&"
" & tr_html(i))
datecount=datecount+1
matchdate1=matchdate1 & formatdatetime(matchdata(i,1),vblongdate)
End If
if i+1<=adcount then
tr_html(i) =tr_html(i) & "
"
for i=LBound(selComID) To UBound(selComID)-1
oddsHead=oddsHead&"
"&companyInfoEur(selComID(i),2) & "
"
next
oddsHead=oddsHead& "
"
oddshtml="
" &oddsHead
For ii = 0 To matchcount-1
oddshtml=oddshtml&vbCrLf & tr_html(ii)
Next
oddshtml=oddshtml& "
"
document.getElementById("odds").innerhtml=oddshtml
end sub
sub refresh_Eur()
on error resume next
dim i,j,match_id
dim match_oddsid
dim match_odds(6),match_closepan
dim oddschange,h_ch_flag,s_ch_flag,g_ch_flag '赠率变化标志
dim IsNew
For i = 0 To xml1.childNodes.Item(1).childNodes.length - 1
arr=split(xml1.childNodes.Item(1).childNodes.Item(i).Text,",")
match_id=arr(0)
match_closepan=arr(9) '是否封盘
company_id=arr(1) '公司的ID号
if typename(document.getElementById("odds_" & company_id & "_" & match_id))="Nothing" then tmp=false else tmp=true
if tmp then '对象存在
match_index=document.getElementById("tr_" & match_id).index
match_odds(0)=arr(2) '赔率ID
match_odds(1)=arr(3) '初盘主胜
match_odds(2)=arr(4) '初盘平水
match_odds(3)=arr(5) '初盘客胜
match_odds(4)=arr(6) '主胜
match_odds(5)=arr(7) '平水
match_odds(6)=arr(8) '客胜
company_order=companyOrder(company_id) '公司的排列序号
IsNew=false '标识是否是打开页面后新开盘的赔率
if matchdata(match_index,4)=false then '新开盘,原隐藏的放出来
document.getElementById("tr_"&match_id).style.display=""
matchdata(match_index,4)=true
end if
if oddsdata(match_index,company_order,1)="" then IsNew=true
oddsdata(match_index,company_order,1)=match_odds(1)
oddsdata(match_index,company_order,2)=match_odds(2)
oddsdata(match_index,company_order,3)=match_odds(3)
document.getElementById("FirstHomewin_"& company_id &"_"&match_id).innerHtml=match_odds(1)
document.getElementById("FirstStandoff_"& company_id &"_"&match_id).innerHtml=match_odds(2)
document.getElementById("FirstGuestwin_"& company_id &"_"&match_id).innerHtml=match_odds(3)
oddschange=false
if oddsdata(match_index,company_order,4)<>match_odds(4) then'判断主胜水位是否有变化
bgcolor="#F0F3F9"
if match_odds(1)>match_odds(4) then bgcolor=fallColor
if match_odds(1)match_odds(4) then h_ch_flag="↓" else h_ch_flag="↑"
document.getElementById("Homewin_"&company_id&"_"&match_id).style.backgroundColor=bgcolor
oddsdata(match_index,company_order,4)=match_odds(4)
oddschange=true
end if
if oddsdata(match_index,company_order,5)<>match_odds(5) then'判断平局水位是否有变化
bgcolor="#F0F3F9"
if match_odds(2)>match_odds(5) then bgcolor=fallColor
if match_odds(2)match_odds(5) then s_ch_flag="↓" else s_ch_flag="↑"
document.getElementById("Standoff_"&company_id&"_"&match_id).style.backgroundColor=bgcolor
oddsdata(match_index,company_order,5)=match_odds(5)
oddschange=true
end if
if oddsdata(match_index,company_order,6)<>match_odds(6) then '判断客胜水位是否有变化
bgcolor="#F0F3F9"
if match_odds(3)>match_odds(6) then bgcolor=fallColor
if match_odds(3)match_odds(6) then g_ch_flag="↓" else g_ch_flag="↑"
document.getElementById("Guestwin_"&company_id&"_"&match_id).style.backgroundColor=bgcolor
oddsdata(match_index,company_order,6)=match_odds(6)
oddschange=true
end if
if oddschange then '提示
document.getElementById("notity").innerhtml=document.getElementById("notity").innerhtml&""&companyName(Company_id)&":"&matchdata(match_index,5) &" "& match_odds(4) &h_ch_flag&" "& match_odds(5) &s_ch_flag&" "& match_odds(6) & g_ch_flag&" "& matchdata(match_index,6)&" | "
if Not IsNew then
document.getElementById("Homewin_"& company_id &"_"&match_id).innerHtml=match_odds(4)
document.getElementById("Standoff_"& company_id &"_"&match_id).innerHtml=match_odds(5)
document.getElementById("Guestwin_"& company_id &"_"&match_id).innerHtml=match_odds(6)
end if
oddsdata(match_index,company_order,0)=match_odds(0)
document.getElementById("Firstodds_" & company_id &"_"&match_id).style.backgroundColor="#FFFF00"
call ShowFlash_water(match_index,company_id)
end if
end if
next
end sub
'大小比较
sub MakeTable_dx()
on error resume next
dim ii,sclass_js
ii=0
dim j
dim match_id
dim matchtime
dim match_leagues
dim match_type
dim match_typecolor
dim match_hometeam
dim match_hometeamID
dim match_guestteam
dim match_guestteamID
dim match_odds(12,5)
for i=0 to matchcount-1
match_id=kk.childNodes.item(i).childNodes.item(0).Text 'ID
match_typecolor=kk.childNodes.item(i).childNodes.item(1).Text '类型背景色
match_leagues=kk.childNodes.item(i).childNodes.item(2).Text'类型名称
match_type=split(match_leagues,",")(m_language)'选择的语言对类的类型名
sclass_js=split(match_leagues,",")(0)'国语
match_time=kk.childNodes.item(i).childNodes.item(3).Text'开赛时间
match_hometeam=split(kk.childNodes.item(i).childNodes.item(4).Text,",")(m_language)'主队名
match_guestteam=split(kk.childNodes.item(i).childNodes.item(5).Text,",")(m_language)'客队名
match_hometeamID=split(kk.childNodes.item(i).childNodes.item(6).Text,",")(0)
match_guestteamID=split(kk.childNodes.item(i).childNodes.item(6).Text,",")(1)
arr=split(kk.childNodes.item(i).childNodes.item(7).Text,";") '各公司赔率
matchData(i,4)=false
for j=LBound(arr) To UBound(arr)
match_odds(j+1,0)=split(arr(j),",")(0) '赔率ID
match_odds(j+1,1)=split(arr(j),",")(1) '盘口
match_odds(j+1,2)=split(arr(j),",")(2)'上盘水位
match_odds(j+1,3)=split(arr(j),",")(3)'下盘水位
if match_odds(j+1,0)<>"" then matchData(i,4)=true
next
closepan=split(kk.childNodes.item(i).childNodes.item(8).Text,",") '走地情况
matchData(i,0)=match_id
matchData(i,1)=match_time
matchData(i,2)=match_type
matchData(i,3)=true
if matchData(i,4) then
html0(0) = "
"
html0(4)=""
for j=0 to companyCount-1
html0(4)=html0(4)&"
"
html0(4)=html0(4)&"
"
html0(4)=html0(4)&"
"&match_odds(companyDx(j,3),2)&"
"
if closepan(companyDx(j,3)-1)="True" then
html0(4)=html0(4)&"
(封)"
else
html0(4)=html0(4)&"
(封)"
end if
html0(4)=html0(4)&""
if match_odds(companyDx(j,3),1)<>"" then html0(4)=html0(4)&""& Goal_T_Cn(abs(match_odds(companyDx(j,3),1)*4))
html0(4)=html0(4)&""
html0(4)=html0(4)&"
"
html0(4)=html0(4)&"
"&match_odds(companyDx(j,3),3)&"
"
html0(4)=html0(4)&"
"
next
html0(5)="
"
For j = 0 To 5
tr_html(i) = tr_html(i) & vbCrLf & html0(j)
Next
If InStr(matchdate1, formatdatetime(matchdata(i,2),vbshortdate)) <= 0 Then
tr_html(i) = "
"&formatdatetime(matchdata(i,2),vblongdate)&"
" & tr_html(i)
matchdate1=matchdate1 & formatdatetime(matchdata(i,2),vbshortdate)
End If
if i+1<=adcount then
tr_html(i) =tr_html(i) & "
"
document.getElementById("company"&companyDx(i,1)).checked=true
next
oddsHead=oddsHead& "
"
oddshtml="
"&oddsHead
For ii = 0 To matchcount-1
oddshtml=oddshtml& vbCrLf & tr_html(ii)
Next
oddshtml=oddshtml& "
"
document.getElementById("odds").innerhtml=oddshtml
end sub
sub refresh_dx()
on error resume next
dim i
dim j
dim match_id
dim matchtime
dim match_oddsid
dim score1change,score2change,scorechange,leap
dim match_odds(6,4),match_closepan(6)
dim upoddschange, downoddschange, oddschange
dim win(30,2),haveWin
For i = 0 To xml1.childNodes.Item(1).childNodes.length - 1
arr=split(xml1.childNodes.Item(1).childNodes.Item(i).Text,",")
match_id=arr(0)
if typename(document.getElementById("tr_" & match_id))<>"Nothing" then '对象存在
match_index=document.getElementById("tr_" & match_id).index
company_id=arr(1) '公司的ID号
matchtime=matchdata(match_index,2)
havechange=false
'判断上盘水位是否有变化
upoddschange=false
leap=false '临场急变
oldgoal=document.getElementById("odds_"&company_id&"_"&match_id).goal
oldupodds=document.getElementById("odds_"&company_id&"_"&match_id).upodds
olddownodds=document.getElementById("odds_"&company_id&"_"&match_id).downodds
'"scheduleID,CompanyID,OddsID,Goal,UpOdds,DownOdds1,ClosePan1") '格式
if oldupodds<>arr(4) then
if oldupodds>arr(4) then
document.getElementById("odds_" & company_id &"_"&match_id).style.backgroundColor=fallColor
else
document.getElementById("odds_" & company_id&"_"&match_id).style.backgroundColor=riseColor
end if
if oldupodds<>"" and dateadd("s", 10800-diffTime,now)>cdate(matchtime) and document.getElementById("odds_" &company_id&"_"&match_id).goal=arr(3) then '临场3小时速变提示
if oldupodds-arr(4)>0.09 then '临场速变,降
document.getElementById("upodds_" &company_id&"_"&match_id).innerHtml="★" & arr(4)
leap=true
elseif arr(4)-oldupodds>0.09 then '临场速变,升
document.getElementById("upodds_" &company_id&"_"&match_id).innerHtml="★" & arr(4)
leap=true
else
document.getElementById("upodds_" &company_id&"_"&match_id).innertext=arr(4)
end if
else
document.getElementById("upodds_" &company_id&"_"&match_id).innertext=arr(4)
end if
document.getElementById("odds_"&company_id&"_"&match_id).upodds=arr(4)
upoddschange=true
if matchdata(match_index,4)=false then
document.getElementById("tr_"&match_id).style.display=""
matchdata(match_index,4)=true
end if
end if
'判断下盘水位是否有变化
downoddschange=false
if olddownodds<>arr(5) then
document.getElementById("downodds_" & company_id &"_"&match_id).innertext=arr(5)
document.getElementById("odds_" & company_id &"_"&match_id).downodds=arr(5)
downoddschange=true
end if
'判断盘口是否有变化
goalchange=false
if oldgoal<>arr(3) then
if arr(3)<>""then
if document.getElementById("odds_" & company_id &"_"&match_id).goal"&GoalCn(arr(3)*4)
else
document.getElementById("goal_" & company_id &"_"& match_id).innerHTML=GoalCn(arr(3)*4)&""
end if
else
document.getElementById("goal_" & company_id &"_"& match_id).innertext=""
end if
document.getElementById("odds_"& company_id &"_"&match_id).oddsID=arr(2)
document.getElementById("odds_" & company_id &"_"& match_id).goal=arr(3)
goalchange=true
end if
if arr(6)="True" then
document.getElementById("close_" &company_id&"_"& match_id).style.display=""
else
document.getElementById("close_" &company_id&"_"& match_id).style.display="none"
end if
if upoddschange or downoddschange or goalchange then call ShowFlash_water(match_id,company_id,leap)
if goalchange then '变盘提示
document.getElementById("notity").innerhtml=document.getElementById("notity").innerhtml&""&companyName(company_id)&"变盘:"&document.getElementById("home_"&match_id).innerhtml &" "& arr(4) &" 大"& GoalCn(arr(3)*4) &" "& arr(5) &" "& document.getElementById("guest_"&match_id).innerhtml&" | "
end if
if leap then '临场速变提示
document.getElementById("notity").innerhtml=document.getElementById("notity").innerhtml&""&companyName(company_id)&"临场急变水:"&document.getElementById("home_"&match_id).innerhtml &" "& arr(4) &" 大"& GoalCn(arr(3)*4) &" "& arr(5) &" "& document.getElementById("guest_"&match_id).innerhtml&" | "
end if
end if
next
end sub
sub getbfxml()
on error resume next
if companyID=99 then
xmlScore.load "xml/change.xml"
xmlScore.onreadystatechange =GetRef("bf_refresh")
end if
window.setTimeout "getbfxml()",4000
end sub
sub bf_refresh()
on error resume next
if xmlScore.readyState<>4 then exit sub
if xmlScore.parseError.errorCode<>0 Then exit sub
if xmlScore.xml = "" then exit sub
xmlbf.XMLDocument.async = false
xmlbf.XMLDocument.loadXML xmlScore.xml
if xmlbf.xml= xmlbf_xml or xmlbf.xml="" then exit sub
xmlbf_xml=xmlbf.xml
dim i, j,n,k
dim xml_id
dim xml_matchstate,xml_status
dim xml_score1, xml_score2
dim xml_matchtime,xml_matchtime1
dim color1,color2
dim AddHTML
dim score1change, score2change, scorechange
For i = 0 To xmlbf.childNodes.Item(1).childNodes.length - 1
D=split(xmlbf.childNodes.Item(1).childNodes.Item(i).Text,"^")
xml_id=D(0)
xml_matchstate=D(1)
xml_status=split(state_ch(xml_matchstate+14),",")(m_language)
xml_score1=D(2)
xml_score2=D(3)
xml_matchtime=D(8)
xml_matchtime1=D(9)
if typename(document.getElementById("table_" & xml_id))="Nothing" then tmp=false else tmp=true
if tmp then '对象存在
color1="#000000"
color2="#000000"
matchindex=document.getElementById("table_" & xml_id).index
'time
if A(matchindex,1)<>xml_matchtime then document.getElementById("mt_" & xml_id).innerhtml=matchdata(matchindex,2) & " " & formatdatetime(xml_matchtime,vbshorttime)
matchData(matchindex,1)=xml_matchtime
matchData(matchindex,3)=xml_matchtime1
score1change=false
if matchData(matchindex,14)<>xml_score1 then
matchData(matchindex,14)=xml_score1
score1change=true
color1="red"
if matchdata(matchindex,5)="2" then
document.getElementById("down_" & xml_id).style.backgroundColor="#FFFF22"
else
document.getElementById("up_" & xml_id).style.backgroundColor="#FFFF22"
end if
end if
score2change=false
if matchData(matchindex,15)<>xml_score2 then
matchData(matchindex,15)=xml_score2
score2change=true
color2="red"
if matchdata(matchindex,5)="2" then
document.getElementById("up_" & xml_id).style.backgroundColor="#FFFF22"
else
document.getElementById("down_" & xml_id).style.backgroundColor="#FFFF22"
end if
end if
scorechange=score1change or score2change
'state
if matchData(matchindex,13)<> xml_matchstate then
matchData(matchindex,13)=xml_matchstate
document.getElementById("ms" & xml_id).innerHTML=xml_status
select case cint(matchData(matchindex,13))
case -11,-12,-13,-14
call MoveToBottom(xml_id)
matchdata(matchindex,11)=true
case -1
document.getElementById("hs" & xml_id).style.color = "red"
document.getElementById("gs" & xml_id).style.color = "red"
window.setTimeout "MoveToBottom(" & xml_id & ")",30000
matchdata(matchindex,11)=true
case 1
goTime = datediff("n",dateadd("s",difftime,matchData(matchindex,1)),now)
if goTime>45 then goTime = "45+"
if goTime<1 then goTime = "1"
document.getElementById("ms" & xml_id).innerHTML = goTime & ""
case 2
document.getElementById("ms" & xml_id).innerHTML = "中"
case 3
goTime = datediff("n",dateadd("s",difftime,matchData(matchindex,3)),now)+46
if goTime>90 then goTime = "90+"
if goTime<46 then goTime = "46"
document.getElementById("ms" & xml_id).innerHTML = goTime & ""
end select
end if
'score
select case matchData(matchindex,13)
case 0
document.getElementById("hs" & xml_id).innertext=""
document.getElementById("gs" & xml_id).innertext=""
case else
document.getElementById("hs" & xml_id).innertext=matchData(matchindex,14)
document.getElementById("gs" & xml_id).innertext=matchData(matchindex,15)
end select
if scorechange then
if soundCheck and matchData(matchindex,4) then document.getElementById("sound").innerhtml=flash_sound(2)
window.setTimeout "comeback_bf_color(" & xml_id & ")",120000
document.getElementById("bfnotify").innerhtml=document.getElementById("bfnotify").innerhtml & matchdata(matchindex,2) & ": " & matchdata(matchindex,19) & " " & xml_score1 & "-" & xml_score2 & " " & matchdata(matchindex,20) &" "
window.clearTimeout(nofityTimer)
nofityTimer=window.setTimeout("comeback_bfnotify()",15000)
end if
end if
next
end sub
sub comeback_bf_color(matchid)
on error resume next
document.getElementById("up_" & matchid).style.backgroundColor=""
document.getElementById("down_" & matchid).style.backgroundColor=""
end sub
sub comeback_bfnotify()
document.getElementById("bfnotify").innerhtml=""
end sub
'水位盘口变化时声音提示
sub ShowFlash_water(match_index,companyID,leap)
on error resume next
dim addHtml,n
if soundCheck and matchData(match_index,4) then '水位变了并且选择了声音提示
if leap then '临场急变水位
addHtml=flash_sound(1)
document.getElementById("sound").innerhtml=addHtml
else'变水
addHtml=flash_sound(0)
document.getElementById("sound").innerhtml=addHtml
end if
end if
window.setTimeout "colors_water(" & match_index & ","& companyID&")",60000
end sub
sub colors_water(match_index,companyID) '恢复背景颜色
dim j
on error resume next
matchid=matchdata(match_index,0)
document.getElementById("goal_"&companyID&"_"&matchid).innerHtml=document.getElementById("goal_"&companyID&"_"&matchid).innerText
document.getElementById("odds_"&companyID&"_"&matchid).style.backgroundColor=""
document.getElementById("notify").innerhtml=""
notify=""
end sub
sub MoveToBottom(m)
on error resume next
document.getElementById("table_" & m).parentElement.insertAdjacentElement "BeforeEnd",document.getElementById("table_" & m)
end sub
sub HideMatch(i)
matchData(i,4)=false
document.getElementById("table_" & matchData(i,0)).style.display="none"
document.getElementById("hiddencount").innerText=document.getElementById("hiddencount").innerText+1
end sub
'更新比赛进行的时间
sub setMatchTime()
on error resume next
for i =0 to matchcount-1
if matchdata(i,13)=1 then '上半场进行中
goTime = datediff("n",dateadd("s",difftime,matchdata(i,1)),now)
if goTime>45 then goTime = "45+"
if goTime<1 then goTime = "1"
document.getElementById("ms" & matchdata(i,0)).innerHTML = goTime & ""
elseif matchdata(i,13)=3 then'下半场进行中
goTime = datediff("n",dateadd("s",difftime,matchdata(i,3)),now)+46
if goTime > 90 then goTime = "90+"
if goTime<46 then goTime = "46"
document.getElementById("ms" & matchdata(i,0)).innerHTML = goTime & ""
end if
next
window.setTimeout "setMatchTime()" , 30000
end sub
call setMatchTime()
companyid=getCookie("Spball_odds_SelCompanyID")
m_language=getCookie("Spball_odds_SelLanguage")
if isnull(companyid) then companyid=99
if isnull(m_language) then m_language=1
call selCompany(companyid) '显示赔率对阵'
setTimeout "getoddsxml()",4000
setTimeout "getBFxml()",4000
setTimeout "autoHide()",60000