﻿var MarketSlid = null;
var SeasonSlid = null;

function hideLayer(){
 event01.style.display = "none";
}

function ScriptMotionS(SeasonXml)
{
    
    /*추천 계절상품 모션 시작*/
    if (SeasonXml != null)
    {
        var SeasonBtn = document.getElementById("Season_Btn");      
        SeasonSlid = new BtnSlide_init(SeasonXml, "Season_Product", SeasonBtn, false, "current", "ModeTour/Season", "Image", "Path", 175, 149, 10, 10, 3, 6000);
        //버튼 생성
        for(var Ct=0; Ct < SeasonSlid.MotionXmlNode.length; Ct++)
        {
            with(SeasonBtn.appendChild(document.createElement("a")))
            {
                setAttribute("href","javascript:SeasonSlid.Change(" + Ct.toString() + ",SeasonSlid);");
                if (Ct == 0) className="current";
                
                with(appendChild(document.createElement("span")))
                {
                    innerText = (Ct+1).toString();
                }
            }
        }//end for  
        SeasonSlid.BtnObj = SeasonBtn.childNodes;
        SeasonSlid.MotionPreloadRange();
        SeasonSlid.Motion_play(SeasonSlid);    
    }
    /*추천 계절상품 모션 끝*/
    
    
//    /*하단 마케팅 배너 모션 시작*/
//    if (MarketXml != null)
//    {
//        var MarketBtn = document.getElementById("Market_Btn");      
//        MarketSlid = new BtnSlide_init(MarketXml, "Market", MarketBtn, false, "current", "ModeTour/Market", "Image", "Path", 175, 180, 10, 10, 3, 6000);
//        //버튼 생성
//        for(var Ct=0; Ct < MarketSlid.MotionXmlNode.length; Ct++)
//        {
//            with(MarketBtn.appendChild(document.createElement("a")))
//            {
//                setAttribute("href","javascript:MarketSlid.Change(" + Ct.toString() + ",MarketSlid);");
//                if (Ct == 0) className="current";
//                
//                with(appendChild(document.createElement("span")))
//                {
//                    innerText = (Ct+1).toString();
//                }
//            }
//        }//end for  
//        MarketSlid.BtnObj = MarketBtn.childNodes;
//        MarketSlid.MotionPreloadRange();
//        MarketSlid.Motion_play(MarketSlid);
//    }
    /*하단 마케팅 배너 모션 끝*/
}//end method

function ScriptMotionP(PhotoXml)
{

    /*포토팡팡 모션 시작*/
    if (PhotoXml != null)
    {
        var PhotoPPBtn = document.getElementById("PhotoPangPang_Btn").childNodes;
        var PhotoSlid = new BtnSlide_init(PhotoXml, "PhotoPangPang", PhotoPPBtn, true, "on", "ModeTour/Photo", "Image", "Path", 175, 131, 43, 32, 1, 5000);
        PhotoSlid.Motion_play(PhotoSlid);
    }
    /*포토팡팡 모션 끝*/
    
}//end method

