
  <table width="300" height="22" border="0" cellspacing="0" cellpadding="0">
  <form name="fsearchbox" method="get" action="javascript:fsearchbox_submit(document.fsearchbox);">
          <input type="hidden" name="sfl" value="wr_subject">
          <input type="hidden" name="sop" value="and">
    <tr>
    <td width="60" align="left"><img src="<?=$g4[path]?>/scbar/img/search_fr.gif" width="56" height="19" border=0 align=absmiddle></td>
    <td align="center"><input name="stx" maxlengt=20 onblur="this.style.background='#ffffff'" 
                                style="BORDER-RIGHT: rgb(204,204,204) 1px solid; BORDER-TOP: rgb(204,204,204) 1px solid; BACKGROUND-IMAGE: url(http://dmbuser.com/search/images/sc_bg.gif); BORDER-LEFT: rgb(204,204,204) 1px solid; WIDTH: 190px; BORDER-BOTTOM: rgb(204,204,204) 1px solid; HEIGHT: 19px" 
                                onfocus="this.style.background='#ffffff'" size="20" maxlength="20"></td>
    <td width="51" align="right"> <input type="image" src="<?=$g4[path]?>/scbar/img/scin.gif" width="47" height="21" border="0"></td>
    </tr>
   </form>
   </table>

<script language="JavaScript">
function fsearchbox_submit(f)
{
    if (f.stx.value == '')
    {
        alert("검색어를 입력하세요.");
        f.stx.select();
        f.stx.focus();
        return;
    }

    /*
    // 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
    var cnt = 0;
    for (var i=0; i<f.stx.value.length; i++)
    {
        if (f.stx.value.charAt(i) == ' ')
            cnt++;
    }

    if (cnt > 1)
    {
        alert("빠른 검색을 위하여 검색어에 공백은 한개만 입력할 수 있습니다.");
        f.stx.select();
        f.stx.focus();
        return;
    }
    */

    f.action = "<?=$g4[bbs_path]?>/search.php";
    f.submit();
}
</script>