var quick_limit_top = 0;
var quick_margin_top = 0;
var quick_margin_bottom = 0;
var quick_speed = 10;
var quick_interval = 10;

setInterval ("quickscroll()", quick_interval);

function quickscroll() {

	qm = document.getElementById ("quickmenu");

	if (qm)	{

		qm_move_y = document.documentElement.scrollTop + quick_margin_top;
		if (qm_move_y < quick_limit_top ) qm_move_y = quick_limit_top;

		nowTop = parseInt (qm.style.top);

		minus = nowTop - qm_move_y;
		if (Math.abs(minus) >= quick_speed ) minus = 0;

		if ( nowTop != qm_move_y) moving = ( nowTop > qm_move_y) ? (quick_speed * -1) : quick_speed;
		else moving = 0;

		nextPos = nowTop + (moving - minus);

		if (nextPos + qm.offsetHeight + quick_margin_bottom > document.documentElement.scrollHeight ) nextPos = document.documentElement.scrollHeight - qm.offsetHeight - quick_margin_bottom;

		qm.style.top = parseInt(nextPos)+"px";
	}
}
