function getHTTPObject() {
    if (typeof XMLHttpRequest != 'undefined') {
        return new XMLHttpRequest();
    }
    try {
        return new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
        try {
            return new ActiveXObject("Microsoft.XMLHTTP");
        } catch (e) {}
    }
    return false;
}

function getElement(parent, name) {
  return parent.getElementsByTagName(name)[0];
}

function getValue(parent) {
  if (parent.childNodes.length > 0) {
    return parent.childNodes[0].nodeValue;
  } else {
    return "";
  }
}

function getElementValue(parent, name) {
  return getValue(getElement(parent, name));
}

function getAttribute(parent, name) {
  return parent.attributes.getNamedItem(name).value
}
