var qpage=0;
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;
}

function showBanner(bpage)
{ 
qpage=bpage;
xmlHttp2=GetXmlHttpObject();
if (xmlHttp2==null)
 {
 alert ("Browser does not support HTTP Request");
 return;
 }
var url="../theme/slicebanner.php";
url=url+"?bpage="+bpage+"&ilang=2";
url=url+"&sid="+Math.random();

xmlHttp2.onreadystatechange=stateChanged2 ;
xmlHttp2.open("GET",url,true);
xmlHttp2.send(null);
}



function stateChanged2() 
{ 
if (xmlHttp2.readyState==4 || xmlHttp2.readyState=="complete")
 { 
 document.getElementById("banner").innerHTML=xmlHttp2.responseText ;
 } 
 
}

function autoB(){
	
	if(qpage<5){
       window.setTimeout(function(){ autoB(qpage+1)},20000);
	   //alert(onid);
	   }else{
	   qpage=0;
	   window.setTimeout(function(){ autoB(qpage+1)},20000);
	   //alert(onid);
	   }
       //return;
		//setTimeout("showBanner(1)",5000);
		
		showBanner(qpage+1);
}
