/* Thispage creates an AJAX request object
* THis page is included by ohter pages that need to perform an XMLHttpRequest */

// Initialise the object
var ajax = false;

// Create the object based on what's supported
if (window.XMLHttpRequest) { // IE 7+, Mozilla, Safari, Firefox, Opera, most browsers
	ajax = new XMLHttpRequest();
}else if (window.ActiveXObject) { // Older IE borwsers
	// create type Msxml2.XMLHTTP if possible
		try {
			ajax = new ActiveXObject("Msxml2.XMLHTTP");
				} catch (e1) { // create the older one instead
					try {
						ajax = new ActiveXObject("Microsoft.XMLHTTP");
								} catch (e2) { }
				}
}
// Sned an alert if the boject wasn't created
if (!ajax) {
	alert('Could not create ajax object!');
}