// Generated by trk2googlemaps and kml ( http://etoh.minidns.net/gps/ )
// 本コードはtrk2googlemaps and kmlによって自動生成されました。
numofwaypoints=0;
posofwaypoints=0;
numofphotos=13;
posofphotos=0;
waypoint_markers = [];
waypoint_infos   = [];
photo_markers    = [];
photo_infos      = [];
var points = [];
var map;
var currentzoom;
var key = "ABQIAAAArQW0fZU-elwP0bFnqHoA0BRtwwv9p55VtzksrvKzWr-DBWQmfxQ5OsIJ2-3kJzf4pzROZLR_CSD5bg";
var movemarkerIcon;
   

// ウェイポイント表示用関数
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=5; // この値を変更すると、線の太さが変わります。 
	var lineopacity=1.00;   // この値を変更すると、線の透明度が変わります。
	var defaultmaptype=0; // この値を変更すると初期のマップタイプが変更されます。
	var wpt_points = [];

	// トラックデータ列です。
		points.push(new GLatLng(35.8623362,139.3263603));
	points.push(new GLatLng(35.8620572,139.3227125));
	points.push(new GLatLng(35.861156,139.3182493));
	points.push(new GLatLng(35.8622074,139.316361));
	points.push(new GLatLng(35.8642245,139.3141723));
	points.push(new GLatLng(35.864203,139.3132282));
	points.push(new GLatLng(35.8592892,139.3105245));
	points.push(new GLatLng(35.8556628,139.3071557));
	points.push(new GLatLng(35.8550835,139.3058897));
	points.push(new GLatLng(35.8542466,139.3033362));
	points.push(new GLatLng(35.850234,139.2963839));
	points.push(new GLatLng(35.8376813,139.2940236));
	points.push(new GLatLng(35.8383036,139.2914487));
	points.push(new GLatLng(35.8384538,139.2905474));
	points.push(new GLatLng(35.8376599,139.2817498));
	points.push(new GLatLng(35.8376813,139.2809988));
	points.push(new GLatLng(35.8361793,139.2751837));
	points.push(new GLatLng(35.834055,139.2728019));
	points.push(new GLatLng(35.8337546,139.2724586));
	points.push(new GLatLng(35.8319736,139.2695618));
	points.push(new GLatLng(35.8295703,139.2658282));
	points.push(new GLatLng(35.8294845,139.2634679));
	points.push(new GLatLng(35.8270383,139.2589188));
	points.push(new GLatLng(35.8237767,139.2541338));
	points.push(new GLatLng(35.8229184,139.2514301));
	points.push(new GLatLng(35.8230472,139.24922));
	points.push(new GLatLng(35.8183694,139.243641));
	points.push(new GLatLng(35.8183265,139.2396069));
	points.push(new GLatLng(35.8201075,139.2337275));
	points.push(new GLatLng(35.8203435,139.232998));
	points.push(new GLatLng(35.8214593,139.2305518));
	points.push(new GLatLng(35.8243132,139.2287708));
	points.push(new GLatLng(35.8258796,139.2201019));
	points.push(new GLatLng(35.828197,139.2182995));
	points.push(new GLatLng(35.8283901,139.2168403));
	points.push(new GLatLng(35.8266521,139.2152095));
	points.push(new GLatLng(35.8272743,139.2155314));
	points.push(new GLatLng(35.8267379,139.2142654));
	points.push(new GLatLng(35.8268881,139.2125488));
	points.push(new GLatLng(35.8196783,139.2094374));
	points.push(new GLatLng(35.8190775,139.2080641));
	points.push(new GLatLng(35.8129835,139.2083646));
	points.push(new GLatLng(35.8056665,139.2069269));
	points.push(new GLatLng(35.8052588,139.2050815));
	points.push(new GLatLng(35.8045077,139.1966916));
	points.push(new GLatLng(35.8044005,139.1964341));
	points.push(new GLatLng(35.8045507,139.1928936));
	points.push(new GLatLng(35.8057952,139.188602));
	points.push(new GLatLng(35.8021689,139.1847182));
	points.push(new GLatLng(35.8012033,139.1825295));
	points.push(new GLatLng(35.8010101,139.1776801));
	points.push(new GLatLng(35.8032847,139.1760493));
	points.push(new GLatLng(35.8068252,139.1773797));
	points.push(new GLatLng(35.8065677,139.1705132));
	points.push(new GLatLng(35.8110094,139.16811));
	points.push(new GLatLng(35.8112884,139.1678525));
	points.push(new GLatLng(35.8134556,139.1650844));
	points.push(new GLatLng(35.809722,139.1581751));
	points.push(new GLatLng(35.8112455,139.1563941));
	points.push(new GLatLng(35.8158803,139.1522527));
	points.push(new GLatLng(35.8158374,139.1511155));
	points.push(new GLatLng(35.8158159,139.1496564));
	points.push(new GLatLng(35.8160091,139.1420603));
	points.push(new GLatLng(35.8148718,139.1350651));
	points.push(new GLatLng(35.813756,139.133091));
	points.push(new GLatLng(35.8149791,139.1321254));
	points.push(new GLatLng(35.8150864,139.1320396));
	points.push(new GLatLng(35.8144856,139.128306));
	points.push(new GLatLng(35.8108163,139.1222978));
	points.push(new GLatLng(35.812726,139.1207529));
	points.push(new GLatLng(35.81249,139.1183282));
	points.push(new GLatLng(35.8097649,139.114101));
	points.push(new GLatLng(35.8075333,139.112599));
	points.push(new GLatLng(35.8020187,139.1089941));
	points.push(new GLatLng(35.8013964,139.104445));
	points.push(new GLatLng(35.8025122,139.1021276));
	points.push(new GLatLng(35.8059454,139.0939952));
	points.push(new GLatLng(35.8003664,139.0905619));
	points.push(new GLatLng(35.8017397,139.0874291));
	points.push(new GLatLng(35.8019328,139.0851761));
	points.push(new GLatLng(35.7992506,139.0819789));
	points.push(new GLatLng(35.7992077,139.0782881));
	points.push(new GLatLng(35.797534,139.0768934));
	points.push(new GLatLng(35.796547,139.0732241));
	points.push(new GLatLng(35.794251,139.0732456));
	points.push(new GLatLng(35.7930494,139.0712715));
	points.push(new GLatLng(35.7943797,139.0695334));
	points.push(new GLatLng(35.7945085,139.069233));
	points.push(new GLatLng(35.7952166,139.0637398));
	points.push(new GLatLng(35.7948303,139.0628815));
	points.push(new GLatLng(35.794766,139.0592766));
	points.push(new GLatLng(35.7945514,139.0574527));
	points.push(new GLatLng(35.7944226,139.0531398));
	points.push(new GLatLng(35.7941222,139.0482689));
	points.push(new GLatLng(35.78614,139.0424538));
	points.push(new GLatLng(35.7843375,139.0407372));
	points.push(new GLatLng(35.7843375,139.0393425));
	points.push(new GLatLng(35.7839298,139.0368319));
	points.push(new GLatLng(35.784359,139.0341283));
	points.push(new GLatLng(35.7856679,139.0347934));
	points.push(new GLatLng(35.7848311,139.0335274));
	points.push(new GLatLng(35.7836509,139.0310813));
	points.push(new GLatLng(35.7839942,139.0282918));
	points.push(new GLatLng(35.7821059,139.0277982));
	points.push(new GLatLng(35.7820201,139.0273691));
	points.push(new GLatLng(35.7818699,139.025116));
	points.push(new GLatLng(35.781076,139.024601));
	points.push(new GLatLng(35.7813335,139.0209962));
	points.push(new GLatLng(35.7817626,139.0174127));
	points.push(new GLatLng(35.7800245,139.0162326));
	points.push(new GLatLng(35.7774925,139.0159965));
	points.push(new GLatLng(35.778265,139.0137649));
	points.push(new GLatLng(35.7790589,139.01016));
	points.push(new GLatLng(35.7793164,139.008894));
	points.push(new GLatLng(35.7791662,139.0070272));
	points.push(new GLatLng(35.7786298,139.0041733));
	points.push(new GLatLng(35.7776213,139.002843));
	points.push(new GLatLng(35.7746601,139.001577));
	points.push(new GLatLng(35.7683087,138.9984871));
	points.push(new GLatLng(35.7615709,138.9876509));
	points.push(new GLatLng(35.7618928,138.9858699));
	points.push(new GLatLng(35.7604766,138.9751411));
	points.push(new GLatLng(35.7609058,138.9675451));
	points.push(new GLatLng(35.7594681,138.9661074));
	points.push(new GLatLng(35.7584596,138.9632536));
	points.push(new GLatLng(35.7586312,138.9616442));
	points.push(new GLatLng(35.7589746,138.9480186));
	points.push(new GLatLng(35.7593393,138.9461733));
	points.push(new GLatLng(35.7595325,138.9457441));
	points.push(new GLatLng(35.7598329,138.9439846));
	points.push(new GLatLng(35.7598543,138.9435125));
	points.push(new GLatLng(35.7597041,138.9413024));
	points.push(new GLatLng(35.7586098,138.9398003));
	points.push(new GLatLng(35.7583738,138.9410234));
	points.push(new GLatLng(35.7577086,138.9440919));
	points.push(new GLatLng(35.7469154,138.9556146));
	points.push(new GLatLng(35.7443404,138.9600349));
	points.push(new GLatLng(35.7427311,138.9603139));
	points.push(new GLatLng(35.742538,138.9611722));
	points.push(new GLatLng(35.739727,138.9620734));
	points.push(new GLatLng(35.7384825,138.9612365));
	points.push(new GLatLng(35.7396412,138.9588762));
	points.push(new GLatLng(35.7401347,138.9586831));
	points.push(new GLatLng(35.7381606,138.9577819));
	points.push(new GLatLng(35.7387185,138.9586187));
	points.push(new GLatLng(35.7395983,138.9577604));
	points.push(new GLatLng(35.7403279,138.9605928));
	points.push(new GLatLng(35.7425594,138.9608074));
	points.push(new GLatLng(35.7412505,138.9572454));
	points.push(new GLatLng(35.7415295,138.9562798));
	points.push(new GLatLng(35.7421303,138.9580179));
	points.push(new GLatLng(35.7414437,138.9580179));
	points.push(new GLatLng(35.7428169,138.9560438));
	points.push(new GLatLng(35.741508,138.9550782));
	points.push(new GLatLng(35.7431603,138.9528466));
	points.push(new GLatLng(35.7430315,138.9524389));
	points.push(new GLatLng(35.7414437,138.9530826));
	points.push(new GLatLng(35.7423449,138.9514733));
	points.push(new GLatLng(35.7460785,138.95113));
	points.push(new GLatLng(35.7462931,138.9507008));
	points.push(new GLatLng(35.7443619,138.952117));
	points.push(new GLatLng(35.7448125,138.9502502));
	points.push(new GLatLng(35.7438684,138.9496494));
	points.push(new GLatLng(35.7435894,138.9510012));
	points.push(new GLatLng(35.7359505,138.9520956));
	points.push(new GLatLng(35.7336331,138.9473749));
	points.push(new GLatLng(35.7325816,138.9487911));
	points.push(new GLatLng(35.7322598,138.9485765));
	points.push(new GLatLng(35.7324314,138.9467097));
	points.push(new GLatLng(35.7302857,138.9464093));
	points.push(new GLatLng(35.7297921,138.9479328));
	points.push(new GLatLng(35.7299423,138.9482117));
	points.push(new GLatLng(35.7271958,138.9501215));
	points.push(new GLatLng(35.7274532,138.9477397));
	points.push(new GLatLng(35.7267666,138.9463664));
	points.push(new GLatLng(35.7241273,138.9508939));
	points.push(new GLatLng(35.72402,138.952632));
	points.push(new GLatLng(35.7239556,138.952911));
	points.push(new GLatLng(35.7233334,138.950336));
	points.push(new GLatLng(35.7200933,138.9511085));
	points.push(new GLatLng(35.7209087,138.9497567));
	points.push(new GLatLng(35.7214451,138.9493275));
	points.push(new GLatLng(35.7242561,138.9468814));
	points.push(new GLatLng(35.7243633,138.9459372));
	points.push(new GLatLng(35.7233763,138.9472032));
	points.push(new GLatLng(35.7228828,138.9449716));
	points.push(new GLatLng(35.7240415,138.9410663));
	points.push(new GLatLng(35.7279468,138.9405084));
	points.push(new GLatLng(35.726316,138.9394785));
	points.push(new GLatLng(35.7269812,138.9400578));
	points.push(new GLatLng(35.7260585,138.9390279));
	points.push(new GLatLng(35.7252217,138.9391995));
	points.push(new GLatLng(35.7256293,138.9382339));
	points.push(new GLatLng(35.7226896,138.9393712));
	points.push(new GLatLng(35.7203078,138.9371181));
	points.push(new GLatLng(35.7191706,138.9382983));
	points.push(new GLatLng(35.7192779,138.9372039));
	points.push(new GLatLng(35.717454,138.9375044));
	points.push(new GLatLng(35.7180119,138.9357019));
	points.push(new GLatLng(35.7186127,138.9354444));
	points.push(new GLatLng(35.7211662,138.9334059));
	points.push(new GLatLng(35.7202649,138.9385987));
	points.push(new GLatLng(35.7216168,138.9404011));
	points.push(new GLatLng(35.720318,138.940578));
	points.push(new GLatLng(35.7160807,138.9386416));
	points.push(new GLatLng(35.7147288,138.9386845));
	points.push(new GLatLng(35.7121754,138.9390279));
	points.push(new GLatLng(35.7106948,138.9410663));
	points.push(new GLatLng(35.7091928,138.9497996));
	points.push(new GLatLng(35.7087422,138.9512587));
	points.push(new GLatLng(35.6957603,138.9530612));
	points.push(new GLatLng(35.6943655,138.9523745));
	points.push(new GLatLng(35.6944084,138.955679));
	points.push(new GLatLng(35.6947088,138.9582754));
	points.push(new GLatLng(35.6945157,138.9585758));
	points.push(new GLatLng(35.6932068,138.95746));
	points.push(new GLatLng(35.6931639,138.9592839));
	points.push(new GLatLng(35.6902242,138.9629317));
	points.push(new GLatLng(35.6896019,138.9646912));
	points.push(new GLatLng(35.6888938,138.9650775));
	points.push(new GLatLng(35.6875205,138.9640475));
	points.push(new GLatLng(35.6866837,138.9645196));
	points.push(new GLatLng(35.6778002,138.9682103));
	points.push(new GLatLng(35.6746459,138.9669872));
	points.push(new GLatLng(35.6698394,138.9659572));
	points.push(new GLatLng(35.6664705,138.9658285));
	points.push(new GLatLng(35.665977,138.967352));
	points.push(new GLatLng(35.6658054,138.9675451));
	points.push(new GLatLng(35.6642604,138.9674593));
	points.push(new GLatLng(35.6622863,138.9657856));
	points.push(new GLatLng(35.6570077,138.9636827));
	points.push(new GLatLng(35.6554198,138.9619876));
	points.push(new GLatLng(35.6539393,138.9602066));
	points.push(new GLatLng(35.6516862,138.9607859));
	points.push(new GLatLng(35.6504202,138.9624382));
	points.push(new GLatLng(35.6448412,138.958447));
	points.push(new GLatLng(35.6442189,138.9543915));
	points.push(new GLatLng(35.6343913,138.947804));
	points.push(new GLatLng(35.6332112,138.9466668));
	points.push(new GLatLng(35.6231475,138.9548422));
	points.push(new GLatLng(35.6224179,138.9561511));
	points.push(new GLatLng(35.6131697,138.9454652));
	points.push(new GLatLng(35.612483,138.9433194));
	points.push(new GLatLng(35.6101012,138.9443279));
	points.push(new GLatLng(35.6100798,138.9431692));
	points.push(new GLatLng(35.6080198,138.9401866));
	points.push(new GLatLng(35.583601,138.9330841));
	points.push(new GLatLng(35.5755329,138.9292861));
	points.push(new GLatLng(35.5745459,138.9272905));
	points.push(new GLatLng(35.5728507,138.9248229));
	points.push(new GLatLng(35.5714774,138.925252));
	points.push(new GLatLng(35.5684304,138.9208317));
	points.push(new GLatLng(35.5668211,138.9186431));
	points.push(new GLatLng(35.557015,138.9096523));
	points.push(new GLatLng(35.5547404,138.911047));
	points.push(new GLatLng(35.5518866,138.9085794));
	points.push(new GLatLng(35.5436683,138.8976145));
	points.push(new GLatLng(35.5421662,138.8941813));
	points.push(new GLatLng(35.5408359,138.8914562));
	points.push(new GLatLng(35.5405784,138.8910485));
	points.push(new GLatLng(35.5404711,138.8890315));
	points.push(new GLatLng(35.5389261,138.8855339));
	points.push(new GLatLng(35.5344415,138.8687111));
	points.push(new GLatLng(35.5311799,138.8633466));
	points.push(new GLatLng(35.530901,138.8624025));
	points.push(new GLatLng(35.5286694,138.8579822));
	points.push(new GLatLng(35.5289698,138.8572527));
	points.push(new GLatLng(35.5279613,138.8559652));
	points.push(new GLatLng(35.5273605,138.8534332));
	points.push(new GLatLng(35.5256653,138.850472));
	points.push(new GLatLng(35.5238629,138.8472105));
	points.push(new GLatLng(35.5216742,138.8422967));
	points.push(new GLatLng(35.5212236,138.8415456));
	points.push(new GLatLng(35.5178118,138.8363314));
	points.push(new GLatLng(35.5123401,138.8309456));
	points.push(new GLatLng(35.5051303,138.8212681));
	points.push(new GLatLng(35.5033922,138.818307));
	points.push(new GLatLng(35.4985213,138.8097239));
	points.push(new GLatLng(35.4902816,138.8017631));
	points.push(new GLatLng(35.4912257,138.8001753));
	points.push(new GLatLng(35.4925132,138.7987161));
	points.push(new GLatLng(35.492127,138.7973643));
	points.push(new GLatLng(35.4921913,138.7945104));
	points.push(new GLatLng(35.4969764,138.7946606));
	points.push(new GLatLng(35.4946804,138.7953687));
	points.push(new GLatLng(35.4930926,138.7894464));
	points.push(new GLatLng(35.4929853,138.7892533));
	points.push(new GLatLng(35.494659,138.7958408));
	points.push(new GLatLng(35.4903245,138.8019348));
	points.push(new GLatLng(35.4895735,138.803587));
	points.push(new GLatLng(35.4859901,138.8113332));
	points.push(new GLatLng(35.4853463,138.8126207));
	points.push(new GLatLng(35.4831791,138.8177491));
	points.push(new GLatLng(35.4775143,138.8161612));
	points.push(new GLatLng(35.4774714,138.8323832));
	points.push(new GLatLng(35.4747248,138.8361169));
	points.push(new GLatLng(35.4728151,138.8403011));
	points.push(new GLatLng(35.470799,138.84208));
	points.push(new GLatLng(35.4672146,138.8421035));
	points.push(new GLatLng(35.4673648,138.8408805));
	points.push(new GLatLng(35.4656482,138.8416959));
	points.push(new GLatLng(35.4598975,138.8427044));
	points.push(new GLatLng(35.4597902,138.8460303));
	points.push(new GLatLng(35.457623,138.8573814));
	points.push(new GLatLng(35.4576874,138.8572741));
	points.push(new GLatLng(35.4576874,138.8571239));
	points.push(new GLatLng(35.4589963,138.8526822));
	points.push(new GLatLng(35.4600692,138.841138));
	points.push(new GLatLng(35.460155,138.8357735));
	points.push(new GLatLng(35.4618931,138.8346792));
	points.push(new GLatLng(35.4628372,138.8317609));
	points.push(new GLatLng(35.4562068,138.821075));
	points.push(new GLatLng(35.4561854,138.820839));
	points.push(new GLatLng(35.4565287,138.8191438));
	points.push(new GLatLng(35.4563356,138.817792));
	points.push(new GLatLng(35.45537,138.8162471));
	points.push(new GLatLng(35.4539967,138.8146377));
	points.push(new GLatLng(35.4535031,138.8122559));
	points.push(new GLatLng(35.4532457,138.8110328));
	points.push(new GLatLng(35.4542327,138.809445));
	points.push(new GLatLng(35.4559064,138.8067198));
	points.push(new GLatLng(35.4562926,138.8061619));
	points.push(new GLatLng(35.4583097,138.8042522));
	points.push(new GLatLng(35.4710555,138.7984801));
	points.push(new GLatLng(35.4697037,138.8004971));
	points.push(new GLatLng(35.4641462,138.803115));
	points.push(new GLatLng(35.4663563,138.8020635));
	points.push(new GLatLng(35.4701543,138.8000465));
	points.push(new GLatLng(35.4711843,138.7984586));
	points.push(new GLatLng(35.4755187,138.7910557));
	points.push(new GLatLng(35.4792524,138.7854982));
	points.push(new GLatLng(35.4794669,138.7851763));
	points.push(new GLatLng(35.4819989,138.78155));
	points.push(new GLatLng(35.4827285,138.7796617));
	points.push(new GLatLng(35.4895091,138.7638903));
	points.push(new GLatLng(35.4903245,138.7619162));
	points.push(new GLatLng(35.4914189,138.7579036));
	points.push(new GLatLng(35.5277252,138.7735892));
	points.push(new GLatLng(35.5319309,138.7718726));
	points.push(new GLatLng(35.5366087,138.7707568));
	points.push(new GLatLng(35.5424452,138.7734605));
	points.push(new GLatLng(35.5413294,138.7726451));
	points.push(new GLatLng(35.5398059,138.7705851));
	points.push(new GLatLng(35.5374241,138.7647916));
	points.push(new GLatLng(35.539012,138.7659717));
	points.push(new GLatLng(35.5404067,138.7701774));
	points.push(new GLatLng(35.5404496,138.7703062));
	points.push(new GLatLng(35.5414152,138.7713361));
	points.push(new GLatLng(35.576525,138.759566));
	points.push(new GLatLng(35.5892873,138.742261));
	points.push(new GLatLng(35.5892658,138.7400079));
	points.push(new GLatLng(35.5905533,138.7365747));
	points.push(new GLatLng(35.5921841,138.7342144));
	points.push(new GLatLng(35.592742,138.7332488));
	points.push(new GLatLng(35.593257,138.7311459));
	points.push(new GLatLng(35.5937934,138.7276054));
	points.push(new GLatLng(35.591948,138.7254382));
	points.push(new GLatLng(35.5944586,138.7154389));
	points.push(new GLatLng(35.6061101,138.7031866));
	points.push(new GLatLng(35.6141353,138.6954833));
	points.push(new GLatLng(35.6184483,138.6939383));
	points.push(new GLatLng(35.6201863,138.6932302));
	points.push(new GLatLng(35.6213021,138.6907197));
	points.push(new GLatLng(35.6221175,138.6894537));
	points.push(new GLatLng(35.6256366,138.6935092));
	points.push(new GLatLng(35.6271172,138.6927367));
	points.push(new GLatLng(35.6312156,138.6906768));
	points.push(new GLatLng(35.6405711,138.691063));
	points.push(new GLatLng(35.6407213,138.691063));
	points.push(new GLatLng(35.6426954,138.6908055));
	points.push(new GLatLng(35.6452274,138.6996675));
	points.push(new GLatLng(35.6477595,138.7042809));
	points.push(new GLatLng(35.6481028,138.7048388));
	points.push(new GLatLng(35.6499267,138.708036));
	points.push(new GLatLng(35.6604839,138.7105895));
	points.push(new GLatLng(35.6617928,138.7123061));
	points.push(new GLatLng(35.6637883,138.7137008));
	points.push(new GLatLng(35.6760407,138.7170053));
	points.push(new GLatLng(35.6778217,138.7182284));
	points.push(new GLatLng(35.6815767,138.7193227));
	points.push(new GLatLng(35.6853104,138.7225629));
	points.push(new GLatLng(35.7101798,138.7214256));
	points.push(new GLatLng(35.7264662,138.7141944));
	points.push(new GLatLng(35.7308865,138.7125207));
	points.push(new GLatLng(35.7443404,138.7082935));
	points.push(new GLatLng(35.7500696,138.7098599));
	points.push(new GLatLng(35.7499409,138.7140871));
	points.push(new GLatLng(35.7538462,138.716898));
	points.push(new GLatLng(35.7547689,138.7216616));
	points.push(new GLatLng(35.7550907,138.7224341));
	points.push(new GLatLng(35.7553053,138.7247515));
	points.push(new GLatLng(35.7639313,138.7333775));
	points.push(new GLatLng(35.7650471,138.7352014));
	points.push(new GLatLng(35.7667637,138.7364674));
	points.push(new GLatLng(35.7691884,138.7365533));
	points.push(new GLatLng(35.7822561,138.7392355));
	points.push(new GLatLng(35.783093,138.7392355));
	points.push(new GLatLng(35.786655,138.7370039));
	points.push(new GLatLng(35.7875133,138.7367249));
	points.push(new GLatLng(35.7900024,138.7373257));
	points.push(new GLatLng(35.7918048,138.7382913));
	points.push(new GLatLng(35.7942295,138.7396002));
	points.push(new GLatLng(35.796032,138.7409092));
	points.push(new GLatLng(35.8122754,138.752668));
	points.push(new GLatLng(35.814507,138.7551356));
	points.push(new GLatLng(35.8207941,138.7591482));
	points.push(new GLatLng(35.8230472,138.7618519));
	points.push(new GLatLng(35.8237767,138.7614656));
	points.push(new GLatLng(35.8283472,138.7656284));
	points.push(new GLatLng(35.8295059,138.7641907));
	points.push(new GLatLng(35.8314371,138.7643624));
	points.push(new GLatLng(35.8404923,138.7646413));
	points.push(new GLatLng(35.8441615,138.7640835));
	points.push(new GLatLng(35.8466077,138.7623883));
	points.push(new GLatLng(35.848496,138.7608648));
	points.push(new GLatLng(35.8538389,138.7582899));
	points.push(new GLatLng(35.8594823,138.7594701));
	points.push(new GLatLng(35.8621645,138.764577));
	points.push(new GLatLng(35.865233,138.7665725));
	points.push(new GLatLng(35.901038,138.810845));
	points.push(new GLatLng(35.906571,138.819984));
	points.push(new GLatLng(35.9116459,138.8207746));
	points.push(new GLatLng(35.9122682,138.8205386));
	points.push(new GLatLng(35.9144354,138.8209463));
	points.push(new GLatLng(35.9147144,138.8209892));
	points.push(new GLatLng(35.9147358,138.8223839));
	points.push(new GLatLng(35.9137273,138.8247443));
	points.push(new GLatLng(35.9136415,138.8272119));
	points.push(new GLatLng(35.9143067,138.8304949));
	points.push(new GLatLng(35.9146285,138.8304091));
	points.push(new GLatLng(35.9163451,138.8313533));
	points.push(new GLatLng(35.921495,138.8314176));
	points.push(new GLatLng(35.9228468,138.8297225));
	points.push(new GLatLng(35.9249497,138.8295937));
	points.push(new GLatLng(35.927598,138.829514));
	points.push(new GLatLng(35.9284258,138.8318253));
	points.push(new GLatLng(35.9340263,138.8403655));
	points.push(new GLatLng(35.9348202,138.8445068));
	points.push(new GLatLng(35.9358502,138.8475538));
	points.push(new GLatLng(35.9379101,138.8490987));
	points.push(new GLatLng(35.9390903,138.8543988));
	points.push(new GLatLng(35.9413862,138.8556433));
	points.push(new GLatLng(35.9563852,138.8630462));
	points.push(new GLatLng(35.9565783,138.8669301));
	points.push(new GLatLng(35.958252,138.8689256));
	points.push(new GLatLng(35.9615994,138.8729811));
	points.push(new GLatLng(35.960033,138.8772941));
	points.push(new GLatLng(35.9601832,138.8807703));
	points.push(new GLatLng(35.9578228,138.8823152));
	points.push(new GLatLng(35.9578228,138.884461));
	points.push(new GLatLng(35.9571791,138.8909412));
	points.push(new GLatLng(35.9571791,138.8930226));
	points.push(new GLatLng(35.9583163,138.8961769));
	points.push(new GLatLng(35.9597969,138.8995028));
	points.push(new GLatLng(35.9597325,138.9001465));
	points.push(new GLatLng(35.958252,138.9010478));
	points.push(new GLatLng(35.957737,138.9068199));
	points.push(new GLatLng(35.955677,138.9108968));
	points.push(new GLatLng(35.9553337,138.9150596));
	points.push(new GLatLng(35.950656,138.9225913));
	points.push(new GLatLng(35.9518576,138.924501));
	points.push(new GLatLng(35.9524799,138.9262391));
	points.push(new GLatLng(35.9520292,138.9329124));
	points.push(new GLatLng(35.9529948,138.9349294));
	points.push(new GLatLng(35.9472871,138.9401222));
	points.push(new GLatLng(35.9460855,138.9426327));
	points.push(new GLatLng(35.9447122,138.9427186));
	points.push(new GLatLng(35.9423518,138.9418173));
	points.push(new GLatLng(35.9410858,138.9427615));
	points.push(new GLatLng(35.9401846,138.9479542));
	points.push(new GLatLng(35.9368801,138.9441777));
	points.push(new GLatLng(35.9357,138.9448214));
	points.push(new GLatLng(35.9376955,138.9516879));
	points.push(new GLatLng(35.9411502,138.9575029));
	points.push(new GLatLng(35.936966,138.9590479));
	points.push(new GLatLng(35.9382749,138.9628888));
	points.push(new GLatLng(35.9395838,138.9647556));
	points.push(new GLatLng(35.9395838,138.965056));
	points.push(new GLatLng(35.9403777,138.9671374));
	points.push(new GLatLng(35.9419227,138.9676524));
	points.push(new GLatLng(35.9435105,138.9668155));
	points.push(new GLatLng(35.9476519,138.9691759));
	points.push(new GLatLng(35.9491754,138.9670516));
	points.push(new GLatLng(35.9504414,138.965335));
	points.push(new GLatLng(35.9506345,138.9629746));
	points.push(new GLatLng(35.9514499,138.9626527));
	points.push(new GLatLng(35.9544325,138.9644123));
	points.push(new GLatLng(35.9556341,138.9624811));
	points.push(new GLatLng(35.9560418,138.9626742));
	points.push(new GLatLng(35.955677,138.9646912));
	points.push(new GLatLng(35.9575439,138.9653993));
	points.push(new GLatLng(35.9585953,138.9673091));
	points.push(new GLatLng(35.9616423,138.9745832));
	points.push(new GLatLng(35.9622646,138.9754415));
	points.push(new GLatLng(35.9635949,138.9846039));
	points.push(new GLatLng(35.9638095,138.9861489));
	points.push(new GLatLng(35.9640026,138.9881445));
	points.push(new GLatLng(35.9635306,138.9893032));
	points.push(new GLatLng(35.9620714,138.9925004));
	points.push(new GLatLng(35.9620071,138.992672));
	points.push(new GLatLng(35.9614706,138.9950753));
	points.push(new GLatLng(35.9621144,138.9976931));
	points.push(new GLatLng(35.9608054,139.0021563));
	points.push(new GLatLng(35.960505,139.0024567));
	points.push(new GLatLng(35.959003,139.0048171));
	points.push(new GLatLng(35.9566856,139.0132929));
	points.push(new GLatLng(35.956707,139.0137864));
	points.push(new GLatLng(35.9548831,139.0185071));
	points.push(new GLatLng(35.9540677,139.0223694));
	points.push(new GLatLng(35.9540463,139.0245367));
	points.push(new GLatLng(35.9534884,139.0270472));
	points.push(new GLatLng(35.9583163,139.0316177));
	points.push(new GLatLng(35.9596467,139.0397716));
	points.push(new GLatLng(35.9628225,139.0520883));
	points.push(new GLatLng(35.9657192,139.0568305));
	points.push(new GLatLng(35.9693885,139.0619589));
	points.push(new GLatLng(35.9742809,139.067967));
	points.push(new GLatLng(35.9763837,139.0706063));
	points.push(new GLatLng(35.9846664,139.0816355));
	points.push(new GLatLng(35.9895802,139.0853906));
	points.push(new GLatLng(35.9905029,139.0857125));
	points.push(new GLatLng(35.9949446,139.0874291));
	points.push(new GLatLng(36.0071755,139.0916777));
	points.push(new GLatLng(36.0216165,139.1029859));
	points.push(new GLatLng(36.0207796,139.1088439));
	points.push(new GLatLng(36.0205865,139.1117192));
	points.push(new GLatLng(36.0054159,139.1082431));
	points.push(new GLatLng(35.9987855,139.0995527));
	points.push(new GLatLng(35.9986139,139.099145));
	points.push(new GLatLng(35.9940434,139.0947033));
	points.push(new GLatLng(35.9902024,139.0927077));
	points.push(new GLatLng(35.9896016,139.0910984));
	points.push(new GLatLng(35.9887219,139.0895749));
	points.push(new GLatLng(35.9902883,139.0929652));
	points.push(new GLatLng(35.9912539,139.0934587));
	points.push(new GLatLng(35.9879279,139.1004754));
	points.push(new GLatLng(35.9872627,139.1010976));
	points.push(new GLatLng(35.9864903,139.1022778));
	points.push(new GLatLng(35.9864044,139.102428));
	points.push(new GLatLng(35.9757829,139.1144014));
	points.push(new GLatLng(35.9731436,139.11968));
	points.push(new GLatLng(35.9765124,139.1297222));
	points.push(new GLatLng(35.9738088,139.1554714));
	points.push(new GLatLng(35.9738732,139.158454));
	points.push(new GLatLng(35.9738946,139.1595698));
	points.push(new GLatLng(35.9719849,139.1596127));
	points.push(new GLatLng(35.9692168,139.1615654));
	points.push(new GLatLng(35.9672856,139.1611362));
	points.push(new GLatLng(35.9670067,139.1610718));
	points.push(new GLatLng(35.9626508,139.1613508));
	points.push(new GLatLng(35.9615994,139.1618014));
	points.push(new GLatLng(35.949805,139.177608));
	points.push(new GLatLng(35.9475875,139.1789246));
	points.push(new GLatLng(35.9345627,139.1878939));
	points.push(new GLatLng(35.9294343,139.1955972));
	points.push(new GLatLng(35.9284473,139.1960908));
	points.push(new GLatLng(35.9276962,139.199288));
	points.push(new GLatLng(35.9291983,139.1987301));
	points.push(new GLatLng(35.9224177,139.2009187));
	points.push(new GLatLng(35.9215379,139.2027856));
	points.push(new GLatLng(35.9213877,139.2031289));
	points.push(new GLatLng(35.9198857,139.2043734));
	points.push(new GLatLng(35.9195638,139.2127634));
	points.push(new GLatLng(35.9129334,139.2227626));
	points.push(new GLatLng(35.9112382,139.222076));
	points.push(new GLatLng(35.9107876,139.2226554));
	points.push(new GLatLng(35.9071398,139.2360235));
	points.push(new GLatLng(35.9059167,139.2379761));
	points.push(new GLatLng(35.9061313,139.2396498));
	points.push(new GLatLng(35.9075904,139.238534));
	points.push(new GLatLng(35.9080625,139.2389846));
	points.push(new GLatLng(35.9088135,139.2412806));
	points.push(new GLatLng(35.9046936,139.2478896));
	points.push(new GLatLng(35.8982134,139.2473531));
	points.push(new GLatLng(35.8978272,139.2501641));
	points.push(new GLatLng(35.8978486,139.2508078));
	points.push(new GLatLng(35.8984709,139.2549921));
	points.push(new GLatLng(35.8961964,139.2566872));
	points.push(new GLatLng(35.8952308,139.258597));
	points.push(new GLatLng(35.8913255,139.2636824));
	points.push(new GLatLng(35.8931494,139.2669869));
	points.push(new GLatLng(35.8931923,139.2671586));
	points.push(new GLatLng(35.8908963,139.2703772));
	points.push(new GLatLng(35.8882141,139.2706991));
	points.push(new GLatLng(35.8872271,139.2732096));
	points.push(new GLatLng(35.8888793,139.2766214));
	points.push(new GLatLng(35.8888149,139.2785097));
	points.push(new GLatLng(35.886755,139.280119));
	points.push(new GLatLng(35.8853817,139.2814065));
	points.push(new GLatLng(35.8849526,139.2818571));
	points.push(new GLatLng(35.8819485,139.290011));
	points.push(new GLatLng(35.8806396,139.2912985));
	points.push(new GLatLng(35.8798671,139.2937446));
	points.push(new GLatLng(35.8802962,139.2952896));
	points.push(new GLatLng(35.8808327,139.296105));
	points.push(new GLatLng(35.8835793,139.3035293));
	points.push(new GLatLng(35.8789444,139.3070698));
	points.push(new GLatLng(35.8719707,139.3086792));
	points.push(new GLatLng(35.8681297,139.3114258));
	points.push(new GLatLng(35.8661342,139.3123055));
	wpt_points.push(new GLatLng(35.7916833333333,139.04665));
	wpt_points.push(new GLatLng(35.7247333333333,138.953216666667));
	wpt_points.push(new GLatLng(35.7080333333333,138.942316666667));
	wpt_points.push(new GLatLng(35.6115166666667,138.943216666667));
	wpt_points.push(new GLatLng(35.5724666666667,138.925083333333));
	wpt_points.push(new GLatLng(35.4977666666667,138.8088));
	wpt_points.push(new GLatLng(35.4906666666667,138.80755));
	wpt_points.push(new GLatLng(35.49405,138.789633333333));
	wpt_points.push(new GLatLng(35.4583,138.858733333333));
	wpt_points.push(new GLatLng(35.4761333333333,138.79275));
	wpt_points.push(new GLatLng(35.4589833333333,138.80215));
	wpt_points.push(new GLatLng(35.9896333333333,139.085883333333));
	wpt_points.push(new GLatLng(35.97695,139.1358));


	// 表示の中心位置・サイズを算出します。
	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,139.04665,35.7916833333333,"<b><a href=\"javascript:goPhotopage(relativepathtosubfolder+'sub.htm', '#photoID1')\">2008_0628_065440aa</a></b><br /><a href=\""+relativepathtosubfolder+"2008_0628_065440aa.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"2008_0628_065440aa-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:06:28 06:54:40<br />E139°2′47.94″<br />N35°47′30.06″<br />537m<br />東京都西多摩郡奥多摩町<hr /></small>");
	addWayPoints(map, 1,138.953216666667,35.7247333333333,"<b><a href=\"javascript:goPhotopage(relativepathtosubfolder+'sub.htm', '#photoID2')\">2008_0628_081228aa</a></b><br /><a href=\""+relativepathtosubfolder+"2008_0628_081228aa.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"2008_0628_081228aa-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:06:28 08:12:28<br />E138°57′11.58″<br />N35°43′29.04″<br />1248m<br />山梨県北都留郡小菅村<hr /></small>");
	addWayPoints(map, 1,138.942316666667,35.7080333333333,"<b><a href=\"javascript:goPhotopage(relativepathtosubfolder+'sub.htm', '#photoID3')\">2008_0628_082740aa</a></b><br /><a href=\""+relativepathtosubfolder+"2008_0628_082740aa.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"2008_0628_082740aa-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:06:28 08:27:40<br />E138°56′32.34″<br />N35°42′28.92″<br />644m<br />山梨県大月市大月町真木<hr /></small>");
	addWayPoints(map, 1,138.943216666667,35.6115166666667,"<b><a href=\"javascript:goPhotopage(relativepathtosubfolder+'sub.htm', '#photoID4')\">2008_0628_091339aa</a></b><br /><a href=\""+relativepathtosubfolder+"2008_0628_091339aa.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"2008_0628_091339aa-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:06:28 09:13:39<br />E138°56′35.58″<br />N35°36′41.46″<br />350m<br />山梨県大月市大月一丁目<hr /></small>");
	addWayPoints(map, 1,138.925083333333,35.5724666666667,"<b><a href=\"javascript:goPhotopage(relativepathtosubfolder+'sub.htm', '#photoID5')\">2008_0628_103337aa</a></b><br /><a href=\""+relativepathtosubfolder+"2008_0628_103337aa.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"2008_0628_103337aa-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:06:28 10:33:37<br />E138°55′30.30″<br />N35°34′20.88″<br />447m<br />山梨県都留市古川渡<hr /></small>");
	addWayPoints(map, 1,138.8088,35.4977666666667,"<b><a href=\"javascript:goPhotopage(relativepathtosubfolder+'sub.htm', '#photoID6')\">2008_0628_113011aa</a></b><br /><a href=\""+relativepathtosubfolder+"2008_0628_113011aa.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"2008_0628_113011aa-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:06:28 11:30:11<br />E138°48′31.68″<br />N35°29′51.96″<br />707m<br />山梨県富士吉田市下吉田<hr /></small>");
	addWayPoints(map, 1,138.80755,35.4906666666667,"<b><a href=\"javascript:goPhotopage(relativepathtosubfolder+'sub.htm', '#photoID7')\">2008_0628_120208aa</a></b><br /><a href=\""+relativepathtosubfolder+"2008_0628_120208aa.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"2008_0628_120208aa-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:06:28 12:02:08<br />E138°48′27.18″<br />N35°29′26.40″<br />765m<br />山梨県富士吉田市下吉田<hr /></small>");
	addWayPoints(map, 1,138.789633333333,35.49405,"<b><a href=\"javascript:goPhotopage(relativepathtosubfolder+'sub.htm', '#photoID8')\">2008_0628_123925aa</a></b><br /><a href=\""+relativepathtosubfolder+"2008_0628_123925aa.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"2008_0628_123925aa-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:06:28 12:39:25<br />E138°47′22.68″<br />N35°29′38.58″<br />812m<br />山梨県富士吉田市竜ヶ丘二丁目<hr /></small>");
	addWayPoints(map, 1,138.858733333333,35.4583,"<b><a href=\"javascript:goPhotopage(relativepathtosubfolder+'sub.htm', '#photoID9')\">2008_0628_132812aa</a></b><br /><a href=\""+relativepathtosubfolder+"2008_0628_132812aa.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"2008_0628_132812aa-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:06:28 13:28:12<br />E138°51′31.44″<br />N35°27′29.88″<br />947m<br />山梨県南都留郡忍野村内野<hr /></small>");
	addWayPoints(map, 1,138.79275,35.4761333333333,"<b><a href=\"javascript:goPhotopage(relativepathtosubfolder+'sub.htm', '#photoID10')\">2008_0628_144543aa</a></b><br /><a href=\""+relativepathtosubfolder+"2008_0628_144543aa.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"2008_0628_144543aa-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:06:28 14:45:43<br />E138°47′33.90″<br />N35°28′34.08″<br />851m<br />山梨県富士吉田市上吉田七丁目<hr /></small>");
	addWayPoints(map, 1,138.80215,35.4589833333333,"<b><a href=\"javascript:goPhotopage(relativepathtosubfolder+'sub.htm', '#photoID11')\">2008_0628_153756aa</a></b><br /><a href=\""+relativepathtosubfolder+"2008_0628_153756aa.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"2008_0628_153756aa-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:06:28 15:37:56<br />E138°48′7.74″<br />N35°27′32.34″<br />898m<br />山梨県富士吉田市新屋<hr /></small>");
	addWayPoints(map, 1,139.085883333333,35.9896333333333,"<b><a href=\"javascript:goPhotopage(relativepathtosubfolder+'sub.htm', '#photoID12')\">2008_0628_201021aa</a></b><br /><a href=\""+relativepathtosubfolder+"2008_0628_201021aa.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"2008_0628_201021aa-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:06:28 20:10:21<br />E139°5′9.18″<br />N35°59′22.68″<br />225m<br />埼玉県秩父市野坂町二丁目<hr /></small>");
	addWayPoints(map, 1,139.1358,35.97695,"<b><a href=\"javascript:goPhotopage(relativepathtosubfolder+'sub.htm', '#photoID13')\">2008_0628_215756aa</a></b><br /><a href=\""+relativepathtosubfolder+"2008_0628_215756aa.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"2008_0628_215756aa-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:06:28 21:57:56<br />E139°8′8.88″<br />N35°58′37.02″<br />314m<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()
{
}

// 指定したレイヤーを非表示にする
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;
}

