<!--
    function dboardOnLoad () {
        if ( typeof (exec) != 'undefined' && ( exec == 'insert' || exec == 'update' || exec == 'answer' ) && typeof( document.writeForm ) == 'object' ) {
            if ( typeof ( document.writeForm.html_yn   ) == 'object' && ( html_yn == 'Y' || html_yn == 'B' ) ) { document.writeForm.html_yn.value = html_yn; document.writeForm.html_yn.checked = true; }
            if ( typeof ( document.writeForm.open_yn   ) == 'object' && use_st    == '1' ) { document.writeForm.open_yn.checked = true; }
            if ( typeof ( document.writeForm.mail_yn   ) == 'object' && mail_yn   == 'Y' && exec != 'answer' ) { document.writeForm.mail_yn.checked = true; }
            if ( typeof ( document.writeForm.ann_yn    ) == 'object' && use_st    == '0' ) { document.writeForm.ann_yn.checked  = true; }
        }

        if ( ( typeof ( list_image_display_mode ) != 'undefined' && list_image_display_mode == '1' ) ||
             ( typeof ( view_image_display_mode ) != 'undefined' && view_image_display_mode == '1' ) ) { // ÀÚµ¿ »çÀÌÁî Á¶Á¤
            imageAutoResize ();
        }
    }

    function searchFormSubmit(myForm) {
/*
        if ( inStrAllBlankCheck (myForm.search) ) {
            alert ("°Ë»ö¾î¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.");
            myForm.search.focus();
            return false;
        }*/
        var url = getOnlyURL(document.location.href) + '?id=' + id;
        if (npop   != '') { url += '&npop=' + npop; }
//      if (exec   != '') { url += '&exec=' + exec; }
        if (no     != '') { url += '&no='   + no  ; }
        if ( typeof(myForm.search_cat_no) == 'undefined' ) {
            if (search_cat_no != '') { url += '&search_cat_no=' + search_cat_no; }
        }
        if ( typeof ( document.PageForm.poll_id.value ) != 'undefined' ) {
            url += '&poll_id=' + document.PageForm.poll_id.value;
        }
        if ( typeof ( document.PageForm.poll_exec.value ) != 'undefined' ) {
            url += '&poll_exec=' + document.PageForm.poll_exec.value;
        }
        myForm.action = url;
        return true;
    }

    function categoryLinkSearch (cat_no) {
        var url = getOnlyURL(document.location.href) + '?id=' + id;
        if (npop   != '') { url += '&npop=' + npop; }
        if (exec   != '') { url += '&exec=' + exec; }
        if (no     != '') { url += '&no='   + no  ; }
                            url += '&search_cat_no=' + cat_no;
        document.location.href = url;
    }

    function listPage() {
        document.PageForm.exec.value = 'list';
        document.PageForm.sort.value = '';
        document.PageForm.desc.value = '';
        document.PageForm.no.value   = '';
        document.PageForm.target     = '';
        document.PageForm.action     = '';
        document.PageForm.submit();
    }

    function viewPage(no, print_no) {
        document.PageForm.exec.value     = 'view'  ;
        document.PageForm.no.value       = no      ;
        document.PageForm.print_no.value = print_no;
        document.PageForm.method         = 'get'   ;
        document.PageForm.target         = ''      ;
        document.PageForm.action         = ''      ;
        document.PageForm.submit();
    }

    function insertPage() {
        document.PageForm.exec.value     = 'insert';
        document.PageForm.target         = ''      ;
        document.PageForm.action         = ''      ;
        document.PageForm.submit();
    }

    function updatePage() {
        document.PageForm.exec.value     = 'update';
        document.PageForm.target         = ''      ;
        document.PageForm.action         = ''      ;
        document.PageForm.submit();
    }

    function answerPage() {
        document.PageForm.exec.value     = 'answer';
        document.PageForm.target         = ''      ;
        document.PageForm.action         = ''      ;
        document.PageForm.submit();
    }

    function deletePage() {
        document.PageForm.method = 'get'  ;
        document.PageForm.exec.value     = 'delete';
        document.PageForm.target         = ''      ;
        document.PageForm.action         = ''      ;
        document.PageForm.submit();
    }

    function askPassword (myForm) {
        if ( typeof ( myForm.password ) == 'object' && myForm.password.value == '' ) {
            alert ("Plese type password.");
            myForm.password.focus();
            return false;
        }
        var url = getOnlyURL(document.location.href) + '?id=' + id + '&no=' + no + "&exec=" + exec + '_exec&npop=' + npop;
        myForm.action = url;
        return true;
    }

    function sendMail(myForm) {
        if ( myForm.from_mail.value != '' && !isEmail(myForm.from_mail) ) {
            alert ( 'Please type email address again.' );
            myForm.from_mail.focus();
            return false;
        }

        if ( myForm.from_name.value == '' || inStrAllBlankCheck(myForm.from_name) ) {
            alert ( 'Please type name.' );
            myForm.from_name.focus();
            return false;
        }

        if ( myForm.title.value == '' || inStrAllBlankCheck(myForm.title) ) {
            alert ( 'Please type subject.' );
            myForm.title.focus();
            return false;
        }

        if ( myForm.content.value == '' || inStrAllBlankCheck(myForm.content) ) {
            alert ( 'Please type content.' );
            myForm.content.focus();
            return false;
        }

        document.MailForm.from_mail.value = myForm.from_mail.value;
        document.MailForm.from_name.value = myForm.from_name.value;
//      alert ( document.MailForm.from_mail.value );
        document.MailForm.title.value     = myForm.title.value    ;
        document.MailForm.content.value   = myForm.content.value  ;
        document.MailForm.submit();
        return false; // myFormÀÇ ¼­ºê¹Ô ½ÇÇà ÁßÁö
    }

