function XmlHttpRequestObj() { this.xmlhttp=false; this.status=true; try { this.xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { this.xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { this.xmlhttp=false; this.status=false; } } if (!this.xmlhttp && typeof XMLHttpRequest !='undefined') { try { this.xmlhttp=new XMLHttpRequest(); this.status=true; } catch (e) { this.xmlhttp=false; this.status=false; } } this.abort=function abort() { this.xmlhttp.abort(); } this.checkObj=function checkObj() { if (this.status==false) { return false; } else { return true; } } this.close=function close() { this.xmlhttp.close(); } this.open=function open(method, url) { if (this.open.arguments.length==5) this.xmlhttp.open(method, url, this.open.arguments[2], this.open.arguments[3], this.open.arguments[4]); if (this.open.arguments.length==4) this.xmlhttp.open(method, url, this.open.arguments[2], this.open.arguments[3]); if (this.open.arguments.length==3) this.xmlhttp.open(method, url, this.open.arguments[2]); if (this.open.arguments.length==2) this.xmlhttp.open(method, url); } this.send=function send(contenu) { this.xmlhttp.send(contenu); } this.getAllHeaders=function getAllHeaders() { return this.xmlhttp.getAllResponseHeaders(); } this.getHeader=function getHeader(header) { return this.xmlhttp.getResponseHeader(header); } this.getParsingText=function getParsingText(_char) { tmp=this.xmlhttp.responseText; list=tmp.split(_char); return list; } this.getText=function getText() { return this.xmlhttp.responseText; } this.getReadyState=function getReadyState() { return this.xmlhttp.readyState; } this.getStatus=function getStatus() { return this.xmlhttp.status; } this.setHeader=function setHeader(header) { return this.xmlhttp.setRequestHeader(header); } this.xmlhttp.onreadystatechange=function() { } }