/*
* <概要> : XMLHttpRequestを生成して
* 非同期イベントハンドラを設定する
*
* @param cbFunc 呼び出し元で実行するFunction名
*
* 使用方法
* 呼び出し元で
* var url = "xxxxxx.php";
* httpObj = createXMLHttpRequest(dispAnswer);
*	if (httpObj)
*	{
*		httpObj.open("POST", url, true);
*		// httpObj.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded ;charset:UTF-8');
*		httpObj.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
*		httpObj.send(sendData);
*	}
*
**/
function createXMLHttpRequest(cbFunc)
{
	var XMLhttpObject = null;
	try{
		XMLhttpObject = new XMLHttpRequest();	// firefox IE7 
	}catch(e){
		try{
			XMLhttpObject = new ActiveXObject("Msxml2.XMLHTTP"); // IE6
		}catch(e){
			try{
				XMLhttpObject = new ActiveXObject("Microsoft.XMLHTTP");	// IE6以前
			}catch(e){
				return null;
			}
		}
	}
	// 生成したオブジェクトにイベントを設定
	if (XMLhttpObject) XMLhttpObject.onreadystatechange = cbFunc;
	return XMLhttpObject;
}

// document.getElementById
function $(tagId)
{
	return document.getElementById(tagId);
}
