﻿<!--
var map;

str = location.search.split("=");
switch (str[1]) {
case "2":
	lat = 31.217;
	lng = 130.688;
	zm = 8;
	break;
case "5":
	lat = 31.482;
	lng = 130.516;
	zm = 15;
	break;
case "6":
	lat = 30.731359851500823;
	lng = 130.99024772644043;
	zm = 15;
	break;
case "7":
	lat = 30.432;
	lng = 130.572;
	zm = 15;
	break;
default:
	lat = 31.217;
	lng = 130.688;
	zm = 8;
	break;
}

function onLoad() {
	map = new GMap2(document.getElementById("map"));
	map.setCenter(new GLatLng(lat , lng),zm);
	map.addControl(new GLargeMapControl());
	map.addControl(new GMapTypeControl());
	map.addControl(new GOverviewMapControl());
	map.setMapType(G_NORMAL_MAP);
	map.enableDoubleClickZoom();//ダブルクリックによるズーム機能を有効
	map.enableContinuousZoom();//マウスホイールで拡大･縮小ズーム時にアニメーション効果を有効
	
	var marker_a = null;
	var marker_b = null;
	var marker_c = null;

	var markeropts = new Object();
	marker_a = new GMarker(new GPoint(130.516,31.482), markeropts);
	map.addOverlay(marker_a);
	GEvent.addListener(marker_a, 'mouseover', function() {
	marker_a.openInfoWindow("<h2>鹿児島・七ツ島 はいびすかすのりば</h2><p>TEL：099-261-7000</p><p><img src=images/map_thumb_nanatsujima.gif width=275 height=266></p>");
	});
	
	var markeropts = new Object();
	marker_b = new GMarker(new GPoint(130.99024772644043,30.731359851500823), markeropts);
	map.addOverlay(marker_b);
	GEvent.addListener(marker_b, 'mouseover', function() {
	marker_b.openInfoWindow("<h2>種子島・西之表港 はいびすかすのりば</h2><p>TEL：0997-22-1355</p><p><img src=images/map_thumb_nishinoomote.gif width=275 height=266></p>");
	});

	var markeropts = new Object();
	marker_c = new GMarker(new GPoint(130.572,30.432), markeropts);
	map.addOverlay(marker_c);
	GEvent.addListener(marker_c, 'mouseover', function() {
	marker_c.openInfoWindow("<h2>屋久島・宮之浦港 はいびすかすのりば</h2><p>TEL：0997-42-0140</p><p><img src=images/map_thumb_miyanoura2.gif width=275 height=266></p>");
	});
		
	var points = [];
	points[0] = new GLatLng(31.482, 130.516);
	points[1] = new GLatLng(31.481, 130.517);
	points[2] = new GLatLng(31.480, 130.526);
	points[3] = new GLatLng(31.480, 130.547);
	points[4] = new GLatLng(31.479, 130.577);
	points[5] = new GLatLng(31.476, 130.595);
	points[6] = new GLatLng(31.471, 130.601);
	points[7] = new GLatLng(31.443, 130.607);
	points[8] = new GLatLng(31.390, 130.634);
	points[9] = new GLatLng(31.270, 130.712);
	points[10] = new GLatLng(31.238, 130.718);
	points[11] = new GLatLng(31.203, 130.706);
	points[12] = new GLatLng(31.175, 130.684);
	points[13] = new GLatLng(31.081, 130.608);
	points[14] = new GLatLng(31.028, 130.586);
	points[15] = new GLatLng(30.9978, 130.593);
	points[16] = new GLatLng(30.730, 130.985);
	points[17] = new GLatLng(30.729, 130.985);
	points[18] = new GLatLng(30.728, 130.986);
	points[19] = new GLatLng(30.728, 130.988);
	points[20] = new GLatLng(30.731359851500823, 130.99024772644043);
	points[21] = new GLatLng(30.728, 130.988);
	points[22] = new GLatLng(30.728, 130.986);
	points[23] = new GLatLng(30.729, 130.985);
	points[24] = new GLatLng(30.730, 130.985);
	points[25] = new GLatLng(30.732, 130.981);
	points[26] = new GLatLng(30.733, 130.978);
	points[27] = new GLatLng(30.732, 130.974);
	points[28] = new GLatLng(30.729, 130.964);
	points[29] = new GLatLng(30.715, 130.939);
	points[30] = new GLatLng(30.547, 130.698);
	points[31] = new GLatLng(30.472, 130.615);
	points[32] = new GLatLng(30.448, 130.593);
	points[33] = new GLatLng(30.434, 130.582);
	points[34] = new GLatLng(30.432, 130.578);
	points[35] = new GLatLng(30.431, 130.577);
	points[36] = new GLatLng(30.4317277596425, 130.572252273559);
	points[37] = new GLatLng(30.432, 130.572);

	
	
	var polyline = new GPolyline(points, "#FF0000", 6);
	map.addOverlay(polyline);
	
//	GEvent.addListener(map, 'click', function(overlay, point) {
//      if (point) {
//        document.getElementById("show_x").innerHTML = point.x;
//        document.getElementById("show_y").innerHTML = point.y;
//      }
//    });
}
//-->
