var xmlHttpShowBanner
var imgLoader='<BR ><img src="images/loader.gif" width="16" height="16" align="absmiddle" /> Loading... Please wait...';

function showBanner(str,pid)
{
if (str.length==0 && pid.length==0)
{ 
return
}
xmlHttpShowBanner=GetXmlHttpObjectBanner()
if (xmlHttpShowBanner==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url="php/showBanner.php"
id		=str
ids		=id
pid		=pid
pids		=pid
//document.getElementById("txtBanner").innerHTML=imgLoader
url=url+"?id="+id+"&pid="+pid
//alert(url);
url=url+"&stid="+Math.random()
xmlHttpShowBanner.onreadystatechange=stateChangedBanner 
xmlHttpShowBanner.open("GET",url,true)
xmlHttpShowBanner.send(null)
} 

function stateChangedBanner() 
{ 
	if (xmlHttpShowBanner.readyState==4 || xmlHttpShowBanner.readyState=="complete")
	{	
		//alert(xmlHttpShowBanner.responseText);
		document.getElementById("txtBanner").innerHTML=xmlHttpShowBanner.responseText
		setTimeout("Func(ids,pids)", 6000);
	} 
} 

function GetXmlHttpObjectBanner()
{ 
	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;
} 

function Func(id,pid)
{
	showBanner(id,pid);
}