// JavaScript Document

function fnARolOver_Type1() {
	this.oTrue = null;
}

fnARolOver_Type1.prototype.GoodsSetting = function() {
	this.MenuBox = document.getElementById(this.MenuName);
	this.MenuLi = this.MenuBox.getElementsByTagName("ul")[0].getElementsByTagName("li");
	this.MenuTotal = this.MenuLi.length;
	this.CurrentGoodBox = 0;
	
	if ( this.RandomNum == 1 ) {
		this.RandomNumber = Math.floor(Math.random()*this.MenuTotal);
		
		if ( this.RandomNumber == this.MenuTotal ) {
			this.RandomNumber = this.RandomNumber - 1;
		}
		this.CurrentGoodBox = this.RandomNumber;
	}
	
	
	for ( var i=0; i<this.MenuTotal; i++) {
		this.MenuLink = this.MenuLi.item(i).getElementsByTagName("a")[0];
		this.MenuLinkBtn = this.MenuLink.getElementsByTagName("img")[0];
		if ( i == this.CurrentGoodBox ) {
			document.getElementById(this.DivName + i).style.display = "block";
			this.MenuLinkBtn.src = this.MenuLinkBtn.src.replace("_off.", "_on.");
		} else {
			document.getElementById(this.DivName + i).style.display = "none";
			this.MenuLinkBtn.src = this.MenuLinkBtn.src.replace("_on.", "_off.");
		}
		
		this.MenuLink.BtnNum = i;
		this.MenuLink.BtnBox = this.fnName;
		this.MenuLink.onclick = function() {
			eval( this.BtnBox +".fnMouseOver("+this.BtnNum+")");
			return false;
		}
	}
	
	if ( this.AutoNum == 1 ) {
		if ( this.CurrentGoodBox == this.MenuTotal - 1 ) {
			this.NextNum = 0;
		} else {
			this.NextNum = this.CurrentGoodBox + 1;
		}
		this.oTrue = setTimeout( this.fnName + ".fnMouseOver('" + this.NextNum + "')" , this.ScrollTime );
	}
	
}
fnARolOver_Type1.prototype.fnMouseOver = function(val) {
	val = parseInt(val);
	if ( this.AutoNum == 1 )  { clearTimeout(this.oTrue) }
	for ( var i=0; i<this.MenuTotal; i++) {
		this.MenuLink = this.MenuLi.item(i).getElementsByTagName("a")[0];
		this.MenuLinkBtn = this.MenuLink.getElementsByTagName("img")[0];
		if ( i == val ) {
			document.getElementById(this.DivName + i).style.display = "block";
			this.MenuLinkBtn.src = this.MenuLinkBtn.src.replace("_off.", "_on.");
		} else {
			document.getElementById(this.DivName + i).style.display = "none";
			this.MenuLinkBtn.src = this.MenuLinkBtn.src.replace("_on.", "_off.");
		}
	}
	if ( this.AutoNum == 1 ) {
		if ( val == this.MenuTotal - 1 ) {
			this.NextNum = 0;
		} else {
			this.NextNum = val + 1;
		}
		this.oTrue = setTimeout( this.fnName + ".fnMouseOver('" + this.NextNum + "')" , this.ScrollTime );
	}
}

// JavaScript Document

function fnARolOver_Type2() {
	this.oTrue = null;
}

