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('meaDecRight'))
		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('meaDecRight').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('meaDecRight').innerHTML = xhr.responseText;
     }
    }
//alert('ca passe 1');

    xhr.open("POST","/pub/pub.php",true);
//alert('ca passe 2');
 xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
    rubrique = rubrique.replace(/\&rsquo/g,"\'");
    //alert("&var_quoi="+quoi);
    xhr.send("rubr="+rubrique+"&ann="+ann+"&var_qui="+qui+"&var_quoi="+quoi+"&var_quiquoi="+quiquoi+"&var_approche="+approche+"&var_themes="+themes+"&var_quoiquoi="+quoiquoi+"&var_motcle="+motcle);

    //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;
			document.getElementById('pub_bas').innerHTML = xhr.responseText;
		}
	}
rubrique = rubrique.replace(/\&rsquo/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)
}