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

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

	// 時刻－速度
	var speed = new Image();
	speed.src = "WG20080614230438.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.16494,141.3425));
	points.push(new GLatLng(43.16494,141.3423));
	points.push(new GLatLng(43.16459,141.3423));
	points.push(new GLatLng(43.16407,141.342));
	points.push(new GLatLng(43.16337,141.3428));
	points.push(new GLatLng(43.16249,141.3444));
	points.push(new GLatLng(43.16183,141.345));
	points.push(new GLatLng(43.16096,141.3461));
	points.push(new GLatLng(43.16,141.3465));
	points.push(new GLatLng(43.15925,141.3473));
	points.push(new GLatLng(43.15889,141.3469));
	points.push(new GLatLng(43.15855,141.3461));
	points.push(new GLatLng(43.15814,141.3452));
	points.push(new GLatLng(43.15772,141.3443));
	points.push(new GLatLng(43.15715,141.3434));
	points.push(new GLatLng(43.15641,141.3427));
	points.push(new GLatLng(43.15567,141.3419));
	points.push(new GLatLng(43.15499,141.3411));
	points.push(new GLatLng(43.15455,141.34));
	points.push(new GLatLng(43.15387,141.339));
	points.push(new GLatLng(43.15346,141.338));
	points.push(new GLatLng(43.15303,141.3371));
	points.push(new GLatLng(43.15247,141.3362));
	points.push(new GLatLng(43.15186,141.3352));
	points.push(new GLatLng(43.15134,141.3342));
	points.push(new GLatLng(43.15073,141.3334));
	points.push(new GLatLng(43.15045,141.3329));
	points.push(new GLatLng(43.15,141.3322));
	points.push(new GLatLng(43.14942,141.3312));
	points.push(new GLatLng(43.14893,141.3302));
	points.push(new GLatLng(43.14862,141.3292));
	points.push(new GLatLng(43.14847,141.3281));
	points.push(new GLatLng(43.14842,141.3272));
	points.push(new GLatLng(43.14837,141.3261));
	points.push(new GLatLng(43.14765,141.3259));
	points.push(new GLatLng(43.14782,141.3257));
	points.push(new GLatLng(43.14822,141.3248));
	points.push(new GLatLng(43.14812,141.3238));
	points.push(new GLatLng(43.14792,141.3227));
	points.push(new GLatLng(43.1477,141.3217));
	points.push(new GLatLng(43.14756,141.3205));
	points.push(new GLatLng(43.1474,141.3194));
	points.push(new GLatLng(43.14722,141.3185));
	points.push(new GLatLng(43.14699,141.3178));
	points.push(new GLatLng(43.14676,141.3171));
	points.push(new GLatLng(43.14658,141.3167));
	points.push(new GLatLng(43.14601,141.3163));
	points.push(new GLatLng(43.1453,141.3163));
	points.push(new GLatLng(43.14454,141.3159));
	points.push(new GLatLng(43.14418,141.3153));
	points.push(new GLatLng(43.14405,141.3149));
	points.push(new GLatLng(43.14423,141.3135));
	points.push(new GLatLng(43.14452,141.3119));
	points.push(new GLatLng(43.14466,141.3107));
	points.push(new GLatLng(43.14474,141.3098));
	points.push(new GLatLng(43.14497,141.3085));
	points.push(new GLatLng(43.1445,141.3078));
	points.push(new GLatLng(43.14396,141.3069));
	points.push(new GLatLng(43.1434,141.306));
	points.push(new GLatLng(43.14293,141.3051));
	points.push(new GLatLng(43.14244,141.3042));
	points.push(new GLatLng(43.14193,141.3035));
	points.push(new GLatLng(43.14141,141.3032));
	points.push(new GLatLng(43.14093,141.3029));
	points.push(new GLatLng(43.14086,141.3027));
	points.push(new GLatLng(43.14056,141.3018));
	points.push(new GLatLng(43.14011,141.3008));
	points.push(new GLatLng(43.14001,141.2997));
	points.push(new GLatLng(43.14006,141.2987));
	points.push(new GLatLng(43.13993,141.2979));
	points.push(new GLatLng(43.13964,141.2971));
	points.push(new GLatLng(43.1391,141.2962));
	points.push(new GLatLng(43.13867,141.2953));
	points.push(new GLatLng(43.13829,141.2942));
	points.push(new GLatLng(43.13799,141.2928));
	points.push(new GLatLng(43.13766,141.2917));
	points.push(new GLatLng(43.13725,141.2909));
	points.push(new GLatLng(43.13691,141.2899));
	points.push(new GLatLng(43.13655,141.2891));
	points.push(new GLatLng(43.13657,141.2888));
	points.push(new GLatLng(43.13702,141.2879));
	points.push(new GLatLng(43.1372,141.2877));
	points.push(new GLatLng(43.13753,141.2871));
	points.push(new GLatLng(43.13805,141.2865));
	points.push(new GLatLng(43.13862,141.2858));
	points.push(new GLatLng(43.13917,141.285));
	points.push(new GLatLng(43.13967,141.2845));
	points.push(new GLatLng(43.14026,141.2834));
	points.push(new GLatLng(43.14059,141.2832));
	points.push(new GLatLng(43.14068,141.2833));
	points.push(new GLatLng(43.14071,141.2831));
	points.push(new GLatLng(43.14105,141.2824));
	points.push(new GLatLng(43.14169,141.2817));
	points.push(new GLatLng(43.14249,141.2804));
	points.push(new GLatLng(43.14312,141.28));
	points.push(new GLatLng(43.14376,141.2791));
	points.push(new GLatLng(43.14411,141.2784));
	points.push(new GLatLng(43.14412,141.2785));
	points.push(new GLatLng(43.14392,141.2778));
	points.push(new GLatLng(43.14346,141.2769));
	points.push(new GLatLng(43.14296,141.2761));
	points.push(new GLatLng(43.1425,141.2753));
	points.push(new GLatLng(43.14193,141.2746));
	points.push(new GLatLng(43.1414,141.2741));
	points.push(new GLatLng(43.14079,141.2733));
	points.push(new GLatLng(43.14016,141.2724));
	points.push(new GLatLng(43.13948,141.2715));
	points.push(new GLatLng(43.13884,141.2703));
	points.push(new GLatLng(43.13815,141.2694));
	points.push(new GLatLng(43.13748,141.2687));
	points.push(new GLatLng(43.13686,141.2678));
	points.push(new GLatLng(43.13617,141.267));
	points.push(new GLatLng(43.13549,141.266));
	points.push(new GLatLng(43.13481,141.2652));
	points.push(new GLatLng(43.13415,141.2642));
	points.push(new GLatLng(43.13342,141.2635));
	points.push(new GLatLng(43.13282,141.263));
	points.push(new GLatLng(43.13226,141.2637));
	points.push(new GLatLng(43.13157,141.2648));
	points.push(new GLatLng(43.13082,141.2656));
	points.push(new GLatLng(43.12985,141.2657));
	points.push(new GLatLng(43.12902,141.2657));
	points.push(new GLatLng(43.12888,141.2665));
	points.push(new GLatLng(43.12956,141.2665));
	points.push(new GLatLng(43.12992,141.267));
	points.push(new GLatLng(43.12932,141.268));
	points.push(new GLatLng(43.12867,141.2688));
	points.push(new GLatLng(43.1279,141.2697));
	points.push(new GLatLng(43.12706,141.2708));
	points.push(new GLatLng(43.12623,141.272));
	points.push(new GLatLng(43.1254,141.2728));
	points.push(new GLatLng(43.12474,141.2738));
	points.push(new GLatLng(43.12393,141.2753));
	points.push(new GLatLng(43.1231,141.2764));
	points.push(new GLatLng(43.12229,141.2775));
	points.push(new GLatLng(43.12149,141.2787));
	points.push(new GLatLng(43.12071,141.2798));
	points.push(new GLatLng(43.11988,141.2809));
	points.push(new GLatLng(43.11906,141.2821));
	points.push(new GLatLng(43.11825,141.2832));
	points.push(new GLatLng(43.11751,141.2842));
	points.push(new GLatLng(43.11669,141.2852));
	points.push(new GLatLng(43.11585,141.2865));
	points.push(new GLatLng(43.11512,141.2877));
	points.push(new GLatLng(43.11443,141.2886));
	points.push(new GLatLng(43.11373,141.2892));
	points.push(new GLatLng(43.11376,141.2892));
	points.push(new GLatLng(43.11375,141.2892));
	points.push(new GLatLng(43.11375,141.2892));
	points.push(new GLatLng(43.11375,141.2892));
	points.push(new GLatLng(43.11376,141.2891));
	points.push(new GLatLng(43.11376,141.2891));
	points.push(new GLatLng(43.11376,141.2891));
	points.push(new GLatLng(43.11376,141.2891));
	points.push(new GLatLng(43.11377,141.2891));
	points.push(new GLatLng(43.11434,141.2884));
	points.push(new GLatLng(43.11488,141.2877));
	points.push(new GLatLng(43.11554,141.2867));
	points.push(new GLatLng(43.11618,141.2856));
	points.push(new GLatLng(43.1164,141.2855));
	points.push(new GLatLng(43.11669,141.2851));
	points.push(new GLatLng(43.11736,141.284));
	points.push(new GLatLng(43.11805,141.2831));
	points.push(new GLatLng(43.11864,141.2823));
	points.push(new GLatLng(43.11921,141.2816));
	points.push(new GLatLng(43.11975,141.2809));
	points.push(new GLatLng(43.1203,141.2802));
	points.push(new GLatLng(43.12088,141.2794));
	points.push(new GLatLng(43.12142,141.2783));
	points.push(new GLatLng(43.12196,141.2776));
	points.push(new GLatLng(43.12251,141.2769));
	points.push(new GLatLng(43.12312,141.2761));
	points.push(new GLatLng(43.12371,141.2753));
	points.push(new GLatLng(43.12431,141.2744));
	points.push(new GLatLng(43.12472,141.274));
	points.push(new GLatLng(43.12518,141.2734));
	points.push(new GLatLng(43.1257,141.2727));
	points.push(new GLatLng(43.12624,141.2719));
	points.push(new GLatLng(43.12677,141.2712));
	points.push(new GLatLng(43.12727,141.2705));
	points.push(new GLatLng(43.1278,141.2697));
	points.push(new GLatLng(43.12827,141.2691));
	points.push(new GLatLng(43.12852,141.2688));
	points.push(new GLatLng(43.12854,141.2686));
	points.push(new GLatLng(43.12886,141.2681));
	points.push(new GLatLng(43.12944,141.2675));
	points.push(new GLatLng(43.13001,141.2668));
	points.push(new GLatLng(43.12917,141.2657));
	points.push(new GLatLng(43.12979,141.2655));
	points.push(new GLatLng(43.13058,141.2654));
	points.push(new GLatLng(43.13129,141.2649));
	points.push(new GLatLng(43.13178,141.2642));
	points.push(new GLatLng(43.13234,141.2634));
	points.push(new GLatLng(43.13314,141.2625));
	points.push(new GLatLng(43.13361,141.2635));
	points.push(new GLatLng(43.13374,141.2637));
	points.push(new GLatLng(43.13369,141.2637));
	points.push(new GLatLng(43.13382,141.2639));
	points.push(new GLatLng(43.13431,141.2633));
	points.push(new GLatLng(43.13485,141.2626));
	points.push(new GLatLng(43.13555,141.2617));
	points.push(new GLatLng(43.13614,141.2609));
	points.push(new GLatLng(43.13666,141.2602));
	points.push(new GLatLng(43.1372,141.2594));
	points.push(new GLatLng(43.13766,141.2587));
	points.push(new GLatLng(43.13815,141.258));
	points.push(new GLatLng(43.13876,141.2572));
	points.push(new GLatLng(43.1393,141.2565));
	points.push(new GLatLng(43.13983,141.2557));
	points.push(new GLatLng(43.14031,141.255));
	points.push(new GLatLng(43.14075,141.2544));
	points.push(new GLatLng(43.14122,141.2538));
	points.push(new GLatLng(43.14182,141.2541));
	points.push(new GLatLng(43.14251,141.2539));
	points.push(new GLatLng(43.14277,141.2541));
	points.push(new GLatLng(43.14367,141.2537));
	points.push(new GLatLng(43.14402,141.253));
	points.push(new GLatLng(43.14465,141.2522));
	points.push(new GLatLng(43.14564,141.2525));
	points.push(new GLatLng(43.14642,141.2528));
	points.push(new GLatLng(43.14714,141.2537));
	points.push(new GLatLng(43.14763,141.2543));
	points.push(new GLatLng(43.1483,141.2551));
	points.push(new GLatLng(43.14888,141.2557));
	points.push(new GLatLng(43.14934,141.2563));
	points.push(new GLatLng(43.1501,141.2572));
	points.push(new GLatLng(43.14959,141.2585));
	points.push(new GLatLng(43.14823,141.2589));
	points.push(new GLatLng(43.14719,141.2605));
	points.push(new GLatLng(43.14594,141.2604));
	points.push(new GLatLng(43.1455,141.2598));
	points.push(new GLatLng(43.14487,141.2588));
	points.push(new GLatLng(43.14476,141.2579));
	points.push(new GLatLng(43.14425,141.2578));
	points.push(new GLatLng(43.14371,141.2571));
	points.push(new GLatLng(43.14324,141.2561));
	points.push(new GLatLng(43.14299,141.2554));
	points.push(new GLatLng(43.14351,141.2547));
	points.push(new GLatLng(43.14374,141.2537));
	points.push(new GLatLng(43.14434,141.2529));
	points.push(new GLatLng(43.14498,141.2535));
	points.push(new GLatLng(43.14564,141.2541));
	points.push(new GLatLng(43.14634,141.2547));
	points.push(new GLatLng(43.14707,141.2553));
	points.push(new GLatLng(43.14777,141.2559));
	points.push(new GLatLng(43.14855,141.2566));
	points.push(new GLatLng(43.14848,141.2575));
	points.push(new GLatLng(43.14803,141.2585));
	points.push(new GLatLng(43.1474,141.2583));
	points.push(new GLatLng(43.14677,141.2575));
	points.push(new GLatLng(43.14597,141.257));
	points.push(new GLatLng(43.14542,141.256));
	points.push(new GLatLng(43.14491,141.255));
	points.push(new GLatLng(43.14403,141.2546));
	points.push(new GLatLng(43.14362,141.2545));
	points.push(new GLatLng(43.14383,141.2535));
	points.push(new GLatLng(43.14421,141.2529));
	points.push(new GLatLng(43.14471,141.2522));
	points.push(new GLatLng(43.14549,141.2525));
	points.push(new GLatLng(43.14628,141.2529));
	points.push(new GLatLng(43.14716,141.2538));
	points.push(new GLatLng(43.14781,141.2543));
	points.push(new GLatLng(43.1483,141.2552));
	points.push(new GLatLng(43.14899,141.2556));
	points.push(new GLatLng(43.14943,141.2566));
	points.push(new GLatLng(43.15016,141.2573));
	points.push(new GLatLng(43.15011,141.2578));
	points.push(new GLatLng(43.14966,141.2584));
	points.push(new GLatLng(43.14911,141.259));
	points.push(new GLatLng(43.14823,141.2588));
	points.push(new GLatLng(43.14752,141.2598));
	points.push(new GLatLng(43.14701,141.2608));
	points.push(new GLatLng(43.14626,141.2607));
	points.push(new GLatLng(43.14572,141.26));
	points.push(new GLatLng(43.1456,141.2599));
	points.push(new GLatLng(43.146,141.2606));
	points.push(new GLatLng(43.14669,141.2616));
	points.push(new GLatLng(43.14735,141.2625));
	points.push(new GLatLng(43.1478,141.2631));
	points.push(new GLatLng(43.14732,141.264));
	points.push(new GLatLng(43.1465,141.2651));
	points.push(new GLatLng(43.14556,141.2664));
	points.push(new GLatLng(43.14472,141.2675));
	points.push(new GLatLng(43.14389,141.2688));
	points.push(new GLatLng(43.14307,141.2699));
	points.push(new GLatLng(43.14225,141.2711));
	points.push(new GLatLng(43.14149,141.2721));
	points.push(new GLatLng(43.14079,141.2733));
	points.push(new GLatLng(43.14138,141.2742));
	points.push(new GLatLng(43.14214,141.2752));
	points.push(new GLatLng(43.14289,141.2762));
	points.push(new GLatLng(43.14357,141.277));
	points.push(new GLatLng(43.14412,141.2777));
	points.push(new GLatLng(43.14436,141.278));
	points.push(new GLatLng(43.14441,141.2779));
	points.push(new GLatLng(43.14443,141.278));
	points.push(new GLatLng(43.14448,141.278));
	points.push(new GLatLng(43.14441,141.2781));
	points.push(new GLatLng(43.14419,141.2784));
	points.push(new GLatLng(43.14346,141.2792));
	points.push(new GLatLng(43.14268,141.2803));
	points.push(new GLatLng(43.14192,141.2814));
	points.push(new GLatLng(43.14108,141.2826));
	points.push(new GLatLng(43.14023,141.2838));
	points.push(new GLatLng(43.13936,141.285));
	points.push(new GLatLng(43.1384,141.2864));
	points.push(new GLatLng(43.13749,141.2876));
	points.push(new GLatLng(43.1374,141.2877));
	points.push(new GLatLng(43.137,141.2883));
	points.push(new GLatLng(43.13639,141.2891));
	points.push(new GLatLng(43.13665,141.2896));
	points.push(new GLatLng(43.13703,141.2906));
	points.push(new GLatLng(43.13743,141.2919));
	points.push(new GLatLng(43.13777,141.2932));
	points.push(new GLatLng(43.13809,141.2943));
	points.push(new GLatLng(43.13853,141.2953));
	points.push(new GLatLng(43.13903,141.2964));
	points.push(new GLatLng(43.13963,141.2974));
	points.push(new GLatLng(43.13987,141.2979));
	points.push(new GLatLng(43.14009,141.2988));
	points.push(new GLatLng(43.14001,141.3002));
	points.push(new GLatLng(43.14031,141.3014));
	points.push(new GLatLng(43.14074,141.3022));
	points.push(new GLatLng(43.14064,141.3027));
	points.push(new GLatLng(43.14067,141.3028));
	points.push(new GLatLng(43.14096,141.303));
	points.push(new GLatLng(43.1415,141.3033));
	points.push(new GLatLng(43.14207,141.3042));
	points.push(new GLatLng(43.1427,141.3053));
	points.push(new GLatLng(43.1433,141.3064));
	points.push(new GLatLng(43.14391,141.3074));
	points.push(new GLatLng(43.14441,141.3083));
	points.push(new GLatLng(43.14482,141.3092));
	points.push(new GLatLng(43.14479,141.3096));
	points.push(new GLatLng(43.14478,141.3102));
	points.push(new GLatLng(43.14479,141.3103));
	points.push(new GLatLng(43.14478,141.3102));
	points.push(new GLatLng(43.14476,141.3104));
	points.push(new GLatLng(43.14456,141.3115));
	points.push(new GLatLng(43.14445,141.3127));
	points.push(new GLatLng(43.14417,141.3145));
	points.push(new GLatLng(43.14405,141.3156));
	points.push(new GLatLng(43.14455,141.3161));
	points.push(new GLatLng(43.14533,141.3163));
	points.push(new GLatLng(43.14611,141.3165));
	points.push(new GLatLng(43.14658,141.3167));
	points.push(new GLatLng(43.14693,141.3172));
	points.push(new GLatLng(43.1472,141.3186));
	points.push(new GLatLng(43.1474,141.3201));
	points.push(new GLatLng(43.14759,141.3216));
	points.push(new GLatLng(43.1478,141.3228));
	points.push(new GLatLng(43.14799,141.324));
	points.push(new GLatLng(43.14818,141.3253));
	points.push(new GLatLng(43.14737,141.3257));
	points.push(new GLatLng(43.14821,141.3261));
	points.push(new GLatLng(43.14828,141.327));
	points.push(new GLatLng(43.14835,141.3282));
	points.push(new GLatLng(43.14852,141.3295));
	points.push(new GLatLng(43.14887,141.3308));
	points.push(new GLatLng(43.14941,141.3317));
	points.push(new GLatLng(43.15002,141.3326));
	points.push(new GLatLng(43.15039,141.3332));
	points.push(new GLatLng(43.15079,141.3338));
	points.push(new GLatLng(43.15133,141.3347));
	points.push(new GLatLng(43.15199,141.3356));
	points.push(new GLatLng(43.1526,141.3366));
	points.push(new GLatLng(43.15319,141.3375));
	points.push(new GLatLng(43.15381,141.3393));
	points.push(new GLatLng(43.15448,141.3404));
	points.push(new GLatLng(43.15489,141.3414));
	points.push(new GLatLng(43.15555,141.3422));
	points.push(new GLatLng(43.15629,141.3428));
	points.push(new GLatLng(43.15708,141.3436));
	points.push(new GLatLng(43.15774,141.3446));
	points.push(new GLatLng(43.15812,141.3459));
	points.push(new GLatLng(43.15887,141.3476));
	points.push(new GLatLng(43.15911,141.3475));
	points.push(new GLatLng(43.15979,141.3469));
	points.push(new GLatLng(43.16194,141.3452));
	points.push(new GLatLng(43.16217,141.345));
	points.push(new GLatLng(43.16335,141.3432));
	points.push(new GLatLng(43.16381,141.3425));
	points.push(new GLatLng(43.16439,141.3426));
	points.push(new GLatLng(43.16487,141.3425));
	wpt_points.push(new GLatLng(43.1271366666667,141.270686666667));


	// 表示の中心位置・サイズを算出します。
	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.270686666667,43.1271366666667,"<b><a href=\""+relativepathtomainhtml+"#photoID1\">コース上の植物</a></b><br /><a href=\""+relativepathtosubfolder+"IMGP2362.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMGP2362-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:06:15 08:50:44<br />E141°16′14.47″<br />N43°7′37.69″<br />13.5m<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;
}