fnARolOver_Type2.prototype.GoodsSetting = function() {
	this.MenuBox = document.getElementById(this.MenuName);
	this.MenuLi = this.MenuBox.getElementsByTagName("ol")[0].getElementsByTagName("li");
	this.MenuTotal = this.MenuLi.length;
	this.CurrentGoodBox = 0;
	
	if ( this.RandomNum == 1 ) {
		this.RandomNumber = Math.floor(Math.random()*this.MenuTotal);
		
		if ( this.RandomNumber == this.MenuTotal ) {
			this.RandomNumber = this.RandomNumber - 1;
		}
		this.CurrentGoodBox = this.RandomNumber;
	}
	
	
	for ( var i=0; i<this.MenuTotal; i++) {
		this.MenuLink = this.MenuLi.item(i).getElementsByTagName("a")[1];
		this.MenuLinkBtn = this.MenuLink.getElementsByTagName("img")[0];
		if ( i == this.CurrentGoodBox ) {
			document.getElementById(this.DivName + i).style.display = "block";
			this.MenuLinkBtn.src = this.MenuLinkBtn.src.replace("_off.", "_on.");
		} else {
			document.getElementById(this.DivName + i).style.display = "none";
			this.MenuLinkBtn.src = this.MenuLinkBtn.src.replace("_on.", "_off.");
		}
		
		this.MenuLink.BtnNum = i;
		this.MenuLink.BtnBox = this.fnName;
		this.MenuLink.onclick = function() {
			eval( this.BtnBox +".fnMouseOver("+this.BtnNum+")");
			return false;
		}
	}
	
	if ( this.AutoNum == 1 ) {
		if ( this.CurrentGoodBox == this.MenuTotal - 1 ) {
			this.NextNum = 0;
		} else {
			this.NextNum = this.CurrentGoodBox + 1;
		}
		this.oTrue = setTimeout( this.fnName + ".fnMouseOver('" + this.NextNum + "')" , this.ScrollTime );
	}
	
}
fnARolOver_Type2.prototype.fnMouseOver = function(val) {
	val = parseInt(val);
	if ( this.AutoNum == 1 )  { clearTimeout(this.oTrue) }
	for ( var i=0; i<this.MenuTotal; i++) {
		this.MenuLink = this.MenuLi.item(i).getElementsByTagName("a")[1];
		this.MenuLinkBtn = this.MenuLink.getElementsByTagName("img")[0];
		if ( i == val ) {
			document.getElementById(this.DivName + i).style.display = "block";
			this.MenuLinkBtn.src = this.MenuLinkBtn.src.replace("_off.", "_on.");
		} else {
			document.getElementById(this.DivName + i).style.display = "none";
			this.MenuLinkBtn.src = this.MenuLinkBtn.src.replace("_on.", "_off.");
		}
	}
	if ( this.AutoNum == 1 ) {
		if ( val == this.MenuTotal - 1 ) {
			this.NextNum = 0;
		} else {
			this.NextNum = val + 1;
		}
		this.oTrue = setTimeout( this.fnName + ".fnMouseOver('" + this.NextNum + "')" , this.ScrollTime );
	}
}

