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 += '<param name="scale" value="noscale">';
        fPrint += '<param name="salign" value="lt">';
        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 += ' scale="noscale"';
        fPrint += ' salign="lt"';
        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;
    }
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//  ¢Æ   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.value++;
    }else {
        if (f.value <= 1) return;
        f.value--;
    }
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//  ¢Æ   goFlash
//
//**************************************************************************************************************
//
//  Usage) ÇÃ·¡½Ã ¸µÅ© ÀÚ¹Ù½ºÅ©¸³Æ® ¿¬µ¿
//
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
var flashLink=new Array();

flashLink['top_menu_00']="/content/content.php?cont=company";
flashLink['top_menu_01']="/content/content.php?cont=smart_kitchen";
flashLink['top_menu_02']="/content/content.php?cont=smart_food";
flashLink['top_menu_03']="/content/content.php?cont=smart_packing";
flashLink['top_menu_04']="/shop/big_section.php?cno1=1001";
flashLink['top_menu_05']="/board/?db=qna";
flashLink['top_menu_06']="/mypage/mypage.php";

flashLink['left_shopping_01']="/shop/big_section.php?cno1=1002";
flashLink['left_shopping_02']="/shop/big_section.php?cno1=1003";
flashLink['left_shopping_03']="/shop/big_section.php?cno1=1004";
flashLink['left_shopping_04']="/shop/big_section.php?cno1=1005";

flashLink['left_notice_00']="/board/?db=qna";
//flashLink['left_notice_00']="JavaScript:alert('µðºñÀÌÀüÀÛ¾÷À¸·Î Àá½Ã Á¢¼ÓÇÒ¼ö ¾ø½À´Ï´Ù.')";
flashLink['left_notice_01']="/board/?db=review";
//flashLink['left_notice_01']="JavaScript:alert('µðºñÀÌÀüÀÛ¾÷À¸·Î Àá½Ã Á¢¼ÓÇÒ¼ö ¾ø½À´Ï´Ù.')";
flashLink['left_notice_02']="/board/?db=talk";
flashLink['left_notice_03']="/board/?db=card";
flashLink['left_notice_04']="/board/?db=notice";
flashLink['left_notice_05']="/content/content.php?cont=faq";

flashLink['left_my_00']="/member/edit_step1.php";
flashLink['left_my_01']="/shop/cart.php";
flashLink['left_my_02']="/mypage/wish_list.php";
flashLink['left_my_03']="/mypage/order_list.php";
flashLink['left_my_04']="/mypage/milage.php";
flashLink['left_my_05']="/mypage/withdraw_step1.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);
}

////////////////////////////////////////////////////////////////////////////////////////////
//
//  ¢Æ   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:8px;">');
    }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 tabView(obj_name,num,limit) {
	//alert(obj_name+num+limit);
	document.getElementById(obj_name + num).style.display='';

	for (var iii=0;iii<limit;iii++){
		if (!document.getElementById(obj_name + iii)) return;
		if (iii != num) document.getElementById(obj_name + iii).style.display='none';
	}
}


function bankCopy(name, number) {
    window.clipboardData.setData('Text', number);
    alert(name+' °èÁÂ¹øÈ£°¡ Å¬¸³º¸µå¿¡ º¹»çµÇ¾ú½À´Ï´Ù.\n Ctrl + V ¸¦ ÀÌ¿ëÇØ¼­ ºÙ¿©³Ö±â¸¦ ÇÏ½Ã¸é µË´Ï´Ù.');
}

function resizeIframe(iframeObj){ 
    var innerBody = iframeObj.contentWindow.document.body; 
    oldEvent = innerBody.onclick; 
    /*innerBody.onclick = function(){ resizeFrame(iframeObj, 1);oldEvent; }; */
    var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight); 
    iframeObj.style.height = innerHeight; 
    var innerWidth = innerBody.scrollWidth + (innerBody.offsetWidth - innerBody.clientWidth); 
    iframeObj.style.width = innerWidth;

    /* Æ¯Á¤ ÀÌº¥Æ®·Î ÀÎÇÑ È£Ãâ½Ã ½ºÅ©·ÑÀ» ±×³É µÐ´Ù. */ 
    if( !arguments[1]) this.scrollTo(1,1);
} 

function cookieChk(n){
	if(n) {
		setCookie("member_id_save",'Y',1);
	}
}

function viewWMMsg(n) {
	if (n) url=root_url+'/mypage/msg_view.php?no='+n;
	else url=root_url+'/mypage/msg_list.php?mode=1';
	wisaOpen(url,'wmMgsWin','',458, 100);
}



