
/* ****************************************************************** 

	COPYRIGHT(C) CYBRiDGE CORPORATION.
	URL: http://www.cybridge.jp/

****************************************************************** */

//ページ読込終了時のjs初期化処理
window.onload = function() {
	
	//class blankで新しいウィンドウ
	var node_a = document.getElementsByTagName('a');
	for (var i in node_a) {
		if (node_a[i].className == 'blank') {
			node_a[i].onclick = function() {
			window.open(this.href, '', '');
			return false;
			};
		};
	};
	
	//ページスクロール初期化
	tinyScrolling.init();

};


function searcPanelMore(){
	document.getElementById('searchMoreType').style.display = "block";
	document.getElementById('searchMore').style.display = "none";
}
function searcPanelMoreClose(){
	document.getElementById('searchMoreType').style.display = "none";
	document.getElementById('searchMore').style.display = "block";
}


//searchMore

//ページスクロール

/* Tiny Scrolling - a smooth navigation between internal links and their destinations
by Marco Rosella - http://www.centralscrutinizer.it/en/design/js-php/tiny-scrolling
based on the works by Travis Beckham and Brian McAllister.
                v0.3 - March 27, 2006
*/

var tinyScrolling = {
	speed : 25,      //set here the scroll speed: when this value increase, the speed decrease. 
	maxStep: 150,	 //set here the "uniform motion" step for long distances
	brakeK: 3,		 //set here the coefficient of slowing down
	hash:null,		
	currentBlock:null,
	requestedY:0,
	init: function() {
			var lnks = document.getElementsByTagName('a');   
			for(var i = 0, lnk; lnk = lnks[i]; i++) {   
				if ((lnk.href && lnk.href.indexOf('#') != -1) &&  ( (lnk.pathname == location.pathname) ||
				('/'+lnk.pathname == location.pathname) ) && (lnk.search == location.search)) {  
				lnk.onclick = tinyScrolling.initScroll;   		
				}   
			}
	},
	getElementYpos: function(el){
			var y = 0;
			while(el.offsetParent){  
				y += el.offsetTop    
				el = el.offsetParent;
			}	return y;
	},		
	getScrollTop: function(){
			if(document.all) return (document.documentElement.scrollTop) ? document.documentElement.scrollTop : document.body.scrollTop;
			else return window.pageYOffset;   
	},	
	getWindowHeight: function(){
			if (window.innerHeight)	return window.innerHeight;
			if(document.documentElement && document.documentElement.clientHeight) return document.documentElement.clientHeight;
	},
	getDocumentHeight: function(){
			if (document.height) return document.height;
			if(document.body.offsetHeight) return document.body.offsetHeight;
	},
	initScroll: function(e){
			var targ;  
			if (!e) var e = window.event;
			if (e.target) targ = e.target;
			else if (e.srcElement) targ = e.srcElement;   
			tinyScrolling.hash = targ.href.substr(targ.href.indexOf('#')+1,targ.href.length); 
			tinyScrolling.currentBlock = document.getElementById(tinyScrolling.hash);   
			if(!tinyScrolling.currentBlock) return;
			tinyScrolling.requestedY = tinyScrolling.getElementYpos(tinyScrolling.currentBlock); 
			tinyScrolling.scroll();  
			return false;
	},
	scroll: function(){
			var top  = tinyScrolling.getScrollTop();
			if(tinyScrolling.requestedY > top) {  
				var endDistance = Math.round((tinyScrolling.getDocumentHeight() - (top + tinyScrolling.getWindowHeight())) / tinyScrolling.brakeK);
				endDistance = Math.min(Math.round((tinyScrolling.requestedY-top)/ tinyScrolling.brakeK), endDistance);
				var offset = Math.max(2, Math.min(endDistance, tinyScrolling.maxStep));
			} else { var offset = - Math.min(Math.abs(Math.round((tinyScrolling.requestedY-top)/ tinyScrolling.brakeK)), tinyScrolling.maxStep);
			} window.scrollTo(0, top + offset);  
			if(Math.abs(top-tinyScrolling.requestedY) <= 1 || tinyScrolling.getScrollTop() == top) {
				window.scrollTo(0, tinyScrolling.requestedY);
				if(!document.all || window.opera) location.hash = tinyScrolling.hash;
				tinyScrolling.hash = null;
			} else 	setTimeout(tinyScrolling.scroll,tinyScrolling.speed);
	}		
}


//印刷
function print_out() {
   /* print() が使えるブラウザかどうかを判断 */
   if (navigator.userAgent.match(/msie (\d)/i))
      v = (eval(RegExp.$1) >= 5) ? 1 : 0;
   else if (self.innerWidth)
      v = (eval(navigator.appVersion.charAt(0)) >= 4) ? 1 : 0;
   else v = 0;

   /* print() が使えるブラウザなら印刷を実行 */
   if (v) self.print();
   else alert("お使いのブラウザではこの機能は利用できません");
}




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_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_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 MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}




