var spymax=25,play=1,whats=[],titles=[],previews=[],whos=[],threadids=[],postids=[],userids=[],spyids=[],forumids=[],forumnames=[],highestid=0,fadetime=250,pushtime=1500,fadetime_end=1500,pushtime_end=4E3,initalfill_flag=0,thread=/t\=(\d+)/.exec(window.location.href);function play_pause(){var b=[phrase_click_to_continue,phrase_click_to_pause];play=Math.abs(1-play);$("#play_pause").html(b[play])}
function getXML(){var b=highestid>0?"do=feed&last="+highestid:"do=feed";thread&&(b+="&t="+thread[1]);document.getElementById("subscribed_flag").checked&&(b+="&subscribed=1");b=b+"&r="+Math.random();$.ajax({url:"spy.php?do=feed",data:SESSIONURL+"securitytoken="+SECURITYTOKEN+"&"+b,type:"POST",success:processXML})}
function processXML(b,c,d){var e,a;try{e=d.responseXML.getElementsByTagName("events")[0],a=e.getElementsByTagName("event")}catch(f){setTimeout("getXML()",3E4);return}if(a.length>0){for(i=0;i<a.length;i++){try{whats[i]=a[i].getElementsByTagName("what")[0].firstChild.nodeValue}catch(k){whats[i]="Who Knows"}try{titles[i]=a[i].getElementsByTagName("title")[0].firstChild.nodeValue}catch(g){titles[i]=""}try{previews[i]=a[i].getElementsByTagName("preview")[0].firstChild.nodeValue}catch(h){previews[i]=""}try{whos[i]=
a[i].getElementsByTagName("who")[0].firstChild.nodeValue}catch(l){whos[i]="Anonymous"}try{threadids[i]=a[i].getElementsByTagName("threadid")[0].firstChild.nodeValue}catch(m){threadids[i]=""}try{postids[i]=a[i].getElementsByTagName("postid")[0].firstChild.nodeValue}catch(j){postids[i]=""}try{userids[i]=a[i].getElementsByTagName("userid")[0].firstChild.nodeValue}catch(n){userids[i]=""}try{spyids[i]=a[i].getElementsByTagName("id")[0].firstChild.nodeValue}catch(o){spyids[i]=1}try{forumids[i]=a[i].getElementsByTagName("forumid")[0].firstChild.nodeValue}catch(p){forumids[i]=
1}try{forumnames[i]=a[i].getElementsByTagName("forumname")[0].firstChild.nodeValue}catch(q){forumnames[i]=1}}push()}else setTimeout("getXML()",5E3)}
function push(){if(play==0)setTimeout("push()",1E3);else{var b,c,d=b="",e,a=whats.pop();c=titles.pop();var f=previews.pop(),k=whos.pop();e=threadids.pop();var g=postids.pop(),h=userids.pop(),l=spyids.pop(),m=forumids.pop(),j=forumnames.pop();highestid=Math.max(parseInt(l),highestid);e=vB_PHP_Emulator.prototype.stripos(a,"Thread")?"showthread.php?"+SESSIONURL+"t="+e:"showthread.php?"+SESSIONURL+"p="+g+"#post"+g;c=a==phrase_new_user?'<span style="font-weight:bold">'+phrase_new_user_registration+"</span>":
c.length==0?"Unknown":'<a style="font-weight:bold" href="'+e+'">'+c+"</a>";f.length>0&&(c=c+"<br /><div>"+f+"</div>");h.length>0&&(b='by <a href="member.php?'+SESSIONURL+"u="+h+'">'+k+"</a>");parseInt(j.length)>0?(b.length>0&&(d="<br />"),d=d+'<a style="font-weight:bold" href="forumdisplay.php?'+SESSIONURL+"f="+m+'">'+j+"</a>"):d="";b='<div class="what">'+a+'</div><div class="who">'+b+d+'</div><div class="clip">'+c+"</div>";$("#row1").hide();for(i=spymax-1;i>=1;i--)$("#row"+i).html()!=""&&($("#row"+
(i+1)).html($("#row"+i).html()),$("#row"+(i+1)).css("display",""));$("#row1").html(b);$("#row1").slideDown(fadetime);whats.length>0?setTimeout("push()",pushtime):(fadetime=fadetime_end,pushtime=pushtime_end,setTimeout("getXML()",5E3))}}$(document).ready(getXML);

