var xmlHttp

function CallAct(id,tp,slink)
{
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	if(tp=='gosub' && id!='none'){
		document.getElementById("fssubloc").innerHTML= '<img src=\"img/searchloading.gif\" width=\"80\" height=\"16\">' 
		var url = 'searchdspcat.php?tnid='+id+slink
	}
	if(url!=''){
		xmlHttp.onreadystatechange=function() { stateChanged(id,tp,slink) }
		xmlHttp.open("GET",url,true)
		xmlHttp.send(null)
	}
} 

function stateChanged(id,tp,slink) 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
	if(tp=='gosub'){
		document.getElementById("fssubloc").innerHTML= xmlHttp.responseText
		
	}
	
}
} 

function GetXmlHttpObject()
{ 
var objxmlHttp=null
if (window.XMLHttpRequest)
{
objxmlHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject)
{
objxmlHttp=new ActiveXObject("Microsoft.XMLHTTP")
}
return objxmlHttp
} 


