/*
 * ÇØ´ç ¸Þ¼Òµå¸¦ ¼ÒÀ¯°´Ã¼(Owner object)·Î ÀÎ½ºÅÏ½º¸¦ ¹Ì¸® ¹­¾î¼­ ¹ÝÈ¯ÇÏ´Â ÇÔ¼ö, ¼ÒÀ¯°´Ã¼¿Í µ¿ÀÏÇÑ ÀÎÀÚ°ªÀ» °®´Â´Ù.
 * @param {Object, [Number, String, Object, ...], ...} ÇÔ¼ö(¸Þ¼Òµå)¸¦ ¼ÒÀ¯ÇÏ°í ÀÖ´Â °´Ã¼, Àü´Þ º¯¼ö, ...
 * @author N.Thu Lee
 * @copyright x-wiz.com
 * @version 0.1
 * @release 2007.01.12
 */
Function.prototype.bindAsObject=function(){var _$=this,args =[],object=null;if(arguments.length<2&&typeof arguments[0]=='undefined') return this;for(var i=0,len=arguments.length;i<len;i++) args[i]=arguments[i];object = args.shift();return function(){var a=[];for(var i=0,len=arguments.length;i<len;i++) a[i]=arguments[i];return _$.apply(object, args.concat(a));}};
/*
 * Æ¯Á¤ °´Ã¼¿¡ ÀÌº¥Æ® ÇÚµé·¯ Ãß°¡ ÇÔ¼ö
 * @param {Object, String, Function, Bool} ´ë»ó °´Ã¼, ÀÌº¥Æ® ¸í, ÇÔ¼ö, capture
 * @author N.Thu Lee
 * @copyright x-wiz.com
 * @version 0.1
 * @release 2007.01.12
 */
addEventObserve=function(element,name,fpnotify,useCapture){if(element.addEventListener)element.addEventListener(name,fpnotify,useCapture||false);else if(element.attachEvent)element.attachEvent('on'+name, fpnotify);};
/*
 * Æ¯Á¤ °´Ã¼¿¡ ÀÌº¥Æ® ÇÚµé·¯ ÇØÁ¦ ÇÔ¼ö
 * @param {Object, String, Function, Bool} ´ë»ó °´Ã¼, ÀÌº¥Æ® ¸í, ÇÔ¼ö, capture
 * @author N.Thu Lee
 * @copyright x-wiz.com
 * @version 0.1
 * @release 2007.01.12
 */
freeEventObserve=function(element,name,fpnotify,useCapture){	if(element.removeEventListener)element.removeEventListener(name,fpnotify,useCapture||false);else if(element.detachEvent) element.detachEvent('on'+name,fpnotify);};

var ObjectRolling = function()
{
	this.Obj = [];
	this.imgObj = [];
	this.time = 3000;
	this.timerId = null;
	this.rotate = 1;
}

ObjectRolling.prototype = {

	setObj : function(obj, imgObj)
	{
		this.Obj.push(obj);
		if (imgObj) this.imgObj.push(imgObj);
	},
	
	startRolling : function()
	{
		var isThis = this;
		if (this.timerId == null) this.timerId = window.setInterval(function () { isThis.changeView(); }, this.time);
	},
	
	stopRolling : function(rotate)
	{
		if (this.timerId != null)
		{			
			if (rotate) 
			{
				this.changeView(rotate);
			}
			//if (document.getElementById('tmp')) document.getElementById('tmp').innerHTML += this.rotate + " ";
			window.clearInterval(this.timerId);
			this.timerId = null;
		}
	},

	changeView : function(rotate)
	{
		if (rotate) this.rotate = rotate - 1;
		for (var i = 0; i < this.Obj.length; i++)
		{
			if (this.Obj[i]) this.Obj[i].style.display = "none";
			if (this.imgObj[i]) this.imgObj[i].src = this.imgObj[i].src.replace(/\_on.gif/g , '_off.gif');
		}
		if (this.Obj[this.rotate % this.Obj.length]) this.Obj[this.rotate % this.Obj.length].style.display = "block";
		if (this.imgObj[this.rotate % this.Obj.length]) this.imgObj[this.rotate % this.Obj.length].src = this.imgObj[this.rotate % this.Obj.length].src.replace(/\_off.gif/g , '_on.gif');

		//if (document.getElementById('tmp')) document.getElementById('tmp').innerHTML += this.rotate + " ";
		this.rotate = this.rotate % this.Obj.length;
		this.rotate++;
	}
};


