//zip

var aczip = new Object();
var aczip2 = new Object();

aczip.$ = function(tagId){
	return document.getElementById(tagId);
}

aczip2.$ = function(tagId){
	return document.getElementById(tagId);
}

aczip.printzip = function(adress){
	aczip.$("adress").value = adress;
}

aczip2.printzip = function(adress){
	aczip2.$("send_adress").value = adress;
}

aczip.findZipCode = function(){
	if(aczip.$("zipCode").value == "") return;
	if(aczip.$("zipCode").value.length < 7) return;
	aczip.$("adress").value = "郵便番号から住所を検索中...";
	var call_result = document.createElement('script');
	call_result.src = "http://www.adachieve.com/zip/zipapi.cgi?code="+aczip.$("zipCode").value;
	call_result.charset = "UTF-8"; aczip.$ ("zipapi").appendChild(call_result);
}


aczip2.findZipCode = function(){
	if(aczip2.$("zipCode2").value == "") return;
	if(aczip2.$("zipCode2").value.length < 7) return;
	aczip2.$("send_adress").value = "郵便番号から住所を検索中...";
	var call_result = document.createElement('script');
	call_result.src = "http://www.adachieve.com/zip/zipapi.cgi?id=aczip2&code="+aczip2.$("zipCode2").value;
	call_result.charset = "UTF-8"; aczip2.$ ("zipapi2").appendChild(call_result);
}


