function GetScrollSize () {

	this.X = (window.pageXOffset) ? window.pageXOffset :
			 (document.documentElement.scrollLeft) ? document.documentElement.scrollLeft :
			 (document.body) ? document.body.scrollLeft :
			 undefined;

	this.Y = (window.pageYOffset) ? window.pageYOffset :
			 (document.documentElement.scrollTop) ? document.documentElement.scrollTop :
			 (document.body) ? document.body.scrollTop :
			 undefined;

	return this;

}

function GetPosition (target) {

	try {
		this.X = target.offsetLeft;
		this.Y = target.offsetTop;
		if (target != document.body) {
			var temp = target.offsetParent;
			while (temp != document.body) {
				this.X += temp.offsetLeft;
				this.Y += temp.offsetTop;
				temp = temp.offsetParent;
				}
			}
		this.X += document.body.offsetLeft;
		this.Y += document.body.offsetTop;
		return this;
		} catch (e) {
		return null;
		}

}

function GoScroll () {

	var Size = new GetScrollSize();
	var Pos = new GetPosition(document.getElementById("side_mover"));
	// 310はウィンドウ上部からのオフセット
	// 5は適当な数字。大きいと動くスピードが遅くなるはず
	var Distance = (Size.Y + 310 - Pos.Y)/5;

	document.getElementById("side_mover").style.top = Pos.Y + Distance + "px";

}

window.onload = function () {
	// 20は更新間隔で単位はミリ秒
	setInterval("GoScroll()", 20);
}
