// JavaScript Document

// GoogleMapを作成

//<![CDATA[

var map;
var marker_list=[];
var txt_list=[];

function load() {
if (GBrowserIsCompatible()) {

//地図を作成
map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(43.12522718590621 , 141.32707089185715), 15);

var txt="<img src='http://www.kouhoku.ed.jp/common/images/gmap/kouhoku.gif' width='285' height='130' style='margin-bottom:6px;' /><br />幌北幼稚園";
txt_list.push(txt);
addMarker(new GLatLng(43.12522718590621 , 141.32707089185715),txt);

txt="<img src='http://www.kouhoku.ed.jp/common/images/gmap/ainosato.gif' width='285' height='130' style='margin-bottom:6px;' /><br />あいの里幼稚園";
txt_list.push(txt);
addMarker(new GLatLng(43.164066186136274 , 141.40138685703278),txt);

txt="<img src='http://www.kouhoku.ed.jp/common/images/gmap/hanazono.gif' width='285' height='130' style='margin-bottom:6px;' /><br />華園幼稚園";
txt_list.push(txt);
addMarker(new GLatLng(43.12817336424867 , 141.32043778896332),txt);

txt="<img src='http://www.kouhoku.ed.jp/common/images/gmap/himawari.gif' width='285' height='130' style='margin-bottom:6px;' /><br />札幌ひまわり幼稚園";
txt_list.push(txt);
addMarker(new GLatLng(43.156308578065754 , 141.3797977566719),txt);

var txt="<img src='http://www.kouhoku.ed.jp/common/images/gmap/sorairo.gif' width='285' height='130' style='margin-bottom:6px;' /><br />そらいろ幼稚園";
txt_list.push(txt);
addMarker(new GLatLng(42.999045 , 141.373433),txt);
  }
}

function addMarker(latlng,txt){
//マーカーを作成
var marker = new GMarker(latlng);

GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(txt);
});

//マップコントローラを付ける
map.addControl(new GLargeMapControl());

//マーカーのコンストラクタを配列に記憶
marker_list.push(marker);

//マーカーを地図上に配置
map.addOverlay(marker);
}
function clickMarker(index){
//吹き出しを表示する
marker_list[index].openInfoWindowHtml(txt_list[index]);
}
//]]>

