function InitAjax() {
var agt = navigator.userAgent.toLowerCase();
var is_opera = (agt.indexOf("opera") != -1);
var is_ie = (agt.indexOf("msie") != -1) && document.all && !is_opera;
var is_ie5 = (agt.indexOf("msie 5") != -1) && document.all;
if (is_ie) {
var control = (is_ie5) ? "Microsoft.XMLHTTP" : "Msxml2.XMLHTTP";
try {
return new ActiveXObject(control);
} catch(e) {
alert("You need to enable active scripting and activeX controls");
DumpException(e);
}
} else {
return new XMLHttpRequest();
}
}
|