function fnRoll_Type1() {
	this.oTrue = null;
	
	this.FlagNum = 0;
	this.MenuImg = new Array();
	this.MenuImg["on"] = new Array();
	this.MenuImg["off"] = new Array();
	
	this.GoodsSetting = function() {
		this.MenuBox = DnUi.$(this.MenuName);
		this.TotalBox = this.MenuBox.parentNode;
		this.MenuLi = DnUi.$ThisTag(DnUi.$ThisTag(this.MenuBox,'ul',0),'li',-1);
		this.MenuTotal = this.MenuLi.length;
		
		this.CurrentGoodBox = 0;
		
		for (var i=0 ; i<this.MenuTotal; i++) {
			this.MenuImg["off"][i] = document.createElement("IMG");
			this.MenuImg["off"][i].src = this.MenuLi.item(i).getElementsByTagName("a")[0].getElementsByTagName("img")[0].src;
			this.MenuImg["on"][i] = document.createElement("IMG");
			this.MenuImg["on"][i].src = this.MenuLi.item(i).getElementsByTagName("a")[0].getElementsByTagName("img")[0].src.replace("_off.", "_on.");
		}
		
		if ( this.RandomNum == 1 ) {
			this.RandomNumber = DnUi.random(0,this.MenuTotal-1);
			this.CurrentGoodBox = this.RandomNumber;
		}
		
		for ( var i=0; i<this.MenuTotal; i++) {
			this.MenuLink = DnUi.$ThisTag(this.MenuLi.item(i),'a',0);
			this.MenuLinkBtn = DnUi.$ThisTag(this.MenuLink,'img',0);

			if ( i == this.CurrentGoodBox ) {
				DnUi.dispalyPre(DnUi.$(this.DivName + i),'block');
				this.MenuLinkBtn.src = this.MenuImg["on"][i].src
			} else {
				DnUi.dispalyPre(DnUi.$(this.DivName + i),'none');
				this.MenuLinkBtn.src = this.MenuImg["off"][i].src
			}
			this.MenuLink.BtnNum = i;
			this.MenuLink.BtnBox = this.fnName;
			this.MenuLink.onmouseover = function() {
				eval( this.BtnBox +".fnMouseOver("+this.BtnNum+")");
			}
		}
		
		this.fnAuto();
		
		if ( this.AutoNum == 1 ) {
			this.TotalBox.fnName = this.fnName;
			this.TotalBox.NextNum = this.NextNum;
			this.TotalBox.FlagNum = this.FlagNum;
			this.TotalBox.ScrollTime = this.ScrollTime;
			this.TotalBox.onmouseover = function()	{ 
				eval("if (DnUi.timeID['" + this.fnName + "']) clearTimeout(DnUi.timeID['" + this.fnName + "']);");
				eval( this.fnName + ".FlagNum = 1");
			}
			this.TotalBox.onmouseout = function()		{
				eval( this.fnName + ".FlagNum = 0");
				eval("DnUi.timeID['" + this.fnName + "'] = setTimeout('" + this.fnName + ".fnMouseOver("+ this.NextNum +")'," + this.ScrollTime + ");");
			}
		}
	}
	
	this.fnMouseOver = function(val) {
		
		if ( this.AutoNum == 1 ) {
			this.TotalBox.fnName = this.fnName;
			this.TotalBox.NextNum = this.NextNum;
			this.TotalBox.FlagNum = this.FlagNum;
			this.TotalBox.ScrollTime = this.ScrollTime;
			this.TotalBox.onmouseover = function()	{ 
				eval("if (DnUi.timeID['" + this.fnName + "']) clearTimeout(DnUi.timeID['" + this.fnName + "']);");
				eval( this.fnName + ".FlagNum = 1");
			}
			this.TotalBox.onmouseout = function()		{
				eval( this.fnName + ".FlagNum = 0");
				eval("DnUi.timeID['" + this.fnName + "'] = setTimeout('" + this.fnName + ".fnMouseOver("+ this.NextNum +")', " + this.ScrollTime + ");");
			}
			
			if ( this.FlagNum == 1 ) return;
		}
		
		val = parseInt(val);
		if ( this.AutoNum == 1 )  { clearTimeout(this.oTrue) }
		for ( var i=0; i<this.MenuTotal; i++) {
			this.MenuLink = DnUi.$ThisTag(this.MenuLi.item(i),'a',0);
			this.MenuLinkBtn = DnUi.$ThisTag(this.MenuLink,'img',0);
			if ( i == val ) {
				DnUi.dispalyPre(DnUi.$(this.DivName + i),'block');
				this.MenuLinkBtn.src = this.MenuImg["on"][i].src
			} else {
				DnUi.dispalyPre(DnUi.$(this.DivName + i),'none');
				this.MenuLinkBtn.src = this.MenuImg["off"][i].src
			}
		}
		this.fnAuto(val);
	}
	
	this.fnAuto = function(val) {
		if ( val == undefined) { this.ScrollNum = this.CurrentGoodBox } else { this.ScrollNum = val }
		if ( this.AutoNum == 1 ) {
			if ( this.ScrollNum == this.MenuTotal - 1 ) {
				this.NextNum = 0;
			} else {
				this.NextNum = this.ScrollNum + 1;
			}
			this.oTrue = setTimeout( this.fnName + ".fnMouseOver('" + this.NextNum + "')" , this.ScrollTime );
		}
	}
}

function fnBaChange(obj,num) {
	obj.style.backgroundPosition = "left " + num + "px";
}

