<? if (!defined("_GNUBOARD_")) exit; ?>
<link rel="stylesheet" href="<?=$zms['service_path']?>/style.css" type="text/css">
<img src="<?=$zms[service_path]?>/img/icon_updown.gif" usemap="#scroll_map" class="updown_drag" title="마우스를 올려 보세요."><br>
<map name="scroll_map">
	<area shape="rect" coords="0, 0, 16, 22" onmouseover="scrl_move('up');" onmouseout="clearInterval(scr_move);">
	<area shape="rect" coords="0, 23, 16, 44" onmouseover="scrl_move('down');" onmouseout="clearInterval(scr_move);">
</map>

<script type="text/javascript">
var scr_move;

$(function(){
	//-- 윈도우 높이 보다 문서 높이가 크면 스크롤 이미지 보여주기
	if(window.outerHeight < $(document).height()) {
		
		$(".updown_drag").css("display", "block");
	}

	fix_scroll_btn();
	$(window).resize(function(){
		fix_scroll_btn();
	})
});

function fix_scroll_btn(){
	var s_t	= ((window.outerHeight / 2) - 22) + document.body.scrollTop;	//-- 스크롤러 기본 위치(Top)
	var s_l	= $(window).width() - 20;		//-- (Left)
	$(".updown_drag").css({"left": s_l+"px", "top": s_t+"px"});
}

function scrl_move(ud){
	scr_move = setInterval(function(){
		scroll_move(ud);
	}, 50);
}
function scroll_move(ud){
	if(ud == "up") {
		window.scrollBy(0, -20);
	}else if(ud == "down") {
		window.scrollBy(0, 20);
	}
}
</script>