﻿if(location.href.match(/showtopic/i)){ajax=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest;ajax.open("GET","http://"+location.hostname+location.pathname+"?act=idx",true);ajax.onreadystatechange=function(){if(ajax.readyState==4){div=document.createElement("div");div.innerHTML=ajax.responseText;span=document.getElementsByTagName("span");var b=[];for(x=0;x<span.length;x++)if(span[x].className=="normalname"){users=div.getElementsByTagName("a");var a="";for(i=0;i<users.length;i++)if(users[i].href.match(/showuser/i)&&users[i].parentNode.className=="thin")b.push(users[i].innerHTML);else b.push("ERRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRROR");if(findInArray(span[x].getElementsByTagName("a")[0].innerHTML,b))a='<span style="color:yellow"><img src="http://www.postfix.ru/templates/subSilver/images/lang_russian/icon_online.png"></span>';else a='<span style="color:red"><img src="http://www.postfix.ru/templates/subSilver/images/lang_russian/icon_offline.png"></span>';details=span[x].parentNode.parentNode.parentNode.getElementsByTagName("tr")[1].getElementsByTagName("td")[0].getElementsByTagName("span")[0];if(details.innerHTML.match(/Joined\:/i))details.innerHTML=details.innerHTML.replace("Joined:","Status: "+a+"<br />Joined:")}}};ajax.send("")}function findInArray(b,a){for(i in a)if(a[i]==b)return true;return false}