function fnPgThumbnail() {
	this.MenuImg = new Array();
	this.MenuImg["pic"] = new Array();
	this.MenuLink = new Array();
	this.MenuDate = new Array();
	this.GoodsSetting = function() {
		this.Obj = document.getElementById(this.DivName);
		this.ObjBox = document.getElementById(this.MenuName);
		
		if ( this.ObjBox != null ) {
			this.ObjMenu = this.ObjBox.getElementsByTagName("ul")[0];
			if ( this.ObjMenu != undefined ) {
				this.ObjMenuList = this.ObjMenu.getElementsByTagName("li");
				this.ObjMenuTotal = this.ObjMenuList.length;
			
				if ( this.ObjMenuTotal != 0 ) {
					for ( var i=0; i<this.ObjMenuTotal; i++ ) {
						this.MenuImg["pic"][i] = document.createElement("img");
						this.MenuImg["pic"][i].src = this.ObjMenuList.item(i).getElementsByTagName("a")[0].getElementsByTagName("img")[0].src;
						this.MenuDate[i] = this.ObjMenuList.item(i).getElementsByTagName("span")[0].innerHTML;
						
						this.ThumbnailImg = this.ObjMenuList.item(i);
						this.ThumbnailLink = this.ThumbnailImg.getElementsByTagName("a")[0];
						
						this.MenuLink[i] = this.ThumbnailLink.href;
						
						this.ThumbnailLink.fnName = this.fnName;
						this.ThumbnailLink.i = i;
						this.ThumbnailLink.onmouseover = function()	{ eval(this.fnName + ".ThumbnailOver(" + this.i + ")") }
						
					}
				}
			}
		}
	}
	
	this.ThumbnailOver = function(val) {
		this.Obj.getElementsByTagName("a")[0].href = this.MenuLink[val]
		this.Obj.getElementsByTagName("a")[0].getElementsByTagName("img")[0].src = this.MenuImg["pic"][val].src;
		document.getElementById(this.TiName).innerHTML = this.MenuDate[val];
	}
}

function fnSearchBest() {
	this.oTrue = null;
}

fnSearchBest.prototype.GoodsSetting = function() {
	this.MenuBox = document.getElementById(this.MenuName);
	this.MenuLi = this.MenuBox.getElementsByTagName("ul")[0].getElementsByTagName("li");
	this.MenuTotal = this.MenuLi.length;
	this.CurrentGoodBox = 0;
	
	if (this.CurrentNum == undefined) {
		if ( this.RandomNum == 1 ) {
			this.RandomNumber = Math.floor(Math.random()*this.MenuTotal);
			
			if ( this.RandomNumber == this.MenuTotal ) {
				this.RandomNumber = this.RandomNumber - 1;
			}
			this.CurrentGoodBox = this.RandomNumber;
		}
	} else {
		this.CurrentGoodBox = this.CurrentNum;
	}
	
	
	for ( var i=0; i<this.MenuTotal; i++) {
		this.MenuLink = this.MenuLi.item(i).getElementsByTagName("a")[0];
		this.MenuLinkBtn = this.MenuLink.getElementsByTagName("img")[0];
		if ( i == this.CurrentGoodBox ) {
			document.getElementById(this.DivName + i).style.display = "block";
			this.MenuLinkBtn.src = this.MenuLinkBtn.src.replace("_off.", "_on.");
		} else {
			document.getElementById(this.DivName + i).style.display = "none";
			this.MenuLinkBtn.src = this.MenuLinkBtn.src.replace("_on.", "_off.");
		}
		
		this.MenuLink.BtnNum = i;
		this.MenuLink.BtnBox = this.fnName;
		this.MenuLink.onclick = function() {
			eval( this.BtnBox +".fnMouseOver("+this.BtnNum+")");
			return false;
		}
	}
	
	if ( this.AutoNum == 1 ) {
		if ( this.CurrentGoodBox == this.MenuTotal - 1 ) {
			this.NextNum = 0;
		} else {
			this.NextNum = this.CurrentGoodBox + 1;
		}
		this.oTrue = setTimeout( this.fnName + ".fnMouseOver('" + this.NextNum + "')" , this.ScrollTime );
	}
	
}
fnSearchBest.prototype.fnMouseOver = function(val) {
	val = parseInt(val);
	if ( this.AutoNum == 1 )  { clearTimeout(this.oTrue) }
	for ( var i=0; i<this.MenuTotal; i++) {
		this.MenuLink = this.MenuLi.item(i).getElementsByTagName("a")[0];
		this.MenuLinkBtn = this.MenuLink.getElementsByTagName("img")[0];
		if ( i == val ) {
			document.getElementById(this.DivName + i).style.display = "block";
			this.MenuLinkBtn.src = this.MenuLinkBtn.src.replace("_off.", "_on.");
		} else {
			document.getElementById(this.DivName + i).style.display = "none";
			this.MenuLinkBtn.src = this.MenuLinkBtn.src.replace("_on.", "_off.");
		}
	}
	if ( this.AutoNum == 1 ) {
		if ( val == this.MenuTotal - 1 ) {
			this.NextNum = 0;
		} else {
			this.NextNum = val + 1;
		}
		this.oTrue = setTimeout( this.fnName + ".fnMouseOver('" + this.NextNum + "')" , this.ScrollTime );
	}
}

