//v1.0.1
//copyright Nor and Thanks 2 choco for that function
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 arra = new Array();
 users = div.getElementsByTagName("a");
    for(i=1;i<users.length;i++){
     if(users[i].parentNode.className=="thin" && users[i].href.match(/showuser\=/i)){
      arra.push(users[i].href);
     }
    }
  for(x=0;x<span.length;x++){
   if(span[x].className=="normalname"){
    var zxline = "";
    if(findInArray(span[x].getElementsByTagName("a")[0].href,arra))
    {
     zxline = '<span style="color:green"><img src="http://i69.photobucket.com/albums/i79/Careno/Site%20Work/NewPM.gif" border="0" alt="User is online"></a></span>';
    }
    else
    {
     zxline = '<span style="color:red"><img src="http://i69.photobucket.com/albums/i79/Careno/Site%20Work/Members.gif" border="0" alt="User is offline"></a></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: " + zxline + "<br />Joined:");

    }
   }
  }

}
}
ajax.send("");
}
function findInArray(text,array) {
for(i in array) {
if(array[i]==text) return true;
}
return false;
}
