// Generated by trk2googlemaps and kml ( http://etoh.minidns.net/gps/ )
// 本コードはtrk2googlemaps and kmlによって自動生成されました。
numofwaypoints=0;
posofwaypoints=0;
numofphotos=3;
posofphotos=0;
waypoint_markers = [];
waypoint_infos   = [];
photo_markers    = [];
photo_infos      = [];
var points = [];
var map;
var currentzoom;
var key = "ABQIAAAAtpLrn-B4syfPbVPJxKmyAxTxMAoCmBWbYJWySDYqTC8oCrw0JhSdac7E0xo3UI6dxs9qW106eyVWOw";
var movemarkerIcon;
   
// グラフマウスオーバ用のJavaScript
if (document.images)
{
	// 時刻－高度
	var alt = new Image();
	alt.src = "WG20080601013240.files/time-alt.png";

	// 時刻－距離
	var dist = new Image();
	dist.src = "WG20080601013240.files/time-dst.png";

	// 時刻－速度
	var speed = new Image();
	speed.src = "WG20080601013240.files/time-speed.png";
}

// マウスオーバ時
function On(name) 
{
	if (document.images) 
	{
		document.images['graphimage'].src = eval(name + '.src');
	}
}

// ウェイポイント表示用関数
function addWayPoints(map, nType, lat, lon, title)
{
	var point=new GLatLng(lon, lat);
	var Icon = new GIcon();
	var nn;
	if (nType==1){ // 小さな赤いマーカ
		nn=posofphotos+1;
		Icon.image = "http://labs.google.com/ridefinder/images/mm_20_red.png";
		Icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
		Icon.iconSize = new GSize(12, 20);
		Icon.shadowSize = new GSize(22, 20);
		Icon.iconAnchor = new GPoint(6, 20);
		Icon.infoWindowAnchor = new GPoint(5, 1);

		photo_markers.push(new GMarker(point, Icon));
		photo_infos.push('<div style="width: 12em; style: font-size: small">'+title+'</div>');
		GEvent.addListener(photo_markers[posofphotos], "click", function(){jumpphotomarker(nn);});
		map.addOverlay(photo_markers[posofphotos]);
		posofphotos = posofphotos+1;

	}
	else
	{ // |>の形状のマーカ
		nn=posofwaypoints+1;
		Icon.image = "http://www.google.com/mapfiles/dd-start.png";
		Icon.shadow = "http://www.google.com/mapfiles/shadow50.png";
		Icon.iconSize = new GSize(20, 34);
		Icon.shadowSize = new GSize(37, 34);
		Icon.iconAnchor = new GPoint(9, 34);
		Icon.infoWindowAnchor = new GPoint(9, 2);

		waypoint_markers.push(new GMarker(point, Icon));
		waypoint_infos.push('<div style="width: 12em; style: font-size: small">'+title+'</div>');
		GEvent.addListener(waypoint_markers[posofwaypoints], "click",function(){jumpwaypointmarker(nn);});
		map.addOverlay(waypoint_markers[posofwaypoints]);
		posofwaypoints=posofwaypoints+1;
	}
}
	

