NS = (document.layers) ? 1 : 0;
IE = (document.all) ? 1: 0;


var HANDLE_DYNAMICWINDOW = 0;


function SetDynamicResizeWindow(name)
{
  if (HANDLE_DYNAMICWINDOW)
  {
    clearTimeout(HANDLE_DYNAMICWINDOW);
  }

  //DoSetDynamicResizeWindow(name);
  setTimeout('DoSetDynamicResizeWindow("'+name+'")', 1000);
}

function DoSetDynamicResizeWindow(name)
{
  try
  {
    if (IE)
      var objBody = parent.document.frames(name).document.body;
    else
      var objBody = parent.document.getElementById(name).contentDocument.body;

    SetAutoResizeIframe(name, '', false);
  }
  catch (e)
  {}

  //HANDLE_DYNAMICWINDOW = setTimeout('SetDynamicResizeWindow("'+name+'")' , 500);
}

function SetAutoResizeIframe(name, minHeight, bScrollTop)
{

  if(minHeight==null || minHeight=="") minHeight = 0;
  if(name==null || name=="") return;
  if(bScrollTop==null) bScrollTop = true;

  try
  {
    var sHeight;

    if (IE)
    {
       var objBody = document.frames(name).document.body;
    }
    else
    {
       var objBody = document.getElementById(name).contentDocument.body;
    }

    var objFrame = document.getElementById(name);
    objFrame.style.height = minHeight;

    //var sHeight;// = objBody.scrollHeight;// + (objBody.offsetHeight - objBody.clientHeight);

    /*if(objBody.scrollHeight-objBody.offsetHeight > 0)
      sHeight = (objBody.scrollHeight-objBody.offsetHeight)+objBody.offsetHeight;
    else if(+objBody.offsetHeight-objBody.scrollHeight > 0)
      sHeight = objBody.scrollHeight;
    else
      sHeight = objBody.offsetHeight;*/
    //var p_scroll_top = parseInt(window.scrollTop);
    //alert(p_scroll_top);
    sHeight = objBody.scrollHeight + 10;

    if (minHeight > sHeight)
      sHeight = minHeight;

    objFrame.style.height = sHeight;

    //objFrame.style.backgroundColor = 'transparent';
    if (bScrollTop)
    {
      //window.scrollTo(0,0);
      clearTimeout(HANDLE_DYNAMICWINDOW);
    }

    //window.scrollTop = p_scroll_top;

  }catch (e) {}
}

var old_i; // Àü¿¡ Å¬¸¯Çß´ø ±ÛÀÇ ¹øÈ£°ª ÀúÀå
function view(i) { // ´äº¯ Ç¥½Ã¿©ºÎ Á¶Á¤ÇÏ´Â jsÇÔ¼ö
	if (old_i==i) {
		var mode=document.getElementById('view_'+i).style.display;
		if (mode=='inline') document.getElementById('view_'+i).style.display='none';
		else document.getElementById('view_'+i).style.display='inline';
	}
	else {
		if (old_i) document.getElementById('view_'+old_i).style.display='none';
		document.getElementById('view_'+i).style.display='inline';
	}
	old_i=i;
}

