<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function SetStyle(cssPath) {
	var plats = getOSType();
	var bName = getBrowserName();
	var bVers = getBrowserVersion();
	var bPath ="";

	if(plats == "Windows"){
		switch (bName) {
			case "Explorer":
				bPath = "wie";
				break;
			case "Netscape":
				if (bVers < 5) {
					bPath = "wnc4";
				}
				else{
					bPath = "wnc6o";
				}
				break;
			case "Opera":
				bPath = "wopera";
				break;
			case "Firefox":
				bPath = "wie";
				break;
		}
	}
	else if(plats == "MacOS"){
		switch (bName) {
			case "Explorer":
				bPath = "mie";
				break;
			case "Netscape":
				if (bVers < 5) {
					bPath = "mnc4";
				}
				else{
					bPath = "mnc6o";
				}
				break;
			case "Opera":
				bPath = "mopera";
				break;
			case "Safari":
				bPath = "msafari";
				break;
			case "Firefox":
				bPath = "mie";
				break;
		}
	}
	else	bPath = "gbot";


	//for DEBUG
//	alert(cssPath+bPath);

	if(bPath != ""){
		document.write('<link rel="stylesheet" type="text/css" href="'+cssPath+bPath+'.css">');
	}
}

function getOSType()
{
    var uAgent  = navigator.userAgent.toUpperCase();
    if (uAgent.indexOf("MAC") >= 0) return "MacOS";
    if (uAgent.indexOf("WIN") >= 0) return "Windows";
    if (uAgent.indexOf("X11") >= 0) return "UNIX";
    return "";
}
//　Firefox ->  Firefox
//　Netscape Navigator ->  Netscape
//　Internet Explorer  ->　Explorer
//　Safari  ->　Safari
//　Opera  ->　Opera
function getBrowserName()
{
    var aName  = navigator.appName.toUpperCase();
    var uName = navigator.userAgent.toUpperCase();
    if (uName.indexOf("SAFARI") >= 0)  return "Safari";
    if (uName.indexOf("OPERA") >= 0)  return "Opera";
    if (uName.indexOf("FIREFOX") >= 0)  return "Firefox";
    if (aName.indexOf("NETSCAPE") >= 0)  return "Netscape";
    if (aName.indexOf("MICROSOFT") >= 0) return "Explorer";
    return "";
}
function getBrowserVersion()
{
	var browser = getBrowserName();
	var version = 0;
	var s = 0;
	var e = 0;
	var appVer  = navigator.appVersion;
	var uName  = navigator.userAgent.toUpperCase();
	if (browser == "Safari")
	{
		s = uName.indexOf("SAFARI/",0);
		version = (uName.substring(s+7,s+99));
		if (version < 400) version = 1;
		if (version >= 400) version = 2;
	}
	if (browser == "Opera")
	{
		s = uName.indexOf("OPERA",0) + 6;
		e = uName.indexOf(" ",s);
		version = parseFloat(uName.substring(s,e));
	}
	if (browser == "Firefox")
	{
		s = uName.indexOf("FIREFOX/",0);
		version = parseFloat(uName.substring(s+8,s+8+3));
	}
	if (browser == "Netscape")
	{
		s = appVer.indexOf(" ",0);
		version = eval(appVer.substring(0,s));
		if (version >= 5) version++;
	}
	if (browser == "Explorer")
	{
		appVer  = navigator.userAgent;
		s = appVer.indexOf("MSIE ",0) + 5;
		e = appVer.indexOf(";",s);
		version = eval(appVer.substring(s,e));
	}
	return version;
}


var line1 = [
	[35.67124282979414,		139.77266907691955],
	[35.6714432941437,		139.7722291946411],
	[35.67229308307818,		139.77262616157532],
	[35.67253712335639,		139.77204948663711],
	[35.672613385790314,	139.77207362651825]
];

var line2 = [
	[35.67492083469089,		139.77174639701843],
	[35.673787818071084,	139.77104902267456],
	[35.67316900989522,		139.77051258087158],
	[35.672602491161356,	139.7719046473503],
	[35.672613385790314,	139.77207362651825]
];


var shoppoint = [
	[139.77209776639938,	35.672702721691664,	'<div style="width: 250px; height: 100px;">Vin de Table Pont du Gard<br>テーブルワイン ポンデュガール<br><br>東京都中央区銀座1-27-7<br>銀座里村ビル1F</div>'],
	[139.77266907691955,	35.67124282979414,	'<div style="width: 150px; height: 50px;">東京メトロ有楽町線<br>新富町駅<br>２番出口</div>'],
	[139.77174639701843,	35.67492083469089,	'<div style="width: 150px; height: 50px;">都営浅草線<br>宝町駅<br>Ａ１番出口</div>']
];

	function gMap() {
		var map = new GMap2(document.getElementById("map"));
		map.setCenter(new GLatLng(35.67324745063377,139.7722613811493),17);
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		map.addControl(new GOverviewMapControl());
		map.addControl(new GScaleControl());
		map.setMapType(G_NORMAL_MAP);

		// Marker Create
		for(i=0; i<shoppoint.length; i++)
		{
			var point = new GPoint(shoppoint[i][0],shoppoint[i][1]);
			var pophtml = shoppoint[i][2];
	
			var marker = setMarker(point, pophtml);
	
			map.addOverlay(marker);
		}
	
		// Line Create
		var points = [];
		for (var i=0; i<line1.length; i++) {
			points[i] = new GLatLng(line1[i][0],line1[i][1]);
		}
		var polyline = new GPolyline(points, "#FF0099", 5, 1);
		
		map.addOverlay(polyline);
		
		// Line Create
		var points = [];
		for (var i=0; i<line2.length; i++) {
			points[i] = new GLatLng(line2[i][0],line2[i][1]);
		}
		var polyline = new GPolyline(points, "#9900FF", 5, 1);
		
		map.addOverlay(polyline);
	}

	// Marker Create
	function setMarker(point,pophtml) {
			var marker = new GMarker(point);
			GEvent.addListener(marker, "click", function() {
			marker.openInfoWindowHtml(pophtml);
			});
			return marker;
	}

//-->
