<!--
function makeRequest(url,type,nomform) {
    var http_request = false;
    if (window.XMLHttpRequest) { // Mozilla, Safari,...
        http_request = new XMLHttpRequest();
        if (http_request.overrideMimeType) {
            http_request.overrideMimeType('text/xml');
        // Voir la note ci-dessous � propos de cette ligne
        }
    } else if (window.ActiveXObject) { // IE
        try {
            http_request = new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {
            try {
                http_request = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {}
        }
    }
    if (!http_request) {
        alert('Abandon :( Impossible de cr�er une instance XMLHTTP');
        return false;
    }
    //alert(annonce)
    switch(type)
    {
        case "reponsecaptcha":
            http_request.onreadystatechange = function() {
                alertContents(http_request,"reponsecaptcha",nomform);
            };
            break;
        case "livreor":
            http_request.onreadystatechange = function() {
                alertContents(http_request,"reponsecaptcha",nomform);
            };
            break;
        case "newsletter":
            http_request.onreadystatechange = function() {
                alertContents(http_request,"reponsenewsletter",nomform);
            };
            break;
        default:
            http_request.onreadystatechange = function() {
                alertContents(http_request,"reponseenvoyerami","");
            };
            break;
    }
			 
    http_request.open('GET', url, true);
    http_request.send(null);
}
    
function attendre(nomdiv,duree) {
    string="efface('"+nomdiv+"')";
    a=setTimeout(string,duree)
}
function efface(nomdiv) {
	
    var nombre = document.getElementById(nomdiv).childNodes.length;
    if (nombre>0) {
        var noeud=document.getElementById(nomdiv).firstChild;
        disparu = document.getElementById(nomdiv).removeChild(noeud);
    }
		
    if (document.getElementById("envoyeramiemail")) {
        document.getElementById("envoyeramimonemail").value="";
        document.getElementById("envoyeramisonemail").value="";
        masquepopUp('popUp1')
    }
    if (document.getElementById("envoyeremailnewsletter")) {
        document.getElementById("envoyeremailnewsletter").value="";
        masquepopUp('popUp2')
    }
}
	
	
function alertContents(http_request,nomdiv,nomform) {
    okemail=false;
    if (http_request.readyState == 4) {
        if (http_request.status == 200) {
            //alert(http_request.responseText);
            //eval(http_request.responseText);
            var tmp = http_request.responseText;
            if(typeof(tmp) != "undefined") {
                eval(tmp);
            }
            if ((ok=="vrai")||(ok=="faux"))
            {
                var nombre;
                var noeud;
                nombre = document.getElementById(nomdiv).childNodes.length;
                    if (nombre>0) {
                        noeud=document.getElementById(nomdiv).firstChild;
                        disparu = document.getElementById(nomdiv).removeChild(noeud);
                    }
                if (ok=="faux")
                {
                    if (reponse=="")
                        reponse="Pb : Pas envoyé";
            	
                    document.getElementById(nomdiv).appendChild(document.createTextNode(reponse));
                }
                else
                {		
                    if(nomdiv=="reponsecaptcha")
                    {
                        document.forms[nomform].submit();
                    }
                    else
                    {
                        reponse="Envoyé";
                        document.getElementById(nomdiv).appendChild(document.createTextNode(reponse));
                        attendre(nomdiv,3000);
                    }
                }
            }
        } else {
            alert('Un problème est survenu avec la requête.');
        }
    }	
    return ok;
}
-->