/* Sliding banner */
	timeID = new Array();
	function fnGoodsMove_Type1() {
	this.GoodsSetTime = null;
	this.BannerCurrent = 0;

	this.GoodsSetting = function() {
		this.ObjBox = document.getElementById(this.DivName);
		this.TotalBox = this.ObjBox.parentNode;
		this.PrevBtnLink = document.getElementById(this.PrevBtn);
		this.NextBtnLink = document.getElementById(this.NextBtn);
		this.ObjUl = this.ObjBox.getElementsByTagName("ul")[0];
		this.ObjLi = this.ObjUl.getElementsByTagName("li");
		this.ObjLiNum = this.ObjLi.length;
		this.TotalWidth = this.DateWidth * (this.ObjLiNum-1);

		this.ObjBox.style.width = this.TotalWidth + "px";

		if ( this.ObjLiNum % this.DateNum == 0 ) {
			this.BannerEnd = this.TotalWidth - ( this.DateWidth * this.DateNum *2);
		} else {
			this.BannerEnd = this.TotalWidth - this.DateWidth;
		}

		this.BannerPrevLeft = this.BannerEnd;
		this.BannerNextLeft = this.DateWidth * this.DateNum ;

		this.PrevBtnLink.href = "javascript:" + this.fnName +"._moveFrame(" + this.BannerPrevLeft + ",'prev')";
		this.NextBtnLink.href = "javascript:" + this.fnName +"._moveFrame(" + this.BannerNextLeft + ",'next')";

		this.GoodsSetTime = setTimeout( this.fnName + "._moveFrame('" + this.BannerNextLeft + "','next')" , 3000 );
	}

	this._moveFrame = function(val,fnmove) {
		clearTimeout(this.GoodsSetTime);

		this.TotalBox.fnName = this.fnName;
		this.TotalBox.BannerNextLeft = val;
		this.TotalBox.DateWidth = this.DateWidth;
		this.TotalBox.DateNum = this.DateNum;
		this.TotalBox.BannerEnd = this.BannerEnd;
		this.TotalBox.FlagNum = this.FlagNum;

		this.TotalBox.onmouseover = function()	{
			eval("if (timeID['" + this.fnName + "']) clearTimeout(timeID['" + this.fnName + "']);");
			eval( this.fnName + ".FlagNum = 1");
		}
		this.TotalBox.onmouseout = function()		{
			eval( this.fnName + ".FlagNum = 0");
			eval("timeID['" + this.fnName + "'] = setTimeout(\"" + this.fnName + "._moveFrame(" + this.BannerNextLeft + ",'next')\", 10)");
		}

		if ( this.FlagNum == 0 ) {
			if ( Math.abs(val - this.BannerCurrent) > 5 ) {
				this.BannerCurrent = this.BannerCurrent + ( val - this.BannerCurrent ) * this.Speed;
			} else {
				this.BannerCurrent = val;
			}

			this.ObjUl.style.left = ( -1 * this.BannerCurrent ) + "px";

			if ( this.BannerCurrent != val ) {
				this.GoodsSetTime = setTimeout(this.fnName + "._moveFrame(" + val + ",'" + fnmove + "')",10);
			} else {
				this.CurrentPicNum = this.BannerCurrent / this.DateWidth;

				this.BannerPrevLeft = this.BannerCurrent - ( this.DateWidth * this.DateNum );
				this.BannerNextLeft = this.BannerCurrent + ( this.DateWidth * this.DateNum );


				if ( this.BannerCurrent == 0 ) {
					this.BannerPrevLeft = this.BannerEnd;
				} else if ( this.BannerCurrent == this.BannerEnd ) {
					this.BannerNextLeft = 0;
				}
				this.PrevBtnLink.href = "javascript:" + this.fnName +"._moveFrame(" + this.BannerPrevLeft + ",'prev')";
				this.NextBtnLink.href = "javascript:" + this.fnName +"._moveFrame(" + this.BannerNextLeft + ",'next')";
			}

			this.GoodsSetTime = setTimeout( this.fnName + "._moveFrame('" + this.BannerNextLeft + "','next')" , 3000 );
		}
	}
}