//팝업2 - 위치 지정
function makeWin1(url, winname, width, height, scrollbars, xposition1, yposition1, ck) {

  xposition = 0; yposition = 0;
  if (parseInt(navigator.appVersion) >= 4) {
    xposition = (screen.width - width) / 2;
    yposition = (screen.height - height) / 2;
  }
  if (scrollbars == null) {
    scrollbars = '0';
  }
  args = "width=" + width + "," + "height=" + height + "," + "location=0," + "menubar=0," + "resizable=0,"
         + "scrollbars=" + scrollbars + "," + "status=0," + "titlebar=0," + "toolbar=0," + "hotkeys=0,"
   + "screenx=" + xposition + ","  //NN Only
   + "screeny=" + yposition + ","  //NN Only
   + "left=" + xposition1 + ","     //IE Only
   + "top=" + yposition1;           //IE Only

  newWin = window.open(url, winname, args, ck)
  newWin.focus();
}

  /* <![CDATA[ */
  function photo_roll() {
    // 배열 이름
    this.name = "photo";
    
    // 시작할 인덱스 값
    this.cur_idx = 1;
    // 마지막 인덱스 값
    this.last_idx;
    // 보여지는 인덱스 값
    this.show_idx = 1;
    // 이미지 쇼 타임(초)
    this.show_sec = 5;
    // 초 체킹값 체킹
    this.chk_cnt = 0;
    // 커서 위치시 flow 멈춤
    this.stop = false;

    // 시간텀을 두고 자동으로 이미지 체인지
    this.auto_flow = function() {
      if (this.stop != true) {
        if (this.chk_cnt + 1 == this.show_sec) {
          this.chk_cnt = 1;
          this.next_photo();
        }
        else {
          this.chk_cnt++;
        }
      }
      window.setTimeout(this.name + ".auto_flow();", 1000);
    }

    // flow 멈춤
    this.pause = function() {
      this.stop = true;
    }

    // flow 다시 시작
    this.resume = function() {
      this.stop = false;
    }

    // 다음 베스트 보기
    this.next_photo = function() {
      if (this.cur_idx == this.last_idx) {
        this.cur_idx = 1;
      }
      else {
        this.cur_idx++;
      }
      this.show_photo(this.cur_idx);
    }

    // 이전 베스트 보기
    this.prev_photo = function() {
      if (this.cur_idx == 1) {
        this.cur_idx = this.last_idx;
      }
      else {
        this.cur_idx--;
      }
      this.show_photo(this.cur_idx);
    }

    this.show_photo = function(idx) {
      // 기존의 보여지는 아이디 사라지게 하기
      var show_id = this.name + this.show_idx;
      show_obj = document.getElementById(show_id);
      show_obj.style.display = "none";

      // 새로 선택된 아이디 보이게 하기
      var div_id = this.name + idx;
      this.show_idx = idx;
      new_obj = document.getElementById(div_id);
      new_obj.style.display = "";

      // 초 체킹값 초기화
      this.chk_cnt = 1;
    }
  }

  
  
    function photo_roll_1() {
    // 배열 이름
    this.name = "photo_1";
    
    // 시작할 인덱스 값
    this.cur_idx = 1;
    // 마지막 인덱스 값
    this.last_idx;
    // 보여지는 인덱스 값
    this.show_idx = 1;
    // 이미지 쇼 타임(초)
    this.show_sec = 5;
    // 초 체킹값 체킹
    this.chk_cnt = 0;
    // 커서 위치시 flow 멈춤
    this.stop = false;

    // 시간텀을 두고 자동으로 이미지 체인지
    this.auto_flow = function() {
      if (this.stop != true) {
        if (this.chk_cnt + 1 == this.show_sec) {
          this.chk_cnt = 1;
          this.next_photo();
        }
        else {
          this.chk_cnt++;
        }
      }
      window.setTimeout(this.name + ".auto_flow();", 1000);
    }

    // flow 멈춤
    this.pause = function() {
      this.stop = true;
    }

    // flow 다시 시작
    this.resume = function() {
      this.stop = false;
    }

    // 다음 베스트 보기
    this.next_photo = function() {
      if (this.cur_idx == this.last_idx) {
        this.cur_idx = 1;
      }
      else {
        this.cur_idx++;
      }
      this.show_photo(this.cur_idx);
    }

    // 이전 베스트 보기
    this.prev_photo = function() {
      if (this.cur_idx == 1) {
        this.cur_idx = this.last_idx;
      }
      else {
        this.cur_idx--;
      }
      this.show_photo(this.cur_idx);
    }

    this.show_photo = function(idx) {

      // 기존의 보여지는 아이디 사라지게 하기
      var show_id = this.name + this.show_idx;
      show_obj = document.getElementById(show_id);
      //alert(this.name + this.show_idx);
      show_obj.style.display = "none";

      // 새로 선택된 아이디 보이게 하기
      var div_id = this.name + idx;
      this.show_idx = idx;
      new_obj = document.getElementById(div_id);
      new_obj.style.display = "";

      // 초 체킹값 초기화
      this.chk_cnt = 1;
    }
  }

      function photo_roll_2() {
    // 배열 이름
    this.name = "photo_2";
    
    // 시작할 인덱스 값
    this.cur_idx = 1;
    // 마지막 인덱스 값
    this.last_idx;
    // 보여지는 인덱스 값
    this.show_idx = 1;
    // 이미지 쇼 타임(초)
    this.show_sec = 5;
    // 초 체킹값 체킹
    this.chk_cnt = 0;
    // 커서 위치시 flow 멈춤
    this.stop = false;

    // 시간텀을 두고 자동으로 이미지 체인지
    this.auto_flow = function() {
      if (this.stop != true) {
        if (this.chk_cnt + 1 == this.show_sec) {
          this.chk_cnt = 1;
          this.next_photo();
        }
        else {
          this.chk_cnt++;
        }
      }
      window.setTimeout(this.name + ".auto_flow();", 1000);
    }

    // flow 멈춤
    this.pause = function() {
      this.stop = true;
    }

    // flow 다시 시작
    this.resume = function() {
      this.stop = false;
    }

    // 다음 베스트 보기
    this.next_photo = function() {
      if (this.cur_idx == this.last_idx) {
        this.cur_idx = 1;
      }
      else {
        this.cur_idx++;
      }
      this.show_photo(this.cur_idx);
    }

    // 이전 베스트 보기
    this.prev_photo = function() {
      if (this.cur_idx == 1) {
        this.cur_idx = this.last_idx;
      }
      else {
        this.cur_idx--;
      }
      this.show_photo(this.cur_idx);
    }

    this.show_photo = function(idx) {

      // 기존의 보여지는 아이디 사라지게 하기
      var show_id = this.name + this.show_idx;
      show_obj = document.getElementById(show_id);
      //alert(this.name + this.show_idx);
      show_obj.style.display = "none";

      // 새로 선택된 아이디 보이게 하기
      var div_id = this.name + idx;
      this.show_idx = idx;
      new_obj = document.getElementById(div_id);
      new_obj.style.display = "";

      // 초 체킹값 초기화
      this.chk_cnt = 1;
    }
  }

    function photo_roll_3() {
    // 배열 이름
    this.name = "photo_3";
    
    // 시작할 인덱스 값
    this.cur_idx = 1;
    // 마지막 인덱스 값
    this.last_idx;
    // 보여지는 인덱스 값
    this.show_idx = 1;
    // 이미지 쇼 타임(초)
    this.show_sec = 5;
    // 초 체킹값 체킹
    this.chk_cnt = 0;
    // 커서 위치시 flow 멈춤
    this.stop = false;

    // 시간텀을 두고 자동으로 이미지 체인지
    this.auto_flow = function() {
      if (this.stop != true) {
        if (this.chk_cnt + 1 == this.show_sec) {
          this.chk_cnt = 1;
          this.next_photo();
        }
        else {
          this.chk_cnt++;
        }
      }
      window.setTimeout(this.name + ".auto_flow();", 1000);
    }

    // flow 멈춤
    this.pause = function() {
      this.stop = true;
    }

    // flow 다시 시작
    this.resume = function() {
      this.stop = false;
    }

    // 다음 베스트 보기
    this.next_photo = function() {
      if (this.cur_idx == this.last_idx) {
        this.cur_idx = 1;
      }
      else {
        this.cur_idx++;
      }
      this.show_photo(this.cur_idx);
    }

    // 이전 베스트 보기
    this.prev_photo = function() {
      if (this.cur_idx == 1) {
        this.cur_idx = this.last_idx;
      }
      else {
        this.cur_idx--;
      }
      this.show_photo(this.cur_idx);
    }

    this.show_photo = function(idx) {

      // 기존의 보여지는 아이디 사라지게 하기
      var show_id = this.name + this.show_idx;
      show_obj = document.getElementById(show_id);
      //alert(this.name + this.show_idx);
      show_obj.style.display = "none";

      // 새로 선택된 아이디 보이게 하기
      var div_id = this.name + idx;
      this.show_idx = idx;
      new_obj = document.getElementById(div_id);
      new_obj.style.display = "";

      // 초 체킹값 초기화
      this.chk_cnt = 1;
    }
  }



  function best_roll() {
    // 배열 이름
    this.name = "best";
    // 시작할 인덱스 값
    this.cur_idx = 1;
    // 마지막 인덱스 값
    this.last_idx;
    // 보여지는 인덱스 값
    this.show_idx = 1;
    // 이미지 쇼 타임(초)
    this.show_sec = 5;
    // 초 체킹값 체킹
    this.chk_cnt = 0;
    // 커서 위치시 flow 멈춤
    this.stop = false;

    // 시간텀을 두고 자동으로 이미지 체인지
    this.auto_flow = function() {
      if (this.stop != true) {
        if (this.chk_cnt + 1 == this.show_sec) {
          this.chk_cnt = 1;
          this.next_best();
        }
        else {
          this.chk_cnt++;
        }
      }
      window.setTimeout(this.name + ".auto_flow();", 1000);
    }

    // flow 멈춤
    this.pause = function() {
      this.stop = true;
    }

    // flow 다시 시작
    this.resume = function() {
      this.stop = false;
    }

    // 다음 베스트 보기
    this.next_best = function() {
      if (this.cur_idx == this.last_idx) {
        this.cur_idx = 1;
      }
      else {
        this.cur_idx++;
      }
      this.show_best(this.cur_idx);
    }

    // 이전 베스트 보기
    this.prev_best = function() {
      if (this.cur_idx == 1) {
        this.cur_idx = this.last_idx;
      }
      else {
        this.cur_idx--;
      }
      this.show_best(this.cur_idx);
    }

    this.show_best = function(idx) {
      // 기존의 보여지는 아이디 사라지게 하기
      var show_id = this.name + this.show_idx;
      show_obj = document.getElementById(show_id);
      show_obj.style.display = "none";

      // 새로 선택된 아이디 보이게 하기
      var div_id = this.name + idx;
      this.show_idx = idx;
      new_obj = document.getElementById(div_id);
      new_obj.style.display = "";

      // 초 체킹값 초기화
      this.chk_cnt = 1;
    }
  }
  
  

  function Object_sroll(ObjName) {
    // 배열 이름
    this.name = ObjName;
    // 시작할 인덱스 값
    this.cur_idx = 1;
    // 마지막 인덱스 값
    this.last_idx;
    // 보여지는 인덱스 값
    this.show_idx = 1;
    // 이미지 쇼 타임(초)
    this.show_sec = 5;
    // 초 체킹값 체킹
    this.chk_cnt = 0;
    // 커서 위치시 flow 멈춤
    this.stop = false;

    // 시간텀을 두고 자동으로 D-DAY 체인지
    this.auto_flow = function() {
      var show_id = this.name + this.show_idx;
      if (document.getElementById(show_id) != null) {
        if (this.stop != true) {
          if (this.chk_cnt + 1 == this.show_sec) {
            this.chk_cnt = 1;
            this.next_Object();
          }
          else {
            this.chk_cnt++;
          }
        }
        window.setTimeout(this.name + ".auto_flow();", 500);
      }
    }

    // flow 멈춤
    this.pause = function() {
      this.stop = true;
    }

    // flow 다시 시작
    this.resume = function() {
      this.stop = false;
    }

    // 다음 보기
    this.next_Object = function() {
      if (this.cur_idx == this.last_idx) {
        this.cur_idx = 1;
      }
      else {
        this.cur_idx++;
      }
      this.show_Object(this.cur_idx);
    }

    // 이전 D-DAY 보기
    this.prev_Object = function() {
      if (this.cur_idx == 1) {
        this.cur_idx = this.last_idx;
      }
      else {
        this.cur_idx--;
      }
      this.show_Object(this.cur_idx);
    }

    this.show_Object = function(idx) {
      if (document.getElementById(this.name + idx) != null) {
        // 기존의 보여지는 아이디 사라지게 하기
        var show_id = this.name + this.show_idx;
        show_obj = document.getElementById(show_id);
        show_obj.style.display = "none";

        // 새로 선택된 아이디 보이게 하기
        var div_id = this.name + idx;
        this.show_idx = idx;
        new_obj = document.getElementById(div_id);
        new_obj.style.display = "";

        // 초 체킹값 초기화
        this.chk_cnt = 1;
      }
    }
  }   
  /* ]]> */

