    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(37.409914, 140.377464);
        map.setCenter(center, 8);

	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(37.025338,140.907249);
        html = '<center><strong><a href="http://www8.plala.or.jp/ykhome/" target="_blank">ワイケーホーム</a></strong><br>いわき市郷ケ丘２丁目３５-５<br>0246-29-3759</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.893645,140.782597);
        html = '<center><strong><a href="http://www.908home.com" target="_blank">クレハ錦建設（株）</a></strong><br>いわき市錦町綾ノ町１６<br>0246-64-8185</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.945845,140.913205);
        html = '<center><strong>崎村工業</strong><br>いわき市小名浜字古湊１１７<br>0246-53-3993</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.965153,140.8518);
        html = '<center><strong><a href="http://www.e-house.co.jp/mk-matsumoto/" target="_blank">（有）エムケー松本建築</a></strong><br>いわき市泉ケ丘１-２-１８<br>0246-56-1939</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(37.854833,140.605156);
        html = '<center><strong><a href="http://www.e-house.co.jp/watanabe-koumuten/" target="_blank">（株）渡辺工務店</a></strong><br>伊達市梁川町小梁川２７-１<br>024-577-0409</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(37.561215,139.952966);
        html = '<center><strong>光和建材（株）</strong><br>会津若松市河東町東長原字長谷地１１７<br>0242-76-0701</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(37.376015,140.385996);
        html = '<center><strong><a href="http://www.e-house.co.jp/oohara-komuten/" target="_blank">（株）東京クリーン</a></strong><br>郡山市安積町日出山２-２１-１<br>024-942-0338</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(37.802757,140.92398);
        html = '<center><strong><a href="http://www.toyo-web.net/" target="_blank">（株）トーヨー建設</a></strong><br>相馬市中村１丁目２-３<br>0244-35-1111</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(37.032761,140.482972);
        html = '<center><strong><a href="http://www.njm-precut.co.jp/" target="_blank">中井住宅木販（株）</a></strong><br>東白川郡鮫川村大字赤坂西野字寅卯平３２-１<br>0247-49-3161</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.87233,140.422519);
        html = '<center><strong><a href="http://www.oshida-seizai.jp/" target="_blank">（株）押田製材所</a></strong><br>東白川郡矢祭町東舘字桃木町１５<br>0247-46-3138</center>';
        map.addOverlay(createMarker(point, html, icon));


                point = new GLatLng(37.618513,140.963081);
        html = '<center><strong><a href="http://www.e-house.co.jp/chiba-house/" target="_blank">チバハウス</a></strong><br>南相馬市原町区牛来字穴田４２-１<br>0244-22-8111</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(37.635505,140.939858);
        html = '<center><strong><a href="http://www.soma.or.jp/~irishome/" target="_blank">（株）アイリスホーム</a></strong><br>南相馬市原町区大木戸字金場１０-１<br>0244-24-4660</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(37.560112,140.508508);
        html = '<center><strong><a href="http://www.marusan-lumber.co.jp/" target="_blank">丸三木材（株）</a></strong><br>二本松市小浜字鳥居町２７-３<br>0243-55-2255</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(37.779412,140.465887);
        html = '<center><strong><a href="http://www.hot-living.com/" target="_blank">ほっとリビング</a></strong><br>福島市御山字中川原８４-１<br>024-525-0525</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(37.58083,139.656389);
        html = '<center><strong><a href="http://www.e-house.co.jp/watanabe-juuken/" target="_blank">（株）渡部住建</a></strong><br>耶麻郡西会津町野沢字諏訪西甲１０６１<br>0241-45-3526</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.928835, 140.831327);
        html = '<center><strong><a href="http://www.e-house.co.jp/act-style/" target="_blank">（有）アクト</a></strong><br>いわき市小浜町北ノ作３３-１４９<br>0246-75-1233</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(37.581513,140.122296);
        html = '<center><strong><a href="http://www.glife.co.jp/" target="_blank">（株）グリーンライフ</a></strong><br>耶麻郡猪苗代町字清水前２７４８-１<br>0242-72-1769</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(37.192853,139.670365);
        html = '<center><strong><a href="http://www.haganuma.co.jp/" target="_blank">（株）芳賀沼製作</a></strong><br>南会津郡南会津町針生字小坂４０-１<br>0241-64-2221</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.987906,140.895682);
        html = '<center><strong>前田工務店</strong><br>いわき市小名浜金成若宮４７<br>0246-58-5638</center>';
        map.addOverlay(createMarker(point, html, icon));


                point = new GLatLng(36.968197,140.905471);
        html = '<center><strong>カネハナ住材(株)</strong><br>いわき市小名浜岡小名字作前７-１<br>0246-54-4485</center>';
        map.addOverlay(createMarker(point, html, icon));
		
                point = new GLatLng(37.640678,139.855208);
        html = '<center><strong><a href="http://www.e-sdo.jp/" target="_blank">(株)杉原建築設計事務所</a></strong><br>喜多方市豊川町米室字二条川原１８６２－１０１<br>0241-22-2019</center>';
        map.addOverlay(createMarker(point, html, icon));
		
                point = new GLatLng(37.203067, 139.771057);
        html = '<center><strong>(株)田浦</strong><br>南会津郡南会津町田島字元八幡甲315-4<br>0241(61)1168</center>';
        map.addOverlay(createMarker(point, html, icon));		

                point = new GLatLng(37.596968,139.891617);
        html = '<center><strong>ヤマト建設</strong><br>喜多方市塩川町東栄町４丁目４番地１１号<br>0241(27)5233</center>';
        map.addOverlay(createMarker(point, html, icon));		

                point = new GLatLng(37.59496,139.890045);
        html = '<center><strong>（株）ナベヤ一重</strong><br>喜多方市塩川町新町１８４２番地<br>0241(27)2064</center>';
        map.addOverlay(createMarker(point, html, icon));		

                point = new GLatLng(37.049734,140.891703);
        html = '<center><strong>三田建設（株）</strong><br>いわき市平字菱川町5-7<br>0246(25)2555</center>';
        map.addOverlay(createMarker(point, html, icon));		

                point = new GLatLng(37.658303,139.914521);
        html = '<center><strong><a href="http://www.tsukahara-home.com/" target="_blank">（有）塚原ホーム</a></strong><br>喜多方市関柴町下柴字東住485-1<br>0241(22)4521</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);
            }
          }
        );
      }
    }
