XHRfactories=[function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}];XHRfactory=null;function createXHR(){if(XHRfactory!==null){return XHRfactory()}for(var i=0;i<XHRfactories.length;i++){try{var factory=XHRfactories[i];var request=factory();if(request!==null){XHRfactory=factory;return request}}catch(e){continue}}XHRfactory=function(){throw new Error("XMLHttpRequest not supported");};XHRfactory()}function Ajax(url,div,content){var xhr=createXHR();xhr.onreadystatechange=function(){document.getElementById(div).innerHTML="<img src='notation/images/working.gif'><br/>Attente du serveur...";if(xhr.readyState==4){if(xhr.status==0){document.getElementById(div).innerHTML="Erreur : "+xhr.status+" - "+xhr.statusText}else if(xhr.status==200){document.getElementById(div).innerHTML=xhr.responseText}else{document.getElementById(div).innerHTML="Erreur : statut retourné : "+xhr.status+" - "+xhr.statusText}}};xhr.open("POST",url,true);xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xhr.send(content)}
