var xmlHttp;
var idd;

function showResultPJ(idnum)
{
idd=idnum;
xmlHttp=GetXmlHttpObjectPJ()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request");
 return;
 } 

var url="phpscripts/addplusJ.php";
url=url+"?q="+idnum
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChangedPJ ;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
} 

function stateChangedPJ() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 


 document.getElementById("TRJ"+idd).
 style.backgroundImage="url(site_images/tds/plus.png)";
 document.getElementById("pluJ"+idd).
 src="site_images/plus1.png";
 document.getElementById("pluJ"+idd).
 onclick="";
 
var strikk;
    if (xmlHttp.responseText>0){strikk="1";}
    if (xmlHttp.responseText>50){strikk="2";}
    if (xmlHttp.responseText>100){strikk="3";}
    if (xmlHttp.responseText>500){strikk="4";}
    if (xmlHttp.responseText>1000){strikk="5";}
 
document.getElementById("strJ"+idd).src="site_images/hits/"+strikk+".png";
document.getElementById("strJ"+idd).title="Hit count: "+xmlHttp.responseText;
 
 
 } 
}
function GetXmlHttpObjectPJ()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 // Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}