// MyDock ¿ÀÇÂ °ü·Ã ÇÔ¼ö
function fnMyDock(val) {
	var objWrap = document.getElementById('DnshopMainWrap');
	var objMyDock = document.getElementById('MyDock');
	var objOpen = document.getElementById('MyDockOpen');
	var objClose = document.getElementById('MyDockClose');
	
	if ( val == "open" ) {
		var dockUrl = "/front/mydock?cmd=list&Sid=MYST_A0010400_01_02"
		document.cookie = "mdopen=default;path=/;";
		objWrap.style.marginLeft = DnUi.MyDockOpenWidth + "px";
		objMyDock.style.width = DnUi.MyDockOpenWidth + "px";
		objOpen.style.display = "block";
		objClose.style.display = "none";
		if(document.getElementById("insertDock").src=="")
			document.getElementById("insertDock").src="/front/mydock?cmd=list&Sid=MYST_A0010400_01_02";
//		thisMovie('MyDockFlashBox2').openEventFlash();
	} else {
		document.cookie = "mdopen=;path=/;expires=-1;";
		mydockCloseEvent();
		objWrap.style.marginLeft = DnUi.MyDockCloseWidth + "px";
		objMyDock.style.width = DnUi.MyDockCloseWidth + "px";
		objOpen.style.display = "none";
		objClose.style.display = "block";
	}
	try{
		ShowMain.showPos();
	}catch(e){
//		alert("error : " +e);
	}
}


