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

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

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

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

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

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

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

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

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

	// トラックデータ列です。
		points.push(new GLatLng(43.16473,141.343));
	points.push(new GLatLng(43.16483,141.3428));
	points.push(new GLatLng(43.16485,141.3427));
	points.push(new GLatLng(43.16499,141.3424));
	points.push(new GLatLng(43.16493,141.3425));
	points.push(new GLatLng(43.16465,141.3424));
	points.push(new GLatLng(43.16425,141.3428));
	points.push(new GLatLng(43.16387,141.3428));
	points.push(new GLatLng(43.16319,141.3438));
	points.push(new GLatLng(43.16248,141.3449));
	points.push(new GLatLng(43.16206,141.3455));
	points.push(new GLatLng(43.16161,141.3462));
	points.push(new GLatLng(43.16085,141.3469));
	points.push(new GLatLng(43.16007,141.3472));
	points.push(new GLatLng(43.15941,141.3477));
	points.push(new GLatLng(43.15891,141.348));
	points.push(new GLatLng(43.15826,141.3487));
	points.push(new GLatLng(43.15796,141.3495));
	points.push(new GLatLng(43.15808,141.3498));
	points.push(new GLatLng(43.15829,141.3507));
	points.push(new GLatLng(43.15825,141.3518));
	points.push(new GLatLng(43.15779,141.3524));
	points.push(new GLatLng(43.15703,141.3523));
	points.push(new GLatLng(43.15622,141.3521));
	points.push(new GLatLng(43.15546,141.3518));
	points.push(new GLatLng(43.15503,141.3515));
	points.push(new GLatLng(43.15445,141.3515));
	points.push(new GLatLng(43.15369,141.3513));
	points.push(new GLatLng(43.15303,141.351));
	points.push(new GLatLng(43.15213,141.3507));
	points.push(new GLatLng(43.15143,141.3506));
	points.push(new GLatLng(43.15073,141.3504));
	points.push(new GLatLng(43.15029,141.3506));
	points.push(new GLatLng(43.1498,141.3507));
	points.push(new GLatLng(43.14906,141.3503));
	points.push(new GLatLng(43.14822,141.3501));
	points.push(new GLatLng(43.14745,141.3499));
	points.push(new GLatLng(43.14667,141.3497));
	points.push(new GLatLng(43.14609,141.3495));
	points.push(new GLatLng(43.14566,141.3496));
	points.push(new GLatLng(43.14541,141.3495));
	points.push(new GLatLng(43.14507,141.3494));
	points.push(new GLatLng(43.14437,141.3492));
	points.push(new GLatLng(43.14353,141.3488));
	points.push(new GLatLng(43.14265,141.3486));
	points.push(new GLatLng(43.14184,141.3484));
	points.push(new GLatLng(43.1411,141.3483));
	points.push(new GLatLng(43.14036,141.3482));
	points.push(new GLatLng(43.14006,141.3483));
	points.push(new GLatLng(43.14,141.3481));
	points.push(new GLatLng(43.13998,141.3481));
	points.push(new GLatLng(43.13995,141.3482));
	points.push(new GLatLng(43.13945,141.348));
	points.push(new GLatLng(43.13859,141.3477));
	points.push(new GLatLng(43.13763,141.3476));
	points.push(new GLatLng(43.13681,141.3475));
	points.push(new GLatLng(43.13611,141.3472));
	points.push(new GLatLng(43.13529,141.347));
	points.push(new GLatLng(43.1347,141.3468));
	points.push(new GLatLng(43.13428,141.3468));
	points.push(new GLatLng(43.13368,141.3466));
	points.push(new GLatLng(43.13297,141.3464));
	points.push(new GLatLng(43.13229,141.3462));
	points.push(new GLatLng(43.1319,141.3458));
	points.push(new GLatLng(43.13204,141.3451));
	points.push(new GLatLng(43.13206,141.3444));
	points.push(new GLatLng(43.1321,141.3441));
	points.push(new GLatLng(43.13205,141.3442));
	points.push(new GLatLng(43.13218,141.3432));
	points.push(new GLatLng(43.13225,141.3426));
	points.push(new GLatLng(43.13219,141.3418));
	points.push(new GLatLng(43.13237,141.3412));
	points.push(new GLatLng(43.13258,141.3398));
	points.push(new GLatLng(43.13269,141.339));
	points.push(new GLatLng(43.13282,141.3385));
	points.push(new GLatLng(43.13298,141.3372));
	points.push(new GLatLng(43.13323,141.3367));
	points.push(new GLatLng(43.13309,141.3355));
	points.push(new GLatLng(43.1333,141.3346));
	points.push(new GLatLng(43.13341,141.3338));
	points.push(new GLatLng(43.13351,141.3325));
	points.push(new GLatLng(43.1336,141.3316));
	points.push(new GLatLng(43.13382,141.3306));
	points.push(new GLatLng(43.13391,141.3301));
	points.push(new GLatLng(43.13386,141.3286));
	points.push(new GLatLng(43.13406,141.3277));
	points.push(new GLatLng(43.13415,141.3271));
	points.push(new GLatLng(43.13418,141.3261));
	points.push(new GLatLng(43.13439,141.3249));
	points.push(new GLatLng(43.13467,141.3234));
	points.push(new GLatLng(43.13473,141.3232));
	points.push(new GLatLng(43.13471,141.3231));
	points.push(new GLatLng(43.13476,141.3219));
	points.push(new GLatLng(43.13498,141.3204));
	points.push(new GLatLng(43.13505,141.3198));
	points.push(new GLatLng(43.13562,141.3163));
	points.push(new GLatLng(43.13565,141.3155));
	points.push(new GLatLng(43.13577,141.3145));
	points.push(new GLatLng(43.13554,141.314));
	points.push(new GLatLng(43.13465,141.3138));
	points.push(new GLatLng(43.13382,141.3137));
	points.push(new GLatLng(43.13376,141.3136));
	points.push(new GLatLng(43.1334,141.3141));
	points.push(new GLatLng(43.13286,141.315));
	points.push(new GLatLng(43.13271,141.3161));
	points.push(new GLatLng(43.13242,141.3168));
	points.push(new GLatLng(43.13191,141.3169));
	points.push(new GLatLng(43.13186,141.3172));
	points.push(new GLatLng(43.13187,141.3172));
	points.push(new GLatLng(43.13177,141.3179));
	points.push(new GLatLng(43.13163,141.3189));
	points.push(new GLatLng(43.13168,141.3201));
	points.push(new GLatLng(43.13161,141.3209));
	points.push(new GLatLng(43.13195,141.3212));
	points.push(new GLatLng(43.13185,141.3214));
	points.push(new GLatLng(43.132,141.3216));
	points.push(new GLatLng(43.13192,141.3222));
	points.push(new GLatLng(43.13177,141.3234));
	points.push(new GLatLng(43.13161,141.3246));
	points.push(new GLatLng(43.13149,141.3258));
	points.push(new GLatLng(43.13136,141.3268));
	points.push(new GLatLng(43.13125,141.3279));
	points.push(new GLatLng(43.13113,141.3287));
	points.push(new GLatLng(43.13107,141.3293));
	points.push(new GLatLng(43.13101,141.3296));
	points.push(new GLatLng(43.13084,141.3308));
	points.push(new GLatLng(43.1307,141.3321));
	points.push(new GLatLng(43.13053,141.3335));
	points.push(new GLatLng(43.13041,141.3347));
	points.push(new GLatLng(43.13028,141.3358));
	points.push(new GLatLng(43.13013,141.3367));
	points.push(new GLatLng(43.13006,141.3373));
	points.push(new GLatLng(43.13006,141.3373));
	points.push(new GLatLng(43.12993,141.3379));
	points.push(new GLatLng(43.12982,141.339));
	points.push(new GLatLng(43.12968,141.3403));
	points.push(new GLatLng(43.1295,141.3416));
	points.push(new GLatLng(43.12934,141.3428));
	points.push(new GLatLng(43.12923,141.3438));
	points.push(new GLatLng(43.12917,141.3448));
	points.push(new GLatLng(43.12923,141.3453));
	points.push(new GLatLng(43.12993,141.3455));
	points.push(new GLatLng(43.13087,141.3457));
	points.push(new GLatLng(43.13183,141.3459));
	points.push(new GLatLng(43.13284,141.3462));
	points.push(new GLatLng(43.13376,141.3464));
	points.push(new GLatLng(43.13431,141.3465));
	points.push(new GLatLng(43.13446,141.3466));
	points.push(new GLatLng(43.13444,141.3466));
	points.push(new GLatLng(43.13449,141.3466));
	points.push(new GLatLng(43.13456,141.3466));
	points.push(new GLatLng(43.13485,141.3467));
	points.push(new GLatLng(43.13601,141.347));
	points.push(new GLatLng(43.13748,141.3473));
	points.push(new GLatLng(43.13864,141.3475));
	points.push(new GLatLng(43.13966,141.3477));
	points.push(new GLatLng(43.14016,141.3478));
	points.push(new GLatLng(43.14025,141.3479));
	points.push(new GLatLng(43.14087,141.348));
	points.push(new GLatLng(43.14203,141.3483));
	points.push(new GLatLng(43.14316,141.3486));
	points.push(new GLatLng(43.14407,141.3488));
	points.push(new GLatLng(43.14503,141.349));
	points.push(new GLatLng(43.14527,141.3491));
	points.push(new GLatLng(43.14577,141.3492));
	points.push(new GLatLng(43.14646,141.3494));
	points.push(new GLatLng(43.14761,141.3496));
	points.push(new GLatLng(43.14867,141.3499));
	points.push(new GLatLng(43.14964,141.3501));
	points.push(new GLatLng(43.15034,141.3502));
	points.push(new GLatLng(43.151,141.3503));
	points.push(new GLatLng(43.15174,141.3504));
	points.push(new GLatLng(43.15267,141.3507));
	points.push(new GLatLng(43.15361,141.351));
	points.push(new GLatLng(43.15457,141.3513));
	points.push(new GLatLng(43.15517,141.3513));
	points.push(new GLatLng(43.15586,141.3515));
	points.push(new GLatLng(43.15654,141.3517));
	points.push(new GLatLng(43.15734,141.3519));
	points.push(new GLatLng(43.1581,141.352));
	points.push(new GLatLng(43.1583,141.3512));
	points.push(new GLatLng(43.15823,141.3501));
	points.push(new GLatLng(43.15799,141.3493));
	points.push(new GLatLng(43.15802,141.3491));
	points.push(new GLatLng(43.15839,141.3482));
	points.push(new GLatLng(43.15909,141.3475));
	points.push(new GLatLng(43.1599,141.3469));
	points.push(new GLatLng(43.16097,141.3464));
	points.push(new GLatLng(43.16182,141.3455));
	points.push(new GLatLng(43.16208,141.3452));
	points.push(new GLatLng(43.16252,141.3446));
	points.push(new GLatLng(43.16318,141.3436));
	points.push(new GLatLng(43.16384,141.3427));
	points.push(new GLatLng(43.16446,141.3425));
	points.push(new GLatLng(43.16506,141.3426));
	points.push(new GLatLng(43.1656,141.343));
	points.push(new GLatLng(43.16537,141.3428));
	points.push(new GLatLng(43.16497,141.3425));
	points.push(new GLatLng(43.16491,141.3425));
	points.push(new GLatLng(43.16493,141.3425));
	points.push(new GLatLng(43.16494,141.3425));
	points.push(new GLatLng(43.16495,141.3425));
	points.push(new GLatLng(43.16491,141.3424));
	points.push(new GLatLng(43.16476,141.3424));
	points.push(new GLatLng(43.16525,141.3428));
	points.push(new GLatLng(43.16492,141.3425));
	points.push(new GLatLng(43.16494,141.3425));
	points.push(new GLatLng(43.16502,141.3425));
	points.push(new GLatLng(43.16498,141.3426));
	wpt_points.push(new GLatLng(43.140024,141.34818));
	wpt_points.push(new GLatLng(43.1320573333333,141.344493333333));
	wpt_points.push(new GLatLng(43.1346513333333,141.3235));
	wpt_points.push(new GLatLng(43.131944,141.316893333333));


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

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

		// 線を描画します。
		map.addOverlay(polyline);
	}
		
	// 初期マップタイプ設定
	switch(defaultmaptype)
	{
		case 0:
		map.setMapType(G_NORMAL_MAP);   	//This is the normal street map type.
		break;
		
		case 1:
		map.setMapType(G_SATELLITE_MAP); //This map type shows Google Earth satellite images.
		break;
	
		case 2:
		map.setMapType(G_HYBRID_MAP); 	//This map type shows transparent street maps over Google Earth satellite images.
		break;
		
		case 3:
		map.setMapType(G_PHYSICAL_MAP); 
		break;		
	
		default:
		map.setMapType(G_NORMAL_MAP);
		break;
	}
	addWayPoints(map, 1,141.34818,43.140024,"<b><a href=\""+relativepathtomainhtml+"#photoID1\">創成川築堤</a></b><br /><a href=\""+relativepathtosubfolder+"IMGP2228.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMGP2228-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:05:14 06:39:45<br />E141°20′53.45″<br />N43°8′24.09″<br />48.6m<br />北海道札幌市北区屯田九条一丁目<hr />創成川にはこんな立派な歩行者自転車動がありました。</small>");
	addWayPoints(map, 1,141.344493333333,43.1320573333333,"<b><a href=\""+relativepathtomainhtml+"#photoID2\">屯田みずほ通（自転車専用道）</a></b><br /><a href=\""+relativepathtosubfolder+"IMGP2229.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMGP2229-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:05:14 06:43:49<br />E141°20′40.18″<br />N43°7′55.41″<br />34.3m<br />北海道札幌市北区屯田五条一丁目<hr />創成川と屯田西公園の近くまでいく、是転写専用道がありました。しかし、古そうな道でした。</small>");
	addWayPoints(map, 1,141.3235,43.1346513333333,"<b><a href=\""+relativepathtomainhtml+"#photoID3\">屯田みずほ東公園</a></b><br /><a href=\""+relativepathtosubfolder+"IMGP2230.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMGP2230-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:05:14 06:50:29<br />E141°19′24.60″<br />N43°8′4.74″<br />27.2m<br />北海道札幌市北区屯田六条八丁目<hr />こんなすてきな場所発見</small>");
	addWayPoints(map, 1,141.316893333333,43.131944,"<b><a href=\""+relativepathtomainhtml+"#photoID4\">屯田西公園</a></b><br /><a href=\""+relativepathtosubfolder+"IMGP2231.jpg\"  target=\"_blank\"><img src=\""+relativepathtosubfolder+"IMGP2231-thumb.jpg\" border=\"0\" width=\"128\" height=\"96\" /></a><br /><small>2008:05:14 06:55:50<br />E141°19′0.82″<br />N43°7′55.00″<br />-9.1m<br />北海道札幌市北区屯田五条十一丁目<hr />大きくてきれいな公園です。</small>");


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


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

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

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

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

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

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

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

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

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

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

