/* =========================================================================

	JavaScript fot Pockets Studio

	General utility library		type - 1999 December

   ========================================================================= */


// 画像をあらかじめ読み込んでおく
//	icon1 = new Image();
//	icon1.src = "./image/ico_forward_b.gif";
//	icon2 = new Image();
//	icon2.src = "./image/ico_back_b.gif";
//	icon3 = new Image();
//	icon3.src = "./image/ico_stop_b.gif";
	icon4 = new Image();
	icon4.src = "./image/li_check1.gif";


function extendmenu2(a) {				// 展開縮小関数
	if (a.style.display =='') {
		a.style.display = 'none';	// noneは非表示にする
	}
	else {
		a.style.display='';		// 表示させる
	}
}

// スタイルシートのクラス名を変更する
function ListChange(obj,n) {
	obj.className = 'check'+'_'+n;		// 枠のスタイル指定
}

// スタイルシートのクラス名を変更する
function TableChange(obj,n) {
	obj.className = 'navi'+'_'+n;		// 枠のスタイル指定
}

// スタイルシートのクラス名を変更する
function ChangeStyle(obj,n) {
	var text=Array("a0a0a0","red","black")
	obj.className = 'link'+'_'+n;		// 枠のスタイル指定
	obj.children(0).className = text[n];	// 文字のスタイル
	//obj.children(0).style.color = red; //←個別にスタイル指定する場合
}

function DivClick(obj){
	location.href=obj.children(0).href;
}


/********************************************************************************
Copyright (C) 1999 Thomas Brattli
This script is made by and copyrighted to Thomas Brattli at www.bratta.com
Visit for more great scripts.
This may be used freely as long as this msg is intact!
********************************************************************************/

var n = (document.layers) ? 1:0;
var ie = (document.all) ? 1:0;
function makePageCoords(){this.x2=(n)?innerWidth:document.body.offsetWidth;
this.y2=(n)?innerHeight:document.body.offsetHeight;return this;}
function makeObj(obj,nest){nest=(!nest) ? '':'document.'+nest+'.'		
this.css=(n) ? eval(nest+'document.'+obj):eval('document.all.'+obj+'.style')	
this.ref=(n) ? eval(nest+'document.'+obj+'.document'):eval('document');		
this.x=(n)? this.css.left:this.css.pixelLeft;this.y=(n)? this.css.top:this.css.pixelTop;							
this.showIt=b_showIt;this.moveIt=b_moveIt;return this}
function b_showIt(){this.css.visibility="visible"}
function b_moveIt(x,y){this.x=x; this.y=y;this.css.left=this.x;this.css.top=this.y}
function preLoad(num,path,path2){for(i=0; i<=num+1; i++){this[i]=new Image(); 
this[i].src=path+(i+1)+path2+'.gif'}return this}

/************************************************************************************
Variables: (change this to adapt the script to your needs
************************************************************************************/
var imageHeight=20

pre=new preLoad(5,'./image/bt','')
preb=new preLoad(5,'./image/bt','a')
//pre2=new preLoad(5,'./image/bt','b')
pre2=new preLoad(5,'./image/bt','a')

var mspeed=10

function init(){
	page=new makePageCoords()
	oBButtons=new makeObj('divBottomButtons')
	oBText=new makeObj('divBottomText',' divBottomCont')
	oBCont=new makeObj('divBottomCont')
	oBButtons.moveIt(370,40)
	oBCont.moveIt(oBButtons.x+68,5)	// テキスト部の表示位置
	oBText.moveIt(0,3) 	//テキスト部をどれだけ離すか(x,y)
	oBButtons.showIt()
	oBCont.showIt()
}

function mover(num){oBButtons.ref["img"+num].src=preb[num].src; moveTo(num)}
function mout(num){oBButtons.ref["img"+num].src=pre[num].src; moveBack()}
function mout2(num){oBButtons.ref["img"+num].src=pre2[num].src; moveBack()}
//function mout2(num){oBButtons.ref["img"+num].src=pre2[num].src; moveBack()}
var tim;
function moveTo(num){
	clearTimeout(tim)
	gt=-((num+1)*imageHeight)+3
	if(oBText.y!=gt){
		if(oBText.y<gt) oBText.moveIt(oBText.x,oBText.y+5)
		else oBText.moveIt(oBText.x,oBText.y-5)
		tim=setTimeout("moveTo("+num+")",mspeed)
	}
}
function moveBack(){
	clearTimeout(tim)
	if(oBText.y!=3){oBText.moveIt(oBText.x,oBText.y+5); tim=setTimeout("moveBack()",mspeed)}
}
onload=init;