// map (全国)
function MMtohoku(){
    MM_swapImage('mapJapan','','/img/map/map_hokkaido.gif',1);
}
function MMhokuriku(){
    MM_swapImage('mapJapan','','/img/map/map_hokuriku.gif',1);
}
function MMkanto(){
    MM_swapImage('mapJapan','','/img/map/map_kanto.gif',1);
}
function MMtokai(){
    MM_swapImage('mapJapan','','/img/map/map_tokai.gif',1);
}
function MMkansai(){
    MM_swapImage('mapJapan','','/img/map/map_kansai.gif',1);
}
function MMcyugoku(){
    MM_swapImage('mapJapan','','/img/map/map_cyugoku.gif',1);
}
function MMkyushuokinawa(){
    MM_swapImage('mapJapan','','/img/map/map_kyushu.gif',1);
}

// map (北海道・東北)
function MMhokkaido(){
    MM_swapImage('mapHokkaido','','/img/map/hokkaido_hokkaido.gif',1);
}
function MMaomori(){
    MM_swapImage('mapHokkaido','','/img/map/hokkaido_aomori.gif',1);
}
function MMakita(){
    MM_swapImage('mapHokkaido','','/img/map/hokkaido_akita.gif',1);
}
function MMiwate(){
    MM_swapImage('mapHokkaido','','/img/map/hokkaido_iwate.gif',1);
}
function MMyamagata(){
    MM_swapImage('mapHokkaido','','/img/map/hokkaido_yamagata.gif',1);
}
function MMmiyagi(){
    MM_swapImage('mapHokkaido','','/img/map/hokkaido_miyagi.gif',1);
}
function MMfukushima(){
    MM_swapImage('mapHokkaido','','/img/map/hokkaido_fukushima.gif',1);
}
// map (北陸・甲信越)
function MMnigata(){
    MM_swapImage('mapHokuriku','','/img/map/hokuriku_nigata.gif',1);
}
function MMnagano(){
    MM_swapImage('mapHokuriku','','/img/map/hokuriku_nagano.gif',1);
}
function MMtoyama(){
    MM_swapImage('mapHokuriku','','/img/map/hokuriku_toyama.gif',1);
}
function MMishikawa(){
    MM_swapImage('mapHokuriku','','/img/map/hokuriku_ishikawa.gif',1);
}
function MMfukui(){
    MM_swapImage('mapHokuriku','','/img/map/hokuriku_fukui.gif',1);
}
function MMyamanashi(){
    MM_swapImage('mapHokuriku','','/img/map/hokuriku_yamanashi.gif',1);
}
// map (関東)
function MMtokyo(){
    MM_swapImage('mapKanto','','/img/map/kanto_tokyo.gif',1);
}
function MMchiba(){
    MM_swapImage('mapKanto','','/img/map/kanto_chiba.gif',1);
}
function MMkanagawa(){
    MM_swapImage('mapKanto','','/img/map/kanto_kanagawa.gif',1);
}
function MMsaitama(){
    MM_swapImage('mapKanto','','/img/map/kanto_saitama.gif',1);
}
function MMtochigi(){
    MM_swapImage('mapKanto','','/img/map/kanto_tochigi.gif',1);
}
function MMibaraki(){
    MM_swapImage('mapKanto','','/img/map/kanto_ibaraki.gif',1);
}
function MMgunma(){
    MM_swapImage('mapKanto','','/img/map/kanto_gunma.gif',1);
}
// map (東京)
function MMtokyo23in(){
    MM_swapImage('mapTokyoAll','','/img/map/map_tokyo23in.gif',1);
}
function MMtokyo23out(){
    MM_swapImage('mapTokyoAll','','/img/map/map_tokyo23out.gif',1);
}
// map (東京 23区内)
function MMadachi(){
    MM_swapImage('mapTokyo23in','','/img/map/map_t23in_adachi.gif',1);
}
function MMarakawa(){
    MM_swapImage('mapTokyo23in','','/img/map/map_t23in_arakawa.gif',1);
}
function MMbunkyo(){
    MM_swapImage('mapTokyo23in','','/img/map/map_t23in_bunkyo.gif',1);
}
function MMchiyoda(){
    MM_swapImage('mapTokyo23in','','/img/map/map_t23in_chiyoda.gif',1);
}
function MMchuo(){
    MM_swapImage('mapTokyo23in','','/img/map/map_t23in_chuo.gif',1);
}
function MMedogawa(){
    MM_swapImage('mapTokyo23in','','/img/map/map_t23in_edogawa.gif',1);
}
function MMitabashi(){
    MM_swapImage('mapTokyo23in','','/img/map/map_t23in_itabashi.gif',1);
}
function MMkatsushika(){
    MM_swapImage('mapTokyo23in','','/img/map/map_t23in_katsushika.gif',1);
}
function MMkita(){
    MM_swapImage('mapTokyo23in','','/img/map/map_t23in_kita.gif',1);
}
function MMkoto(){
    MM_swapImage('mapTokyo23in','','/img/map/map_t23in_koto.gif',1);
}
function MMmeguro(){
    MM_swapImage('mapTokyo23in','','/img/map/map_t23in_meguro.gif',1);
}
function MMminato(){
    MM_swapImage('mapTokyo23in','','/img/map/map_t23in_minato.gif',1);
}
function MMnakano(){
    MM_swapImage('mapTokyo23in','','/img/map/map_t23in_nakano.gif',1);
}
function MMnerima(){
    MM_swapImage('mapTokyo23in','','/img/map/map_t23in_nerima.gif',1);
}
function MMota(){
    MM_swapImage('mapTokyo23in','','/img/map/map_t23in_ota.gif',1);
}
function MMsetagaya(){
    MM_swapImage('mapTokyo23in','','/img/map/map_t23in_setagaya.gif',1);
}
function MMshibuya(){
    MM_swapImage('mapTokyo23in','','/img/map/map_t23in_shibuya.gif',1);
}
function MMshinagawa(){
    MM_swapImage('mapTokyo23in','','/img/map/map_t23in_shinagawa.gif',1);
}
function MMshinjuku(){
    MM_swapImage('mapTokyo23in','','/img/map/map_t23in_shinjuku.gif',1);
}
function MMsuginami(){
    MM_swapImage('mapTokyo23in','','/img/map/map_t23in_suginami.gif',1);
}
function MMsumida(){
    MM_swapImage('mapTokyo23in','','/img/map/map_t23in_sumida.gif',1);
}
function MMtaito(){
    MM_swapImage('mapTokyo23in','','/img/map/map_t23in_taito.gif',1);
}
function MMtoshima(){
    MM_swapImage('mapTokyo23in','','/img/map/map_t23in_toshima.gif',1);
}
// map (東京 23区外)
function MMakiruno(){
    MM_swapImage('mapTokyo23out','','/img/map/map_t23out_akiruno.gif',1);
}
function MMakishima(){
    MM_swapImage('mapTokyo23out','','/img/map/map_t23out_akishima.gif',1);
}
function MMchofu(){
    MM_swapImage('mapTokyo23out','','/img/map/map_t23out_chofu.gif',1);
}
function MMfuchu(){
    MM_swapImage('mapTokyo23out','','/img/map/map_t23out_fuchu.gif',1);
}
function MMfussa(){
    MM_swapImage('mapTokyo23out','','/img/map/map_t23out_fussa.gif',1);
}
function MMhachioji(){
    MM_swapImage('mapTokyo23out','','/img/map/map_t23out_hachioji.gif',1);
}
function MMhamura(){
    MM_swapImage('mapTokyo23out','','/img/map/map_t23out_hamura.gif',1);
}
function MMhigashikurume(){
    MM_swapImage('mapTokyo23out','','/img/map/map_t23out_higashikurume.gif',1);
}
function MMhigashimurayama(){
    MM_swapImage('mapTokyo23out','','/img/map/map_t23out_higashimurayama.gif',1);
}
function MMhigashiyamato(){
    MM_swapImage('mapTokyo23out','','/img/map/map_t23out_higashiyamato.gif',1);
}
function MMhino(){
    MM_swapImage('mapTokyo23out','','/img/map/map_t23out_hino.gif',1);
}
function MMhinode(){
    MM_swapImage('mapTokyo23out','','/img/map/map_t23out_hinode.gif',1);
}
function MMhinohara(){
    MM_swapImage('mapTokyo23out','','/img/map/map_t23out_hinohara.gif',1);
}
function MMinagi(){
    MM_swapImage('mapTokyo23out','','/img/map/map_t23out_inagi.gif',1);
}
function MMkiyose(){
    MM_swapImage('mapTokyo23out','','/img/map/map_t23out_kiyose.gif',1);
}
function MMkodaira(){
    MM_swapImage('mapTokyo23out','','/img/map/map_t23out_kodaira.gif',1);
}
function MMkoganei(){
    MM_swapImage('mapTokyo23out','','/img/map/map_t23out_koganei.gif',1);
}
function MMkokubunji(){
    MM_swapImage('mapTokyo23out','','/img/map/map_t23out_kokubunji.gif',1);
}
function MMkomae(){
    MM_swapImage('mapTokyo23out','','/img/map/map_t23out_komae.gif',1);
}
function MMmachida(){
    MM_swapImage('mapTokyo23out','','/img/map/map_t23out_machida.gif',1);
}
function MMmitaka(){
    MM_swapImage('mapTokyo23out','','/img/map/map_t23out_mitaka.gif',1);
}
function MMmizuho(){
    MM_swapImage('mapTokyo23out','','/img/map/map_t23out_mizuho.gif',1);
}
function MMmusashimuraya(){
    MM_swapImage('mapTokyo23out','','/img/map/map_t23out_musashimuraya.gif',1);
}
function MMmusashino(){
    MM_swapImage('mapTokyo23out','','/img/map/map_t23out_musashino.gif',1);
}
function MMnishitokyo(){
    MM_swapImage('mapTokyo23out','','/img/map/map_t23out_nishitokyo.gif',1);
}
function MMokutama(){
    MM_swapImage('mapTokyo23out','','/img/map/map_t23out_okutama.gif',1);
}
function MMome(){
    MM_swapImage('mapTokyo23out','','/img/map/map_t23out_ome.gif',1);
}
function MMtachikawa(){
    MM_swapImage('mapTokyo23out','','/img/map/map_t23out_tachikawa.gif',1);
}
function MMtama(){
    MM_swapImage('mapTokyo23out','','/img/map/map_t23out_tama.gif',1);
}
// map (東海)
function MMshizuoka(){
    MM_swapImage('mapTokai','','/img/map/tokai_shizuoka.gif',1);
}
function MMaichi(){
    MM_swapImage('mapTokai','','/img/map/tokai_aichi.gif',1);
}
function MMgihu(){
    MM_swapImage('mapTokai','','/img/map/tokai_gihu.gif',1);
}
function MMmie(){
    MM_swapImage('mapTokai','','/img/map/tokai_mie.gif',1);
}
// map (関西)
function MMhyogo(){
    MM_swapImage('mapKansai','','/img/map/kansai_hyogo.gif',1);
}
function MMkyoto(){
    MM_swapImage('mapKansai','','/img/map/kansai_kyoto.gif',1);
}
function MMnara(){
    MM_swapImage('mapKansai','','/img/map/kansai_nara.gif',1);
}
function MMosaka(){
    MM_swapImage('mapKansai','','/img/map/kansai_osaka.gif',1);
}
function MMshiga(){
    MM_swapImage('mapKansai','','/img/map/kansai_shiga.gif',1);
}
function MMwakayama(){
    MM_swapImage('mapKansai','','/img/map/kansai_wakayama.gif',1);
}
// map (中国)
function MMhiroshima(){
    MM_swapImage('mapChugoku','','/img/map/chugoku_hiroshima.gif',1);
}
function MMokayama(){
    MM_swapImage('mapChugoku','','/img/map/chugoku_okayama.gif',1);
}
function MMshimane(){
    MM_swapImage('mapChugoku','','/img/map/chugoku_shimane.gif',1);
}
function MMtottori(){
    MM_swapImage('mapChugoku','','/img/map/chugoku_tottori.gif',1);
}
function MMyamaguchi(){
    MM_swapImage('mapChugoku','','/img/map/chugoku_yamaguchi.gif',1);
}
// map (四国)
function MMehime(){
    MM_swapImage('mapChugoku','','/img/map/chugoku_ehime.gif',1);
}
function MMkagawa(){
    MM_swapImage('mapChugoku','','/img/map/chugoku_kagawa.gif',1);
}
function MMkochi(){
    MM_swapImage('mapChugoku','','/img/map/chugoku_kochi.gif',1);
}
function MMtokushima(){
    MM_swapImage('mapChugoku','','/img/map/chugoku_tokushima.gif',1);
}
// map (九州・沖縄)
function MMfukuoka(){
    MM_swapImage('mapKyushu','','/img/map/kyushu_fukuoka_.gif',1);
}
function MMnagasaki(){
    MM_swapImage('mapKyushu','','/img/map/kyushu_nagasaki.gif',1);
}
function MMsaga(){
    MM_swapImage('mapKyushu','','/img/map/kyushu_saga.gif',1);
}
function MMoita(){	
    MM_swapImage('mapKyushu','','/img/map/kyushu_oita.gif',1);
}
function MMkumamoto(){
    MM_swapImage('mapKyushu','','/img/map/kyushu_kumamoto.gif',1);
}
function MMmiyazaki(){
    MM_swapImage('mapKyushu','','/img/map/kyushu_miyazaki.gif',1);
}
function MMkagoshima(){
    MM_swapImage('mapKyushu','','/img/map/kyushu_kagoshima.gif',1);
}
function MMokinawa(){
    MM_swapImage('mapKyushu','','/img/map/kyushu_okinawa.gif',1);
}