// HTMLロード時
function load()
{
	// 初期化パラメータ
	var mapwidth=640;  // 地図の幅を設定します。
	var mapheight=480; // 地図の高さを設定します。
	var zoom=-1;    // この値を変更すると初期ズーム値が変わります。-1の場合は自動となります。
	var linecolor="#FF0000"; // この値を変更すると、線の色が変わります。
	var linewidth=2; // この値を変更すると、線の太さが変わります。 
	var lineopacity=1.00;   // この値を変更すると、線の透明度が変わります。
	var defaultmaptype=0; // この値を変更すると初期のマップタイプが変更されます。
	var wpt_points = [];

	// トラックデータ列です。
		points.push(new GLatLng(43.16492,141.3423));
	points.push(new GLatLng(43.16496,141.3423));
	points.push(new GLatLng(43.16499,141.3423));
	points.push(new GLatLng(43.165,141.3423));
	points.push(new GLatLng(43.16497,141.3424));
	points.push(new GLatLng(43.16491,141.3427));
	points.push(new GLatLng(43.16445,141.343));
	points.push(new GLatLng(43.16471,141.3429));
	points.push(new GLatLng(43.16566,141.3436));
	points.push(new GLatLng(43.16596,141.3443));
	points.push(new GLatLng(43.16578,141.3454));
	points.push(new GLatLng(43.16531,141.3465));
	points.push(new GLatLng(43.16557,141.3471));
	points.push(new GLatLng(43.16521,141.3484));
	points.push(new GLatLng(43.16513,141.3495));
	points.push(new GLatLng(43.16536,141.3495));
	points.push(new GLatLng(43.16539,141.3495));
	points.push(new GLatLng(43.16539,141.3496));
	points.push(new GLatLng(43.16536,141.3496));
	points.push(new GLatLng(43.16537,141.3501));
	points.push(new GLatLng(43.1655,141.3511));
	points.push(new GLatLng(43.1656,141.3519));
	points.push(new GLatLng(43.16572,141.3524));
	points.push(new GLatLng(43.16579,141.3526));
	points.push(new GLatLng(43.16538,141.3527));
	points.push(new GLatLng(43.16471,141.3532));
	points.push(new GLatLng(43.16405,141.354));
	points.push(new GLatLng(43.16348,141.3549));
	points.push(new GLatLng(43.16291,141.3558));
	points.push(new GLatLng(43.16321,141.3568));
	points.push(new GLatLng(43.16394,141.3575));
	points.push(new GLatLng(43.16457,141.3586));
	points.push(new GLatLng(43.16515,141.3595));
	points.push(new GLatLng(43.16551,141.3607));
	points.push(new GLatLng(43.16547,141.362));
	points.push(new GLatLng(43.16549,141.3633));
	points.push(new GLatLng(43.16543,141.3646));
	points.push(new GLatLng(43.1654,141.3659));
	points.push(new GLatLng(43.16536,141.367));
	points.push(new GLatLng(43.16536,141.3681));
	points.push(new GLatLng(43.16536,141.3692));
	points.push(new GLatLng(43.16526,141.3703));
	points.push(new GLatLng(43.16525,141.3715));
	points.push(new GLatLng(43.16522,141.3727));
	points.push(new GLatLng(43.1652,141.3739));
	points.push(new GLatLng(43.16516,141.375));
	points.push(new GLatLng(43.16519,141.376));
	points.push(new GLatLng(43.16554,141.3772));
	points.push(new GLatLng(43.16582,141.3783));
	points.push(new GLatLng(43.16615,141.3795));
	points.push(new GLatLng(43.16649,141.3806));
	points.push(new GLatLng(43.16683,141.3818));
	points.push(new GLatLng(43.16719,141.383));
	points.push(new GLatLng(43.16754,141.3843));
	points.push(new GLatLng(43.16788,141.3855));
	points.push(new GLatLng(43.16813,141.3868));
	points.push(new GLatLng(43.16817,141.388));
	points.push(new GLatLng(43.16821,141.3891));
	points.push(new GLatLng(43.16766,141.3923));
	points.push(new GLatLng(43.16754,141.3932));
	points.push(new GLatLng(43.16744,141.3943));
	points.push(new GLatLng(43.16736,141.3953));
	points.push(new GLatLng(43.16731,141.3963));
	points.push(new GLatLng(43.16718,141.397));
	points.push(new GLatLng(43.16734,141.3983));
	points.push(new GLatLng(43.16791,141.3997));
	points.push(new GLatLng(43.16798,141.4009));
	points.push(new GLatLng(43.16779,141.4019));
	points.push(new GLatLng(43.16755,141.403));
	points.push(new GLatLng(43.16714,141.4041));
	points.push(new GLatLng(43.16644,141.4048));
	points.push(new GLatLng(43.16574,141.4055));
	points.push(new GLatLng(43.16404,141.406));
	points.push(new GLatLng(43.16359,141.406));
	points.push(new GLatLng(43.16137,141.4056));
	points.push(new GLatLng(43.16069,141.405));
	points.push(new GLatLng(43.1601,141.404));
	points.push(new GLatLng(43.15919,141.4038));
	points.push(new GLatLng(43.15834,141.4036));
	points.push(new GLatLng(43.15774,141.4037));
	points.push(new GLatLng(43.15767,141.4052));
	points.push(new GLatLng(43.15759,141.4065));
	points.push(new GLatLng(43.15752,141.4075));
	points.push(new GLatLng(43.15746,141.4082));
	points.push(new GLatLng(43.15741,141.409));
	points.push(new GLatLng(43.15733,141.4101));
	points.push(new GLatLng(43.15722,141.4115));
	points.push(new GLatLng(43.15714,141.4129));
	points.push(new GLatLng(43.15712,141.4131));
	points.push(new GLatLng(43.1571,141.4135));
	points.push(new GLatLng(43.15706,141.414));
	points.push(new GLatLng(43.15705,141.414));
	points.push(new GLatLng(43.15696,141.414));
	points.push(new GLatLng(43.15655,141.414));
	points.push(new GLatLng(43.1558,141.4139));
	points.push(new GLatLng(43.15498,141.4137));
	points.push(new GLatLng(43.15419,141.4136));
	points.push(new GLatLng(43.15337,141.4135));
	points.push(new GLatLng(43.15257,141.4133));
	points.push(new GLatLng(43.15177,141.4132));
	points.push(new GLatLng(43.15102,141.4131));
	points.push(new GLatLng(43.15041,141.413));
	points.push(new GLatLng(43.14978,141.4129));
	points.push(new GLatLng(43.14896,141.4127));
	points.push(new GLatLng(43.14818,141.4126));
	points.push(new GLatLng(43.14738,141.4125));
	points.push(new GLatLng(43.14663,141.4124));
	points.push(new GLatLng(43.14587,141.4122));
	points.push(new GLatLng(43.14507,141.4121));
	points.push(new GLatLng(43.14429,141.4119));
	points.push(new GLatLng(43.14352,141.4117));
	points.push(new GLatLng(43.14283,141.4117));
	points.push(new GLatLng(43.14195,141.4118));
	points.push(new GLatLng(43.14118,141.412));
	points.push(new GLatLng(43.14043,141.4123));
	points.push(new GLatLng(43.13972,141.4127));
	points.push(new GLatLng(43.13909,141.4132));
	points.push(new GLatLng(43.13852,141.4136));
	points.push(new GLatLng(43.13792,141.414));
	points.push(new GLatLng(43.13734,141.4144));
	points.push(new GLatLng(43.13682,141.4148));
	points.push(new GLatLng(43.13618,141.4153));
	points.push(new GLatLng(43.13556,141.4157));
	points.push(new GLatLng(43.13492,141.4162));
	points.push(new GLatLng(43.1343,141.4166));
	points.push(new GLatLng(43.13361,141.417));
	points.push(new GLatLng(43.13294,141.4175));
	points.push(new GLatLng(43.13233,141.4179));
	points.push(new GLatLng(43.1317,141.4183));
	points.push(new GLatLng(43.13102,141.4187));
	points.push(new GLatLng(43.13026,141.419));
	points.push(new GLatLng(43.12952,141.419));
	points.push(new GLatLng(43.12871,141.4189));
	points.push(new GLatLng(43.12834,141.4189));
	points.push(new GLatLng(43.12855,141.4197));
	points.push(new GLatLng(43.12801,141.4201));
	points.push(new GLatLng(43.1276,141.4204));
	points.push(new GLatLng(43.12753,141.4205));
	points.push(new GLatLng(43.12755,141.4204));
	points.push(new GLatLng(43.12757,141.4204));
	points.push(new GLatLng(43.12758,141.4204));
	points.push(new GLatLng(43.12748,141.4205));
	points.push(new GLatLng(43.12682,141.4209));
	points.push(new GLatLng(43.12686,141.4218));
	points.push(new GLatLng(43.12724,141.4231));
	points.push(new GLatLng(43.12762,141.4243));
	points.push(new GLatLng(43.12773,141.4258));
	points.push(new GLatLng(43.1278,141.4273));
	points.push(new GLatLng(43.12767,141.4285));
	points.push(new GLatLng(43.12791,141.4297));
	points.push(new GLatLng(43.12798,141.431));
	points.push(new GLatLng(43.12797,141.4322));
	points.push(new GLatLng(43.12764,141.4332));
	points.push(new GLatLng(43.12726,141.4342));
	points.push(new GLatLng(43.12675,141.4354));
	points.push(new GLatLng(43.12591,141.4359));
	points.push(new GLatLng(43.12511,141.4358));
	points.push(new GLatLng(43.12443,141.4351));
	points.push(new GLatLng(43.12395,141.4341));
	points.push(new GLatLng(43.12361,141.4332));
	points.push(new GLatLng(43.12294,141.4324));
	points.push(new GLatLng(43.12242,141.4314));
	points.push(new GLatLng(43.12202,141.4304));
	points.push(new GLatLng(43.12182,141.4298));
	points.push(new GLatLng(43.12201,141.4296));
	points.push(new GLatLng(43.122,141.4296));
	points.push(new GLatLng(43.12194,141.4297));
	points.push(new GLatLng(43.12193,141.4297));
	points.push(new GLatLng(43.12152,141.4296));
	points.push(new GLatLng(43.12117,141.4286));
	points.push(new GLatLng(43.12082,141.4274));
	points.push(new GLatLng(43.12034,141.4264));
	points.push(new GLatLng(43.11962,141.4256));
	points.push(new GLatLng(43.11893,141.4245));
	points.push(new GLatLng(43.11905,141.4234));
	points.push(new GLatLng(43.11988,141.4229));
	points.push(new GLatLng(43.12077,141.4224));
	points.push(new GLatLng(43.12172,141.4216));
	points.push(new GLatLng(43.12269,141.4213));
	points.push(new GLatLng(43.12354,141.4218));
	points.push(new GLatLng(43.12441,141.4221));
	points.push(new GLatLng(43.12491,141.421));
	points.push(new GLatLng(43.12582,141.4204));
	points.push(new GLatLng(43.12664,141.4213));
	points.push(new GLatLng(43.12709,141.4225));
	points.push(new GLatLng(43.12738,141.4235));
	points.push(new GLatLng(43.12729,141.4237));
	points.push(new GLatLng(43.12731,141.4237));
	points.push(new GLatLng(43.1273,141.4237));
	points.push(new GLatLng(43.12727,141.4238));
	points.push(new GLatLng(43.12723,141.4238));
	points.push(new GLatLng(43.12725,141.4237));
	points.push(new GLatLng(43.12725,141.4237));
	points.push(new GLatLng(43.12729,141.4237));
	points.push(new GLatLng(43.1273,141.4237));
	points.push(new GLatLng(43.1273,141.4237));
	points.push(new GLatLng(43.12726,141.4237));
	points.push(new GLatLng(43.12726,141.4237));
	points.push(new GLatLng(43.12725,141.4237));
	points.push(new GLatLng(43.12719,141.4237));
	points.push(new GLatLng(43.12714,141.4237));
	points.push(new GLatLng(43.12715,141.4237));
	points.push(new GLatLng(43.12718,141.4238));
	points.push(new GLatLng(43.12719,141.4236));
	points.push(new GLatLng(43.1272,141.4237));
	points.push(new GLatLng(43.12723,141.4236));
	points.push(new GLatLng(43.12722,141.4237));
	points.push(new GLatLng(43.12722,141.4237));
	points.push(new GLatLng(43.12722,141.4237));
	points.push(new GLatLng(43.12732,141.4237));
	points.push(new GLatLng(43.12768,141.425));
	points.push(new GLatLng(43.12766,141.4268));
	points.push(new GLatLng(43.12769,141.4285));
	points.push(new GLatLng(43.12796,141.4299));
	points.push(new GLatLng(43.12806,141.4313));
	points.push(new GLatLng(43.12794,141.4326));
	points.push(new GLatLng(43.12749,141.4337));
	points.push(new GLatLng(43.127,141.435));
	points.push(new GLatLng(43.12627,141.4359));
	points.push(new GLatLng(43.12532,141.4361));
	points.push(new GLatLng(43.12455,141.4353));
	points.push(new GLatLng(43.12405,141.4342));
	points.push(new GLatLng(43.12349,141.433));
	points.push(new GLatLng(43.12272,141.432));
	points.push(new GLatLng(43.1222,141.4309));
	points.push(new GLatLng(43.12174,141.4297));
	points.push(new GLatLng(43.12132,141.4286));
	points.push(new GLatLng(43.12082,141.4275));
	points.push(new GLatLng(43.12029,141.4264));
	points.push(new GLatLng(43.11951,141.4255));
	points.push(new GLatLng(43.11895,141.4241));
	points.push(new GLatLng(43.11932,141.4231));
	points.push(new GLatLng(43.11988,141.4228));
	points.push(new GLatLng(43.12071,141.4223));
	points.push(new GLatLng(43.12154,141.4217));
	points.push(new GLatLng(43.12238,141.4212));
	points.push(new GLatLng(43.12331,141.4216));
	points.push(new GLatLng(43.12422,141.4223));
	points.push(new GLatLng(43.12492,141.4211));
	points.push(new GLatLng(43.12574,141.4203));
	points.push(new GLatLng(43.12666,141.4215));
	points.push(new GLatLng(43.12712,141.4226));
	points.push(new GLatLng(43.12742,141.4237));
	points.push(new GLatLng(43.12738,141.4238));
	points.push(new GLatLng(43.12736,141.4237));
	points.push(new GLatLng(43.12736,141.4237));
	points.push(new GLatLng(43.12759,141.4241));
	points.push(new GLatLng(43.12777,141.4253));
	points.push(new GLatLng(43.12774,141.4267));
	points.push(new GLatLng(43.12767,141.4281));
	points.push(new GLatLng(43.12784,141.4293));
	points.push(new GLatLng(43.12734,141.43));
	points.push(new GLatLng(43.12671,141.4305));
	points.push(new GLatLng(43.12622,141.4307));
	points.push(new GLatLng(43.12586,141.43));
	points.push(new GLatLng(43.12542,141.4289));
	points.push(new GLatLng(43.125,141.4279));
	points.push(new GLatLng(43.12463,141.4269));
	points.push(new GLatLng(43.12408,141.4263));
	points.push(new GLatLng(43.1237,141.4253));
	points.push(new GLatLng(43.12345,141.4247));
	points.push(new GLatLng(43.12284,141.4239));
	points.push(new GLatLng(43.1221,141.4238));
	points.push(new GLatLng(43.12152,141.4234));
	points.push(new GLatLng(43.12111,141.4224));
	points.push(new GLatLng(43.12182,141.4217));
	points.push(new GLatLng(43.12262,141.4213));
	points.push(new GLatLng(43.12342,141.422));
	points.push(new GLatLng(43.12429,141.4222));
	points.push(new GLatLng(43.12487,141.4211));
	points.push(new GLatLng(43.12549,141.4204));
	points.push(new GLatLng(43.12643,141.4208));
	points.push(new GLatLng(43.12735,141.4209));
	points.push(new GLatLng(43.12829,141.4201));
	points.push(new GLatLng(43.12869,141.4198));
	points.push(new GLatLng(43.12859,141.4189));
	points.push(new GLatLng(43.12905,141.4186));
	points.push(new GLatLng(43.13025,141.4185));
	points.push(new GLatLng(43.13137,141.4181));
	points.push(new GLatLng(43.13245,141.4174));
	points.push(new GLatLng(43.13355,141.4166));
	points.push(new GLatLng(43.1347,141.4158));
	points.push(new GLatLng(43.13586,141.415));
	points.push(new GLatLng(43.13693,141.4143));
	points.push(new GLatLng(43.13801,141.4136));
	points.push(new GLatLng(43.13904,141.4129));
	points.push(new GLatLng(43.14009,141.4122));
	points.push(new GLatLng(43.14123,141.4117));
	points.push(new GLatLng(43.14243,141.4114));
	points.push(new GLatLng(43.14374,141.4115));
	points.push(new GLatLng(43.14511,141.4116));
	points.push(new GLatLng(43.14635,141.4119));
	points.push(new GLatLng(43.14751,141.4121));
	points.push(new GLatLng(43.1487,141.4123));
	points.push(new GLatLng(43.14992,141.4125));
	points.push(new GLatLng(43.15075,141.4126));
	points.push(new GLatLng(43.15101,141.4128));
	points.push(new GLatLng(43.15153,141.4127));
	points.push(new GLatLng(43.15245,141.4129));
	points.push(new GLatLng(43.15339,141.413));
	points.push(new GLatLng(43.15418,141.4131));
	points.push(new GLatLng(43.15505,141.4133));
	points.push(new GLatLng(43.15598,141.4135));
	points.push(new GLatLng(43.15683,141.4132));
	points.push(new GLatLng(43.15698,141.412));
	points.push(new GLatLng(43.15709,141.4107));
	points.push(new GLatLng(43.15722,141.4093));
	points.push(new GLatLng(43.1573,141.4084));
	points.push(new GLatLng(43.15744,141.4072));
	points.push(new GLatLng(43.15765,141.4055));
	points.push(new GLatLng(43.15765,141.4046));
	points.push(new GLatLng(43.158,141.4036));
	points.push(new GLatLng(43.15903,141.4034));
	points.push(new GLatLng(43.16008,141.4035));
	points.push(new GLatLng(43.16064,141.4046));
	points.push(new GLatLng(43.16124,141.4054));
	points.push(new GLatLng(43.16219,141.4056));
	points.push(new GLatLng(43.16314,141.4058));
	points.push(new GLatLng(43.16407,141.406));
	points.push(new GLatLng(43.16512,141.4059));
	points.push(new GLatLng(43.16596,141.4052));
	points.push(new GLatLng(43.16668,141.4046));
	points.push(new GLatLng(43.16734,141.4034));
	points.push(new GLatLng(43.16769,141.402));
	points.push(new GLatLng(43.168,141.4005));
	points.push(new GLatLng(43.16769,141.3993));
	points.push(new GLatLng(43.16729,141.398));
	points.push(new GLatLng(43.16717,141.3971));
	points.push(new GLatLng(43.1672,141.3967));
	points.push(new GLatLng(43.1673,141.3957));
	points.push(new GLatLng(43.16741,141.3944));
	points.push(new GLatLng(43.16744,141.3932));
	points.push(new GLatLng(43.1675,141.3921));
	points.push(new GLatLng(43.16789,141.3906));
	points.push(new GLatLng(43.16811,141.389));
	points.push(new GLatLng(43.16801,141.3878));
	points.push(new GLatLng(43.16809,141.3867));
	points.push(new GLatLng(43.16795,141.3857));
	points.push(new GLatLng(43.16751,141.3844));
	points.push(new GLatLng(43.1671,141.3831));
	points.push(new GLatLng(43.16667,141.3817));
	points.push(new GLatLng(43.16633,141.3804));
	points.push(new GLatLng(43.16601,141.3792));
	points.push(new GLatLng(43.16564,141.3781));
	points.push(new GLatLng(43.16549,141.3766));
	points.push(new GLatLng(43.16518,141.3754));
	points.push(new GLatLng(43.16523,141.3735));
	points.push(new GLatLng(43.16538,141.372));
	points.push(new GLatLng(43.16547,141.3702));
	points.push(new GLatLng(43.16548,141.3689));
	points.push(new GLatLng(43.16557,141.3675));
	points.push(new GLatLng(43.16525,141.3658));
	points.push(new GLatLng(43.1653,141.3642));
	points.push(new GLatLng(43.16535,141.3623));
	points.push(new GLatLng(43.16536,141.3612));
	points.push(new GLatLng(43.16556,141.3599));
	points.push(new GLatLng(43.16473,141.3591));
	points.push(new GLatLng(43.16407,141.3583));
	points.push(new GLatLng(43.16346,141.3575));
	points.push(new GLatLng(43.16291,141.3568));
	points.push(new GLatLng(43.16286,141.356));
	points.push(new GLatLng(43.16351,141.355));
	points.push(new GLatLng(43.16386,141.3546));
	points.push(new GLatLng(43.16437,141.354));
	points.push(new GLatLng(43.16512,141.3531));
	points.push(new GLatLng(43.16576,141.3524));
	points.push(new GLatLng(43.16593,141.3523));
	points.push(new GLatLng(43.16573,141.3521));
	points.push(new GLatLng(43.16557,141.3515));
	points.push(new GLatLng(43.16555,141.3508));
	points.push(new GLatLng(43.16525,141.3504));
	points.push(new GLatLng(43.16518,141.3502));
	points.push(new GLatLng(43.16516,141.3498));
	points.push(new GLatLng(43.16525,141.3493));
	points.push(new GLatLng(43.16525,141.3484));
	points.push(new GLatLng(43.16547,141.3473));
	points.push(new GLatLng(43.16523,141.3465));
	points.push(new GLatLng(43.16519,141.3457));
	points.push(new GLatLng(43.16576,141.3437));
	points.push(new GLatLng(43.16568,141.3427));
	points.push(new GLatLng(43.16516,141.3423));
	points.push(new GLatLng(43.1651,141.3423));
	points.push(new GLatLng(43.1651,141.3422));
	points.push(new GLatLng(43.16508,141.3423));
	points.push(new GLatLng(43.16505,141.3423));
	points.push(new GLatLng(43.16507,141.3423));
	points.push(new GLatLng(43.1651,141.3422));
	points.push(new GLatLng(43.16513,141.3423));
	points.push(new GLatLng(43.16507,141.3423));
	points.push(new GLatLng(43.16504,141.3422));
	points.push(new GLatLng(43.16505,141.3423));
	points.push(new GLatLng(43.16507,141.3422));
	points.push(new GLatLng(43.16508,141.3422));
	points.push(new GLatLng(43.16509,141.3422));
	points.push(new GLatLng(43.16507,141.3423));
	points.push(new GLatLng(43.16507,141.3423));
	points.push(new GLatLng(43.16507,141.3423));
	wpt_points.push(new GLatLng(43.1276546666667,141.42036));
	wpt_points.push(new GLatLng(43.127586,141.42042));
	wpt_points.push(new GLatLng(43.1223933333333,141.431333333333));


	// 表示の中心位置・サイズを算出します。
	var xavg=0;
	var yavg=0;
	var xmin=181;
	var xmax=-181;
	var ymin=91;
	var ymax=-91;
	for (var i=0; i<points.length; i++)
	{
		if (xmin>points[i].x) xmin=points[i].x;
		if (xmax<points[i].x) xmax=points[i].x;
		if (ymin>points[i].y) ymin=points[i].y;
		if (ymax<points[i].y) ymax=points[i].y;
	}
	for (var i=0; i<wpt_points.length; i++)
	{
		if (xmin>wpt_points[i].x) xmin=wpt_points[i].x;
		if (xmax<wpt_points[i].x) xmax=wpt_points[i].x;
		if (ymin>wpt_points[i].y) ymin=wpt_points[i].y;
		if (ymax<wpt_points[i].y) ymax=wpt_points[i].y;
	}
		
	xavg=(xmax+xmin)/2;
	yavg=(ymax+ymin)/2;
	var centerpos=new GLatLng( yavg, xavg);
	var region=new GLatLngBounds(new GLatLng(ymin,xmin), new GLatLng(ymax, xmax));
	
	// マップ初期化	
	map = new GMap2(document.getElementById("map"));
	map.addControl(new GLargeMapControl());
	map.addMapType(G_PHYSICAL_MAP);
	map.addControl(new GHierarchicalMapTypeControl());
	map.enableContinuousZoom();
	map.enableDoubleClickZoom();
	map.addControl(new GOverviewMapControl());
	
	if (zoom>0)
	{
		map.setCenter(centerpos, 17-zoom);
	}
	else
	{
		map.setCenter(centerpos, map.getBoundsZoomLevel(region));
	}
	
	// 軌跡再生アイコン
	movemarkerIcon = new GIcon();
	movemarkerIcon.iconSize = new GSize(32, 32);
	movemarkerIcon.shadowSize = new GSize(59, 32);
	movemarkerIcon.iconAnchor = new GPoint(16, 16);
	movemarkerIcon.infoWindowAnchor = new GPoint(1, 1);
	movemarkerIcon.image = "http://maps.google.co.jp/mapfiles/ms/icons/hospitals.png";
	movemarkerIcon.shadow = "http://maps.google.co.jp/mapfiles/ms/icons/hospitals.shadow.png";

	var overlay;
	if (points.length > 0)
	{
		//var encoded_points = "{36}";
		//var encoded_levels = "{37}";
		//overlay = GPolyline.fromEncoded({color: linecolor,
	    //                                      weight: linewidth,
	    //                                      points: encoded_points,
	    //                                      zoomFactor: 32,
		//                                      levels: encoded_levels,
		//                                      numLevels: 4
		//                                    });
		//map.addOverlay(overlay); 
		
		// トラックログがあった場合：
		// 線の色と幅と不透明度を設定します。
		var polyline= new GPolyline(points, linecolor, linewidth, lineopacity);

		// 線を描画します。
		map.addOverlay(polyline);
	}
		
	// 初期マップタイプ設定
	switch(defaultmaptype)
	{
		case 0:
		map.setMapType(G_NORMAL_MAP);   	//This is the normal street map type.
		break;
		
		case 1:
		map.setMapType(G_SATELLITE_MAP); //This map type shows Google Earth satellite images.
		break;
	
		case 2:
		map.setMapType(G_HYBRID_MAP); 	//This map type shows transparent street maps over Google Earth satellite images.
		break;
		
		case 3:
		map.setMapType(G_PHYSICAL_MAP); 
		break;		
	
		default:
		map.setMapType(G_NORMAL_MAP);
		break;
	}
	addWayPoints(map, 1,141.42036,43.1276546666667,"<b><a href=\""+relativepathtomainhtml+"#photoID1\">モエレ沼と公園の丘</a></b><br /><a href=\""+relativepathtosubfolder+"IMGP2286.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMGP2286-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:06:01 11:08:23<br />E141°25′13.30″<br />N43°7′39.56″<br />7.7m<br />北海道札幌市東区中沼町<hr />札幌は川が多い、そしてこのモエレ沼もそんな川の三日月湖です。よす整備され風光明媚です。</small>");
	addWayPoints(map, 1,141.42042,43.127586,"<b><a href=\""+relativepathtomainhtml+"#photoID2\">IMGP2287</a></b><br /><a href=\""+relativepathtosubfolder+"IMGP2287.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMGP2287-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:06:01 11:08:28<br />E141°25′13.51″<br />N43°7′39.31″<br />7.8m<br />北海道札幌市東区中沼町<hr />この山は札幌の地図に最後に載った山です。「モエレ山」<br />人工の山です。</small>");
	addWayPoints(map, 1,141.431333333333,43.1223933333333,"<b><a href=\""+relativepathtomainhtml+"#photoID3\">IMGP2288</a></b><br /><a href=\""+relativepathtosubfolder+"IMGP2288.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMGP2288-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:06:01 11:14:41<br />E141°25′52.80″<br />N43°7′20.62″<br />10.1m<br />北海道札幌市東区丘珠町<hr />公園にある施設です。施設はデザインで表彰を受けています。</small>");


	if (numofwaypoints == 0)
	{
		hiddenLAYER('waypointcombo');
	}
	if (numofphotos==0)
	{
		hiddenLAYER('photocombo');
	}
	if (callHiddenLayers==1)
	{
		hiddenLayers();
	}
	
} // end of load() function.


