function makeDiags(callback, url)
{
	var xhr = getHTTPObject();
	var errors = 0;
	var dt = new Date();
	xhr.onreadystatechange = function() {
		if (xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0)) {
			callback(xhr.responseText);
		}
		else if (xhr.status != 200 && xhr.status != 0)
		{
			xhr.abort();
			var t_url;
			var dt = new Date();
			if (url.indexOf('?') >= 0)
				t_url = url + "&tmp=" + dt.getTime();
			else
				t_url = url + "?tmp=" + dt.getTime();

			if (errors < 10)
			{
				xhr.open("GET", t_url, true);
				//xhr.send(null);
				errors++;
			}
			else
			{
				alert("Une erreur s'est produite dans le script PHP...");
			}
		}
	};

	xhr.onerror = function() {
		alert('Erreur dans le processus AJAX');
	}

	var t_url;
	if (url.indexOf('?') >= 0)
		t_url = url + "&tmp=" + dt.getTime();
	else
		t_url = url + "?tmp=" + dt.getTime();
	xhr.open("GET", t_url, true);
	xhr.send(null);
}

function endDiags(xResponse) {
	try {
		eval(xResponse);
	}
	catch (error) {
		alert(xResponse);
	}
}