function fnShowMain() {
	var ScrollNum = 4;
	var ScrollSpeed = 0.3;
	var CurrentScroll = 0;	
	this.SetTimeID1 = null;
	
	this.show = function(val) {
		this.showPos(val);
	}
	
	this.showPos = function(val) {
		if ( navigator.appVersion.indexOf("MSIE 6.0") != -1 ) {
			var BodyWidth = document.documentElement.offsetWidth - 21;
		} else {
			var BodyWidth = document.documentElement.offsetWidth;
		}
		if ( document.getElementById('MyDockClose').style.display == "block" || document.getElementById('MyDockClose').style.display == undefined || document.getElementById('MyDockClose').style.display == "" ) {
			var MyDockWidth = DnUi.MyDockCloseWidth;
		} else {
			var MyDockWidth = DnUi.MyDockOpenWidth;
		}
		
		if ( val != undefined ) {
			CurrentScroll = val;
		}
		
		var ScrollWidth = BodyWidth - MyDockWidth;

		if ( ScrollWidth < 988 ) {
			ScrollWidth = 988;
		}
		
		var current = ScrollWidth;
		
		for ( var i=0; i<ScrollNum; i++ ) {
			if ( i == CurrentScroll ) {
				document.getElementById('DnshopTopWrap_' + i + "_Step2").style.width = ScrollWidth + "px";
				document.getElementById('DnshopTopWrap_' + i + "_Step1").style.width = document.getElementById('DnshopTopWrap_' + i).style.width = current + "px";
				document.getElementById('DnshopTopWrap_' + i).style.left = 0 + "px";
				document.getElementById('DnshopTopWrap_' + i + "_Step2").style.right = 0 + "px";
			} else {
				document.getElementById('DnshopTopWrap_' + i + "_Step2").style.width = ScrollWidth + "px";
				document.getElementById('DnshopTopWrap_' + i + "_Step1").style.width = document.getElementById('DnshopTopWrap_' + i).style.width = (ScrollWidth-current) + "px";
				document.getElementById('DnshopTopWrap_' + i).style.display = "none";
				document.getElementById('DnshopTopWrap_' + i).style.right = 0 + "px";
				document.getElementById('DnshopTopWrap_' + i + "_Step2").style.left = 0 + "px";
			}
		}
		
		document.getElementById('DnshopTopScrollBox').style.width = ScrollWidth + "px";
		
		if ( CurrentScroll == 0 ) {
			PrevScorll = ScrollNum - 1;
			NextScroll = CurrentScroll + 1;
		} else if ( CurrentScroll == ScrollNum - 1) {
			PrevScorll = CurrentScroll - 1;
			NextScroll = 0;
		} else  {
			PrevScorll = CurrentScroll - 1;
			NextScroll = CurrentScroll + 1;
		}
		
		document.getElementById('ShowPrev').onmouseover = function() {
			if ( navigator.appName.indexOf("Explorer") != -1 ) { this.style.filter="Alpha(opacity=100)" } else { this.style.opacity= 1 }
		}
		document.getElementById('ShowPrev').onmouseout = function() {
			if ( navigator.appName.indexOf("Explorer") != -1 ) { this.style.filter="Alpha(opacity=20)" } else { this.style.opacity= 0.2 }
		}
		
		document.getElementById('ShowNext').onmouseover = function() {
			if ( navigator.appName.indexOf("Explorer") != -1 ) { this.style.filter="Alpha(opacity=100)" } else { this.style.opacity= 1 }
		}
		document.getElementById('ShowNext').onmouseout = function() {
			if ( navigator.appName.indexOf("Explorer") != -1 ) { this.style.filter="Alpha(opacity=20)" } else { this.style.opacity= 0.2 }
		}
		
		document.getElementById('ShowPrev').href = "javascript:ShowMain.showView(" + CurrentScroll + "," + PrevScorll + "," + ScrollWidth + ",'prev')";
		document.getElementById('ShowNext').href = "javascript:ShowMain.showView(" + CurrentScroll + "," + NextScroll + "," + ScrollWidth + ",'next')";
	}
	
	this.showView = function(currentNum, targetNum, defautwidth,movePosi) {
		document.getElementById('ShowPrev').href = document.getElementById('ShowNext').href ="#";
		document.getElementById('DnshopTopWrap_' + targetNum).style.display = "block";
		
		this.TempWidth = 0;
		
		this.showViewMove(currentNum,targetNum,defautwidth,movePosi);
	}
	
	this.showViewMove = function(currentNum,targetNum,defautwidth,movePosi) {
		this.TempWidth = this.TempWidth + ( defautwidth - this.TempWidth ) * ScrollSpeed;

		var targetDivStep1 = document.getElementById('DnshopTopWrap_' + targetNum + "_Step1");
		var targetDivStep2 = document.getElementById('DnshopTopWrap_' + targetNum + "_Step2");
		
		var currentDivStep1 = document.getElementById('DnshopTopWrap_' + currentNum + "_Step1");
		var currentDivStep2 = document.getElementById('DnshopTopWrap_' + currentNum + "_Step2");
		
		if ( movePosi == "next" ) {
			targetDivStep2.style.width = defautwidth + "px";
			targetDivStep1.style.width = document.getElementById('DnshopTopWrap_' + targetNum).style.width = this.TempWidth + "px";
			document.getElementById('DnshopTopWrap_' + targetNum).style.right = targetDivStep2.style.left = 0 + "px";
			document.getElementById('DnshopTopWrap_' + targetNum).style.left = targetDivStep2.style.right = null;
			
			currentDivStep2.style.width = defautwidth + "px";
			currentDivStep1.style.width = document.getElementById('DnshopTopWrap_' + currentNum).style.width = (defautwidth-this.TempWidth) + "px";
			document.getElementById('DnshopTopWrap_' + currentNum).style.left = currentDivStep2.style.right = 0 + "px";
			document.getElementById('DnshopTopWrap_' + currentNum).style.right = currentDivStep2.style.left = null;
		} else if ( movePosi == "prev" ) {
			targetDivStep2.style.width = defautwidth + "px";
			targetDivStep1.style.width = document.getElementById('DnshopTopWrap_' + targetNum).style.width = this.TempWidth + "px";
			document.getElementById('DnshopTopWrap_' + targetNum).style.left = targetDivStep2.style.right = 0 + "px";
			document.getElementById('DnshopTopWrap_' + targetNum).style.right = targetDivStep2.style.left = null;
			
			currentDivStep2.style.width = defautwidth + "px";
			currentDivStep1.style.width = document.getElementById('DnshopTopWrap_' + currentNum).style.width = (defautwidth-this.TempWidth) + "px";
			document.getElementById('DnshopTopWrap_' + currentNum).style.right = currentDivStep2.style.left = 0 + "px";
			document.getElementById('DnshopTopWrap_' + currentNum).style.left = currentDivStep2.style.right = null;
		}
		
		
		if ( Math.abs(defautwidth - this.TempWidth) < 5 )	{
			if ( movePosi == "next" ) {
				targetDivStep2.style.width = defautwidth + "px";
				targetDivStep1.style.width = document.getElementById('DnshopTopWrap_' + targetNum).style.width = defautwidth + "px";
				document.getElementById('DnshopTopWrap_' + targetNum).style.right = targetDivStep2.style.left = 0 + "px";
				
				currentDivStep2.style.width = defautwidth + "px";
				currentDivStep1.style.width = document.getElementById('DnshopTopWrap_' + currentNum).style.width = 0 + "px";
				document.getElementById('DnshopTopWrap_' + currentNum).style.left = currentDivStep2.style.right = 0 + "px";
			} else if ( movePosi == "prev" ) {
				targetDivStep2.style.width = defautwidth + "px";
				targetDivStep1.style.width = document.getElementById('DnshopTopWrap_' + targetNum).style.width = defautwidth + "px";
				document.getElementById('DnshopTopWrap_' + targetNum).style.left = targetDivStep2.style.right = 0 + "px";
				
				currentDivStep2.style.width = defautwidth + "px";
				currentDivStep1.style.width = document.getElementById('DnshopTopWrap_' + currentNum).style.width = 0 + "px";
				document.getElementById('DnshopTopWrap_' + currentNum).style.right = currentDivStep2.style.left = 0 + "px";
			}
			
			document.getElementById('DnshopTopWrap_' + currentNum).style.display = "none";
			
			CurrentScroll = targetNum;
			
			if ( CurrentScroll == 0 ) {
				PrevScorll = ScrollNum - 1;
				NextScroll = CurrentScroll + 1;
			} else if ( CurrentScroll == ScrollNum - 1) {
				PrevScorll = CurrentScroll - 1;
				NextScroll = 0;
			} else  {
				PrevScorll = CurrentScroll - 1;
				NextScroll = CurrentScroll + 1;
			}
			
			document.getElementById('ShowPrev').href = "javascript:ShowMain.showView(" + CurrentScroll + "," + PrevScorll + "," + defautwidth + ",'prev')";
			document.getElementById('ShowNext').href = "javascript:ShowMain.showView(" + CurrentScroll + "," + NextScroll + "," + defautwidth + ",'next')";
			
		} else {
			this.SetTimeID1 = setTimeout( "ShowMain.showViewMove(" + currentNum + "," + targetNum + "," + defautwidth + ",'" + movePosi + "')",20);
		}
	}
}