function urlencode(str) {
	str = escape(str);
	str = str.replace(/\+/gi, '%2B');
	str = str.replace(/\%20/gi, '+');
	str = str.replace(/\*/gi, '%2A');
	str = str.replace(/\//gi, '%2F');
	str = str.replace(/\@/gi, '%40');
	return str;
}

function swf_obj(src,w,h,swfid){
	swf_html = '';
	swf_html += '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" WIDTH="'+w+'" HEIGHT="'+h+'" id="'+swfid+'">';
	swf_html += '<param name="movie" value="'+src+'">';
	swf_html += '<param name="quality" value="high">';
	swf_html += '<PARAM NAME="menu" VALUE="false">';
	swf_html += '<PARAM NAME="wmode" VALUE="transparent">';
	swf_html += '<EMBED src="'+src+'" menu="false" wmode="transparent" quality="high" WIDTH="'+w+'" HEIGHT="'+h+'" NAME="'+swfid+'"></EMBED>';
	swf_html += '<\/object>';
	document.write(swf_html);
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function showLoginConfirm(){
	MM_openBrWindow('index_popup.php?pgurl=etc/loginconfirm&prev_page=' + urlencode(window.document.location.href),'LoginConfirm','width=300,height=200');
}

function sendmailByContent(c){
    if(document.all){
        var tmp = "";
        if(typeof(document.all['prlayer'].length) != "undefined"){
	        for(var i=0;i<document.all['prlayer'].length;i++){
	        	tmp += document.all['prlayer'][i].outerHTML;
	       	}
	    }else{
	    	tmp += document.all['prlayer'].outerHTML;
	    }
        document.formformail.content.value =
        (c == "g")?
        '<table width="480" border="0" cellspacing="0" cellpadding="0" style="table-layout:fixed;">' + tmp + '</table>'
        : '<table width="560" border="0" cellspacing="0" cellpadding="0"><tr><td height="2" bgcolor="c0c0c0"></td></tr>' + tmp + '</table>';
    }
    MM_openBrWindow('about:blank','sendmail','width=550,height=400');
    document.formformail.submit();

}
/*
<form name="formformail" method="post" action="index_popup.php?pgurl=etc/sendmail" target="sendmail">
<input type="hidden" name="content">
</form>
*/
function printDiv(){
    if(document.all && window.print){
        window.onbeforeprint = beforeDivs;
        window.onafterprint = afterDivs;
        window.objSelection.focus();
        window.print();
    }
}
function beforeDivs(){
    if(document.all){
        var tmp = "";
        for(var i=0;i<document.all['prlayer'].length;i++){
        	tmp += document.all['prlayer'][i].outerHTML;
       	}
        objSelection.document.body.innerHTML =

        '<table width="560" border="0" cellspacing="0" cellpadding="0"><tr><td height="2" bgcolor="c0c0c0"></td></tr>' + tmp + '</table>';
    }
}
function afterDivs(){
    if(document.all){
    objSelection.document.body.innerHTML = "";
    }
}


function tm01() {location.href = "main.htm";}

/*** ÇÃ·¡½¬ ¸Þ´º ¸µÅ© ***/
function m10() {location.href = "select02.htm";}
function m20() {location.href = "select02.htm";}
function m30() {location.href = "index.php?pgurl=shop/sh_goods_list&ctpose=AAH&ctno=326";}
function m40() {location.href = "index.php?pgurl=shop/sh_goods_list&ctpose=AAI&ctno=328";}
function m50() {location.href = "index.php?pgurl=shop/sh_goods_list&ctpose=AAJ&ctno=329";}
function m60() {location.href = "index.php?pgurl=shop/sh_schgds_list&brand=";}

function rm1() {location.href = "index.php?pass=1&pgurl=shop/etc_infosh";}
function rm2() {location.href = "index.php?pgurl=shop/etc_person";}
function rm3() {location.href = "index.php?pgurl=board/bd_write&brno=26&wrno=&member=&mode=W&type=W&head=&stype=&skey=&page=1";}


function m1() {location.href = "index.php?pgurl=shop/sh_goods_list&ctpose=AAC&ctno=316";}
function m2() {location.href = "index.php?pgurl=shop/sh_goods_list&ctpose=AAD&ctno=318";}
function m3() {location.href = "index.php?pgurl=shop/sh_goods_list&ctpose=AAE&ctno=319";}
function m4() {location.href = "index.php?pgurl=shop/sh_goods_list&ctpose=AAG&ctno=325";}
function m5() {location.href = "index.php?pgurl=shop/sh_goods_list&ctpose=AAH&ctno=326";}
function m6() {location.href = "index.php?pgurl=shop/sh_goods_list&ctpose=AAI&ctno=328";}
function m7() {location.href = "index.php?pgurl=shop/sh_goods_list&ctpose=AAJ&ctno=329";}
function m8() {location.href = "index.php?pgurl=shop/sh_schgds_list&price_r1=0&price_r2=100000";}
function m9() {location.href = "index.php?pgurl=shop/sh_schgds_list&price_r1=100000&price_r2=";}
function m10() {location.href = "index.php?pgurl=shop/sh_schgds_list&origin=w";}
function m11() {location.href = "index.php?pgurl=shop/sh_schgds_list&origin=m";}
function m12() {location.href = "index.php?pgurl=shop/sh_schgds_list&origin=k";}
function m13() {location.href = "index.php?pgurl=shop/sh_schgds_list&brand=";}
function m14() {location.href = "index.php?pgurl=board/bd_write&brno=6";}
function m15() {location.href = "index.php?pgurl=board/bd_write&brno=23";}
function m16() {location.href = "index.php?pgurl=board/bd_write&brno=24";}
function m17() {location.href = "index.php?pgurl=board/bd_write&brno=25";}
//function m18() {location.href = "designer.htm";}
function m19() {location.href = "index.php?pgurl=board/bd_write&brno=1";}
function m20() {location.href = "index.php?pgurl=board/bd_write&brno=2";}
function m21() {location.href = "index.php?pgurl=board/bd_write&brno=3";}
function m22() {location.href = "index.php?pgurl=board/bd_write&brno=4";}
function m23() {location.href = "index.php?pgurl=board/bd_write&brno=5";}
//function m24() {location.href = "friend.htm";}

function m25() {location.href = "index.php?pgurl=etc/instanshop";}
function m26() {location.href = "index.php?pgurl=etc/instalab";}
function m27() {location.href = "index.php?pgurl=etc/shop100";}
function m28() {location.href = "index.php?pgurl=etc/cafenblog";}