// JavaScript Document/*01.PageTop (cssの設定により編集必要)01+.scroll up02.RollOver 03.Current 04.popup window*//*  01.PageTop---------------------------------------------------------------------------------- */var ScrollWin = {	w3c : document.getElementById,	iex : document.all,	scrollLoop : false, 	scrollInterval : null, // setInterval id	currentBlock : null,   // object reference	getWindowHeight : function(){		if(this.iex) return (document.documentElement.clientHeight) ? document.documentElement.clientHeight : document.body.clientHeight;		else return window.innerHeight;	},	getScrollLeft : function(){		if(this.iex) return (document.documentElement.scrollLeft) ? document.documentElement.scrollLeft : document.body.scrollLeft;		else return window.pageXOffset;	},	getScrollTop : function(){		if(this.iex) return (document.documentElement.scrollTop) ? document.documentElement.scrollTop : document.body.scrollTop;		else return window.pageYOffset;	},	getElementYpos : function(el){		var y = 0;		while(el.offsetParent){			y += el.offsetTop			el = el.offsetParent;		}		return y;	},	scroll : function(num){		if(!this.w3c){			location.href = "#"+this.anchorName+num;			return;		}		if(this.scrollLoop){			clearInterval(this.scrollInterval);			this.scrollLoop = false;			this.scrollInterval = null;		}		if(this.currentBlock != null) this.currentBlock.className = this.offClassName;		this.currentBlock = document.getElementById(this.blockName+num);		this.currentBlock.className = this.onClassName;		var doc = document.getElementById(this.containerName);		var documentHeight = this.getElementYpos(doc) + doc.offsetHeight;		var windowHeight = this.getWindowHeight();		var ypos = this.getElementYpos(this.currentBlock);		if(ypos > documentHeight - windowHeight) ypos = documentHeight - windowHeight;		this.scrollTo(0,ypos);	},	scrollTo : function(x,y){		if(this.scrollLoop){			var left = this.getScrollLeft();			var top = this.getScrollTop();			if(Math.abs(left-x) <= 1 && Math.abs(top-y) <= 1){				window.scrollTo(x,y);				clearInterval(this.scrollInterval);				this.scrollLoop = false;				this.scrollInterval = null;			}else{				window.scrollTo(left+(x-left)/2, top+(y-top)/2);			}		}else{			this.scrollInterval = setInterval("ScrollWin.scrollTo("+x+","+y+")",25);			this.scrollLoop = true;		}	}};//  ↓↓Edit these variablesScrollWin.containerName = "wrapper"; // wrapperのDIVのIDを入れる。ScrollWin.anchorName    = "top";    // 　<a name="top0"> のIDScrollWin.blockName     = "block";     // <div id="block0"></div> の空のDIVを ページを戻したい位置にいれる。//　↑↑ Edit these variables								　　　// 通常は <body>の直下に置く。ScrollWin.onClassName   = "active";    // ScrollWin.offClassName  = "visited";   // /*  01+.scroll up------------------------------------------------ */function slowdownScroll() {   if(navigator.appName == "Microsoft Internet Explorer" && document.compatMode == "CSS1Compat") {      sctop = document.body.parentNode.scrollTop;   }   else if(window.pageYOffset){      sctop = window.pageYOffset;   } else {      sctop = document.body.scrollTop;   }   if(sctop){      scup = Math.ceil(sctop*.2);      scrollBy(0,-scup);      if (sctop-scup) setTimeout("slowdownScroll()",10);   }}/*  02.RollOver ---------------------------------------------------------------------------------- 	Standards Compliant Rollover Script	Author : Daniel Nolan	http://www.bleedingego.co.uk/webdev.php*/function initRollovers() {	if (!document.getElementById) return		var aPreLoad = new Array();	var sTempSrc;	var aImages = document.getElementsByTagName('img');	for (var i = 0; i < aImages.length; i++) {				if (aImages[i].className == 'imgover') {			var src = aImages[i].getAttribute('src');			var ftype = src.substring(src.lastIndexOf('.'), src.length);			var hsrc = src.replace(ftype, '_o'+ftype);			aImages[i].setAttribute('hsrc', hsrc);						aPreLoad[i] = new Image();			aPreLoad[i].src = hsrc;						aImages[i].onmouseover = function() {				sTempSrc = this.getAttribute('src');				this.setAttribute('src', this.getAttribute('hsrc'));			}							aImages[i].onmouseout = function() {				if (!sTempSrc) sTempSrc = this.getAttribute('src').replace('_o'+ftype, ftype);				this.setAttribute('src', sTempSrc);			}		}	}}try{	window.addEventListener("load",initRollovers,false);}catch(e){	window.attachEvent("onload",initRollovers);}/*  03.Current  　imgの設置は　current_ js　ファイルで設定 ---------------------------------------------------------------------------------- *//*ChangeImageNum*/	function imgChangeNum(nam,num) {		if(document.images && (checkObj != 1)) {			document[nam].src = arrowSecond[num].src;		}	}	/*ChangeImage*/	imgId = "";	stayId = "";	function imgChange(imgName,imgState) {		if(document.images) {			stringId0 = imgName.substring(0,4);			stringId = imgName			if(((stringId0 == "navi") || (stringId0 == "navs")) && (stringId == imgId)){				document[imgName].src = eval(imgName + "stay" + ".src");			} else {				document[imgName].src = eval(imgName + imgState + ".src");			}		}	}	function stayMenu(stayId){		imgChange(stayId,"stay");		imgId = stayId;	}	/*  03-01	グローバルナビゲーション　カレント表示 	カレント表示にしたいページで　body onload="curentImg_01()" と記述   ------------------------------------------------------------ *//* ローカルナビ *//*function curentImg_menu01(){	lnavi_01off.src = lnavi_01stay.src	stayMenu('lnavi_01'); 	}function curentImg_menu02(){	lnavi_02off.src = lnavi_01stay.src	stayMenu('lnavi_02'); 	}function curentImg_menu03(){	lnavi_03off.src = lnavi_03stay.src	stayMenu('lnavi_03'); 	}function curentImg_menu04(){	lnavi_04off.src = lnavi_04stay.src	stayMenu('lnavi_04'); 	}*//*  04. popup window 	位置指定_有り スクロール有り時のos,ブラウザ別windowサイズ補正　位置中央 ---------------------------------------------------------------------------------- */function openwin4(file,name,h,w) {//位置指定_センター		sw=screen.availWidth/2-w/2;	sh=screen.availHeight/2-h/2 	//h=screen.height		mac = (navigator.appVersion.indexOf("Mac") != -1) ?true:false;	ie = (navigator.appName.charAt(0) == "M") ?true:false;	nn = (navigator.appName.charAt(0) == "N") ?true:false;		if (mac){		if (ie){		// mac IE		w+=1;		h-=130;		}				else{		// mac NN etc.		w+=16;		h-=10;		}	}	else{		if (ie){		// win IE		w+=17;		h-=130;		}		else{		// win NN etc.		w+=16;		h-=130;		}	}newWin4= window.open(file,name,"height="+h+",width="+w+",top="+sh+",screenY="+sh+",left="+sw+",screenX="+sw+",toolbar=1,location=1,directories=0,status=1,menubar=1,scrollbars=1,resizable=1");document.MM_returnValue = false;newWin4.focus()}