// main.html
function privercy() {
  window.open("/html/privercy.html","privercy","height=570,width=590,scrollbars=yes");
}
function privacy() {
    privercy();
}

function topnotice(temp,temp2)
{
    window.open("/html/notice.html?date="+temp+"&db="+temp2,"","width=450,height=450,scrollbars=yes");
}

function logout()
{
    location.href="/topmenu.html?type=logout";
}

function login(url)
{
    document.login.suburl.value=url;
    window.open("/html/login.html","login","width=418,height=400,scrollbars=yes");
}

function sendmail()
{
    window.open("/html/email.html","email","height=100,width=100");
}

function idinfo(temp)
{
    window.open("/shop/idinfo.html?type="+temp,"idinfo","height=718,width=500,scrollbars=yes");
}

function detail(temp, w, h)
{
    if(w == 0) w = 518;
    if(h == 0) h = 700;
    window.open("/shop/shopdetail.html?brandcode="+temp,"detail","height="+h+",width="+w+",scrollbars=yes");
    //window.open("/shop/shopdetail.html?brandcode="+temp,"detail","height=700,width=518,scrollbars=yes");
}

function top_check_log()
{
   if (document.top_form_log.id.value.length==0) {
      document.top_form_log.id.focus();
      alert("È¸¿ø ID¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");return;
   }
   if (document.top_form_log.passwd.value.length==0) {
      document.top_form_log.passwd.focus();
      alert("È¸¿ø ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");return;
   }
   document.top_form_log.submit();
}

function top_CheckKey_log()
{
    key=event.keyCode;
    if (key==13){ top_check_log() }
}

function topCheckKey_search()
{
    key=event.keyCode; 
    if (key==13){ document.topsearch.submit();} 
} 

function userexit()
{
    /**
    <? if(strlen($login_id)>0 && $login_id!="deleted"){?>
    if(confirm('È¸¿øÅ»Åð¸¦ ÇÏ½Ã°Ú½À´Ï±î?'))
    location.href="/html/<?=$maintype?>.html?type=exit";
    <? }else{?>
    alert('·Î±×ÀÎÈÄ ÀÌ¿ë°¡´ÉÇÕ´Ï´Ù');
    location.href="/shop/member.html";
    <? }?>
    */
}

function way(w, h, scroll)
{
    if(w == 0) w = 500;
    if(h == 0) h = 500;
    //window.open("/html/way.html","way","width=500,height=500,scrollbars=no");
    if (scroll == 'on') {
        window.open("/html/way.html","way","width="+w+",height="+h+",scrollbars=yes");
    } else {
        window.open("/html/way.html","way","width="+w+",height="+h+",scrollbars=no");
    }
}

function online(type)
{
    if(!type || type == 'undefined') type = '';
    window.open("/html/online.html?type="+type,"online","width=420,height=630,scrollbars=yes");
}

function gourl(url,frame)
{
    url = unescape(url.replace(/[+]/g," "));
    if(frame.value>0) frame.location.href=url;
    else location.href=url;
}

function gohiddenurl(url,frame,xcode,type)
{
    document.hiddenlog.url.value=url;     
    document.hiddenlog.type.value=type;     
    document.hiddenlog.frame.value=frame;     
    document.hiddenlog.xcode.value=xcode;     
    document.hiddenlog.submit();
}

// online.html
function notice(temp,temp2)
{
    window.open("/html/notice.html?date="+temp+"&db="+temp2,"","width=418,height=400,scrollbars=yes");
}

// °¢Á¾ Æû ¿£ÅÍÅ° È®ÀÎ
function chkSubmitKey(form, functionName)
{
    if(event.keyCode == 13) {
        form.submit();
    }
}

// ¿À¸¥ÂÊÅ¬¸¯, ÄÁÆ®·ÑÅ° ¹æÁö ½ºÅ©¸³Æ®
function subclick()
{
    if ((event.button==2) || (event.button==3) || (event.keyCode == 93)) {
        return;
    }
    if ((event.ctrlKey) && (event.keyCode == 78)) {
        return false;
    }
}
