function init_pub_home(ann) {
	if(document.getElementById('pub_droit'))
		setTimeout('pub_droit("'+ann+'")',100);
	if(document.getElementById('pub_gauche'))
		setTimeout('pub_gauche("'+ann+'")',100);
	if(document.getElementById('pub_bas'))
		setTimeout('pub_bas("'+ann+'")',100);
}

function init_pub_resultats(ann) {
	if(document.getElementById('meaDecRight'))
		setTimeout('affiche_pub("'+ann+'")',100);
	if(document.getElementById('pub_ban')) 
		setTimeout('affiche_pub_ban("'+ann+'")',100);/**/
}

function pub_droit(ann)
{
	var xhr = null;
	if(window.XMLHttpRequest)xhr = new XMLHttpRequest(); 
	else if(window.ActiveXObject)
	  { 
	  try{
		 xhr = new ActiveXObject("Msxml2.XMLHTTP");
		 } catch (e) 
		 {
		 xhr = new ActiveXObject("Microsoft.XMLHTTP");
		 }
	  }
	else 
	  {
	  alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest..."); 
	  xhr = false; 
	  } 
	xhr.onreadystatechange = function()
		{
		 if(xhr.readyState == 4 && xhr.status == 200)
		 {
			
		 document.getElementById('pub_droit').innerHTML = xhr.responseText;
		 }
		}
	xhr.open("POST","./pub/pub_droit.php",true);
	xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	xhr.send("ann="+ann); 
	//setTimeout('pub_droit()',5000) 
}

function pub_gauche(ann)
{
	var xhr = null;
	if(window.XMLHttpRequest)xhr = new XMLHttpRequest(); 
	else if(window.ActiveXObject)
	  { 
	  try{
		 xhr = new ActiveXObject("Msxml2.XMLHTTP");
		 } catch (e) 
		 {
		 xhr = new ActiveXObject("Microsoft.XMLHTTP");
		 }
	  }
	else 
	  {
	  alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest..."); 
	  xhr = false; 
	  } 
	xhr.onreadystatechange = function()
		{
		 if(xhr.readyState == 4 && xhr.status == 200)
		 {
		 document.getElementById('pub_gauche').innerHTML = xhr.responseText;
		 }
		}
	xhr.open("POST","./pub/pub_gauche.php",true);
	xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	xhr.send("ann="+ann); 
	//setTimeout('pub_gauche()',5000)
	}
	
function pub_bas(ann)
{
	var xhr = null;
	if(window.XMLHttpRequest)xhr = new XMLHttpRequest(); 
	else if(window.ActiveXObject)
	  { 
	  try{
		 xhr = new ActiveXObject("Msxml2.XMLHTTP");
		 } catch (e) 
		 {
		 xhr = new ActiveXObject("Microsoft.XMLHTTP");
		 }
	  }
	else 
	  {
	  alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest..."); 
	  xhr = false; 
	  } 
	xhr.onreadystatechange = function()
		{
		 if(xhr.readyState == 4 && xhr.status == 200)
		 {
		 document.getElementById('pub_bas').innerHTML = xhr.responseText;
		 }
		}
	xhr.open("POST","./pub/pub_bas.php",true);
	xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	xhr.send("ann="+ann); 
	//setTimeout('pub_bas()',5000)
	}
	

function affiche_pub(ann)
{
	var xhr = null;
	if(window.XMLHttpRequest)xhr = new XMLHttpRequest(); 
	else if(window.ActiveXObject)
	  { 
	  try{
		 xhr = new ActiveXObject("Msxml2.XMLHTTP");
		 } catch (e) 
		 {
		 xhr = new ActiveXObject("Microsoft.XMLHTTP");
		 }
	  }
	else 
	  {
	  alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest..."); 
	  xhr = false; 
	  } 
xhr.onreadystatechange = function()
    {
     if(xhr.readyState == 4 && xhr.status == 200)
     {
		document.getElementById('zone_pub').innerHTML = xhr.responseText;
     }
    }
rubrique = rubrique.replace(/\'/g,"\'");
xhr.open("POST","./pub/pub.php",true);
xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
xhr.send("rubr="+rubrique+"&ann="+ann);
//setTimeout('affiche_pub()',5000)
}

function affiche_pub_ban(ann)
{
	var xhr = null;
	if(window.XMLHttpRequest)xhr = new XMLHttpRequest(); 
	else if(window.ActiveXObject)
	  { 
	  try{
		 xhr = new ActiveXObject("Msxml2.XMLHTTP");
		 } catch (e) 
		 {
		 xhr = new ActiveXObject("Microsoft.XMLHTTP");
		 }
	  }
	else 
	{
	alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest..."); 
	xhr = false; 
	} 
	xhr.onreadystatechange = function()
	{
		if(xhr.readyState == 4 && xhr.status == 200)
		{
			document.getElementById('pub_ban').innerHTML = xhr.responseText;
		}
	}
rubrique = rubrique.replace(/\'/g,"\'");
xhr.open("POST","./pub/pub_ban.php",true);
xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
xhr.send("rubr="+rubrique+"&ann="+ann);
//setTimeout('affiche_pub()',5000)
}