var MPMenuNum = 0;
function SwfProduct(Num,Gubun)
{
    var Obj = document.getElementById("MPMenu");
    Obj.childNodes[MPMenuNum].childNodes[0].childNodes[0].src = Replace(Obj.childNodes[MPMenuNum].childNodes[0].childNodes[0].src,"_on.","_off.");
    
    MPMenuNum=Num;
    Obj.childNodes[MPMenuNum].childNodes[0].childNodes[0].src = Replace(Obj.childNodes[MPMenuNum].childNodes[0].childNodes[0].src,"_off.","_on.");    
    
    MPswf.addVariable("xmlUrl", "http://xmlfile.modetour.com/XMLInclude/Banner/Modetour/Main/"+Gubun+"GoodsProduct.xml");
    MPswf.write('MiddleProductSWF');
}//end method


function tabToggle(obj,sel,obj1){ //탭 메뉴
		var getObject = document.getElementById(obj).getElementsByTagName('li');
		for(i=0; i<getObject.length;i++){
			getObject[i].getElementsByTagName('img')[0].src = getObject[i].getElementsByTagName('img')[0].src.replace('_on.gif','.gif');
			document.getElementById(obj1+'_'+i).style.display='none';
		}
			getObject[sel].getElementsByTagName('img')[0].src = getObject[sel].getElementsByTagName('img')[0].src.replace('.gif','_on.gif');
			document.getElementById(obj1+'_'+sel).style.display='block';
}

