
var V33={V1:{},V2:{},V3:{},V4:{},V5:{},V6:{},V7:0,V8:0,V9:0,V10:0,V11:-1,V12:'',V13:0,_deltainterval:10000,_fullinterval:10,_categoryid:-1,_fulltoincrementdelay:200,V102:0,V92:0,V103:0,V104:'',_useflashloader:0,_updatetimer:-1,_doadjusttime:true,_fullfeedcachetime:15,_showtimestampdebug:false,V34:function(V14,V15,V16,V17,V18,sportid,lang,day,deltainterval,fullinterval,options,V90,categoryid,tournamentid,specialvalue,useflashloader,fullfeedcachetime,showtimestampdebug,donotupdate){this.V1=V16;this.V2=V17;this.V3=V18;this.V4=V14;this.V5=V15;this.V6=options;this.V11=sportid;this.V12=lang;this.V13=day;this._deltainterval=deltainterval;this._fullinterval=fullinterval;this.V92=V90;this._categoryid=categoryid;this.V103=tournamentid;this.V104=specialvalue;this._useflashloader=useflashloader;this._fullfeedcachetime=fullfeedcachetime;this._showtimestampdebug=showtimestampdebug;this.V102=donotupdate;this.V35();setInterval('V33.V100()',60000*5);setTimeout('V101();',60000*120);},V35:function(){var limit=0;if(this.V11==-3)limit=1;var url=this.V1+'?sportid='+this.V11+'&language='+this.V12+'&day='+this.V13+'&pagetracker='+V88+'&limit='+limit+'&categoryid='+this._categoryid+'&tournamentid='+this.V103+'&specialvalue='+this.V104;if(this._useflashloader){loadFlashURL(url,function(V83){V83=eval('('+V83+')');Table.V98(V33.V4,V33.V5,V83,V33.V6);if(limit)V33.V24();else if(V33.V13==0||V33.V11==-1)setTimeout('V33.V26();',V33._fulltoincrementdelay);V33._updatetimer=setTimeout('V33.V23();',V33._deltainterval);});}else{$.getJSON(url,function(V83){Table.V98(V33.V4,V33.V5,V83,V33.V6);if(limit)V33.V24();else if(V33.V13==0||V33.V11==-1)setTimeout('V33.V26();',V33._fulltoincrementdelay);V33._updatetimer=setTimeout('V33.V23();',V33._deltainterval);});}},V23:function(){if((this.V13==0||this.V11==-1)&&this.V9==0){this.V7++;if(this.V7>=(60000/this._deltainterval)*this._fullinterval){this.V24();}else if(this.V11!=-4){this.V25();}};if(!this.V102)V33._updatetimer=setTimeout('V33.V23();',this._deltainterval);},V24:function(){var url=this.V1+'?sportid='+this.V11+'&language='+this.V12+'&day='+this.V13+'&pagetracker='+V88+'&categoryid='+this._categoryid+'&tournamentid='+this.V103+'&specialvalue='+this.V104;if(this._useflashloader){loadFlashURL(url,function(V83){V83=eval('('+V83+')');Table.V97(V33.V4,V33.V5,V83,V33.V6);if(V33.V13==0||V33.V11==-1)V33._doadjusttime=true;setTimeout('V33.V26();',V33._fulltoincrementdelay);setTimeout('V33._setSelectedMatchesChecked();',800);});}else{$.getJSON(url,function(V83){Table.V97(V33.V4,V33.V5,V83,V33.V6);if(V33.V13==0||V33.V11==-1)V33._doadjusttime=true;setTimeout('V33.V26();',V33._fulltoincrementdelay);setTimeout('V33._setSelectedMatchesChecked();',800);});};this.V7=0;},V25:function(){this.V9=1;var failoverinterval=20000;if(!isNaN(this._deltainterval)){failoverinterval=2*parseInt(this._deltainterval);};this.V8=setTimeout('V33.V27();',failoverinterval);if(this._useflashloader){loadFlashURL(this.V2+'?language='+this.V12+'&pagetracker='+V88,function(V83){V83=eval('('+V83+')');V33.V9=0;clearTimeout(V33.V8);Table.V75(V83);});}else{$.getJSON(this.V2+'?language='+this.V12+'&pagetracker='+V88,function(V83){V33.V9=0;clearTimeout(V33.V8);Table.V75(V83);});}},V26:function(){this.V9=1;var failoverinterval=20000;if(!isNaN(this._deltainterval)){failoverinterval=2*parseInt(this._deltainterval);};this.V8=setTimeout('V33.V27();',failoverinterval);if(this._doadjusttime){this.V91();this._doadjusttime=false;};Table.__skiphighlite=true;if(this._useflashloader){loadFlashURL(this.V3+"/"+Table.V31+'?language='+this.V12+'&pagetracker='+V88,function(V83){V83=eval('('+V83+')');clearTimeout(V33.V8);Table.V75(V83);Table.__skiphighlite=false;V33.V9=0;});}else{$.getJSON(this.V3+"/"+Table.V31+'?language='+this.V12+'&pagetracker='+V88,function(V83){clearTimeout(V33.V8);Table.V75(V83);Table.__skiphighlite=false;V33.V9=0;});}},V27:function(){V33.V26();},V37:function(V38,V39,newcategoryid,newspecialvalue){clearTimeout(V33._updatetimer);clearTimeout(V33.V8);this.V9=0;this.V11=V38;this.V13=V39;this._categoryid=newcategoryid;this.V104=newspecialvalue;this.V24();V33._updatetimer=setTimeout('V33.V23();',this._deltainterval);},_getDeltaIntervalTime:function(){if(this._useflashloader){loadFlashURL('../feed.php/feed/deltatime/',function(V83){V83=eval('('+V83+')');if(V83>=5000&&V83<=60000)V33._deltainterval=V83;});}else{$.getJSON('../feed.php/feed/deltatime/',function(V83){if(V83>=5000&&V83<=60000)V33._deltainterval=V83;});}},V100:function(){if(this._useflashloader){loadFlashURL('../feed.php/feed/jsonconfig/',function(V83){V83=eval('('+V83+')');if(V83.deltainterval>=5000&&V83.deltainterval<=60000)V33._deltainterval=V83.deltainterval;if(V83.fullinterval>=1&&V83.fullinterval<=60)V33._fullinterval=V83.fullinterval;});}else{$.getJSON('../feed.php/feed/jsonconfig/',function(V83){if(V83.deltainterval>=5000&&V83.deltainterval<=60000)V33._deltainterval=V83.deltainterval;if(V83.fullinterval>=1&&V83.fullinterval<=60)V33._fullinterval=V83.fullinterval;});}},V91:function(){if(Table.V31!=0){var V94=parseInt((new Date()).getTime()/1000);var V95=V94-this.V92-Table.V31;var V96=Math.round(V95/60);var maxmintoadd=(2*this._fullfeedcachetime)/60+2;if(this._showtimestampdebug){this._printTimeInfo(this.V92,Table.V31,V95,V96,maxmintoadd);};if(V96>0&&V96<=maxmintoadd){$('.matchtime').each(function(i){var element=this.innerHTML;var index=element.indexOf('\'');if(index>-1){var V93=parseInt(element.substr(0,index));if(V93<45){V93+=V96;if(V93>45)V93=45;this.innerHTML=V93+'\'';}else if(V93>45&&V93<90){V93+=V96;if(V93>90)V93=90;this.innerHTML=V93+'\'';}}});}}},_setSelectedMatchesChecked:function(){try{if(typeof(selectedMatches)!="undefined"){for(i=0;i<selectedMatches.length;i++){$("#checked"+selectedMatches[i]).each(function(){$(this).attr("checked",true);});}}}catch(err){}},_printTimeInfo:function(V90,timestamp,V95,V96,maxmintoadd){var time=new Date(timestamp*1000);var currenttime=new Date();var timeinfo="Timediff in secs(server/local): <strong>"+V90+"</strong><br>Feedtimestamp: <strong>"+time.getHours()+":"+time.getMinutes()+":"+time.getSeconds()+"</strong> ("+timestamp+")"+"<br>Secdiff (server/feed timestamp): <strong>"+V95+"</strong><br>Min to add to matchtime (max "+maxmintoadd+" will be added): <strong>"+V96+"</strong><br><br><i>Lastupdate:"+currenttime+"</i>";$("#restartlivescoredialog").html(timeinfo);$("#restartlivescoredialog").height(63);;$("#restartlivescoredialog").show();}};function updateTime(){$('.matchtime').each(function(i){var element=this.innerHTML;var index=element.indexOf('\'');if(index>-1){var V93=parseInt(element.substr(0,index));if(V93<45){V93++;this.innerHTML=V93+'\'';}else if(V93>45&&V93<90){V93++;this.innerHTML=V93+'\'';}else if(V93>90&&V93<105){V93++;this.innerHTML=V93+'\'';}else if(V93>105&&V93<120){V93++;this.innerHTML=V93+'\'';}}});};function reLoadTable(newsport){reLoadTableCat(newsport,-1);};function reLoadTableCat(newsport,newcategoryid){reLoadTableCatSpecialValue(newsport,newcategoryid,'')};function reLoadTableCatSpecialValue(newsport,newcategoryid,newspecialvalue){var V39=$("#history_select").val();if(V39==undefined||V39==null)V39=0;if(newsport!=sportid||V39!=day||newcategoryid!=categoryid||newspecialvalue!=specialvalue){if(newsport>-10){sportid=newsport;if(newsport==-1&&V39!=0){V39=0;$("#history_select").val(V39);};$("li").each(function(){$(this).removeClass('active');});$("#menuselect"+newsport).addClass("active");};day=V39;categoryid=newcategoryid;specialvalue=newspecialvalue;clearInterval(V89);V33.V37(sportid,day,newcategoryid,newspecialvalue);if(day==0){V89=setInterval('updateTime()',60000);};if(newsport==-1||newsport==-3||newsport==-4||newsport==-5)$("#dateselect").addClass("hidden");else $("#dateselect").removeClass("hidden");}};function setActiveMenu(newcategoryid){$('.goal_menu').each(function(){$(this).removeClass('active');$("#c_"+newcategoryid).addClass("active");});};function V101(){V33.V102=1;$("#restartlivescoredialog").show();};function loadDetails(folder,matchid,language,useflashloading,refresh){var url='../feed.php/feed/details/'+folder+'?matchid='+matchid+'&language='+language;if(useflashloading){loadFlashURL(url,function(V83){$('#details_content').html(V83);});}else{$.get(url,function(V83){$('#details_content').html(V83);});};var refreshtimeout=refresh*1000;setTimeout('loadDetails(\'' + folder + '\', '+matchid+', \''+ language + '\', '+useflashloading+', '+refresh+')',refreshtimeout);};function loadTV(folder,matchid,language,useflashloading){var url='../feed.php/feed/tv/'+folder+'?matchid='+matchid+'&language='+language;if(useflashloading){loadFlashURL(url,function(V83){$('#details_content').html(V83);});}else{$.get(url,function(V83){$('#details_content').html(V83);});}};function loadLineups(folder,matchid,language,useflashloading){var url='../feed.php/feed/lineups/'+folder+'?matchid='+matchid+'&language='+language;if(useflashloading){loadFlashURL(url,function(V83){$('#details_content').html(V83);});}else{$.get(url,function(V83){$('#details_content').html(V83);});}};function loadShortDetails(elementname,feedurl){var url=feedurl;if(false){loadFlashURL(url,function(V83){$('#'+elementname+'').html(V83);});}else{$.get(url,function(V83){$('#'+elementname+'').html(V83);});}};if(!(typeof($$)=='function'&&typeof(Browser)=='object')){alert('This script requires the static/general.js script!');};var Table={V28:{},V29:{},V30:{},V31:0,V32:new Array(),__skiphighlite:false,V41:function(V42,V43){if(this.V30[V42]){this.V30[V42].stop();};this.V30[V42].start();},highlight:function(V77,V44){var V58=this;var V45=new Date();V45.setTime(V45.getTime()+(V44*1000));$(V77).each(function(){V58.V29[this.id]=V45;setTimeout("Table.V46('"+this.id+"');",(V44*1000)+20);if($("#"+this.id).is(".score")||$("#"+this.id).is(".status")){$("#"+this.id).parent().addClass('highlightrow');}}).addClass('highlight');},V46:function(id){var V77=$("#"+id);var V78=new Date();if(V78.getTime()>=this.V29[id].getTime()){V77.removeClass('highlight');V77.parent().removeClass('highlightrow');}},V47:function(table){if(table.V71)return table;var _table=$('#'+table.id);table._firstrow_dark=false;table.V6=function(options){if(options.firstrow_dark!=undefined){if(this._firstrow_dark!=undefined&&this._firstrow_dark!=options.firstrow_dark){this._update_row_colors();};this._firstrow_dark=options.firstrow_dark;};if(options.cssclass!=undefined)$('#'+table.id).addClass(options.cssclass);if(options.header_title!=undefined)this.V49(options.header_title);if(options.timestamp!=undefined)Table.V31=options.timestamp;if(options.footer_title!=undefined)this.V50(options.footer_title);if(options.last_updated_at!=undefined&&options.last_updated_at>0)this._lastUpdatedAt=options.last_updated_at;if(options.highlight_cell_on_change!=undefined)this._highlightCellOnChange=options.highlight_cell_on_change;if(options.highlight_cell_on_change!=undefined)this.V65=options.highlight_row_on_change;if(options.names){$.each(options.names,function(type,names){$.each(names,function(id,name){Table.setName(type,id,name);});});};if(options.columns){var _span=options.columns;$("table#"+this.id+" thead td, table#"+this.id+" tfoot td").each(function(){$(this).attr('colSpan',_span);});};if(options.finished!=undefined){options.finished();}};table.V48=function(row){if(row==null){$("#"+this.id+"_rows > tr").each($(this).hover(function(){$(this).addClass('hover')},function(){$(this).removeClass('hover')}));}else{$(row).hover(function(){$(this).addClass('hover')},function(){$(this).removeClass('hover')});}};table.V49=function(V79){$$("#"+this.id+"_header_title").innerHTML=V79;};table.V50=function(V79){$$("#"+this.id+"_footer_title").innerHTML=V79;};table.V51=function(_id,V44){var id="tr#"+this.id+"_row_"+_id;Table.highlight($(id),V44);};table.V52=function(headers){var V58=this;var first=true;var V80=$("#"+V58.id+"_headers");V80.empty();$.each(headers,function(hr_id,hr){var row=$.TR({id:V58.id+"_header_"+hr_id});row=$(row);var V81=true;var th;$.each(hr,function(id,h){var attr={id:V58.id+"_header_"+hr_id+"_"+id};if(h.cssclass)attr.className=h.cssclass;if(first)attr.className+=" top";if(V81)attr.className+=" left";if(h.span){attr.colSpan=h.span;};th=$.TH(attr);if(h.val)th.innerHTML=h.val;else th.innerHTML="&nbsp;";row.append(th);V81=false;});$(th).addClass('right');V80.append(row);first=false;});};table.V53=function(rows,rows_meta,options){var V58=this;var body=$("#"+this.id+"_rows");body.empty();var dark=this._firstrow_dark;$.each(options.sort_order,function(i,V61){var row=rows[V61];var meta=rows_meta[V61];var V82={id:V58.id+"_row_"+V61};if(meta.cssclass)V82.className=meta.cssclass;if(meta.rc==1)dark=true;if(dark)V82.className+=" dark";else V82.className+=" light";dark=!dark;var td;var first=true;var _row=$.TR(V82);_row=$(_row);$.each(row,function(id,cell){var attr={id:V58.id+"_row_"+V61+"_"+id};if(cell.cssclass)attr.className=cell.cssclass;if(first)attr.className+=" left";td=$.TD(attr);if(cell.onclick){$(td).click(function(){eval(cell.onclick);});};if(cell.val){td.innerHTML=cell.val;}else if(cell.link){td.innerHTML='<a href="'+cell.link.url+'" >'+cell.link.label+'</a>';}else if(cell.checkbox){td.innerHTML='<checkbox>';}else if(cell.divs){max=cell.divs.length;var content='';for(i=0;i<max;i++){content+='<div class="'+cell.divs[i].div.cssclass+'" onclick="'+cell.divs[i].div.onclick+'" onmouseover="'+cell.divs[i].div.onmouseover+'" onmouseout="'+cell.divs[i].div.onmouseout+'">'+cell.divs[i].div.content+'</div>';};td.innerHTML=content;}else{td.innerHTML="&nbsp;";};if(cell.span){td.colSpan=cell.span;};td=$(td);_row.append(td);first=false;});td.addClass('right');if(meta.onclick)_row.click(function(){eval(meta.onclick);});if(meta.onmouseover){_row.mouseover(function(){eval(meta.onmouseover);});};if(meta.onmouseout){_row.mouseout(function(){eval(meta.onmouseout);});};if(meta.onmousemove){_row.mousemove(function(){eval(meta.onmousemove);});};body.append(_row);if(meta.sort_index)$$(_row)._sortIndex=meta.sort_index;else $$(_row)._sortIndex=i+1;});$("#"+this.id+"_rows tr:last td").each(function(){$(this).addClass('bottom')});};table.V54=function(id,row,meta){var _row=$("#"+this.id+"_row_"+id);var _row_e=_row.get(0);};table.V55=function(url){var V58=this;eval(alert("test"));$.getJSON(url,function(json){if(json.options){V58.V6(json.options);};if(json.headers){V58.V52(json.headers);};if(json.rows&&json.rows_meta&&json.options){V58.V53(json.rows,json.rows_meta,json.options);}});};table.V56=function(json){var V58=this;if(json.options){V58.V6(json.options);};if(json.headers){V58.V52(json.headers);};if(json.rows&&json.rows_meta&&json.options){V58.V53(json.rows,json.rows_meta,json.options);}};table.V57=function(json){var V58=this;if(json.options){V58.V6(json.options);};if(json.rows){var V59=false;$.each(json.rows,function(V61,V62){try{var _row=$$('#'+V58.id+'_row_'+V61);var V60=false;$.each(V62,function(id,V83){if(V83.val==''||V83.val==' '||V83.val==null)V83.val="&nbsp;";var _cell=$$('#'+V58.id+'_row_'+V61+'_'+id);if((_cell.innerHTML).toLowerCase()!=(V83.val).toLowerCase()){_cell.innerHTML=V83.val;if(V58._highlightCellOnChange&&Table.__skiphighlite!=true){Table.highlight(_cell,V58._highlightCellOnChange);};V60=true;}});var V63=false;if(json.rows_meta&&json.rows_meta[V61]){var V64=json.rows_meta[V61];if(V64.cssclass){$(_row).addClass(V64.cssclass);};if(V64.sort_index&&_row._sortIndex&&V64.sort_index!=_row._sortIndex){_row._sortIndex=V64.sort_index;V59=true;};if(V64.highlight)V63=V64.highlight;}}catch(err){};if(V58.V65&&V60){V63=V58.V65>V63?V58.V65:V63;};if(V63){Table.highlight(_row,V63);}});if(V59){this.V67();}}};table.V66=function(url){var V58=this;$.getJSON(url,function(json){V58.V57(json);});};table.V67=function(){var V68={};var V69=0;var _rows=$("tbody#"+this.id+"_rows > tr").each(function(){V68[this._sortIndex]=this;V69++;});var V70=$("tbody#"+this.id+"_rows");V70.empty();for(var i=1;i<=V69;i++){if(this._firstrow_dark&&(i%2)==0)$(V68[i]).addClass('light').removeClass('dark');else $(V68[i]).addClass('dark').removeClass('list');V70.append(V68[i]);}};table.V71=true;return table;},V86:function(V14,V15,options){var V84=$.DIV({id:V14+"_"+V15});var table=$.TABLE({id:V15,className:'table_whole',cellPadding:'0',cellSpacing:'0'},[$.THEAD({},$.TR({},$.TD({},[$.SPAN({className:'before'},' '),$.SPAN({className:'after'},' '),$.SPAN({className:'header_title',id:V15+"_header_title"},' ')]))),$.TFOOT({},$.TR({},$.TD({},[$.SPAN({className:'before'},' '),$.SPAN({className:'after'},' '),$.SPAN({className:'footer_title',id:V15+"_footer_title"},' ')]))),$.TBODY({id:V15+"_headers",className:'headers'}),$.TBODY({id:V15+"_rows",className:'rows'})]);$(V84).empty().append(table);$("#"+V14).append(V84);var table=$T(table.id);$("table#"+V15+" span").each(function(){this.innerHTML='&nbsp;';});table.V6(options);return table;},V36:function(V14,V15,V85,options){$.getJSON(V85,function(V83){Table.V98(V14,V15,V83,options);});return;},V98:function(V14,V15,V83,options){var json;json=V83;$.each(json,function(V61,V62){Table.V73(V14+"_"+V61);var table=Table.V86(V14,V61,options);$T(V61).V56(V62);});return;},V72:function(V14,V15,V85,options){$.getJSON(V85,function(V83){Table.V97(V14,V15,V83,options);});return;},V97:function(V14,V15,V83,options){var json=V83;$.each(Table.V32,function(i,n){$("#"+n).remove();});Table.V32=new Array();$.each(json,function(V61,V62){Table.V73(V14+"_"+V61);var table=Table.V86(V14,V61,options);$T(V61).V56(V62);});return;},V73:function(id){(this.V32).push(id);},V74:function(V14,V15,V85){var json;$.getJSON(V85,function(V83){json=V83;$.each(json,function(V61,V62){$T(V61).V57(V62);});});return;},V75:function(V76){$.each(V76,function(V61,V62){try{$T(V61).V57(V62);}catch(err){}});return;},remove:function(V15){var table=$T(V15);Table.V28[V15]=false;table.remove();}};var $T=function(id){if(typeof(id)!='string'&&typeof(id)!='int'){if(typeof(id)=='HTMLTableElement'){alert("TODO: Implement for: HTMLTableElement");}else{throw "Unknown Object type, not handled: "+typeof(id);}};if(Table.V28[id]){return Table.V28[id];}else{var _tab=$$("table#"+id);if(_tab){_tab=Table.V47(_tab);Table.V28[id]=_tab;return _tab;}else{throw "No such table";}}};


