function createRequestObject() // Requetes AJAX
{
    var http;
    if(window.XMLHttpRequest)
    { // Mozilla, Safari, ...
        http = new XMLHttpRequest();
    }
    else if(window.ActiveXObject)
    { // Internet Explorer
        http = new ActiveXObject("Microsoft.XMLHTTP");
    }
    return http;
}
function inscription()
{
    var mail=document.getElementById('mail').value;
	http = createRequestObject();
    http.open('get', 'http://miseajour.sunelis.com/inscription-NL.php?mail=' + mail, true);
    http.onreadystatechange = affichage2;
    http.send(null);
}
function affichage2()
{
    if(http.readyState == 4)
    {
        if(http.status == 200)
        {
        	if(http.responseText != 'null')
        	{
        		document.getElementById('inscription-NL').style.display = "none";
        		document.getElementById('inscriresult').innerHTML = http.responseText;
        	}
        }
    }
}
