function createXMLHttpRequest() { var xmlHttpReq; if (window.XMLHttpRequest) { xmlHttpReq = new XMLHttpRequest(); xmlHttpReq.overrideMimeType('text/xml'); } else if (window.ActiveXObject) { xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP"); } return xmlHttpReq; }