function InitIndexNum(){typeof isResult!="undefined"&&isResult?(FbMatchTimeKey="FootBallMatchTimeKey_R",FbFilterKey="FootBallFilterKey_R",FbFilterTypeKey="FootBallFilterTypeKey_R"):typeof isSchedule!="undefined"&&isSchedule&&(leagueSIndex=2,leagueLIndex=8,countryIndex=20,isFromSch=!0,FbMatchTimeKey="FootBallMatchTimeKey_2",FbFilterKey="FootBallFilterKey_2",FbFilterTypeKey="FootBallFilterTypeKey_2")}function SelectReset(n){var t;if(SelectAll(1),SelectAll(2),filter!=null){if($("input:radio[name='selectType'][value='0']").prop("checked",!0),$("input:radio[name='selectType2'][value='0']").prop("checked",!0),n==1&&$("[id^=countryContent_]").show(),n==2&&$("[id^=leaguesContent_]").show(),filter.state!=0&&n==1?$("input:radio[name='selectType'][value='"+filter.state+"']").prop("checked",!0):filter.state!=0&&n==2&&$("input:radio[name='selectType2'][value='"+filter.state+"']").prop("checked",!0),n==1&&filter.league!=null&&filter.league.length>0){for(t=0;t<filter.league.length;t++)document.getElementById("myleague_"+filter.league[t])&&(document.getElementById("myleague_"+filter.league[t]).checked=!1);leagueFilterCount()}if(n==2&&filter.country!=null&&filter.country.length>0)for(t=0;t<filter.country.length;t++)document.getElementById("mycountry_"+filter.country[t])&&(document.getElementById("mycountry_"+filter.country[t]).checked=!1);if(n==3)if(filter.odds!=null&&filter.odds.length>0)for(ClearOddsSelect(),t=0;t<filter.odds.length;t++)$("input:checkbox[name='filterOdds'][value='"+filter.odds[t]+"']").prop("checked",!0);else $("input:checkbox[name='filterOdds']").prop("checked",!0);n==4&&($("input:radio[name='filterCid']").prop("checked",!1),filter.condition!=null&&filter.condition!=""?getCondition():document.getElementById("conditionNum")&&(document.getElementById("conditionNum").innerHTML=0));n<3&&HideByState();n>2&&($("[id^=countryContent_]").show(),$("[id^=leaguesContent_]").show(),_leaSortting&&!isFromSch&&SyncLeaSorting(0))}}function HideByState(n){var i,r,t;if($('input[name="selectType"]')[0]&&_$("myleague2").innerHTML!=""){if(fillMiddleLeague(),$("[id^=leaguesContent_]").hide(),i=n==undefined?$('input[name="selectType"]:checked').val():n,FilterType=i,i==0)$("[id^=lcGu_]").show(),$("[id^=leaguesContent_]").show(),$("span[id^=numtip_]").show(),$("span[id^=numtip2_]").hide();else{var f=0,u=0,e=!1;for(r=1;r<=matchcount;r++)u=parseInt(A[r][8]),(i==1&&u>0||i==2&&u==-1||i==3&&u==0||i==4&&A[r][20]=="True")&&(t=B[A[r][1]][0],e=$("#leaguesContent_"+t)[0].style.display!="none",e?(f=parseInt($("#numtip2_"+t)[0].getAttribute("num"))+1,$("#numtip2_"+t).attr("num",f),$("#numtip2_"+t).html("["+f+"]")):($("#leaguesContent_"+t).show(),$("#numtip2_"+t).attr("num",1),$("#numtip2_"+t).html("[1]"),$("#numtip2_"+t).show(),$("#numtip_"+t).hide()))}leagueFilterCount();displayCountryTitle()}}function SyncLeaSorting(n){var t,r;if(_leaSortting){var s=n==1?"countryListDiv":"myleague2",h=document.getElementById(s),i=h.getElementsByTagName("ul");for(t=0;t<i.length;t++){var f=i[t].getAttribute("name"),e=i[t].id,o=i[t].getElementsByTagName("li"),u=0;for(r=0;r<o.length;r++)o[r].style.display!="none"&&u++;document.getElementById(f)&&(document.getElementById(f).style.display=u==0?"none":"");document.getElementById(e)&&(document.getElementById(e).style.display=u==0?"none":"")}leagueFilterCount();firstCodeMenu()}}function DoFilter(n){var f,o,s,h,r,t,i,u;filter.league=[];filter.country=[];filter.odds=[];filter.state=0;filter.condition="";var c=[],e=[],l="";if(n==1&&(filter.state=$('input[name="selectType"]:checked').val(),$("input:checkbox[name=filterLea]:not(:checked)").each(function(){filter.league.push($(this).val())}),SelectReset(1),SelectAll(2),SelectAll(3),SelectAll(4),filter.league.length>0&&$("input:radio[name='filterCid']").prop("checked",!1),filter.middleague=filter.league.concat()),n==2&&(filter.state=$('input[name="selectType2"]:checked').val(),$("input:checkbox[name=filterCoun]:not(:checked)").each(function(){filter.country.push($(this).val());c.push(C[$(this).val()][0])}),SelectReset(2),SelectAll(1),SelectAll(3),SelectAll(4),filter.country.length>0&&$("input:radio[name='filterCid']").prop("checked",!1)),n==3){if($("input:checkbox[name=filterOdds]:checked").each(function(){filter.odds.push($(this).val())}),f=filter.odds,f!=null&&f.length>0)for(o=0;o<f.length;o++){var y=f[o].split("_")[0],v=f[o].split("_")[1],a=y=="h"?hsLetGoal.items(v).split(","):hsBigSmallGoal.items(v).split(",");if(a!=null)for(s=0;s<a.length;s++)e.indexOf(a[s])==-1&&e.push(a[s])}SelectReset(4)}if(n==4){if(filter.condition=$('input[name="filterCid"]:checked').val(),SelectReset(3),CheckEmpty(filter.condition)||CheckEmpty(hsCondition))return;l=hsCondition.items(filter.condition)}for(h=0,r=document.getElementById("table_live").getElementsByTagName("tr"),t=1;t<r.length;t++)r[t].getAttribute("index")!=null&&(r[t].style.display="none",r[t+1]&&(r[t+1].style.display="none"),!isFromSch&&r[t+2]&&(r[t+2].style.display="none"));for(orderby=="league"&&$(".Leaguestitle")&&$(".Leaguestitle").hide(),t=1;t<=matchcount;t++)i=!0,(filter.state==1&&parseInt(A[t][8])<=0||filter.state==2&&A[t][8]!="-1"||filter.state==3&&A[t][8]!="0"||filter.state==4&&A[t][20]!="True")&&(i=!1),n==1&&i&&filter.league!=null&&filter.league.length>0&&filter.league.indexOf(B[A[t][1]][0].toString())!=-1&&(i=!1),n==2&&i&&c!=null&&c.length>0&&c.indexOf(A[t][countryIndex])!=-1&&(i=!1),n==3&&i&&(e!=null&&e.length>0?e.indexOf(t.toString())==-1&&(i=!1):i=!1),n==4&&i&&l!=null&&l!=""&&l.indexOf(A[t][0])==-1&&(i=!1),i?(u=null,u=document.getElementById("tr1_"+A[t][0]),u&&(u.style.display=""),u=document.getElementById("tr2_"+A[t][0]),u&&(u.style.display=typeof _showRemark!="undefined"&&_showRemark&&!isFromSch&&hasExplain(t)||isFromSch&&(A[t][19]!=""||A[t][21]!="")?"":"none"),orderby=="league"&&document.getElementById("tr_"+A[t][1])&&(document.getElementById("tr_"+A[t][1]).style.display="")):h=h+1;document.getElementById("hiddencount")&&(document.getElementById("hiddencount").innerHTML=h);SyncMatchClass();typeof HandleDateTitle!="undefined"&&HandleDateTitle instanceof Function&&HandleDateTitle();typeof InitFlashShow!="undefined"&&InitFlashShow instanceof Function&&InitFlashShow();document.getElementById("topLine")&&(matchcount>0&&matchcount==h?$("#topLine").show():$("#topLine").hide(),typeof HandleTitle=="function"&&HandleTitle());typeof reorderAd=="function"&&reorderAd();n>0&&n<5&&(SetFilterCookie(n),typeof FilterOptionType!="undefined"&&(FilterOptionType=0),writeCookie(FilterCacheKey,0));typeof InitTipsNum!="undefined"&&InitTipsNum();typeof InitHeadShow!="undefined"&&InitHeadShow();typeof isSchedule=="undefined"&&hideResultTr();typeof InitGroupTitleDisplay=="function"&&InitGroupTitleDisplay();typeof refreshLazyImg=="function"&&refreshLazyImg();typeof reorderNotice=="function"&&reorderNotice()}function SelectOthers(n){var r,t,i;if(n==1){for(r=document.getElementById("myleague2").getElementsByTagName("input"),filter.middleague=[],t=1;t<=sclasscount;t++)(i=document.getElementById("myleague_"+B[t][0]),typeof i=="undefined"||i==null||t>1&&B[t][0]==B[t-1][0])||(i.checked=!i.checked,i.checked||filter.middleague.push(B[t][0].toString()));leagueFilterCount()}else if(n==2){if(r=document.getElementById("countryListDiv").getElementsByTagName("input"),C!=undefined&&C!=null&&C.length>0)for(t=0;t<C.length;t++)(i=document.getElementById("mycountry_"+t),typeof i!="undefined"&&i!=null)&&(i.checked=!i.checked)}else if(n==3){for(r=document.getElementById("goalTable").getElementsByTagName("input"),t=0;t<r.length;t++)(i=document.getElementById("myodds_"+t),typeof i!="undefined"&&i!=null)&&(i.checked=!i.checked);OddsFilterCount()}}function SelectAll(n){var t,r,i;if(n==4){if(document.getElementById("filterList")==null)return;for(t=document.getElementById("filterList").getElementsByTagName("input"),r=0;r<t.length;r++)t[r].checked=!1;_$("conditionNum").innerHTML="0";return}if(n==1){if(document.getElementById("myleague2")==null)return;t=document.getElementById("myleague2").getElementsByTagName("input");filter.middleague=[]}else if(n==2){if(document.getElementById("countryListDiv")==null)return;t=document.getElementById("countryListDiv").getElementsByTagName("input")}else if(n==3){if(document.getElementById("goalTable")==null)return;t=document.getElementById("goalTable").getElementsByTagName("input")}for(i=0;i<t.length;i++)t[i].checked=!0;n==1?leagueFilterCount():n==3&&OddsFilterCount()}function SelectHotLeague(){var t,n;if(_$("myleague2")){for(filter.league=[],filter.middleague=[],t=_$("myleague2").getElementsByTagName("input"),n=0;n<t.length;n++)t[n].hasAttribute("hot")?t[n].checked=!0:(t[n].checked=!1,filter.league.push(t[n].value),filter.middleague.push(t[n].value));HideByState();leagueFilterCount();displayCountryTitle()}}function InitAllOption(){SelectAll(1);SelectAll(2);SelectAll(3);SelectAll(4);HideByState();_leaSortting&&!isFromSch&&SyncLeaSorting(0)}function InitHotOption(){SelectHotLeague();SelectAll(3);HideByState();_leaSortting&&!isFromSch&&SyncLeaSorting(0)}function ClearOddsSelect(){var t,n;if(document.getElementById("goalTable"))for(t=document.getElementById("goalTable").getElementsByTagName("input"),n=0;n<t.length;n++)t[n].checked=!1}function MakeSclass(){var i,r,u,n,t,f,e;for(InitIndexNum(),i=[],i.push("<ul>"),r=!1,u=0,n=1;n<=sclasscount;n++)if(t=0,B[n]!=undefined){if(n<sclasscount&&B[n][0]==B[n+1][0]){u+=$("tr[id^=tr1_][leaindex='"+n+"']").length;r=!0;continue}f=!0;(hidden_LeagueId.indexOf("_"+B[n][0]+"_")!=-1||filter.middleague.indexOf(B[n][0].toString())!=-1)&&(f=!1);e=CheckEmpty(B[n][leagueSIndex])?B[n][2]:B[n][leagueSIndex];r&&(t+=u,u=0,r=!1);t+=$("tr[id^=tr1_][leaindex='"+n+"']").length;i.push("<li id='leaguesContent_"+B[n][0]+"'><input "+(f?"checked":"")+" type=checkbox id='myleague_"+B[n][0]+"' name='filterLea' value="+B[n][0]+" num='"+t+"' "+(B[n][4]==1?"hot":"")+"><label class='"+(B[n][4]==1?"red":"")+"' style='cursor:pointer;' for='myleague_"+B[n][0]+"'>"+getSclassName(e,B[n][leagueLIndex]));i.push("<span class='smallf' id='numtip_"+B[n][0]+"' num='"+t+"'>["+t+"]<\/span>");i.push("<span class='smallf' id='numtip2_"+B[n][0]+"' num='"+t+"' style='display:none'>["+t+"]<\/span><\/label><\/li>")}i.push("<\/ul>");$("#myleague2").html(i.join(""));leagueFilterCount()}function MakeSclassWithSorting(){var u,e,o,s,c,l,f,i,n,r,h,t;for(InitIndexNum(),u=[],n=65;n<91;n++)u.push({name:String.fromCharCode(n),items:[]});for(u.push({name:"*",items:[]}),e=!1,o=0,n=1;n<=sclasscount;n++)if(s=0,B[n]!=undefined){if(n<sclasscount&&B[n][0]==B[n+1][0]){o+=$("tr[id^=tr1_][leaindex='"+n+"']").length;e=!0;continue}c=!0;(hidden_LeagueId.indexOf("_"+B[n][0]+"_")!=-1||filter.middleague.indexOf(B[n][0].toString())!=-1)&&(c=!1);l=CheckEmpty(B[n][leagueSIndex])?B[n][2]:B[n][leagueSIndex];r=getFilterGroup(u,l);e&&(s+=o,o=0,e=!1);s+=$("tr[id^=tr1_][leaindex='"+n+"']").length;r.items.push({idx:B[n][0],name:getSclassName(l,B[n][leagueLIndex]),isOn:c,isRed:B[n][4]==1,mNum:s})}for(f=0,i=[],n=0;n<u.length;n++)if(r=u[n],r.items.length!=0){for(f++,i.push("<div class='fg_Title' id='fG_"+f+"'>"+r.name+"<\/div>"),i.push("<ul id='fGu_"+f+"' name='fG_"+f+"'>"),h=0;h<r.items.length;h++)t=r.items[h],i.push("<li id='leaguesContent_"+t.idx+"'><input "+(t.isOn?"checked":"")+" type=checkbox id='myleague_"+t.idx+"' name='filterLea' value="+t.idx+" "+(t.isRed?"hot":"")+"><label class='"+(t.isRed?"red":"")+"' style='cursor:pointer;' for='myleague_"+t.idx+"'>"+t.name),i.push("<span class='smallf' id='numtip_"+t.idx+"' num='"+t.mNum+"'>["+t.mNum+"]<\/span>"),i.push("<span class='smallf' id='numtip2_"+t.idx+"' num='"+t.mNum+"' style='display:none'>["+t.mNum+"]<\/span><\/label><\/li>");i.push("<\/ul>")}i.push("<ul class='quickPos'><\/ul>");$("#myleague2").html(i.join(""));leagueFilterCount();firstCodeMenu()}function MakeSclassWithSortingByCountry(){var u,l,e,o,s,a,y,r,n,p,i,h,t;InitIndexNum();var f=[],c=[],v=$("#cbbSortLea")[0]&&$("#cbbSortLea")[0].checked;if(C!=undefined&&C!=null&&C.length>0)for(u=C.concat(),v&&u.sort(function(n,t){return n==undefined||t==undefined?-1:n[1].charAt().charCodeAt()-t[1].charAt().charCodeAt()}),n=0;n<u.length;n++)u[n]!=undefined&&(l=u[n][0],f[l]={name:u[n][1],cid:u[n][0],items:[]},c.push(l));for(e=!1,o=0,n=1;n<=sclasscount;n++)if(s=0,B[n]!=undefined){if(n<sclasscount&&B[n][0]==B[n+1][0]){o+=$("tr[id^=tr1_][leaindex='"+n+"']").length;e=!0;continue}a=!0;(hidden_LeagueId.indexOf("_"+B[n][0]+"_")!=-1||filter.middleague.indexOf(B[n][0].toString())!=-1)&&(a=!1);i=typeof isSchedule!="undefined"?f[B[n][7]]:f[B[n][10]];y=CheckEmpty(B[n][leagueSIndex])?B[n][2]:B[n][leagueSIndex];e&&(s+=o,o=0,e=!1);s+=$("tr[id^=tr1_][leaindex='"+n+"']").length;i.items.push({idx:B[n][0],name:getSclassName(y,B[n][leagueLIndex]),isOn:a,isRed:B[n][4]==1,mNum:s})}for(r=[],n=0;n<c.length;n++)if(p=c[n],i=f[p],i.items.length!=0){for(r.push("<div class='fg_Title' id='country_"+i.cid+"' cid='"+i.cid+"'><b>"+i.name+"<\/b><\/div>"),r.push("<ul id='lcGu_"+i.cid+"'>"),h=0;h<i.items.length;h++)t=i.items[h],r.push("<li id='leaguesContent_"+t.idx+"'><input "+(t.isOn?"checked":"")+" type=checkbox id='myleague_"+t.idx+"' name='filterLea' value="+t.idx+" "+(t.isRed?"hot":"")+"><label class='"+(t.isRed?"red":"")+"' style='cursor:pointer;' for='myleague_"+t.idx+"' name='filterLea' lid='"+t.idx+"'>"+t.name),r.push("<span class='smallf' id='numtip_"+t.idx+"' num='"+t.mNum+"'>["+t.mNum+"]<\/span>"),r.push("<span class='smallf' id='numtip2_"+t.idx+"' num='"+t.mNum+"' style='display:none'>["+t.mNum+"]<\/span><\/label><\/li>");r.push("<\/ul>")}v&&r.push("<ul class='quickPos'><\/ul>");$("#myleague2").html(r.join(""));leagueFilterCount();firstCodeMenu()}function MakeCountry(){var t,n,i;if(InitIndexNum(),t=[],t.push("<ul>"),C!=undefined&&C!=null&&C.length>0)for(n=0;n<C.length;n++)C[n]!=undefined&&(i=!0,hidden_Country.indexOf("_"+C[n][0]+"_")!=-1&&(i=!1),t.push("<li id='countryContent_"+n+"' cid='"+C[n][0]+"'><input "+(i?"checked":"")+" type=checkbox id='mycountry_"+n+"' name='filterCoun' value='"+n+"'><label style='cursor:pointer' for='mycountry_"+n+"'>"+C[n][1]+"<\/label><\/li>"));t.push("<\/ul>");document.getElementById("countryListDiv").innerHTML=t.join("")}function MakeCountryWithSorting(){var r,o,f,u,n,i,e,t;for(InitIndexNum(),r=[],n=65;n<91;n++)r.push({name:String.fromCharCode(n),items:[]});if(r.push({name:"*",items:[]}),C!=undefined&&C.length!=0){for(n=0;n<C.length;n++)C[n]!=undefined&&(o=!0,hidden_Country.indexOf("_"+C[n][0]+"_")!=-1&&(o=!1),i=getFilterGroup(r,C[n][1]),i.items.push({idx:n,name:C[n][1],isOn:o,cid:C[n][0]}));for(f=0,u=[],n=0;n<r.length;n++)if(i=r[n],i.items.length!=0){for(f++,u.push("<div class='fg_Title' id='cG_"+f+"'>"+i.name+"<\/div>"),u.push("<ul id='cGu_"+f+"' name='cG_"+f+"'>"),e=0;e<i.items.length;e++)t=i.items[e],u.push("<li id='countryContent_"+t.idx+"' cid='"+t.cid+"'><input "+(t.isOn?"checked":"")+" type=checkbox id='mycountry_"+t.idx+"' name='filterCoun' value='"+t.idx+"'><label style='cursor:pointer;' for='mycountry_"+t.idx+"'>"+t.name+"<\/label><\/li>");u.push("<\/ul>")}document.getElementById("countryListDiv").innerHTML=u.join("")}}function MakeGoalTable(){var n=[];n.push("<div class='goalTitle'>"+_locModel.T.T_Handicap+"<\/div>");n.push(CreateGoalTable(0));n.push("<div class='goalTitle'>"+_locModel.T.T_OU+"<\/div>");n.push(CreateGoalTable(1));document.getElementById("goalTable").innerHTML=n.join("")}function CreateGoalTable(n){var u=_locModel.T.T_NoOdds,i=n==0?hsLetGoal.keys():hsBigSmallGoal.keys(),r,f,t;for(n==0?i.sort(function(n,t){return n.indexOf(u)!=-1?1:parseFloat(n)<parseFloat(t)?1:-1}):i.sort(),r='<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">',f=n==0?0:hsLetGoal.keys().length,t=0;t<i.length;t++){var e=n==0?Goal2GoalCn(i[t]):Goal2CnOU(i[t]),o=n==0?hsLetGoal.items(i[t]).split(",").length:hsBigSmallGoal.items(i[t]).split(",").length,s=n==0?"h_":"o_";t%4==0&&(r+='<tr style="height:24px;">');r+='<td width="4%"><input type="checkbox" name="filterOdds"  checked="checked" id="myodds_'+f+++'" value="'+s+i[t]+'" /><\/td>';r+='<td width="21%">'+(i[t]==u?u:e)+'<span class="smallf">['+o+"]<\/span><\/td>";t%4==3&&(r+="<\/tr>")}return r+"<\/table>"}function getCondition(){var u,i,n,r,t;if(conditionHttp.open("get","/gf/data/condition.txt?"+Date.parse(new Date),!1),conditionHttp.send(null),conditionHttp.responseText!=""){for(u=conditionHttp.responseText,i=u.split("!"),n=0;n<i.length;n++)for(r=i[n].split("^"),t=0;t<r.length;t++)hsCondition.add(n+"_"+t,r[t]);makeCondition();filter==null||CheckEmpty(filter.condition)||($('input:radio[name="filterCid"][value="'+filter.condition+'"]').prop("checked",!0),selectConditon(filter.condition))}}function makeCondition(){for(var f,r,e,o,n,h,c=[_locModel.T.T_WinStreaks,_locModel.T.T_LossStreaks,_locModel.T.T_OddWinStreaks,_locModel.T.T_OddLossStreaks,_locModel.T.T_OverStreaks,_locModel.T.T_UnderStreaks,_locModel.T.T_Odds20WinRate,_locModel.T.T_Odds20LossRate,_locModel.T.T_Over20Rate,_locModel.T.T_Under20Rate],l=["3~4","5~6","7+"],a=["60~65","65~70","75+"],s=c,t="",u="",i=0;i<s.length;i++){for(f=i<6?l:a,t+='<div class="item">',t+='<span class="name">'+s[i]+"<\/span>",r=0;r<f.length;r++)e="ef-radio off",o="disabled='disabled'",u="",n=i+"_"+r,h=hsCondition.items(n),h.Trim().length>3&&(u="onclick=\"selectConditon('"+n+"')\"",e="ef-radio",o=""),t+="<span "+u+"><label class='"+e+"'  for='condition_"+n+"'><input type=radio id='condition_"+n+"' name='filterCid' value="+n+" "+o+"><span class='ef-radio-style'>"+f[r]+"<\/span><\/label><\/span>";t+="<\/div>"}document.getElementById("filterList").innerHTML=t}function selectConditon(n){document.getElementById("conditionNum").innerHTML=hsCondition.items(n).split(",").length;oldConditionID=n}function SyncMatchClass(){for(var n,i=$(".gameName"),u=0,r=0,t=0;t<i.length;t++)r=i[t].getAttribute("index"),n=i[t].getAttribute("data-idx"),u==r||$("#tr1_"+n).is(":hidden")?($("#tr0_"+n).removeClass("show"),$("#tr0_"+n).removeAttr("style")):(u=r,$("#tr0_"+n).show(),$("#tr0_"+n).addClass("show"))}function getSclassName(n,t){return t?t.indexOf("(")!=-1?n+t:n+"("+t+")":n}function getFilterGroup(n,t){var r=t.replace(" ","").substr(0,1).toUpperCase(),i=r.charCodeAt();return i>64&&i<91?n[i-65]:n[26]}function ClearAllFilter(){sessionStorage.removeItem(FbFilterTypeKey);sessionStorage.removeItem(FbFilterKey);filter.league=[];filter.country=[];filter.odds=[];filter.state=0;filter.condition="";_$("conditionNum")&&(_$("conditionNum").innerHTML="0");HideByState();$("input:radio[name='selectType'][value='0']").prop("checked",!0);$("input:radio[name='selectType2'][value='0']").prop("checked",!0)}function SetFilterCookie(n){n>0&&n<5&&(sessionStorage.setItem(FbMatchTimeKey,minMatchTime),sessionStorage.setItem(FbFilterTypeKey,n),sessionStorage.setItem(FbFilterKey,JSON.stringify(filter)))}function InitFilterByCookie(){if(sessionStorage.getItem(FbFilterTypeKey)!=""&&sessionStorage.getItem(FbFilterTypeKey)!=0&&sessionStorage.getItem(FbFilterKey)!=null&&sessionStorage.getItem(FbFilterKey)!=""){filter=JSON.parse(unescape(sessionStorage.getItem(FbFilterKey)));var n=parseInt(sessionStorage.getItem(FbFilterTypeKey));n>0&&n<5&&(FilterLogic(n),n==1&&document.getElementById("li_FilterLea")&&typeof SelectMenu=="function"?SelectMenu("li_FilterLea"):n==2&&document.getElementById("li_FilterCon")&&typeof SelectMenu=="function"?SelectMenu("li_FilterCon"):n==3&&document.getElementById("li_FilterCdi")&&typeof SelectMenu=="function"?(SelectMenu("li_FilterCdi"),SwitchOddsFilter(0),$("#oddsFilter1").prop("checked",!0)):n==4&&document.getElementById("li_FilterCdi")&&typeof SelectMenu=="function"&&(SelectMenu("li_FilterCdi"),SwitchOddsFilter(1),$("#oddsFilter2").prop("checked",!0)))}}function ClearOddsCookie(){if(sessionStorage.getItem(FbFilterTypeKey)!=""&&sessionStorage.getItem(FbFilterTypeKey)!=0){var n=parseInt(sessionStorage.getItem(FbFilterTypeKey));n==3&&(ClearAllFilter(),_$("hiddencount").innerHTML=0,_$("li_FilterCdi").classList.remove("on"),_$("li_ShowAll").classList.add("on"))}}function SwitchOddsFilter(n){switch(n){case 0:$("#OddsFilter").show();$("#StreaksFilter").hide();SelectReset(4);OddsFilterCount();break;case 1:$("#OddsFilter").hide();$("#StreaksFilter").show();SelectReset(3)}}function OddsFilterCount(){var n=[],t=[],i,r,e,f;if($("input:checkbox[name=filterOdds]:checked").each(function(){n.push($(this).val())}),n!=null&&n.length>0)for(i=0;i<n.length;i++){var s=n[i].split("_")[0],o=n[i].split("_")[1],u=s=="h"?hsLetGoal.items(o).split(","):hsBigSmallGoal.items(o).split(",");if(u!=null)for(r=0;r<u.length;r++)t.indexOf(u[r])==-1&&t.push(u[r])}if(e=0,t!=null&&t.length>0)for(f=1;f<=matchcount;f++)t.indexOf(f.toString())>-1&&e++;document.getElementById("oddsNum").innerHTML=e}function leagueFilterPopClick(){event.target.tagName=="INPUT"&&leagueFilterCount()}function leagueFilterCount(){var n;if($("#showoptional2").is(":visible")){var t=document.getElementsByName("filterLea"),u=0,i=0,r=null,f=null;for(n=0;n<t.length;n++)$(t[n]).is(":visible")&&t[n].checked&&(i=t[n].value,r=_$("numtip_"+i),f=_$("numtip2_"+i),u+=$(r).is(":visible")?parseInt(r.getAttribute("num")):parseInt(f.getAttribute("num")));$("#countryNum").html(u)}}function fillMiddleLeague(){var t=$("#myleague2").find("input[name=filterLea]:not(:checked)"),n;for(filter.middleague=[],n=0;n<t.length;n++)filter.middleague.push(t[n].value)}function displayCountryTitle(){var n,i;if($("#cbbSortLeaByCountry")[0]&&$("#cbbSortLeaByCountry")[0].checked){var r=$("[id^=country_]"),u=0,f=[],t=!1;for(n=0;n<r.length;n++){for(u=r[n].getAttribute("cid"),f=$("#lcGu_"+u).find("li"),i=0;i<f.length;i++)if(f[i].style.display!="none"){t=!0;break}r[n].style.display=t?"":"none";$("#lcGu_"+u)[0].style.display=t?"":"none";t=!1}}}function closeLeaFilterPop(){MM_showHideLayers("showoptional2","","hide");setTimeout(function(){filter.middleague=filter.league.concat();SelectReset(1)})}function clickCbbSortLea(){var n=event.target.nodeName;n!="LABEL"&&(n!="INPUT"&&(_$("cbbSortLea").checked=!_$("cbbSortLea").checked),fillMiddleLeague(),SortList(),event.stopPropagation())}function clickCbbSortLeaByCountry(){var n=event.target.nodeName;n!="LABEL"&&(n!="INPUT"&&(_$("cbbSortLeaByCountry").checked=!_$("cbbSortLeaByCountry").checked),fillMiddleLeague(),SortList(),event.stopPropagation())}function firstCodeMenu(){var r,u,f,t,i,n;if(_$("showoptional2").style.visibility=="visible"&&_$("cbbSortLea")&&_$("cbbSortLea").checked){if(r=[],_$("cbbSortLeaByCountry")&&_$("cbbSortLeaByCountry").checked){for(u=$("[id^=country_]:visible"),$("[id^=country_]").attr("data-quickpos",""),f=0,t=0,n=0;n<u.length;n++)if(t=u[n].innerText[0].charCodeAt(),f!=t){if(65<=t&&t<91)u[n].setAttribute("data-quickpos",String.fromCharCode(t)),r.push("<li onclick=quickPos('"+String.fromCharCode(t)+"')>"+String.fromCharCode(t)+"<\/li>");else{u[n].setAttribute("data-quickpos","*");r.push("<li onclick=quickPos('*')>*<\/li>");break}f=t}}else for(i=$("[id^=fG_]:visible"),$("[id^=fG_]").attr("data-quickpos",""),n=0;n<i.length;n++)i[n].setAttribute("data-quickpos",i[n].innerText),r.push("<li onclick=quickPos('"+i[n].innerText+"')>"+i[n].innerText+"<\/li>");$("#myleague2").find(".quickPos").html(r.join(""));$("#myleague2").find(".quickPos")[0].style.right=_$("myleague2").scrollHeight==_$("myleague2").clientHeight?"6px":"22px"}}function quickPos(n){var t=$("[data-quickPos='"+n+"']")[0];t&&($(".quickPos li").removeClass("on"),$(event.target).addClass("on"),t.parentNode.scrollTop=_$("fG_1")?t.offsetTop-_$("fG_1").offsetTop:t.offsetTop);event.stopPropagation()}function callLeagueFilterWin(){_$("myleague2").innerHTML==""&&(_$("cbbSortLeaByCountry")&&getCookie(FilterCountryKey)=="1"?MakeSclassWithSortingByCountry():_$("cbbSortLea")&&_$("cbbSortLea").checked?MakeSclassWithSorting():MakeSclass(),SelectReset(1),FilterOptionType==1&&InitHotOption());(_channelType==1||_channelType==2)&&MM_showHideLayers("showCountry","","hide","goalDiv","","hide","showFilterBox","","hide","showoptional2","","show");_channelType==3&&MM_showHideLayers("showCountry","","hide","showoptional2","","show");leagueFilterCount()}function getDiffTime(){if(_serverTime){var n=_serverTime.split(",");difftime=new Date-new Date(n[0],n[1],n[2],n[3],n[4],n[5])}}function ShowBf(){hiddenID=getCookie("Hidden_MatchID");hiddenID==null&&(hiddenID="_");orderby=="league"?(MakeTable(),document.getElementById("OrderSel").value="league"):(MakeTableByTime(),document.getElementById("OrderSel").value="time");MakeSclass();hideSelMatch();window.clearTimeout(runtimeTimer);runtimeTimer=window.setTimeout("setMatchTime()",1e3);document.getElementById("sloading").style.display="none";specialHide();initSortLea();reorderNotice()}function formatTime(n){var t=n.getHours(),i=n.getMinutes();return t<10&&(t="0"+t),i<10&&(i="0"+i),t+":"+i}function getBgClass(){return _colorParam>0&&_colorParam<9?"cbg_"+_colorParam:"cbg_0"}function MakeTable(){var f,nt,c,e=" - ",u=" - ",y,p,w,b,i=0,k=0,t=[],n,r,a,v;t.push("<table id='table_live' width=100% align=center cellspacing=0 border=0 cellpadding=0><tr id='tr_0' class='scoretitle'>");t.push("<td width='2.4%'>&nbsp;<\/td><td width=10% colspan=2>"+_locModel.T.T_Time+"<\/td><td width=22% align=right>"+_locModel.T.T_Home+"<\/td><td id='ScoreTh' width=9%>"+_locModel.T.T_Score+"<\/td><td width=22% align=left>"+_locModel.T.T_Away+"<\/td><td width=6% id='HtTh' class='c_ht'>"+_locModel.T.T_TH_CHT+"<\/td><td class='data_td' style='width:6%'>"+_locModel.T.T_Data+"<\/td>");var tt=getBgClass(),d=1,g=0,l=0;for(n=1;n<=matchcount;n++)try{if(i=A[n][1],Bf_simply_disp&&B[i][4]==0){l++;continue}var o=escapeChar(skipHtmlTagBoth(A[n][4])),s=escapeChar(skipHtmlTagBoth(A[n][5])),h=escapeChar(skipHtmlTagBoth(B[i][2]));f=parseInt(A[n][8]);e=" - ";u=" - ";switch(f){case 0:match_score=A[n][19]=="1"?"Lineup":" - ";break;case 1:match_score=A[n][9]+" - "+A[n][10];u=A[n][27]+" - "+A[n][28];break;case-10:case-11:case-12:case-14:match_score=" - ";break;default:match_score=A[n][9]+" - "+A[n][10];A[n][11]==null&&(A[n][11]="");A[n][12]==null&&(A[n][12]="");e=A[n][11]+" - "+A[n][12];u=A[n][27]+" - "+A[n][28]}y=A[n][13]!="0"?"<span class='redcard'>"+A[n][13]+"<\/span>":"";p=A[n][14]!="0"?"<span class='redcard'>"+A[n][14]+"<\/span>":"";w=A[n][15]!="0"?"<span class='yellowcard'>"+A[n][15]+"<\/span>":"";b=A[n][16]!="0"?"<span class='yellowcard'>"+A[n][16]+"<\/span>":"";A[n][17]!=""&&(A[n][17]="<font class=red>["+A[n][17]+"]<\/font>");A[n][18]!=""&&(A[n][18]="<font class=red>["+A[n][18]+"]<\/font>");bg=n%2==0?"":tt;r=convertTime(A[n][6]);r=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds()));classx2=f==-1?"red":"blue";k!=i&&(k=i,g=B[A[n][1]][0],t.push("<tr class='Leaguestitle fbHead'  id='tr_"+i+"'  leaIndex='"+i+"'  data-lidx='"+d+"' sclassID='"+g+"' isLeaTop='0'>"),t.push("<td colspan='8'><div class='l1'><span onclick='"+(B[A[n][1]][5]!=""?"OpenFbSclass("+B[A[n][1]][0]+") class='LGname'":"")+"'>"+(B[i][8]==undefined?B[i][2]:B[i][8])+"<\/span> "+timeToText(r,12)+" <\/div><div class='l2'>"),t.push("<span class='l5'><span class='hidden-info r0'><a href=\"javascript:HiddenLeague("+i+",false)\" id='collapse"+i+"' class='collapse'><\/a><\/span><span class='display-info r0'><a href=\"javascript:HiddenLeague("+i+",true)\" id='expand"+i+"' style='display:none;' class='expand'><\/a><\/span><\/span>"),t.push("<span id='tips_"+i+"' class='l5 tipsNum'>"+_locModel.T.T_DisplayMatch+"(<span id='tips_num_"+i+"'><\/span>)<\/span>"),t.push("<\/div><\/td><\/tr>"),d++);t.push("<tr id='tr1_"+A[n][0]+"' class='tds "+bg+"' index='"+n+"' leaIndex='"+i+"'>");t.push("<td><img src='/images/lclose.png' width='7' height='7' onclick='hidematch("+n+");' style='cursor:pointer;'/><\/td>");t.push("<td width=0 style='display:none;'><\/td>");t.push("<td name='timeData' data-t='"+A[n][6]+"' data-tf='4' class='time' id='mt_"+A[n][0]+"' width='5%' onclick='soccerInPage.detail("+A[n][0]+',"'+o+'","'+s+'","'+h+"\")'>"+formatTime(r)+"<\/td>");t.push("<td class='status' id='time_"+A[n][0]+"' class='td_status' onclick='soccerInPage.detail("+A[n][0]+',"'+o+'","'+s+'","'+h+"\")' width=5% >"+state_ch[f+14]+"<\/td>");t.push("<td style='text-align:right' onclick='teamClickEvent("+n+")'><span id=horder_"+A[n][0]+"><\/span><a id='yellow1_"+A[n][0]+"'>"+w+"<\/a><a id='redcard1_"+A[n][0]+"'>"+y+"<\/a> <a id='team1_"+A[n][0]+"' href='javascript:void(0)'>"+A[n][4]+"<\/a><\/td>");t.push("<td onclick='teamClickEvent("+n+")' class='f-b "+classx2+"'>"+match_score+"<\/td>");t.push("<td style='text-align:left' onclick='teamClickEvent("+n+")'><a id='team2_"+A[n][0]+"' href='javascript:void(0)'>"+A[n][5]+"<\/a> <a id='redcard2_"+A[n][0]+"'>"+p+"<\/a><a id='yellow2_"+A[n][0]+"'>"+b+"<\/a><span id=gorder_"+A[n][0]+"><\/span><\/td>");t.push("<td onclick='teamClickEvent("+n+")'>");c="";nt="onmouseover='showSBCorner("+n+',event)\' onmouseout="hiddenSbCorner();" style="cursor:pointer;display:block;"';A[n][29]!="1"&&(u="&nbsp;");a=" class='conner_span blues'";f==-1&&(a="class='conner_span'");u==" - "?t.push("<span id='cr_"+A[n][0]+"' class='conner_span'>"+u+"<\/span>"):t.push("<span id='cr_"+A[n][0]+"'"+a+" >"+u+"<\/span>");e==" - "?t.push("<span id='hht_"+A[n][0]+"' "+c+" >"+e+"<\/span>"):t.push("<span id='hht_"+A[n][0]+"' "+c+" class=red2>"+e+"<\/span>");t.push("<\/td>");t.push("<td class='toolimg'><span onclick='soccerInPage.analysis("+A[n][0]+',"'+o+'","'+s+'","'+h+"\")' class='analyze-icon l0'>"+ICONFONT.ANALYSIS+"<\/span>");_appModule!="Kor"&&_appModule!="Pt"&&t.push("<span onclick='soccerInPage.oddscomp("+A[n][0]+',null,false, "'+o+'","'+s+'","'+h+"\")'  class='odds-icon l0'>"+ICONFONT.ODDS+"<\/span><span onclick='soccerInPage.detail("+A[n][0]+',"'+o+'","'+s+'","'+h+"\")' class='Detail-icon l0'>"+ICONFONT.DETAIL+"<\/span>");t.push("<span id='zd_"+A[n][0]+"'><\/span>");t.push("<\/td><\/tr>");v=showExplain(A[n][24],A[n][4],A[n][5]);classx=v==""?"none":"";t.push("<tr id='tr2_"+A[n][0]+"' style='display:"+classx+"' leaIndex='"+i+"'><td colspan=10 align=center class='text-info'><span id='other_"+A[n][0]+"'>");A[n][24]&&A[n][24]!=""&&t.push(v);t.push("<\/span><\/td><\/tr>")}catch(it){}t.push("<\/table>");document.getElementById("live").innerHTML=t.join("");l>0&&(document.getElementById("hiddencount").innerHTML=l)}function MakeTableByTime(){var r,h="",f=" - ",u=" - ",v,y,p,w,b=!1,d=getBgClass(),t=[],c,n,i,l,a;for(t.push("<table id='table_live' width=100% align=center cellspacing=0 border=0 cellpadding=0><tr id='tr_0' class='scoretitle'>"),t.push("<td width='2.4%' height=20>&nbsp;<\/td><td width=7.1%>"+_locModel.T.T_League+"<\/td><td  width=9% colspan=2>"+_locModel.T.T_Time+"<\/td><td width=20% align=right>"+_locModel.T.T_Home+"<\/td><td id='ScoreTh' width=7.5%>"+_locModel.T.T_Score+"<\/td><td width=20% align=left>"+_locModel.T.T_Away+"<\/td><td width=6% id='HtTh' class='c_ht'>"+_locModel.T.T_TH_CHT+"<\/td><td class='data_td'  style='width:6%'>"+_locModel.T.T_Data+"<\/td><\/tr>"),c=0,n=1;n<=matchcount;n++)try{if(Bf_simply_disp&&B[A[n][1]][4]==0){c++;continue}var k=A[n][1],e=escapeChar(skipHtmlTagBoth(A[n][4])),o=escapeChar(skipHtmlTagBoth(A[n][5])),s=escapeChar(skipHtmlTagBoth(B[k][2]));r=parseInt(A[n][8]);f=" - ";u=" - ";switch(r){case 0:match_score=A[n][19]=="1"?"Lineup":" - ";break;case 1:match_score=A[n][9]+" - "+A[n][10];u=A[n][27]+" - "+A[n][28];break;case-10:case-11:case-12:case-14:match_score=" - ";break;default:match_score=A[n][9]+" - "+A[n][10];A[n][11]==null&&(A[n][11]="");A[n][12]==null&&(A[n][12]="");f=A[n][11]+" - "+A[n][12];u=A[n][27]+" - "+A[n][28]}v=A[n][13]!="0"?"<span class='redcard'>"+A[n][13]+"<\/span>":"";y=A[n][14]!="0"?"<span class='redcard'>"+A[n][14]+"<\/span>":"";p=A[n][15]!="0"?"<span class='yellowcard'>"+A[n][15]+"<\/span>":"";w=A[n][16]!="0"?"<span class='yellowcard'>"+A[n][16]+"<\/span>":"";A[n][17]!=""&&(A[n][17]="<font class=red>["+A[n][17]+"]<\/font>");A[n][18]!=""&&(A[n][18]="<font class=red>["+A[n][18]+"]<\/font>");bg=n%2==0?"":d;i=convertTime(A[n][6]);i=new Date(Date.UTC(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds()));classx2=r==-1?"red":"blue";r<0&&!b&&(b=!0,t.push("<tr align=center class='adtext-bg2' height=20><td colspan=12><b>"+_locModel.T.T_Results+"<\/b><\/td><\/tr>"));r>=0&&h!=i.getDate()&&(h=i.getDate(),t.push("<tr class='Leaguestitle' date='"+h+"'><td colspan=10><b>"+timeToText(i,12)+"<\/b><\/td><\/td><\/tr>"));t.push("<tr id='tr1_"+A[n][0]+"' class='"+bg+"' index='"+n+"' date='"+h+"' leaIndex='"+k+"'>");t.push("<td height=30><img src='/images/lclose.png' width='7' height='7' onclick='hidematch("+n+");' style='cursor:pointer;'/><\/td>");t.push("<td class='black-down' bgcolor="+B[A[n][1]][3]+" style='color:white;' title='"+B[A[n][1]][2]+"'><span onclick='"+(B[A[n][1]][5]!=""?"OpenFbSclass("+B[A[n][1]][0]+") class='LGname'":"")+"' style='color:white;'>"+B[A[n][1]][1]+"<\/a><\/td>");t.push("<td name='timeData' data-t='"+A[n][6]+"'  data-tf='4' class='time' id='mt_"+A[n][0]+"'width='5%' onclick='soccerInPage.detail("+A[n][0]+',"'+e+'","'+o+'","'+s+"\")'>"+formatTime(i)+"<\/td>");t.push("<td class='status' id='time_"+A[n][0]+"' class='td_status' width='4%' onclick='soccerInPage.detail("+A[n][0]+',"'+e+'","'+o+'","'+s+"\")' >"+state_ch[r+14]+"<\/td>");t.push("<td onclick='teamClickEvent("+n+")' style='text-align:right'><a id='yellow1_"+A[n][0]+"'>"+p+"<\/a><a id='redcard1_"+A[n][0]+"'>"+v+"<\/a> <a id='team1_"+A[n][0]+"' href='javascript:void(0)'>"+A[n][4]+"<\/a><\/td>");t.push("<td onclick='teamClickEvent("+n+")' class='"+classx2+"'>"+match_score+"<\/td>");t.push("<td style='text-align:left' onclick='teamClickEvent("+n+")'><a id='team2_"+A[n][0]+"' href='javascript:void(0)'>"+A[n][5]+"<\/a> <a id='redcard2_"+A[n][0]+"'>"+y+"<\/a><a id='yellow2_"+A[n][0]+"'>"+w+"<\/a><\/td>");tmp_half="";tmp_corner="onmouseover='showSBCorner("+n+',event)\' onmouseout="hiddenSbCorner();" style="cursor:pointer;display:block;"';t.push("<td onclick='teamClickEvent("+n+")'>");l=" class='blue2 conner_span'";A[n][29]!="1"&&(u="");r==-1&&(l="class='conner_span'");u==" - "?t.push("<span id='cr_"+A[n][0]+"' class='conner_span'>"+u+"<\/span>"):t.push("<span id='cr_"+A[n][0]+"'"+l+" >"+u+"<\/span>");f==" - "?t.push("<span id='hht_"+A[n][0]+"' "+tmp_half+" >"+f+"<\/span>"):t.push("<span id='hht_"+A[n][0]+"' "+tmp_half+" class=red2>"+f+"<\/span>");t.push("<\/td>");t.push("<td class='toolimg'><span onclick='soccerInPage.analysis("+A[n][0]+',"'+e+'","'+o+'","'+s+"\")' class='analyze-icon l0'>"+ICONFONT.ANALYSIS+"<\/span>");_appModule!="Kor"&&_appModule!="Pt"&&t.push("<span onclick='soccerInPage.oddscomp("+A[n][0]+',null,false, "'+e+'","'+o+'","'+s+"\")'  class='odds-icon l0'>"+ICONFONT.ODDS+"<\/span><span onclick='soccerInPage.detail("+A[n][0]+',"'+e+'","'+o+'","'+s+"\")' class='Detail-icon l0'>"+ICONFONT.DETAIL+"<\/span>");t.push("<span id='zd_"+A[n][0]+"'><\/span>");t.push("<\/td><\/tr>");a=showExplain(A[n][24],A[n][4],A[n][5]);classx=hideMode||a==""?"none":"";t.push("<tr id='tr2_"+A[n][0]+"' style='display:"+classx+"' class='text-info'><td colspan=9 align=center height=18 style='padding-left:10px;' id='other_"+A[n][0]+"'>");A[n][24]&&A[n][24]!=""&&t.push(a);t.push("<\/td><\/tr>")}catch(g){}t.push("<\/table>");document.getElementById("live").innerHTML=t.join("");c>0&&(document.getElementById("hiddencount").innerHTML=c)}function getAlignText(n){return n?" style='text-align:center;' ":" style='text-align:left;' "}function getxml(){oXmlHttp.open("get","/gf/data/change_en.xml?"+Date.parse(new Date),!0);oXmlHttp.onreadystatechange=xmlHandle;oXmlHttp.send(null);scorePolling=window.setTimeout("getxml()",4e3)}function xmlHandle(){try{if(oXmlHttp.readyState!=4||oXmlHttp.status!=200&&oXmlHttp.status!=0)return;var n=oXmlHttp.responseXML.documentElement;if(oldXML==""||oldXML==oXmlHttp.responseText){oldXML=oXmlHttp.responseText;return}if(oldXML=oXmlHttp.responseText,n.attributes[0].value!="0"){window.setTimeout("LoadLiveFile()",Math.floor(2e4*Math.random()));return}refresh(n,0)}catch(t){}}function refresh(n,t){var v,w,y,f,d;try{lastUpdateTime=new Date;var i=[],r,o,s,ut,et,e,h,c,g,b,k,u,l="",a="",nt=!1,tt=!1,p=0,it="",rt=document.getElementById("notify").innerHTML,ft=0;for(ft=t==0?n.childNodes.length:n.length,v=0;v<ft;v++)if(i=t==0?document.all&&getIENumber()<10?n.childNodes[v].text.split("^"):n.childNodes[v].textContent.split("^"):n[v].split("^"),u=document.getElementById("tr1_"+i[0]),u!=null){if(i[1]=parseInt(i[1]),r=u.attributes.index.value,o=!1,A[r][9]!=i[2]&&(A[r][9]=i[2],o=!0,u.cells[4].style.backgroundColor="#bbbb22"),s=!1,A[r][10]!=i[3]&&(A[r][10]=i[3],s=!0,u.cells[6].style.backgroundColor="#bbbb22"),ut=o||s,i[12]=checkExlink(i[12]),i[6]!=A[r][13]&&(A[r][13]=i[6],document.getElementById("redcard1_"+i[0]).innerHTML=i[6]=="0"?"":"<span class='redcard'>"+i[6]+"<\/span>",document.getElementById("RedCheck").checked&&(u.cells[4].style.backgroundColor="#ff8888"),window.setTimeout("timecolors("+i[0]+","+r+")",12e3),nt=!0,l="<img class='sjicon' src='/images/redcard.png'>",_appModule=="Vn"&&(l="<img class='sjicon' src='/images/vn/redcard.png'>")),i[7]!=A[r][14]&&(A[r][14]=i[7],document.getElementById("redcard2_"+i[0]).innerHTML=i[7]=="0"?"":"<span class='redcard'>"+i[7]+"<\/span>",document.getElementById("RedCheck").checked&&(u.cells[6].style.backgroundColor="#ff8888"),window.setTimeout("timecolors("+i[0]+","+r+")",12e3),tt=!0,a="<img class='sjicon' src='/images/redcard.png'>",_appModule=="Vn"&&(a="<img class='sjicon' src='/images/vn/redcard.png'>")),i[8]!=A[r][15]&&(A[r][15]=i[8],document.getElementById("yellow1_"+i[0]).innerHTML=i[8]=="0"?"":"<span class='yellowcard'>"+i[8]+"<\/span>"),i[9]!=A[r][16]&&(A[r][16]=i[9],document.getElementById("yellow2_"+i[0]).innerHTML=i[9]=="0"?"":"<span class='yellowcard'>"+i[9]+"<\/span>"),A[r][6]!=i[10]&&(f=convertTime(i[10]),f=new Date(Date.UTC(f.getFullYear(),f.getMonth(),f.getDate(),f.getHours(),f.getMinutes(),f.getSeconds())),u.cells[2].innerHTML=formatTime(f)),A[r][6]=i[10],A[r][7]=i[11],w=document.getElementById("hht_"+A[r][0]),(A[r][11]!=i[4]||A[r][12]!=i[5])&&(A[r][11]=i[4],A[r][12]=i[5],w&&(w.innerHTML=A[r][11]+" - "+A[r][12],A[r][11]==""||A[r][12]?w.setAttribute("class",""):w.setAttribute("class","red2"))),y=document.getElementById("cr_"+A[r][0]),i[18]=="1"&&(A[r][27]!=i[16]||A[r][28]!=i[17])&&(A[r][27]=i[16],A[r][28]=i[17],y&&(y.innerHTML=A[r][27]+" - "+A[r][28]),y.setAttribute("class","conner_span blue2")),A[r][8]!=i[1]){A[r][8]=i[1];et=!0;switch(A[r][8]){case 0:u.cells[3].innerHTML="";break;case 1:f=convertTime(A[r][7]);e=Math.floor((new Date-f-difftime)/6e4);e>45&&(e="45+");e<1&&(e="1");u.cells[3].innerHTML=e+"<img src='/images/in.gif' alt='in' width=3 height=8>";break;case 2:u.cells[3].innerHTML=state_ch[i[1]+14];break;case 3:case 4:f=convertTime(A[r][7]);e=Math.floor((new Date-f-difftime)/6e4)+46;e>90&&(e="90+");e<46&&(e="46");u.cells[3].innerHTML=e+"<img src='/images/in.gif' alt='in' width=3 height=8>";break;case-1:u.cells[3].innerHTML=state_ch[i[1]+14];u.cells[5].style.color="red";y&&y.setAttribute("class","");orderby=="time"&&window.setTimeout("MoveToBottom("+i[0]+")",25e3);break;case-10:u.cells[3].innerHTML=state_ch[i[1]+14];break;default:u.cells[3].innerHTML=state_ch[i[1]+14];orderby=="time"&&MoveToBottom(i[0])}}switch(A[r][8]){case 0:u.cells[5].innerHTML=i[11]=="1"?"Lineup":"-";break;case 1:u.cells[5].innerHTML=(o?"<font class=red>"+A[r][9]+"<\/font>":A[r][9])+" - "+(s?"<font color=red>"+A[r][10]+"<\/font>":A[r][10]);break;case-11:case-14:u.cells[5].innerHTML="-";break;default:u.cells[5].innerHTML=(o?"<font class=red>"+A[r][9]+"<\/font>":A[r][9])+" - "+(s?"<font color=red>"+A[r][10]+"<\/font>":A[r][10])}ut&&(ShowFlash(i[0],r),u.style.display!="none"&&(h=A[r][4].replace("<font class=red>(N)<\/font>","").substring(0,20),c=A[r][5].substring(0,20),g=B[A[r][1]][8]!=undefined?B[A[r][1]][8]:B[A[r][1]][2],o&&(h="<font class=red><b>"+h+"<\/b><\/font>",l="<img class='sjicon' src='/images/goal.png'>",_appModule=="Vn"&&(l="<img class='sjicon' src='/images/vn/goal.png'>"),b="<font class=red>"+i[2]+"<\/font>",k="<font>"+i[3]+"<\/font>"),s&&(c="<font class=red><b>"+c+"<\/b><\/font>",a="<img class='sjicon' src='/images/goal.png'>",_appModule=="Vn"&&(a="<img class='sjicon' src='/images/vn/goal.png'>"),b="<font>"+i[2]+"<\/font>",k="<font class=red>"+i[3]+"<\/font>"),window.clearTimeout(nofityTimer),rt==""&&(rt="<font color=#6666FF><B>Goal notes：<\/b><\/font>"),rt+=g+": "+h+" <font class=blue>"+b+"-"+k+"<\/font> "+c+" &nbsp; ",nofityTimer=window.setTimeout("clearNotify()",2e4),d="-",o||s?d="<b>"+b+"<\/b> - <b>"+k+"<\/b>":(d=u.cells[6].innerHTML,nt&&(h="<font class=red><b>"+h+"<\/b><\/font>"),tt&&(c="<font class=red><b>"+c+"<\/b><\/font>")),windowCheck&&i[1]>=-1&&(it+=`<table id='flGoalDiv' width=500 border=0 cellpadding=0 cellspacing=0>
                                       <tr><td class='GoalDiv-t' height=24 colspan=6><b>`+g+`</b><b class='goal-time'>`+u.cells[3].innerHTML.replace("in.gif","in2.gif")+`</b></td></tr>
                                       <tr align=center class=line>
                                           <td width='40'>`+l+`</td>
                                           <td width='180'><span class='teamname'>`+h+`</span></td>
                                           <td width='60' style='font-size: 16px;'>`+d+`</td>
                                           <td width='180'><span class='teamname'>`+c+`</span></td>
                                           <td width='40'>`+a+`</td>
                                       </tr>
                                    </table>`,p=p+1)),l=a="",nt=tt=!1)}p>0&&(window.ActiveXObject?ShowCHWindow(it,p):ShowCHWindow123(it,p))}catch(ot){}}function ShowFlash(n,t){try{soundCheck&&parseInt(A[t][8])>=-1&&document.getElementById("tr1_"+n).style.display!="none"&&document.getElementById("audio_goal").play()}catch(i){}window.setTimeout("timecolors("+n+","+t+")",12e4)}function CheckSound(n){soundid=n;sound_init();document.getElementById("audio_goal").play()}function sound_init(){var n=[];n.push('<audio id="audio_goal" style="display: none">');n.push('<source src="/sound/sound'+soundid+'.mp3" type="audio/mpeg" />');n.push('<source src="/sound/sound'+soundid+'.ogg" type="audio/ogg" />');n.push("<\/audio>");_$("soundsGoal").innerHTML=n.join("");n=[];n.push('<audio id="audio_red" style="display: none">');n.push('<source src="/sound/red.mp3" type="audio/mpeg" />');n.push('<source src="/sound/red.ogg" type="audio/ogg" />');n.push("<\/audio>");_$("soundsRed").innerHTML=n.join("");_$("audio_goal").load();_$("audio_red").load();window.removeEventListener("touchstart",soundHandle,!0);window.addEventListener("touchstart",soundHandle,!0)}function soundHandle(){_$("audio_goal").load();_$("audio_red").load();window.removeEventListener("touchstart",soundHandle)}function timecolors(n,t){try{var i=document.getElementById("tr1_"+n);i.cells[4].style.backgroundColor="";i.cells[5].innerHTML=A[t][9]+" - "+A[t][10];i.cells[6].style.backgroundColor=""}catch(r){}}function clearNotify(){document.getElementById("notify").innerHTML=""}function ShowAllMatch(){for(var t=document.getElementById("myleague2").getElementsByTagName("input"),n=0;n<t.length;n++)t[n].checked=!0;for(t=document.getElementById("table_live").getElementsByTagName("tr"),n=0;n<t.length;n++)t[n].getAttribute("index")!=null&&(t[n].style.display="");for(n=1;n<=matchcount;n++)A[n][24]!=""&&(Bf_simply_disp==!1||B[A[n][1]][4]==1)&&(document.getElementById("tr2_"+A[n][0]).style.display="");if(orderby=="league")for(n=1;n<=sclasscount;n++)Bf_simply_disp&&B[n][4]==0||(document.getElementById("tr_"+n)&&(document.getElementById("tr_"+n).style.display=""),document.getElementById("expand"+n)&&(document.getElementById("expand"+n).style.display="none"),document.getElementById("collapse"+n)&&(document.getElementById("collapse"+n).style.display=""));document.getElementById("hiddencount").innerHTML="0";hiddenID="_";writeCookie("Hidden_MatchID",hiddenID)}function ShowMatchByMatchState(n){for(var f,i,u=0,r=document.getElementById("table_live").getElementsByTagName("tr"),t=1;t<r.length;t++)r[t].getAttribute("index")!=null&&(r[t].style.display="none",r[t+1].style.display="none");for(t=1;t<=matchcount;t++)Bf_simply_disp&&B[A[t][1]][4]==0||(n==1&&parseInt(A[t][8])>0||n==2&&A[t][8]=="-1"||n==3&&A[t][8]=="0"||n==4&&A[t][20]=="True"?(document.getElementById("tr1_"+A[t][0]).style.display="",A[t][24]!=""&&(document.getElementById("tr2_"+A[t][0]).style.display="")):u=u+1);if(document.getElementById("hiddencount").innerHTML=u,orderby=="league")for(t=1;t<=sclasscount;t++)if(f=!1,!Bf_simply_disp||B[t][4]!=0){for(i=1;i<=matchcount;i++)A[i][1]==t&&(n==1&&parseInt(A[i][8])>0||n==2&&A[i][8]=="-1"||n==3&&A[i][8]=="0"||n==4&&A[i][20]=="True")&&(f=!0);document.getElementById("tr_"+t).style.display=f?"":"none"}}function hidematch(n){document.getElementById("tr1_"+A[n][0]).style.display="none";document.getElementById("tr2_"+A[n][0]).style.display="none";document.getElementById("hiddencount").innerHTML=parseInt(document.getElementById("hiddencount").innerHTML)+1;hiddenID.indexOf("_"+A[n][0]+"_")==-1&&(hiddenID+=A[n][0]+"_");writeCookie("Hidden_MatchID",hiddenID);reorderNotice()}function hideSelMatch(){var i,t,n;if(hiddenID!="_"){for(i=0,t=hiddenID.split("_"),n=1;n<t.length-1;n++)document.getElementById("tr1_"+t[n])!=null&&(document.getElementById("tr1_"+t[n]).style.display="none",document.getElementById("tr2_"+t[n]).style.display="none",i++);document.getElementById("hiddencount").innerHTML=i}}function ClearAllMatch(){for(var t=document.getElementById("myleague2").getElementsByTagName("input"),n=0;n<t.length;n++)t[n].checked=!1;for(t=document.getElementById("table_live").getElementsByTagName("tr"),n=0;n<t.length;n++)t[n].getAttribute("index")!=null&&(t[n].style.display="none");for(n=1;n<=matchcount;n++)A[n][30]!=""&&(Bf_simply_disp==!1||A[n][26]==1)&&(document.getElementById("tr2_"+A[n][0]).style.display="none"),hiddenID.indexOf("_"+A[n][0]+"_")==-1&&(hiddenID+=A[n][0]+"_");if(orderby=="league")for(n=1;n<=sclasscount;n++)Bf_simply_disp&&B[n][4]==0||(document.getElementById("tr_"+n).style.display="none",document.getElementById("expand"+n).style.display="",document.getElementById("collapse"+n).style.display="none");document.getElementById("hiddencount").innerHTML=matchcount;writeCookie("Hidden_MatchID",hiddenID)}function CheckLeague(n,t){var r=parseInt(document.getElementById("hiddencount").innerHTML),i;if(t&&filter.league.indexOf(B[n][0])==-1)for(orderby=="league"&&(document.getElementById("tr_"+n).style.display=""),i=1;i<=matchcount;i++)A[i][1]==n&&(document.getElementById("tr1_"+A[i][0]).style.display="",A[i][24]!=""&&(document.getElementById("tr2_"+A[i][0]).style.display=""),hiddenID.indexOf("_"+A[i][0]+"_")!=-1&&(hiddenID=hiddenID.replace("_"+A[i][0]+"_","_"),r--));else if(!t)for(orderby=="league"&&(document.getElementById("tr_"+n).style.display="none"),i=1;i<=matchcount;i++)A[i][1]==n&&(document.getElementById("tr1_"+A[i][0]).style.display="none",A[i][24]!=""&&(document.getElementById("tr2_"+A[i][0]).style.display="none"),hiddenID.indexOf("_"+A[i][0]+"_")==-1&&(hiddenID+=A[i][0]+"_",r++));document.getElementById("hiddencount").innerHTML=r}function HiddenLeague(n,t){_$("myleague_"+n)&&(_$("myleague_"+n).checked=t);t?(document.getElementById("expand"+n).style.display="none",document.getElementById("collapse"+n).style.display=""):(document.getElementById("expand"+n).style.display="",document.getElementById("collapse"+n).style.display="none");CheckLeague(n,t);document.getElementById("tr_"+n).style.display=""}function MoveToBottom(n){try{document.getElementById("tr1_"+n).parentElement.insertAdjacentElement("beforeEnd",document.getElementById("tr1_"+n));document.getElementById("tr2_"+n).parentElement.insertAdjacentElement("beforeEnd",document.getElementById("tr2_"+n));reorderNotice()}catch(t){}}function setMatchTime(){for(var t,n=1;n<=matchcount;n++)try{t=convertTime(A[n][7]);A[n][8]=="1"&&(goTime=Math.floor((new Date-t-difftime)/6e4),goTime>45&&(goTime="45+"),goTime<1&&(goTime="1"),document.getElementById("time_"+A[n][0]).innerHTML=goTime+"<img src='/images/in.gif' border=0 alt='in' width=3 height=8>");A[n][8]=="3"&&(goTime=Math.floor((new Date-t-difftime)/6e4)+46,goTime>90&&(goTime="90+"),goTime<46&&(goTime="46"),document.getElementById("time_"+A[n][0]).innerHTML=goTime+"<img src='/images/in.gif' border=0 alt='in' width=3 height=8>")}catch(i){}runtimeTimer=window.setTimeout("setMatchTime()",3e4)}function showdetail(n,t){var i,r,f;if(A[n][8]!="0")try{for(Math.floor((new Date-loadDetailFileTime)/600)>6&&LoadDetailFile(),i=[],r="<table width=400 cellpadding=0 cellspacing=1 class='odds-table-bg'>",r+="<tr><td height=20 colspan=5 class='hand-bg' align=center><font color=white><b>"+_locModel.T.T_TIL_GameEve+"<\/b><\/font><\/td><\/tr>",r+="<tr class='jqSubTitle' align=center><td height=20 width=44%><font><b>"+A[n][4]+"<\/b><\/font><\/td><td width=12%><b>"+_locModel.T.T_Minutes+"<\/b><\/td><td  width=44%><font><b>"+A[n][5]+"<\/b><\/font><\/td><\/tr>",f=0;f<rq.length;f++)(i=rq[f].split("^"),i[0]==A[n][0])&&(r+=i[1]=="1"?"<tr align=center><td align=left height=18 class='white-bg' style='padding: 0 5px'> <img style='margin:0px 2px;' src='/images/"+i[2]+".gif'>"+i[4]+" <\/td><td width=12% class='gray-bg2'>"+i[3]+"'<\/td><td class='white-bg'><\/td><\/tr>":"<tr align=center><td class='white-bg'><\/td><td width=12% class='gray-bg2''>"+i[3]+"'<\/td><td align=right height=18 class='white-bg' style='padding: 0 5px'>"+i[4]+" <img style='margin:0px 2px;' src='/images/"+i[2]+".gif'> <\/td><\/tr>");r+="<\/table>";document.getElementById("winScore").style.left=document.body.clientWidth/2-175+"px";var o=getElementPos("sound"),u=document.getElementById("winScore"),e=Math.max(document.body.scrollTop,document.documentElement.scrollTop);u.style.top=e==0?o.y-t.clientY<260?t.clientY-u.clientHeight+"px":t.clientY-240<=0?t.clientY+"px":t.clientY-u.clientHeight+"px":t.clientY<u.clientHeight?e+t.clientY+"px":e+t.clientY-u.clientHeight+"px";document.getElementById("winScore").innerHTML=r;document.getElementById("winScore").style.display=""}catch(s){}}function hiddendetail(){document.getElementById("winScore").innerHTML="";document.getElementById("winScore").style.display="none"}function check(){oldUpdateTime==lastUpdateTime&&oldUpdateTime!=""&&confirm("Due to procedural busyness or other network problems, you have been disconnected with the server more than 5 minutes, whether re-link to continue your watching score or not?")&&window.location.reload();oldUpdateTime=lastUpdateTime;window.setTimeout("check()",3e5)}function setOrderby(n){orderby=n;writeCookie("orderby",orderby);LoadLiveFile()}function LoadLiveFile(){var n=document.getElementById("allDate"),t=document.createElement("script");t.type="text/javascript";t.src=isResult?orderby=="league"?_bfTxtByLeague+"?"+Date.parse(new Date):_bfTxtByTime+"?"+Date.parse(new Date):orderby=="league"?_bfTxtByLeague+"?"+Date.parse(new Date)+(_bfToken!=""?"&from=free&token="+_bfToken:""):_bfTxtByTime+"?"+Date.parse(new Date)+(_bfToken!=""?"&from=free&token="+_bfToken:"");n.removeChild(n.firstChild);n.appendChild(t,"script");window.setTimeout("LoadLiveFile()",36e5)}function LoadDetailFile(){var n=document.getElementById("span_detail"),t=document.createElement("script");t.type="text/javascript";t.src="/gf/data/detail.js?"+Date.parse(new Date);n.removeChild(n.firstChild);n.appendChild(t,"script");loadDetailFileTime=new Date}function LoadSbCornerFile(){var t=document.getElementById("span_sbCorner"),n=document.createElement("script");n.type="text/javascript";n.charset="utf-8";n.src="/gf/data/sbCorner.js?"+Date.parse(new Date);t.removeChild(t.firstChild);t.appendChild(n,"script");loadSbCornerTime=new Date}function changeFontSize(n,t){for(var i=1;i<=matchcount;i++)(Bf_simply_disp==!1||A[i][26]==1)&&(document.getElementById("team1_"+A[i][0]).style.fontSize=t+"px",document.getElementById("team2_"+A[i][0]).style.fontSize=t+"px")}function ToApp(){window.open(_touchWebDomain)}function hiddenSbCorner(){document.getElementById("ifShowCorner").value=0;oldCorner="";showCornerCont=0;MM_showHideLayers("sbOddsCorner","","hidden")}function showSbCornerDiv(){document.getElementById("ifShowCorner").value=1;MM_showHideLayers("sbOddsCorner","","show")}function showSBCorner(n,t){var r,y,p,e,w,b,u,d,a;if(_showCorner&&!(showCornerCont>0)){var v=A[n][0],g=A[n][2],nt=A[n][3],tt=A[n][4],it=A[n][5],rt=B[A[n][1]][1],k=parseInt(A[n][8]),i=[];if(Math.floor((new Date-loadSbDetailTime)/600)>50&&LoadSbCornerFile(),typeof sCornerData!="undefined"&&typeof sCornerData[v]!="undefined"){var o="",s=sCornerData[v].split("^"),c=s[0].split(","),l=s[1].split(","),f=s[2].split(","),h=null;for(typeof s[3]!="undefined"&&(h=s[3].split(";")),o=v+","+g+","+nt+","+k+",",r=3;r<6;r++)o+=(typeof c[r]=="undefined"?"":c[r])+",";for(r=3;r<6;r++)o+=(typeof l[r]=="undefined"?"":l[r])+",";for(r=0;r<4;r++)o+=(typeof f[r]=="undefined"?"":f[r])+",";h!=null&&h[0]!=""?(y=h[h.length-1].split(","),o+=y[0]+","+y[1]):o+=",";p=60;e=typeof c[0]!="undefined"&&c[0]!=""||typeof l[0]!="undefined"&&l[0]!="";i.push('<table width="100%" border="0" cellpadding="0" cellspacing="1"  id="tab_CornerOdds" style="background-color:#cccccc;">');i.push('<tr><td colspan=2><div class="jqTitle">Bet365 '+_locModel.T.T_TIL_CornerKicks+"<\/div><\/td><\/tr>");i.push("<tr class=jqSubTitle><td>"+tt+"<\/td><td>"+it+"<\/td><\/tr>");i.push("<\/table>");A[n][27]&&(e=!0);w=e?"":"none";p+=e?66:0;i.push('<div class="info" id="div_cornerOdds" style="display:'+w+'" odds="'+o+'">');e=A[n][29]==1&&k!=0;A[n][27]&&(e=!0);b=e?"":"none";p+=e?44:0;i.push('<div class="info" id="div_cornerDetail" style="display:'+b+'">');i.push("<div class='jqTitle2'>"+_locModel.T.T_TIL_CornerDetail+"<\/div>");i.push('<table id="tab_CornerDetail" width="100%" border="0" cellpadding="0" cellspacing="1"  style="margin-top:-1px;background-color:#cccccc;">');i.push("<tr>");i.push("<tr>");i.push('<td width="165" class="white-bg">'+(typeof f[0]=="undefined"?A[n][27]:f[0])+"<\/td>");i.push('<td  width="60" class="gray-bg2">'+_locModel.T.T_FullTime+"<\/td>");i.push('<td class="white-bg">'+(typeof f[1]=="undefined"?A[n][28]:f[1])+"<\/td>");i.push("<\/tr>");i.push("<tr>");i.push('<td class="white-bg">'+(typeof f[2]=="undefined"?" ":f[2])+"<\/td>");i.push('<td class="gray-bg2">'+_locModel.T.T_HalfTime+"<\/td>");i.push('<td class="white-bg">'+(typeof f[3]=="undefined"?" ":f[3])+"<\/td>");i.push("<\/tr>");i.push("<\/table><\/div>");u=document.getElementById("sbOddsCorner");d=getElementPos("sound");u.style.left=document.body.clientWidth/2-220+"px";a=Math.max(document.body.scrollTop,document.documentElement.scrollTop);u.style.top=a==0?d.y-t.clientY<260?t.clientY-u.clientHeight+"px":t.clientY-240<=0?t.clientY+"px":t.clientY-u.clientHeight+"px":t.clientY<u.clientHeight?a+t.clientY+"px":a+t.clientY-u.clientHeight+"px";u.style.width="400px";w=="none"&&b=="none"&&(u.style.width="180px",i=[],i.push("<table style='border:solid 1px #666; background-color:#FFFFFF;width:180px;line-height:28px;text-align:center;font-size:14px;'><tr><td><b>"+_locModel.T.T_PH_NoCornerData+"<\/b><\/td><\/tr><\/table>"),u.style.left=document.body.clientWidth/2+20+"px");u.innerHTML=i.join("");document.getElementById("ifShowCorner").value=1;MM_showHideLayers("sbOddsCorner","","show");showCornerCont++}}}function changeData(n){if(typeof n=="undefined"||n=="")return"";var t=n,i=n.toString().split(".");return i.length>1?i[1].length==1&&(t=t+"0"):t=t+".00",t}function getStrDiv(n,t){if(typeof n=="undefined"||n+""=="")return"";var i=changeData(n);return parseFloat(n)>parseFloat(t)?'<div class="up_red">'+i+"<\/div>":parseFloat(n)<parseFloat(t)?'<div class="down_green">'+i+"<\/div>":i}function getStrDiv2(n,t,i){if(typeof n=="undefined"||n+""=="")return"";var r="";return r=i==1?Goal2GoalCn(n):Goal2GoalCn(n),parseFloat(n)!=parseFloat(t)?'<div class="change_yellow">'+r+"<\/div>":r}function SelectMenu(n){$("#li_ShowAll").removeClass("on");$("#li_FilterHot").removeClass("on");$(".filterLi").removeClass("on");$("#"+n).addClass("on");var t=0;n=="li_FilterHot"?t=1:n=="li_MyGame"&&(t=8);selectMenu=t;sessionStorage.setItem("SelectMenu",t)}function CountHidden(){for(var i=0,t=document.getElementById("table_live").getElementsByTagName("tr"),n=1;n<t.length;n++)t[n].getAttribute("index")!=null&&t[n].style.display!="none"&&i++;document.getElementById("hiddencount").innerHTML=matchcount-i}function openWebsocket(){wsUtil.connectWs(["change_xml"],function(n){if(n.change_xml!=undefined){var t=n.change_xml.split("!");refresh(t,1)}},function(){scorePolling&&window.clearTimeout(scorePolling);scorePolling=window.setTimeout("getxml()",4e3)},function(){scorePolling&&window.clearTimeout(scorePolling)})}function refreshBfToken(){_bfToken!=""&&($.post("/ajax/RefreshBfToken",{token:_bfToken},function(n){n!=""&&(_bfToken=n)}),window.setTimeout("refreshBfToken()",6e4))}function SwithcDarkFree(){document.getElementById("DarkModeCheck").checked?(dark_mode=1,WriteSession("dark_mode",1)):(dark_mode=0,WriteSession("dark_mode",0));LoadDark()}function SyncDarkCheckFree(){var n=GetSession("dark_mode");n==null&&(n=dark_mode);n==1&&document.getElementById("DarkModeCheck")&&(document.getElementById("DarkModeCheck").checked=!0);document.getElementById("DarkModeCheck")&&(document.getElementById("DarkModeCheck").style.display="")}function specialHide(){var n=getQueryVariable("mode");(n==null||n=="")&&(n=sessionStorage.getItem("HideMode"));n!=null&&n=="hide"?($(".needHide").hide(),sessionStorage.setItem("HideMode",n)):n=="deephide"?($(".needHide").hide(),$(".deepHide").hide(),sessionStorage.setItem("HideMode",n)):n=="show"&&($(".needHide").show(),$(".deepHide").show(),sessionStorage.setItem("HideMode",n))}function initSortLea(){document.getElementById("cbbSortLea")&&document.getElementById("cbbSortLea").checked&&(_leaSortting=!0,MakeSclassWithSorting(),HideByState(1),SyncLeaSorting(0))}function SortList(){var n=$("#cbbSortLeaByCountry")[0].checked,t=$("#cbbSortLea")[0]?$("#cbbSortLea")[0].checked:!1;n?(_leaSortting=!0,MakeSclassWithSortingByCountry()):t?(_leaSortting=!0,MakeSclassWithSorting()):(_leaSortting=!1,MakeSclass());n?writeCookie(FilterCountryKey,1):writeCookie(FilterCountryKey,0);HideByState();SyncLeaSorting(0);InitHeadShow()}function hideResultTr(){var t,n;if(orderby!="league"&&$("#resultSplit").length!=0){for(t=!1,n=0;n<finishMatchList.length;n++)if($("#tr1_"+finishMatchList[n])[0].style.display!="none"&&(myGamesID.indexOf(finishMatchList[n])==-1&&isFavTop||!isFavTop)){t=!0;break}$("#resultSplit")[0].style.display=t?"":"none"}}function callLeagueFilterWin(){MM_showHideLayers("showoptional2","","show");leagueFilterCount()}function teamClickEvent(n){if(_appModule=="World"){var t=escapeChar(skipHtmlTagBoth(A[n][4])),i=escapeChar(skipHtmlTagBoth(A[n][5])),r=escapeChar(skipHtmlTagBoth(B[A[n][1]][2]));matchIsBegin(parseInt(A[n][8]))?soccerInPage.detail(A[n][0],t,i,r):soccerInPage.analysis(A[n][0],t,i,r)}else matchIsBegin(parseInt(A[n][8]))?soccerInPage.detail(A[n][0]):soccerInPage.analysis(A[n][0])}function matchIsBegin(n){let t=!1;return n=parseInt(n),(n>0||n==-1||n==-13)&&(t=!0),t}function reorderNotice(){for(var i,r,u,f="<tr><td class='notice' colspan=9 onclick=javascipt:window.open('"+_livescoreWebDomain+"')>"+_locModel.T.T_Free_Drainage+"<\/td><\/tr>",t=$(".notice"),n=0;n<t.length;n++)t[n].parentNode.removeChild(t[n]);for(i=$("[id^=tr1_]:visible"),n=0;n<i.length;n++)if(n==0&&(r=parseInt(i[n].getAttribute("index")),u=_$("tr2_"+A[r][0]),insertAfter($(f)[0],u)),n==1)break}function showAllMatch(){writeCookie("Hidden_MatchID","_");location.href="/free/freesoccer/?type=all"}function InitHeadShow(){var n,u,f,i,t,e,r;if(orderby!="time"&&(n=$(".Leaguestitle"),n!=null||n.length!=0)){for(u="leaIndex",f="",i=0;i<n.length;i++){if(f=n[i].getAttribute(u),t=$("tr[index]["+u+'="'+f+'"]'),e=!1,t!=null&&t.length>0)for(r=0;r<t.length;r++)if(t[r].style.display!="none"&&(orderby!="time"||t[r].getAttribute("istop")!=1)){e=!0;break}n[i].style.display=e?"":"none"}reorderNotice()}}function openMainDomain(){window.open(_mainWebDomain+"/freemap")}function checkWhiteList(){if(window.self!==window.top){var t="",i=document.referrer,n=i.split("/")[2].split(".");if(t=/^\d+$/.test(n[1])?`${n[0]}.${n[1]}.${n[2]}.${n[3].split(":")[0]}`:n.join("."),t==location.host)return;$.post(`/ajax/checkwhitelist`,{domain:t},function(n){console.log(i,t,n);n!=1&&($("#wlbox").show(),$("#wlshadow").show(),$("body").css("overflow","hidden"))})}else _freeWebDomain.indexOf(location.host)==-1&&($("#wlbox").show(),$("#wlshadow").show(),$("body").css("overflow","hidden"))}var filter={state:0,middleague:[],league:[],country:[],odds:[],condition:""},tmpfilter={state:0,league:[],country:[],odds:[],condition:""},isLeftInit=0,leagueSIndex=_leagueNameIdx,leagueLIndex=7,countryIndex=23,isFromSch=!1,FbMatchTimeKey="FootBallMatchTimeKey",FbFilterKey="FootBallFilterKey",FbFilterTypeKey="FootBallFilterTypeKey",minMatchTime=0,oldConditionID="",state_ch=Array(19),state_Desc,scorePolling,difftime,oXmlHttp,_leaSortting,soccerInPage,basketInPage;state_ch[0]=_locModel.T.T_ST_Postp;state_ch[1]=_locModel.T.T_ST_Pause;state_ch[2]=_locModel.T.T_ST_Abd;state_ch[3]="<font color=green>"+_locModel.T.T_ST_Pend+"<\/font>";state_ch[4]=_locModel.T.T_ST_Cancel;state_ch[13]="<b>"+_locModel.T.T_ST_FT+"<\/b>";state_ch[14]=" ";state_ch[15]=_locModel.T.T_ST_Part1;state_ch[16]=_locModel.T.T_ST_HT;state_ch[17]=_locModel.T.T_ST_Part2;state_ch[18]=_locModel.T.T_ST_Ot;state_ch[19]=_locModel.T.T_ST_Pen;state_Desc=Array(19);state_Desc[0]=_locModel.T.T_ST_Postponed;state_Desc[1]=_locModel.T.T_ST_Pause;state_Desc[2]=_locModel.T.T_ST_Abandoned;state_Desc[3]="";state_Desc[4]=_locModel.T.T_ST_Cancel;state_Desc[13]="";state_Desc[14]="";state_Desc[15]=_locModel.T.T_ST_Part1;state_Desc[16]="";state_Desc[17]=_locModel.T.T_ST_Part2;state_Desc[18]=_locModel.T.T_ST_Ot;state_Desc[19]=_locModel.T.T_ST_Pen;getDiffTime();oXmlHttp=zXmlHttp.createRequest();sound_init();orderby=getCookie("orderby");orderby==null&&(orderby="time");LoadLiveFile();window.setTimeout("LoadSbCornerFile()",4e3);scorePolling=window.setTimeout("getxml()",2e3);Bf_simply_disp&&(document.getElementById("ShowAllSel").getElementsByTagName("option")[1].selected=!0);$(document).ready(function(){refreshBfToken()});SyncDarkCheckFree();$(document).ready(function(){specialHide();checkWhiteList()});_leaSortting=!1;soccerInPage={isSummary:function(n){return typeof checkInpageVersion=="function"&&checkInpageVersion(n)==1?!0:!1},gethost:function(){return _mainWebDomain.substr(0,_mainWebDomain.length-1)},detail:function(n){this.isSummary(n)||window.open(this.gethost()+"/match/live-"+n)},analysis:function(n){this.isSummary(n)||window.open(this.gethost()+"/match/h2h-"+n)},oddscomp:function(n){if(!this.isSummary(n)){var t="/oddscomp/"+n;window.open(this.gethost()+t)}},euroodds:function(n){window.open(this.gethost()+"/1x2-odds/"+n)},ouodds:function(n){window.open(this.gethost()+"/over-under-odds/"+n)},ahodds:function(n){window.open(this.gethost()+"/asian-handicap-odds/"+n)},threemix:function(n,t,i){var r="/oddscomp/"+n;i&&(r+="?half=1");window.open(this.gethost()+r)},textlive:function(n){window.open(this.gethost()+"/textlive/"+n)},playertech:function(n){window.open(this.gethost()+"/playertech/"+n)},panluWin:function(n,t){var i=this.gethost()+"/soccer/oddsstats/"+n;typeof t!="undefined"&&t!=""&&(url+="?cid="+t);window.open(i,"","scrollbars=yes,resizable=yes,width=662, height=650,left=50,top=100")}};basketInPage={gethost:function(){return _mainWebDomain.substr(0,_mainWebDomain.length-1)},analysis:function(n){window.open(this.gethost()+"/basketball/analysis/"+n)},oddscomp:function(n){window.open(this.gethost()+"/oddscompbasket/"+n)},euroodds:function(n){window.open(this.gethost()+"/basketball/1x2-"+n)},playertech:function(n){window.open(this.gethost()+"/statistics/"+n)},textlive:function(n){window.open(this.gethost()+"/statistics/"+n+"?showtxt=1")}}