<?
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" src="<?=$g4[path]?>/js/capslock.js"></script>
<script type="text/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>


<!-- 로그인 전 외부로그인 시작 -->
<form name="fhead" method="post" onsubmit="return fhead_submit(this);" autocomplete="off" style="margin:0px;">
<input type="hidden" name="url" value="<?=$url?>">
<div style="width:170px; border:2px solid #71b057; background:#F8F8F8; padding:5 5 5 5; margin-bottom:7px">
   <!-- <div style="clear:both;"><img src="<?=$outlogin_skin_path?>/img/login_top.gif" width="220" height="42"></div> -->

        <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
            <td width="">

				<table cellspacing="0" cellpadding="0" border="0">
				<col width="20" />
				<col width="100" />
				<col />
                <tr>
                    <td height="23">
						<img src="<?=$outlogin_skin_path?>/img/login_id.gif" width="18" height="15"></td>
                    <td height="23" 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 height="23">
						<img src="<?=$outlogin_skin_path?>/img/login_pw.gif" width="18" height="15"></td>
                    <td id=pw1 height="23" 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;' height="23" align="center">
						<input name="mb_password" id="outlogin_mb_password" type="password" class=ed size="12" maxlength="20" itemname="패스워드" onMouseOver='chkReset(this.form);' onfocus='chkReset(this.form);' onKeyPress="check_capslock(event, 'outlogin_mb_password');"></td>
                </tr>
                </table>

            </td>
            <td width="69" height="46" rowspan="2" align="center"><input type="image" src="<?=$outlogin_skin_path?>/img/login_button.gif" width="49" height="49"></td>
        </tr>
        </table>

        <div style="text-align:center; clear:both; padding:5 0 0 0px;">
            <a href="javascript:win_password_forget();"><img src="<?=$outlogin_skin_path?>/img/login_pw_find_button.gif" width="70" height="20" border="0"></a>
            <a href="<?=$g4[bbs_path]?>/register.php"><img src="<?=$outlogin_skin_path?>/img/login_join_button.gif" width="70" height="20" border="0"></a>
		</div>

</div>
</form>

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

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

    <?
    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';";
    ?>
    
    return true;
}
</script>
<!-- 로그인 전 외부로그인 끝 -->
