function fnc_Location(url)
{
	location.href = url;
}


function fnc_Submit(url)
{
	document.fm.action = url;
	document.fm.submit();
}


/* ----------     ---------- */
function supporterszip(id)
{
	var zipcode = document.getElementById( id ).value;
	window.open( '../supporterszip.html?zipcode='+encodeURIComponent( zipcode ) , 'address_search', "width=800,height=500,location=no,menubar=no,toolbar=no,resizable=yes,scrollbars=yes" );
}

function set_supportersaddr( obj )
{
	var target = document.getElementById( 'SupporterAddress' );
	
	if( obj.zipcode.match( /[0-9]{5}00$/ ) )
	{
		target.value = obj.prefecture + obj.city;
	}
	else
	{
		target.value = obj.prefecture + obj.city + obj.town;
		if( obj.street ) target.value += obj.street ;
	}
	
	document.getElementById( 'SupporterZip' ).value = obj.zipcode.substr(0, 3) + '-' + obj.zipcode.substr(3);
}






/* ----------     ---------- */
function advisezip(id)
{
	var zipcode = document.getElementById( id ).value;
	window.open( '../advisezip.html?zipcode='+encodeURIComponent( zipcode ) , 'address_search', "width=800,height=500,location=no,menubar=no,toolbar=no,resizable=yes,scrollbars=yes" );
}

function set_adviseaddr( obj )
{
	var target = document.getElementById( 'ClientAddress' );
	
	if( obj.zipcode.match( /[0-9]{5}00$/ ) )
	{
		target.value = obj.prefecture + obj.city;
	}
	else
	{
		target.value = obj.prefecture + obj.city + obj.town;
		if( obj.street ) target.value += obj.street ;
	}
	
	document.getElementById( 'ClientZip' ).value = obj.zipcode.substr(0, 3) + '-' + obj.zipcode.substr(3);
}


/* ----------     ---------- */



