    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(36.253133, 140.307656);
        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( 36.326172,140.308516);
        html = '<center><strong><a href="http://www.carpenters.jp/" target="_blank">米川建築(株)</a></strong><br>笠間市矢野下１４８７-６<br>0296-77-3318</center>';
        map.addOverlay(createMarker(point, html, icon));
		

                point = new GLatLng(36.119305,140.279328);
        html = '<center><strong><a href="http://www.e-house.co.jp/maekawa/" target="_blank">前川建築業</a></strong><br>かすみがうら市宍倉６１９６-１８８<br>029-897-0728</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.160616,140.087312);
        html = '<center><strong><a href="http://www.kikuchizaimokuten.com/" target="_blank">（有）菊池材木店</a></strong><br>つくば市大字君島８９３<br>0298-67-0847</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.13183,140.096656);
        html = '<center><strong><a href="http://www.sinoya.co.jp/" target="_blank">篠屋木材工業（株）</a></strong><br>つくば市大曽根２６６９-４<br>0298-64-2881</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(35.946682,140.314538);
        html = '<center><strong><a href="http://www.home-akai.com/" target="_blank">（有）赤井工務店</a></strong><br>稲敷市江戸崎甲５６０-１<br>029-892-2106</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(35.943823,140.45713);
        html = '<center><strong><a href="http://homepage2.nifty.com/kato-kmt/" target="_blank">加藤工務店</a></strong><br>稲敷市本新３６９<br>0299-78-2171</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.118567,139.79518);
        html = '<center><strong><a href="http://www.shinohara-sakai.co.jp/" target="_blank">（株）篠原工務店</a></strong><br>猿島郡境町松岡町７６-１<br>0280-87-6666</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.18618,139.941449);
        html = '<center><strong><a href="http://www.e-house.co.jp/yoshikawa-zaimokuten/" target="_blank">（有）吉川材木店</a></strong><br>下妻市長塚４６８-１<br>0296-44-2802</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(35.978434,140.154976);
        html = '<center><strong><a href="http://www.e-house.co.jp/mizushin-mokuzai/" target="_blank">（有）あすなろ</a></strong><br>牛久市柏田町１０６４-１<br>0298-72-5628</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.299645,139.879255);
        html = '<center><strong><a href="http://www.e-house.co.jp/endo-mokuzai/" target="_blank">（株）遠藤木材</a></strong><br>結城市大字結城２４３<br>0296-32-5135</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.000835,140.529613);
        html = '<center><strong><a href="http://www.e-house.co.jp/matsuzaki-material/" target="_blank">マツザキマテリアル（株）</a></strong><br>行方市矢幡１８８１-１２<br>0299-73-0131</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.362688,140.105078);
        html = '<center><strong><a href="http://www16.plala.or.jp/marukawa/" target="_blank">丸川木材（株）</a></strong><br>桜川市岩瀬２９８<br>0296-57-3661</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.365084,140.103259);
        html = '<center><strong><a href="http://www.e-house.co.jp/maruwa-kensetsu/" target="_blank">丸和建設（株）</a></strong><br>桜川市御領１-３４<br>0296-76-2771</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(35.945144,139.99392);
        html = '<center><strong><a href="http://www.wakiaiai-ie.com/" target="_blank">（株）万代　和木あいあいの家</a></strong><br>守谷市本町２４１-１<br>0297-20-6511</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.231484,140.329242);
        html = '<center><strong><a href="http://www.maekawa-f.com/" target="_blank">（株）前川林業</a></strong><br>小美玉市中野谷１１５-イ<br>0299-47-0131</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.223376,140.32157);
        html = '<center><strong>（有）斎藤建設</strong><br>小美玉市中野谷３２５<br>0299-49-1326</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.113566,139.976226);
        html = '<center><strong><a href="http://www.namai-zaimoku.com/" target="_blank">（株）生井</a></strong><br>常総市新石下３６６２<br>0297-42-0311</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.522894,140.570153);
        html = '<center><strong>（有）柴田工務店</strong><br>常陸太田市亀作町５２８-３<br>0294-74-4588</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.631895,140.396916);
        html = '<center><strong><a href="http://www1.ocn.ne.jp/~m.wood/" target="_blank">合名会社桝屋商店</a></strong><br>常陸大宮市山方６３７<br>0295-57-2059</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(35.858963,140.708232);
        html = '<center><strong><a href="http://www.k-yoshioka.co.jp/" target="_blank">（有）吉岡工務店</a></strong><br>神栖市横瀬５０番地<br>0299-96-0026</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(35.870071,140.650362);
        html = '<center><strong>（有）小堀工務店</strong><br>神栖市石神６４４<br>0299-92-3169</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(35.841804,140.714879);
        html = '<center><strong><a href="http://www.e-zaimoku.com/" target="_blank">（有）椙山材木店</a></strong><br>神栖市太田３２０９<br>0479-46-0164</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(35.891482,140.645015);
        html = '<center><strong><a href="http://www.o-style.org/" target="_blank">（株）大沼工務店</a></strong><br>神栖市大野原２-２７-１０<br>0299-92-5349</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.348471,140.456615);
        html = '<center><strong>（株）エス・ディ・ワークス</strong><br>水戸市笠原町２８８-１２<br>029-244-0924</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.376262,140.440987);
        html = '<center><strong><a href="http://qs-home.jp/" target="_blank">（株）堀久工務店</a></strong><br>水戸市見川２-５２-４<br>029-225-3033</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.393086,140.443778);
        html = '<center><strong><a href="http://www.buildup1998.com/" target="_blank">（株）ビルドアップ</a></strong><br>水戸市上水戸４-６-２３<br>029-303-6305</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.327341,140.463704);
        html = '<center><strong><a href="http://www.e-house.co.jp/mito-kenshin/" target="_blank">（株）水戸建親センター</a></strong><br>水戸市住吉町１６８<br>029-247-1141</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.387356,140.437398);
        html = '<center><strong><a href="http://www.ones-home.co.jp/" target="_blank">（有）ＯＮＥ’Ｓ　ＨＯＭＥ</a></strong><br>水戸市松ヶ丘１-２-２１<br>029-231-1155</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.350416,140.441858);
        html = '<center><strong><a href="http://www.office8.co.jp/" target="_blank">オフィスエイト（株）</a></strong><br>水戸市千波町２０６７-８<br>029-244-0084</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.362792,140.501964);
        html = '<center><strong><a href="http://www.kk-fujiko.com/" target="_blank">（株）フジコー</a></strong><br>水戸市浜田１-１９-１３<br>029-221-8700</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.242774,140.187852);
        html = '<center><strong>渡辺木材（株）</strong><br>石岡市柿岡１８２７番地<br>0299-43-0031</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.203256,140.291216);
        html = '<center><strong><a href="http://www.ebenhouse.co.jp/" target="_blank">（株）エーベンハウス</a></strong><br>石岡市石岡１３４４６-３６<br>0299-27-5858</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.2644,139.9194);
        html = '<center><strong><a href="http://tsukada.co.jp/" target="_blank">（有）塚田工務店</a></strong><br>筑西市関本上３７３-４<br>0296-37-4674</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.248368,139.973332);
        html = '<center><strong><a href="http://www.e-house.co.jp/saito-kenchiku/" target="_blank">斉藤建築工業（株）</a></strong><br>筑西市辻１５１０-３<br>0296-37-4541</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.092159,140.208104);
        html = '<center><strong><a href="http://www.e-house.co.jp/honda/" target="_blank">（株）本田</a></strong><br>土浦市東真鍋町９-３５<br>029-822-2211</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.441787,140.379547);
        html = '<center><strong><a href="http://www.e-house.co.jp/osaki/" target="_blank">（株）大崎材木店</a></strong><br>東茨城郡城里町大字上入野２１４２-１<br>029-288-3535</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.314492,140.568403);
        html = '<center><strong><a href="http://www.e-house.co.jp/yuasa/" target="_blank">（株）湯浅</a></strong><br>東茨城郡大洗町磯浜町１１３３<br>029-267-5281</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.568574,140.646577);
        html = '<center><strong><a href="http://www.nichimoku.co.jp/" target="_blank">日木産業（株）</a></strong><br>日立市鮎川町４丁目１番８号<br>0294-36-4451</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.623462,140.668872);
        html = '<center><strong><a href="http://www.masumi-kensetsu.jp/" target="_blank">益三建設（株）</a></strong><br>日立市滑川本町４-２５-１６<br>0294-24-5533</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.236888,140.513898);
        html = '<center><strong><a href="http://www5.ocn.ne.jp/~k.yosi/index.htm" target="_blank">（株）吉川工務店</a></strong><br>鉾田市造谷１２０９番地１<br>0291-37-0623</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.128283,140.541387);
        html = '<center><strong><a href="http://www.e-house.co.jp/takeda/" target="_blank">（有）武田製材所</a></strong><br>鉾田市二重作１４７３<br>0291-39-3282</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.151741,140.514959);
        html = '<center><strong>鈴木工務店</strong><br>鉾田市鉾田１６３５<br>0291-32-3483</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(35.903199,140.186153);
        html = '<center><strong><a href="http://www.takeya.ne.jp/" target="_blank">（株）竹屋</a></strong><br>龍ケ崎市栄町４３５６<br>0297-64-5168</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(35.930078,140.140792);
        html = '<center><strong><a href="http://www.isekiya-komuten.com/" target="_blank">（株）伊勢喜屋工務店</a></strong><br>龍ケ崎市佐貫３-６-７<br>0297-60-2038</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(35.965622,140.640652);
        html = '<center><strong><a href="http://www.sopia.or.jp/safety/" target="_blank">（株）セーフティハウス</a></strong><br>鹿嶋市宮中５２７３-４<br>0299-85-2185</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.262658,140.092494);
        html = '<center><strong><a href="http://www.e-house.co.jp/fujita/" target="_blank">藤田建築</a></strong><br>桜川市真壁町羽鳥１０７<br>0296-55-3975</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.110587,140.405068);
        html = '<center><strong>（有）翔栄工業 </strong><br>行方市浜１４８７-１<br>0299-36-2055</center>';
        map.addOverlay(createMarker(point, html, icon));

                point = new GLatLng(36.295736,139.929265);
        html = '<center><strong><a href="http://www.e-house.co.jp/hirose/" target="_blank">廣瀬建築</a></strong><br>筑西市下川島８２４－３<br>0296-28-0398</center>';
        map.addOverlay(createMarker(point, html, icon));
		
		
	                point = new GLatLng(36.22578,139.802879);
        html = '<center><strong>公栄住宅(株)</strong><br>古河市上片田３８７－２<br>0280-77-3131</center>';
        map.addOverlay(createMarker(point, html, icon));
		
		                point = new GLatLng(36.33517,140.39171);
        html = '<center><strong><a href="http://www.hayashijyuken.co.jp/" target="_blank">(有)林住建</a></strong><br>水戸市高田町２２６－２<br>029-259-5946</center>';
        map.addOverlay(createMarker(point, html, icon));	


	                point = new GLatLng(35.788669,140.772168);
        html = '<center><strong><a href="http://www.e-house.co.jp/ill-home/" target="_blank">(株)アイルホーム</a></strong><br>神栖市土合南２－１１－１４<br>0479-26-3350</center>';
        map.addOverlay(createMarker(point, html, icon));

	                point = new GLatLng(36.377936, 140.2238);
        html = '<center><strong>リフォーム工房</strong><br>笠間市飯合５９１-３<br>0296-72-2730</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);
            }
          }
        );
      }
    }
