function getXhr()
{
	var xhr = null;
	
	if(window.XMLHttpRequest || window.ActiveXObject)
	{
		if(window.XMLHttpRequest)
			xhr = new XMLHttpRequest();
		else
		{
			try {
				xhr = new ActiveXObject('Msxml2.XMLHTTP');
			} catch(e) {
				xhr = new ActiveXObject('Microsoft.XMLHTTP');
			}
		}
	}
	else
		xhr = false;
	
	return xhr;
}

function signaler(id)
{
	var xhr = getXhr();
	
	if(!xhr)
		return;
	
	var idSignaler = document.getElementById('signaler');
	idSignaler.innerHTML = 'Veuillez patienter ...';
	
	xhr.onreadystatechange = function()
	{
		if(this.readyState == 4)
			idSignaler.innerHTML = this.responseText;
	};
	
	xhr.open('GET', 'http://www.antreflash.com/signaler.php?id=' + id, true);
	xhr.send(null);
}

function voter(id)
{
	var xhr = getXhr();
	
	if(!xhr)
		return;
	
	var idVote = document.getElementById('vote');
	idVote.innerHTML = 'Veuillez patienter ...';
	
	xhr.onreadystatechange = function()
	{
		if(this.readyState == 4)
			idVote.innerHTML = this.responseText;
	};
	
	xhr.open('GET', 'http://www.antreflash.com/voter.php?id=' + id, true);
	xhr.send(null);
}