function createXMLHttp() {
	var xmlhttp;
	try {
		xmlhttp = new XMLHttpRequest();
	} catch(e) {
		try {
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch(e) {
			xmlhttp = null;
		}
	}

	return xmlhttp;
}

function newsletter_subscribe() {
	var xmlhttp = createXMLHttp();
	var mail = document.getElementById('mail').value;
	
	xmlhttp.onreadystatechange = function () {
		if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) {
			document.getElementById('form_message').innerHTML = xmlhttp.responseText;
		}
	};

	xmlhttp.open("GET", "newsletter.php?mail=" + mail);

	xmlhttp.send(null);
}