﻿document.write( "<script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAssu6ZDRdmnc9eIH7Tr8M4RQA07OxyqYbSuY0CUR7OyuBpTiglBSBvoOH-CFuBHV111wwR-gW1VyRFw' type='text/javascript'></script>");

var map;

function gMoveTo(x,y,scale){
	if(scale!=map.getZoom() ){
		map.setZoom(scale);
	}

	map.panTo(new GLatLng(x,y));


}

	function load(x,y,scale,type) {
		if (GBrowserIsCompatible()) {

			map = new GMap2(document.getElementById("map"));

			map.addControl(new GLargeMapControl());
			map.addControl(new GOverviewMapControl());
			map.addControl(new GMapTypeControl());
			map.addControl(new GScaleControl());

	if(type==1){
		map.setCenter(new GLatLng(x,y),scale,G_NORMAL_MAP );
	}else if (type==2){
		map.setCenter(new GLatLng(x,y),scale,G_SATELLITE_MAP );
	}else {
		map.setCenter(new GLatLng(x,y),scale,G_HYBRID_MAP);
	}

// Create our "tiny" marker icon
var DnIcon = new GIcon();
DnIcon.image = "http://homepage3.nifty.com/yasda/ddiary/DiningIcon3.gif";
DnIcon.iconSize = new GSize(17, 17);
DnIcon.iconAnchor = new GPoint(9, 9);
DnIcon.infoWindowAnchor = new GPoint(9, 0);
var MtIcon = new GIcon();
MtIcon.image = "http://homepage3.nifty.com/yasda/ddiary/MtIcon3.gif";
MtIcon.iconSize = new GSize(17, 16);
MtIcon.iconAnchor = new GPoint(8, 8);
MtIcon.infoWindowAnchor = new GPoint(5, 0);


var PtIcon = new GIcon();
PtIcon.image = "http://homepage3.nifty.com/yasda/ddiary/ptIcon3.gif";
PtIcon.iconSize = new GSize(8, 8);
PtIcon.iconAnchor = new GPoint(4, 4);
PtIcon.infoWindowAnchor = new GPoint(4, 0);


	function gMoveTo(x,y,scale) {
			map.setCenter(new GLatLng(x,y),scale);
}

        function createMarker(point, name,adress,icn) {

			if(icn==0){
	          var marker = new GMarker(point,MtIcon);
			}else if(icn==1){
	          var marker = new GMarker(point,DnIcon);
			}else{
	          var marker = new GMarker(point,PtIcon);
			}

          GEvent.addListener(marker, "click", function() {
			window.open(adress, "_blank").focus();
          });
          GEvent.addListener(marker, "mouseover", function() {
            marker.openInfoWindowHtml("<a href=\""+adress+"\" target=\"_blank\">"+name+"</a>");
          });          return marker;
        }

//作成用

//    GEvent.addListener(map, 'click', function(overlay, point) {
//    if (point) {

//rvalue= "points.push(new GLatLng(" + Math.round(point.y*1000)/1000 + "," +Math.round(point.x*1000)/1000 + "));" ;
//map.addOverlay(new GMarker(point));

//        document.getElementById("show_x").innerHTML = rvalue;
//      }
//    });


//************************************************************************************
//          DATA
//************************************************************************************


//NZ1
var points = [];
points.push(new GLatLng(-43.531,172.628));//CHCH
points.push(new GLatLng(-43.813,171.862));
points.push(new GLatLng(-44.188,171.285));
points.push(new GLatLng(-44.003,170.473));//tekapo
points.push(new GLatLng(-44.178,170.167));
points.push(new GLatLng(-43.738,170.105));//CookVillage
points.push(new GLatLng(-44.186,170.134));
points.push(new GLatLng(-44.487,169.972));
points.push(new GLatLng(-44.628,169.514));
points.push(new GLatLng(-44.811,169.478));
points.push(new GLatLng(-44.704,169.174));//wanaka
points.push(new GLatLng(-44.772,169.342));
points.push(new GLatLng(-45.049,169.17));
points.push(new GLatLng(-45.009,168.883));
points.push(new GLatLng(-45.064,168.757));
points.push(new GLatLng(-45.313,168.754));
points.push(new GLatLng(-45.622,168.456));
points.push(new GLatLng(-45.421,167.728));//TeAnau
points.push(new GLatLng(-45.185,167.835));
points.push(new GLatLng(-44.814,168.109));
points.push(new GLatLng(-44.68,167.93));//Milford
points.push(new GLatLng(-44.814,168.109));
points.push(new GLatLng(-44.812,168.131));
points.push(new GLatLng(-44.852,168.139));
points.push(new GLatLng(-44.871,168.142));//MckellarHut
points.push(new GLatLng(-44.867,168.119));
points.push(new GLatLng(-44.846,168.126));
points.push(new GLatLng(-44.814,168.125));
points.push(new GLatLng(-44.814,168.109));
points.push(new GLatLng(-44.902,168.077));
points.push(new GLatLng(-45.208,167.816));
points.push(new GLatLng(-45.421,167.728));//TeAnau
points.push(new GLatLng(-45.622,168.456));
points.push(new GLatLng(-45.313,168.754));
points.push(new GLatLng(-45.064,168.757));
points.push(new GLatLng(-45.491,168.666));
points.push(new GLatLng(-45.228,168.751));
points.push(new GLatLng(-45.042,168.587));//QueensTown
points.push(new GLatLng(-45.056,169.15));
points.push(new GLatLng(-44.743,169.279));
points.push(new GLatLng(-44.642,169.227));
points.push(new GLatLng(-44.329,169.18));
points.push(new GLatLng(-43.976,169.416));
points.push(new GLatLng(-43.854,169.036));
points.push(new GLatLng(-43.579,169.626));
points.push(new GLatLng(-43.473,170.015));//FoxGlacier
points.push(new GLatLng(-43.016,170.662));
points.push(new GLatLng(-42.803,170.888));
points.push(new GLatLng(-42.454,171.214));
points.push(new GLatLng(-42.618,171.369));
points.push(new GLatLng(-42.81,171.564));
points.push(new GLatLng(-42.948,171.566));//As pass
points.push(new GLatLng(-42.79,171.55));//CarolHut
points.push(new GLatLng(-43.015,171.589));
points.push(new GLatLng(-43.014,171.741));
points.push(new GLatLng(-43.288,171.714));
points.push(new GLatLng(-43.541,172.631));//CHCH
points.push(new GLatLng(-43.601,172.558));
points.push(new GLatLng(-43.714,172.568));
points.push(new GLatLng(-43.818,172.7));
points.push(new GLatLng(-43.753,172.842));
points.push(new GLatLng(-43.754,172.942));
points.push(new GLatLng(-43.803,172.973));//Akaroa


map.addOverlay(new GPolyline(points,"#ffffff",4,0.6));
map.addOverlay(new GPolyline(points,"#006699",2,0.7));


var points = [];
var adress= [];
var name = [];
points.push(new GLatLng(-43.531,172.628));//CHCH
adress.push("http://homepage3.nifty.com/yasda/journey/nz/003.htm");
name.push("CHCH");

points.push(new GLatLng(-44.003,170.473));//tekapo
name.push("Tekapo");

adress.push("http://homepage3.nifty.com/yasda/journey/nz/005.htm");
points.push(new GLatLng(-43.738,170.105));//CookVillage
name.push("Mt.Cook");

adress.push("http://homepage3.nifty.com/yasda/journey/nz/006.htm");
points.push(new GLatLng(-44.704,169.174));//wanaka
name.push("Wanaka");

adress.push("http://homepage3.nifty.com/yasda/journey/nz/0010.htm");
points.push(new GLatLng(-45.421,167.728));//TeAnau
name.push("Te Anau");

adress.push("http://homepage3.nifty.com/yasda/journey/nz/014.htm");
points.push(new GLatLng(-44.68,167.93));//Milford
name.push("Millford Sound");

adress.push("http://homepage3.nifty.com/yasda/journey/nz/015.htm");
points.push(new GLatLng(-44.871,168.142));//MckellarHut
name.push("Green Stone Track");

adress.push("http://homepage3.nifty.com/yasda/journey/nz/016.htm");
points.push(new GLatLng(-45.042,168.587));//QueensTown
name.push("Queen's Town");

adress.push("http://homepage3.nifty.com/yasda/journey/nz/021.htm");
points.push(new GLatLng(-43.473,170.015));//FoxGlacier
name.push("Fox Glacier");

adress.push("http://homepage3.nifty.com/yasda/journey/nz/022.htm");
points.push(new GLatLng(-42.948,171.566));//As pass
name.push("Arther's Pass");

adress.push("http://homepage3.nifty.com/yasda/journey/nz/023.htm");
points.push(new GLatLng(-42.79,171.55));//CarolHut
name.push("Carol Hut");

points.push(new GLatLng(-43.803,172.973));//Akaroa
adress.push("http://homepage3.nifty.com/yasda/journey/nz/026.htm");
name.push("Akaroa");


for (var i = 0; i <12; i++) {
				map.addOverlay(createMarker(points[i],"NZ旅行記1　2003年2月<BR>"+name[i],adress[i],2));
}

//NZ2
var points = [];
points.push(new GLatLng(-43.532,172.628));//CHCH
points.push(new GLatLng(-43.668,172.134));
points.push(new GLatLng(-44.017,171.535));
points.push(new GLatLng(-44.119,171.31));
points.push(new GLatLng(-44.343,171.238));
points.push(new GLatLng(-44.261,171.12));
points.push(new GLatLng(-44.3,170.923));
points.push(new GLatLng(-44.119,170.843));
points.push(new GLatLng(-44.036,170.684));
points.push(new GLatLng(-44.101,170.576));
points.push(new GLatLng(-44.001,170.466));//tekapo
points.push(new GLatLng(-44.015,170.384));
points.push(new GLatLng(-44.187,170.314));
points.push(new GLatLng(-44.19,170.121));
points.push(new GLatLng(-43.834,170.11));
points.push(new GLatLng(-43.719,170.093));//MtCookCamp
points.push(new GLatLng(-43.721,170.064));//MuellorHut
points.push(new GLatLng(-43.749,170.118));
points.push(new GLatLng(-44.18,170.134));
points.push(new GLatLng(-44.19,170.299));
points.push(new GLatLng(-44.036,170.383));
points.push(new GLatLng(-44.004,170.473));//tekapo
points.push(new GLatLng(-44.101,170.576));
points.push(new GLatLng(-44.036,170.684));
points.push(new GLatLng(-44.119,170.843));
points.push(new GLatLng(-44.036,171.282));
points.push(new GLatLng(-44.046,171.411));
points.push(new GLatLng(-43.777,171.996));
points.push(new GLatLng(-43.451,172.623));
points.push(new GLatLng(-43.063,172.752));
points.push(new GLatLng(-42.832,173.252));
points.push(new GLatLng(-42.405,173.664));//Kaikoura

map.addOverlay(new GPolyline(points,"#ffffff",5,0.6));
map.addOverlay(new GPolyline(points,"#000099",3,0.7));
points.push(new GLatLng(44.624,7.023));

var points = [];
points.push(new GLatLng(-43.532,172.628));//CHCH
points.push(new GLatLng(-44.001,170.466));//tekapo
points.push(new GLatLng(-43.719,170.093));//MtCookCamp
points.push(new GLatLng(-43.721,170.064));//MuellorHut
points.push(new GLatLng(-42.405,173.664));//Kaikoura
for (var i = 0; i <5; i++) {
				map.addOverlay(createMarker(points[i],"NZ旅行記2　2005年10月","http://www.m-lagoon.com/cgi-bin/ysd/NZ2/index.htm",2));
}



//Australia
var points = [];
points.push(new GLatLng(-25.304,130.718));
points.push(new GLatLng(-25.357,130.815));
points.push(new GLatLng(-25.336,131.024));
points.push(new GLatLng(-25.242,130.976));
points.push(new GLatLng(-25.202,131.293));
points.push(new GLatLng(-25.242,131.588));
points.push(new GLatLng(-25.161,132.126));
points.push(new GLatLng(-25.174,132.679));
points.push(new GLatLng(-25.196,133.201));
points.push(new GLatLng(-24.733,133.18));
points.push(new GLatLng(-24.481,133.27));

points.push(new GLatLng(-24.332,133.467));

points.push(new GLatLng(-24.298,133.437));
points.push(new GLatLng(-24.295,133.454));
points.push(new GLatLng(-24.298,133.437));

points.push(new GLatLng(-24.28,133.429));
points.push(new GLatLng(-24.242,133.443));
points.push(new GLatLng(-24.218,133.472));
points.push(new GLatLng(-24.156,133.508));
points.push(new GLatLng(-24.043,133.632));
points.push(new GLatLng(-23.982,133.679));
points.push(new GLatLng(-23.789,133.879));
points.push(new GLatLng(-23.746,133.872));
points.push(new GLatLng(-23.732,133.861));
points.push(new GLatLng(-23.696,133.879));
points.push(new GLatLng(-23.699,133.884));
points.push(new GLatLng(-23.706,133.855));

points.push(new GLatLng(-23.696,133.808));
points.push(new GLatLng(-23.726,133.747));
points.push(new GLatLng(-23.771,133.617));
points.push(new GLatLng(-23.794,133.497));
points.push(new GLatLng(-23.845,133.458));
points.push(new GLatLng(-23.97,133.208));
points.push(new GLatLng(-23.957,133.132));
points.push(new GLatLng(-23.973,133.087));
points.push(new GLatLng(-23.957,133.132));
points.push(new GLatLng(-23.97,133.208));
points.push(new GLatLng(-23.822,133.474));
points.push(new GLatLng(-23.813,133.293));
points.push(new GLatLng(-23.793,133.074));
points.push(new GLatLng(-23.778,133.073));
points.push(new GLatLng(-23.793,133.074));
points.push(new GLatLng(-23.677,132.677));
points.push(new GLatLng(-23.625,132.729));
points.push(new GLatLng(-23.677,132.677));
points.push(new GLatLng(-23.646,132.571));
points.push(new GLatLng(-23.6,132.456));

points.push(new GLatLng(-23.589,132.389));
points.push(new GLatLng(-23.61,132.348));
points.push(new GLatLng(-23.647,132.367));
points.push(new GLatLng(-23.729,132.347));
points.push(new GLatLng(-23.788,132.363));
points.push(new GLatLng(-23.814,132.315));
points.push(new GLatLng(-23.795,132.363));
points.push(new GLatLng(-23.834,132.407));
points.push(new GLatLng(-23.876,132.39));
points.push(new GLatLng(-23.949,132.151));

points.push(new GLatLng(-23.919,132.079));
points.push(new GLatLng(-23.878,131.848));
points.push(new GLatLng(-23.896,131.812));
points.push(new GLatLng(-23.814,131.683));
points.push(new GLatLng(-23.793,131.634));
points.push(new GLatLng(-23.801,131.61));
points.push(new GLatLng(-23.856,131.556));
points.push(new GLatLng(-23.898,131.52));
points.push(new GLatLng(-23.973,131.51));
points.push(new GLatLng(-24.021,131.454));
points.push(new GLatLng(-24.06,131.409));
points.push(new GLatLng(-24.088,131.441));
points.push(new GLatLng(-24.112,131.443));
points.push(new GLatLng(-24.185,131.502));
points.push(new GLatLng(-24.245,131.509));
points.push(new GLatLng(-24.255,131.57));
points.push(new GLatLng(-24.245,131.509));
points.push(new GLatLng(-24.288,131.567));

points.push(new GLatLng(-24.403,131.776));

points.push(new GLatLng(-24.517,132.123));

points.push(new GLatLng(-24.63,132.336));

points.push(new GLatLng(-24.815,132.295));

points.push(new GLatLng(-25.162,132.179));




map.addOverlay(new GPolyline(points,"#ffffff",5,0.6));
map.addOverlay(new GPolyline(points,"#000099",3,0.7));
points.push(new GLatLng(44.624,7.023));

var points = [];
points.push(new GLatLng(-25.242,130.976));
points.push(new GLatLng(-24.295,133.454));
points.push(new GLatLng(-23.699,133.884));
points.push(new GLatLng(-23.778,133.073));
points.push(new GLatLng(-23.625,132.729));
points.push(new GLatLng(-24.255,131.57));
points.push(new GLatLng(-33.876,151.184));



for (var i = 0; i <7; i++) {
				map.addOverlay(createMarker(points[i],"オーストラリア旅行記　2007年11月","http://www.m-lagoon.com/cgi-bin/ysd/aus/index.htm",2));
}



		}
	}