<!--

function getScroll(){
	var x, y ;
	if( document.all !== void 0 ){
		x = document.body.scrollLeft ;
		y = document.body.scrollTop ;
	}else if( document.layers !== void 0 ){
		x = window.pageXOffset ;
		y = window.pageYOffset ;
	}else{
		x = window.scrollX ;
		y = window.scrollY ;
	}
	return { x : x, y : y };
}


var SCROLL ;

var divCountScroller = 25 ;
	
function scroller( x, y, edging, count ){
	
	if( count === void 0 ){
		
		count = 0;
		SCROLL = getScroll();
		
	}

	if( count++ < divCountScroller ){
		
		var c = count/divCountScroller ;
		
		var nx = SCROLL.x+( x-SCROLL.x )*( c+edging/(100*Math.PI)*Math.sin( Math.PI*c ) );
		var ny = SCROLL.y+( y-SCROLL.y )*( c+edging/(100*Math.PI)*Math.sin( Math.PI*c ) );
		
		window.scrollTo( nx, ny )
;
		
		setTimeout( "scroller("+x+","+y+","+edging+","+count+");", 30); //数字が小さいほど早い。
	}
	
}

//-->
