//<![CDATA[

    var map;
    var marker_list=[];
    var txt_list=[];

    function load() {
      if (GBrowserIsCompatible()) {

        //地図を作成
        map = new GMap2(document.getElementById("map"));
        map.setCenter(new GLatLng(36.649515, 138.192151), 14);
		
		//マップコントローラを付ける
		map.addControl(new GLargeMapControl());
		
		//マップタイプコントローラを追加する
		map.addControl(new GMapTypeControl());

		//スケールコントローラ(尺度定規)を付ける
		map.addControl(new GScaleControl());

        //マーカを作成0
        var txt="センチュリー<br />長野市東鶴賀町1547-10";
        txt_list.push(txt);
        addMarker(new GLatLng(36.651624, 138.196779),txt);

        //マーカを作成1
        txt="YYK<br />長野市田町1515";
        txt_list.push(txt);
        addMarker(new GLatLng(36.654307, 138.19344),txt);

        //マーカを作成2
        txt="ホテル SWEETS<br />長野市鶴賀田町2443-4";
        txt_list.push(txt);
        addMarker(new GLatLng(36.655148, 138.189766),txt);

        //マーカを作成3
        txt="Yホテル クワトロ<br />長野市鶴賀南千歳町860";
        txt_list.push(txt);
        addMarker(new GLatLng(36.646866, 138.188008),txt);

        //マーカを作成4
        txt="エーゲ海<br />長野市鶴賀西鶴賀町1527";
        txt_list.push(txt);
        addMarker(new GLatLng(36.653663, 138.196037),txt);

        //マーカを作成5
        txt="OX<br />長野市鶴賀田町2191";
        txt_list.push(txt);
        addMarker(new GLatLng(36.654408, 138.191622),txt);

        //マーカを作成6
        txt="プレジデント<br />長野市西鶴賀町1558";
        txt_list.push(txt);
        addMarker(new GLatLng(36.652109, 138.196037),txt);

        //マーカを作成7
        txt="童話の森<br />長野市東鶴賀町26";
        txt_list.push(txt);
        addMarker(new GLatLng(36.652594, 138.200051),txt);

        //マーカを作成8
        txt="エイラク<br />長野市鶴賀西鶴賀町1551-6";
        txt_list.push(txt);
        addMarker(new GLatLng(36.65241, 138.195971),txt);

        //マーカを作成9
        txt="OZ<br />長野市西鶴賀町1468-4";
        txt_list.push(txt);
        addMarker(new GLatLng(36.651944, 138.194604),txt);

        //マーカを作成10
        txt="AI<br />長野市鶴賀1467-1";
        txt_list.push(txt);
        addMarker(new GLatLng(36.648264, 138.196918),txt);

        //マーカを作成11
        txt="プサン<br />長野市鶴賀権堂町2270-10";
        txt_list.push(txt);
        addMarker(new GLatLng(36.652812, 138.188797),txt);

        //マーカを作成12
        txt="ニューモンブラン<br />長野市西鶴賀町1940-1-9";
        txt_list.push(txt);
        addMarker(new GLatLng(36.653652, 138.196574),txt);

        //マーカを作成13
        txt="ニューパレス<br />長野市鶴賀権堂町2270-1";
        txt_list.push(txt);
        addMarker(new GLatLng(36.652904, 138.188422),txt);

        //マーカを作成14
        txt="サンゴ礁<br />長野市鶴賀権堂町2249";
        txt_list.push(txt);
        addMarker(new GLatLng(36.652138, 138.195954),txt);

        //マーカを作成15
        txt="館<br />長野市吉田5-26-39";
        txt_list.push(txt);
        addMarker(new GLatLng(36.659802, 138.224354),txt);

        //マーカを作成16
        txt="ムーンスター<br />長野市大橋南1-36";
        txt_list.push(txt);
        addMarker(new GLatLng(36.615038, 138.19891),txt);

        //マーカを作成17
        txt="ホテル白樺<br />長野市青木島町大塚1107";
        txt_list.push(txt);
        addMarker(new GLatLng(36.612479, 138.194419),txt);

        //マーカを作成18
        txt="ホテル大橋<br />長野市青木島町綱島535";
        txt_list.push(txt);
        addMarker(new GLatLng(36.612763, 138.196532),txt);

        //マーカを作成19
        txt="エールフランス<br />長野市穂保374";
        txt_list.push(txt);
        addMarker(new GLatLng(36.682714, 138.262974),txt);

        //マーカを作成20
        txt="志賀<br />長野市大字大町601-1";
        txt_list.push(txt);
        addMarker(new GLatLng(36.677334, 138.26716),txt);

        //マーカを作成21
        txt="ベニス<br />長野市川中島町四ツ屋1257-2";
        txt_list.push(txt);
        addMarker(new GLatLng(36.618499, 138.14339),txt);

        //マーカを作成22
        txt="スカイイン<br />長野市下氷鉋1-7-6";
        txt_list.push(txt);
        addMarker(new GLatLng(36.612615, 138.178768),txt);
      }
    }

    function addMarker(latlng,txt){
        //マーカーを作成
        var marker = new GMarker(latlng);

        GEvent.addListener(marker, "click", function() {
            marker.openInfoWindowHtml(txt);
        });

        //マーカーのコンストラクタを配列に記憶
        marker_list.push(marker);
        
        //マーカーを地図上に配置
        map.addOverlay(marker);
    }
    function clickMarker(index){
        //吹き出しを表示する
        marker_list[index].openInfoWindowHtml(txt_list[index]);
    }
//]]>
