/*** ½ºÅ©·Ñ¹è³Ê °´Ã¼ ***/
var scrollBanner = (function(){function _class(id)
{	
	var obj;	// ½ºÅ©·ÑµÇ´Â °´Ã¼
	var area;	// ½ºÅ©·ÑµÇ´Â ¿µ¿ª
	var marginTop;	// area pixelTop
	var bodyHeight;	// marginTop + area.clientHeight

	var _self = this;

	this.init = function()
	{
		obj = document.getElementById(id);
		
		var outer = document.createElement('div');
		outer.style.width = obj.parentNode.offsetWidth;
		obj.parentNode.insertBefore(outer,obj);
		obj.style.position = "absolute";

		area = obj.parentNode;

		marginTop = outer.offsetTop + get_objectTop(area);
		obj.style.top = document.body.scrollTop + marginTop;
		if (area!=document.body) bodyHeight = marginTop + area.clientHeight;
		objHeight = obj.clientHeight;

		this.move();
	}

	this.move = function()
	{
		var posFrom, posTo, gap, timedelay;
		
		timedelay = 500;
		
		posFrom	= obj.style.pixelTop;
		posTo	= document.body.scrollTop + 10;
		if (posTo<marginTop) posTo = marginTop;

		if (posFrom != posTo){
			gap = Math.ceil(Math.abs(posTo - posFrom) / 10);
			if (posTo < posFrom) gap = -gap;
			obj.style.top = obj.style.pixelTop + gap;
			timedelay = 10;
		}
		if (obj.style.pixelTop > bodyHeight-objHeight) obj.style.top = bodyHeight - objHeight;
		setTimeout (_self.move, timedelay);
	}

};
return _class;
})();