var moveMarker;
var obj2;
var strStart ="開始";
var strStop = "始点へ";
var strPause ="一時停止";
function operateTracking(obj) 
{
	if(obj.value == strStart)
	{
		obj.value = strPause;
		panTo(strStart, obj);
		obj2 = obj;
	}
	else if (obj.value == strPause)
	{
		panTo(strPause, obj);
		obj2 = obj;
	}
	else if (obj.value == strStop)
	{
		panTo(strStop, obj);
		if (obj2) obj2.value=strStart;
	}
	else
	{
		obj.value="";
	}
}
    

var iCurrent=0;
var timerID;
function panTo(state, obj)
{
	if (state==strStart)
	{
		map.panTo(points[iCurrent]);
		if (moveMarker == null)
		{
			moveMarker = new GMarker(points[iCurrent], movemarkerIcon);
			map.addOverlay(moveMarker);
		}
		else
		{
			moveMarker.setLatLng(points[iCurrent]);
		}
		iCurrent++;
		if (timerID != null) window.clearTimeout(timerID);
		timerID = window.setTimeout(function(){ panTo(strStart, obj); }, 60000/points.length);
		if (iCurrent==points.length)
		{
			obj.value=strStart;
			panTo(strStop, obj);
		}
	}
	else if (state==strStop)
	{
		iCurrent=0;
		if (moveMarker == null)
		{
			moveMarker = new GMarker(points[iCurrent], movemarkerIcon);
			map.addOverlay(moveMarker);
		}
		else
		{
			moveMarker.setLatLng(points[iCurrent]);
		}
		map.panTo(points[iCurrent]);
		if (timerID != null) window.clearTimeout(timerID);
	}
	else
	{
		obj.value = strStart;
		if (timerID != null) window.clearTimeout(timerID);
	}
}	

