//スクロール処理
function setGoTop() {
	var aTagList = document.getElementsByTagName('a');
	for (var i = 0; i < aTagList.length; i++) {
		if (aTagList[i].href.match(/#top/i)) {
			aTagList[i].onclick = goPageTop;
		}
	}
}
	var goTopMove = 20;
var goTopPosi;
function goPageTop() {
	var yPos = document.body.scrollTop || document.documentElement.scrollTop;
	mObj(yPos);
	return false;
}
function mObj(y, s) {
	if (s) goTopMove = s;
	goTopPosi = parseInt(y - y * 2 / goTopMove);
	scrollTo(0, goTopPosi);
	if (goTopPosi > 0) setTimeout('mObj(goTopPosi, goTopMove)', 1);
}

// ページロード完了時に実行
if (window.addEventListener) window.addEventListener('load', setGoTop, false);
if (window.attachEvent) window.attachEvent('onload', setGoTop);



//Safari系でストリートビューを静的な別コンテンツに置き換える
function displayMap2() {

	if(getAgent()=="Safari") {
		document.write('<img src="img/img_location.jpg" alt="Safariでのご利用はいただけません。" />');
	} else {
		document.write('<iframe width="760" height="450" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.co.jp/maps?f=q&amp;source=embed&amp;hl=ja&amp;geocode=&amp;q=&amp;sll=34.664099,134.976806&amp;sspn=0.001679,0.002411&amp;g=34.663998,134.976745&amp;brcurrent=3,0x3554d4ec0858295f:0x4c8c8497bee0a65d,0&amp;ie=UTF8&amp;hq=&amp;hnear=&amp;layer=c&amp;cbll=34.664099,134.976806&amp;panoid=NKHZzFZUKXMtnjzOUFeoKg&amp;cbp=11,262.88,,0,-25.23&amp;ll=34.664099,134.976807&amp;spn=0.000754,0.002411&amp;z=14&amp;output=svembed"></iframe>');
	}
	
}

function displayPhoto() {
	if(getAgent()=="Safari") {
		document.write('<div id="galleryShelf"><ul class="clearfix">\
					  <p>クリックすると大きな画像が表示されます。</p>\
					   <li><a href="photo/img1_l.jpg" target="_blank"><img src="photo/img1_s.jpg" width="85" height="57" border="0" alt="" class="image1" title="" longdesc="" /></a></li>\
                      <li><a href="photo/img2_l.jpg" target="_blank"><img src="photo/img2_s.jpg" width="85" height="57" border="0" alt="" class="image2" title="" longdesc="" /></a></li>\
                      <li><a href="photo/img3_l.jpg" target="_blank"><img src="photo/img3_s.jpg" width="85" height="57" border="0" alt="" class="image3" title="" longdesc="" /></a></li>\
                      <li><a href="photo/img4_l.jpg" target="_blank"><img src="photo/img4_s.jpg" width="85" height="57" border="0" alt="" class="image4" title="" longdesc="" /></a></li>\
                      <li><a href="photo/img5_l.jpg" target="_blank"><img src="photo/img5_s.jpg" width="85" height="57" border="0" alt="" class="image5" title="" longdesc="" /></a></li>\
                      <li><a href="photo/img6_l.jpg" target="_blank"><img src="photo/img6_s.jpg" width="85" height="57" border="0" alt="" class="image6" title="" longdesc="" /></a></li>\
                      <li><a href="photo/img7_l.jpg" target="_blank"><img src="photo/img7_s.jpg" width="85" height="57" border="0" alt="" class="image7" title="" longdesc="" /></a></li>\
                      <li><a href="photo/img8_l.jpg" target="_blank"><img src="photo/img8_s.jpg" width="85" height="57" border="0" alt="" class="image8" title="" longdesc="" /></a></li>\
                      <li><a href="photo/img9_l.jpg" target="_blank"><img src="photo/img9_s.jpg" width="85" height="57" border="0" alt="" class="image9" title="" longdesc="" /></a></li>\
                      <li><a href="photo/img10_l.jpg" target="_blank"><img src="photo/img10_s.jpg" width="85" height="57" border="0" alt="" class="image10" title="" longdesc="" /></a></li>\
                      <li><a href="photo/img11_l.jpg" target="_blank"><img src="photo/img11_s.jpg" width="85" height="57" border="0" alt="" class="image11" title="" longdesc="" /></a></li>\
                      <li><a href="photo/img12_l.jpg" target="_blank"><img src="photo/img12_s.jpg" width="85" height="57" border="0" alt="" class="image12" title="" longdesc="" /></a></li>\
                      <li><a href="photo/img13_l.jpg" target="_blank"><img src="photo/img13_s.jpg" width="85" height="57" border="0" alt="" class="image13" title="" longdesc="" /></a></li>\
                      <li><a href="photo/img14_l.jpg" target="_blank"><img src="photo/img14_s.jpg" width="85" height="57" border="0" alt="" class="image14" title="" longdesc="" /></a></li>\
                      <li><a href="photo/img15_l.jpg" target="_blank"><img src="photo/img15_s.jpg" width="85" height="57" border="0" alt="" class="image15" title="" longdesc="" /></a></li>\
                      <li><a href="photo/img16_l.jpg" target="_blank"><img src="photo/img16_s.jpg" width="85" height="57" border="0" alt="" class="image16" title="" longdesc="" /></a></li>\
                      <li><a href="photo/img17_l.jpg" target="_blank"><img src="photo/img17_s.jpg" width="85" height="57" border="0" alt="" class="image17" title="" longdesc="" /></a></li>\
                      <li><a href="photo/img18_l.jpg" target="_blank"><img src="photo/img18_s.jpg" width="85" height="57" border="0" alt="" class="image18" title="" longdesc="" /></a></li>\
                      <li><a href="photo/img19_l.jpg" target="_blank"><img src="photo/img19_s.jpg" width="85" height="57" border="0" alt="" class="image19" title="" longdesc="" /></a></li>\
                      <li><a href="photo/img20_l.jpg" target="_blank"><img src="photo/img20_s.jpg" width="85" height="57" border="0" alt="" class="image20" title="" longdesc="" /></a></li>\
					  </ul>\
					  </div>');
	} else {
			document.write('<div id="container" align="center"><div id="gallery" class="ad-gallery"><div class="ad-image-wrapper"><noscript>フォトギャラリーをご覧いただくにはJavascriptが有効となってある必要あります。<br />有効にするには、お使いのブラウザの設定やヘルプをご確認ください。</noscript></div><div class="ad-controls"></div><div class="ad-nav"><div class="ad-thumbs"><ul class="ad-thumb-list"><li><a href="photo/img1_l.jpg"><img src="photo/img1_s.jpg" width="85" height="57" border="0" alt="" class="image1" title="" longdesc="" /></a></li><li><a href="photo/img2_l.jpg"><img src="photo/img2_s.jpg" width="85" height="57" border="0" alt="" class="image2" title="" longdesc="" /></a></li><li><a href="photo/img3_l.jpg"><img src="photo/img3_s.jpg" width="85" height="57" border="0" alt="" class="image3" title="" longdesc="" /></a></li><li><a href="photo/img4_l.jpg"><img src="photo/img4_s.jpg" width="85" height="57" border="0" alt="" class="image4" title="" longdesc="" /></a></li><li><a href="photo/img5_l.jpg"><img src="photo/img5_s.jpg" width="85" height="57" border="0" alt="" class="image5" title="" longdesc="" /></a></li><li><a href="photo/img6_l.jpg"><img src="photo/img6_s.jpg" width="85" height="57" border="0" alt="" class="image6" title="" longdesc="" /></a></li><li><a href="photo/img7_l.jpg"><img src="photo/img7_s.jpg" width="85" height="57" border="0" alt="" class="image7" title="" longdesc="" /></a></li><li><a href="photo/img8_l.jpg"><img src="photo/img8_s.jpg" width="85" height="57" border="0" alt="" class="image8" title="" longdesc="" /></a></li><li><a href="photo/img9_l.jpg"><img src="photo/img9_s.jpg" width="85" height="57" border="0" alt="" class="image9" title="" longdesc="" /></a></li><li><a href="photo/img10_l.jpg"><img src="photo/img10_s.jpg" width="85" height="57" border="0" alt="" class="image10" title="" longdesc="" /></a></li><li><a href="photo/img11_l.jpg"><img src="photo/img11_s.jpg" width="85" height="57" border="0" alt="" class="image11" title="" longdesc="" /></a></li><li><a href="photo/img12_l.jpg"><img src="photo/img12_s.jpg" width="85" height="57" border="0" alt="" class="image12" title="" longdesc="" /></a></li><li><a href="photo/img13_l.jpg"><img src="photo/img13_s.jpg" width="85" height="57" border="0" alt="" class="image13" title="" longdesc="" /></a></li><li><a href="photo/img14_l.jpg"><img src="photo/img14_s.jpg" width="85" height="57" border="0" alt="" class="image14" title="" longdesc="" /></a></li><li><a href="photo/img15_l.jpg"><img src="photo/img15_s.jpg" width="85" height="57" border="0" alt="" class="image15" title="" longdesc="" /></a></li><li><a href="photo/img16_l.jpg"><img src="photo/img16_s.jpg" width="85" height="57" border="0" alt="" class="image16" title="" longdesc="" /></a></li><li><a href="photo/img17_l.jpg"><img src="photo/img17_s.jpg" width="85" height="57" border="0" alt="" class="image17" title="" longdesc="" /></a></li><li><a href="photo/img18_l.jpg"><img src="photo/img18_s.jpg" width="85" height="57" border="0" alt="" class="image18" title="" longdesc="" /></a></li><li><a href="photo/img19_l.jpg"><img src="photo/img19_s.jpg" width="85" height="57" border="0" alt="" class="image19" title="" longdesc="" /></a></li><li><a href="photo/img20_l.jpg"><img src="photo/img20_s.jpg" width="85" height="57" border="0" alt="" class="image20" title="" longdesc="" /></a></li></ul></div></div></div></div>');
	}
}


//ブラウザ判別処理
function getAgent() {
		var brName;
		var aName=navigator.appName;
		uAgent=navigator.userAgent;
		if(uAgent.indexOf("Opera")!=-1)
			brName="Opera";
		else if(uAgent.indexOf("Chrome")!=-1)
			brName="Chrome";
		else if(uAgent.indexOf("Safari")!=-1)
			brName="Safari";
		else if(uAgent.indexOf("MSIE")!=-1)
			brName="Internet Explorer";
		else if(aName=="Netscape"){
			if(uAgent.indexOf("Gecko")!=-1)
				brName="Mozilla";
			else
				brName="NetscapeOld";
		} else
			brName=aName;
		return brName;
}

