function xhr (width,height)
{
	var xhr_object = null; 
	if(window.XMLHttpRequest) // Firefox 
	{
		xhr_object = new XMLHttpRequest();
	}
	else
	{
		if(window.ActiveXObject) // Internet Explorer
		{
			xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
		}
		else // XMLHttpRequest non supporté par le navigateur 
		{ 
			alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");
			return;
		}
	}
	xhr_object.open("GET", "modules/stats/req.php?largeur="+width+"&hauteur="+height, true); 
	 
	xhr_object.onreadystatechange = function() { 
	   if(xhr_object.readyState == 4) alert(xhr_object.responseText); 
	} 
	 
	xhr_object.send(null); 
}
function togglevisibility(id) 
{
	var e = document.getElementById(id);
	if(e.style.display == 'block')
	e.style.display = 'none';
	else
	e.style.display = 'block';
}
function compter_char(textarea_name,indic) 
{
	var max_char=500;
	var txt=textarea_name.value;
	var nb_char=txt.length;
	if (nb_char>max_char) { 
		alert("Pas plus de "+max_char+" caractères dans ce champ");
		textarea_name.value=txt.substring(0,max_char);
		nb_char=max_char;
	}
	indic.value=nb_char;
}