
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://fpdownload.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="scale" value="noscale">';
        fPrint += '<param name="allowScriptAccess" value="always">';
        fPrint += '<param name="allowFullScreen" value="true">';
        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 += fPrint + ' src="'+Src+'"';
        fPrint += (FlashVars != null) ? ' FlashVars="'+FlashVars+'"' : '';
        fPrint += (Wmod != null) ? ' wmode="'+Wmod+'"' : '';
        fPrint += ' quality="high"';
        fPrint += ' scale="noscale"';
        fPrint += ' allowScriptAccess="always"';
        fPrint += ' allowFullScreen="true"';
        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;
	  }
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//  ¢Æ   goFlash
//
//**************************************************************************************************************
//
//  Usage) ÇÃ·¡½Ã ¸µÅ© ÀÚ¹Ù½ºÅ©¸³Æ® ¿¬µ¿
//
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
var flashLink=new Array();
flashLink['btn_logo']="/";
flashLink['btn_favorite']="javascript:addBookmark();";
flashLink['top_menu_00']="/member/login.php";//·Î±×ÀÎ
flashLink['top_menu_01']="/main/exec.php?exec_file=member/logout.exe.php";//·Î±×¾Æ¿ô
flashLink['top_menu_02']="/member/join_step1.php";//È¸¿ø°¡ÀÔ
flashLink['top_menu_03']="/member/edit_step1.php";//Á¤º¸¼öÁ¤
flashLink['top_menu_04']="/shop/cart.php";//Àå¹Ù±¸´Ï
flashLink['top_menu_05']="/mypage/order_list.php";//ÁÖ¹®Á¶È¸
flashLink['top_menu_06']="/mypage/wish_list.php";//¼Ò¸Á»óÀÚ
flashLink['top_menu_07']="/mypage/mypage.php";//¸¶ÀÌ¼îÇÎ

flashLink['shop_menu_00']="/shop/big_section.php?cno1=1011";//¿¥¹ö
flashLink['shop_menu_01']="/shop/big_section.php?cno1=1019";//¾Æ´ÏÄ«
flashLink['shop_menu_02']="/shop/big_section.php?cno1=2034";//¿¥¹öÇ»¾î
flashLink['shop_menu_03']="/shop/big_section.php?cno1=2035";//¿¥¹ö½ºÄð
flashLink['shop_menu_04']="/shop/big_section.php?cno1=1020";//ÇÇÄ¡¾ØÅ©¸²
flashLink['shop_menu_05']="/shop/big_section.php?cno1=1013";//¸Þ¸®Á¦ÀÎ

flashLink['custom_menu_00']="/shop/big_section.php?cno1=1009";//Sale 20%
flashLink['custom_menu_01']="/shop/product_qna_list.php";//°í°´¼¾ÅÍ
flashLink['custom_menu_02']="/content/content.php?cont=bullet";//ÃÑ¾Ë¹è¼Û
flashLink['custom_menu_03']="/board/?db=diary";//°­ÀÛ°¡ÀÇ ÇÏ·ç
flashLink['custom_menu_04']="/board/?db=event";//ÀÌº¥Æ®
//flashLink['custom_menu_04']="/shop/bank_name.php";//¹ÌÈ®ÀÎÀÔ±ÝÀÚ

flashLink['left_menu_00']="/shop/big_section.php?cno1=1001";//ÀÚÄÏÀá¹Ù
flashLink['left_menu_01']="/shop/big_section.php?cno1=1002";//»óÀÇ
flashLink['left_menu_02']="/shop/big_section.php?cno1=1003";//¿øÇÇ½º
flashLink['left_menu_03']="/shop/big_section.php?cno1=1004";//½ºÄ¿Æ®ÆÒÃ÷
flashLink['left_menu_04']="/shop/big_section.php?cno1=1006";//½Å¹ß°¡¹æ
flashLink['left_menu_05']="/shop/big_section.php?cno1=1005";//¾Ç¼¼¼­¸®
flashLink['left_menu_06']="/shop/big_section.php?cno1=1009";//¼¼ÀÏ
flashLink['left_menu_07']="/shop/big_section.php?cno1=1010";//°³ÀÎ°áÁ¦
//flashLink['left_menu_07']="/shop/person_paymeny.php";//°³ÀÎ°áÁ¦
flashLink['left_menu_08']="/shop/big_section.php?cno1=2040";//¼±¹°Æ÷Àå
flashLink['left_menu_09']="/shop/big_section.php?cno1=2041";//¹Ùµð½ÃÅ©¸´
flashLink['left_menu_10']="/shop/big_section.php?cno1=2042";//¿¥¹öÆÒ½Ã
flashLink['left_menu_11']="/shop/big_section.php?cno1=2048";//¿ì¸®¾Æµé
flashLink['left_menu_12']="/shop/big_section.php?cno1=2049";//
flashLink['left_menu_13']="/shop/big_section.php?cno1=2050";//only weekend

