/*------------------------------------------------------------------------------
 ・E・┘好肇・屮献Д・
------------------------------------------------------------------------------*/
function createXMLHttpRequest( cbFunc ){

	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 ){
				return null;
			}
		}
	}
	if( XMLhttpObject )XMLhttpObject.onreadystatechange = cbFunc;
	return XMLhttpObject;

}
/*------------------------------------------------------------------------------
 非同・E命
------------------------------------------------------------------------------*/
function searchOnChange( ){

	var obj = document.frm;
	listcheck(obj);

	inex = obj.inex_flg.checked == true ? '&inex_flg=1' : '';
	httpObj = createXMLHttpRequest( displayDataCommandC );
	if( httpObj ){
		httpObj.open( "GET",
			"onchange.php?hidsyokusyu=" + obj.hidsyokusyu.value
			+ "&key=" + obj.key.value
			+ "&hidarea=" + encodeURIComponent(obj.hidarea.value)
			+ "&hidworkform=" + encodeURIComponent(obj.hidworkform.value)
			+ inex
			/* + "&condi_age=" + obj.condi_age.value */
		 , true );
		httpObj.send( null );
	}

}
/*------------------------------------------------------------------------------
 画面出力
------------------------------------------------------------------------------*/
function displayDataCommandC( ){

	var msg = '';
	if( httpObj.readyState == 4 && httpObj.status == 200 ){
		var num = httpObj.responseText;
		if( num == '0' ){
			msg = 'ヒットしませんでした。';
		}
		else {
			msg = num + '件ヒットしました。';
		}
		document.getElementById( 'hitcount' ).innerHTML = msg;
	}

}

