
/* ¿À´ÃÀÇ »óÇ° ¸®½ºÆ®
------------------------------------------------------------------------------------------------------*/
var np_active;
var np_speed;
var dspcnt;

function ScrollUp(){
	if(parseInt(obj[np_active].style.top) == 0){
		alert('ÃÖ±Ù º» Ã¹»óÇ°ÀÔ´Ï´Ù.');
		return;
	}			
	if(document.getElementById){
		if(parseInt(obj[np_active].style.top) < 0){
			obj[np_active].style.top = parseInt(obj[np_active].style.top) + np_speed + "px";
		}	
	}
}

function ScrollDown(){
	if(document.getElementById){
		var remain_height = parseInt(obj[np_active].style.height) + (parseInt(obj[np_active].style.top));
		if(remain_height <= (dspcnt * np_speed)){
			alert('ÃÖ±Ù º» ¸¶Áö¸·»óÇ°ÀÔ´Ï´Ù.');
			return;
		}
		if(parseInt(obj[np_active].style.top) > document.getElementById('cont').offsetHeight - obj[np_active].offsetHeight){
			obj[np_active].style.top = parseInt(obj[np_active].style.top) - np_speed + "px";
		}
	}
}

function ScrollPageInit(rowcnt, rowlimit) {
	var tbl_row =  document.getElementById("img_1");
	var inner_height = 0;
	var cont_obj;
	var tmp_obj;
	dspcnt = rowlimit; 
	np_active = 0;
	if(tbl_row == undefined || rowcnt <= 0)
		return;
	else {
		var rview_timg = new Image();
		inner_height = 60; //parseInt(tbl_row.height) + 9;
		if(inner_height <= 0)
		return;
		np_speed = inner_height;		
		cont_obj = document.getElementById("cont");
		cont_obj.style.height = (rowcnt > rowlimit ? (inner_height * rowlimit - 10) : (inner_height * rowcnt - 10)) + 'px';
	}
	if(document.getElementById){
		obj = document.getElementById("cont").getElementsByTagName("div");
		obj['inner_row'].style.visibility = "visible";
		obj['inner_row'].style.height = (inner_height * rowcnt) + 'px';	
		obj['inner_row'].style.top = 0;
	}
}

