<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 

$url = '';
if ($g4['https_url']) {
    if (preg_match("/^\./", $urlencode))
        $url = $g4[url];
    else
        $url = $g4[url].$urlencode;
} else {
    $url = $urlencode;
}
?>
<script type="text/javascript" language=JavaScript>
// 엠파스 로긴 참고
var bReset = true;
function chkReset(f) 
{
    if (bReset) { if ( f.mb_id.value == '아이디' ) f.mb_id.value = ''; bReset = false; }
    document.getElementById("pw1").style.display = "none";
    document.getElementById("pw2").style.display = "";
}
</script>

<!-- 로그인 전 외부로그인 시작 -->
<table width="180" border="0" cellpadding="0" cellspacing="0">
<form name="fhead" method="post" action="javascript:fhead_submit(document.fhead);" autocomplete="off">
<input type="hidden" name="url" value="<?=$url?>">
<tr> 
    <td width="180" height="10" colspan="6" valign="top"><img src="<?=$outlogin_skin_path?>/img/top.gif" width="180" height="10"></td>
</tr>
<tr> 
    <td width="180" colspan="4" background="<?=$outlogin_skin_path?>/img/bg.gif">
        <table width="177" border="0" cellpadding="0" cellspacing="0">
        <tr> 
            <td width="110">
                <table width="110" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td width="40" height="23">&nbsp;ID</td>
                    <td width="70" height="23" colspan="2" align="center"><input name="mb_id" type="text" class=ed size="12" maxlength="20" required itemname="아이디" value='아이디' onMouseOver='chkReset(this.form);' onFocus='chkReset(this.form);'></td>
                </tr>
                <tr> 
                    <td width="40" height="23">&nbsp;pw</td>
                    <td id=pw1 width="70" height="23" colspan="2" align="center"><input type="text" class=ed size="12" maxlength="20" required itemname="패스워드" value='패스워드' onMouseOver='chkReset(this.form);' onfocus='chkReset(this.form);'></td>
                    <td id=pw2 style='display:none;' width="70" height="23" colspan="2" align="center"><input name="mb_password" type="password" class=ed size="12" maxlength="20" itemname="패스워드" onMouseOver='chkReset(this.form);' onfocus='chkReset(this.form);'></td>
                </tr>
                </table>
            </td>
            <td width="43" height="42" rowspan="2" align="center"><input type="image" src="<?=$outlogin_skin_path?>/img/login_button.gif" width="43" height="42"></td>
        </tr>
        </table></td>
</tr>
<tr> 
    <td width="180" height="29" colspan="6">
                <table width="180" height="29" border="0" cellpadding="0" cellspacing="0" background="<?=$outlogin_skin_path?>/img/down.gif" ><tr><td align="center">
 <a href="javascript:win_password_forget();">ID/PW찾기</a>&nbsp;|&nbsp;<a href="<?=$g4[bbs_path]?>/register.php">회원가입</a>
</td></tr></table></td>
</tr>
</form>
</table>

<script language="JavaScript">
function fhead_submit(f)
{
    if (!f.mb_id.value)
    {
        alert("회원아이디를 입력하십시오.");
        f.mb_id.focus();
        return;
    }

    if (document.getElementById('pw2').style.display!='none' && !f.mb_password.value)
    {
        alert("패스워드를 입력하십시오.");
        f.mb_password.focus();
        return;
    }

    <?
    if ($g4[https_url])
        echo "f.action = '$g4[https_url]/$g4[bbs]/login_check.php';";
    else
        echo "f.action = '$g4[bbs_path]/login_check.php';";
    ?>
    f.submit();
}
</script>
<!-- 로그인 전 외부로그인 끝 -->