function fnLayerInfo(obj) {
	var objDiv = document.getElementById(obj);

	if ( objDiv.style.display == "none" || objDiv.style.display == undefined || objDiv.style.display == "" ) {
		objDiv.style.display = "block";
	} else {
		objDiv.style.display = "none";
	}
}

function fnSearchList() {
	this.GoodsSetting = function() {
		this.MenuBox = document.getElementById(this.DivName);
		this.BarBox = document.getElementById(this.BarName);
		
		this.BarLink = this.BarBox.getElementsByTagName("a")[0];
		this.BarLinkImg = this.BarLink.getElementsByTagName("img")[0];
		
		this.BarLink.fnName = this.fnName;
		this.BarLink.onclick = function() {
			eval( this.fnName + ".BarShowClick()");
			return false;
		}
	}
	this.BarShowClick = function() {
		this.MenuBox.style.height = ( this.firstHeight * this.firstLine ) + "px";
		this.BarLink.onclick = function() {
			eval( this.fnName + ".BarHiddenClick()");
			return false;
		}
		this.BarLinkImg.src = this.BarLinkImg.src.replace("_open.", "_close.");
		this.BarLinkImg.alt = "´Ý±â";
	}
	this.BarHiddenClick = function() {
		this.MenuBox.style.height = this.firstHeight + "px";
		this.BarLink.onclick = function() {
			eval( this.fnName + ".BarShowClick()");
			return false;
		}
		this.BarLinkImg.src = this.BarLinkImg.src.replace("_close.", "_open.");
		this.BarLinkImg.alt = "ÆîÃÄº¸±â";
	}
}

