var ajax = false; // initialize ajax object

if (window.XMLHttpRequest)
{
	ajax = new XMLHttpRequest; //Creates the ajax object IF user is using IE7, firefox, safari, etc.
}

else if (window.ActiveXObject) //If user is using IE6 or previous, attempt to create the ajax object.
{ 
	try //Try to make ajax object, if that fails, catch and try using Microsoft.XMLHTTP arg instead of Msxml12.XMLHTTP
	{
		ajax = new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch(e1)
	{
		try
		{
			ajax = new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch(e2) {}
	}
}
if (!ajax) document.write("Failed to create AJAX object. Are you using an esoteric browser?"); //If ajax variable is still false, alert user.