flashLink['btn_shopping']="javascript:addCart(document.prdFrm,1);";//Àå¹Ù±¸´Ï´ã±â

flashLink['myPage_btn_00']="/mypage/mypage.php";
flashLink['myPage_btn_01']="/mypage/order_list.php";
flashLink['myPage_btn_02']="/mypage/milage.php";
flashLink['myPage_btn_03']="/mypage/emoney.php";
flashLink['myPage_btn_04']="/mypage/coupon_down_list.php";
flashLink['myPage_btn_05']="/mypage/counsel_list.php";
flashLink['myPage_btn_06']="/mypage/my_qna_list.php";
flashLink['myPage_btn_07']="/member/edit_step1.php";
flashLink['myPage_btn_08']="/content/content.php?cont=coupon_list";

flashLink['eventFull_btn']="/board/?db=event";
flashLink['btn_board']="/shop/product_qna_list.php";


function goFlash(n){
    //alert(n);
    if(flashLink[n]) location.href=flashLink[n];
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//  ¢Æ   bookmarksite
//
//**************************************************************************************************************
//
//  Usage) Áñ°ÜÃ£±â
//
//  Example)
//      <img src="ÀÌ¹ÌÁö" alt="" title="" onclick="addBookmark()">
//      -  À§»ç¸ôÀÇ °æ¿ì 
//         °°ÀÌ phpº¯¼ö¿Í ÇÔ²² »ç¿ë°¡´É
//
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
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(document.all) // IE
    window.external.AddFavorite(url, title);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//  ¢Æ   imgOver
//
//**************************************************************************************************************
//
//  Example)
//      <img src="/_image/common/ÀÌ¹ÌÁö.jpg" alt="" title="" onmouseover="imgOver(this)" onmouseout="imgOver(this,'out')">
//
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function imgOver(imgEl,opt) {
    var src = imgEl.getAttribute('src');
    var ftype = src.substring(src.lastIndexOf('.'), src.length);
    
    if (opt == 'out') imgEl.src = imgEl.src.replace("_o"+ftype, ftype);
    else imgEl.src = imgEl.src.replace(ftype, "_o"+ftype);
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//  ¢Æ   setPng24
//
//**************************************************************************************************************
//
//  Usage) IE 7 ÀÌÇÏ¿¡¼­ png24 ÀÇ ¾ËÆÄÃ¤³Î Áö¿ø
//
//  Example)
//      <img src="ÀÌ¹ÌÁö" alt="" title="" class="png24">
//      -  css ÆÄÀÏ¶Ç´Â ¹®¼­³»¿¡ .png24{tmp:expression(setPng24(this));} °¡ ÁöÁ¤µÇÀÖ¾î¾ß »ç¿ë°¡´É
//
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
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 ''; 
      }
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//  ¢Æ   eaChg(
//
//**************************************************************************************************************
//
//  Usage) input text ¼ýÀÚ up & down
//
//  Example)
//      <img src="¾÷" alt="" title="" onclick="eaChg(f,pm)">
//      <img src="´Ù¿î" alt="" title="" onclick="eaChg(f,pm)">
//
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function eaChg(f,pm){
    if (pm == 1) {
        f.buy_ea.value++;
    }else {
        if (f.buy_ea.value <= 1) return;
        f.buy_ea.value--;
    }
}

var ZPVpno = "";
var mix_option;
function zoomPopView(pno) {
        ZPVpno = pno;

        if (!pno) {
            ZPVclose();
            return;
        }

        var bg = document.createElement("DIV");
        bg.id = "ZPVlayer";
        bg.style.zIndex = "100";
        bg.style.width = document.body.scrollWidth;
        bg.style.height = document.body.scrollHeight;
        bg.style.backgroundColor = "#c7ad86";
        bg.style.position = "absolute";
        bg.style.left = 0;
        bg.style.top = 0;
        bg.style.filter = "Alpha(opacity=40)";
        bg.style.opacity ="0.4";
        bg.onclick = function () { zoomPopView(); }
        document.body.appendChild(bg);

		var zm = document.createElement("DIV");
        zm.id = "ZPVprd";
        zm.style.position = "absolute";
        zm.innerHTML = getHttpRequest(root_url+'/shop/detail.php?pno='+pno+'&detail=mini');
        document.body.appendChild(zm); 

		var mx = document.getElementById("mix_option_dynamic");
		mx = mx.innerHTML.split("¢¸¢º");
		mix_option = new Array();
		for (var key in mx )	{
			arr = mx[key].split("¢·¢¹");
			mix_option[arr[0]] = arr[1];
		}

        zm.style.left = ((document.body.scrollWidth / 2) + document.body.scrollLeft - (zm.offsetWidth/2))+"px";
        zm.style.top = ((document.body.clientHeight / 2) + document.body.scrollTop - (zm.offsetHeight/2))+"px";
        zm.style.zIndex = "101";

        document.body.onmousewheel = function() { return false;}
}

function ZPVclose() {
    var bg = document.getElementById("ZPVlayer");
    var prd = document.getElementById("ZPVprd");
    if (bg) document.body.removeChild(bg);
    if (prd) document.body.removeChild(prd);

    document.body.onmousewheel = null;
}


////////////////////////////////////////////////////////////////////////////////////////////
//
//  ¢Æ   R2Slider 1.0
//
//  - 2008-03-20 by zardsama
//
//***************************************************************************************
//
//  Usage)
//      var º¯¼ö¸í = new R2Slider("·¹ÀÌ¾î ID","º¯¼ö¸í", ¼Óµµ, »ó´Ü¸¶Áø, DTD);
//      º¯¼ö¸í.slide();
//      -  ¼Óµµ, »ó´Ü¸¶ÁøÀº »ý·« °¡´É / ÃßÈÄ º¯°æ °¡´É
//      -  'º¯¼ö¸í.limitTop' È¤Àº 'º¯¼ö¸í.limitBottom' À¸·Î »ó/ÇÏ´Ü ÇÑ°è ÁöÁ¡ ¼³Á¤°¡´É
//
//  Example)
//      <div id="quickMenu" style="position:absolute; width: 100px; height: 400px;"></div>
//      <script type="text/javascript">
//          var sc = new R2Slider ("quickMenu","sc",null,10,document.body);
//          sc.limitTop = 132;
//          sc.limitBottom = 380;
//          sc.slide();
//      </script>
//
////////////////////////////////////////////////////////////////////////////////////////////

R2Slider = function(id, slider, divPitch, marginTop, dElement) {
    if (isNaN(parseInt(marginTop))) marginTop = 0;    // »ó´Ü ¸¶Áø µðÆúÆ®
    if (isNaN(parseInt(divPitch))) divPitch = 15;    // ÀÌµ¿ °£°Ý µðÆúÆ®
    if (!dElement) dElement = document.documentElement; // DTD strict ÀÏ¶§ ( Transitional ÀÏ¶§´Â document.body )

    this.timer;    // Å¸ÀÌ¸Ó º¯¼ö
    this.slider = slider;    // °´Ã¼ º¯¼ö¸í
    this.obj = document.getElementById (id);    // ¿ÀºêÁ§Æ®
    this.marginTop = parseInt(marginTop);    // »ó´Ü ¸¶Áø
    this.divPitch = parseInt(divPitch);    // ÀÌµ¿ °£°Ý
    this.dElement = dElement; // DTD ¿¡ µû¸¥ µµÅ¥¸ÕÆ® ¿¤¸®¸ÕÆ®
    this.limitTop;     // »ó´Ü ÇÑ°èÁ¡
    this.limitBottom;     // ÇÏ´Ü ÇÑ°èÁ¡
}


R2Slider.prototype.moveIt = function(){
    var pitch = (parseInt(this.dElement.scrollTop)+ parseInt(this.marginTop)) - parseInt(this.obj.style.top);

    if (pitch == 0) return;
    else nextPos = parseInt(this.obj.style.top) + pitch / this.divPitch
    nextPos = (pitch > 0) ? Math.ceil(nextPos) : Math.floor(nextPos);

    var limitBottom = this.dElement.scrollHeight - parseInt(this.limitBottom)- parseInt(this.obj.offsetHeight);
    if ( this.limitTop && nextPos  < this.limitTop ) nextPos = this.limitTop;
    if ( this.limitBottom && nextPos  > limitBottom ) nextPos = limitBottom;
    if (nextPos < this.marginTop) nextPos = this.marginTop;
    if (isNaN(nextPos)) nextPos = 0;

    this.obj.style.top = nextPos+"px";
}

R2Slider.prototype.slide = function() {
    this.timer = setInterval(""+this.slider+".moveIt()", 10);
}

function boxRound(mode,wh) { 
    if (mode=="top") {
            if (wh>0){
        document.write('<table width="'+wh+'" cellspacing="0" cellpadding="0" style="margin:0 auto;">');
            }else{
        document.write('<table width="100%" cellspacing="0" cellpadding="0" style="margin:0 auto;">');
            }
        document.write('<tr>');
        document.write('<td width="8" height="8"><img src="/_image/shop/box_left_top.gif" border="0" alt="" /></td>');
        document.write('<td width="100%" height="8" background="/_image/shop/box_top.gif"></td>');
        document.write('<td width="8" height="8"><img src="/_image/shop/box_right_top.gif" border="0" alt="" /></td>');
        document.write('</tr>');
        document.write('<tr>');
        document.write('<td colspan="3" bgcolor="#ececec" style="padding:0 1px;">');
        document.write('<table width="100%" cellspacing="0" cellpadding="0" bgcolor="#f3f3f3">');
        document.write('<tr>');
        document.write('<td style="padding:0 5px;">');
        document.write('<table width="100%" cellspacing="0" cellpadding="0" bgcolor="#ffffff">');
        document.write('<tr>');
        document.write('<td style="padding:3px 5px;">');
    }else if (mode=="bottom") {
        document.write('</td>');
        document.write('</tr>');
        document.write('</table>');
        document.write('</td>');
        document.write('</tr>');
        document.write('</table>');
        document.write('</td>');
        document.write('</tr>');
        document.write('<tr>');
        document.write('<td width="8" height="8"><img src="/_image/shop/box_left_bottom.gif" border="0" alt="" /></td>');
        document.write('<td width="100%" height="8" background="/_image/shop/box_bottom.gif"></td>');
        document.write('<td width="8" height="8"><img src="/_image/shop/box_right_bottom.gif" border="0" alt="" /></td>');
        document.write('</tr>');
        document.write('</table>');
    }
}

function copyBank(num,name) {
    window.clipboardData.setData('Text',num);
    alert(name + ' °èÁÂ¹øÈ£°¡ Å¬¸³º¸µå¿¡ º¹»çµÇ¾ú½À´Ï´Ù.\n Ctrl + V ¸¦ ÀÌ¿ëÇØ¼­ ºÙ¿©³Ö±â¸¦ ÇÏ½Ã¸é µË´Ï´Ù.');
}

function setWP(value) {
	var todayDate = new Date();
	todayDate.setDate( todayDate.getDate() + 365 );
	document.cookie = "wallNum" + '=' + escape( value ) + '; path=/; expires=' + todayDate.toGMTString() + ';'
}

function imgresize(obj, limit) {//ÀÌ¹ÌÁö ¸®»çÀÌÂ¡
    var box = document.getElementById(obj);
    var img = box.getElementsByTagName('img');

    for (var i=0;i<img.length;i++) {
        var iSrc = img[i].src;
        
        if (img[i].offsetWidth > limit) {
            img[i].style.width = limit+"px";
            img[i].style.cursor='pointer';
            img[i].onclick = function(){
                window.open(this.src);
            }
        }
    }
}

/* ¿òÁ÷ÀÌ´Â °øÁö»çÇ× */
var htmlstr = "", roll_flag=true, roll_mouse=1, roll_speed=1, roll_wait=3000, roll_temp=0, roll_height=20, roll_amount=20;
var ctnt=new Array(), ctnt_i=new Array(), startPanel=0, n_panel=0;

function startText() {
	var i;
	for (i=0; i<ctnt.length; i++) insertText(i);
	window.setTimeout("scroll()",roll_wait);
}
function scroll() {
	var i;
	if (roll_mouse && roll_flag) {
		for (i = 0; i < ctnt.length; i++) {
			roll_temp++;
			tmp = document.getElementById('scroll_area'+i).style;
			tmp.top = parseInt(tmp.top) - roll_speed;
			if (parseInt(tmp.top) <= roll_height*(-1)) {
				tmp.top = roll_height*(ctnt.length-1);
			}
			if (roll_temp>(roll_amount-1)*ctnt.length) {
				roll_flag=false;
				roll_temp=0;
				window.setTimeout("roll_flag=true;roll_temp=0;",roll_wait);
			}
		}
	}
	window.setTimeout("scroll()",1);
}
function insertText(i) {
    htmlstr='<div style="left: 0px; width: 368px; position: absolute; top: '+(roll_height*i+1)+'px" id="scroll_area'+i+'">\n';
    htmlstr+=ctnt[i]+'\n'+'</div>\n';
    document.write(htmlstr);
}