function themeShop(objectID, groupNo, itemNo) {
	var theme = document.getElementById(objectID), view = null, list = null, items = null;
	var defaultGroupNo = 0, itemCount = 3, random = Math.round(Math.random() * 100000), childs = null, selectedList = null;

	if (!theme) return;

	childs = theme.getElementsByTagName("DIV");
	view = (childs[0] ? childs[0].getElementsByTagName("IMG") : null);
	list = (childs[1] ? childs[1].getElementsByTagName("UL") : null);

	if (!view || !list) return;

    var curDate = new Date();
	var sec = curDate.getSeconds() + 1;
    var defaultGroupNo = (curDate.getSeconds() + 1) % 3;
	window.themeGroupNo = defaultGroupNo;


	if (!(isNaN(groupNo) || typeof(groupNo) == "undefined")) {
		groupNo = parseInt(groupNo + "");

		if (groupNo < 0) groupNo = list.length - 1;
		if (groupNo >= list.length) groupNo = 0;

		window.themeGroupNo = groupNo;
		selectedList = list[groupNo];

		for (var a=0 ; a<list.length ; a++) list[a].style.display = (a == groupNo ? "block" : "none");

		if (isNaN(itemNo) || typeof(itemNo) == "undefined") itemNo = (random % itemCount) * 2 + 1;

		if (!(isNaN(itemNo) || typeof(itemNo) == "undefined")) {
			itemNo = parseInt(itemNo + "");
			childs = selectedList.getElementsByTagName("IMG");

			for (var a=0 ; a<view.length ; a++) view[a].style.display = "none";

			for (var b=0 ; b<childs.length ; b = b + 2) {
				childs[b].style.display = "none";
				childs[b+1].style.display = "block";

				if ((b + 1) == itemNo) {
					view[(groupNo * itemCount) + (b / 2)].style.display = "block";
					childs[b].style.display = "block";
					childs[b+1].style.display = "none";
				}
			}
		}

		return;
	}

	for (var a=0 ; a<list.length ; a++) {
		list[a].style.display = (a == defaultGroupNo ? "block" : "none");
		childs = list[a].getElementsByTagName("IMG");

		for (var b=1 ; b<childs.length ; b = b + 2) {
			childs[b].setAttribute("themeID", objectID);
			childs[b].setAttribute("groupNo", a + "");
			childs[b].setAttribute("itemNo", b + "");

			childs[b].onmouseover = function () { themeShop(this.getAttribute("themeID"), this.getAttribute("groupNo"), this.getAttribute("itemNo")); }
		}
	}

	themeShop(objectID, defaultGroupNo);
}