function MenuEffect(id) {
  if (id == 'hotel') {
    var childs = document.getElementById('navi3').childNodes;
    childs[0].style.backgroundPosition = '-240px -40px';
  }
  if (id == '324') {
    var childs = document.getElementById('navi1').childNodes;
    childs[0].style.backgroundPosition = '0 -40px';
  }
  if (id == '325') {
    var childs = document.getElementById('navi2').childNodes;
    childs[0].style.backgroundPosition = '-120px -40px';
  }
  if (id == '2630') {
    var childs = document.getElementById('navi4').childNodes;
    childs[0].style.backgroundPosition = '-360px -40px';
  }
  if (id == '2631') {
    var childs = document.getElementById('navi5').childNodes;
    childs[0].style.backgroundPosition = '-480px -40px';
  }
  if (id == '2632' || id == '326') {
    var childs = document.getElementById('navi6').childNodes;
    childs[0].style.backgroundPosition = '-600px -40px';
  }
  if (id == '2633') {
    var childs = document.getElementById('navi7').childNodes;
    childs[0].style.backgroundPosition = '-720px -40px';
  }
  if (id == '2634') {
    var childs = document.getElementById('navi8').childNodes;
    childs[0].style.backgroundPosition = '-840px -40px';
  }
  else {
    return;
  }

  childs[0].style.backgroundImage = 'url(/imgs/menu.gif)';
  childs[0].style.backgroundRepeat = 'no-repeat';
}

function FolderImage(id) {
  var ele = document.getElementById('folder-image');
  if (id == '327') {
    ele.style.backgroundImage = 'url(/imgs/icons/folder_link_index.jpg)';
  }
  if (id == '324') {
    ele.style.backgroundImage = 'url(/imgs/icons/folder_news_index.jpg)';
  }
  if (id == '325') {
    ele.style.backgroundImage = 'url(/imgs/icons/folder_event_index.jpg)';
  }
  if (id == '326') {
    ele.style.backgroundImage = 'url(/imgs/icons/folder_facilities_index.jpg)';
  }
}


function gmap_load() {
	if (GBrowserIsCompatible()) {
		var gmap = new GMap2(document.getElementById('map'));
		gmap.setCenter(new GLatLng(35.4191334680637, 133.41254398226738), 12);
		gmap.addControl(new GLargeMapControl);
		gmap.addControl(new GMapTypeControl);
	}
}


function gmap_access_load() {
	if (GBrowserIsCompatible()) {
		var access = new GMap2(document.getElementById('access_map'));
		access.setCenter(new GLatLng(35.4191334680637, 133.41254398226738), 12);
		access.addControl(new GSmallMapControl);
		access.addControl(new GMapTypeControl);
		
		var chateau = new GMarker(new GLatLng(35.4191334680637, 133.41254398226738));
		var text
		    = '<img src="/files/80.jpg" width="250" border="0" alt="シャトーおだか" /><br clear="all" />'
			+ '<div style="width: 250px; margin-top: 8px; line-height: 1.3em">'
			+ '<strong>シャトー・おだか</strong> (旧米子ハイツ)<br />'
			+ '<div style="font-size: small;">'
			+ '〒689-3514 鳥取県米子市尾高2377<br />'
			+ 'TEL: 0859-39-3701 / FAX: 0859-39-3708'
			+ '</div></div>'
			;

		GEvent.addListener(chateau, 'click', function() {
			chateau.openInfoWindowHtml(text);
		});

		access.addOverlay(chateau);
		chateau.openInfoWindowHtml(text);
	}
}

function runMovie(Src, Width, Height, Quality, Scale) {
	if (!Scale) {
		Scale = 'noscale';
	}

	document.write(
		"<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'"
		+ " width='" + Width + "'"
		+ " height='" + Height + "'"
		+ " codebase='//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0'>"
		+ "<param name='movie' value='" + Src + "'>"
		+ "<param name='quality' value='" + Quality + "'>"
		+ "<param name='menu' value='false'>"
		+ "<param name='wmode' value='transparent'>"
		+ "<embed src='" + Src + "'"
		+ " quality='" + Quality + "'"
		+ " width='" + Width + "'"
		+ " height='" + Height + "'"
		+ " scale='" + Scale + "'"
		+ " menu='false' wmode='transparent' pluginspage='//www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'></embed></object>"
	);
}
