function codeAddressSpot (input_id, search_flag, form_name) {
	search_address = document.getElementById(input_id).value;
	if (typeof(geocoder) == "undefined") geocoder = new google.maps.Geocoder();
	if(search_flag){
		if (typeof(gLocalSearch) == "undefined") gLocalSearch = new GlocalSearch();
		gLocalSearch.setCenterPoint(map);
		gLocalSearch.setSearchCompleteCallback(null, function () {
			if (!gLocalSearch.results || (typeof(gLocalSearch.results[0]) == "undefined")){
				geocoder.geocode( { 'address': search_address}, function(results, status) {
					if (status == google.maps.GeocoderStatus.OK) {
						map.fitBounds(results[0].geometry.bounds);
					}
				});
				return;
			}
			var first = gLocalSearch.results[0];
			map.setCenter(new google.maps.LatLng(parseFloat(first.lat), parseFloat(first.lng)));
			map.setZoom(15);

			$("#"+form_name+"_map_lat").val(parseFloat(first.lat));
			$("#"+form_name+"_map_lng").val(parseFloat(first.lng));
			$("#"+form_name+"_map_zoom").val(map.getZoom());

			if(editmarker){
				editmarker.setMap(null);
				delete editmarker;
				editmarker = 0;
			}
			editmarker = new google.maps.Marker({position: map.getCenter(), map:map});
		});
		gLocalSearch.execute(search_address);
	}else{
		geocoder.geocode( { 'address': search_address}, function(results, status) {
			if (status == google.maps.GeocoderStatus.OK) {
				map.fitBounds(results[0].geometry.bounds);
			}
		});
	}
}


$(function(){
	//スクロールテキスト
	$("#marquee1").marquee();
});

