var viewsslmain="";

function lclicksslmain(){
    if(!viewsslmain.closed && viewsslmain) viewsslmain.focus();
    else{
        viewsslmain = window.open("about:blank","viewsslmain","height=304,width=458,scrollbars=no")
        viewsslmain.document.write('<title>º¸¾ÈÁ¢¼ÓÀÌ¶õ?</title>');
        viewsslmain.document.write('<style>\n');
        viewsslmain.document.write('body { background-color: #FFFFFF; font-family: "±¼¸²"; font-size: x-small; } \n');
        viewsslmain.document.write('P {margin-top:2px;margin-bottom:2px;}\n');
        viewsslmain.document.write('</style>\n');
        viewsslmain.document.write('<body topmargin=0 leftmargin=0 marginleft=0 marginwidth=0>\n');
        viewsslmain.document.write('<a href="JavaScript:self.close()"><img src="/images/common/ssllogin_aboutimg.gif" align=absmiddle border=0></a>');
        viewsslmain.moveTo(100,100);
    }
}
function lcheck_log() {
    if (document.login.id.value.length==0) {
        document.login.id.focus();
        alert("È¸¿ø ID¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");return;
    }
    if (document.login.passwd.value.length==0) {
        document.login.passwd.focus();
        alert("È¸¿ø ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");return;
    }
    lsubmitsend();
}
function lCheckKey_log() {
    key=event.keyCode;
    if (key==13) {
        lcheck_log()
    }
}
function lsubmitsend() {
    if (httpslogin == "YES") {
        if(typeof document.login.ssl!="undefined" && document.login.ssl.checked==true) {
            document.login.target = "loginiframe";
            document.login.action = httpsloginurl;
            document.login.submit();
        } else {
            document.login.submit();
        }
    } else {
        document.login.submit();
    }
}      
function lnewsend() {
    document.login.id.value="";
    document.login.passwd.value="";
    document.login.action = action_url;
    document.login.submit();
}
function getCookie_mainm(name) {
    lims = document.cookie;
    var index = lims.indexOf(name + "=");
    if (index == -1) return null;
    index = lims.indexOf("=", index) + 1; // first character
    var endstr = lims.indexOf(";", index);
    if (endstr == -1) endstr = lims.length; // last character
    return unescape(lims.substring(index, endstr));
}
function databoard(code) {
   window.open("http://data.makeshop.co.kr/board/board.html?code=" + code,"","height=500,width=622,scrollbars=yes");
}
function sendmail() {
   window.open("/html/email.html","email","height=100,width=100");
}
function estimate(est_type) {
    if (est_type == "Y") {
        window.open("/html/estimate.html","estimate","height=100,width=100,scrollbars=yes");
    } else if (est_type == "O") {
        document.location.href="/html/estimate_newpage.html";
    }
}
function giftlist() {
    document.location.href="/shop/gift_list.html";
}
function lnotice(temp,temp2) {
    window.open("/html/notice.html?date="+temp+"&db="+temp2,"","width=450,height=450,scrollbars=yes");
}
function linfo(temp,temp2) {
    window.open("/html/information.html?date="+temp+"&db="+temp2,"","width=620,height=500,scrollbars=yes");
}
function left_view(tmp, poll_code) {
    if(tmp == "vote") {
        var temp,i,j,k;
        j=document.search.choice.length;
        for (i=0;i<j;i++) {
            if(document.search.choice[i].checked) {
                temp="/html/vote_view.html?type=vote&code=" + poll_code + "&val="+document.search.choice[i].value;
                k=1;
            }
        }
        if (k==1) {
            window.open (temp,'vote','width=430,height=400,scrollbars=yes');
        } else {
            alert ("ÅõÇ¥ÇÏ½Ç ¹øÈ£¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä");return;
        }
    } else {
        window.open ('/html/vote_view.html?type=view&code=' + poll_code,'view','width=430,height=400,scrollbars=yes'); 
    }
}
function left_list(poll_code) {
    window.open ('/html/vote_view.html?type=list&code=' + poll_code,'list','width=430,height=400,scrollbars=yes'); 
}

function check_log() {
    if (document.search.id.value.length==0) {
        document.search.id.focus();
        alert("È¸¿ø ID¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");return;
    }
    if (document.search.passwd.value.length==0) {
        document.search.passwd.focus();
        alert("È¸¿ø ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");return;
    }
    document.formlogin.id.value=document.search.id.value;
    document.formlogin.passwd.value=document.search.passwd.value;
    dsubmitsend();
}
function CheckKey_log() {
    key=event.keyCode;
    if (key==13) {
        check_log()
    }
}
function CheckKey_search() {
    key=event.keyCode;
    if (key==13) {
        document.search.submit();
    }
}
function dsubmitsend() {
    if (httpslogin == "YES") {
        if(typeof document.search.ssl!="undefined" && document.search.ssl.checked==true) {
            document.formlogin.target = "loginiframe";
            document.formlogin.action = httpsloginurl;
            document.formlogin.submit();
        } else {
            document.search.submit();
        }
    } else {
        document.search.submit();
    }
}      
function dnewsend() {
    document.search.id.value="";
    document.search.passwd.value="";
    document.formlogin.id.value="";
    document.formlogin.passwd.value="";
    document.formlogin.action = action_url;
    document.formlogin.submit();
}
