function parseXML(dname) {
  try { //Internet Explorer
    xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
  }
  catch(e) {
    try { //Firefox, Mozilla, Opera, etc.
      xmlDoc=document.implementation.createDocument("","",null);
      } catch(e) {alert(e.message)}
  }
  try {
      xmlDoc.async=false;
      xmlDoc.load(dname);
      return(xmlDoc);
  }
  catch(e) {
    try { // Etc
      var xmlhttp = new window.XMLHttpRequest();
      xmlhttp.open("GET",dname,false);
      xmlhttp.send(null);
      xmlDoc = xmlhttp.responseXML.documentElement;
      return(xmlDoc);
    } catch(e) {alert(e.message)}
  }
  return null;
}
