﻿
/* Tab Content */
function TabMenu(tabID) {
	var tabbox = document.getElementById(tabID);
	var tabAnchor = tabbox.getElementsByTagName("a");
	var i = 0;

	for(i=0; i<tabAnchor.length; i++) {
		if (tabAnchor.item(i).className == "tab")
			thismenu = tabAnchor.item(i);
		else
			continue;

		thismenu.container = tabbox;
		thismenu.targetEl = document.getElementById(tabAnchor.item(i).href.split("#")[1]);
		thismenu.targetEl.style.display = "none";
		thismenu.imgEl = thismenu.getElementsByTagName("img").item(0);
		thismenu.spanVal = thismenu.getElementsByTagName("span").item(0);
		thismenu.onclick = function tabMenuClick() {
			currentmenu = this.container.current;
			if (currentmenu == this)
				return false;

			if (currentmenu) {
				currentmenu.targetEl.style.display = "none";

				if (currentmenu.imgEl) {
					currentmenu.imgEl.src = currentmenu.imgEl.src.replace("_on.gif", ".gif");
					currentmenu.spanVal.style.color = "#989898";
				} else {
					currentmenu.className = currentmenu.className.replace(" on", "");

				}
			}
			this.targetEl.style.display = "";
			if (this.imgEl) {
				this.imgEl.src = this.imgEl.src.replace(".gif", "_on.gif");
				this.spanVal.style.color = "#d40059";

			} else {
				this.className += " on";

			}
			this.container.current = this;

			return false;
		};

		if (!thismenu.container.first)
			thismenu.container.first = thismenu;
	}
	if (tabbox.first)
		tabbox.first.onclick();
}

/* Tab Content2 */
function initTabMenu(tabContainerID) {
	var tabContainer = document.getElementById(tabContainerID);
	var tabAnchor = tabContainer.getElementsByTagName("a");
	var i = 0;

	for(i=0; i<tabAnchor.length; i++) {
		if (tabAnchor.item(i).className == "tab")
			thismenu = tabAnchor.item(i);
		else
			continue;

		thismenu.container = tabContainer;
		thismenu.targetEl = document.getElementById(tabAnchor.item(i).href.split("#")[1]);
		thismenu.targetEl.style.display = "none";
		thismenu.imgEl = thismenu.getElementsByTagName("img").item(0);
		thismenu.onclick = function tabMenuClick() {
			currentmenu = this.container.current;
			if (currentmenu == this)
				return false;

			if (currentmenu) {
				currentmenu.targetEl.style.display = "none";
				if (currentmenu.imgEl) {
					currentmenu.imgEl.src = currentmenu.imgEl.src.replace("_on.gif", ".gif");
				} else {
					currentmenu.className = currentmenu.className.replace(" on", "");
				}
			}
			this.targetEl.style.display = "";
			if (this.imgEl) {
				this.imgEl.src = this.imgEl.src.replace(".gif", "_on.gif");
			} else {
				this.className += " on";
			}
			this.container.current = this;

			return false;
		};

		if (!thismenu.container.first)
			thismenu.container.first = thismenu;
	}
	if (tabContainer.first)
		tabContainer.first.onclick();
}

/* Tab Content3 */
function TabMenu3(tabID) {
	var tabbox = document.getElementById(tabID);
	var tabAnchor = tabbox.getElementsByTagName("a");
	var i = 0;

	for(i=0; i<tabAnchor.length; i++) {
		if (tabAnchor.item(i).className == "tab")
			thismenu = tabAnchor.item(i);
		else
			continue;

		thismenu.container = tabbox;
		thismenu.targetEl = document.getElementById(tabAnchor.item(i).href.split("#")[1]);
		thismenu.targetEl.style.display = "none";
		thismenu.imgEl = thismenu.getElementsByTagName("img").item(0);
		thismenu.spanVal = thismenu.getElementsByTagName("span").item(0);
		thismenu.onclick = function tabMenuClick() {
			currentmenu = this.container.current;
			if (currentmenu == this)
				return false;

			if (currentmenu) {
				currentmenu.targetEl.style.display = "none";

				if (currentmenu.imgEl) {
					currentmenu.imgEl.src = currentmenu.imgEl.src.replace(".gif", ".gif");
					currentmenu.spanVal.style.color = "#989898";
				} else {
					currentmenu.className = currentmenu.className.replace("", "");

				}
			}
			this.targetEl.style.display = "";
			if (this.imgEl) {
				this.imgEl.src = this.imgEl.src.replace(".gif", ".gif");
				this.spanVal.style.color = "#d40059";

			} else {
				this.className += "";

			}
			this.container.current = this;

			return false;
		};

		if (!thismenu.container.first)
			thismenu.container.first = thismenu;
	}
	if (tabbox.first)
		tabbox.first.onclick();
}

