﻿function create_XMLHttpRequest(fnc)
{
	var XMLhttpObject = null;

	try
	{
		XMLhttpObject = new XMLHttpRequest();
	}
	catch(e)
	{
		try
		{
			XMLhttpObject = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch(e)
		{
			try
			{
				XMLhttpObject = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch(e)
			{
				//alert('nullです。');
				return null;
			}
		}
	}

	//引数で指定された「関数名」をオブジェクトに紐付ける
	if (XMLhttpObject) XMLhttpObject.onreadystatechange = fnc;
	return XMLhttpObject;
}



