function UpDownScroll() {
	var lastScrollY = 0;
	var NS = (document.layers) ? 1 : 0;
	var IE = (document.all) ? 1: 0;
	var startY = 0;
	var bottomHeight = 200;
	var moveObj;

	function init(objId, thisClassName) {
		moveObj = findObj(objId);

		if(IE) { 
			startY = moveObj.style.pixelTop;
		} else if(NS) {
			startY = moveObj.top; 
		}
		if(NS || IE) window.setInterval(thisClassName + ".heartBeat()",1);
	}

	function heartBeat() {
		var diffY = 0;
		if(IE) { 
			diffY = document.body.scrollTop; 
		} else if(NS) { 
			diffY = self.pageYOffset;
		}

		if (diffY != lastScrollY) {
			var winHeight = document.body.clientHeight;
			var fixPos = 0;
			if (startY + bottomHeight > winHeight) {
				fixPos = diffY + (winHeight- startY -bottomHeight);
				if (fixPos < 0) fixPos = 0;
			} else {
				fixPos = diffY;
			}

			percent = 0.1 * ( fixPos  - lastScrollY);
			
			if(percent > 0) 
				percent = Math.ceil(percent);
			else 
				percent = Math.floor(percent);
			
			if(IE) 
				moveObj.style.pixelTop += percent;
			else if(NS) 
				moveObj.top += percent; 
			lastScrollY += percent;
		}

	}

	/**
	*	¿ÀºêÁ§Æ® Ã£±â
	*	@param String n  ¿ÀºêÁ§Æ® ¾ÆÀÌµð
	*	@param Object d Ã£°íÀÚ ÇÏ´Â °´Ã¼ 
	*/
	function findObj(n, d) { //v4.01
		var p;
		var i;
		var x;  

		if(!d) d = document; 

		if ( (p = n.indexOf("?")) > 0 && parent.frames.length) {
			d = parent.frames[n.substring(p+1)].document; 
			n = n.substring(0,p);
		}
		
		if ( !(x = d[n]) && d.all) {
			x = d.all[n]; 
		} else {
			for (i=0; !x && i<d.forms.length; i++) 
				x = d.forms[i][n];
		
			for(i=0; !x && d.layers && i<d.layers.length; i++) 
				x = findObj(n, d.layers[i].document);
		
			if(!x && d.getElementById) 
				x = d.getElementById(n); 
		}
		return x;
	}
	
	this.init = init;
	this.heartBeat = heartBeat;
}