var rolloverout = function()
{
	this.isSubString = "_on";
	this.pObj = null;
}

rolloverout.prototype = {
	roll : function(obj, event)
	{
		if (this.pObj)
		{
			for (var i = 0; i < this.pObj.children.length; i++)
			{
				var cObj = this.pObj.children[i];
				while (cObj.tagName != 'IMG')
				{
					cObj = cObj.children[0];
					if (cObj.tagName == 'IMG')
					{
						cObj.src = cObj.src.replace(this.isSubString + '.gif' , '.gif');
						break;
					}
				}
			}
		}

		if (event.type == 'mouseover')
		{
			obj.src = obj.src.replace(/\.gif/g , this.isSubString + '.gif');
		}
		else if (event.type == 'mouseout')
		{
			obj.src = obj.src.replace(/\_on.gif/g , '_off.gif');
		}
	}
};

var imageAutoRolling = function(canvasObj, imagesObj, createType)
{
	this.canvasObj = (typeof(contentsObj) == 'object') ? canvasObj : document.getElementById(canvasObj);
	this.imagesObj = (typeof(imagesObj) == 'object') ? imagesObj : document.getElementById(imagesObj);

	this.cNodes = [];

	this.contentsObj = document.createElement("DIV");
	this.contentsObj.style.width = this.canvasObj.offsetWidth;
	this.contentsObj.style.height = this.canvasObj.offsetHeight;
	this.contentsObj.style.overflow = "hidden";

	this.isCurrent = null;
	this.nextCurrent = null;
	this.timerId = null;

	this.direction = 9;
	this.moveSpeed = 20;
	this.oTimer = 3;
	this.timer = this.oTimer;
	this.stopTimer = 2000;

	if (!createType) this._create();
}