//******************************************************/
//** Function Name    : retrive
//** Description      : Á¶È¸½Ã Form°´Ã¼, ½ÃÀÛÀ§Ä¡ , ÃÑ ÀÚ·á¼ö¸¦ ³Ñ°Ü ¹ÞÀºÈÄ 
//                    : submit ÇÕ´Ï´Ù.
//** Argument1        : form     : Æû Object
//** Argument2        : start    : ½ÃÀÛ À§Ä¡
//** Argument3        : totcount : ÃÑ ÀÚ·á¼ö
//******************************************************/
    function retrive(form, start, totcount ) {
        if ( typeof ( form ) == 'object' ) {
            if ( typeof ( form.s ) == 'object' ) {
                form.s.value    = '1';
            }
            if ( typeof ( form.tot ) == 'object' ) {
                form.tot.value = '' ;
            }
            form.submit();
        } else {
            alert ( "JavaScript error" );
        }
    }

//******************************************************/
//** Function Name    : pageTab
//** Description      : ÆÐÀÌÁö ÅÇÀ» Å¬¸¯ÇØ¼­ ÆäÀÌÁö ÀÌµ¿À» ½ÇÇàÇÕ´Ï´Ù.
//**                  : ÆûÀÇ ÀÌ¸§Àº PageFormÀ» ÀÌ¿ëÇØ¾ß ÇÕ´Ï´Ù.
//** Argument1        : start    : ½ÃÀÛ À§Ä¡
//** Argument2        : totcount : ÃÑ ÀÚ·á¼ö
//** Argument3        : action   : Æû ObjectÀÇ ¾×¼Ç URL
//******************************************************/
    function pageTab ( start, totcount, action ) {
        document.PageForm.exec.value = ''; // ÃÊ±âÈ­
        if ( typeof ( document.PageForm ) == 'object' ) {
            if ( typeof ( document.PageForm.s ) == 'object' ) {
                document.PageForm.s.value    = start    ;
            }
            if ( typeof ( document.PageForm.tot ) == 'object' ) {
                document.PageForm.tot.value = totcount ;
            }
            document.PageForm.submit();
        } else {
            alert ( "JavaScript error" );
        }
    }