/* Tab png */
function pngTabMenu(tabContainerID) {
	var tabContainer = document.getElementById(tabContainerID);
	var tabAnchor = tabContainer.getElementsByTagName("a");
	var i = 0;

	for(i=0; i<tabAnchor.length; i++) {
		if (tabAnchor.item(i).className == "tab")
			thismenu = tabAnchor.item(i);
		else
			continue;

		thismenu.container = tabContainer;
		thismenu.targetEl = document.getElementById(tabAnchor.item(i).href.split("#")[1]);
		thismenu.targetEl.style.display = "none";
		thismenu.imgEl = thismenu.getElementsByTagName("img").item(0);
		thismenu.onclick = function tabMenuClick() {
			currentmenu = this.container.current;
			if (currentmenu == this)
				return false;

			if (currentmenu) {
				currentmenu.targetEl.style.display = "none";
				if (currentmenu.imgEl) {
					currentmenu.imgEl.src = currentmenu.imgEl.src.replace("_on.png", ".png");
				} else {
					currentmenu.className = currentmenu.className.replace(" on", "");
				}
			}
			this.targetEl.style.display = "";
			if (this.imgEl) {
				this.imgEl.src = this.imgEl.src.replace(".png", "_on.png");
			} else {
				this.className += " on";
			}
			this.container.current = this;

			return false;
		};

		if (!thismenu.container.first)
			thismenu.container.first = thismenu;
	}
	if (tabContainer.first)
		tabContainer.first.onclick();
}


/*海胶飘 扁裙傈 徘*/
function bg_TabMenu(tabContainerID) {
	var tabContainer = document.getElementById(tabContainerID);
	var tabAnchor = tabContainer.getElementsByTagName("a");
	var i = 0;

	for(i=0; i<tabAnchor.length; i++) {
		if (tabAnchor.item(i).className == "tab")
			thismenu = tabAnchor.item(i);
		else
			continue;

		thismenu.container = tabContainer;
		thismenu.targetEl = document.getElementById(tabAnchor.item(i).href.split("#")[1]);
		thismenu.targetEl.style.display = "none";
		thismenu.imgEl = thismenu.getElementsByTagName("img").item(0);
		thismenu.onmouseover = function tabMenuClick() {
			currentmenu = this.container.current;
			if (currentmenu == this)
				return false;

			if (currentmenu) {
				currentmenu.targetEl.style.display = "none";
				if (currentmenu.imgEl) {
					currentmenu.imgEl.src = currentmenu.imgEl.src.replace(".gif", ".gif");
				} else {
					currentmenu.className = currentmenu.className.replace(" on", "");
				}
			}
			this.targetEl.style.display = "";
			if (this.imgEl) {
				this.imgEl.src = this.imgEl.src.replace(".gif", ".gif");
			} else {
				this.className += " on";
			}
			this.container.current = this;

			return false;
		};

		if (!thismenu.container.first)
			thismenu.container.first = thismenu;
	}
	if (tabContainer.first)
		tabContainer.first.onclick();
}

var tabToggleRolling = new Array();
function tabToggle(obj,tab,img,tnum,roll) {
	if(tab=='random'){
		var rnum = Math.floor(Math.random() * tnum) + 1;
		tab = rnum;
	}
	if(tab=='rolling'){
		tabToggleRolling[roll] = (!tabToggleRolling[roll])?1:tabToggleRolling[roll]+1;
		if(tabToggleRolling[roll]>tnum) tabToggleRolling[roll] = 1;
		tab = tabToggleRolling[roll];
	}
	if(tnum=='rolling'){
		tabToggleRolling[roll] = tab;
		tab = tabToggleRolling[roll];
	}
	var tab_list = document.getElementById(obj).getElementsByTagName('li');
	for(i=1;i<=tab_list.length;i++){
		(tab==i)?tab_list[i-1].className='on':tab_list[i-1].className='';
		document.getElementById(obj+'_'+i).style.display = (tab==i)?'':'none';
		if(img){
			var imgEl=tab_list[i-1].getElementsByTagName("img").item(0);
			imgEl.src = (tab==i)? imgEl.src.replace("off.gif", "on.gif"):imgEl.src.replace("on.gif", "off.gif");
		}
	}
}
function tabToggleRoll(type,obj,tab,img,tnum,roll){
	eval("(type=='start')? ctr"+roll+" = setInterval(\"tabToggle('"+obj+"','"+tab+"','"+img+"','"+tnum+"','"+roll+"')\",2000) : clearTimeout(ctr"+roll+");");
}
/*海胶飘 扁裙傈 徘*/

