1 function GetHTTPObject()
2 {
3 var xmlhttp;
4
5 /*@cc_on
6 @if (@_jscript_version >= 5)
7 {
8 try
9 {
10 xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
11 }
12 catch (e)
13 {
14 try
15 {
16 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
17 }
18 catch (E)
19 {
20 xmlhttp = false;
21 }
22 }
23 }
24 @else
25 xmlhttp = false;
26 @end @*/
27
28 if (!xmlhttp && typeof XMLHttpRequest != 'undefined')
29 {
30 try
31 {
32 xmlhttp = new XMLHttpRequest();
33 }
34 catch (e)
35 {
36 xmlhttp = false;
37 }
38 }
39
40 return xmlhttp;
41 }