function flashMovie(fid,src,wid,hei,fvs,wmd) {
  this.fPrint = '';
  this.Id = document.getElementById(fid);
  this.Src = src;
  this.Width = wid;
  this.Height = hei;
  this.FlashVars = (fvs != undefined)? fvs :'';
  this.Wmod = (wmd != undefined)? wmd :'';
  if(isObject(Id)) {

	fPrint = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="'+Width+'" height="'+Height+'" id="wisa_'+fid+'">';
    fPrint += '<param name="movie" value="'+Src+'">';
	fPrint += '<param name="allowScriptAccess" value="always" />';
	fPrint += '<param name="allowFullScreen" value="false" />';
    fPrint += '<param name="quality" value="high">';
    fPrint += (FlashVars != null) ? '<param name="FlashVars" value="'+FlashVars+'">' : '';
    fPrint += (Wmod != null) ? '<param name="wmode" value="'+Wmod+'">' : '';
    fPrint += '<embed';
    fPrint += ' src="'+Src+'"';
    fPrint += (FlashVars != null) ? ' FlashVars="'+FlashVars+'"' : '';
    fPrint += (Wmod != null) ? ' wmode="'+Wmod+'"' : '';
    fPrint += ' quality="high"';
	fPrint += ' allowScriptAccess="always"';
	fPrint += ' allowFullScreen="false"';
    fPrint += ' pluginspage="http://www.macromedia.com/go/getflashplayer"';
    fPrint += ' type="application/x-shockwave-flash" ';
    fPrint += ' width="'+Width+'"';
    fPrint += ' height="'+Height+'"';
    fPrint += '></embed>';
    fPrint += '</object>';
    Id.innerHTML = fPrint;
  }
}


//IE PNG use
function setPng24(obj) { 
      var browser = navigator.appName;
      var version = parseFloat(navigator.appVersion.replace (/^.*MSIE ([.0-9]+).*$/,"$1"));

      if(browser.indexOf("Internet Explorer") && version < 7.0 ) { // IE6 이하에서만 동작 2008-03-14 by zardsama
            obj.width=obj.height=1; 
            obj.className=obj.className.replace(/\bpng24\b/i,''); 
            obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');" 
            obj.src='';  
            return ''; 
      }
}

var flashLink=new Array();
	flashLink["btn_logo"]="/"; //로고
	flashLink["btn_favorite"]="javascript:window.external.AddFavorite('http://www.babirolen.com/','바비로렌에 오신걸 환영합니다')";//즐겨찾기
	flashLink["atfy_btn"]="/html/newpage.html?code=10";//And think for you

	flashLink["btn_community"]="/html/newpage.html?code=9";//커뮤니티
	flashLink["btn_qna"]="/board/board.html?code=babirolen";//Q&A

	flashLink["btn_bestItem"]="";//Best Item

	flashLink["category_00"]="/shop/shopbrand.html?xcode=019&type=O"; //Babi make
	flashLink["category_01"]="/shop/shopbrand.html?xcode=018&type=O"; //Cody sale
	flashLink["category_02"]="/shop/shopbrand.html?xcode=012&type=O"; //Tee & Blouse
	flashLink["category_03"]="/shop/shopbrand.html?xcode=013&type=O"; //Knit & Cardigan
	flashLink["category_04"]="/shop/shopbrand.html?xcode=014&type=O"; //Coat & Jacket
	flashLink["category_05"]="/shop/shopbrand.html?xcode=015&type=O"; //One-piece
	flashLink["category_06"]="/shop/shopbrand.html?xcode=016&type=O"; //Skirt & Pants
	flashLink["category_07"]="/shop/shopbrand.html?xcode=017&type=O"; //Shoes & Bag
	flashLink["category_08"]="/shop/shopbrand.html?xcode=028&type=X"; //Etc
	flashLink["category_09"]="/shop/shopbrand.html?xcode=021&type=O"; //Sale
	flashLink["category_10"]="/shop/shopbrand.html?xcode=027&type=O"; //For you


	flashLink["btn_diary"]="/board/board.html?code=babirolen_board8"; //다이어리
	flashLink["btn_guide"]="/board/board.html?code=babirolen_board6"; //가이드
	flashLink["btn_receive"]="/board/board.html?code=babirolen_board5"; //미확인입금자
	flashLink["btn_freemarket"]="/board/board.html?code=babirolen_image4"; //프리마켓
	flashLink["btn_event"]="/board/board.html?code=babirolen_board12"; //이벤트
	flashLink["btn_member"]="/board/board.html?code=babirolen_board6&page=1&type=v&num1=099996&num2=00000&lock=N"; //멤버쉽
	flashLink["btn_magazine"]="/board/board.html?code=babirolen_board14"; //매거진
	flashLink["btn_notice"]="/board/board.html?code=babirolen_board3"; //공지사항


	
	flashLink["btn_mypage_00"]="JavaScript:clickcoupon();"; //할인쿠폰
	flashLink["btn_mypage_01"]="JavaScript:clickreserve()"; //직립금조회
	flashLink["btn_mypage_02"]="JavaScript:userexit()"; //회원탈퇴
	flashLink["btn_mypage_03"]="/shop/mypage.html"; //주문조회
	flashLink["btn_mypage_04"]="/shop/idinfo.html"; //회원정보변경
	flashLink["btn_mypage_05"]="/shop/basket.html"; //소망상자


