function openWin(wUrl,wName,wWidth,wHeight){
scWidthCenter = screen.availWidth / 2;
scHeightCenter = screen.availHeight / 2;
wOption = "scrollbars=yes,width=" + wWidth + ",height=" + wHeight +
",Left=" + (scWidthCenter - (wWidth / 2))+",top=" + (scHeightCenter
-(wHeight / 2));
window.open(wUrl,wName,wOption);
}

document.write("</style>\n");
function copyYear() {
	year = new Date().getFullYear();
	document.write(year);
}

/* なだらかにスクロールしてページの上部に戻る */
function fBacktoTop() {
  var d=document;
  /* 画面の左端からの距離 */
  var scroll_left=d.body.scrollLeft || d.documentElement.scrollLeft || d.scrollX || 0;
   /* 画面の上端からの距離 */
  var scroll_top=d.body.scrollTop || d.documentElement.scrollTop || d.scrollY || 0;
  // 画面スクロール
    scrollTo(scroll_left/2, scroll_top/2);
    /* 画面最上部に移動するまで繰り返す */
    if(scroll_left>0 || scroll_top>0){
        var f=setTimeout("fBacktoTop()", 35);
    }else{
      clearTimeout(f);
    }
}



function flash_to_java() { 

document.writeln('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="880" height="450">');
document.writeln('<param name="movie" value="img/top.swf" />');
document.writeln('<param name="quality" value="high" />');
document.writeln('<embed src="img/top.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="880" height="450"></embed>');
document.writeln('</object>');
document.writeln('');

}



var accordion=function(){
	var tm=10; var sp=10;
	function slider(n){
		this.nm=n; this.arr=[]; this.sel=''
	}
	slider.prototype.init=function(t,c,k){
		var a,h,s,l,i; a=document.getElementById(t);
		h=a.getElementsByTagName('dt'); s=a.getElementsByTagName('dd');
		l=h.length;
		for(i=0;i<l;i++){
			var d=h[i]; this.arr[i]=d; d.onclick=new Function(this.nm+".process(this)");
			if(k!=null&&c==i){this.sel=d.className=k}
		}
		l=s.length;
		for(i=0;i<l;i++){
			var d=s[i]; d.maxh=d.offsetHeight;
			if(c!=i){d.style.height='0'; d.style.display='none'}
		}
	}
	slider.prototype.process=function(d){
		var i,l; l=this.arr.length;
		for(i=0;i<l;i++){
			var h=this.arr[i]; var s=h.nextSibling;
			if(s.nodeType!=1){s=s.nextSibling}
			clearInterval(s.timer);
			if(h==d&&s.style.display=='none'){
				s.style.display=''; setup(s,1); h.className=this.sel}
			else if(s.style.display==''){setup(s,-1); h.className=''}
		}
	}
	function setup(c,f){c.timer=setInterval(function(){slide(c,f)},tm)}
	function slide(c,f){
		var h,m,d; h=c.offsetHeight; m=c.maxh; d=(f==1)?Math.ceil((m-h)/sp):Math.ceil(h/sp);
		c.style.height=h+(d*f)+'px'; c.style.opacity=h/m; c.style.filter='alpha(opacity='+h*100/m+')';
		if(f==1&&h>=m){clearInterval(c.timer)}
		else if(f!=1&&h==1){c.style.display='none'; clearInterval(c.timer)}
	}
	return{slider:slider}
}();
