/**
 * XML Parser
 * Adapted from http://developer.apple.com/internet/webcontent/xmlhttpreq.html
 */
 
function getHttpReq() {
  if(window.XMLHttpRequest) {
    try { 
      httpReq = new XMLHttpRequest();
    } catch(e) { return null; }
  } else if(window.ActiveXObject) {
    try {
      httpReq = new ActiveXObject("Microsoft.XMLDOM");
    } catch(e) {
      try {
        httpReq = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e) { return null; }
    }
  } else return null;
return httpReq;
}

function getXmlDoc(httpReq, filename) {
	var xmlDoc;
	httpReq.overrideMimeType('text/xml');
	httpReq.open("GET", filename, false /* sync */);
	httpReq.setRequestHeader("cache-control", "no-cache");
    httpReq.setRequestHeader("cache-control", "no-store");
	httpReq.send(null);
	xmlDoc = httpReq.responseXML;
	if (httpReq.status != 404 && httpReq.status!=403)
		return xmlDoc;
	else
		return null;
}