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

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

	// 時刻－速度
	var speed = new Image();
	speed.src = "index.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(35.98598,139.4508));
	points.push(new GLatLng(35.98724,139.4483));
	points.push(new GLatLng(35.98754,139.4477));
	points.push(new GLatLng(35.98849,139.4458));
	points.push(new GLatLng(35.98857,139.4455));
	points.push(new GLatLng(35.98907,139.4446));
	points.push(new GLatLng(35.99076,139.4412));
	points.push(new GLatLng(35.99076,139.4404));
	points.push(new GLatLng(35.98842,139.4358));
	points.push(new GLatLng(35.99323,139.4331));
	points.push(new GLatLng(35.99411,139.4327));
	points.push(new GLatLng(35.99565,139.4281));
	points.push(new GLatLng(35.99295,139.4215));
	points.push(new GLatLng(35.99258,139.4192));
	points.push(new GLatLng(35.99237,139.4175));
	points.push(new GLatLng(35.99044,139.4138));
	points.push(new GLatLng(35.9887,139.4097));
	points.push(new GLatLng(35.98806,139.4084));
	points.push(new GLatLng(35.98913,139.407));
	points.push(new GLatLng(35.9893,139.407));
	points.push(new GLatLng(35.98969,139.4075));
	points.push(new GLatLng(35.98994,139.4074));
	points.push(new GLatLng(35.99203,139.4059));
	points.push(new GLatLng(35.99228,139.4054));
	points.push(new GLatLng(35.99175,139.4032));
	points.push(new GLatLng(35.9916,139.4025));
	points.push(new GLatLng(35.99132,139.4013));
	points.push(new GLatLng(35.99067,139.3994));
	points.push(new GLatLng(35.989,139.3945));
	points.push(new GLatLng(35.98898,139.3933));
	points.push(new GLatLng(35.98902,139.3914));
	points.push(new GLatLng(35.98684,139.3896));
	points.push(new GLatLng(35.98651,139.3882));
	points.push(new GLatLng(35.98533,139.3865));
	points.push(new GLatLng(35.98226,139.3808));
	points.push(new GLatLng(35.98196,139.3802));
	points.push(new GLatLng(35.98156,139.379));
	points.push(new GLatLng(35.9808,139.3782));
	points.push(new GLatLng(35.98072,139.3781));
	points.push(new GLatLng(35.98044,139.3759));
	points.push(new GLatLng(35.9804,139.3758));
	points.push(new GLatLng(35.97896,139.3687));
	points.push(new GLatLng(35.97883,139.3672));
	points.push(new GLatLng(35.97883,139.3666));
	points.push(new GLatLng(35.97883,139.3659));
	points.push(new GLatLng(35.97898,139.364));
	points.push(new GLatLng(35.97902,139.3631));
	points.push(new GLatLng(35.97823,139.3595));
	points.push(new GLatLng(35.97765,139.3547));
	points.push(new GLatLng(35.97726,139.3536));
	points.push(new GLatLng(35.97623,139.353));
	points.push(new GLatLng(35.97342,139.3524));
	points.push(new GLatLng(35.97319,139.3523));
	points.push(new GLatLng(35.97306,139.3506));
	points.push(new GLatLng(35.97299,139.3494));
	points.push(new GLatLng(35.97278,139.3473));
	points.push(new GLatLng(35.97038,139.3424));
	points.push(new GLatLng(35.97031,139.3417));
	points.push(new GLatLng(35.97059,139.3407));
	points.push(new GLatLng(35.97138,139.3399));
	points.push(new GLatLng(35.97664,139.3363));
	points.push(new GLatLng(35.9772,139.3351));
	points.push(new GLatLng(35.97758,139.3345));
	points.push(new GLatLng(35.98001,139.3308));
	points.push(new GLatLng(35.98057,139.3301));
	points.push(new GLatLng(35.98063,139.33));
	points.push(new GLatLng(35.98117,139.3289));
	points.push(new GLatLng(35.98136,139.3284));
	points.push(new GLatLng(35.98153,139.3272));
	points.push(new GLatLng(35.98168,139.3253));
	points.push(new GLatLng(35.98177,139.3239));
	points.push(new GLatLng(35.98181,139.3238));
	points.push(new GLatLng(35.98304,139.3222));
	points.push(new GLatLng(35.98312,139.322));
	points.push(new GLatLng(35.9834,139.3208));
	points.push(new GLatLng(35.98387,139.3195));
	points.push(new GLatLng(35.98402,139.3194));
	points.push(new GLatLng(35.98533,139.3173));
	points.push(new GLatLng(35.9854,139.3168));
	points.push(new GLatLng(35.98561,139.3137));
	points.push(new GLatLng(35.98771,139.3117));
	points.push(new GLatLng(35.98784,139.3109));
	points.push(new GLatLng(35.98795,139.3106));
	points.push(new GLatLng(35.99087,139.3053));
	points.push(new GLatLng(35.99132,139.303));
	points.push(new GLatLng(35.99132,139.3022));
	points.push(new GLatLng(35.99136,139.302));
	points.push(new GLatLng(35.99226,139.2989));
	points.push(new GLatLng(35.99396,139.2952));
	points.push(new GLatLng(35.99587,139.2962));
	points.push(new GLatLng(35.99647,139.2966));
	points.push(new GLatLng(35.99952,139.2969));
	points.push(new GLatLng(36.00059,139.2972));
	points.push(new GLatLng(36.00205,139.2979));
	points.push(new GLatLng(36.00295,139.2981));
	points.push(new GLatLng(36.00325,139.2964));
	points.push(new GLatLng(36.00319,139.2937));
	points.push(new GLatLng(36.00372,139.2929));
	points.push(new GLatLng(36.00509,139.292));
	points.push(new GLatLng(36.0049,139.2911));
	points.push(new GLatLng(36.00473,139.2896));
	points.push(new GLatLng(36.00282,139.2866));
	points.push(new GLatLng(36.00243,139.2852));
	points.push(new GLatLng(36.00246,139.2841));
	points.push(new GLatLng(36.00267,139.2819));
	points.push(new GLatLng(36.00325,139.2787));
	points.push(new GLatLng(36.00333,139.2783));
	points.push(new GLatLng(36.00451,139.2732));
	points.push(new GLatLng(36.00497,139.272));
	points.push(new GLatLng(36.00509,139.269));
	points.push(new GLatLng(36.00507,139.2669));
	points.push(new GLatLng(36.00522,139.2639));
	points.push(new GLatLng(36.00353,139.2622));
	points.push(new GLatLng(36.00361,139.2613));
	points.push(new GLatLng(36.00368,139.261));
	points.push(new GLatLng(36.00439,139.2593));
	points.push(new GLatLng(36.00542,139.2566));
	points.push(new GLatLng(36.0055,139.2557));
	points.push(new GLatLng(36.00559,139.2532));
	points.push(new GLatLng(36.00531,139.2526));
	points.push(new GLatLng(36.00423,139.2506));
	points.push(new GLatLng(36.00505,139.2465));
	points.push(new GLatLng(36.00552,139.246));
	points.push(new GLatLng(36.00634,139.2451));
	points.push(new GLatLng(36.00655,139.2443));
	points.push(new GLatLng(36.00677,139.2424));
	points.push(new GLatLng(36.00687,139.2415));
	points.push(new GLatLng(36.00584,139.2403));
	points.push(new GLatLng(36.00361,139.2389));
	points.push(new GLatLng(36.0034,139.2382));
	points.push(new GLatLng(36.00265,139.237));
	points.push(new GLatLng(36.0019,139.2374));
	points.push(new GLatLng(36.00153,139.2374));
	points.push(new GLatLng(35.99937,139.2374));
	points.push(new GLatLng(35.99881,139.2368));
	points.push(new GLatLng(35.99657,139.2366));
	points.push(new GLatLng(35.99544,139.2364));
	points.push(new GLatLng(35.99359,139.236));
	points.push(new GLatLng(35.99132,139.2354));
	points.push(new GLatLng(35.99035,139.236));
	points.push(new GLatLng(35.98473,139.2373));
	points.push(new GLatLng(35.98462,139.2374));
	points.push(new GLatLng(35.98417,139.2371));
	points.push(new GLatLng(35.98239,139.2349));
	points.push(new GLatLng(35.98164,139.2344));
	points.push(new GLatLng(35.98153,139.2343));
	points.push(new GLatLng(35.98128,139.2335));
	points.push(new GLatLng(35.97829,139.2269));
	points.push(new GLatLng(35.97477,139.2265));
	points.push(new GLatLng(35.97411,139.2253));
	points.push(new GLatLng(35.96471,139.2171));
	points.push(new GLatLng(35.96475,139.2164));
	points.push(new GLatLng(35.96492,139.2159));
	points.push(new GLatLng(35.96505,139.2107));
	points.push(new GLatLng(35.96592,139.2122));
	points.push(new GLatLng(35.96775,139.2115));
	points.push(new GLatLng(35.96864,139.2127));
	points.push(new GLatLng(35.96981,139.2096));
	points.push(new GLatLng(35.97135,139.2105));
	points.push(new GLatLng(35.97343,139.2102));
	points.push(new GLatLng(35.97094,139.2086));
	points.push(new GLatLng(35.96908,139.2069));
	points.push(new GLatLng(35.96867,139.2051));
	points.push(new GLatLng(35.96798,139.2039));
	points.push(new GLatLng(35.9672,139.2035));
	points.push(new GLatLng(35.96392,139.2018));
	points.push(new GLatLng(35.96649,139.1996));
	points.push(new GLatLng(35.96649,139.1986));
	points.push(new GLatLng(35.96671,139.1962));
	points.push(new GLatLng(35.96671,139.1958));
	points.push(new GLatLng(35.96673,139.196));
	points.push(new GLatLng(35.96669,139.1968));
	points.push(new GLatLng(35.95428,139.1888));
	points.push(new GLatLng(35.95482,139.1882));
	points.push(new GLatLng(35.9507,139.1896));
	points.push(new GLatLng(35.95036,139.1877));
	points.push(new GLatLng(35.95074,139.1884));
	points.push(new GLatLng(35.94799,139.1827));
	points.push(new GLatLng(35.94772,139.1819));
	points.push(new GLatLng(35.94778,139.1803));
	points.push(new GLatLng(35.94707,139.1801));
	points.push(new GLatLng(35.94776,139.1789));
	points.push(new GLatLng(35.94909,139.1781));
	points.push(new GLatLng(35.95203,139.1792));
	points.push(new GLatLng(35.95506,139.1789));
	points.push(new GLatLng(35.95628,139.1801));
	points.push(new GLatLng(35.95679,139.1797));
	points.push(new GLatLng(35.95701,139.1789));
	points.push(new GLatLng(35.96484,139.1819));
	points.push(new GLatLng(35.96437,139.1811));
	points.push(new GLatLng(35.96276,139.1794));
	points.push(new GLatLng(35.96224,139.1781));
	points.push(new GLatLng(35.96085,139.1758));
	points.push(new GLatLng(35.96115,139.1756));
	points.push(new GLatLng(35.96141,139.1759));
	points.push(new GLatLng(35.96587,139.1805));
	points.push(new GLatLng(35.96718,139.181));
	points.push(new GLatLng(35.96726,139.181));
	points.push(new GLatLng(35.9675,139.1816));
	points.push(new GLatLng(35.96769,139.1827));
	points.push(new GLatLng(35.96772,139.1828));
	points.push(new GLatLng(35.96864,139.1831));
	points.push(new GLatLng(35.97031,139.1795));
	points.push(new GLatLng(35.97196,139.1781));
	points.push(new GLatLng(35.97975,139.1733));
	points.push(new GLatLng(35.9802,139.1739));
	points.push(new GLatLng(35.981,139.1737));
	points.push(new GLatLng(35.98198,139.1724));
	points.push(new GLatLng(35.98711,139.1718));
	points.push(new GLatLng(35.9881,139.1722));
	points.push(new GLatLng(35.98857,139.1736));
	points.push(new GLatLng(35.98902,139.1724));
	points.push(new GLatLng(35.98911,139.1729));
	points.push(new GLatLng(35.98898,139.1739));
	points.push(new GLatLng(35.9952,139.1764));
	points.push(new GLatLng(35.99507,139.1778));
	points.push(new GLatLng(35.99679,139.1789));
	points.push(new GLatLng(36.00576,139.1715));
	points.push(new GLatLng(36.00709,139.1717));
	points.push(new GLatLng(36.01123,139.1639));
	points.push(new GLatLng(36.01173,139.1641));
	points.push(new GLatLng(36.01544,139.1633));
	points.push(new GLatLng(36.01735,139.1646));
	points.push(new GLatLng(36.01705,139.1644));
	points.push(new GLatLng(36.01636,139.1638));
	points.push(new GLatLng(36.01447,139.1653));
	points.push(new GLatLng(36.0135,139.1668));
	points.push(new GLatLng(36.01325,139.1678));
	points.push(new GLatLng(36.01138,139.1682));
	points.push(new GLatLng(36.01147,139.1695));
	points.push(new GLatLng(36.01177,139.1705));
	points.push(new GLatLng(36.0117,139.1695));
	points.push(new GLatLng(36.01411,139.1693));
	points.push(new GLatLng(36.01567,139.168));
	points.push(new GLatLng(36.01548,139.1674));
	points.push(new GLatLng(36.01855,139.167));
	points.push(new GLatLng(36.01913,139.1673));
	points.push(new GLatLng(36.02147,139.1675));
	points.push(new GLatLng(36.01739,139.1683));
	points.push(new GLatLng(36.01709,139.1694));
	points.push(new GLatLng(36.01778,139.1714));
	points.push(new GLatLng(36.01771,139.1715));
	points.push(new GLatLng(36.01685,139.1736));
	points.push(new GLatLng(36.01748,139.1731));
	points.push(new GLatLng(36.01827,139.1718));
	points.push(new GLatLng(36.01923,139.17));
	points.push(new GLatLng(36.02185,139.1693));
	points.push(new GLatLng(36.02393,139.1696));
	points.push(new GLatLng(36.02494,139.1716));
	points.push(new GLatLng(36.0296,139.1729));
	points.push(new GLatLng(36.03016,139.1736));
	points.push(new GLatLng(36.03089,139.1738));
	points.push(new GLatLng(36.03131,139.1733));
	points.push(new GLatLng(36.03254,139.1745));
	points.push(new GLatLng(36.03393,139.1765));
	points.push(new GLatLng(36.03432,139.1765));
	points.push(new GLatLng(36.03717,139.1778));
	points.push(new GLatLng(36.03801,139.1778));
	points.push(new GLatLng(36.03986,139.1776));
	points.push(new GLatLng(36.04232,139.1781));
	points.push(new GLatLng(36.04601,139.1786));
	points.push(new GLatLng(36.04756,139.1783));
	points.push(new GLatLng(36.04865,139.1779));
	points.push(new GLatLng(36.04971,139.1778));
	points.push(new GLatLng(36.04988,139.1778));
	points.push(new GLatLng(36.05104,139.1779));
	points.push(new GLatLng(36.05275,139.1778));
	points.push(new GLatLng(36.0535,139.1783));
	points.push(new GLatLng(36.05492,139.1788));
	points.push(new GLatLng(36.0599,139.1786));
	points.push(new GLatLng(36.06046,139.1789));
	points.push(new GLatLng(36.06245,139.1814));
	points.push(new GLatLng(36.0632,139.182));
	points.push(new GLatLng(36.06436,139.184));
	points.push(new GLatLng(36.06464,139.1848));
	points.push(new GLatLng(36.064,139.1856));
	points.push(new GLatLng(36.06273,139.1868));
	points.push(new GLatLng(36.06136,139.1875));
	points.push(new GLatLng(36.06108,139.1886));
	points.push(new GLatLng(36.06151,139.1911));
	points.push(new GLatLng(36.06149,139.1913));
	points.push(new GLatLng(36.06099,139.193));
	points.push(new GLatLng(36.0599,139.1945));
	points.push(new GLatLng(36.05865,139.1952));
	points.push(new GLatLng(36.05805,139.1956));
	points.push(new GLatLng(36.05734,139.1965));
	points.push(new GLatLng(36.05634,139.1981));
	points.push(new GLatLng(36.05614,139.1993));
	points.push(new GLatLng(36.05614,139.1995));
	points.push(new GLatLng(36.0543,139.2054));
	points.push(new GLatLng(36.05166,139.2071));
	points.push(new GLatLng(36.05048,139.2107));
	points.push(new GLatLng(36.0502,139.2112));
	points.push(new GLatLng(36.04966,139.2126));
	points.push(new GLatLng(36.04966,139.2131));
	points.push(new GLatLng(36.04992,139.2146));
	points.push(new GLatLng(36.05001,139.215));
	points.push(new GLatLng(36.04985,139.2159));
	points.push(new GLatLng(36.04981,139.216));
	points.push(new GLatLng(36.04833,139.2202));
	points.push(new GLatLng(36.04816,139.2212));
	points.push(new GLatLng(36.04814,139.2214));
	points.push(new GLatLng(36.04708,139.2271));
	points.push(new GLatLng(36.04704,139.2272));
	points.push(new GLatLng(36.04634,139.2283));
	points.push(new GLatLng(36.04625,139.2284));
	points.push(new GLatLng(36.04528,139.2289));
	points.push(new GLatLng(36.04127,139.2295));
	points.push(new GLatLng(36.04181,139.2317));
	points.push(new GLatLng(36.04189,139.2319));
	points.push(new GLatLng(36.04299,139.2328));
	points.push(new GLatLng(36.04354,139.2336));
	points.push(new GLatLng(36.04447,139.2345));
	points.push(new GLatLng(36.04801,139.2388));
	points.push(new GLatLng(36.05095,139.2457));
	points.push(new GLatLng(36.05174,139.2471));
	points.push(new GLatLng(36.05178,139.2472));
	points.push(new GLatLng(36.05204,139.2481));
	points.push(new GLatLng(36.05288,139.2497));
	points.push(new GLatLng(36.05333,139.254));
	points.push(new GLatLng(36.05333,139.2547));
	points.push(new GLatLng(36.05352,139.2557));
	points.push(new GLatLng(36.05361,139.2576));
	points.push(new GLatLng(36.05387,139.2588));
	points.push(new GLatLng(36.05395,139.2589));
	points.push(new GLatLng(36.0541,139.2595));
	points.push(new GLatLng(36.05372,139.2753));
	points.push(new GLatLng(36.05312,139.28));
	points.push(new GLatLng(36.0528,139.2812));
	points.push(new GLatLng(36.05136,139.2835));
	points.push(new GLatLng(36.05065,139.285));
	points.push(new GLatLng(36.0502,139.2859));
	points.push(new GLatLng(36.04994,139.2866));
	points.push(new GLatLng(36.04857,139.2925));
	points.push(new GLatLng(36.04779,139.2941));
	points.push(new GLatLng(36.04691,139.2949));
	points.push(new GLatLng(36.04707,139.2961));
	points.push(new GLatLng(36.04797,139.2979));
	points.push(new GLatLng(36.05007,139.3006));
	points.push(new GLatLng(36.05104,139.3008));
	points.push(new GLatLng(36.05206,139.3019));
	points.push(new GLatLng(36.05236,139.303));
	points.push(new GLatLng(36.05243,139.3042));
	points.push(new GLatLng(36.05239,139.3043));
	points.push(new GLatLng(36.05178,139.3056));
	points.push(new GLatLng(36.05153,139.3061));
	points.push(new GLatLng(36.04803,139.3085));
	points.push(new GLatLng(36.0456,139.3112));
	points.push(new GLatLng(36.04366,139.3134));
	points.push(new GLatLng(36.04048,139.317));
	points.push(new GLatLng(36.03934,139.3189));
	points.push(new GLatLng(36.03878,139.3215));
	points.push(new GLatLng(36.03644,139.3288));
	points.push(new GLatLng(36.03661,139.3301));
	points.push(new GLatLng(36.0367,139.3303));
	points.push(new GLatLng(36.03685,139.3308));
	points.push(new GLatLng(36.03788,139.3342));
	points.push(new GLatLng(36.03818,139.3351));
	points.push(new GLatLng(36.03829,139.3355));
	points.push(new GLatLng(36.03861,139.3365));
	points.push(new GLatLng(36.03904,139.3382));
	points.push(new GLatLng(36.03966,139.343));
	points.push(new GLatLng(36.04007,139.3464));
	points.push(new GLatLng(36.04007,139.347));
	points.push(new GLatLng(36.04003,139.3483));
	points.push(new GLatLng(36.039,139.3528));
	points.push(new GLatLng(36.03825,139.3546));
	points.push(new GLatLng(36.03857,139.3552));
	points.push(new GLatLng(36.04267,139.3549));
	points.push(new GLatLng(36.04539,139.3543));
	points.push(new GLatLng(36.00385,139.4482));
	points.push(new GLatLng(36.00246,139.4494));
	points.push(new GLatLng(35.99965,139.4515));
	points.push(new GLatLng(35.99763,139.453));
	points.push(new GLatLng(35.99091,139.4579));
	points.push(new GLatLng(35.98975,139.4588));
	points.push(new GLatLng(35.98613,139.4615));
	points.push(new GLatLng(35.98374,139.4632));
	points.push(new GLatLng(35.98259,139.464));
	points.push(new GLatLng(35.98149,139.4648));
	points.push(new GLatLng(35.97915,139.4664));
	points.push(new GLatLng(35.97716,139.4674));
	points.push(new GLatLng(35.97419,139.4688));
	points.push(new GLatLng(35.96698,139.4708));
	points.push(new GLatLng(35.96591,139.4711));
	points.push(new GLatLng(35.96523,139.4712));
	points.push(new GLatLng(35.96441,139.4714));
	points.push(new GLatLng(35.93611,139.4856));
	points.push(new GLatLng(35.93533,139.4863));
	points.push(new GLatLng(35.93521,139.4864));
	points.push(new GLatLng(35.9346,139.4869));
	points.push(new GLatLng(35.93087,139.4897));
	points.push(new GLatLng(35.93014,139.4902));
	points.push(new GLatLng(35.92815,139.4918));
	points.push(new GLatLng(35.91695,139.4999));
	points.push(new GLatLng(35.91536,139.5007));
	points.push(new GLatLng(35.91328,139.5022));
	points.push(new GLatLng(35.9116,139.5033));
	points.push(new GLatLng(35.91124,139.5035));
	points.push(new GLatLng(35.90461,139.5066));
	wpt_points.push(new GLatLng(35.98205,139.454733333333));
	wpt_points.push(new GLatLng(35.9677833333333,139.218383333333));
	wpt_points.push(new GLatLng(35.969,139.211183333333));
	wpt_points.push(new GLatLng(35.96965,139.2099));
	wpt_points.push(new GLatLng(35.9715,139.210466666667));
	wpt_points.push(new GLatLng(35.95395,139.18915));
	wpt_points.push(new GLatLng(35.9539333333333,139.189066666667));
	wpt_points.push(new GLatLng(35.9514,139.18965));
	wpt_points.push(new GLatLng(35.9477833333333,139.1833));
	wpt_points.push(new GLatLng(35.9477833333333,139.183316666667));
	wpt_points.push(new GLatLng(35.9508,139.177883333333));
	wpt_points.push(new GLatLng(35.9689333333333,139.183666666667));
	wpt_points.push(new GLatLng(35.9891833333333,139.1745));
	wpt_points.push(new GLatLng(35.98895,139.174633333333));
	wpt_points.push(new GLatLng(35.99775,139.17955));
	wpt_points.push(new GLatLng(36.0168666666667,139.1636));
	wpt_points.push(new GLatLng(35.905,139.511583333333));
	wpt_points.push(new GLatLng(35.9848,139.385666666667));
	wpt_points.push(new GLatLng(35.9853833333333,139.317));
	wpt_points.push(new GLatLng(35.9881833333333,139.309916666667));
	wpt_points.push(new GLatLng(36.0026166666667,139.283966666667));
	wpt_points.push(new GLatLng(36.0051,139.268983333333));
	wpt_points.push(new GLatLng(35.9678,139.218366666667));
	wpt_points.push(new GLatLng(35.9677,139.218283333333));
	wpt_points.push(new GLatLng(35.9651,139.21075));
	wpt_points.push(new GLatLng(35.9651,139.21075));
	wpt_points.push(new GLatLng(35.9651,139.21075));
	wpt_points.push(new GLatLng(35.9651,139.21075));
	wpt_points.push(new GLatLng(35.9651,139.21075));
	wpt_points.push(new GLatLng(35.9651,139.21075));
	wpt_points.push(new GLatLng(35.9736666666667,139.210516666667));
	wpt_points.push(new GLatLng(35.9737333333333,139.210333333333));
	wpt_points.push(new GLatLng(35.9652333333333,139.210866666667));
	wpt_points.push(new GLatLng(35.9665666666667,139.199));
	wpt_points.push(new GLatLng(35.9666833333333,139.196916666667));
	wpt_points.push(new GLatLng(35.9651833333333,139.1974));
	wpt_points.push(new GLatLng(35.9540166666667,139.189066666667));
	wpt_points.push(new GLatLng(35.9539666666667,139.189116666667));
	wpt_points.push(new GLatLng(35.95395,139.18915));
	wpt_points.push(new GLatLng(35.9539166666667,139.189066666667));
	wpt_points.push(new GLatLng(35.9571333333333,139.18515));
	wpt_points.push(new GLatLng(35.9514333333333,139.189683333333));
	wpt_points.push(new GLatLng(35.9503166666667,139.188883333333));
	wpt_points.push(new GLatLng(35.9499833333333,139.18805));
	wpt_points.push(new GLatLng(35.94775,139.1839));
	wpt_points.push(new GLatLng(35.9477666666667,139.183483333333));
	wpt_points.push(new GLatLng(35.9504833333333,139.177783333333));
	wpt_points.push(new GLatLng(35.9679,139.183283333333));
	wpt_points.push(new GLatLng(35.9688333333333,139.1838));
	wpt_points.push(new GLatLng(35.9817666666667,139.1727));
	wpt_points.push(new GLatLng(35.9891166666667,139.174416666667));
	wpt_points.push(new GLatLng(35.9890166666667,139.174633333333));
	wpt_points.push(new GLatLng(35.9977666666667,139.179516666667));
	wpt_points.push(new GLatLng(36.0162666666667,139.16335));
	wpt_points.push(new GLatLng(36.04145,139.17795));
	wpt_points.push(new GLatLng(36.0453833333333,139.354316666667));


	// 表示の中心位置・サイズを算出します。
	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/motorcycling.png";
	movemarkerIcon.shadow = "http://maps.google.co.jp/mapfiles/ms/icons/motorcycling.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,139.454733333333,35.98205,"<b><a href=\""+relativepathtomainhtml+"#photoID1\">IMG_4151</a></b><br /><a href=\""+relativepathtosubfolder+"IMG_4151.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMG_4151-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 09:40:10<br />E139°27′17.04″<br />N35°58′55.38″<br />11m<br />埼玉県比企郡川島町中山<hr /></small>");
	addWayPoints(map, 1,139.218383333333,35.9677833333333,"<b><a href=\""+relativepathtomainhtml+"#photoID2\">IMG_4152</a></b><br /><a href=\""+relativepathtosubfolder+"IMG_4152.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMG_4152-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 11:37:35<br />E139°13′6.18″<br />N35°58′4.02″<br />416m<br />埼玉県比企郡都幾川村椚平<hr /></small>");
	addWayPoints(map, 1,139.211183333333,35.969,"<b><a href=\""+relativepathtomainhtml+"#photoID3\">IMG_4153</a></b><br /><a href=\""+relativepathtosubfolder+"IMG_4153.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMG_4153-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 11:47:01<br />E139°12′40.26″<br />N35°58′8.40″<br />埼玉県比企郡都幾川村椚平<hr /></small>");
	addWayPoints(map, 1,139.2099,35.96965,"<b><a href=\""+relativepathtomainhtml+"#photoID4\">IMG_4154</a></b><br /><a href=\""+relativepathtosubfolder+"IMG_4154.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMG_4154-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 12:03:17<br />E139°12′35.64″<br />N35°58′10.74″<br />埼玉県比企郡都幾川村椚平<hr /></small>");
	addWayPoints(map, 1,139.210466666667,35.9715,"<b><a href=\""+relativepathtomainhtml+"#photoID5\">IMG_4156</a></b><br /><a href=\""+relativepathtosubfolder+"IMG_4156.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMG_4156-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 12:11:23<br />E139°12′37.68″<br />N35°58′17.40″<br />埼玉県比企郡都幾川村椚平<hr /></small>");
	addWayPoints(map, 1,139.18915,35.95395,"<b><a href=\""+relativepathtomainhtml+"#photoID6\">IMG_4158</a></b><br /><a href=\""+relativepathtosubfolder+"IMG_4158.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMG_4158-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 12:34:36<br />E139°11′20.94″<br />N35°57′14.22″<br />473m<br />埼玉県飯能市坂元<hr /></small>");
	addWayPoints(map, 1,139.189066666667,35.9539333333333,"<b><a href=\""+relativepathtomainhtml+"#photoID7\">IMG_4159</a></b><br /><a href=\""+relativepathtosubfolder+"IMG_4159.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMG_4159-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 12:35:03<br />E139°11′20.64″<br />N35°57′14.16″<br />461m<br />埼玉県飯能市坂元<hr /></small>");
	addWayPoints(map, 1,139.18965,35.9514,"<b><a href=\""+relativepathtomainhtml+"#photoID8\">IMG_4160</a></b><br /><a href=\""+relativepathtosubfolder+"IMG_4160.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMG_4160-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 12:40:48<br />E139°11′22.74″<br />N35°57′5.04″<br />400m<br />埼玉県飯能市北川<hr /></small>");
	addWayPoints(map, 1,139.1833,35.9477833333333,"<b><a href=\""+relativepathtomainhtml+"#photoID9\">IMG_4161</a></b><br /><a href=\""+relativepathtosubfolder+"IMG_4161.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMG_4161-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 12:49:15<br />E139°10′59.88″<br />N35°56′52.02″<br />479m<br />埼玉県飯能市坂元<hr /></small>");
	addWayPoints(map, 1,139.183316666667,35.9477833333333,"<b><a href=\""+relativepathtomainhtml+"#photoID10\">IMG_4162</a></b><br /><a href=\""+relativepathtosubfolder+"IMG_4162.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMG_4162-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 12:49:21<br />E139°10′59.94″<br />N35°56′52.02″<br />478m<br />埼玉県飯能市坂元<hr /></small>");
	addWayPoints(map, 1,139.177883333333,35.9508,"<b><a href=\""+relativepathtomainhtml+"#photoID11\">IMG_4163</a></b><br /><a href=\""+relativepathtosubfolder+"IMG_4163.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMG_4163-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 13:00:47<br />E139°10′40.38″<br />N35°57′2.88″<br />399m<br />埼玉県飯能市坂元<hr /></small>");
	addWayPoints(map, 1,139.183666666667,35.9689333333333,"<b><a href=\""+relativepathtomainhtml+"#photoID12\">IMG_4164</a></b><br /><a href=\""+relativepathtosubfolder+"IMG_4164.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMG_4164-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 13:09:54<br />E139°11′1.20″<br />N35°58′8.16″<br />829m<br />埼玉県飯能市坂元<hr /></small>");
	addWayPoints(map, 1,139.1745,35.9891833333333,"<b><a href=\""+relativepathtomainhtml+"#photoID13\">IMG_4165</a></b><br /><a href=\""+relativepathtosubfolder+"IMG_4165.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMG_4165-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 13:15:53<br />E139°10′28.20″<br />N35°59′21.06″<br />748m<br />埼玉県比企郡都幾川村大野<hr /></small>");
	addWayPoints(map, 1,139.174633333333,35.98895,"<b><a href=\""+relativepathtomainhtml+"#photoID14\">IMG_4166</a></b><br /><a href=\""+relativepathtosubfolder+"IMG_4166.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMG_4166-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 13:16:28<br />E139°10′28.68″<br />N35°59′20.22″<br />752m<br />埼玉県比企郡都幾川村大野<hr /></small>");
	addWayPoints(map, 1,139.17955,35.99775,"<b><a href=\""+relativepathtomainhtml+"#photoID15\">IMG_4167</a></b><br /><a href=\""+relativepathtosubfolder+"IMG_4167.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMG_4167-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 13:18:55<br />E139°10′46.38″<br />N35°59′51.90″<br />775m<br />埼玉県比企郡都幾川村大野<hr /></small>");
	addWayPoints(map, 1,139.1636,36.0168666666667,"<b><a href=\""+relativepathtomainhtml+"#photoID16\">IMG_4168</a></b><br /><a href=\""+relativepathtosubfolder+"IMG_4168.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMG_4168-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 13:23:32<br />E139°9′48.96″<br />N36°1′0.72″<br />590m<br />埼玉県秩父市定峰<hr /></small>");
	addWayPoints(map, 1,139.511583333333,35.905,"<b><a href=\""+relativepathtomainhtml+"#photoID17\">IMG_4169</a></b><br /><a href=\""+relativepathtosubfolder+"IMG_4169.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMG_4169-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 16:36:46<br />E139°30′41.70″<br />N35°54′18.00″<br />11m<br />埼玉県川越市南田島<hr /></small>");
	addWayPoints(map, 1,139.385666666667,35.9848,"<b><a href=\""+relativepathtomainhtml+"#photoID18\">SANY1878</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1878.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1878-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 10:41:25<br />E139°23′8.40″<br />N35°59′5.28″<br />33m<br />埼玉県東松山市田木<hr /></small>");
	addWayPoints(map, 1,139.317,35.9853833333333,"<b><a href=\""+relativepathtomainhtml+"#photoID19\">SANY1879</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1879.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1879-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 10:50:35<br />E139°19′1.20″<br />N35°59′7.38″<br />63m<br />埼玉県比企郡鳩山町熊井<hr /></small>");
	addWayPoints(map, 1,139.309916666667,35.9881833333333,"<b><a href=\""+relativepathtomainhtml+"#photoID20\">SANY1880</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1880.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1880-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 10:51:36<br />E139°18′35.70″<br />N35°59′17.46″<br />71m<br />埼玉県比企郡鳩山町熊井<hr /></small>");
	addWayPoints(map, 1,139.283966666667,36.0026166666667,"<b><a href=\""+relativepathtomainhtml+"#photoID21\">SANY1881</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1881.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1881-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 10:56:40<br />E139°17′2.28″<br />N36°0′9.42″<br />埼玉県比企郡都幾川村馬場<hr /></small>");
	addWayPoints(map, 1,139.268983333333,36.0051,"<b><a href=\""+relativepathtomainhtml+"#photoID22\">SANY1882</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1882.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1882-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 11:13:21<br />E139°16′8.34″<br />N36°0′18.36″<br />116m<br />埼玉県比企郡都幾川村桃木<hr /></small>");
	addWayPoints(map, 1,139.218366666667,35.9678,"<b><a href=\""+relativepathtomainhtml+"#photoID23\">SANY1884</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1884.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1884-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 11:37:11<br />E139°13′6.12″<br />N35°58′4.08″<br />422m<br />埼玉県比企郡都幾川村椚平<hr /></small>");
	addWayPoints(map, 1,139.218283333333,35.9677,"<b><a href=\""+relativepathtomainhtml+"#photoID24\">SANY1885</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1885.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1885-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 11:40:37<br />E139°13′5.82″<br />N35°58′3.72″<br />419m<br />埼玉県比企郡都幾川村椚平<hr /></small>");
	addWayPoints(map, 1,139.21075,35.9651,"<b><a href=\""+relativepathtomainhtml+"#photoID25\">SANY1887</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1887.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1887-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 11:46:46<br />E139°12′38.70″<br />N35°57′54.36″<br />558m<br />埼玉県比企郡都幾川村椚平<hr /></small>");
	addWayPoints(map, 1,139.21075,35.9651,"<b><a href=\""+relativepathtomainhtml+"#photoID26\">SANY1888</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1888.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1888-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 11:48:00<br />E139°12′38.70″<br />N35°57′54.36″<br />558m<br />埼玉県比企郡都幾川村椚平<hr /></small>");
	addWayPoints(map, 1,139.21075,35.9651,"<b><a href=\""+relativepathtomainhtml+"#photoID27\">SANY1889</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1889.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1889-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 11:48:50<br />E139°12′38.70″<br />N35°57′54.36″<br />558m<br />埼玉県比企郡都幾川村椚平<hr /></small>");
	addWayPoints(map, 1,139.21075,35.9651,"<b><a href=\""+relativepathtomainhtml+"#photoID28\">SANY1891</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1891.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1891-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 11:53:08<br />E139°12′38.70″<br />N35°57′54.36″<br />558m<br />埼玉県比企郡都幾川村椚平<hr /></small>");
	addWayPoints(map, 1,139.21075,35.9651,"<b><a href=\""+relativepathtomainhtml+"#photoID29\">SANY1892</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1892.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1892-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 11:53:44<br />E139°12′38.70″<br />N35°57′54.36″<br />558m<br />埼玉県比企郡都幾川村椚平<hr /></small>");
	addWayPoints(map, 1,139.21075,35.9651,"<b><a href=\""+relativepathtomainhtml+"#photoID30\">SANY1893</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1893.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1893-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 11:54:03<br />E139°12′38.70″<br />N35°57′54.36″<br />558m<br />埼玉県比企郡都幾川村椚平<hr /></small>");
	addWayPoints(map, 1,139.210516666667,35.9736666666667,"<b><a href=\""+relativepathtomainhtml+"#photoID31\">SANY1895</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1895.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1895-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 12:02:05<br />E139°12′37.86″<br />N35°58′25.20″<br />埼玉県比企郡都幾川村椚平<hr /></small>");
	addWayPoints(map, 1,139.210333333333,35.9737333333333,"<b><a href=\""+relativepathtomainhtml+"#photoID32\">SANY1896</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1896.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1896-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 12:02:12<br />E139°12′37.20″<br />N35°58′25.44″<br />埼玉県比企郡都幾川村椚平<hr /></small>");
	addWayPoints(map, 1,139.210866666667,35.9652333333333,"<b><a href=\""+relativepathtomainhtml+"#photoID33\">SANY1897</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1897.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1897-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 12:02:38<br />E139°12′39.12″<br />N35°57′54.84″<br />埼玉県比企郡都幾川村椚平<hr /></small>");
	addWayPoints(map, 1,139.199,35.9665666666667,"<b><a href=\""+relativepathtomainhtml+"#photoID34\">SANY1900</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1900.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1900-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 12:14:59<br />E139°11′56.40″<br />N35°57′59.64″<br />821m<br />埼玉県飯能市北川<hr /></small>");
	addWayPoints(map, 1,139.196916666667,35.9666833333333,"<b><a href=\""+relativepathtomainhtml+"#photoID35\">SANY1901</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1901.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1901-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 12:15:46<br />E139°11′48.90″<br />N35°58′0.06″<br />824m<br />埼玉県飯能市北川<hr /></small>");
	addWayPoints(map, 1,139.1974,35.9651833333333,"<b><a href=\""+relativepathtomainhtml+"#photoID36\">SANY1903</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1903.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1903-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 12:22:22<br />E139°11′50.64″<br />N35°57′54.66″<br />744m<br />埼玉県飯能市北川<hr /></small>");
	addWayPoints(map, 1,139.189066666667,35.9540166666667,"<b><a href=\""+relativepathtomainhtml+"#photoID37\">SANY1905</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1905.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1905-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 12:34:14<br />E139°11′20.64″<br />N35°57′14.46″<br />493m<br />埼玉県飯能市坂元<hr /></small>");
	addWayPoints(map, 1,139.189116666667,35.9539666666667,"<b><a href=\""+relativepathtomainhtml+"#photoID38\">SANY1906</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1906.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1906-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 12:34:23<br />E139°11′20.82″<br />N35°57′14.28″<br />485m<br />埼玉県飯能市坂元<hr /></small>");
	addWayPoints(map, 1,139.18915,35.95395,"<b><a href=\""+relativepathtomainhtml+"#photoID39\">SANY1907</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1907.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1907-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 12:34:45<br />E139°11′20.94″<br />N35°57′14.22″<br />471m<br />埼玉県飯能市坂元<hr /></small>");
	addWayPoints(map, 1,139.189066666667,35.9539166666667,"<b><a href=\""+relativepathtomainhtml+"#photoID40\">SANY1908</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1908.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1908-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 12:35:00<br />E139°11′20.64″<br />N35°57′14.10″<br />462m<br />埼玉県飯能市坂元<hr /></small>");
	addWayPoints(map, 1,139.18515,35.9571333333333,"<b><a href=\""+relativepathtomainhtml+"#photoID41\">SANY1910</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1910.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1910-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 12:37:21<br />E139°11′6.54″<br />N35°57′25.68″<br />499m<br />埼玉県飯能市坂元<hr /></small>");
	addWayPoints(map, 1,139.189683333333,35.9514333333333,"<b><a href=\""+relativepathtomainhtml+"#photoID42\">SANY1911</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1911.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1911-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 12:40:32<br />E139°11′22.86″<br />N35°57′5.16″<br />402m<br />埼玉県飯能市北川<hr /></small>");
	addWayPoints(map, 1,139.188883333333,35.9503166666667,"<b><a href=\""+relativepathtomainhtml+"#photoID43\">SANY1912</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1912.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1912-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 12:41:27<br />E139°11′19.98″<br />N35°57′1.14″<br />414m<br />埼玉県飯能市坂元<hr /></small>");
	addWayPoints(map, 1,139.18805,35.9499833333333,"<b><a href=\""+relativepathtomainhtml+"#photoID44\">SANY1913</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1913.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1913-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 12:42:50<br />E139°11′16.98″<br />N35°56′59.94″<br />424m<br />埼玉県飯能市坂元<hr /></small>");
	addWayPoints(map, 1,139.1839,35.94775,"<b><a href=\""+relativepathtomainhtml+"#photoID45\">SANY1914</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1914.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1914-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 12:48:32<br />E139°11′2.04″<br />N35°56′51.90″<br />491m<br />埼玉県飯能市坂元<hr /></small>");
	addWayPoints(map, 1,139.183483333333,35.9477666666667,"<b><a href=\""+relativepathtomainhtml+"#photoID46\">SANY1915</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1915.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1915-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 12:48:47<br />E139°11′0.54″<br />N35°56′51.96″<br />483m<br />埼玉県飯能市坂元<hr /></small>");
	addWayPoints(map, 1,139.177783333333,35.9504833333333,"<b><a href=\""+relativepathtomainhtml+"#photoID47\">SANY1916</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1916.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1916-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 13:00:25<br />E139°10′40.02″<br />N35°57′1.74″<br />392m<br />埼玉県飯能市坂元<hr /></small>");
	addWayPoints(map, 1,139.183283333333,35.9679,"<b><a href=\""+relativepathtomainhtml+"#photoID48\">SANY1917</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1917.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1917-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 13:09:12<br />E139°10′59.82″<br />N35°58′4.44″<br />823m<br />埼玉県飯能市坂元<hr /></small>");
	addWayPoints(map, 1,139.1838,35.9688333333333,"<b><a href=\""+relativepathtomainhtml+"#photoID49\">SANY1918</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1918.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1918-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 13:09:27<br />E139°11′1.68″<br />N35°58′7.80″<br />831m<br />埼玉県飯能市坂元<hr /></small>");
	addWayPoints(map, 1,139.1727,35.9817666666667,"<b><a href=\""+relativepathtomainhtml+"#photoID50\">SANY1919</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1919.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1919-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 13:12:54<br />E139°10′21.72″<br />N35°58′54.36″<br />835m<br />埼玉県比企郡都幾川村大野<hr /></small>");
	addWayPoints(map, 1,139.174416666667,35.9891166666667,"<b><a href=\""+relativepathtomainhtml+"#photoID51\">SANY1920</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1920.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1920-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 13:15:29<br />E139°10′27.90″<br />N35°59′20.82″<br />749m<br />埼玉県比企郡都幾川村大野<hr /></small>");
	addWayPoints(map, 1,139.174633333333,35.9890166666667,"<b><a href=\""+relativepathtomainhtml+"#photoID52\">SANY1921</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1921.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1921-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 13:16:08<br />E139°10′28.68″<br />N35°59′20.46″<br />749m<br />埼玉県比企郡都幾川村大野<hr /></small>");
	addWayPoints(map, 1,139.179516666667,35.9977666666667,"<b><a href=\""+relativepathtomainhtml+"#photoID53\">SANY1922</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1922.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1922-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 13:18:42<br />E139°10′46.26″<br />N35°59′51.96″<br />782m<br />埼玉県比企郡都幾川村大野<hr /></small>");
	addWayPoints(map, 1,139.16335,36.0162666666667,"<b><a href=\""+relativepathtomainhtml+"#photoID54\">SANY1923</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1923.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1923-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 13:23:16<br />E139°9′48.06″<br />N36°0′58.56″<br />598m<br />埼玉県秩父市定峰<hr /></small>");
	addWayPoints(map, 1,139.17795,36.04145,"<b><a href=\""+relativepathtomainhtml+"#photoID55\">SANY1924</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1924.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1924-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 13:32:12<br />E139°10′40.62″<br />N36°2′29.22″<br />219m<br />埼玉県秩父郡東秩父村<hr /></small>");
	addWayPoints(map, 1,139.354316666667,36.0453833333333,"<b><a href=\""+relativepathtomainhtml+"#photoID56\">SANY1925</a></b><br /><a href=\""+relativepathtosubfolder+"SANY1925.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"SANY1925-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:07:17 14:02:21<br />E139°21′15.54″<br />N36°2′43.38″<br />51m<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;
}
