묻고답하기

http://opain.nayana.com/01.html주메뉴에 마우스를 올리면 서브메뉴가 나타나는 소스인데 전체 테이블안에 설정을 했더니 서브메뉴가 한쪽으로만
나타납니다. 해당 주메뉴에 표시하려면 어떻게 해야 하나요?


////////////////////Please leave this notice////////////////////
//
//        DropDown Menu 1.0
//        By Evgeny Novikov (java@aladin.ru)
//        http://java.skyteam.ru
//        It works only with IE5.0(++) and Netscape6.0(++)
//        Free to use!
//
////////////////////Last modified 2002-03-05////////////////////

//        Modify following four lines to customize your menu
var tdColor="#FFFFFF";                // menu item text color
var tdBgColor="#993366";        // menu item background color
var hlColor="#000000";                // highlight text color
var hlBgColor="#FFFFBB";        // highlight background color
//        After change, modify same values in your *.css file

var md=250;
var ti=-1;
var oTd=new Object;
oTd=null;

function doMenu(td){
        clearTimeout(ti);
        td.style.backgroundColor=hlBgColor;
        td.style.color=hlColor;
        var i;
        var sT="";
        var tda=new Array();
        tda=td.id.split("_");
        if(oTd!=null){
                var tdo=new Array();
                tdo=oTd.id.split("_");
                for(i=1;i<tdo.length;i++){
                        sT+="_"+tdo[i];
                        if(tdo[i]!=tda[i]){
                                document.getElementById("td"+sT).style.backgroundColor=tdBgColor;
                                document.getElementById("td"+sT).style.color=tdColor;
                                if(document.getElementById("tbl"+sT)!=null)
                                        document.getElementById("tbl"+sT).style.visibility="hidden";
                        }
                }                        
        }
        oTd=td;
        sT="tbl";
        for(i=1;i<tda.length;i++)
                sT+="_"+tda[i];
        if(document.getElementById(sT)!=null)
                document.getElementById(sT).style.visibility="visible";

}

function clearMenu(){
        if(oTd!=null){
                var tdo=new Array();
                tdo=oTd.id.split("_");
                var sT="";
                for(var i=1;i<tdo.length;i++){
                        sT+="_"+tdo[i];
                        document.getElementById("td"+sT).style.backgroundColor=tdBgColor;
                        document.getElementById("td"+sT).style.color=tdColor;
                        if(document.getElementById("tbl"+sT)!=null)
                                document.getElementById("tbl"+sT).style.visibility="hidden";
                }
                oTd=null;                        
        }
}

function runMenu(strURL){
        location.href=strURL;
}

var tt="";
var sT="";
var pT=new Array();
var tA=new Array();

function getCoord(st){
        tA=st.split("_");
        if(tA.length>2){
                tA=tA.slice(0,-1);
                tt=tA.join("_");
                return (document.getElementById("tbl"+tt).offsetTop+document.getElementById("td"+st).offsetTop+4)+"px;left:"+
                        (document.getElementById("tbl"+tt).offsetLeft+document.getElementById("td"+st).offsetWidth-2)+"px">";
        }
        return (document.getElementById("mainmenu").offsetTop+document.getElementById("td"+st).offsetHeight-2)+"px;left:"+
                  (document.getElementById("mainmenu").offsetLeft+document.getElementById("td"+st).offsetLeft+5)+"px">";
}

var sH="<table class="menu" id="mainmenu" cellspacing="0"><tr>";
var p=0;
var j=0;
while(eval("typeof(td_"+ ++j +")!="undefined"")){
        sH+="<td id="td_"+j+"" onmouseover="doMenu(this)" onmouseout="ti=setTimeout('clearMenu()',md)"";
        sH+=(eval("typeof(url_"+j+")!="undefined""))?" onclick="runMenu('"+eval("url_"+j)+"')">":">";
        sH+=eval("td_"+j)+"</td>";
        if (eval("typeof(td_"+j+"_1)!="undefined""))
                pT[p++]="_"+j;
}
sH+="</tr></table>";
document.write(sH);
for(var q=0;typeof(pT[q])!="undefined";q++){
        sT=pT[q];
        sH="";
        j=0;
        sH+="<table class="menu" id="tbl"+sT+"" cellspacing="0" style="top:"+getCoord(sT);
        while (eval("typeof(td"+sT+"_"+ ++j +")!="undefined"")){
                sH+="<tr><td id="td"+sT+"_"+j+"" onmouseover="doMenu(this)" onmouseout="ti=setTimeout('clearMenu()',md)"";
                sH+=(eval("typeof(url"+sT+"_"+j+")!="undefined""))?" onclick="runMenu('"+eval("url"+sT+"_"+j)+"')">":">";
                sH+=eval("td"+sT+"_"+j)+"</td></tr>";
                if (eval("typeof(td"+sT+"_"+j+"_1)!="undefined""))
                        pT[p++]=sT+"_"+j;
        }
        sH+="</table>";
        document.write(sH);
}
document.getElementById("mainmenu").style.visibility="visible";


글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
UPANGEL 폼에서 몇번째자리가 원하는숫자가 아닐시 에러뜨게하기.. [1] 2007.08.10
전설의 제로보드 갤러리에서 스샷클릭시 링크다운로드하는법??  
정성영 제로보드 글쓰기 할시 기본 양식 (폼)을 주는 방법? [2] 2007.08.10
지니 tar 로 압축 풀기 할때 [2] 2007.08.10
레몽 포인트 추적기능 구현하려면? [7] 2007.08.10
장은수 홈페이지 공부하면서 만드는 중입니당. 여기 뭐가 잘못된건가요?  
callia 질문좀할게요 ㅠㅠ 좀 알려주세요 [1] 2007.08.10
김설향 form 태그가 안 되는 이유가?? [1] 2007.08.10
김남섭 노프레임 홈피 제작시... [1] 2007.08.10
니니 이미지롤오버에 관한건데요... [2] 2007.08.10
김지영 다중선택창선택하고 이동시키기  
Marines 급질문..php수정관련..  
다향 스크롤바가 보이지 않게 하려면 [1] 2007.08.10
김요한 그림을 표에 딱붙게 할려면 어떡하죠? [1] 2007.08.10
Freaky 슬라이스와 몇가지 포토샵질문  
엄성용 게시판 크기가 맘대로 바뀝니다...;; [2] 2007.08.10
김영기 노프레임 홈페이지를 만들때 상하 여백이 생기는 문제... [3] 2007.08.10
석인수 쿠키 사용법 질문 [1] 2007.08.10
왜,그러지 object 로 포토겔러리 최근 게시물 을 삽입 하였는데  
인자기 이거 어떻게 하는거죠?? [1] 2007.08.10
PAIN 레이어를 이용한 서브메뉴 자바소스인데 어디가 잘못된건지 모르겠어요!!  
신창숙 제로보드 연결부분이..  
김문성 공지사항이나 게시판이요 [1] 2007.08.10
권기덕 상업용으로 제로보드 가능한가여? [2] 2007.08.10
sky iframe 자동 높이 조절할때 화면 맨 위로 가지 않아요  
바비 스크롤바 문제인데요 아무리 검색해도 안나오네요 ㅠㅠㅠㅠㅠㅠㅠ  
인자기 에니메이션 베너 제작에 관한 문의입니다 [1] 2007.08.10
주안응삼이™ FLASH PLAYER 보안 질문요~~~  
오형철 최근 게시물 질문이여!! (노프레임 사용)  
적초 제서버에서 계정을제공받는분들이요(DNS) [3] 2007.08.10