
/****************************************************************
* file: 	ajaxtoy.js
* author:	toy
* date:		3aug09
* re:		toys ajax lib
*
* rev history
* [toy 3aug09]		orig version
*****************************************************************/
function GetXmlHttpObject()
{
	var xmlHttp=null;
	var ieXmlHttpVersions = new Array();
	ieXmlHttpVersions[ieXmlHttpVersions.length] = "MSXML2.XMLHttp.7.0";
	ieXmlHttpVersions[ieXmlHttpVersions.length] = "MSXML2.XMLHttp.6.0";
	ieXmlHttpVersions[ieXmlHttpVersions.length] = "MSXML2.XMLHttp.5.0";
	ieXmlHttpVersions[ieXmlHttpVersions.length] = "MSXML2.XMLHttp.4.0";
	ieXmlHttpVersions[ieXmlHttpVersions.length] = "MSXML2.XMLHttp.3.0";
	ieXmlHttpVersions[ieXmlHttpVersions.length] = "MSXML2.XMLHttp";
	ieXmlHttpVersions[ieXmlHttpVersions.length] = "Microsoft.XMLHttp";

	// Firefox, Opera 8.0+, Safari
	try {
		xmlHttp=new XMLHttpRequest();
	}
	catch (e)
	{
		// Internet Explorer
		try {
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e) {
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return xmlHttp;
}
