    var map = null;
    var geocoder = null;
    var marker2 = null;
    
    function createMarker(point, html, icon){
      var marker = new GMarker(point, icon);
      GEvent.addListener(marker, "mouseover", function() {
        marker.openInfoWindowHtml(html);
      });
      return marker;
    }

    function load() {
      if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("map"));
        map.addControl(new GLargeMapControl());
        map.addControl(new GScaleControl());
        map.addControl(new GMapTypeControl());
	map.enableContinuousZoom();
	map.enableDoubleClickZoom();

        // GClientGeocoderを初期化
        geocoder = new GClientGeocoder();
        
        var center = new GLatLng(34.321464, 133.95406);
        map.setCenter(center, 10);

	icon = new GIcon();
	icon.image = '../img/marker.gif';
	icon.iconSize = new GSize( 25, 33 );	// 画像の大きさ
	icon.shadow = '../img/marker_shadow.png';
	icon.shadowSize = new GSize( 45, 29 );	// 影画像の大きさ
	icon.iconAnchor = new GPoint( 12, 32 );	// 画像の「基準点」
	icon.infoWindowAnchor = new GPoint( 12, 32 );	// 情報ウィンドウの基準点	
        var html; 
        var point;
                point = new GLatLng(34.247844,133.93006);
        html = '<center><strong><a href="http://www.e-house.co.jp/suki/" target="_blank">主基産業（株）</a></strong><br>綾歌郡綾川町萱原７９１-１<br>087-876-1151</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(34.291353,133.814615);
        html = '<center><strong><a href="http://www.honesty-homes.co.jp/" target="_blank">（株）大澤工務店</a></strong><br>丸亀市土器町東３－５３１<br>0877-58-1228</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(34.451507,134.001053);
        html = '<center><strong><a href="http://www.e-house.co.jp/oyama/" target="_blank">（有）大山建設</a></strong><br>香川郡直島町４７７７-２３<br>087-892-4313</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(34.317401,134.08147);
        html = '<center><strong><a href="http://www.e-house.co.jp/daiwa-kenzai/" target="_blank">（株）大和建材</a></strong><br>高松市元山町６６８-３<br>087-867-3647</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(34.337816,134.108774);
        html = '<center><strong><a href="http://www.e-house.co.jp/takahashi-mokuzai/" target="_blank">高橋木材（株）</a></strong><br>高松市高松町２５０２<br>087-843-0550</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(34.309016,134.058733);
        html = '<center><strong><a href="http://www.atom47.com/" target="_blank">（株）アトムアソート</a></strong><br>高松市伏石町２１１９-５<br>087-815-3777</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(34.298436,133.844909);
        html = '<center><strong><a href="http://www.fukeproduct.co.jp/" target="_blank">（株）フケプロダクト</a></strong><br>坂出市川津町３８２９-２<br>0877-44-2233</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(34.215441,133.679005);
        html = '<center><strong>（株）喜田建材</strong><br>三豊市詫間町詫間８９０-１<br>0875-83-3669</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(34.124106,133.677569);
        html = '<center><strong><a href="http://www.k3kyo.co.jp/" target="_blank">(株)三協</a></strong><br>観音寺市植田町１７１３－１<br>0875-23-2388</center>';
        map.addOverlay(createMarker(point, html, icon));
		
                point = new GLatLng(34.302685,133.813862);
        html = '<center><strong><a href="http://www.taiyouh.co.jp/" target="_blank">(株)大洋ハウジング</a></strong><br>丸亀市土器町東９丁目１２２-１５-１F<br>0877-43-2033</center>';
        map.addOverlay(createMarker(point, html, icon));
		
                point = new GLatLng(34.268144,133.772898);
        html = '<center><strong><a href="http://www.arigato-yamakura.com/" target="_blank">(株)山倉建設</a></strong><br>仲多度郡多度津町南鴨４－３<br>0877-32-6600</center>';
        map.addOverlay(createMarker(point, html, icon));		


              }
    }
    
    function showAddress(address) {
      if (geocoder) {
        geocoder.getLatLng(
          address,
          function(point) {
            if (!point) {
              alert(address + " not found");
            } else {
              if(marker2 != null){
	              map.removeOverlay(marker2);
              }
				var icon = new GIcon();
				icon.image = "../img/aicon_map.gif";  //アイコン画
				icon.shadow = "../img/aicon_map.gif"; //影の画
				icon.iconSize = new GSize(36, 36);    //アイコンサイズ
				icon.shadowSize = new GSize(36, 36); //影のサイズ
				icon.iconAnchor = new GPoint(18, 36);
				icon.infoWindowAnchor = new GPoint(18, 0);
				var markeropts = new Object();
				markeropts.icon = icon;
              
              map.setCenter(point, 13);
              marker2 = new GMarker(point, icon);
              map.addOverlay(marker2);
              marker2.openInfoWindowHtml(address);
            }
          }
        );
      }
    }
