/* page up
----------------------------------------------- */
function pageup() {
	var nv = navigator.userAgent;
	if (nv.match(new RegExp("MSIE 7", "i"))) { posi = document.documentElement.scrollTop; }
	else if (nv.match(new RegExp("MSIE", "i"))) { posi = document.body.scrollTop }
	else { posi = window.pageYOffset; }
	moveObje(posi);
}
function moveObje(position) {
	move = position / 10;
	points = parseInt(position - move);
	scrollTo(0,points);
	if (points > 0) { setTimeout("moveObje(points)",1); }
}


/* 表示位置固定
----------------------------------------------- */
function floatbt() {
	
	var nv = navigator.userAgent;
	var bt = document.getElementById("pageup");
	var wh = document.body.clientWidth;
	var cwh = 749;
	var imgh = 44;

	if (nv.match(new RegExp("MSIE 7", "i"))) {
		bt.style.left = (wh / 2) + (cwh / 2) + "px";
		bt.style.top = document.documentElement.offsetHeight + document.documentElement.scrollTop - imgh + "px";
	}
	else if (nv.match(new RegExp("MSIE", "i"))) {
		bt.style.left = (wh / 2) + (cwh / 2) + "px";
		bt.style.top = document.body.offsetHeight + document.body.scrollTop - imgh + "px";
	}
	else if (nv.match(new RegExp("Firefox", "i"))) {
		bt.style.left = (wh / 2) + (cwh / 2) + "px";
		bt.style.top = window.pageYOffset + window.innerHeight - imgh + "px";
	}
	else if (nv.match(new RegExp("WIN", "i"))) {
		bt.style.left = (wh / 2) + (cwh / 2) - 1 + "px";
		bt.style.top = window.pageYOffset + window.innerHeight - imgh + "px";
	}
	else {
		bt.style.left = (wh / 2) + (cwh / 2) + "px";
		bt.style.top = window.pageYOffset + window.innerHeight - imgh + "px";
	}
	setTimeout("floatbt()", 10);
}
