function loadXMLDoc(dname) 
{
try //IE6
  {
  xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
  }
catch(e)
  {
  try //IE7
    {
    xmlDoc=new ActiveXObject("MSXML2.XMLHTTP");
    }
  catch(e)
    {
    try //Firefox, Mozilla, Opera, etc.
      {
      xmlDoc=document.implementation.createDocument("","",null);
      }
    catch(e) {alert("Browser error: " + e.message)}
    }
  }
try 
  {
  xmlDoc.async=false;
  xmlDoc.load(dname);	
  return(xmlDoc);
  }
catch(e)
  {
  try
    {
    var xmlhttp = new window.XMLHttpRequest();
    xmlhttp.open("GET", dname, false);
    xmlhttp.send(null);
    var xmlDoc = xmlhttp.responseXML.documentElement;
    return(xmlDoc);
    }
  catch(e) {"Error : " + alert(e.message)}
return(null);
  }
}

/*
var xmlDoc;
function loadXMLDoc(url)
{
xmlDoc=null;
if (window.XMLHttpRequest)
  {// code for IE7, Firefox, Opera, etc.
  xmlDoc=new XMLHttpRequest();
  }
else if (window.ActiveXObject)
  {// code for IE6, IE5
  xmlDoc=new ActiveXObject("Microsoft.XMLHTTP");
  }
if (xmlDoc!=null)
  {
  xmlDoc.onreadystatechange=state_Change;
  xmlDoc.open("GET",url,true);
  return(xmlDoc);
  xmlDoc.send(null);
  }
else
  {
  alert("Your browser does not support XMLHTTP.");
  }
}

function state_Change()
{
if (xmlDoc.readyState==4)
  {// 4 = "loaded"
  if (xmlDoc.status==200)
    {// 200 = "OK"
    alert(xmlDoc.clue[0]);
    }
  else
    {
    alert("Problem retrieving XML data:" + xmlDoc.statusText);
    }
  }
}
*/