//map gene
function mapSetting(){


$(".map-content").each(function(i){
    //if (i == 3) return true;       // インデックス番号が 3 (0 から始まる)の要素はスキップする。
//    alert( $(this).find("h3 a").text() + ":" + $(this).find("h3 a").attr("href") + ":" + $(this).find("code").text() );
//    $(this).find("img").remove();
//    $(this).find(".bunjyocomm").remove();
    $(this).css("display","none");
    markAdd(    $(this).find("h3 a").text(),
                $(this).find("h3 a").attr("href"),
                $(this).html(),
                $(this).find("code").text());
});

}

var map;
function load()
{
  if (GBrowserIsCompatible()) {
     map = new GMap2(document.getElementById('map'));
     map.setCenter(new GLatLng(34.79639588311888, 134.61736679077148), 13);
     map.addControl(new GLargeMapControl());
     mapSetting();
  }
}

//map marker
function markAdd( title, url , html , mapPoint )
{
    
     var pt = mapPoint.split(",")
     var point = new GLatLng(pt[0],pt[1]);
     //map.setCenter(point, 12);

     var mp = new GLatLng(point.lat() , point.lng() );
     var pophtml = '<div style="width:500px;height:120%">' + html + '</div>';
     var marker = show_marker(point,pophtml);
     map.addOverlay(marker);

}

function show_marker(point,pophtml){

  var marker = new GMarker(point);

  GEvent.addListener(marker, "click", function() {
    marker.openInfoWindowHtml(pophtml);
  });
  return marker;
}
