묻고답하기

간단한 트리구조 메뉴 스크립트를 사용했는데요.
메뉴를 클릭하면 새창으로 떠버리네요. ㅡㅜ
현재창으로 뜨게 하려면 어떻게 해야 하는지 모르겠습니다.

도움 부탁드릴께요.

아래 소스 올립니다.


** 노프레임 홈입니다.
============================================================================================================================
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=euc-kr">
<style type="text/css">
    A:link {color: #000000; text-decoration: none}
    A:visited {color: #000000; text-decoration: none}
    A:hover {color: #dddddd; text-decoration: none}
    BODY,TR,TD,INPUT{font-size:9pt;font-family:Verdana,굴림}
</STYLE>

<script language="JavaScript" type="text/javascript">
function Folder(folderDescription, hreference) { //constructor
    //constant data;
    this.desc = folderDescription;
    this.hreference = hreference;
    this.id = -1;
    this.navObj = 0;
    this.iconImg = 0;
    this.nodeImg = 0;
    this.isLastNode = 0;


    // dynamic data                                          
    this.isOpen = true;
        this.iconSrc = "img/ftv2folderopen.gif";
    this.children = new Array;
    this.nChildren = 0;

    // methods
    this.initialize = initializeFolder;
    this.setState = setStateFolder;
    this.addChild = addChild;
    this.createIndex = createEntryIndex;
    this.hide = hideFolder;
    this.display = display;
    this.renderOb = drawFolder;
    this.totalHeight = totalHeight;
    this.subEntries = folderSubEntries;
    this.outputLink = outputFolderLink;
}

function Folder2(folderDescription, hreference) { //constructor
    //constant data;
    this.desc = folderDescription;
    this.hreference = hreference;
    this.id = -1;
    this.navObj = 0;
    this.iconImg = 0;
    this.nodeImg = 0;
    this.isLastNode = 0;

    // dynamic data                                          
    this.isOpen = true;
        this.iconSrc = "img/ftv2folderopen.gif";
    this.children = new Array;
    this.nChildren = 0;

    // methods
    this.initialize = initializeFolder;
    this.setState = setStateFolder;
    this.addChild = addChild;
    this.createIndex = createEntryIndex;
    this.hide = hideFolder;
    this.display = display;

    this.renderOb = drawFolder;

    this.totalHeight = totalHeight;

    this.subEntries = folderSubEntries;

    this.outputLink = outputFolderLink2;

}



function setStateFolder(isOpen) {

        var subEntries;

        var totalHeight;

        var fIt = 0;

        var i = 0;



        if(isOpen == this.isOpen)

                return

        if(browserVersion == 2) {
               totalHeight = 0
                for(i = 0; i < this.nChildren; i++)
                       totalHeight = totalHeight + this.children[i].navObj.clip.height;
                subEntries = this.subEntries();

                if(this.isOpen)
                       totalHeight = 0 - totalHeight;


                for(fIt = this.id + subEntries + 1; fIt < nEntries; fIt++)
                        indexOfEntries[fIt].navObj.moveBy(0, totalHeight);
        }

        this.isOpen = isOpen;
        propagateChangesInState(this);
}

function propagateChangesInState(folder) {
        var i=0


        if (folder.isOpen) {
        if (folder.nodeImg)
                if (folder.isLastNode)
                        folder.nodeImg.src = "images/click_10.gif"
                else
                        folder.nodeImg.src = "images/click_7.gif"


                for (i=0; i<folder.nChildren; i++)
                folder.children[i].display()
        } else {
        if (folder.nodeImg)
                if (folder.isLastNode)
                        folder.nodeImg.src = "images/click_10.gif"
                else                
        folder.nodeImg.src = "images/click_8.gif"


                for (i=0; i<folder.nChildren; i++)
                folder.children[i].hide()
        }
}

function hideFolder() {
  if(browserVersion == 1) {
        if(this.navObj.style.display == "none")
            return
        this.navObj.style.display = "none"
    }
    else {
        if(this.navObj.visibility == "hiden")
            return
        this.navObj.visibility = "hiden"
    }
     this.setState(0)
}

function initializeFolder(level, lastNode, leftSide) {
    var i = 0;
    var j = 0;

    var numberOfFolders;
    var numberOfDocs;
    var nc;

    nc = this.nChildren;
    this.createIndex();

    var auxEv = "";

    if(browserVersion > 0)
        auxEv = "<a href='javascript:clickOnNode("+this.id+")'>"
    else
        auxEv = "<a>"


    if(level > 0) {
        if(lastNode) { //the last 'brother' in the children array
           this.renderOb(leftSide + auxEv + "<img name='nodeIcon" + this.id + "'src='images/aa.gif' width=16 height=22 border=0></a>");

           leftSide = leftSide + "<img src='images/ftv2blank.gif' width=16 height=22>";

                   this.isLastNode = 1;
       }
        else {
            this.renderOb(leftSide + auxEv + "<img name='nodeIcon" + this.id + "' src='images/ftv2mnode.gif' width=16 height=22 border=0></a>");
            leftSide = leftSide + "<img src='images/click_9.gif' width=16 height=22>";

                        this.isLastNode = 0;
        }
    }
    else
        this.renderOb("");

    if(nc > 0) {
        level = level + 1;
        for(i = 0; i < this.nChildren; i++) {
            if(i == this.nChildren-1)
                this.children[i].initialize(level, 1, leftSide);
            else
                this.children[i].initialize(level, 0, leftSide);
        }
    }
}


function drawFolder(leftSide) {
        if (browserVersion == 2) {
                if (!doc.yPos)
                        doc.yPos=8
                doc.write("<layer id='folder" + this.id + "' top=" + doc.yPos + " visibility=hiden>")

        }

        doc.write("<table ")
       if (browserVersion == 1)
                doc.write(" id='folder" + this.id + "' style='position:block;' ")
        doc.write(" border=0 cellspacing=0 cellpadding=0>")
        doc.write("<tr><td>")
        doc.write(leftSide)
        this.outputLink()

        doc.write("</a>")
        doc.write("</td><td nowrap>")
        doc.write("<DIV CLASS="fldrroot">");        

        if (USETEXTLINKS) {
       this.outputLink()
        doc.write(this.desc + "</a>")
        }
        else
        doc.write(this.desc)

        doc.write("</DIV>");
        doc.write("</td>")
        doc.write("</table>")

        if (browserVersion == 2) {
                doc.write("</layer>")
        }
         if (browserVersion == 1) {
               this.navObj = doc.all["folder"+this.id]
                this.iconImg = doc.all["folderIcon"+this.id]
                this.nodeImg = doc.all["nodeIcon"+this.id]
        } else if (browserVersion == 2) {
        this.navObj = doc.layers["folder"+this.id]
        this.iconImg = this.navObj.document.images["folderIcon"+this.id]
        this.nodeImg = this.navObj.document.images["nodeIcon"+this.id]
        doc.yPos=doc.yPos+this.navObj.clip.height
        }
}

function outputFolderLink() {
        if (this.hreference) {
        doc.write("<a href='" + this.hreference + "' TARGET="detail" ")
        if (browserVersion > 0)
                        doc.write("onClick='javascript:clickOnFolder("+this.id+")'")
                doc.write(">")
        }
        else
        doc.write("<a href='javascript:clickOnFolder("+this.id+")'>")
}

function outputFolderLink2() {
        if (this.hreference)   {
        doc.write("<a href='" + this.hreference + "' TARGET="detail" ")
        if (browserVersion > 0)
                doc.write("onClick='javascript:clickOnFolder("+this.id+")'")
                doc.write(">")
        }
        else
        doc.write("<a href='javascript:clickOnFolder("+this.id+")'>")
}

function addChild(childNode) {
        this.children[this.nChildren] = childNode
        this.nChildren++
        return childNode
}

function folderSubEntries() {
        var i = 0
        var se = this.nChildre
        for (i=0; i < this.nChildren; i++){
        if (this.children[i].children) //is a folder
                se = se + this.children[i].subEntries()
        }

        return se
}

function Item(itemDescription, itemLink, itemImg) { // Constructor
        // constant data
        this.desc = itemDescription

        this.link = itemLink

        this.id = -1 //initialized in initalize()
        this.navObj = 0 //initialized in render()
        this.iconImg = 0 //initialized in render()

        // iconSrc에 지정되는 이미지 파일을 각 아이템에 맞게 지정할 수 있도록 한다 (목표)
        this.iconSrc = itemImg;

        // methods

        this.initialize = initializeItem

        this.createIndex = createEntryIndex

        this.hide = hideItem

        this.display = display

        this.renderOb = drawItem

        this.totalHeight = totalHeight

}



function hideItem() {

        if (browserVersion == 1) {

        if (this.navObj.style.display == "none")

                return

        this.navObj.style.display = "none"

        } else {

        if (this.navObj.visibility == "hiden")

                return

        this.navObj.visibility = "hiden"

        }

}



function initializeItem(level, lastNode, leftSide) {

        this.createIndex()



        if (level>0)

        if (lastNode) { //the last 'brother' in the children array

                this.renderOb(leftSide + "<img src='images/click_1.gif' width=16 height=22>")

                leftSide = leftSide + "<img src='images/click_2.gif' width=16 height=22>"

                } else {

                this.renderOb(leftSide + "<img src='images/click_3.gif' width=16 height=22>")

                leftSide = leftSide + "<img src='images/click_4.gif' width=16 height=22>"

                }

        else

        this.renderOb("")

}



function drawItem(leftSide) {

        if (browserVersion == 2)

        doc.write("<layer id='item" + this.id + "' top=" + doc.yPos + " visibility=hiden>")



        doc.write("<table ")

        if (browserVersion == 1)

        doc.write(" id='item" + this.id + "' style='position:block;' ")

        doc.write(" border=0 cellspacing=0 cellpadding=0>")

        doc.write("<tr><td>")

        doc.write(leftSide)

        if(this.link != "")

        doc.write("<a href=" + this.link + ">")

        if(this.link != "")

        doc.write("</a>")

        doc.write("</td><td nowrap>")

        doc.write("<DIV CLASS="fldritem">");

        if (USETEXTLINKS) {

                if(this.link != "")

                doc.write("<a href=" + this.link + "onMouseOver=javascript:window.status='';return true;" + ">" + this.desc + "</a>")

                else

                doc.write(this.desc)

        } else {

        doc.write(this.desc)

        }

        doc.write("</DIV>");

        doc.write("</table>")



        if (browserVersion == 2)

        doc.write("</layer>")



        if (browserVersion == 1) {

        this.navObj = doc.all["item"+this.id]

        this.iconImg = doc.all["itemIcon"+this.id]

        } else if (browserVersion == 2) {

        this.navObj = doc.layers["item"+this.id]

        this.iconImg = this.navObj.document.images["itemIcon"+this.id]

        doc.yPos=doc.yPos+this.navObj.clip.height

        }

}



function display() {

        if (browserVersion == 1)

        this.navObj.style.display = "block"

        else

        this.navObj.visibility = "show"

}



function createEntryIndex() {

        this.id = nEntries

        indexOfEntries[nEntries] = this

        nEntries++

}



// total height of subEntries open

function totalHeight() { //used with browserVersion == 2

        var h = this.navObj.clip.height

        var i = 0

        if (this.isOpen) //is a folder and _is_ open

        for (i=0 ; i < this.nChildren; i++)

                h = h + this.children[i].totalHeight()

        return h

}

// Events

// *********************************************************

function clickOnFolder(folderId) {

        var clicked = indexOfEntries[folderId]

    clickOnNode(folderId)

}

function clickOnNode(folderId) {

        var clickedFolder = 0

        var state = 0




        clickedFolder = indexOfEntries[folderId]

        state = clickedFolder.isOpen



        clickedFolder.setState(!state) //open<->close

        window.focus(0)

}

function initializeDocument() {

    if(doc.all)

        browserVersion = 1; //IE4

    else if(doc.layers)

        browserVersion = 2; //NS4

    else

        browserVersion = 0; //other

    foldersTree.initialize(0, 1, "");

    foldersTree.display();

    if(browserVersion > 0) {

        doc.write("<layer top="+indexOfEntries[nEntries-1].navObj.top+"> </layer>");

        // close the whole tree

        clickOnNode(0)

        // open the root folder

        clickOnNode(0)

        }

}

// Auxiliary Functions for Folder-Treee backward compatibility

// *********************************************************

function gFldr(description, hreference) {

    folder = new Folder(description, hreference);

    return folder;

}

function gFldr2(description, hreference) {

    folder2 = new Folder2(description, hreference);

    return folder2;

}

function gLnk(target, description, linkData, itemImg) {

        fullLink = ""



        if (target==0) {

        if(linkData != "")

                fullLink = "'"+linkData+"' target="detail""

        else

                fullLink = "";

        } else {

        if (target==1) {

                if(linkData != "")

                        fullLink = "'"+linkData+"' target="_top""

                else

                        fullLink = "";

        } else if(target==3){

                if(linkData != "")

                        fullLink = "'"+linkData+"' target="_new""

                else

                        fullLink = "";

        } else { // target == 2

                if(linkData != "")

                        fullLink = "'http://"+linkData+"' target="detail""

                else

                        fullLink = "";

        }

        }

        linkItem = new Item(description, fullLink, itemImg)

        return linkItem

}



function insFldr(parentFolder, childFolder) {

  return parentFolder.addChild(childFolder)

}

function insDoc(parentFolder, document) {

  parentFolder.addChild(document)

}

// Global variables

// ****************

USETEXTLINKS = 1;

indexOfEntries = new Array;

nEntries = 0;

doc = document;

browserVersion = 0;

selectedFolder=0;</script>

</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<TABLE WIDTH="1024" cellpadding="0" cellspacing="0">
    <TR>
        <TD width="1024" colspan="4">
                        <IMG SRC="images/index_1.gif" WIDTH=1024 HEIGHT=177 ALT=""></TD>
        </TR>
    <TR>
        <TD width="211" height="51" bordercolor="#999999" bordercolorlight="#999999" align="center" valign="middle" colspan="3">
                                                
                                                
            <p>
 </p>
</TD>
        <td width="813" height="51" align="center" valign="middle" bordercolor="#999999" bordercolorlight="#999999" background="images/index_8.gif">
            <p><? print_outlogin("dc_outlogin", 1, 10) ?></p></td>
        </TR>
    <TR>
        <td width="15" height="14" align="center" valign="middle" bordercolor="#999999" bordercolorlight="#999999" background="images/menu_1.gif"> </td>
        <td width="180" height="14" align="center" valign="middle" bordercolor="#999999" bordercolorlight="#999999" background="images/menu_2.gif"> </td>
        <td width="16" height="14" align="center" valign="middle" bordercolor="#999999" bordercolorlight="#999999" background="images/menu_3.gif"> </td>
        <td width="813" height="14" align="center" valign="middle" bordercolor="#999999" bordercolorlight="#999999"> </td>
        </TR>
    <TR>
        <td width="15" height="301" align="center" valign="middle" bordercolor="#999999" bordercolorlight="#999999" background="images/menu_4.gif"> </td>
        <td width="180" height="301" align="left" valign="top" bordercolor="#999999" bordercolorlight="#999999" background="images/menu_5.gif">            <p>

            <script language="JavaScript">

        foldersTree = gFldr("<B>main menu</B>", "")

        aux1 = insFldr(foldersTree, gFldr("<B>Home</B>", "http://www.worldkic.com", ""));
        aux1 = insFldr(foldersTree, gFldr("introduce", ""));
        insDoc(aux1, gLnk(0, "profile", "http://rcnkic.dungg.com/bbs/zboard.php?id=profile", ""))
        insDoc(aux1, gLnk(0, "diary", "http://rcnkic.dungg.com/bbs/zboard.php?id=diary", ""))
        insDoc(aux1, gLnk(0, "admin", "http://rcnkic.dungg.com/bbs/zboard.php?id=admin", ""))

        aux1 = insFldr(foldersTree, gFldr("board", ""))
        insDoc(aux1, gLnk(0, "notice", "http://rcnkic.dungg.com/bbs/zboard.php?id=board_notice", ""))
        insDoc(aux1, gLnk(0, "freeboard", "http://rcnkic.dungg.com/bbs/zboard.php?id=board_free", ""))
        insDoc(aux1, gLnk(0, "gag", "http://rcnkic.dungg.com/bbs/zboard.php?id=board_gag", ""))
        insDoc(aux1, gLnk(0, "essay", "http://rcnkic.dungg.com/bbs/zboard.php?id=board_esay", ""))
        insDoc(aux1, gLnk(0, "game", "http://rcnkic.dungg.com/bbs/zboard.php?id=board_game", ""))

        aux1 = insFldr(foldersTree, gFldr("gallery", ""))
        insDoc(aux1, gLnk(0, "인물", "http://rcnkic.dungg.com/bbs/zboard.php?id=gallery_man", ""))
        insDoc(aux1, gLnk(0, "풍경", "http://rcnkic.dungg.com/bbs/zboard.php?id=gallery_poong", ""))
        insDoc(aux1, gLnk(0, "접사" , "http://rcnkic.dungg.com/bbs/zboard.php?id=gallery_zoom", ""))
        insDoc(aux1, gLnk(0, "모델" , "http://rcnkic.dungg.com/bbs/zboard.php?id=gallery_model", ""))
        insDoc(aux1, gLnk(0, "행사" , "http://rcnkic.dungg.com/bbs/zboard.php?id=gallery_event", ""))
        insDoc(aux1, gLnk(0, "누드" , "http://rcnkic.dungg.com/bbs/zboard.php?id=gallery_nude", ""))
        insDoc(aux1, gLnk(0, "회원투고" , "http://rcnkic.dungg.com/bbs/zboard.php?id=gallery_member", ""))
        insDoc(aux1, gLnk(0, "엽기" , "http://rcnkic.dungg.com/bbs/zboard.php?id=gallery_yub", ""))
        insDoc(aux1, gLnk(0, "기타" , "http://rcnkic.dungg.com/bbs/zboard.php?id=gallery_etc", ""))                

        aux1 = insFldr(foldersTree, gFldr("download", ""))
        insDoc(aux1, gLnk(0, "사진관련", "http://rcnkic.dungg.com/bbs/zboard.php?id=pds_photo", ""))
        insDoc(aux1, gLnk(0, "무비자료", "http://rcnkic.dungg.com/bbs/zboard.php?id=pds_movie", ""))
        insDoc(aux1, gLnk(0, "컴퓨터관련", "http://rcnkic.dungg.com/bbs/zboard.php?id=pds_util", ""))
        insDoc(aux1, gLnk(0, "기타자료", "http://rcnkic.dungg.com/bbs/zboard.php?id=pds_etc", ""))

        aux1 = insFldr(foldersTree, gFldr("information", ""))
        insDoc(aux1, gLnk(0, "여행정보", "http://rcnkic.dungg.com/bbs/zboard.php?id=vacation", ""))
        insDoc(aux1, gLnk(0, "건강정보", "http://rcnkic.dungg.com/bbs/zboard.php?id=health", ""))
        insDoc(aux1, gLnk(0, "사진정보", "http://rcnkic.dungg.com/bbs/zboard.php?id=photo", ""))

        aux1 = insFldr(foldersTree, gFldr("shopping", ""));
        insDoc(aux1, gLnk(0, "팝니다", "http://rcnkic.dungg.com/bbs/zboard.php?id=market1", ""))
        insDoc(aux1, gLnk(0, "삽니다", "http://rcnkic.dungg.com/bbs/zboard.php?id=market2", ""))
        insDoc(aux1, gLnk(0, "물물교환", "http://rcnkic.dungg.com/bbs/zboard.php?id=market3", ""))

        aux1 = insFldr(foldersTree, gFldr("guest", "http://rcnkic.dungg.com/bbs/zboard.php?id=guest"));
        aux1 = insFldr(foldersTree, gFldr("recommend", "http://rcnkic.dungg.com/bbs/zboard.php?id=recommend"))
        initializeDocument();

    </script>
=============================================================================================================================


꼭좀 해결해주세요 .. 벌써 네시간째 헤메이고 있습니다.
글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
캘리 플러쉬로 동영상 만드는 법이요 [1] 2007.08.10
우라질넘 링크 관련 질문입니다...^^ [3] 2007.08.10
잘될걸 클릭하면 밑에 메뉴들이 보였다가 다시 클릭하면 닫히는 소스는.. [1] 2007.08.10
신상백 내 컴퓨터에서만 음악 재생이 안 되는데, 무슨 문제인가요? [1] 2007.08.10
송봉준 최근 본 게시물 best 5 .. 어떻게 나오게 하나요 ?  
송봉준 최근 본 게시물 best 5 .. 어떻게 나오게 하나요 ?  
캘리 디비 백업에 관해서요 [2] 2007.08.10
장주찬 노프레임 홈페이지란 정확이 무엇인가요 ? [2] 2007.08.10
이수련 웹 언어 추천 부탁드립니다. [1] 2007.08.10
추상구 PHP 난수발생시키는 막강한 함수가 있다던데요~ [2] 2007.08.10
금동민 폼메일 PHP 프로그램에 관해서 질문드립니다.  
아트태극 탑버튼을 한번에 변경시키는 소스에 대한 궁금증... [2] 2007.08.10
디디다 apm으로 컴퓨터에 서버를 만들어서 홈페이지 작업을 했거든요  
최미정 FTP 에서 bbs 폴더를 삭제하고 나니, 해당 폴더는 삭제가 안됩니다.  
김시기 관리자분들 중 혹시 IBM RS6000 계열에 Aix ?!  
Tanny XHTML을 표현하기 위한 클래스 사용에 대한 질문  
이진환님 PHP에서 입력받은 c/c++소스를 gcc로 컴파일하는 방법좀...  
이은효 집에서 서버돌리기 질문입니다. [1] 2007.08.10
곽태근 제로보드 DB를 새로 프로그램 짠곳에 옮길수 있나요? [1] 2007.08.10
^0^&하요~ 일러스트,포토샾 글꼴이 한개도 안떠요;  
김종민 내용을 현재창으로 띄우는 방법좀 부탁드립니다.[노프레임] [1] 2007.08.10
이상훈 많은 파일을 한 폴더에....  
심종민 마우스 올리면 나오는 부메뉴..  
롤롤 카운터 관련 질문입니다. [1] 2007.08.10
김재민 랜덤이미지를 웹상에 올리면 안뜨는 이유 [1] 2007.08.10
김연수 창 아래부분에 링크 주소가 뜨지 않게 하고 싶은데요.  
kasiyas 현재창에서 이루어지지 않습니다.  
김용호 둘로 나위는 사이트 제작 방법 이 궁금합니다.  
김민수 세션관련 질문입니다^^; [1] 2007.08.10
이진수 경고창에 관해.. [1] 2007.08.10