//const BROWSER_STATUS_OK = 0; // When running locally const BROWSER_STATUS_OK = 200; // Header status code, request received OK const BROWSER_STATUS_NOTMODIFIED = 304; // Page has been cached class Ajax { // Get an XMLHttpRequest object so we can peform AJAX requests. static GetRequest(): XMLHttpRequest { if (typeof XMLHttpRequest != undefined) { // This is the standard class supported by all browsers // including IE7 return new XMLHttpRequest(); } else if ("ActiveXObject" in window) { var version = new Array("MSXML2.XMLHttp.6.0", "MSXML2.XMLHttp.3.0"); for (var i = 0; i < version.length; i++) { try { return new ActiveXObject(version[i]); } catch (Error) { } } } throw new Error("XMLHttp object could not be created"); } }