/******************************************************************
This is a version I think Andy wrote.
******************************************************************/
function xmlhttp() {

	try {
		// Mozilla / Safari
		this.xhttp = new XMLHttpRequest();
		this.myobject = "XMLHttpRequest";
		this.success = true;
	} catch (e) {
		// Explorer
		var ie_versions = new Array(
			'MSXML2.XMLHTTP.5.0',
			'MSXML2.XMLHTTP.4.0',
			'MSXML2.XMLHTTP.3.0',
			'MSXML2.XMLHTTP',
			'Microsoft.XMLHTTP'
			);
		this.success = false;
		for (var i=0;i < ie_versions.length && !this.success; i++) {
			try {
				this.xhttp = new ActiveXObject(ie_versions[i]);
				this.myobject = ie_versions[i];
				this.success = true;
			} catch (e) {

			}
		}
	}

	if (this.success) {
		return this.xhttp;
	}
	else {
		return false;
	}

}


/******************************************************************
2007-03-25 jnn
This is a version I found at 
	http://www.openjs.com/scripts/examples/ajax_using_post.php
Not sure if one is better than the other. Trying them out...
******************************************************************/


function getHTTPObject() {	var http = false;	//Use IE's ActiveX items to load the file.	if(typeof ActiveXObject != 'undefined') {		try {http = new ActiveXObject("Msxml2.XMLHTTP");}		catch (e) {			try {http = new ActiveXObject("Microsoft.XMLHTTP");}			catch (E) {http = false;}		}	//If ActiveX is not available, use the XMLHttpRequest of Firefox/Mozilla etc. to load the document.	} else if (XMLHttpRequest) {		try {http = new XMLHttpRequest();}		catch (e) {http = false;}	}	return http;}