function new_xmlhttp () {
  var xmlhttp = false;

  try {
    xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
  } catch (e) {
    try {
      xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    } catch (E) {
      xmlhttp = false;
    }
  }

  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
    xmlhttp = new XMLHttpRequest();
  }

  return xmlhttp;
}

function xml_http_boolean (fileurl, booltagname) {
  var xmlhttp = new_xmlhttp();

  var xml_bool = true;

  if (xmlhttp) {
    xmlhttp.open("GET", fileurl, true);
    xmlhttp.onreadystatechange=function() {
      if (xmlhttp.readyState == 4) {
        try {
          var xml = xmlhttp.responseXML;
          var nodes = xml.getElementsByTagName("opt");
          if (nodes.length) {
            var value = nodes[0].getAttribute(booltagname);
            if (value == "1") xml_bool = true;
          }
        } catch (myError) {
          alert("Det oppstod en feil:\n\n" + myError);
        }
      }
    }

    xmlhttp.send(null)
  }

  else {
    alert("Could not create XMLHTTP object.");
  }

  return xml_bool;
}

