function AjaxNews(valeur_entre)
{ 

spanNews= document.getElementById('LaNews');
spanNews.innerHTML="&nbsp;<br /><center>Chargement des actus en cours..<br /><img src='Images/loading10.gif'  border=0' /></center>";

var xhr; 

if (window.XMLHttpRequest || window.ActiveXObject) 
{
	if (window.ActiveXObject) 
	{
		try 
		{
			xhr = new ActiveXObject("Msxml2.XMLHTTP");
		} 
		catch(e) 
		{
			xhr = new ActiveXObject("Microsoft.XMLHTTP");
		}
	} 
	
	else 
	{
		xhr = new XMLHttpRequest(); 
	}
} 

else 
{
	alert("Votre navigateur ne supporte pas l'objet XMLHTTPRequest, vous ne pourrez pas consulter les news...");
	return null;
}

	 
xhr.onreadystatechange  = function()
{ 
if(xhr.readyState  == 4)
{
	if(xhr.status  == 200)
	{

		spanNews.innerHTML = xhr.responseText;
	
    }
}
}



var pageajax="Php/newsAjax.php?NumeroNews=" + valeur_entre
//alert(pageajax);
xhr.open("GET", pageajax,  true);
xhr.send(null); 

}

var xhr; 
function ChargeFond(Attribut)
{ 

$("#fond").fadeOut(2000);

spanFond= document.getElementById('fond');

if (window.XMLHttpRequest || window.ActiveXObject) 
{
	if (window.ActiveXObject) 
	{
		try 
		{
			xhr = new ActiveXObject("Msxml2.XMLHTTP");
		} 
		catch(e) 
		{
			xhr = new ActiveXObject("Microsoft.XMLHTTP");
		}
	} 
	
	else 
	{
		xhr = new XMLHttpRequest(); 
	}
} 

else 
{
	alert("Votre navigateur ne supporte pas l'objet XMLHTTPRequest, vous ne pourrez pas afficher le fond...");
	spanFond.innerHTML ="<img src='Photos/1/Tdm-gris.jpg' class='fond'/>";
	return null;
}

	 
xhr.onreadystatechange  = function()
{ 
	if(xhr.readyState  == 4)
	{

		if(Attribut==1)
		{
			setTimeout("affichePhoto()",1500);
		}
		if(Attribut==0)
		{
			affichePhoto();
		}
	}
}

var pageajax="Php/changeFond.php"
//alert(pageajax);
xhr.open("GET", pageajax,  true);
xhr.send(null); 

}
 
function affichePhoto()
{
	if(xhr.status  == 200)
	{
	$("#fond").fadeIn(2000);
	spanFond.innerHTML =xhr.responseText;
    }
}

