// Generated by trk2googlemaps and kml ( http://etoh.minidns.net/gps/ )
// 本コードはtrk2googlemaps and kmlによって自動生成されました。
numofwaypoints=0;
posofwaypoints=0;
numofphotos=9;
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 = "WG20080611210538.files/time-alt.png";

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

	// 時刻－速度
	var speed = new Image();
	speed.src = "WG20080611210538.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.16514,141.3422));
	points.push(new GLatLng(43.16509,141.3422));
	points.push(new GLatLng(43.16502,141.3422));
	points.push(new GLatLng(43.16504,141.3421));
	points.push(new GLatLng(43.16506,141.3422));
	points.push(new GLatLng(43.16505,141.3422));
	points.push(new GLatLng(43.16506,141.3421));
	points.push(new GLatLng(43.16529,141.3425));
	points.push(new GLatLng(43.16653,141.3415));
	points.push(new GLatLng(43.16735,141.341));
	points.push(new GLatLng(43.16749,141.3407));
	points.push(new GLatLng(43.16784,141.3402));
	points.push(new GLatLng(43.16797,141.3382));
	points.push(new GLatLng(43.16813,141.337));
	points.push(new GLatLng(43.16808,141.3356));
	points.push(new GLatLng(43.16794,141.3342));
	points.push(new GLatLng(43.16783,141.3329));
	points.push(new GLatLng(43.16777,141.3316));
	points.push(new GLatLng(43.16761,141.3302));
	points.push(new GLatLng(43.16773,141.3283));
	points.push(new GLatLng(43.168,141.3269));
	points.push(new GLatLng(43.16828,141.3255));
	points.push(new GLatLng(43.16851,141.3242));
	points.push(new GLatLng(43.16901,141.3228));
	points.push(new GLatLng(43.16994,141.3211));
	points.push(new GLatLng(43.16953,141.3218));
	points.push(new GLatLng(43.16964,141.3215));
	points.push(new GLatLng(43.17038,141.3202));
	points.push(new GLatLng(43.17079,141.319));
	points.push(new GLatLng(43.17143,141.3179));
	points.push(new GLatLng(43.17198,141.3169));
	points.push(new GLatLng(43.17236,141.3159));
	points.push(new GLatLng(43.17353,141.3162));
	points.push(new GLatLng(43.1743,141.3168));
	points.push(new GLatLng(43.17523,141.3175));
	points.push(new GLatLng(43.17607,141.3181));
	points.push(new GLatLng(43.17691,141.3187));
	points.push(new GLatLng(43.17769,141.3193));
	points.push(new GLatLng(43.17851,141.3199));
	points.push(new GLatLng(43.17942,141.3205));
	points.push(new GLatLng(43.18022,141.3211));
	points.push(new GLatLng(43.18103,141.3217));
	points.push(new GLatLng(43.18184,141.3223));
	points.push(new GLatLng(43.18253,141.3226));
	points.push(new GLatLng(43.1827,141.3226));
	points.push(new GLatLng(43.18387,141.3232));
	points.push(new GLatLng(43.18497,141.3235));
	points.push(new GLatLng(43.18602,141.3238));
	points.push(new GLatLng(43.18713,141.3245));
	points.push(new GLatLng(43.18807,141.3249));
	points.push(new GLatLng(43.1888,141.325));
	points.push(new GLatLng(43.1896,141.3254));
	points.push(new GLatLng(43.19054,141.3258));
	points.push(new GLatLng(43.19166,141.3261));
	points.push(new GLatLng(43.19273,141.3266));
	points.push(new GLatLng(43.19381,141.3266));
	points.push(new GLatLng(43.1941,141.3252));
	points.push(new GLatLng(43.19443,141.3239));
	points.push(new GLatLng(43.19469,141.3228));
	points.push(new GLatLng(43.1952,141.3206));
	points.push(new GLatLng(43.19538,141.3194));
	points.push(new GLatLng(43.19564,141.3181));
	points.push(new GLatLng(43.19581,141.3173));
	points.push(new GLatLng(43.19588,141.3172));
	points.push(new GLatLng(43.19592,141.3172));
	points.push(new GLatLng(43.19596,141.3172));
	points.push(new GLatLng(43.19593,141.317));
	points.push(new GLatLng(43.19658,141.3163));
	points.push(new GLatLng(43.19686,141.3167));
	points.push(new GLatLng(43.19727,141.3164));
	points.push(new GLatLng(43.19738,141.3159));
	points.push(new GLatLng(43.19711,141.3167));
	points.push(new GLatLng(43.19703,141.3176));
	points.push(new GLatLng(43.1973,141.3179));
	points.push(new GLatLng(43.1973,141.3179));
	points.push(new GLatLng(43.19724,141.3181));
	points.push(new GLatLng(43.1973,141.318));
	points.push(new GLatLng(43.1973,141.3179));
	points.push(new GLatLng(43.19723,141.3183));
	points.push(new GLatLng(43.19722,141.3183));
	points.push(new GLatLng(43.1975,141.3179));
	points.push(new GLatLng(43.19789,141.3186));
	points.push(new GLatLng(43.19778,141.3195));
	points.push(new GLatLng(43.19776,141.3195));
	points.push(new GLatLng(43.19791,141.3187));
	points.push(new GLatLng(43.19723,141.318));
	points.push(new GLatLng(43.19648,141.3181));
	points.push(new GLatLng(43.1964,141.3181));
	points.push(new GLatLng(43.19643,141.318));
	points.push(new GLatLng(43.19663,141.3179));
	points.push(new GLatLng(43.19641,141.3179));
	points.push(new GLatLng(43.19619,141.3174));
	points.push(new GLatLng(43.19609,141.3171));
	points.push(new GLatLng(43.19645,141.3155));
	points.push(new GLatLng(43.19669,141.3144));
	points.push(new GLatLng(43.19682,141.3136));
	points.push(new GLatLng(43.19649,141.3131));
	points.push(new GLatLng(43.19566,141.3128));
	points.push(new GLatLng(43.19466,141.3125));
	points.push(new GLatLng(43.1937,141.312));
	points.push(new GLatLng(43.1927,141.3117));
	points.push(new GLatLng(43.19206,141.3113));
	points.push(new GLatLng(43.19199,141.3114));
	points.push(new GLatLng(43.19197,141.3114));
	points.push(new GLatLng(43.19153,141.3112));
	points.push(new GLatLng(43.19076,141.311));
	points.push(new GLatLng(43.18991,141.3107));
	points.push(new GLatLng(43.1891,141.3099));
	points.push(new GLatLng(43.18833,141.3091));
	points.push(new GLatLng(43.18768,141.3083));
	points.push(new GLatLng(43.18719,141.3076));
	points.push(new GLatLng(43.18691,141.3073));
	points.push(new GLatLng(43.18694,141.3072));
	points.push(new GLatLng(43.18689,141.3073));
	points.push(new GLatLng(43.18688,141.3073));
	points.push(new GLatLng(43.18712,141.3069));
	points.push(new GLatLng(43.18698,141.3069));
	points.push(new GLatLng(43.18714,141.3069));
	points.push(new GLatLng(43.18752,141.3063));
	points.push(new GLatLng(43.18779,141.3052));
	points.push(new GLatLng(43.188,141.304));
	points.push(new GLatLng(43.18824,141.303));
	points.push(new GLatLng(43.18837,141.3023));
	points.push(new GLatLng(43.1884,141.3022));
	points.push(new GLatLng(43.18848,141.3023));
	points.push(new GLatLng(43.18882,141.3026));
	points.push(new GLatLng(43.18877,141.3027));
	points.push(new GLatLng(43.18881,141.3026));
	points.push(new GLatLng(43.18882,141.3026));
	points.push(new GLatLng(43.18882,141.3027));
	points.push(new GLatLng(43.18873,141.3028));
	points.push(new GLatLng(43.18884,141.3028));
	points.push(new GLatLng(43.18969,141.3029));
	points.push(new GLatLng(43.18919,141.3029));
	points.push(new GLatLng(43.1885,141.303));
	points.push(new GLatLng(43.18821,141.304));
	points.push(new GLatLng(43.18779,141.3049));
	points.push(new GLatLng(43.18757,141.306));
	points.push(new GLatLng(43.18714,141.3069));
	points.push(new GLatLng(43.18706,141.307));
	points.push(new GLatLng(43.18689,141.3074));
	points.push(new GLatLng(43.18636,141.3081));
	points.push(new GLatLng(43.18581,141.3089));
	points.push(new GLatLng(43.18537,141.3095));
	points.push(new GLatLng(43.18508,141.3099));
	points.push(new GLatLng(43.18505,141.31));
	points.push(new GLatLng(43.18502,141.3105));
	points.push(new GLatLng(43.18462,141.3117));
	points.push(new GLatLng(43.18441,141.313));
	points.push(new GLatLng(43.18419,141.3142));
	points.push(new GLatLng(43.18397,141.3153));
	points.push(new GLatLng(43.18374,141.3163));
	points.push(new GLatLng(43.18354,141.3173));
	points.push(new GLatLng(43.18333,141.3184));
	points.push(new GLatLng(43.18312,141.3193));
	points.push(new GLatLng(43.18309,141.3201));
	points.push(new GLatLng(43.18312,141.3202));
	points.push(new GLatLng(43.18313,141.3202));
	points.push(new GLatLng(43.18354,141.3207));
	points.push(new GLatLng(43.18383,141.3211));
	points.push(new GLatLng(43.18272,141.3219));
	points.push(new GLatLng(43.18265,141.3226));
	points.push(new GLatLng(43.18251,141.3229));
	points.push(new GLatLng(43.18182,141.3226));
	points.push(new GLatLng(43.1811,141.3221));
	points.push(new GLatLng(43.18029,141.3213));
	points.push(new GLatLng(43.17924,141.3205));
	points.push(new GLatLng(43.17849,141.3201));
	points.push(new GLatLng(43.17841,141.3201));
	points.push(new GLatLng(43.17828,141.3201));
	points.push(new GLatLng(43.1778,141.3197));
	points.push(new GLatLng(43.17679,141.3193));
	points.push(new GLatLng(43.17605,141.319));
	points.push(new GLatLng(43.17527,141.3195));
	points.push(new GLatLng(43.17461,141.3196));
	points.push(new GLatLng(43.17408,141.3198));
	points.push(new GLatLng(43.17386,141.3201));
	points.push(new GLatLng(43.17415,141.3194));
	points.push(new GLatLng(43.17391,141.3188));
	points.push(new GLatLng(43.17335,141.319));
	points.push(new GLatLng(43.17334,141.3197));
	points.push(new GLatLng(43.17296,141.3204));
	points.push(new GLatLng(43.17229,141.321));
	points.push(new GLatLng(43.17212,141.3215));
	points.push(new GLatLng(43.17209,141.3216));
	points.push(new GLatLng(43.17186,141.3217));
	points.push(new GLatLng(43.17134,141.3222));
	points.push(new GLatLng(43.1712,141.3224));
	points.push(new GLatLng(43.17122,141.3225));
	points.push(new GLatLng(43.17103,141.3226));
	points.push(new GLatLng(43.17058,141.3228));
	points.push(new GLatLng(43.17013,141.3234));
	points.push(new GLatLng(43.16954,141.3239));
	points.push(new GLatLng(43.1691,141.325));
	points.push(new GLatLng(43.16879,141.3263));
	points.push(new GLatLng(43.16852,141.327));
	points.push(new GLatLng(43.16833,141.328));
	points.push(new GLatLng(43.16816,141.3286));
	points.push(new GLatLng(43.16812,141.3284));
	points.push(new GLatLng(43.16774,141.3299));
	points.push(new GLatLng(43.16774,141.3311));
	points.push(new GLatLng(43.16782,141.3321));
	points.push(new GLatLng(43.16788,141.333));
	points.push(new GLatLng(43.16804,141.3346));
	points.push(new GLatLng(43.16817,141.3359));
	points.push(new GLatLng(43.16817,141.3372));
	points.push(new GLatLng(43.16803,141.3384));
	points.push(new GLatLng(43.16772,141.3394));
	points.push(new GLatLng(43.16737,141.3405));
	points.push(new GLatLng(43.16712,141.3415));
	points.push(new GLatLng(43.16674,141.3424));
	points.push(new GLatLng(43.16621,141.3426));
	points.push(new GLatLng(43.1657,141.343));
	points.push(new GLatLng(43.16513,141.3427));
	points.push(new GLatLng(43.16511,141.3427));
	points.push(new GLatLng(43.16508,141.3428));
	points.push(new GLatLng(43.1649,141.3426));
	points.push(new GLatLng(43.16498,141.3428));
	points.push(new GLatLng(43.16502,141.3428));
	points.push(new GLatLng(43.16511,141.3427));
	points.push(new GLatLng(43.16516,141.3427));
	points.push(new GLatLng(43.16507,141.3427));
	points.push(new GLatLng(43.16505,141.3427));
	points.push(new GLatLng(43.16481,141.3428));
	points.push(new GLatLng(43.1652,141.3423));
	points.push(new GLatLng(43.16521,141.3424));
	points.push(new GLatLng(43.16505,141.3425));
	points.push(new GLatLng(43.16533,141.3417));
	points.push(new GLatLng(43.16539,141.3416));
	points.push(new GLatLng(43.16536,141.3416));
	points.push(new GLatLng(43.16538,141.3417));
	points.push(new GLatLng(43.16536,141.3417));
	points.push(new GLatLng(43.16536,141.3416));
	points.push(new GLatLng(43.16534,141.3416));
	points.push(new GLatLng(43.16539,141.3418));
	points.push(new GLatLng(43.16529,141.3415));
	points.push(new GLatLng(43.16532,141.3415));
	points.push(new GLatLng(43.16535,141.3414));
	points.push(new GLatLng(43.16537,141.3415));
	points.push(new GLatLng(43.16485,141.3435));
	points.push(new GLatLng(43.1648,141.3432));
	points.push(new GLatLng(43.16487,141.3432));
	points.push(new GLatLng(43.16487,141.3433));
	points.push(new GLatLng(43.16489,141.3432));
	points.push(new GLatLng(43.16474,141.3431));
	points.push(new GLatLng(43.16472,141.3431));
	points.push(new GLatLng(43.1647,141.3432));
	points.push(new GLatLng(43.16474,141.3433));
	points.push(new GLatLng(43.16494,141.3429));
	points.push(new GLatLng(43.16494,141.3429));
	points.push(new GLatLng(43.16496,141.3427));
	points.push(new GLatLng(43.165,141.3427));
	points.push(new GLatLng(43.16503,141.3426));
	points.push(new GLatLng(43.16504,141.3427));
	points.push(new GLatLng(43.16505,141.3427));
	points.push(new GLatLng(43.16508,141.3426));
	points.push(new GLatLng(43.16507,141.3426));
	points.push(new GLatLng(43.16476,141.3431));
	points.push(new GLatLng(43.1651,141.3428));
	points.push(new GLatLng(43.16499,141.343));
	points.push(new GLatLng(43.16492,141.3431));
	points.push(new GLatLng(43.16482,141.3429));
	points.push(new GLatLng(43.16477,141.343));
	points.push(new GLatLng(43.16476,141.3429));
	points.push(new GLatLng(43.16476,141.3428));
	points.push(new GLatLng(43.16485,141.3428));
	points.push(new GLatLng(43.16483,141.3428));
	points.push(new GLatLng(43.16481,141.3429));
	points.push(new GLatLng(43.16478,141.3429));
	points.push(new GLatLng(43.16481,141.3431));
	points.push(new GLatLng(43.16471,141.343));
	points.push(new GLatLng(43.16469,141.3428));
	points.push(new GLatLng(43.16464,141.3427));
	points.push(new GLatLng(43.16459,141.3427));
	points.push(new GLatLng(43.16463,141.3427));
	points.push(new GLatLng(43.16465,141.3428));
	points.push(new GLatLng(43.16483,141.3429));
	points.push(new GLatLng(43.16504,141.3425));
	points.push(new GLatLng(43.16507,141.3425));
	points.push(new GLatLng(43.16502,141.3425));
	points.push(new GLatLng(43.16506,141.3425));
	points.push(new GLatLng(43.16504,141.3425));
	points.push(new GLatLng(43.16498,141.3425));
	points.push(new GLatLng(43.16497,141.3425));
	points.push(new GLatLng(43.16505,141.3425));
	points.push(new GLatLng(43.1651,141.3425));
	points.push(new GLatLng(43.16516,141.3425));
	points.push(new GLatLng(43.16522,141.3426));
	points.push(new GLatLng(43.16529,141.3421));
	points.push(new GLatLng(43.16505,141.3414));
	points.push(new GLatLng(43.16529,141.3409));
	points.push(new GLatLng(43.16509,141.3417));
	points.push(new GLatLng(43.16508,141.3417));
	points.push(new GLatLng(43.16506,141.3423));
	points.push(new GLatLng(43.16518,141.3418));
	points.push(new GLatLng(43.16505,141.3421));
	points.push(new GLatLng(43.16505,141.3421));
	points.push(new GLatLng(43.16512,141.3419));
	points.push(new GLatLng(43.16513,141.3419));
	points.push(new GLatLng(43.16508,141.342));
	points.push(new GLatLng(43.16498,141.3427));
	points.push(new GLatLng(43.165,141.3426));
	points.push(new GLatLng(43.165,141.3426));
	points.push(new GLatLng(43.16501,141.3425));
	points.push(new GLatLng(43.16502,141.3425));
	points.push(new GLatLng(43.16495,141.3425));
	points.push(new GLatLng(43.16509,141.3418));
	points.push(new GLatLng(43.16515,141.3418));
	points.push(new GLatLng(43.16479,141.3431));
	points.push(new GLatLng(43.16485,141.3424));
	points.push(new GLatLng(43.16497,141.3422));
	points.push(new GLatLng(43.16504,141.3421));
	points.push(new GLatLng(43.16501,141.3422));
	points.push(new GLatLng(43.16499,141.3422));
	points.push(new GLatLng(43.16514,141.3418));
	points.push(new GLatLng(43.16496,141.3423));
	points.push(new GLatLng(43.16492,141.3422));
	points.push(new GLatLng(43.16496,141.3422));
	points.push(new GLatLng(43.16497,141.3421));
	points.push(new GLatLng(43.16505,141.3421));
	points.push(new GLatLng(43.16516,141.3419));
	points.push(new GLatLng(43.16508,141.342));
	points.push(new GLatLng(43.16505,141.3421));
	points.push(new GLatLng(43.16506,141.342));
	points.push(new GLatLng(43.16511,141.3421));
	points.push(new GLatLng(43.16515,141.342));
	points.push(new GLatLng(43.16504,141.3419));
	points.push(new GLatLng(43.16499,141.342));
	points.push(new GLatLng(43.16506,141.3419));
	points.push(new GLatLng(43.165,141.342));
	points.push(new GLatLng(43.16498,141.342));
	points.push(new GLatLng(43.16497,141.3421));
	points.push(new GLatLng(43.16499,141.3421));
	points.push(new GLatLng(43.16502,141.342));
	points.push(new GLatLng(43.16505,141.342));
	points.push(new GLatLng(43.165,141.3422));
	points.push(new GLatLng(43.16511,141.3421));
	points.push(new GLatLng(43.16491,141.3428));
	points.push(new GLatLng(43.16499,141.3425));
	points.push(new GLatLng(43.16501,141.3424));
	points.push(new GLatLng(43.16497,141.3422));
	points.push(new GLatLng(43.16496,141.3423));
	points.push(new GLatLng(43.16533,141.3418));
	points.push(new GLatLng(43.16526,141.3418));
	points.push(new GLatLng(43.16535,141.3417));
	points.push(new GLatLng(43.16543,141.3416));
	points.push(new GLatLng(43.16544,141.3416));
	points.push(new GLatLng(43.16537,141.3417));
	points.push(new GLatLng(43.16533,141.3418));
	points.push(new GLatLng(43.16536,141.3418));
	points.push(new GLatLng(43.16539,141.3417));
	points.push(new GLatLng(43.16541,141.3417));
	points.push(new GLatLng(43.16502,141.3422));
	points.push(new GLatLng(43.16502,141.3422));
	points.push(new GLatLng(43.16508,141.3421));
	points.push(new GLatLng(43.16512,141.3421));
	points.push(new GLatLng(43.16504,141.3422));
	points.push(new GLatLng(43.16497,141.3423));
	points.push(new GLatLng(43.16488,141.3425));
	points.push(new GLatLng(43.16489,141.3425));
	points.push(new GLatLng(43.16491,141.3424));
	points.push(new GLatLng(43.1649,141.3424));
	points.push(new GLatLng(43.16488,141.3425));
	points.push(new GLatLng(43.16481,141.3425));
	points.push(new GLatLng(43.16479,141.3426));
	points.push(new GLatLng(43.16484,141.3426));
	points.push(new GLatLng(43.16487,141.3425));
	points.push(new GLatLng(43.16487,141.3425));
	points.push(new GLatLng(43.16482,141.3432));
	points.push(new GLatLng(43.16468,141.3429));
	points.push(new GLatLng(43.16479,141.3431));
	points.push(new GLatLng(43.16462,141.3433));
	points.push(new GLatLng(43.16455,141.3434));
	points.push(new GLatLng(43.16461,141.3434));
	points.push(new GLatLng(43.16461,141.3433));
	points.push(new GLatLng(43.16459,141.3432));
	points.push(new GLatLng(43.16455,141.3432));
	points.push(new GLatLng(43.16449,141.3433));
	points.push(new GLatLng(43.16463,141.3431));
	points.push(new GLatLng(43.16463,141.3432));
	points.push(new GLatLng(43.1646,141.3433));
	points.push(new GLatLng(43.16464,141.3434));
	points.push(new GLatLng(43.16447,141.3432));
	points.push(new GLatLng(43.16448,141.343));
	points.push(new GLatLng(43.16468,141.3435));
	points.push(new GLatLng(43.16486,141.3431));
	points.push(new GLatLng(43.16462,141.3429));
	points.push(new GLatLng(43.16479,141.343));
	points.push(new GLatLng(43.16481,141.3431));
	points.push(new GLatLng(43.1648,141.3429));
	points.push(new GLatLng(43.16485,141.343));
	points.push(new GLatLng(43.16486,141.3429));
	points.push(new GLatLng(43.16484,141.3432));
	points.push(new GLatLng(43.16483,141.3431));
	points.push(new GLatLng(43.1648,141.343));
	points.push(new GLatLng(43.16481,141.3431));
	points.push(new GLatLng(43.16481,141.343));
	points.push(new GLatLng(43.16484,141.343));
	points.push(new GLatLng(43.16488,141.3432));
	points.push(new GLatLng(43.16488,141.3431));
	wpt_points.push(new GLatLng(43.1956966666667,141.317833333333));
	wpt_points.push(new GLatLng(43.197084,141.31766));
	wpt_points.push(new GLatLng(43.197276,141.31804));
	wpt_points.push(new GLatLng(43.1979,141.318753333333));
	wpt_points.push(new GLatLng(43.18837,141.3023));
	wpt_points.push(new GLatLng(43.1835933333333,141.317033333333));
	wpt_points.push(new GLatLng(43.181148,141.322133333333));
	wpt_points.push(new GLatLng(43.172188,141.3213));
	wpt_points.push(new GLatLng(43.17212,141.3215));


	// 表示の中心位置・サイズを算出します。
	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.317833333333,43.1956966666667,"<b><a href=\""+relativepathtomainhtml+"#photoID1\">石狩湾新港にある公園</a></b><br /><a href=\""+relativepathtosubfolder+"IMGP2344.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMGP2344-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:06:12 06:22:18<br />E141°19′4.20″<br />N43°11′44.51″<br />-2m<br />北海道石狩市新港南三丁目<hr />石狩湾新港にある公園「青葉公園」距離的には、行って帰るだけなら適当なところ。でも、モエレや百合が原、前田のような見所はなく、目標としての存在かな。</small>");
	addWayPoints(map, 1,141.31766,43.197084,"<b><a href=\""+relativepathtomainhtml+"#photoID2\">陸上のフィールド</a></b><br /><a href=\""+relativepathtosubfolder+"IMGP2345.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMGP2345-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:06:12 06:25:26<br />E141°19′3.58″<br />N43°11′49.50″<br />-21.8m<br />北海道石狩市新港南三丁目<hr />公園は大きいですよ。ここは陸上のトラックです。</small>");
	addWayPoints(map, 1,141.31804,43.197276,"<b><a href=\""+relativepathtomainhtml+"#photoID3\">野球場</a></b><br /><a href=\""+relativepathtosubfolder+"IMGP2346.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMGP2346-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:06:12 06:26:17<br />E141°19′4.94″<br />N43°11′50.19″<br />-10.8m<br />北海道石狩市新港南三丁目<hr />野球場もあるのです。</small>");
	addWayPoints(map, 1,141.318753333333,43.1979,"<b><a href=\""+relativepathtomainhtml+"#photoID4\">テニスコート</a></b><br /><a href=\""+relativepathtosubfolder+"IMGP2347.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMGP2347-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:06:12 06:28:57<br />E141°19′7.51″<br />N43°11′52.44″<br />2.9m<br />北海道石狩市新港南三丁目<hr />そして、テニスコートです。<br />陸上、野球、テニス。それに、遊び場管理事務祖と駐車場。その大きさは想像つきますよね。</small>");
	addWayPoints(map, 1,141.3023,43.18837,"<b><a href=\""+relativepathtomainhtml+"#photoID5\">柏公園</a></b><br /><a href=\""+relativepathtosubfolder+"IMGP2348.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMGP2348-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:06:12 06:39:03<br />E141°18′8.28″<br />N43°11′18.13″<br />1m<br />北海道石狩市新港中央二丁目<hr />地図には「柏公園」と書かれています。しかし、写真のようにフェンスで囲まれ中は未整備ですね。</small>");
	addWayPoints(map, 1,141.317033333333,43.1835933333333,"<b><a href=\""+relativepathtomainhtml+"#photoID6\">競輪の場外馬券売り場</a></b><br /><a href=\""+relativepathtosubfolder+"IMGP2349.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMGP2349-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:06:12 06:46:34<br />E141°19′1.32″<br />N43°11′0.94″<br />9.3m<br />北海道石狩市新港南二丁目<hr />競輪の場外馬券売り場です。</small>");
	addWayPoints(map, 1,141.322133333333,43.181148,"<b><a href=\""+relativepathtomainhtml+"#photoID7\">茨戸川</a></b><br /><a href=\""+relativepathtosubfolder+"IMGP2350.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMGP2350-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:06:12 06:49:57<br />E141°19′19.68″<br />N43°10′52.13″<br />北海道石狩市花畔一条二丁目<hr />朝の茨戸川は綺麗です。</small>");
	addWayPoints(map, 1,141.3213,43.172188,"<b><a href=\""+relativepathtomainhtml+"#photoID8\">茨戸川２</a></b><br /><a href=\""+relativepathtosubfolder+"IMGP2351.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMGP2351-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:06:12 06:55:07<br />E141°19′16.68″<br />N43°10′19.88″<br />-7.4m<br />北海道石狩市花川北七条二丁目<hr />太陽の川に映る反射光を構図に入れたら、夜明けみたいになった</small>");
	addWayPoints(map, 1,141.3215,43.17212,"<b><a href=\""+relativepathtomainhtml+"#photoID9\">茨戸川３</a></b><br /><a href=\""+relativepathtosubfolder+"IMGP2352.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMGP2352-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:06:12 06:55:13<br />E141°19′17.40″<br />N43°10′19.63″<br />-7m<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;
}

