/*Initializes the request object to do http requests.*/
function getXMLHttpRequest() {
	var xmlhttp = false;
	try {
	  // Firefox, Opera 8.0+, Safari    
	  xmlhttp = new XMLHttpRequest();    
	} catch (e) {
	  // Internet Explorer    
	  try {
	    xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	  } catch (e) {     
	    try {
	      xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	    } catch (e) {
	      alert("Your browser does not support AJAX!");        
	      xmlhttp = false;        
	    }      
	  }    
	}
	return xmlhttp;
}

/*Initializes the xml object to do xml parsing.*/
function getXMLDOM() {
	var xmlDoc = null;
	if (document.implementation && document.implementation.createDocument) {
		xmlDoc = document.implementation.createDocument("", "", null);
	}
	else if (window.ActiveXObject) {
		xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
 	} else {
		alert('Your browser can\'t handle XML?!');
		return;
	}
	
	return xmlDoc;
}
