/*
 * JavaScript library for loading XML documents in index.jsp
 *
 * Usage:
 * In the <html><head> of an HTML document that embeds a Laszlo application,
 * add this line:
 *   <script src="{$lps}/xml.js" language="JavaScript" type="text/javascript"/>
 */

var loginStringsXMLDoc;

function loadXML(xmlFile) { 
	var xmlhttp;
	var xmlDoc;
	
	if (window.ActiveXObject) {
		loginStringsXMLDoc = new ActiveXObject("Microsoft.XMLDOM");

		loginStringsXMLDoc.async = "false"; 
		loginStringsXMLDoc.onreadystatechange = verify; 
		loginStringsXMLDoc.load(xmlFile);
		xmlDoc = loginStringsXMLDoc.documentElement;
		return xmlDoc;
	} else if (window.XMLHttpRequest) {
		loginStringsXMLDoc = document.implementation.createDocument("","",null);
		xmlhttp = new XMLHttpRequest();
  		xmlhttp.open("GET", xmlFile, false);
  		xmlhttp.send(null);

  		xmlDoc = xmlhttp.responseXML;
		return xmlDoc;
	}
}
	  	
function verify() { 
	if (loginStringsXMLDoc.readyState != 4){ 
		return false;
	}
}