function getXmlHttp() {
var x =
[
function() { return new XMLHttpRequest(); },
function() { return new ActiveXObject("Msxml2.XMLHTTP"); },
function() { return new ActiveXObject("Microsoft.XMLHTTP"); }
];
for (var i = 0; i < x.length; i++)
{
try { var f = x[i]; var r = f(); if (r !== null) { return r; } }
catch(e) { continue; }
}
return null;
}
|