dim xmlOdds Set xmlOdds = CreateObject("Microsoft.XMLDOM") dim xml1_xml dim notity notity="" xml1_xml="" dim riseColor,fallColor,GoalColor riseColor="#FD9FA9" fallColor="#00FF44" GoalColor="#FFFF00" '----------------------------------------------------------------------------------------- dim flash_Goal_(2) '变水声,临场速变声,进球声 flash_Goal_(0) = "" flash_Goal_(1) = "" flash_Goal_(2) = "" sub getxml() on error resume next xmlOdds.load "xml\ODDS_UP.xml" xmlOdds.onreadystatechange =GetRef("refresh") window.setTimeout "getxml()",5000 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 end if 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 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("upodds_" & arr(1) &"_"&match_id))<>"Nothing" then '对象存在 match_index=document.getElementById("tr_" & match_id).index shangpan=matchdata(match_index,8) '上盘 company_id=myid(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,3) havechange=false '判断上盘水位是否有变化 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 oldgoal="" then document.getElementById("goal_" & company_id & "_" & match_id).innertext= 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 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 call ShowFlash_water(match_index,company_id,leap) 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 goalchange then '变盘提示 notity=notity&""&companyName(company_id)&"变盘:"& matchdata(match_index,9) &" "& match_odds(2) &" "& Goal2GoalCn(match_odds(1)) &" "& match_odds(3) &" "& matchdata(match_index,10) &" | " end if if leap then '临场速变提示 notity=notity&""&companyName(company_id)&"临场急变水:"&matchdata(match_index,9) &" "& match_odds(2) &" "& Goal2GoalCn(match_odds(1)) &" "& match_odds(3) &" "& matchdata(match_index,10)&" | " end if havechange=havechange or upoddschange or downoddschange or goalchange if winChecked and havechange then '判断包赢水位 for j=0 to 20 win(j,1)=0 win(j,2)=0 next haveWin=false for j=0 to companyCount-1 if oddsData(match_index,company(j,3),1)<>"" then '统计各盘口的最高水位 if cdbl(oddsData(match_index,company(j,3),2))>win(abs(oddsData(match_index,company(j,3),1))*4,1) then win(abs(oddsData(match_index,company(j,3),1))*4,1)=cdbl(oddsData(match_index,company(j,3),2)) if cdbl(oddsData(match_index,company(j,3),3))>win(abs(oddsData(match_index,company(j,3),1))*4,2) then win(abs(oddsData(match_index,company(j,3),1))*4,2)=cdbl(oddsData(match_index,company(j,3),3)) end if next for j=0 to companyCount-1 if oddsData(match_index,company(j,3),1)<>""then if cdbl(oddsData(match_index,company(j,3),2))+win(abs(oddsData(match_index,company(j,3),1))*4,2)>2 then document.getElementById("upodds_" &company(j,1)&"_"& match_id).style.Color="#FF0000":haveWin=true else document.getElementById("upodds_" &company(j,1)&"_"& match_id).style.Color="" if cdbl(oddsData(match_index,company(j,3),3))+win(abs(oddsData(match_index,company(j,3),1))*4,1)>2 then document.getElementById("downodds_" &company(j,1)&"_"& match_id).style.Color="#FF0000":haveWin=true else document.getElementById("downodds_" &company(j,1)&"_"& match_id).style.Color="" end if next if haveWin then '包赢提示 document.getElementById("winsound").innerhtml=flash_Goal_(2) notity=notify &"包赢水位:"&matchdata(match_index,9) &" - "& matchdata(match_index,10)&" | " end if end if end if next document.getElementById("notity").innerhtml=notity end sub '水位盘口变化时声音提示 sub ShowFlash_water(match_index,companyID,leap) on error resume next dim addHtml,n if soundCheck and matchData(match_index,11) then '水位变了并且选择了声音提示 if leap then '临场急变水位 addHtml=flash_Goal_(1) document.getElementById("sound").innerhtml=addHtml else'变水 addHtml=flash_Goal_(0) document.getElementById("sound").innerhtml=addHtml end if end if window.setTimeout "colors_water(" & match_index & ","& companyID&")",80000 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("notity").innerhtml="" notity="" end sub sub ChangeDetail(match_index,companyOrder,companyName) dim oddsid,team1,team2 team1=matchdata(match_index,9) team2=matchdata(match_index,10) oddsid=oddsdata(match_index,companyOrder,0) window.open "ChangeDetail/AsianOdds.aspx?ID="&oddsid&"&t1="&team1&"&t2="&team2&"&company="&companyName,"","width=500,height=400,left=150,top=50,resizable=yes,scrollbars=yes" end sub sub ChangeDetail_p(match_index,companyOrder,companyName) dim oddsid,team1,team2 team1=matchdata(match_index,9) team2=matchdata(match_index,10) oddsid=oddsdata(match_index,companyOrder,0) window.open "ChangeDetail/AsianOdds_p.aspx?ID="&oddsid&"&t1="&team1&"&t2="&team2&"&company="&companyName&"&matchid="&matchdata(match_index,0) end sub sub ChangeDetail_all(match_index) dim oddsid,team1,team2,tmpid,tmpName team1=matchdata(match_index,9) team2=matchdata(match_index,10) for i=0 to companyCount-1 tmpid=tmpid& company(i,1) tmpName=tmpName& company(i,2) if i<>companyCount-1 then tmpid=tmpid& "," tmpName=tmpName& "," end if next window.open "ChangeDetail/Asian_all.aspx?ID="&matchdata(match_index,0)&"&t1="&team1&"&t2="&team2&"&company="&tmpName&"&companyid="&tmpid end sub sub searchodds(ID) for i=0 to companyCount-1 tmpid=tmpid& company(i,1) if i<>companyCount-1 then tmpid=tmpid& "," next window.open "/history/searchAsian.asp?ID="&ID&"&companyID="&tmpid ,"","width=600,height=240,top=100,left=100,resizable=yes,scrollbars=yes" end sub sub hidematch(match_index) document.getElementById("tr_" & matchdata(match_index,0)).style.display="none" document.getElementById("checkbox_" & matchdata(match_index,0)).checked=True matchdata(match_index,11)=false document.getElementById("hiddencount").innerText=document.getElementById("hiddencount").innerText+1 end sub sub showallmatch()'今天所有的赛事,但不包括到了时间自动隐藏的赛事 dim i for i= 0 to matchcount-1 if matchdata(i,12) then '没有到开场时间 document.getElementById("tr_" & matchdata(i,0)).style.display="" matchdata(i,11)=true end if next for i=1 to leaguecount document.getElementById("checkboxleague_" & i).checked=true next document.getElementById("hiddencount").innerText=0 end sub sub SelectOtherLeague() dim i,j,hh hh=0 for i=1 to leaguecount document.getElementById("checkboxleague_" & i).checked= not document.getElementById("checkboxleague_" & i).checked next 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,12) and matchdata(j,2)=sclass then '没有到开场时间 document.getElementById("tr_" & matchdata(j,0)).style.display="" matchdata(j,11)=true end if next else for j=0 to matchcount-1 if matchdata(j,12) and matchdata(j,2)=sclass then '没有到开场时间 document.getElementById("tr_" & matchdata(j,0)).style.display="none" matchdata(j,11)=false hh=hh+1 end if next end if next document.getElementById("hiddencount").innerText=hh end sub sub CheckLeague(i) dim j,sclass,hh hh=document.getElementById("hiddencount").innerText sclass=document.getElementById("labelleague_" & i).innertext if document.getElementById("checkboxleague_" & i).checked=true then for j=0 to matchcount-1 if matchdata(j,12) and matchdata(j,2)=sclass then '没有到开场时间 if document.getElementById("tr_" & matchdata(j,0)).style.display="none" then hh=hh-1 document.getElementById("tr_" & matchdata(j,0)).style.display="" matchdata(j,11)=true end if next else for j=0 to matchcount-1 if matchdata(j,12) and matchdata(j,2)=sclass then '没有到开场时间 if document.getElementById("tr_" & matchdata(j,0)).style.display="" then hh=hh+1 document.getElementById("tr_" & matchdata(j,0)).style.display="none" matchdata(j,11)=false end if next end if document.getElementById("hiddencount").innerText=hh end sub sub CheckDate(matchdate,i) dim j,hh hh=document.getElementById("hiddencount").innerText if document.getElementById("checkboxdate_" & i).checked=true then for j=0 to matchcount-1 if matchdata(j,12) and formatdatetime(matchdata(j,3),vbshortdate)=matchdate then '所选日期 if document.getElementById("tr_" & matchdata(j,0)).style.display="none" then hh=hh-1 document.getElementById("tr_" & matchdata(j,0)).style.display="" matchdata(j,11)=true end if next else for j=0 to matchcount-1 if matchdata(j,12) and formatdatetime(matchdata(j,3),vbshortdate)=matchdate then '所选日期 if document.getElementById("tr_" & matchdata(j,0)).style.display="" then hh=hh+1 document.getElementById("tr_" & matchdata(j,0)).style.display="none" matchdata(j,11)=false end if next end if document.getElementById("hiddencount").innerText=hh end sub sub CheckMacau() dim j,hh hh=document.getElementById("hiddencount").innerText if document.getElementById("check_macau").checked=false then '显示所有赛事 for j=0 to matchcount-1 if matchdata(j,12) and oddsdata(j,1,0)="" then '澳门没开盘 if document.getElementById("tr_" & matchdata(j,0)).style.display="none" then hh=hh-1 document.getElementById("tr_" & matchdata(j,0)).style.display="" matchdata(j,11)=true end if end if next else for j=0 to matchcount-1 if matchdata(j,12) and oddsdata(j,1,0)="" then '澳门没开盘 if document.getElementById("tr_" & matchdata(j,0)).style.display="" then hh=hh+1 document.getElementById("tr_" & matchdata(j,0)).style.display="none" matchdata(j,11)=false end if end if next end if document.getElementById("hiddencount").innerText=hh end sub sub autoHide()'到了开场时间,自动隐葳赛事 dim nowtime,matchindex nowtime = now() for i=0 to matchcount-1 if matchdata(i,12) and dateadd("s", diffTime,matchdata(i,3))