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.661278, 140.19928);
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(35.724242,140.648441);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/ishikawa-shoukai/" target="_blank">（株）石川商会住宅機材部</a></p><p class="gMapAdd">旭市ニ-１７１０</p><p class="gMapTel">0479（62）1341</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.724584,140.689298);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/maru8/" target="_blank">（株）丸八工務店</a></p><p class="gMapAdd">旭市蛇園２８７３-１</p><p class="gMapTel">0479（55）2186</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.755755,140.683904);
	html = '<p class="gMapCom"><a href="http://www.tadahome.jp/" target="_blank">（有）多田ホーム</a></p><p class="gMapAdd">旭市清滝８３１</p><p class="gMapTel">0479（55）1005</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.107701,139.837768);
	html = '<p class="gMapCom"><a href="http://www.tokai-fp.jp/" target="_blank">東海建設（株）</a></p><p class="gMapAdd">安房郡鋸南町下佐久間８５５</p><p class="gMapTel">0470（55）4820</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.121183,139.833892);
	html = '<p class="gMapCom"><a href="http://www.kyonan.co.jp/" target="_blank">鋸南不動産（株）</a></p><p class="gMapAdd">安房郡鋸南町大六１１６</p><p class="gMapTel">0470（55）4375</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.24364,140.242257);
	html = '<p class="gMapCom">大橋林材（株）</p><p class="gMapAdd">夷隅郡大多喜町黒原２８７</p><p class="gMapTel">0470（84）0003</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.311776,140.244171);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/anzai-koumusho/" target="_blank">（有）アンザイ工務所</a></p><p class="gMapAdd">夷隅郡大多喜町小土呂４２４</p><p class="gMapTel">0470（82）2043</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.834418,140.249086);
	html = '<p class="gMapCom"><a href="http://www.jukobo.jp/" target="_blank">（株）住工房スタイル</a></p><p class="gMapAdd">印旛郡栄町安食２４２１-８７</p><p class="gMapTel">0476（95）7071</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.691158,140.055049);
	html = '<p class="gMapCom"><a href="http://dct-hl.jp/" target="_blank">（株）デクトホールディング</a></p><p class="gMapAdd">習志野市泉町３丁目１番５号</p><p class="gMapTel">047（402）6333</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.794987,140.01726);
	html = '<p class="gMapCom">山長建設工務（株）</p><p class="gMapAdd">鎌ヶ谷市軽井沢２０８０番</p><p class="gMapTel">047（444）7902</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.100069,140.102253);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/kawakami-mokuzai/" target="_blank">川上木材（有）</a></p><p class="gMapAdd">鴨川市横渚５２８</p><p class="gMapTel">0470（92）1151</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.279728,140.031576);
	html = '<p class="gMapCom"><a href="http://www.anji.co.jp/" target="_blank">（株）あんじ</a></p><p class="gMapAdd">君津市山滝野１３０９-３</p><p class="gMapTel">0439（50）7780</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.314976,140.060092);
	html = '<p class="gMapCom"><a href="http://www.hirai-gnet.co.jp/" target="_blank">（株）ひらい</a></p><p class="gMapAdd">君津市俵田１６３５</p><p class="gMapTel">0439（35）3211</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.772354,140.582764);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/ishige-housing/" target="_blank">（株）石毛ハウジング</a></p><p class="gMapAdd">香取市桐谷７４４-８</p><p class="gMapTel">0478（78）4387</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.902426,140.491266);
	html = '<p class="gMapCom"><a href="http://www.e-kusano.com/" target="_blank">（有）クサノ</a></p><p class="gMapAdd">香取市佐原ホ１１５９</p><p class="gMapTel">0478（52）2101</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.814511,140.566776);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/dream-home/" target="_blank">（株）ドリームホーム</a></p><p class="gMapAdd">香取市神生２７１</p><p class="gMapTel">0478（78）5888</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.730276,140.206093);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/kubo-seizaisho/" target="_blank">（有）久保製材所</a></p><p class="gMapAdd">佐倉市江原６３１</p><p class="gMapTel">043（484）1265</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.714934,140.156106);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/oda-kensetu/" target="_blank">（株）オダ建設</a></p><p class="gMapAdd">佐倉市上志津１０６１-３</p><p class="gMapTel">043（462）1001</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.66042,140.156641);
	html = '<p class="gMapCom"><a href="http://chuohkenkou.jp/" target="_blank">（株）中央建工</a></p><p class="gMapAdd">四街道市四街道１５７０-６２</p><p class="gMapTel">043（424）1100</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.321831,139.926263);
	html = '<p class="gMapCom"><a href="http://www.toryoclub.com/" target="_blank">棟梁クラブ</a></p><p class="gMapAdd">君津市法木作１-１-４５</p><p class="gMapTel">0439（52）4625</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.47187,140.043977);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/ishibashi/" target="_blank">（株）石橋建築</a></p><p class="gMapAdd">市原市姉崎２１６１-６</p><p class="gMapTel">0436（61）3614</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.500008,140.065599);
	html = '<p class="gMapCom"><a href="http://www.sagawazaimoku.com/" target="_blank">（株）佐川材木店</a></p><p class="gMapAdd">市原市島野１６１７</p><p class="gMapTel">0436（22）3151</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.609547,140.110596);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/remodel-kazusa/" target="_blank">かずさシステム（株）</a></p><p class="gMapAdd">千葉市中央区登戸1-1-9</p><p class="gMapTel">043（247）0003</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.751182,139.924012);
	html = '<p class="gMapCom">京葉住宅サービス工業（株）</p><p class="gMapAdd">市川市曽谷８-２０-１４</p><p class="gMapTel">047（371）8237</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.702784,140.063575);
	html = '<p class="gMapCom"><a href="http://www.akiyamalumbers.co.jp/" target="_blank">秋山木材産業（株）</a></p><p class="gMapAdd">習志野市東習志野６-１６-３１</p><p class="gMapTel">047（476）5521</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.698207,140.067724);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/yamasho-kensetsu/" target="_blank">山匠建設（有）</a></p><p class="gMapAdd">習志野市東習志野６-６-１４</p><p class="gMapTel">047（477）5020</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.76896,139.936066);
	html = '<p class="gMapCom"><a href="http://www.daikou-jp.com/" target="_blank">（株）大功</a></p><p class="gMapAdd">松戸市紙敷１１７０</p><p class="gMapTel">047（391）4171</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.813764,139.951099);
	html = '<p class="gMapCom"><a href="http://www.tanzawa-k.co.jp/" target="_blank">（株）丹澤工務店</a></p><p class="gMapAdd">松戸市小金原７-３４-２７</p><p class="gMapTel">047（343）4475</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.784901,140.330585);
	html = '<p class="gMapCom"><a href="http://www.reform-aoyagi.com/" target="_blank">（株）アオヤギ</a></p><p class="gMapAdd">成田市東和田６２１-３１</p><p class="gMapTel">0476（22）2163</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.667011,140.119243);
	html = '<p class="gMapCom"><a href="http://sanei-jyuutaku.net/" target="_blank">（有）三英住宅</a></p><p class="gMapAdd">千葉市稲毛区長沼町１５-４</p><p class="gMapTel">043（215）6467</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.683453,140.116645);
	html = '<p class="gMapCom"><a href="http://www.sunen.co.jp/" target="_blank">（株）スンエン</a></p><p class="gMapAdd">千葉市花見川区千種町３２６-２</p><p class="gMapTel">043（259）1173</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.574891,140.170277);
	html = '<p class="gMapCom"><a href="http://www.sankyotec-kanto.co.jp/" target="_blank">（株）三協テック関東</a></p><p class="gMapAdd">千葉市緑区平山町１９２６-３２</p><p class="gMapTel">043（268）2300</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.541339,140.236054);
	html = '<p class="gMapCom"><a href="http://www.yamadaseizai.com/" target="_blank">合資会社山田製材所</a></p><p class="gMapAdd">千葉市緑区平川町１６２１</p><p class="gMapTel">043（291）0170</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.731122,140.865968);
	html = '<p class="gMapCom"><a href="http://www.amechome.com/" target="_blank">（株）アメックホーム</a></p><p class="gMapAdd">銚子市黒生町７３８０－１９</p><p class="gMapTel">0479（25）3553</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.722112,140.854358);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/terai-kenchiku/" target="_blank">寺井建築</a></p><p class="gMapAdd">銚子市小畑新町７６２４-４</p><p class="gMapTel">0479（24）5591</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.722587,140.78925);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/kanashima-kensetsu/" target="_blank">金島建設（株）</a></p><p class="gMapAdd">銚子市松岸見晴台２６５９-１</p><p class="gMapTel">0479（22）8074</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.016852,139.960925);
	html = '<p class="gMapCom"><a href="http://www.katokensetsu.com/" target="_blank">加藤建設（株）</a></p><p class="gMapAdd">南房総市沓見１２-１</p><p class="gMapTel">0470（46）3953</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.884413,139.98969);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/someya-zaimokuten/" target="_blank">（株）染谷材木店</a></p><p class="gMapAdd">柏市根戸４６７番地の７３</p><p class="gMapTel">0471（31）4471</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.85347,139.970104);
	html = '<p class="gMapCom"><a href="http://www.imayama.co.jp/" target="_blank">今山住建（株）</a></p><p class="gMapAdd">柏市若葉町６-７</p><p class="gMapTel">04（7167）6676</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.912933,139.947904);
	html = '<p class="gMapCom"><a href="http://e-mandai.co.jp/" target="_blank">（株）万代</a></p><p class="gMapAdd">柏市船戸１７０２-４</p><p class="gMapTel">04（7133）7511</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.846694,139.976706);
	html = '<p class="gMapCom">ステップホーム（有）</p><p class="gMapAdd">柏市名戸ケ谷１-７-１３</p><p class="gMapTel">04（7168）5022</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.699397,140.304877);
	html = '<p class="gMapCom"><a href="http://www.manahome.jp/" target="_blank">（有）ハラ建築</a></p><p class="gMapAdd">八街市八街は１１-８８</p><p class="gMapTel">043（442）3621</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.188943,139.953023);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/asama-mokuzai/" target="_blank">（株）浅間木材</a></p><p class="gMapAdd">富津市豊岡１４７０</p><p class="gMapTel">0439（68）1085</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.747364,140.325826);
	html = '<p class="gMapCom"><a href="http://marushin-h.jp/" target="_blank">（有）丸進</a></p><p class="gMapAdd">富里市久能７９５－１</p><p class="gMapTel">0476（92）0013</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.354655,139.914647);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/sanki/" target="_blank">（株）山貴産業</a></p><p class="gMapAdd">木更津市港南台１－２６－１</p><p class="gMapTel">0438（37）8526</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.977464,139.834302);
	html = '<p class="gMapCom"><a href="http://www.osumai.co.jp/" target="_blank">（株）東海住宅建設</a></p><p class="gMapAdd">野田市岩名２０１５-６３</p><p class="gMapTel">04（7129）8211</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.896311,139.910192);
	html = '<p class="gMapCom"><a href="http://www.izumi-m-f.com/" target="_blank">和泉木材（株）</a></p><p class="gMapAdd">流山市江戸川台西２-１６７</p><p class="gMapTel">0471（52）2131</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.890209,140.496808);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/ishihara/" target="_blank">（株）石原工務店</a></p><p class="gMapAdd">香取市佐原イ３６６２-１</p><p class="gMapTel">0478（52）4467</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.791074,140.023307);
	html = '<p class="gMapCom">（株）スズキ材木店</p><p class="gMapAdd">柏市藤ケ谷１４８２-２</p><p class="gMapTel">04（7191）5780</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.736443,140.853755);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/fujimura/" target="_blank">藤村建設（株）</a></p><p class="gMapAdd">銚子市川口町１－６２７６</p><p class="gMapTel">0479（26）3555</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.877108,140.050565);
	html = '<p class="gMapCom"><a href="http://www.takeya-k.com/" target="_blank">（株）竹屋 共栄住宅</a></p><p class="gMapAdd">我孫子市青山台４-２１-１０</p><p class="gMapTel">04（7183）1050</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.838078,140.304604);
	html = '<p class="gMapCom">小川工務店</p><p class="gMapAdd">成田市長沼５４</p><p class="gMapTel">0476（37）0377</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.768068,140.126484);
	html = '<p class="gMapCom"><a href="http://www.nakai-timber.co.jp/" target="_blank">（株）ナカイ</a></p><p class="gMapAdd">八千代市神野９７０－１</p><p class="gMapTel">047（488）7630</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.706012,140.711655);
	html = '<p class="gMapCom">向正工務店</p><p class="gMapAdd">旭市萩園１０８１－１</p><p class="gMapTel">0479（57）5640</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.852026, 139.970221);
	html = '<p class="gMapCom"><a href="http://www.yell-chiba.com/" target="_blank">（株）エール</a></p><p class="gMapAdd">柏市緑ケ丘3-8</p><p class="gMapTel">04（7163）1814</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.899736, 139.907367);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/abo/" target="_blank">（有）阿保建設</a></p><p class="gMapAdd">流山市江戸川台西1丁目160番地</p><p class="gMapTel">04（7155）5241</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.697284, 140.543886);
	html = '<p class="gMapCom"><a href="http://www.e-house.co.jp/suzukyu/" target="_blank">鈴久建設（株）</a></p><p class="gMapAdd">匝瑳市八日市場イ432-1</p><p class="gMapTel">0479（72）3077</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.722595,140.652157);
	html = '<p class="gMapCom"><a href="http://www.lead-up.co.jp/" target="_blank">（株）リード</a></p><p class="gMapAdd">旭市ロ969番地3</p><p class="gMapTel">0479（64）2103</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.722216,140.684754);
	html = '<p class="gMapCom"><a href="http://www.lohas-in.net/" target="_blank">（株）ハヤシ工務店</a></p><p class="gMapAdd">旭市三川１２１５６-１</p><p class="gMapTel">0479（50）5666</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.809683,139.968063);
	html = '<p class="gMapCom"><a href="http://www.ogawa-bco.co.jp/" target="_blank">（株）小川工務店</a></p><p class="gMapAdd">柏市新逆井２-９-１７</p><p class="gMapTel">04（7174）4102</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.723268,140.599495);
	html = '<p class="gMapCom"><a href="http://www8.ocn.ne.jp/~tomoro/" target="_blank">（株）戸諸工務店</a></p><p class="gMapAdd">旭市鎌数１０４２７-９</p><p class="gMapTel">0479（63）2800</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.635832,140.108094);
	html = '<p class="gMapCom"><a href="http://www.lionhouse.co.jp/" target="_blank">（有）ライオンハウス</a></p><p class="gMapAdd">千葉市稲毛区穴川２丁目４番８号</p><p class="gMapTel">043(206)8855</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(35.757193,140.074328);
	html = '<p class="gMapCom"><a href="http://www.woody-ito.jp/" target="_blank">（有）ウッデイ伊藤</a></p><p class="gMapAdd">船橋市豊富町７１８番地</p><p class="gMapTel">047(490)0800</p>';
	map.addOverlay(createMarker(point, html, icon));

	point = new GLatLng(36.013502,139.831726);
	html = '<p class="gMapCom">（有）池澤材木店</p><p class="gMapAdd">野田市木間ケ瀬５１９０</p><p class="gMapTel">04(7198)0223</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);
				}
			}
		);
	}
}

