var xmlHttp

function showUser(text,id1,id2,id3,id4,id5,id6,id7)
{
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
}
var url="ajax/"+text
url=url+".php?"
url=url+"id1="+id1
url=url+"&id2="+id2
url=url+"&id3="+id3
if(id4)
{
url=url+"&id4="+id4
}
if(id5)
{
url=url+"&id5="+id5
}
if(id6)
{
url=url+"&id6="+id6
}
if(id7)
{
url=url+"&id7="+id7
}
if(text!="addvote")
{
if(text=="download"||text=="addfovuser"||text=="tab"||id2==5||id2==6||id2==3||id2==4||id2==7)
{
xmlHttp.onreadystatechange=function(){stateChanged(text+id1)}; stateChanged();	
}else
{
xmlHttp.onreadystatechange=function(){stateChanged(text)}; stateChanged();	

}	
}else
{
xmlHttp.onreadystatechange=function(){stateChanged(text)}; stateChanged();	
	
}


xmlHttp.open("GET",url,true)	


if(xmlHttp.readyState < 4){
	if(text=="download"||text=="addfovuser"||text=="tab"||id2==5||id2==6||id2==3||id2==4||id2==7)
{
document.getElementById(text+id1).innerHTML = '<img src="images/waiting.gif" alt="اشغل نفسك بالاستغفار">';}else
{
document.getElementById(text).innerHTML = '<img src="images/waiting.gif" alt="اشغل نفسك بالاستغفار">';	
}

}

xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded; charset=windows-1256");
xmlHttp.send(null)	
	


}

function stateChanged(ddd)
{

      if(xmlHttp.readyState == 4){
 
 document.getElementById(ddd).innerHTML=xmlHttp.responseText;
    }
}

function GetXmlHttpObject()
{
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;
}