function goFlash(n){
	/*alert(n);*/
	if (n == "btn_samsung" || n == "communityBtn_07" ) 
	{
		window.open(flashLink[n],'new','resizable=yes  width=503 height=931 scrollbars=yes');
	}
	else if (flashLink[n]) {location.href=flashLink[n];}//{alert(n);}
}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//  ▒   bookmarksite
//
//**************************************************************************************************************
//
//  Usage) 즐겨찾기
//         -  위사몰 관리자의 쇼핑몰관리 - 대표도메인 설정 - 대표도메인, 
//            위사몰 관리자의 쇼핑몰관리 - 타이틀메타검색 - 웹브라우저 타이틀이 내용으로 들어감
//
//  Example)
//      <img src="이미지경로" alt="즐겨찾기" onclick="addBookmark()">
//
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function addBookmark() {
	var url = root_url;
    var title = document.title;

    if (window.sidebar) {// firefox
        window.sidebar.addPanel(title, url, ""); 
    }

    else if(window.opera && window.print) {// opera
        var elem = document.createElement('a');
        elem.setAttribute('href',url);
        elem.setAttribute('title',title);
        elem.setAttribute('rel','sidebar');
        elem.click();
    }

    else if(window.external) {// IE
        window.external.AddFavorite(url, title);
    }
}


function clickcoupon() {
	window.open("about:blank","coupon","width=598,height=630,scrollbars=yes");
	document.coupon.submit();
}

function clickreserve() {
	window.open("about:blank","reserve","width=610,height=500,scrollbars=yes");
	document.reserve.submit();
}

function userexit(){
   if(confirm('회원탈퇴를 하시겠습니까?'))
      location.href="/shop/mypage.html?type=exit";
}


function pop_escrow(bank, height, width) {
var url;
	if (bank == 'woori') {
		url = 'http://esc.wooribank.com/esc/cmmn/in/web2c001_06p.jsp?condition=www.babirolen.com';
		add = ', scrollbars = no';
	} else if (bank == 'kookmin') {
		url = 'http://ibn1.kbstar.com/quics?page=A010563&cc=a002346:a052857&mHValue=betty760';
		add = ', scrollbars = no';
	} else if (bank == 'hana') {
		url = 'http://www.hanaescrow.com/hnbecc/serviceJoinSrchManagement/escser003l.jsp?shopBsnNo=2041357537&afflGrpId=GMKSHOPNBS&afflShopNo=betty760';
		add = ', scrollbars = yes';
	}
	window.open(url, 'escrow', 'height=' + height + ',width=' + width + add);
}