﻿// JScript File

try //Internet Explorer
  {
 var xmlDoc=new ActiveXObject("Microsoft.XMLHTTP");
  }
catch(e)
  {
  try //Firefox, Mozilla, Opera, etc.
    {
  var  xmlDoc=new XMLHttpRequest();
    }
  catch(e) {alert(e.message)}
  }
 
function loadXML(xmlFile) 
{ 
 xmlDoc.async="false"; 
 xmlDoc.onreadystatechange=verify; 
 xmlDoc.load(xmlFile); 
 xmlObj=xmlDoc.documentElement;

}
function verify() 
{ 
 // 0 Object is not initialized 
 // 1 Loading object is loading data 
 // 2 Loaded object has loaded data 
 // 3 Data from object can be worked with 
 // 4 Object completely initialized 
 if (xmlDoc.readyState != 4) 
 { 
   return false; 
 } 
}



function loadXMLDoc(dname) 
{
  if(document.implementation && document.implementation.createDocument)
	{
    //do it the w3c way
		xmlDoc=document.implementation.createDocument("","",null);
  }
  else
	{
    //do it the ie way
		xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
  }
  xmlDoc.async=false;
  xmlDoc.load(dname);
  return(xmlDoc);
}




