묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
자바를 이용한 탑메뉴 질문입니다...
2003.04.16 16:20
탑 메뉴를 자바를 이용해서 했는데요...
메뉴바를 누르면 그냥 서브메뉴만 고정되네요...
메뉴바를 누르면 링크를 시킨 곳으로 이동하게 만들고 싶은데 제가 자바를 잘 몰라서 이렇게 질문을 드립니다
어떻게 하면 메뉴바를 누르면 링크 이동이 가능할까요??
홈페이지 주소 : http://hyuni.n4gate.com
★menu.js의 소스★
xmenu = new Array;
xsubmenu = new Array;
//타이틀 제목을 써준다
xmenu[0] = 'Home';
xmenu[1] = 'Profile';
xmenu[2] = 'Jeju-Info';
xmenu[3] = 'Med-Info';
xmenu[4] = 'Gallery';
xmenu[5] = 'Guest-Book';
xmenu[6] = 'Link';
xmenu[7] = 'Board1';
xmenu[8] = 'Board2';
//기본값을 위해 해당 메뉴만큼 null값을 채워준다
xsubmenu[0] = ''
xsubmenu[1] = ''
xsubmenu[2] = ''
xsubmenu[3] = ''
xsubmenu[4] = ''
xsubmenu[5] = ''
xsubmenu[6] = ''
xsubmenu[7] = ''
xsubmenu[7] = ''
xsubmenu[8] = ''
xsubmenu[0] += '<A HREF="main.php" target="main" CLASS=menudyn3>메인화면으로~~~!</A>';
xsubmenu[1] += '<A HREF="http://hyuni.n4gate.com/profile.htm" target="main" CLASS=menudyn3>제가 누군지 궁금하시죠??</A>';
xsubmenu[1] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[2] += '<A HREF="http://hyuni.n4gate.com/jeju/jeju.htm" CLASS=menudyn3>l 제주관광정보 l</A>';
xsubmenu[2] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[2] += '<A HREF="http://hyuni.n4gate.com/jeju/travel.htm" CLASS=menudyn3>일정에 따른 여행코스 l</A>';
xsubmenu[2] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[2] += '<A HREF="http://www.jtg.co.kr/sleep_info.html" CLASS=menudyn3>잠자리정보 총집합 l</A>';
xsubmenu[2] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[2] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=jeju" CLASS=menudyn3>혀니와 뽀기의 제주여행 l</A>';
xsubmenu[2] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[3] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=clinic1" CLASS=menudyn3>l 건강상식 l</A>';
xsubmenu[3] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[3] += '<A HREF="http://hyuni.n4gate.com/clinic1.htm" CLASS=menudyn3>Dr.Clinic l</A>';
xsubmenu[3] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[3] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=clinic" CLASS=menudyn3> 건강 상담실 l</A>';
xsubmenu[3] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[3] += '<A HREF="http://hyuni.n4gate.com/databank.htm" CLASS=menudyn3> 의학 자료실 l</A>';
xsubmenu[3] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[4] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=gallery" CLASS=menudyn3>알콩달콩 갤러리로~~</A>';
xsubmenu[4] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[5] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=guest" CLASS=menudyn3>흔적은 꼬~옥 여기서 남겨주고 가세요...</A>';
xsubmenu[5] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[6] += '<A HREF="http://hyuni.n4gate.com/medicalsite.htm" CLASS=menudyn3>l 의료사이트모음 l</A>';
xsubmenu[6] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[6] += '<A HREF="http://hyuni.n4gate.com/coolsite.htm" CLASS=menudyn3>Cool Site</A>';
xsubmenu[6] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[6] += '<A HREF="http://hyuni.n4gate.com/friendsite.htm" CLASS=menudyn3> 친구들의 홈피 l</A>';
xsubmenu[6] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[6] += '<A HREF="http://hyuni.n4gate.com/favorite.htm" CLASS=menudyn3> 나의 즐겨찾기 l</A>';
xsubmenu[6] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[6] += '<A HREF="http://hyuni.n4gate.com/link1.htm" CLASS=menudyn3>즐겨찾기링크모음 l</A>';
xsubmenu[6] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[7] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=notice" CLASS=menudyn3>l 공지사항 l</A>';
xsubmenu[7] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[7] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=freeboard" CLASS=menudyn3> 자유게시판 l</A>';
xsubmenu[7] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[7] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=jeju" CLASS=menudyn3> 혀니와뽀기의 제주이야기 l</A>';
xsubmenu[7] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[7] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=gallery" CLASS=menudyn3> 알콩달콩갤러리 l</A>';
xsubmenu[7] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[8] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=movie" CLASS=menudyn3>l 영화이야기 l</A>';
xsubmenu[8] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[8] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=clinic" CLASS=menudyn3> 건강상담실 l</A>';
xsubmenu[8] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[8] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=clinic1" CLASS=menudyn3> 건강상식 l</A>';
xsubmenu[8] += ' <FONT COLOR=#FFFFFF>|</FONT> '+ '+ '
xsubmenu[8] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=guest" CLASS=menudyn3> 방명록 l</A>';
xsubmenu[8] += ' <FONT COLOR=#FFFFFF>|</FONT> '
//메뉴에 스타일 시트 적용
document.write('<STYLE TYPE="text/css">');
document.write('A.menudyn3 {color:#333333; text-decoration:none;}');
document.write('A:link {text-decoration: none}');
document.write('A:visited {text-decoration: none}');
document.write('A:hover {color: #999999; text-decoration: none}');
document.write('BODY,TR,TD,INPUT{font-size:8pt;font-family:Verdana,굴림,Tahoma,Verdana,MS Sans Serif,Courier New;}');
document.write('</STYLE>');
// 테이블 시작
document.write('<DIV ALIGN=CENTER>');
document.write('<TABLE BGCOLOR=#FFFFFF CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH='+(xsubmenu.length*100)+'>');
document.write('<TR>');
document.write('<TD><TABLE CELLPADDING=5 CELLSPACING=1 BORDER=0 WIDTH=70%><TR>');
for(i=0;i<xsubmenu.length;i++) {
document.write('<TD onMouseOver="javascript:colorIt(this);MajMenu('+i+'+ ')" ALIGN=center ID=td'+i+'>');
document.write('<B><A HREF="#" onClick="return(false)" onMouseOver="MajMenu('+i+')" CLASS=menudyn3>'+xmenu[i]+'</A></B></TD>');
}
document.write('+ '</TR><TR>');
document.write('<TD COLSPAN='+(xsubmenu.length)+'>');
document.write('<ilayer id="dynamenu31" width=70%>');
document.write('<layer id="dynamenu32" width=70%>');
document.write('<div id="dynamenu33"> </div>');
document.write('</layer>');
document.write('</ilayer>');
document.write('</TD></TR></TABLE></TD></TR></TABLE>');
document.write('</DIV>');
// 테이블 끝
// 테이블 백그라운드 컬러 시작
function colorIt(tditem) {
if(document.all) { // 메뉴가 늘어나면 추가한다
document.all.td0.style.background='#D7DAFC';
document.all.td1.style.background='#D7DAFC';
document.all.td2.style.background='#D7DAFC';
document.all.td3.style.background='#D7DAFC';
document.all.td4.style.background='#D7DAFC';
document.all.td5.style.background='#D7DAFC';
document.all.td6.style.background='#D7DAFC';
document.all.td7.style.background='#D7DAFC'+ ';
document.all.td8.style.background='#D7DAFC';
tditem.style.background='#FDE6E6';
} else if(document.getElementById) { // 메뉴가 늘어나면 추가한다
document.getElementById("td0").style.background='#D7DAFC';
document.getElementById("td1").style.background='#D7DAFC';
document.getElementById("td2").style.background='#D7DAFC';
document.getElementById("td3").style.background='+ '#D7DAFC';
document.getElementById("td4").style.background='#D7DAFC';
document.getElementById("td5").style.background='#D7DAFC';
document.getElementById("td6").style.background='#D7DAFC';
document.getElementById("td7").style.background='#D7DAFC';
document.getElementById("td8").style.background='#D7DAFC';
tditem.style.background='#FDE6E6';
}
}
//테이블 백그라운 컬러 끝
function MajMenu(menu) { //타이틀 메뉴를 제어한다
which = xsubmenu[menu];
if (document.layers){
document.dynamenu31.document.dynamenu32.document.write('<B>'+which+'</B>')
document.dynamenu31.document.dynamenu32.document.close()
} else if (document.getElementById) { // 서브메뉴를 제어한다
document.getElementById("dynamenu33").innerHTML = '<CENTER><B>'+which+'</B></CENTER>';
} else if (document.all) {
dynamenu33.innerHTML=' '
dynamenu33.innerHTML='<B>'+which+'</B>';
}
}
if (document.getElementById)
colorIt(document.getElementById("td0"));
else if (document.all)
colorIt(document.all.td0);
MajMenu(0);
★menu.htm의 소스★
<html>
<head>
<base target="main">
<title> 메뉴</title>
</head>
<body bgcolor="white" topmargin="0" leftmargin="0" rightmargin="70" marginwidth="0" marginheight="0">
<p align="left"><a href="http://hyuni.n4gate.com/zb41pl3/admin_setup.php" target="_blank"><font color="white">...</font></a>
<script language="JavaScript" src="menu.js"></script>
</body>
</html>
메뉴바를 누르면 그냥 서브메뉴만 고정되네요...
메뉴바를 누르면 링크를 시킨 곳으로 이동하게 만들고 싶은데 제가 자바를 잘 몰라서 이렇게 질문을 드립니다
어떻게 하면 메뉴바를 누르면 링크 이동이 가능할까요??
홈페이지 주소 : http://hyuni.n4gate.com
★menu.js의 소스★
xmenu = new Array;
xsubmenu = new Array;
//타이틀 제목을 써준다
xmenu[0] = 'Home';
xmenu[1] = 'Profile';
xmenu[2] = 'Jeju-Info';
xmenu[3] = 'Med-Info';
xmenu[4] = 'Gallery';
xmenu[5] = 'Guest-Book';
xmenu[6] = 'Link';
xmenu[7] = 'Board1';
xmenu[8] = 'Board2';
//기본값을 위해 해당 메뉴만큼 null값을 채워준다
xsubmenu[0] = ''
xsubmenu[1] = ''
xsubmenu[2] = ''
xsubmenu[3] = ''
xsubmenu[4] = ''
xsubmenu[5] = ''
xsubmenu[6] = ''
xsubmenu[7] = ''
xsubmenu[7] = ''
xsubmenu[8] = ''
xsubmenu[0] += '<A HREF="main.php" target="main" CLASS=menudyn3>메인화면으로~~~!</A>';
xsubmenu[1] += '<A HREF="http://hyuni.n4gate.com/profile.htm" target="main" CLASS=menudyn3>제가 누군지 궁금하시죠??</A>';
xsubmenu[1] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[2] += '<A HREF="http://hyuni.n4gate.com/jeju/jeju.htm" CLASS=menudyn3>l 제주관광정보 l</A>';
xsubmenu[2] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[2] += '<A HREF="http://hyuni.n4gate.com/jeju/travel.htm" CLASS=menudyn3>일정에 따른 여행코스 l</A>';
xsubmenu[2] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[2] += '<A HREF="http://www.jtg.co.kr/sleep_info.html" CLASS=menudyn3>잠자리정보 총집합 l</A>';
xsubmenu[2] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[2] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=jeju" CLASS=menudyn3>혀니와 뽀기의 제주여행 l</A>';
xsubmenu[2] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[3] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=clinic1" CLASS=menudyn3>l 건강상식 l</A>';
xsubmenu[3] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[3] += '<A HREF="http://hyuni.n4gate.com/clinic1.htm" CLASS=menudyn3>Dr.Clinic l</A>';
xsubmenu[3] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[3] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=clinic" CLASS=menudyn3> 건강 상담실 l</A>';
xsubmenu[3] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[3] += '<A HREF="http://hyuni.n4gate.com/databank.htm" CLASS=menudyn3> 의학 자료실 l</A>';
xsubmenu[3] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[4] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=gallery" CLASS=menudyn3>알콩달콩 갤러리로~~</A>';
xsubmenu[4] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[5] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=guest" CLASS=menudyn3>흔적은 꼬~옥 여기서 남겨주고 가세요...</A>';
xsubmenu[5] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[6] += '<A HREF="http://hyuni.n4gate.com/medicalsite.htm" CLASS=menudyn3>l 의료사이트모음 l</A>';
xsubmenu[6] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[6] += '<A HREF="http://hyuni.n4gate.com/coolsite.htm" CLASS=menudyn3>Cool Site</A>';
xsubmenu[6] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[6] += '<A HREF="http://hyuni.n4gate.com/friendsite.htm" CLASS=menudyn3> 친구들의 홈피 l</A>';
xsubmenu[6] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[6] += '<A HREF="http://hyuni.n4gate.com/favorite.htm" CLASS=menudyn3> 나의 즐겨찾기 l</A>';
xsubmenu[6] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[6] += '<A HREF="http://hyuni.n4gate.com/link1.htm" CLASS=menudyn3>즐겨찾기링크모음 l</A>';
xsubmenu[6] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[7] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=notice" CLASS=menudyn3>l 공지사항 l</A>';
xsubmenu[7] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[7] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=freeboard" CLASS=menudyn3> 자유게시판 l</A>';
xsubmenu[7] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[7] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=jeju" CLASS=menudyn3> 혀니와뽀기의 제주이야기 l</A>';
xsubmenu[7] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[7] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=gallery" CLASS=menudyn3> 알콩달콩갤러리 l</A>';
xsubmenu[7] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[8] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=movie" CLASS=menudyn3>l 영화이야기 l</A>';
xsubmenu[8] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[8] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=clinic" CLASS=menudyn3> 건강상담실 l</A>';
xsubmenu[8] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[8] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=clinic1" CLASS=menudyn3> 건강상식 l</A>';
xsubmenu[8] += ' <FONT COLOR=#FFFFFF>|</FONT> '+ '+ '
xsubmenu[8] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=guest" CLASS=menudyn3> 방명록 l</A>';
xsubmenu[8] += ' <FONT COLOR=#FFFFFF>|</FONT> '
//메뉴에 스타일 시트 적용
document.write('<STYLE TYPE="text/css">');
document.write('A.menudyn3 {color:#333333; text-decoration:none;}');
document.write('A:link {text-decoration: none}');
document.write('A:visited {text-decoration: none}');
document.write('A:hover {color: #999999; text-decoration: none}');
document.write('BODY,TR,TD,INPUT{font-size:8pt;font-family:Verdana,굴림,Tahoma,Verdana,MS Sans Serif,Courier New;}');
document.write('</STYLE>');
// 테이블 시작
document.write('<DIV ALIGN=CENTER>');
document.write('<TABLE BGCOLOR=#FFFFFF CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH='+(xsubmenu.length*100)+'>');
document.write('<TR>');
document.write('<TD><TABLE CELLPADDING=5 CELLSPACING=1 BORDER=0 WIDTH=70%><TR>');
for(i=0;i<xsubmenu.length;i++) {
document.write('<TD onMouseOver="javascript:colorIt(this);MajMenu('+i+'+ ')" ALIGN=center ID=td'+i+'>');
document.write('<B><A HREF="#" onClick="return(false)" onMouseOver="MajMenu('+i+')" CLASS=menudyn3>'+xmenu[i]+'</A></B></TD>');
}
document.write('+ '</TR><TR>');
document.write('<TD COLSPAN='+(xsubmenu.length)+'>');
document.write('<ilayer id="dynamenu31" width=70%>');
document.write('<layer id="dynamenu32" width=70%>');
document.write('<div id="dynamenu33"> </div>');
document.write('</layer>');
document.write('</ilayer>');
document.write('</TD></TR></TABLE></TD></TR></TABLE>');
document.write('</DIV>');
// 테이블 끝
// 테이블 백그라운드 컬러 시작
function colorIt(tditem) {
if(document.all) { // 메뉴가 늘어나면 추가한다
document.all.td0.style.background='#D7DAFC';
document.all.td1.style.background='#D7DAFC';
document.all.td2.style.background='#D7DAFC';
document.all.td3.style.background='#D7DAFC';
document.all.td4.style.background='#D7DAFC';
document.all.td5.style.background='#D7DAFC';
document.all.td6.style.background='#D7DAFC';
document.all.td7.style.background='#D7DAFC'+ ';
document.all.td8.style.background='#D7DAFC';
tditem.style.background='#FDE6E6';
} else if(document.getElementById) { // 메뉴가 늘어나면 추가한다
document.getElementById("td0").style.background='#D7DAFC';
document.getElementById("td1").style.background='#D7DAFC';
document.getElementById("td2").style.background='#D7DAFC';
document.getElementById("td3").style.background='+ '#D7DAFC';
document.getElementById("td4").style.background='#D7DAFC';
document.getElementById("td5").style.background='#D7DAFC';
document.getElementById("td6").style.background='#D7DAFC';
document.getElementById("td7").style.background='#D7DAFC';
document.getElementById("td8").style.background='#D7DAFC';
tditem.style.background='#FDE6E6';
}
}
//테이블 백그라운 컬러 끝
function MajMenu(menu) { //타이틀 메뉴를 제어한다
which = xsubmenu[menu];
if (document.layers){
document.dynamenu31.document.dynamenu32.document.write('<B>'+which+'</B>')
document.dynamenu31.document.dynamenu32.document.close()
} else if (document.getElementById) { // 서브메뉴를 제어한다
document.getElementById("dynamenu33").innerHTML = '<CENTER><B>'+which+'</B></CENTER>';
} else if (document.all) {
dynamenu33.innerHTML=' '
dynamenu33.innerHTML='<B>'+which+'</B>';
}
}
if (document.getElementById)
colorIt(document.getElementById("td0"));
else if (document.all)
colorIt(document.all.td0);
MajMenu(0);
★menu.htm의 소스★
<html>
<head>
<base target="main">
<title> 메뉴</title>
</head>
<body bgcolor="white" topmargin="0" leftmargin="0" rightmargin="70" marginwidth="0" marginheight="0">
<p align="left"><a href="http://hyuni.n4gate.com/zb41pl3/admin_setup.php" target="_blank"><font color="white">...</font></a>
<script language="JavaScript" src="menu.js"></script>
</body>
</html>
xsubmenu = new Array;
xmenutype = new Array;
//타이틀 제목을 써준다
xmenu[0] = 'Home';
xmenu[1] = 'Profile';
xmenu[2] = 'Jeju-Info';
xmenu[3] = 'Med-Info';
xmenu[4] = 'Gallery';
xmenu[5] = 'Guest-Book';
xmenu[6] = 'Link';
xmenu[7] = 'Board1';
xmenu[8] = 'Board2';
//메뉴의 형태를 정한다 0 - submenu 출력, 1 - 링크
xmenutype[0] = 1;
xmenutype[1] = 0;
xmenutype[2] = 0;
xmenutype[3] = 0;
xmenutype[4] = 0;
xmenutype[5] = 0;
xmenutype[6] = 0;
xmenutype[7] = 0;
xmenutype[8] = 0;
//기본값을 위해 해당 메뉴만큼 null값을 채워준다
xsubmenu[0] = ''
xsubmenu[1] = ''
xsubmenu[2] = ''
xsubmenu[3] = ''
xsubmenu[4] = ''
xsubmenu[5] = ''
xsubmenu[6] = ''
xsubmenu[7] = ''
xsubmenu[7] = ''
xsubmenu[8] = ''
xsubmenu[0] += 'http://www.musicnplay.com'; //대신 링크 주소를
xsubmenu[1] += '<A HREF="http://hyuni.n4gate.com/profile.htm" target="main" CLASS=menudyn3>제가 누군지 궁금하시죠??</A>';
xsubmenu[1] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[2] += '<A HREF="http://hyuni.n4gate.com/jeju/jeju.htm" CLASS=menudyn3>l 제주관광정보 l</A>';
xsubmenu[2] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[2] += '<A HREF="http://hyuni.n4gate.com/jeju/travel.htm" CLASS=menudyn3>일정에 따른 여행코스 l</A>';
xsubmenu[2] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[2] += '+ '+ '<A HREF="http://www.jtg.co.kr/sleep_info.html" CLASS=menudyn3>잠자리정보 총집합 l</A>';
xsubmenu[2] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[2] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=jeju" CLASS=menudyn3>혀니와 뽀기의 제주여행 l</A>';
xsubmenu[2] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[3] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=clinic1" CLASS=menudyn3>l 건강상식 l</A>';
xsubmenu[3] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[3] += '<A HREF="http://hyuni.n4gate.com/clinic1.htm" CLASS=menudyn3>Dr.Clinic l</A>';
xsubmenu[3] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[3] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=clinic" CLASS=menudyn3> 건강 상담실 l</A>';
xsubmenu[3] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[3] += '<A HREF="http://hyuni.n4gate.com/databank.htm" CLASS=menudyn3> 의학 자료실 l</A>';
xsubmenu[3] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[4] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=gallery" CLASS=menudyn3>알콩달콩 갤러리로~~</A>';
xsubmenu[4] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[5] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=guest" CLASS=menudyn3>흔적은 꼬~옥 여기서 남겨주고 가세요...</A>';
xsubmenu[5] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[6] += '<A HREF="http://hyuni.n4gate.com/medicalsite.htm" CLASS=menudyn3>l 의료사이트모음 l</A>';
xsubmenu[6] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[6] += '<A HREF="http://hyuni.n4gate.com/coolsite.htm" CLASS=menudyn3>Cool Site</A>';
xsubmenu[6] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[6] += '<A HREF="http://hyuni.n4gate.com/friendsite.htm" CLASS=menudyn3> 친구들의 홈피 l</A>';
xsubmenu[6] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[6] += '<A HREF="http://hyuni.n4gate.com/favorite.htm" CLASS=menudyn3> 나의 즐겨찾기 l</A>';
xsubmenu[6] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[6] += '<A HREF="http://hyuni.n4gate.com/link1.htm" CLASS=menudyn3>즐겨찾기링크모음 l</A>';
xsubmenu[6] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[7] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=notice" CLASS=menudyn3>l 공지사항 l</A>';
xsubmenu[7] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[7] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=freeboard" CLASS=menudyn3> 자유게시판 l</A>';
xsubmenu[7] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[7] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=jeju" CLASS=menudyn3> 혀니와뽀기의 제주이야기 l</A>';
xsubmenu[7] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[7] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=gallery" CLASS=menudyn3> 알콩달콩갤러리 l</A>';
xsubmenu[7] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[8] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=movie" CLASS=menudyn3>l 영화이야기 l</A>';
xsubmenu[8] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[8] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=clinic" CLASS=menudyn3> 건강상담실 l</A>';
xsubmenu[8] += ' <FONT COLOR=#FFFFFF>|</FONT> '+ '
xsubmenu[8] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=clinic1" CLASS=menudyn3> 건강상식 l</A>';
xsubmenu[8] += ' <FONT COLOR=#FFFFFF>|</FONT> '
xsubmenu[8] += '<A HREF="http://hyuni.n4gate.com/zb41pl3/zboard.php?id=guest" CLASS=menudyn3> 방명록 l</A>';
xsubmenu[8] += ' <FONT COLOR=#FFFFFF>|</FONT> '
//메뉴에 스타일 시트 적용
document.write('<STYLE TYPE="text/css">'+ ');
document.write('A.menudyn3 {color:#333333; text-decoration:none;}');
document.write('A:link {text-decoration: none}');
document.write('A:visited {text-decoration: none}');
document.write('A:hover {color: #999999; text-decoration: none}');
document.write('BODY,TR,TD,INPUT{font-size:8pt;font-family:Verdana,굴림,Tahoma,Verdana,MS Sans Serif,Courier New;}');
document.write('</STYLE>');
// 테이블 시작
document.write('<DIV ALIGN=CENTER>');
document.write('<TABLE BGCOLOR=#FFFFFF CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH='+(xsubmenu.length*100)+'>');
document.write('<TR>');
document.write('<TD><TABLE CELLPADDING=5 CELLSPACING=1 BORDER=0 WIDTH=70%><TR>');
for(i=0;i<xsubmenu.length;i++) {
if(xmenutype[i] == 0){ //서브메뉴
document.write('<TD onMouseOver="javascript:colorIt(this);MajMenu('+i+')" ALIGN=center ID=td'+i+'>');
document.write('<B><A HREF="#" onClick="return(false)" onMouseOver="MajMenu('+i+')" CLASS=menudyn3>'+xmenu[i]+'</A></B></TD>');
}else if(xmenutype[i] == 1){ //링크
document.write('<TD onMouseOver="javascript:colorIt(this);" ALIGN=center ID=td'+i+'>');
document.write('<B><A HREF="' + xsubmenu[i] + '" CLASS=menudyn3 target=_blank>'+xmenu[i]+'</A></B></TD>'); //타겟 값은 알아서 조절
}
}
document.write('</TR><TR>');
document.write('<TD COLSPAN='+(xsubmenu.length)+'>');
document.write('<ilayer id="dynamenu31" width=70%>');
document.write('<layer id="dynamenu32" width=70%>');
document.write('<div id="dynamenu33"> </div>');
document.write('</layer>');
document.write('+ '</ilayer>');
document.write('</TD></TR></TABLE></TD></TR></TABLE>');
document.write('</DIV>');
// 테이블 끝
// 테이블 백그라운드 컬러 시작
function colorIt(tditem) {
if(document.all) { // 메뉴가 늘어나면 추가한다
document.all.td0.style.background='#D7DAFC';
document.all.td1.style.background='#D7DAFC';
document.all.td2.style.background='#D7DAFC'+ ';
document.all.td3.style.background='#D7DAFC';
document.all.td4.style.background='#D7DAFC';
document.all.td5.style.background='#D7DAFC';
document.all.td6.style.background='#D7DAFC';
document.all.td7.style.background='#D7DAFC';
document.all.td8.style.background='+ '#D7DAFC';
tditem.style.background='#FDE6E6';
} else if(document.getElementById) { // 메뉴가 늘어나면 추가한다
document.getElementById("td0").style.background='#D7DAFC';
document.getElementById("td1").style.background='#D7DAFC';
document.getElementById("td2").style.background='#D7DAFC';
document.getElementById("td3").style.background='#D7DAFC';
document.getElementById("td4").style.background='#D7DAFC';
document.getElementById("td5").style.background='#D7DAFC';
document.getElementById("td6").style.background='#D7DAFC';
document.getElementById("td7").style.background='#D7DAFC';
document.getElementById("td8").style.background='#D7DAFC';
tditem.style.background='#FDE6E6';
}
}
//테이블 백그라운 컬러 끝
function MajMenu(menu) { //타이틀 메뉴를 제어한다
which = xsubmenu[menu];
if (document.layers){
document.dynamenu31.document.dynamenu32.document.write('<B>'+which+'</B>')
document.dynamenu31.document.dynamenu32.document.close()
} else if (document.getElementById) { // 서브메뉴를 제어한다
document.getElementById("dynamenu33").innerHTML = '<CENTER><B>'+which+'</B></CENTER>';
} else if (document.all) {
dynamenu33.innerHTML=' '
dynamenu33.innerHTML='<B>'+which+'+ '</B>';
}
}
if (document.getElementById)
colorIt(document.getElementById("td0"));
else if (document.all)
colorIt(document.all.td0);
MajMenu(0);