function MoveLay(Lay,LayWidth,LayHeight,le,to) {
	WinSize()
		switch(le){//左、右、中心
			case 0 : X = ScrollLeft; break
			case 1 : X = WinWidth-LayWidth+ScrollLeft; break
			case 2 : X = (WinWidth-LayWidth)/2+ScrollLeft; break
		}
		switch(to){//上、下、中心
			case 0 : Y = LayHeight; break
			case 1 : Y = WinHeight-LayHeight+ScrollTop; break
			case 2 : Y = (WinHeight-LayHeight)/2+ScrollTop; break
		}
	LayMoveTo(Lay,X,Y)
}
function Kotei(){
	setInterval("MoveLay('Layer2',764,0,2,0)",100)
	setInterval("MoveLay('Layer3',764,0,2,0)",100)
	setInterval("MoveLay('Layer4',764,0,2,0)",100)
	setInterval("MoveLay('Layer5',764,0,2,0)",100)
}
window.onload = Kotei

//-------------------------●ウィンドウのサイズを計る
function WinSize(){
	if(document.all){//IE
		WinWidth = document.body.clientWidth
		WinHeight = document.body.clientHeight
		ScrollTop = document.body.scrollTop
		ScrollLeft = document.body.scrollLeft
	}
	else if(document.layers || document.getElementById){//NN
		WinWidth = window.innerWidth
		WinHeight = window.innerHeight
		ScrollTop = window.pageYOffset
		ScrollLeft = window.pageXOffset
	}
}
//-------------------------●レイヤー絶対座標に移動
function LayMoveTo(Lay,X,Y){
	if(document.getElementById){ //NN6,IE5用
		document.getElementById(Lay).style.left = X
		document.getElementById(Lay).style.top = Y + 21
	}
	else if (document.all){ //IE4用
		document.all(Lay).style.posLeft = X
		document.all(Lay).style.posTop = Y + 21
	}
	else if(document.layers) //NN4用
		document.layers[Lay].moveTo(X,Y + 21)
}

//-------------------------●for Netscape4
function NcReload(){window.document.location.reload()}
if(document.layers) window.onresize = NcReload