// 指定された写真へジャンプ
function jumpphotomarker(n)
{
	photo_markers[n-1].openInfoWindowHtml(photo_infos[n-1]);
	location.hash="#googlemap";
}
	
// 指定されたマーカーへジャンプ
function jumpwaypointmarker(n)
{
	waypoint_markers[n-1].openInfoWindowHtml(waypoint_infos[n-1]);
	location.hash="#googlemap";
}

// グラフは初期状態では消しておく
function hiddenLayers()
{
	hiddenLAYER('graph1');
	hiddenLAYER('graph2');
	hiddenLAYER('graph3');
}

// 指定したレイヤーを非表示にする
function hiddenLAYER(idName)
{ 
	if ( document.getElementById )
	{
		document.getElementById( idName ).style.visibility='hidden';
	}
	else if ( document.all )
	{
		document.all( idName ).style.visibility = 'hidden';
	}
	else if ( document.layers )
	{
		document.layers[ idName ].visibility = 'hidden';
	}
}

// 指定したレイヤーを表示する
function showLAYER(idName)
{
	if ( document.getElementById )
	{
		document.getElementById( idName ).style.visibility   = 'visible';
	}
	else if ( document.all )
	{
		document.all( idName ).style.visibility = 'visible';
	}
	else if ( document.layers )
	{
		document.layers[ idName ].visibility = 'visible';
	}
}