function tabToggle1(obj,sel,obj1){ //탭 메뉴
		var getObject = document.getElementById(obj).getElementsByTagName('li');
		for(i=0; i<getObject.length;i++){
			getObject[i].getElementsByTagName('img')[0].src = getObject[i].getElementsByTagName('img')[0].src.replace('_on.jpg','.jpg');
			document.getElementById(obj1+'_'+i).style.display='none';
		}
			getObject[sel].getElementsByTagName('img')[0].src = getObject[sel].getElementsByTagName('img')[0].src.replace('.jpg','_on.jpg');
			document.getElementById(obj1+'_'+sel).style.display='block';
}
	
	
function tabToggle_noli(obj,sel,obj1){ //탭 메뉴
	var getObject = document.getElementById(obj).getElementsByTagName('li');
	for(i=0; i<getObject.length;i++){
		getObject[i].getElementsByTagName('img')[0].src = getObject[i].getElementsByTagName('img')[0].src.replace('_on.jpg','.jpg');
		document.getElementById(obj1+'_'+i).style.display='none';
	}
		getObject[sel].getElementsByTagName('img')[0].src = getObject[sel].getElementsByTagName('img')[0].src.replace('.jpg','_on.jpg');
		document.getElementById(obj1+'_'+sel).style.display='block';
}

 
 function tabList(obj,sel,unit){
	for(i=0; i<unit;i++){
		document.getElementById(obj+'_'+i).style.display='none';
	}
	document.getElementById(obj+'_'+sel).style.display='block';
 }
 
 

	