imageAutoRolling.prototype = 
{
	_create : function()
	{
		var isThis = this;
		for (var i in this.imagesObj.childNodes)
		{
			if (this.imagesObj.childNodes[i].nodeType != 1) continue;
			this.cNodes.push(this.imagesObj.childNodes[i]);
		}

		for (var i in this.cNodes)
		{
			if (this.cNodes[i].nodeType != 1) continue;
			this.contentsObj.appendChild(this.cNodes[i]);
		}
		this.canvasObj.appendChild(this.contentsObj);
		
		this.contentsObj.onmouseover = function () { window.clearTimeout(isThis.timerId); }
		this.contentsObj.onmouseout = function () { isThis.timerId = window.setTimeout(function () { isThis.movingContent(); },isThis.timer); }

		for (var i in this.contentsObj.childNodes)
		{
			if (this.contentsObj.childNodes[i].nodeType != 1) continue;
			this.contentsObj.childNodes[i].style.position = "absolute";

			if (i > 0) {
				if (this.direction == 3 || this.direction == 9) this.contentsObj.childNodes[i].style.left = parseInt(this.contentsObj.childNodes[i - 1].offsetLeft + this.contentsObj.childNodes[i - 1].offsetWidth) + "px";
				else if (this.direction == 12 || this.direction == 6) this.contentsObj.childNodes[i].style.top = parseInt(this.contentsObj.childNodes[i - 1].offsetTop + this.contentsObj.childNodes[i - 1].offsetHeight) + "px";
			}

			if (i == this.contentsObj.childNodes.length - 1)
			{
				if (this.direction == 3) this.contentsObj.childNodes[i].style.left = - parseInt(this.contentsObj.childNodes[i].offsetWidth) + "px";
				else if (this.direction == 6) this.contentsObj.childNodes[i].style.top = - parseInt(this.contentsObj.childNodes[i].offsetHeight) + "px";
			}
		}
	},

	movingContent : function()
	{
		if (this.contentsObj.hasChildNodes() == false) return;

		if (this.direction == 3) this.rightMoving();
		else if (this.direction == 9) this.leftMoving();
		else if (this.direction == 12) this.upMoving();
		else if (this.direction == 6) this.downMoving();
	},

	rightMoving : function()
	{
		var isThis = this;

		if (this.isCurrent == null) this.isCurrent = this.contentsObj.childNodes.length - 1;

		window.clearTimeout(this.timerId);

		for (var i in this.contentsObj.childNodes)
		{
			if (this.contentsObj.childNodes[i].nodeType != 1) continue;
			this.contentsObj.childNodes[i].style.left = parseInt(this.contentsObj.childNodes[i].offsetLeft + this.moveSpeed) + "px";
		}
		this.nextCurrent = (this.isCurrent - 1 < 0) ? this.contentsObj.childNodes.length - 1 : this.isCurrent - 1;

		if (this.contentsObj.childNodes[this.isCurrent].offsetLeft >= 0)
		{
			for (var i in this.contentsObj.childNodes)
			{
				if (this.contentsObj.childNodes[i].nodeType != 1) continue;
				this.contentsObj.childNodes[i].style.left = parseInt(this.contentsObj.childNodes[i].offsetLeft) - parseInt(this.contentsObj.childNodes[i].offsetLeft % this.contentsObj.childNodes[i].offsetWidth);
			}
			this.contentsObj.childNodes[this.nextCurrent].style.left = - parseInt(this.contentsObj.childNodes[this.nextCurrent].offsetWidth) + "px";
			this.isCurrent = (this.isCurrent - 1 < 0) ? this.contentsObj.childNodes.length - 1 : this.isCurrent - 1;
			this.timer = this.oTimer;

			this.timerId = window.setTimeout(function() {isThis.movingContent();}, this.stopTimer);
		}
		else
		{
			this.timer++;
			this.timerId = window.setTimeout(function() { isThis.movingContent();}, this.timer);
		}
	},

	leftMoving : function()
	{
		var isThis = this;
		if (this.isCurrent == null) this.isCurrent = 0;
		this.nextCurrent = (this.isCurrent + 1 >= this.contentsObj.childNodes.length) ? 0 : this.isCurrent + 1;

		var moveSpeed = this.moveSpeed;
		if (this.contentsObj.childNodes[this.nextCurrent].offsetLeft <= this.moveSpeed) moveSpeed = this.contentsObj.childNodes[this.nextCurrent].offsetLeft;

		window.clearTimeout(this.timerId);

		for (var i in this.contentsObj.childNodes)
		{
			if (this.contentsObj.childNodes[i].nodeType != 1) continue;
			this.contentsObj.childNodes[i].style.left = parseInt(this.contentsObj.childNodes[i].offsetLeft - moveSpeed) + "px";
		}

		if (parseInt(this.contentsObj.childNodes[this.nextCurrent].offsetLeft) <= 0)
		{
			var nextPosition = 0;
			for (var i in this.contentsObj.childNodes)
			{
				if (this.contentsObj.childNodes[i].nodeType != 1 || i == this.isCurrent) continue;
				nextPosition += parseInt(this.contentsObj.childNodes[i].offsetWidth);
			}
			this.contentsObj.childNodes[this.isCurrent].style.left = nextPosition + "px";

			this.isCurrent = (this.isCurrent + 1 >= this.contentsObj.childNodes.length) ? 0 : this.isCurrent + 1;
			this.timer = this.oTimer;
			this.timerId = window.setTimeout(function() {isThis.movingContent();}, this.stopTimer);
		}
		else
		{
			this.timer++;
			this.timerId = window.setTimeout(function() { isThis.movingContent();}, this.timer);
		}
	},

	upMoving : function()
	{
		var isThis = this;
		if (this.isCurrent == null) this.isCurrent = 0;	
		this.nextCurrent = (this.isCurrent + 1 >= this.contentsObj.childNodes.length) ? 0 : this.isCurrent + 1;

		var moveSpeed = this.moveSpeed;
		if (this.contentsObj.childNodes[this.nextCurrent].offsetTop <= this.moveSpeed) moveSpeed = this.contentsObj.childNodes[this.nextCurrent].offsetTop;

		window.clearTimeout(this.timerId);

		for (var i in this.contentsObj.childNodes)
		{
			if (this.contentsObj.childNodes[i].nodeType != 1) continue;
			this.contentsObj.childNodes[i].style.top = parseInt(this.contentsObj.childNodes[i].offsetTop - moveSpeed) + "px";
		}

		if (this.contentsObj.childNodes[this.nextCurrent].offsetTop <= 0)
		{
			var nextPosition = 0;
			for (var i in this.contentsObj.childNodes)
			{
				if (this.contentsObj.childNodes[i].nodeType != 1 || i == this.isCurrent) continue;
				nextPosition += parseInt(this.contentsObj.childNodes[i].offsetHeight);
			}
			this.contentsObj.childNodes[this.isCurrent].style.top = nextPosition + "px";

			this.isCurrent = (this.isCurrent + 1 >= this.contentsObj.childNodes.length ) ? 0 : this.isCurrent + 1;
			this.timer = this.oTimer;
			this.timerId = window.setTimeout(function() {isThis.movingContent();}, this.stopTimer);
		}
		else
		{
			this.timer++;
			this.timerId = window.setTimeout(function() { isThis.movingContent();}, this.timer);
		}
	},
	
	downMoving : function()
	{
	},

	setDirection : function(direction)
	{
		this.direction = (direction) ? direction : 3;
	}
}