// 地図を表示する
function showMapPop( idName, lat, lon )
{ 
	var svalue;
	var zoomlevel;
	if (map == null)
	{
		if (currentzoom == null)
		{
			zoomlevel=12; // 指定がない場合	
		}
		else
		{
			zoomlevel=currentzoom; // htmlファイルに?xxでズームレベルが渡されたとき
		}
	}
	else
	{
		zoomlevel=map.getZoom();
	}
	svalue = ".<img src=\"http://maps.google.com/staticmap?center="+lat+","+lon+"&markers="+lat+","+lon+",blue&zoom="+zoomlevel+"&size=240x240&key="+key+"\" width=\"240\" height=\"240\"  />.";

	if ( document.getElementById )
	{
		document.getElementById( idName ).style.display="block";
		document.getElementById( idName ).innerHTML = svalue;
	}
	else if ( document.all )
	{
		 document.all( idName ).style.display="block";
		 document.all( idName ).innerHTML=svalue;
	}
	else if ( document.layers )
	{ 
		document.layers[ idName ].display = "block";
		document.layers[ idName ].innerHTML  = svalue;
	}
}

// 地図を消す
function hideMapPop( idName )
{
	if ( document.getElementById )
	{
		document.getElementById( idName ).style.display="none";
	}
	else if ( document.all )
	{
		document.all( idName ).style.display="none";
	}
	else if ( document.layers )
	{
		document.layers[ idName ].display="none";
	}
}

// ズームレベルを渡しながらページを移動する。
function goPhotopage(url, hash)
{
	location.href=url+"?"+map.getZoom()+hash;
}

