var movingTotal = 0;
var movingDelta = 1;
var timerId;
var isScroll = 0;
function scroll() {
	if (isScroll == 0) {
		return;
	}
	window.location.href = '#result';
	movingTotal = document.getElementById("edge").offsetTop + 300 - document.getElementById("result").offsetTop - getHeight();
	if (movingTotal <= 0) {
		window.location.href = '#edge';
	}
	movingDelta = movingTotal / 250;
	timerId = setTimeout("scrollsub()", 1500);
}
function scrollsub() {
	while (isScroll == 0);
	window.scrollBy(0, movingDelta);
	movingTotal -= movingDelta;
	if (movingTotal > 0) {
		timerId = setTimeout("scrollsub()", 10);
	} else {
		clearTimeout(timerId);
		window.location.href = '#edge';
	}
}
function getHeight() {
	var height= document.documentElement.clientHeight;
	if (height == undefined) {
		height = document.body.clientHeight;
	}
	if (height == undefined) {
		height = window.innerHeight;
	}
	if (height == undefined) {
		height = 600;
	}
	return (height);
}
