function event_state_checking(B,D,F,I,G,H,C,E){var A=(F*1)+60*60;if(E>=A){return ;}if(I==false){I=0;}var J=55*1000;window.setTimeout(function(){event_state_action(B,D,A,I,G,H,C);},J);}function event_state_action(A,H,F,D,E,C,B){var G=window.setInterval(function(){var I=new Date();var J=I.getTime()/1000;var K=F*1-60*60;if(J>=F||D==0&&J>K){clearInterval(G);return ;}new Request.JSON({url:"/pages/event/common/event_state_check.php?event="+A+"&rand="+J,secure:false,onComplete:function(L,M){if(L!=null&&(L.state!=D)){event_state_dom_process(E,B);
D=L.state;}else{if(typeof (C)=="object"){for(assoc in L.assets){if(assoc.ref_type==C.ref_type&&assoc.data==C.data){event_state_dom_process(E,B);}}}}}}).get();},55*1000);}function event_state_dom_process(D,C){var A=new Date();var B=A.getTime();new Request.HTML({url:C+"&rand="+B,update:D}).get();}