var divExtendShowHide = function(viewObj, direction, pObj)
{
	this.viewObj = (typeof(viewObj) == 'object') ? viewObj : document.getElementById(viewObj);
	this.pObj = null;
	this.direction = (direction) ? direction : 3;
	this.oPosition = null;
	this.moveSpeed = 100;
	this.oTimer = 10;
	this.timerID = null;
	this.timer = this.oTimer;

	if (pObj)
	{
		this.pObj = (typeof(pObj) == 'object') ? pObj : document.getElementById(pObj);
	}

	this._create();
}

divExtendShowHide.prototype = 
{
	_create : function()
	{
		this.viewObj.style.display = "block";

		if (this.direction == 9)
		{
			this.oPosition = parseInt(this.viewObj.offsetWidth);
			this.viewObj.style.left = this.oPosition + "px";
		}
		else if (this.direction == 3)
		{
			this.oPosition = - parseInt(this.viewObj.offsetWidth);
			this.viewObj.style.left = this.oPosition + "px";
		}
		else if (this.direction == 12)
		{
			this.oPosition = parseInt(this.viewObj.offsetHeight);
			this.viewObj.style.top = this.oPosition + "px";
		}
		else if (this.direction == 6)
		{
			this.oPosition = - parseInt(this.viewObj.offsetHeight);
			this.viewObj.style.top = this.oPosition + "px";
		}

		if (this.pObj) this.viewObj.parentNode.parentNode.style.display = "none";

	},

	viewControl : function()
	{
		if (this.pObj)
		{
			this.viewObj.parentNode.parentNode.style.top = parseInt(this.pObj.offsetTop - 2) + 'px';
			this.viewObj.parentNode.parentNode.style.left = parseInt(this.pObj.offsetLeft + this.pObj.offsetWidth + 2) + 'px';
			this.viewObj.parentNode.parentNode.style.display = "block";

			/* ie 6¿¡¼­ style.position¹®Á¦ */
			if (navigator.appName == 'Microsoft Internet Explorer' && parseFloat(((/msie ([\d\.]+)/i).exec(navigator.userAgent))[1]) <= 6)
			{
				this.viewObj.parentNode.parentNode.style.position = 'absolute';
			}
			else
			{
				this.viewObj.parentNode.parentNode.style.position = 'fixed';
			}
		}

		if (parseInt(this.viewObj.style.left) == 0 || parseInt(this.viewObj.style.top) == 0)
		{
			this.hideContents();
		}
		else
		{
			this.viewContents();
		}
	},

	viewContents : function()
	{
		var isThis = this;

		if (this.direction == 3)
		{
			if (parseInt(this.viewObj.offsetLeft + this.moveSpeed) < 0)
			{
				this.viewObj.style.left = parseInt(this.viewObj.offsetLeft + this.moveSpeed) + "px";
				this.timerID = window.setTimeout(function() { isThis.viewContents();}, this.timer);
			}
			else
			{
				this.viewObj.style.left = "0px";
				window.clearTimeout(this.timerID);
			}
		}
		else if (this.direction == 9)
		{
			if (parseInt(this.viewObj.offsetLeft - this.moveSpeed) > 0)
			{
				this.viewObj.style.left = parseInt(this.viewObj.offsetLeft - this.moveSpeed) + "px";
				this.timerID = window.setTimeout(function() { isThis.viewContents();}, this.timer);
			}
			else
			{
				this.viewObj.style.left = "0px";
				window.clearTimeout(this.timerID);
			}
		}
		else if (this.direction == 12)
		{
			if (parseInt(this.viewObj.offsetTop - this.moveSpeed) > 0)
			{
				this.viewObj.style.top = parseInt(this.viewObj.offsetTop - this.moveSpeed) + "px";
				this.timerID = window.setTimeout(function() { isThis.viewContents();}, this.timer);
			}
			else
			{
				this.viewObj.style.top = "0px";
				window.clearTimeout(this.timerID);
			}
		}
		else if (this.direction == 6)
		{
			if (parseInt(this.viewObj.offsetTop + this.moveSpeed) < 0)
			{
				this.viewObj.style.top = parseInt(this.viewObj.offsetTop + this.moveSpeed) + "px";
				this.timerID = window.setTimeout(function() { isThis.viewContents();}, this.timer);
			}
			else
			{
				this.viewObj.style.top = "0px";
				window.clearTimeout(this.timerID);
			}
		}
	},
	
	hideContents : function()
	{
		var isThis = this;

		if (this.direction == 3)
		{
			if (parseInt(this.viewObj.offsetLeft - this.moveSpeed) > this.oPosition)
			{
				this.viewObj.style.left = parseInt(this.viewObj.offsetLeft - this.moveSpeed) + "px";
				this.timerID = window.setTimeout(function() { isThis.hideContents();}, this.timer);
			}
			else
			{
				this.viewObj.style.left = this.oPosition + "px";
				if (this.pObj) this.viewObj.parentNode.parentNode.style.display = "none";
				window.clearTimeout(this.timerID);
			}
		}
		else if (this.direction == 9)
		{
			if (parseInt(this.viewObj.offsetLeft + this.moveSpeed) < this.oPosition)
			{
				this.viewObj.style.left = parseInt(this.viewObj.offsetLeft + this.moveSpeed) + "px";
				this.timerID = window.setTimeout(function() { isThis.hideContents();}, this.timer);
			}
			else
			{
				this.viewObj.style.left = this.oPosition + "px";
				if (this.pObj) this.viewObj.parentNode.parentNode.style.display = "none";
				window.clearTimeout(this.timerID);
			}
		}
		else if (this.direction == 12)
		{
			if (parseInt(this.viewObj.offsetTop + this.moveSpeed) < this.oPosition)
			{
				this.viewObj.style.top = parseInt(this.viewObj.offsetTop + this.moveSpeed) + "px";
				this.timerID = window.setTimeout(function() { isThis.hideContents();}, this.timer);
			}
			else
			{
				this.viewObj.style.top = this.oPosition + "px";
				if (this.pObj) this.viewObj.parentNode.parentNode.style.display = "none";
				window.clearTimeout(this.timerID);
			}
		}
		else if (this.direction == 6)
		{
			if (parseInt(this.viewObj.offsetTop - this.moveSpeed) > this.oPosition)
			{
				this.viewObj.style.top = parseInt(this.viewObj.offsetTop - this.moveSpeed) + "px";
				this.timerID = window.setTimeout(function() { isThis.hideContents();}, this.timer);
			}
			else
			{
				this.viewObj.style.top = this.oPosition + "px";
				if (this.pObj) this.viewObj.parentNode.parentNode.style.display = "none";
				window.clearTimeout(this.timerID);
			}
		}
	}
}