/* 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;

		this.ObjBox.style.width = this.TotalWidth + "px";

		if ( this.ObjLiNum % this.DateNum == 0 ) {
			this.BannerEnd = this.TotalWidth - ( this.DateWidth * this.DateNum *4);
		} else {
			this.BannerEnd = this.TotalWidth - this.DateWidth;
		}

		if(this.ObjLiNum > 4 ){
		   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 );
		  }else{
		   this.PrevBtnLink.href = "javascript:;";
		   this.NextBtnLink.href = "javascript:;";
		  }
	}

	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 );
		}
	}
}

function fnGoodsMove_Type2() {
	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.TotalHeight = this.DateHeight * this.ObjLiNum;

		this.ObjBox.style.height = this.TotalHeight + "px";

		if ( this.ObjLiNum % this.DateNum == 0 ) {
			this.BannerEnd = this.TotalHeight - ( this.DateHeight * this.DateNum *3); //硅呈 焊捞绰 俺荐
		} else {
			this.BannerEnd = this.TotalHeight - this.DateHeight;
		}

		if(this.ObjLiNum > 3 ){
		   this.BannerPrevLeft = this.BannerEnd;
		   this.BannerNextLeft = this.DateHeight * 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 );
		  }else{
		   this.PrevBtnLink.href = "javascript:;";
		   this.NextBtnLink.href = "javascript:;";
		  }
	}

	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.top = ( -1 * this.BannerCurrent ) + "px";

			if ( this.BannerCurrent != val ) {
				this.GoodsSetTime = setTimeout(this.fnName + "._moveFrame(" + val + ",'" + fnmove + "')",10);
			} else {
				this.CurrentPicNum = this.BannerCurrent / this.DateHeight;

				this.BannerPrevLeft = this.BannerCurrent - ( this.DateHeight * this.DateNum );
				this.BannerNextLeft = this.BannerCurrent + ( this.DateHeight * 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 );
		}
	}
}
function fnGoodsMove_Type3() {
	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.TotalHeight = this.DateHeight * this.ObjLiNum;

		this.ObjBox.style.height = this.TotalHeight + "px";
		
		if ( this.ObjLiNum % this.DateNum == 0 ) {
			this.BannerEnd = this.TotalHeight - ( this.DateHeight * this.DateNum *1); //硅呈 焊捞绰 俺荐
		} else {
			this.BannerEnd = this.TotalHeight - this.DateHeight;
		}

		
		if(this.ObjLiNum > 1 ){
			this.BannerPrevLeft = this.BannerEnd;
			this.BannerNextLeft = this.DateHeight * 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 );
			}else{
			this.PrevBtnLink.href = "javascript:;";
			this.NextBtnLink.href = "javascript:;";
		}
	}

	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.top = ( -1 * this.BannerCurrent ) + "px";

			if ( this.BannerCurrent != val ) {
				this.GoodsSetTime = setTimeout(this.fnName + "._moveFrame(" + val + ",'" + fnmove + "')",10);
			} else {
				this.CurrentPicNum = this.BannerCurrent / this.DateHeight;

				this.BannerPrevLeft = this.BannerCurrent - ( this.DateHeight * this.DateNum );
				this.BannerNextLeft = this.BannerCurrent + ( this.DateHeight * 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 );
		}
	}
}


	function fnGoodsMove_Type4() {
	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;

		this.ObjBox.style.width = this.TotalWidth + "px";

		if ( this.ObjLiNum % this.DateNum == 0 ) {
			this.BannerEnd = this.TotalWidth - ( this.DateWidth * this.DateNum *4);
		} else {
			this.BannerEnd = this.TotalWidth - this.DateWidth;
		}

		if(this.ObjLiNum > 4 ){
			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 );
			}else{
			this.PrevBtnLink.href = "javascript:;";
			this.NextBtnLink.href = "javascript:;";
		}
	}

	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 );
		}
	}
}


function fnGoodsMove_Type5() {
	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;

		this.ObjBox.style.width = this.TotalWidth + "px";

		if ( this.ObjLiNum % this.DateNum == 0 ) {
			this.BannerEnd = this.TotalWidth - ( this.DateWidth * this.DateNum *5);
		} else {
			this.BannerEnd = this.TotalWidth - this.DateWidth;
		}

		if(this.ObjLiNum > 5 ){
			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 );
			}else{
			this.PrevBtnLink.href = "javascript:;";
			this.NextBtnLink.href = "javascript:;";
		}
	}

	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 );
		}
	}
}


