//global var
var ajaxObject;

function createAjaxObj(){
  var httprequest=false
  if (window.XMLHttpRequest) { // if Mozilla, Safari etc
    httprequest=new XMLHttpRequest()
    if (httprequest.overrideMimeType)
      httprequest.overrideMimeType('text/xml');
   }
   else if (window.ActiveXObject) { // if IE
     try {
       httprequest=new ActiveXObject("Msxml2.XMLHTTP");
     }
     catch (e){
       try{
          httprequest=new ActiveXObject("Microsoft.XMLHTTP");
       }
       catch (e){}
     }
   }
   return httprequest
}
function getXMLNodes( node, tag ) {
//alert( "nodes: " + tag );
    var nodes = node.getElementsByTagName( tag );
    return nodes;
}
function getXMLNode( node, tag ) {
//alert( "node: " + tag );
    return node.getElementsByTagName( tag )[0];
}
function getXMLValue( node, tag ) {
//alert( "value: " + tag );
    xmlNode = getXMLNode( node, tag );
    if ( xmlNode != null && xmlNode.hasChildNodes() ) {
        result = xmlNode.firstChild.nodeValue;
    }
    else {
        result = "";
    }
    return result;
}

