<!--
//////////////////////////////////////////////
// ajax site search
//////////////////////////////////////////////
	function postQuery(dirpath){
		var obj = document.forms["first"];
		if(obj.elements["postcode_01"].value == "" || !(figureChecked(obj.elements["postcode_01"].value)) || !(figureChecked(obj.elements["postcode_02"].value))){
			alert("郵便番号が間違っています。");
		}
		else{
			obj.elements["postcode_01"].value = figureChecked(obj.elements["postcode_01"].value);
			obj.elements["postcode_02"].value = figureChecked(obj.elements["postcode_02"].value);
			var query = obj.elements["postcode_01"].value + obj.elements["postcode_02"].value;
			httpObj = createXMLHttpRequest();
			httpObj.onreadystatechange = getQuery;
			httpObj.open("GET","/assessment/commons/getpostcode.cgi?"+encodeURI(query),true);
			httpObj.send(null);
		}
		return false;
	}
	function getQuery(){
		if ((httpObj.readyState == 4) && (httpObj.status == 200)) {
			var obj = document.forms["first"];
			var getAddress = decodeURI(httpObj.responseText);
			var getAddressGroup = new Array();
			getAddressGroup = getAddress.split(",");
			if(getAddressGroup.length == 3){
				obj.elements["todouhuken"].value = getAddressGroup[0];
				obj.elements["town"].value = getAddressGroup[1];
				obj.elements["address"].value = getAddressGroup[2];
				obj.elements["todouhuken"].style.color='#000000';
				obj.elements["town"].style.color='#000000';
				obj.elements["address"].style.color='#000000';
			}
			else{
				alert("郵便番号が間違っています");
			}
		}
	}
	function createXMLHttp() {
		try {
			return new ActiveXObject ("Microsoft.XMLHTTP");
		}catch(e){
			try {
				return new XMLHttpRequest();
			}catch(e) {
				return null;
			}
		}
		return null;
	}
	function createXMLHttpRequest(){
		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;
				}
			}
		}
		return XMLhttpObject;
	}
//////////////////////////////////////////////
//-->