window.onload=LaunchFooter();

function LaunchFooter(){
	Int1=setInterval("Promo1Marquee()",15000);
//	window.onload=opacity('promo2ajax', 100, 0, 8000,"alert('wewe')");
}

function Promo1Marquee(){
	opacity('promo2ajax', 100, 0, 1000,"RefreshPromos(1)");
	Int2=setTimeout("Promo2Marquee()",15000);
	clearInterval(Int1);
	//Int1=setInterval("Promo1Marquee()",11000);
}

function Promo2Marquee(){
	Int1=setInterval("Promo1Marquee()",15000);
	opacity('promo3ajax', 100, 0, 1000,"RefreshPromos(2)");
	//Int1=setInterval("Promo1Marquee()",11000);
}


function RefreshPromos(Promo){
	if (Promo==1){
	//	changeOpac(100, "promo2ajax");
//		document.getElementById('promo2ajax').innerHTML="<center><img src='images/loader_green.gif' style='margin-top:80px;margin-left:24px'/></center>";
	}else if (Promo==2){
//		changeOpac(100, "promo3ajax");
//		document.getElementById('promo3ajax').innerHTML="<center><img src='images/loader_green.gif' style='margin-top:80px;margin-left:24px'/></center>";

	}
	
	var xmlhttp2 = null
	
	if (typeof window.ActiveXObject != 'undefined' )
	{
   		xmlhttp2 = new ActiveXObject("Microsoft.XMLHTTP");
	}	
	else
	{
   		xmlhttp2 = new XMLHttpRequest();
	}
	
		
	if(Promo==1){
		var str="scripts/footer.php?left";
	}else if (Promo==2){
		var str="scripts/footer.php?right";
	}
	
	xmlhttp2.open("GET",str,true);		
	xmlhttp2.onreadystatechange= function () {
		if (xmlhttp2.readyState==4) {
			if(xmlhttp2.status==200){
				if(Promo==1){
					document.getElementById('promo2ajax').innerHTML=xmlhttp2.responseText;
					//opacity("promo2ajax", 0, 100, 1000);

				}else if (Promo==2){
					document.getElementById('promo3ajax').innerHTML=xmlhttp2.responseText;
				//	opacity("promo3ajax", 0, 100, 1000);
				}		
			}
		}
	}
	xmlhttp2.send(null);
}

