// Various functions and properties to take advantage of AJAX features
function xmlAttributes(oNode){
	var tAttributes={};
	if(oNode.attributes) {
		for (var i=0; i<oNode.attributes.length; ++i)		
			tAttributes[oNode.attributes.item(i).name]=oNode.attributes.item(i).value;
	}
	return tAttributes;
}

function xmlChildNodes(oParent,sChildName){
	var tNodes=[];
	var e=oParent.firstChild;
	while(e!=null){
		if(e.nodeName==sChildName) {
			tNodes.push(e);
		}
		e=e.nextSibling;
	}
	return tNodes;
}	

function AJAXRequest(xmlSRC, actionEvtHndler) {
	var xttpObj;
	if (window.XMLHttpRequest) { // Mozilla - based browser 
		xttpObj = new XMLHttpRequest(); 
		
		//hook the event handler
		xttpObj.onreadystatechange = actionEvtHndler;
		
		//prepare the call, http method=GET, false=asynchronous call	
		xttpObj.open("GET", xmlSRC, true);		
		
		//finally send the call
		xttpObj.send(null); 
		
	} else if (window.ActiveXObject) {  // to see if we are running in IE 
		
		xttpObj = new ActiveXObject("Msxml2.XMLHTTP");
		
		//hook the event handler
		xttpObj.onreadystatechange = actionEvtHndler;
	
		//prepare the call, http method=GET, false=asynchronous call	
		xttpObj.open("GET", xmlSRC, false);	
		
		//finally send the call			
		xttpObj.send();   
	}
	return xttpObj;
}