// JavaScript Document for XML Version check
function createDOMDocument()
{
  var dom = null;
  var msxmlNames = [ 
									  "MSXML3.DOMDocument",
									  "MSXML2.DOMDocument",
									  "MSXML2.DOMDocument.1.0",
									  "MSXML2.DOMDocument.2.0",
									  "MSXML2.DOMDocument.2.5",
									  "MSXML2.DOMDocument.2.6",
									  "MSXML2.DOMDocument.3.0", 
	                                  "MSXML2.DOMDocument.4.0",
	                                  "MSXML2.DOMDocument.5.0",
	                                  "MSXML.DOMDocument"];


  for (var i=0;i < msxmlNames.length; i++) 
  {
      try {
         dom = new ActiveXObject(msxmlNames[i]);
         break;
	     } 
       catch (e){ 
          continue;
       }
  }
  if (dom == null)  {
     alert ("ESM could not find MSXML installed on this system.\n MSXML is required for proper functioning of ESM.");
  }
  return dom; 
}

function createXMLHTTP()
{

	 
  var xmlHttp = null;
  var msHttpNames = [	"MSXML3.XMLHTTP",
										 "MSXML2.XMLHTTP",
										 "MSXML2.XMLHTTP.1.0",
										 "MSXML2.XMLHTTP.2.0",
										 "MSXML2.XMLHTTP.2.5",
										 "MSXML2.XMLHTTP.2.6",
										 "MSXML2.XMLHTTP.3.0",
	                                     "MSXML2.XMLHTTP.4.0",
	                                     "MSXML2.XMLHTTP.5.0",
										 "Microsoft.XMLHTTP"];

  
  for (var i=0;i < msHttpNames.length; i++) 
  {
      try {
         xmlHttp = new ActiveXObject(msHttpNames[i]);
         break;
	     } 
       catch (e){ 
          continue;
       }
  }
  if (xmlHttp == null)  {
     alert ("ESM could not find MSXML.XMLHTTP installed on this system.\n MSXML.XMLHTTP is required for proper functioning of ESM.");
  }
  return xmlHttp; 
}
