var xmlHttp;
var int_i=0;

function showImage(section) {
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null) {
		alert ("Browser does not support HTTP Request");
		return;
	} 
	var url="../inc/bannerrot.php";
	url=url+"?banner="+int_i;
	url=url+"&section="+section;
	int_i++;
	//url=url+"&sid="+Math.random();
	if (xmlHttp) {
		xmlHttp.onreadystatechange=stateChanged;
		
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
	setTimeout("showImage('"+section+"')", 10000);
} 

function stateChanged() { 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { 
		document.getElementById("imgHolder").innerHTML=xmlHttp.responseText;
	} 
} 

function GetXmlHttpObject() { 
	var objXMLHttp=null;
	if (window.XMLHttpRequest) {
		objXMLHttp=new XMLHttpRequest();
	}
	else if (window.ActiveXObject) {
		try {
			objXMLHttp=new ActiveXObject("Msxml2.XMLHTTP");
		} catch(e) {
			try {
				objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) {
				objXMLHttp=null;
			}
		}
	}
	return objXMLHttp;
} 