﻿var longitude = "";
var latitude = "";
var info = "";

function showMap(map) {

icon = new GIcon();

if (map == "osaka") {
  // 経度（位置）
  longitude = 34.691858;
  // 緯度（位置）
  latitude = 135.531068;
  // 経度（地図中央）
  centerLongitude = 34.694358;
  // 緯度（地図中央）
  centerLatitude = 135.531068;
  icon.image = "./_img/common/map1.png";
  icon.shadow = "./_img/common/map_shadow.png";
  icon.iconSize = new GSize(58, 52);
  icon.shadowSize = new GSize(82,55);
  icon.iconAnchor = new GPoint(29, 52);
  var map = new GMap2(document.getElementById("map1"));


} else if (map == "kobe"){
  // 経度（位置）
  longitude = 34.689827;
  // 緯度（位置）
  latitude = 135.193864;
  // 経度（地図中央）
  centerLongitude = 34.691827;
  // 緯度（地図中央）
  centerLatitude = 135.193864;
  icon.image = "./_img/common/map2.png";
  icon.shadow = "./_img/common/map_shadow.png";
  icon.iconSize = new GSize(58, 52);
  icon.shadowSize = new GSize(82,55);
  icon.iconAnchor = new GPoint(29, 52);
  var map = new GMap2(document.getElementById("map2"));
  
  
} else if (map == "kyoto"){
  // 経度（位置）
  longitude = 34.988208;
  // 緯度（位置）
  latitude = 135.760094;
  // 経度（地図中央）
  centerLongitude = 34.988008;
  // 緯度（地図中央）
  centerLatitude = 135.760094;
  icon.image = "./_img/common/map3.png";
  icon.shadow = "./_img/common/map_shadow.png";
  icon.iconSize = new GSize(58, 52);
  icon.shadowSize = new GSize(82,55);
  icon.iconAnchor = new GPoint(29, 52);
  var map = new GMap2(document.getElementById("map3"));
  
  
} else if (map == "tokyo") {
  // 経度（位置）
  longitude = 35.701025;
  // 緯度（位置）
  latitude = 139.771038;
  // 経度（地図中央）
  centerLongitude = 35.700825;
  // 緯度（地図中央）
  centerLatitude = 139.771038;
  icon.image = "./_img/common/map4.png";
  icon.shadow = "./_img/common/map_shadow.png";
  icon.iconSize = new GSize(58, 52);
  icon.shadowSize = new GSize(82,55);
  icon.iconAnchor = new GPoint(29, 52);
  var map = new GMap2(document.getElementById("map4"));
  
  
} else if (map == "kikaku_osaka") {
  // 経度（位置）
  longitude = 34.697017;
  // 緯度（位置）
  latitude = 135.514748;
  // 経度（地図中央）
  centerLongitude = 34.697017;
  // 緯度（地図中央）
  centerLatitude = 135.512748;
  icon.image = "./_img/corporate/map5.png";
  icon.shadow = "./_img/corporate/map_shadow2.png";
  icon.iconSize = new GSize(88, 62);
  icon.shadowSize = new GSize(118,65);
  icon.iconAnchor = new GPoint(44, 52);
  var map = new GMap2(document.getElementById("map5"));
  
  
} else if (map == "kikaku_tokyo") {
  // 経度（位置）
  longitude = 35.701025;
  // 緯度（位置）
  latitude = 139.771038;
  // 経度（地図中央）
  centerLongitude = 35.701025;
  // 緯度（地図中央）
  centerLatitude = 139.771038;
  icon.image = "./_img/corporate/map6.png";
  icon.shadow = "./_img/corporate/map_shadow2.png";
  icon.iconSize = new GSize(88, 62);
  icon.shadowSize = new GSize(118,65);
  icon.iconAnchor = new GPoint(44, 52);
  var map = new GMap2(document.getElementById("map6"));
  
  
} else if (map == "hanbai_osaka") {
  // 経度（位置）
  longitude = 34.697017;
  // 緯度（位置）
  latitude = 135.514748;
  // 経度（地図中央）
  centerLongitude = 34.697017;
  // 緯度（地図中央）
  centerLatitude = 135.512748;
  icon.image = "./_img/corporate/map7.png";
  icon.shadow = "./_img/corporate/map_shadow2.png";
  icon.iconSize = new GSize(88, 62);
  icon.shadowSize = new GSize(118,65);
  icon.iconAnchor = new GPoint(44, 52);
  var map = new GMap2(document.getElementById("map7"));
  
  
} else if (map == "hanbai_tokyo") {
  // 経度（位置）
  longitude = 35.701025;
  // 緯度（位置）
  latitude = 139.771038;
  // 経度（地図中央）
  centerLongitude = 35.701025;
  // 緯度（地図中央）
  centerLatitude = 139.771038;
  icon.image = "./_img/corporate/map8.png";
  icon.shadow = "./_img/corporate/map_shadow2.png";
  icon.iconSize = new GSize(88, 62);
  icon.shadowSize = new GSize(118,65);
  icon.iconAnchor = new GPoint(44, 52);
  var map = new GMap2(document.getElementById("map8"));
  
  
} else if (map == "cp") {
  // 経度（位置）
  longitude = 34.697017;
  // 緯度（位置）
  latitude = 135.514748;
  // 経度（地図中央）
  centerLongitude = 34.697017;
  // 緯度（地図中央）
  centerLatitude = 135.512748;
  icon.image = "./_img/corporate/map9.png";
  icon.shadow = "./_img/corporate/map_shadow2.png";
  icon.iconSize = new GSize(88, 62);
  icon.shadowSize = new GSize(118,65);
  icon.iconAnchor = new GPoint(44, 52);
  var map = new GMap2(document.getElementById("map9"));
  
  
} else {
  return;
}

if (GBrowserIsCompatible()) {
	  // 中央・尺度
	  map.setCenter(new GLatLng(centerLongitude, centerLatitude), 16);
	  // ポインタ
	  var point = new GLatLng(longitude, latitude);
	  //アイコン  
	  icon.infoWindowAnchor = new GPoint(5, 1);
	  var marker = new GMarker(point, icon);
	  map.addOverlay(marker);
	  // 拡大・移動コントローラ
	  map.addControl(new GLargeMapControl());
}
this.focus();
}
