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(35.072336, 137.012393);
map.setCenter(center, 9);

	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.951942,137.07019);
	html = '<p class="gMapCom"><a href="http://www.ansui.com/" target="_blank">（株）安水建設</a></p><p class="gMapAdd">安城市横山町八左１２６-５</p><p class="gMapTel">0566（77）4433</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(34.980552,137.082941);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/orangehome/" target="_blank">（有）オレンジホーム</a></p><p class="gMapAdd">安城市住吉町３-５-２８</p><p class="gMapTel">0566（70）8841</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.356471,136.803099);
	html = '<p class="gMapCom"><a href="http://www.sgu.co.jp" target="_blank">エスジーユーホーム（株）</a></p><p class="gMapAdd">一宮市光明寺字石原２番地</p><p class="gMapTel">0586（51）3914</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.310992,136.761531);
	html = '<p class="gMapCom"><a href="http://www.mikamo.co.jp/" target="_blank">（株）三鴨地所</a></p><p class="gMapAdd">一宮市三条字賀１１１-１</p><p class="gMapTel">0586-61-7041</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.33203,136.819014);
	html = '<p class="gMapCom"><a href="http://www.aokikaihatu.com/" target="_blank">（株）アオキ開発</a></p><p class="gMapAdd">一宮市浅井町西浅井字郷西２７</p><p class="gMapTel">0586（51）5776</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.336343,136.808246);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/hishikawa/" target="_blank">（有）菱川不動産事務所</a></p><p class="gMapAdd">一宮市大字高田字南屋敷２８</p><p class="gMapTel">0586（78）6080</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.292036,136.804938);
	html = '<p class="gMapCom"><a href="http://www.iwaihousing.com/" target="_blank">（株）いわいハウジング</a></p><p class="gMapAdd">一宮市八町通２-４</p><p class="gMapTel">0586（71）3800</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(34.959144,137.154584);
	html = '<p class="gMapCom"><a href="http://www.nakane-s.com/" target="_blank">ナカネ新建材（株）</a></p><p class="gMapAdd">岡崎市八帖北町６-１６</p><p class="gMapTel">0564（22）0128</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(34.819707,137.230888);
	html = '<p class="gMapCom">カネニ木材（株）</p><p class="gMapAdd">蒲郡市松原町２０番１０号</p><p class="gMapTel">0533（68）1231</p>';
	map.addOverlay(createMarker(point, html, icon));
		
	point = new GLatLng(34.817921,137.235962);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/marusue/" target="_blank">丸末建設（有）</a></p><p class="gMapAdd">蒲郡市竹島町１７-２２</p><p class="gMapTel">0533（69）0857</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.243456,136.971668);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/tsuchihashi/" target="_blank">（株）ツチハシ</a></p><p class="gMapAdd">春日井市鳥居松町３-１０７</p><p class="gMapTel">0568（83）5266</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.244711,136.972165);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/shouken/" target="_blank">（株）匠研</a></p><p class="gMapAdd">春日井市鳥居松町４-１４８</p><p class="gMapTel">0568（83）1811</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.265509,136.980589);
	html = '<p class="gMapCom"><a href="http://www.eikouconst.jp/" target="_blank">（株）栄幸建設</a></p><p class="gMapAdd">春日井市東野町２-９-１２</p><p class="gMapTel">0568（83）8030</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.245963,136.961494);
	html = '<p class="gMapCom"><a href="http://www.isawa-j.com/" target="_blank">イサ和住宅（株）</a></p><p class="gMapAdd">春日井市柏原町３-１９６</p><p class="gMapTel">0568（82）6953</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.253904,136.962085);
	html = '<p class="gMapCom"><a href="http://www.yamaguchimokuzai.co.jp/" target="_blank">山口木材（株）</a></p><p class="gMapAdd">春日井市八田町４-１-５</p><p class="gMapTel">0568（84）2621</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.25932,136.96539);
	html = '<p class="gMapCom">坂井ホーム（株）</p><p class="gMapAdd">春日井市八田町６-１８-１３</p><p class="gMapTel">0568（81）4864</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.205555,136.839896);
	html = '<p class="gMapCom"><a href="http://www.k2-homes.com/hp/fujikei/" target="_blank">（株）フジケイ</a></p><p class="gMapAdd">清須市清洲１８３７</p><p class="gMapTel">052（409）3434</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.244376,136.836045);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/shinmeigi/" target="_blank">新名岐（株）</a></p><p class="gMapAdd">清須市春日落合３１４番地</p><p class="gMapTel">052（409）5878</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(34.868616,137.060064);
	html = '<p class="gMapCom"><a href="http://www.sanyo-kensetu.co.jp/" target="_blank">山旺建設（株）</a></p><p class="gMapAdd">西尾市花ノ木町１-８</p><p class="gMapTel">0563（56）3193</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.347376,136.933947);
	html = '<p class="gMapCom"><a href="http://www.kuma-co.com/" target="_blank">熊沢建設（株）</a></p><p class="gMapAdd">丹羽郡大口町河北２-１０４</p><p class="gMapTel">0587（95）6944</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(34.775246,136.905059);
	html = '<p class="gMapCom"><a href="http://hiratasouken.com/" target="_blank">（株）平田創建</a></p><p class="gMapAdd">知多郡美浜町河和西谷１３-１３</p><p class="gMapTel">0569（82）6064</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.005842,136.909433);
	html = '<p class="gMapCom"><a href="http://chitajyu.com/ " target="_blank">チタジュウ建材（株）</a></p><p class="gMapAdd">東海市加木屋町松の内８７</p><p class="gMapTel">0562（33）2627</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.020315,136.907407);
	html = '<p class="gMapCom"><a href="http://www.k-tate.co.jp/" target="_blank">（株）K-建物</a></p><p class="gMapAdd">東海市中央町５-６-１</p><p class="gMapTel">0562（31）2030</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(34.927243,136.971706);
	html = '<p class="gMapCom"><a href="http://www.shinhori.co.jp/" target="_blank">合資会社木材センターシンホリ</a></p><p class="gMapAdd">半田市州の崎町２-２２６</p><p class="gMapTel">0569（29）6290</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.214997,137.0529);
	html = '<p class="gMapCom"><a href="http://www.tachiki-home.com/" target="_blank">（株）タチ基ホーム</a></p><p class="gMapAdd">尾張旭市三郷町中井田５５-１</p><p class="gMapTel">0561（54）1221</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.219746,137.04983);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/abe-mokuzai/" target="_blank">安部木材</a></p><p class="gMapAdd">尾張旭市東栄町１-５-１８</p><p class="gMapTel">0561（53）2698</p>';
	map.addOverlay(createMarker(point, html, icon));
  
	point = new GLatLng(34.749603,137.42665);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/shinrai/" target="_blank">シンライホーム・（株）シンライ工務店</a></p><p class="gMapAdd">豊橋市中岩田三丁目２３-８</p><p class="gMapTel">0532（62）3467</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(34.826432,137.337845);
	html = '<p class="gMapCom"><a href="http://www.jbhome.co.jp/" target="_blank">ジェイビーホーム（株）</a></p><p class="gMapAdd">豊川市小田渕町５-６-２</p><p class="gMapTel">0533（88）7707</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.04393,137.084052);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/himawari/" target="_blank">（株）ひまわり建設</a></p><p class="gMapAdd">豊田市高岡町西川前６１－２</p><p class="gMapTel">0565（52）8333</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.061492,137.122978);
	html = '<p class="gMapCom"><a href="http://www5.ocn.ne.jp/~t-moku/" target="_blank">土橋木材（株）</a></p><p class="gMapAdd">豊田市土橋町６-９３-１</p><p class="gMapTel">0565（28）0291</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.047198,136.991094);
	html = '<p class="gMapCom"><a href="http://www.cosmo-bldg.co.jp/" target="_blank">（株）コスモ</a></p><p class="gMapAdd">豊明市栄町内山６７-４２</p><p class="gMapTel">0562（97）3270</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.203476,136.94293);
	html = '<p class="gMapCom">島建築（株）</p><p class="gMapAdd">名古屋市守山区新守山４０２番地</p><p class="gMapTel">052（793）0126</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.202402,136.994268);
	html = '<p class="gMapCom"><a href="http://www.kk-waken.co.jp/" target="_blank">（株）和建</a></p><p class="gMapAdd">名古屋市守山区大森一丁目２１１３番地</p><p class="gMapTel">052（798）2807</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.202994,137.003827);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/ogiso/" target="_blank">オギソ木材（株）</a></p><p class="gMapAdd">名古屋市守山区脇田町１２０５番地</p><p class="gMapTel">052（798）2811</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.206604,136.892463);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/ryoukougumi/" target="_blank">（有）良工組</a></p><p class="gMapAdd">名古屋市西区江向町６-２４</p><p class="gMapTel">052（521）2231</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.175474,136.893527);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/okishou-shouten/" target="_blank">（株）沖正商店</a></p><p class="gMapAdd">名古屋市中区丸の内１-１２-８</p><p class="gMapTel">052（211）4456</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.177396,136.865452);
	html = '<p class="gMapCom"><a href="http://www.terravic-kyowa.co.jp/" target="_blank">（株）テラビックキョーワ</a></p><p class="gMapAdd">名古屋市中村区本陣通３-３３</p><p class="gMapTel">052（482）3188</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.23188,136.914704);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/hibino/" target="_blank">日比野建設（株）</a></p><p class="gMapAdd">名古屋市北区若鶴町２６５</p><p class="gMapTel">052（909）6001</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.092368,136.971896);
	html = '<p class="gMapCom"><a href="http://www.aiwahome.net/" target="_blank">アイワホーム（株）</a></p><p class="gMapAdd">名古屋市緑区万場山二丁目206-1</p><p class="gMapTel">052（895）1005</p>';
	map.addOverlay(createMarker(point, html, icon));
	
	point = new GLatLng(34.952198,137.172113);
	html = '<p class="gMapCom"><a href="http://www.casamikawa.com/" target="_blank">（株）カーザミカワ</a></p><p class="gMapAdd">岡崎市吹矢町８８</p><p class="gMapTel">0564（24）2511</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.234702,136.9265);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/hiro/">（有）ヒロ工房</a></p><p class="gMapAdd">名古屋市北区桐畑町８８－３</p><p class="gMapTel">052（901）4013</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.322715, 137.056162);
	html = '<p class="gMapCom"><a href="http://saraca.jp/fc/chukyo/" target="_blank">（有）ファーム</a></p><p class="gMapAdd">春日井市内津町２０２番地</p><p class="gMapTel">0568（88）8655</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(34.766458, 137.368798);
	html = '<p class="gMapCom"><a href="http://www.hakusige.co.jp/" target="_blank">（株）白繁</a></p><p class="gMapAdd">豊橋市新栄町字鳥畷31番地</p><p class="gMapTel">0532（31）0337</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.354136,136.92805);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/oue/" target="_blank">（有）丸恭オオウエ</a></p><p class="gMapAdd">丹羽郡扶桑町高雄字宮前２７０番地</p><p class="gMapTel">0587（93）4483</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.01746,137.092646);
	html = '<p class="gMapCom"><a href="http://www.uchi-ken.com/" target="_blank">（株）打田建築</a></p><p class="gMapAdd">豊田市吉原町屋敷畠94</p><p class="gMapTel">0565（52）4684</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.328364, 136.885772);
	html = '<p class="gMapCom"><a href="http://www.centerland.co.jp/" target="_blank">（株）アイチケン</a></p><p class="gMapAdd">江南市力長町大当寺１２８<br>センターランドビル３Ｆ</p><p class="gMapTel">0587（55）1000</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.074913, 137.107849);
	html = '<p class="gMapCom"><a href="http://www.harada-sekkei.co.jp/" target="_blank">原田設計（株）</a></p><p class="gMapAdd">豊田市千足町十丁目１０６番地</p><p class="gMapTel">0565（33）5666</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(34.768005,137.385853);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/yogohome/" target="_blank">（有）ヨゴホーム</a></p><p class="gMapAdd">豊橋市上伝馬町63</p><p class="gMapTel">0532（52）6021</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.292016,136.940266);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/mizuno-shoukai/" target="_blank">（合）水野商会</a></p><p class="gMapAdd">小牧市二重堀２４１</p><p class="gMapTel">0568（76）2338</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(34.820864,137.343981);
	html = '<p class="gMapCom"><a href="http://www.ksf-inc.jp/" target="_blank">Ｋ’ｓファクトリー（有）</a></p><p class="gMapAdd">豊川市小田渕町３-１６</p><p class="gMapTel">0533（88）4966</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.227079,137.053088);
	html = '<p class="gMapCom"><a href="http://mituken.web.fc2.com/" target="_blank">光岡建築</a></p><p class="gMapAdd">尾張旭市柏井町弥栄１５７-２</p><p class="gMapTel">0561（53）8092</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.165525,136.905972);
	html = '<p class="gMapCom"><a href="http://www.lacasa.co.jp/" target="_blank">la CASA Lab.</a></p><p class="gMapAdd">名古屋市中区栄三丁目18番地1号<br>ナディアパークデザインセンタービル<br>国際デザインセンター7F</p><p class="gMapTel">052（251）3550</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.261646,136.979089);
	html = '<p class="gMapCom"><a href="http://www.lacasa.co.jp/" target="_blank">LIVING STUDIO</p><p class="gMapTel">la CASA 春日井店</a></p><p class="gMapAdd">春日井市六軒屋町三丁目187</p><p class="gMapTel">0568（48）1181</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.344488,136.88831);
	html = '<p class="gMapCom"><a href="http://www.lacasa.co.jp/" target="_blank">LIVING STUDIO</p><p class="gMapTel">la CASA 江南店</a></p><p class="gMapAdd">江南市江森町南76番地</p><p class="gMapTel">0587（51）0080</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.291476,136.878024);
	html = '<p class="gMapCom">（有）ジール</p><p class="gMapAdd">岩倉市八剱町道光１２-１</p><p class="gMapTel">0587（37）7570</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.056737,137.086654);
	html = '<p class="gMapCom">三和建設工業（株）</p><p class="gMapAdd">豊田市堤町道仙８９</p><p class="gMapTel">0565（52）0435</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.237764,136.872541);
	html = '<p class="gMapCom">イヌカイ技建</p><p class="gMapAdd">北名古屋市九之坪南城屋敷７-１</p><p class="gMapTel">0568(21)3666</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.219255,137.070198);
	html = '<p class="gMapCom"><a href="http://unihouse.biz/" target="_blenk">（株）ユニハウス</a></p><p class="gMapAdd">瀬戸市共栄通６丁目１０番</p><p class="gMapTel">0561(89)6280</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.142889,137.034784);
	html = '<p class="gMapCom">（有）小林工務店</p><p class="gMapAdd">日進市岩崎町新ラ田９４番地２６</p><p class="gMapTel">0561(56)9111</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.132622,137.171676);
	html = '<p class="gMapCom">伊藤工業（株）</p><p class="gMapAdd">豊田市四郷町山畑１３９-１８</p><p class="gMapTel">0565(41)5456</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.079129,137.186054);
	html = '<p class="gMapCom">（有）豊冨建設</p><p class="gMapAdd">豊田市美里四丁目三番地三</p><p class="gMapTel">0565(88)1361</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(34.881803,136.839314);
	html = '<p class="gMapCom">常滑建設（株）</p><p class="gMapAdd">常滑市市場町１丁目１５番地</p><p class="gMapTel">0569(35)2050</p>';
	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);
				}
			}
		);
	}
}