//******************************************************/
//** Function Name    : formClear
//** Description      : ÆäÀÌÁöÅÇ¿¡ ÀÌ¿ëµÇ´Â °ª ÃÊ±âÈ­
//******************************************************/
    function formClear (obj) {

        var formObj = null;
        if ( typeof( obj ) == 'object' ) {
            formObj = obj;
        } else {
            formObj = document.PageForm;
        }

        if ( typeof ( formObj ) == 'object' ) {
            if ( typeof ( formObj.s ) == 'object' ) {
                formObj.s.value    = 1;
            }
            if ( typeof ( formObj.tot ) == 'object' ) {
                formObj.tot.value = 0;
            }
        }
    }


    // °Ô½Ã±Û, ÀÇ°ß±Û °øÅë »ç¿ë [ ºñÈ¸¿ø »èÁ¦ ]
    function deleteData(myForm) {
        var url = getOnlyURL(document.location.href) + '?id=' + id + '&no=' + no + "&exec=" + exec + '_exec';
        myForm.action = url;
        return true;
    }

    function writeCommentData(myForm) {
        if ( typeof ( myForm.name ) == 'object' && ( getValue(myForm.name) == '' || inStrAllBlankCheck ( myForm.name ) ) ) {
            alert ("Please type name.");
            myForm.name.focus();
            return false;
        }

        if ( typeof ( myForm.password ) == 'object' && myForm.password.value == '' ) {
            alert ("Please type password.");
            myForm.password.focus();
            return false;
        }

        if ( typeof ( myForm.memo ) == 'object' && ( myForm.memo.value == '' || inStrAllBlankCheck ( myForm.memo ) ) ) {
            alert ("Please type content.");
            myForm.memo.focus();
            return false;
        }
//      alert ( getOnlyURL(document.location.href) + '?id=' + id + '&s=' + s + 'exec=insert_comment_exec&npop=' + npop );
        var url = '';
        url += getOnlyURL(document.location.href) + '?id=' + id + '&s=' + s + '&exec=insert_comment_exec&npop=' + npop;
        url += '&exec_gubun=board'; // °Ô½ÃÆÇ ÀÇ°ß±Û ÀÔ·Â
        if ( typeof ( document.PageForm.poll_id.value ) != 'undefined' ) {
            url += '&poll_id=' + document.PageForm.poll_id.value;
        }
        if ( typeof ( document.PageForm.poll_exec.value ) != 'undefined' ) {
            url += '&poll_exec=' + document.PageForm.poll_exec.value;
        }

        myForm.action = url;
    }

    function filePopup( id, no, gubun, page_gubun, mode, width, height ) {
        
//      id="'. $id . '_' . $no . '"
        alert ( id + ' ' + mode );
        var url = "file_view.php?id=" + id + "&no=" + no + "&gubun=" + gubun + "&page_gubun=" + page_gubun;
        var fpWin = window.open(url, id,'toolbar=no,menubar=no,resizable=no,scrollbars=yes,top=0,left=0,width=' + width + ',height=' + height );
        fpWin.focus();
//        alert ( fpWin.document.all["view_image"] );
//        var popImgObj = getObject ( 'view_image', 'fpWin' );
//        popImgObj.outerHTML = imgObj.outerHTML;
    }

    // Ã¼Å©¹Ú½º Ä«Å×°í¸® ¼±ÅÃ
    function checkBoxCategoryT(myform,obj,mode) {
        if ( typeof(obj.form) == 'object' ) {
            if ( mode == 'W' ) {
                if ( typeof(myform.cat_no.length) != 'undefined' ) {
                    setCheckedAll ( myform.cat_no, false );
                    obj.checked = true;
                }
            } else if ( mode == 'S' ) {
//                alert ( typeof(myform.search_cat_no.length) );
                if ( typeof(myform.search_cat_no.length) != 'undefined' ) {
                    setCheckedAll ( myform.search_cat_no, false );
                    obj.checked = true;
                }
            }
        }
    }

    function categorySearch (obj) {
        document.PageForm.search_cat_no.value=obj.value;
        document.PageForm.submit();
    }

    function checkBoxCategorySearch (myform,obj) { 
        if ( typeof(obj.form) == 'object' ) {
            if ( typeof(myform.search_cat_no.length) != 'undefined' ) {
                setCheckedAll ( myform.search_cat_no, false );
                obj.checked = true;
            }
        }
        document.PageForm.search_cat_no.value=obj.value;
        document.PageForm.submit();
    }

    function memberLayerBoxCB (eventGubun, contentStr, skinDir, package,id,user_id,mailSendMethod,e_mail,name,memberLevel,mailPopupWidth, mailPopupHeight, home, memberViewMode, memberViewSuccUrl, memberViewPopupWidth, memberViewPopupHeight, memberViewScrollYn ) {
        var displayExec = false;
        mouseEvent ('down', window.event);
        var dboardMemberLayer = getObject('_dboard_member_layer_box');
        contentStr = contentStr.replace(/\<\?=\$skinDir\?>/g ,skinDir);
        if ( home != '' ) {
            if ( home.indexOf( 'http://' ) == 0 ) {
                contentStr = contentStr.replace(/\<\?=\$a_home\?>/g ,'<a href=' + home + ' target="_blank">');
            } else {
                contentStr = contentStr.replace(/\<\?=\$a_home\?>/g ,'<a href=http://' + home + ' target="_blank">');
            }
            displayExec = true;
        } else {
            contentStr = contentStr.replace(/\<\?=\$a_home\?>/g ,'<a href="#" target="_blank">');
            contentStr = contentStr.replace(/\<\?=\$hide_home_s\?>/g ,'<!--' );
            contentStr = contentStr.replace(/\<\?=\$hide_home_e\?>/g ,'//-->');
        }

        if ( e_mail != '' ) {
            if ( mailSendMethod == '1' ) { // Æû¸ÞÀÏ
                contentStr = contentStr.replace(/\<\?=\$a_e_mail\?>/g ,'<a href="#" onClick=\'openFormMail   ("' + package + '","' + id + '","' + memberLevel + '","' + user_id + '","' + name + '","' + e_mail + '","' + mailPopupWidth + '","' + mailPopupHeight + '");return false;\'>');
            } else {                       // ¾Æ¿ô·è
                contentStr = contentStr.replace(/\<\?=\$a_e_mail\?>/g ,'<a href="#" onClick=\'openOutLookMail("' + package + '","' + id + '","' + e_mail + '");return false;\'>');
            }
            displayExec = true;
        } else {
            contentStr = contentStr.replace(/\<\?=\$hide_e_mail_s\?>/g ,'<!--' );
            contentStr = contentStr.replace(/\<\?=\$hide_e_mail_e\?>/g ,'//-->');
        }
        contentStr = contentStr.replace(/\<\?=\$a_member_view\?>/g ,'<a href="#" onClick=\'openMemberView("' + user_id + '","' + memberViewMode + '","' + memberViewSuccUrl + '","' + memberViewPopupWidth + '","' + memberViewPopupHeight + '","' + memberViewScrollYn + '");return false;\'>');
        contentStr = contentStr.replace(/\<\?=\$home\?>/g ,home         );

        if ( user_id == '' ) {
            contentStr = contentStr.replace(/\<\?=\$show_login_s\?>/g ,'<!--' );
            contentStr = contentStr.replace(/\<\?=\$show_login_e\?>/g ,'//-->');
        } else {
            displayExec = true;
        }
        if ( user_id != '' ) {
            contentStr = contentStr.replace(/\<\?=\$hide_login_s\?>/g ,'<!--' );
            contentStr = contentStr.replace(/\<\?=\$hide_login_s\?>/g ,'//-->');
        }
        if ( displayExec ) {
            dboardMemberLayer.innerHTML = contentStr;
            objectMoveTo(dboardMemberLayer,xPos,yPos);
            objectShow  (dboardMemberLayer          );
            mouseEventClear ();

            if (is.ns) {
                if ( eventGubun == 'click' ) {
                    document.captureEvents(Event.CLICK);
                    document.body.onmousedown = dboardMemberLayerMouseDown;
                } else if ( eventGubun == 'mouseover' ) {
                    document.captureEvents(Event.MOUSEOVER);
                    document.body.onmousedown = dboardMemberLayerMouseDown;
                }
            } else if (is.ie) {
                if ( eventGubun == 'click' ) {
                    document.body.onmousedown = dboardMemberLayerMouseDown;
                } else if ( eventGubun == 'mouseover' ) {
                    document.body.onmousedown = dboardMemberLayerMouseDown;
                }
            }
        } else {
            objectHide( dboardMemberLayer);
        }
    }

    function dboardMemberLayerMouseDown    () {
        var eventObj = window.event.srcElement;
        if ( typeof(eventObj.type) == 'undefined' ) {
            var dboardMemberLayer = getObject('_dboard_member_layer_box');
            objectHide( dboardMemberLayer);
            document.body.onmousedown = null;
        } else {
            event.returnValue = true;
        }
    }

    function dboardMemberLayerMouseClick   () {
        var dboardMemberLayer = getObject('_dboard_member_layer_box');
        objectHide( dboardMemberLayer);
        document.body.onmouseout = null;
    }
//-->