/* js_rolling */
var js_rolling = function(this_s){
	// ½Ã°£´ÜÀ§´Â ms·Î 1000ÀÌ 1ÃÊ
	if(this_s.nodeType==1){
		this.this_s = this_s;
	}else{
		this.this_s = document.getElementById(this_s);
	}
	this.is_rolling = false;
	this.direction = 1; //1:top, 2:right, 3:bottom, 4:left (½Ã°è¹æÇâ) // 1¹ø°ú 4¹ø¸¸ µÊ
	this.children =	null;
	this.move_gap = 1;	//¿òÁ÷ÀÌ´Â ÇÈ¼¿´ÜÀ§
	this.time_dealy = 200; //¿òÁ÷ÀÌ´Â Å¸ÀÓµô·¹ÀÌ
	this.time_dealy_pause = 1000;//ÇÏ³ªÀÇ ´ë»óÀÌ »õ·Î ½ÃÀÛÇÒ ¶§ ¸ØÃß´Â ½Ã°£, 0 ÀÌ¸é Àû¿ë ¾ÈÇÔ
	this.time_timer=null;
	this.time_timer_pause=null;
	this.mouseover=false;
	this.init();
	this.set_direction(this.direction);
}
js_rolling.prototype.init = function(){
	this.this_s.style.position='relative';
	this.this_s.style.overflow='hidden';
	var children = this.this_s.childNodes;
	for(var i=(children.length-1);0<=i;i--){
		if(children[i].nodeType==1){
			children[i].style.position='relative';
		}else{
			this.this_s.removeChild(children[i]);
		}
	}
	var this_s=this;
	this.this_s.onmouseover=function(){
		this_s.mouseover=true;
		if(!this_s.time_timer_pause){
			this_s.pause();
		}
	}
	this.this_s.onmouseout=function(){
		this_s.mouseover=false;
		if(!this_s.time_timer_pause){
			this_s.resume();
		}
	}	
}
js_rolling.prototype.set_direction = function(direction){
	this.direction=direction;
	if(this.direction==2 ||this.direction==4){
		this.this_s.style.whiteSpace='nowrap';
	}else{
		this.this_s.style.whiteSpace='normal';
	}
	var children = this.this_s.childNodes;
	for(var i=(children.length-1);0<=i;i--){
			if(this.direction==1){
				children[i].style.display='block';
			}else if(this.direction==2){
				children[i].style.textlign='right';
				children[i].style.display='inline';
			}else if(this.direction==3){
				children[i].style.display='block';
			}else if(this.direction==4){
				children[i].style.display='inline';
			}
	}
	this.init_element_children();	
}
js_rolling.prototype.init_element_children = function(){
	var children = this.this_s.childNodes;
	this.children = children;
	for(var i=(children.length-1);0<=i;i--){
			if(this.direction==1){
				children[i].style.top='0px';
			}else if(this.direction==2){
				children[i].style.left='-'+this.this_s.firstChild.offsetWidth+'px';
			}else if(this.direction==3){
				children[i].style.top='-'+this.this_s.firstChild.offsetHeight+'px';
			}else if(this.direction==4){
				children[i].style.left='0px';
			}
	}
}
js_rolling.prototype.act_move_up = function(){
	for(var i = 0,m=this.children.length;i<m;i++){
		var child = this.children[i];
		child.style.top=(parseInt(child.style.top)-this.move_gap)+'px';
	}
	if((this.children[0].offsetHeight+parseInt(this.children[0].style.top))<=0){
		this.this_s.appendChild(this.children[0]);
		this.init_element_children();
		this.pause_act();		
	}
}
js_rolling.prototype.move_up = function(){
	if(this.direction!=1&&this.direction!=3){return false;}
	this.this_s.appendChild(this.children[0]);
	this.init_element_children();
	this.pause_act();	
}
js_rolling.prototype.act_move_down = function(){
	for(var i = 0,m=this.children.length;i<m;i++){
		var child = this.children[i];
		child.style.top=(parseInt(child.style.top)+this.move_gap)+'px';
	}
	if(parseInt(this.children[0].style.top)>=0){
		this.this_s.insertBefore(this.this_s.lastChild,this.this_s.firstChild);
		this.init_element_children();
		this.pause_act();	
	}
}
js_rolling.prototype.move_down = function(){
	if(this.direction!=1&&this.direction!=3){return false;}	
	this.this_s.insertBefore(this.this_s.lastChild,this.this_s.firstChild);
	this.init_element_children();
	this.pause_act();
}
js_rolling.prototype.act_move_left = function(){
	for(var i = 0,m=this.children.length;i<m;i++){
		var child = this.children[i];
		child.style.left=(parseInt(child.style.left)-this.move_gap)+'px';
	}
	if((this.children[0].offsetWidth+parseInt(this.children[0].style.left))<=0){
		this.this_s.appendChild(this.this_s.firstChild);
		this.init_element_children();
		this.pause_act();		
	}
}
js_rolling.prototype.move_left = function(){
	if(this.direction!=2&&this.direction!=4){return false;}		
	this.this_s.appendChild(this.this_s.firstChild);
	this.init_element_children();
	this.pause_act();		
}
js_rolling.prototype.act_move_right = function(){
	for(var i = 0,m=this.children.length;i<m;i++){
		var child = this.children[i];
		child.style.left=(parseInt(child.style.left)+this.move_gap)+'px';
	}
	
	if(parseInt(this.this_s.lastChild.style.left)>=0){
		this.this_s.insertBefore(this.this_s.lastChild,this.this_s.firstChild);
		this.init_element_children();
		this.pause_act();		
	}
}
js_rolling.prototype.move_right = function(){
	if(this.direction!=2&&this.direction!=4){return false;}			
	this.this_s.insertBefore(this.this_s.lastChild,this.this_s.firstChild);
	this.init_element_children();
	this.pause_act();
}
js_rolling.prototype.start = function(){ //·Ñ¸µ ½ÃÀÛ
	var this_s = this;
	this.stop();
	this.is_rolling = true;
	var act = function(){
		if(this_s.is_rolling){
			if(this_s.direction==1){this_s.act_move_up();}
			else if(this_s.direction==2){this_s.act_move_right();}
			else if(this_s.direction==3){this_s.act_move_down();}
			else if(this_s.direction==4){this_s.act_move_left();}
		}
	}
	this.time_timer = setInterval(act,this.time_dealy);
}
js_rolling.prototype.pause_act = function(){ //ÀÏ½Ã µ¿ÀÛ
	if(this.time_dealy_pause){
		var this_s = this;
		var act = function(){this_s.resume();this_s.time_timer_pause=null;}
		if(this.time_timer_pause){clearTimeout(this.time_timer_pause);}
		this.time_timer_pause = setTimeout(act,this.time_dealy_pause);
		this.pause();
	}
}
js_rolling.prototype.pause = function(){ //ÀÏ½Ã ¸ØÃã
	this.is_rolling = false;
}
js_rolling.prototype.resume = function(){ //ÀÏ½Ã ¸ØÃã ÇØÁ¦
	if(!this.mouseover){
		this.is_rolling = true;
	}
}
js_rolling.prototype.stop = function(){ //·Ñ¸µÀ» ³¡³¿
	this.is_rolling = false;
	if(!this.time_timer){
		clearInterval(this.time_timer);
	}
	this.time_timer = null
}
