묻고답하기

제가 활용하려고 하는 소스입니다..
그런데, 이 소스는 주메뉴가 3개라서.. 저의 홈페이지에 적용을 시킬려고 하니 소스변경이 필수인데..
그 부분을 잘 모르겠습니다..

단순하게 3으로 변경된 부분을 수정하고 메뉴추가하면 될줄 알았더니 안되네요..(컴맹의 한계.. -.-;;)

다음 소스 보시고 조언 좀 해주셨으면 합니다..

<SCRIPT language=JavaScript>
<!--
// These scripts were originally found on cooltype.com.
// Modified 01/01/1999 by Tobias Ratschiller for linuxapps.com
// Modified 03/12/2001 by hgkim

  document.onmouseover = doDocumentOnMouseOver ;
  document.onmouseout = doDocumentOnMouseOut ;

  max_num_of_menu = 3;   // 전체 메뉴의 개수

  function doDocumentOnMouseOver() {
    var eSrc = window.event.srcElement ;
    if (eSrc.className == "item") {
      window.event.srcElement.className = "highlight";
    }
  }

  function doDocumentOnMouseOut() {
    var eSrc = window.event.srcElement ;
    if (eSrc.className == "highlight") {
      window.event.srcElement.className = "item";
    }
  }


  var bV=parseInt(navigator.appVersion);
  NS4=(document.layers) ? true : false;
  IE4=((document.all)&&(bV>=4))?true:false;
  ver4 = (NS4 || IE4) ? true : false;

  function expandIt(){return}
  function expandAll(){return}
//-->
</SCRIPT>

<script LANGUAGE="JavaScript1.2">
<!--
isExpanded = false;

function getIndex(el) {
  ind = null;
  for (i=0; i<document.layers.length; i++) {
    whichEl = document.layers[i];
    if (whichEl.id == el) {
      ind = i;
      break;
    }
  }
  return ind;
}

function arrange() {
  nextY = document.layers[firstInd].pageY + document.layers[firstInd].document.height;
  for (i=firstInd+1; i<document.layers.length; i++) {
    whichEl = document.layers[i];
    if (whichEl.visibility != "hide") {
      whichEl.pageY = nextY;
      nextY += whichEl.document.height;
    }
  }
}

function initIt(){
  if (NS4) {
    for (i=0; i<document.layers.length; i++) {
      whichEl = document.layers[i];
      if (whichEl.id.indexOf("Child") != -1) whichEl.visibility = "hide";
    }
    arrange();
  } else {
    tempColl = document.all.tags("DIV");
    for (i=0; i<tempColl.length; i++) {
      if (tempColl(i).className == "child") tempColl(i).style.display = "none";
    }
  }
}

function expandIt(el) {
  if (!ver4) return;
  if (IE4) {expandIE(el)} else {expandNS(el)}
}

function expandIE(el) {
  whichEl = eval(el + "Child");

  // Modified Tobias Ratschiller 01-01-99:
  // event.srcElement obviously only works when clicking directly
  // on the image. Changed that to use the images's ID instead (so
  // you've to provide a valid ID!).

  //whichIm = event.srcElement;
  whichIm = eval(el+"Img");

  if (whichEl.style.display == "none") {
    for (i=1; i<=max_num_of_menu; i++) {
      everyEl = eval("el" + i + "Child");
      everyIm = eval("el" + i + "Img");
      if (everyEl != whichEl) {
        everyEl.style.display = "none";
        everyIm.src = "img/plus.gif";
      } else {
        whichEl.style.display = "block";
        whichIm.src = "img/minus.gif";
      }
    }
  } else {
    whichEl.style.display = "none";
    whichIm.src = "img/plus.gif";
  }
  window.event.cancelBubble = true ;
}

function expandNS(el) {
  whichEl = eval("document." + el + "Child");
  whichIm = eval("document." + el + "Parent.document.images['imEx']");
  if (whichEl.visibility == "hide") {
    for (i=1; i<=max_num_of_menu; i++) {
      everyEl = eval("document.el" + i + "Child");
      everyIm = eval("document.el" + i + "Parent.document.images['imEx']");
      if (everyEl != whichEl) {
        everyEl.visibility = "hide";
        everyIm.src = "img/plus.gif";
      } else {
        whichEl.visibility = "show";
        whichIm.src = "img/minus.gif";
      }
    }
  } else {
    whichEl.visibility = "hide";
    whichIm.src = "img/plus.gif";
  }
  arrange();
}

function showAll() {
  for (i=firstInd; i<document.layers.length; i++) {
    whichEl = document.layers[i];
    whichEl.visibility = "show";
  }
}

function expandAll(isBot) {
  newSrc = (isExpanded) ? "img/plus.gif" : "img/minus.gif";

  if (NS4) {
  // TR-02-01-99: Don't need that
  // document.images["imEx"].src = newSrc;
    for (i=firstInd; i<document.layers.length; i++) {
      whichEl = document.layers[i];
      if (whichEl.id.indexOf("Parent") != -1) {
        whichEl.document.images["imEx"].src = newSrc;
      }
      if (whichEl.id.indexOf("Child") != -1) {
        whichEl.visibility = (isExpanded) ? "hide" : "show";
      }
    }
    arrange();
    if (isBot && isExpanded) scrollTo(0,document.layers[firstInd].pageY);
  } else {
    divColl = document.all.tags("DIV");
    for (i=0; i<divColl.length; i++) {
       if (divColl(i).className == "child") {
         divColl(i).style.display = (isExpanded) ? "none" : "block";
       }
    }
    imColl = document.images.item("imEx");
    for (i=0; i<imColl.length; i++) {
      imColl(i).src = newSrc;
    }
  }
  isExpanded = !isExpanded;
}

with (document) {
  write("<STYLE TYPE='text/css'>");
  if (NS4) {
    write(".parent {font-family: 굴림, Arial, Helvetica, sans-serif; color: #000000; text-decoration:none; position:absolute; visibility:show;}");
    write(".child {font-family: 굴림, Arial, Helvetica, sans-serif; font-size: 8pt;color: #000000; position:absolute; visibility:hidden}");
    write(".item { color: black; text-decoration:none;}");
    write(".s_item { color: black; text-decoration:none;}");
    write(".regular {font-family: Arial,Helvetica,sans-serif; position:absolute; visibility:hidden}");
    write("DIV { color:black; }")
  } else {
    write(".child {font-family: 굴림, Arial, Helvetica, sans-serif; color: #000000; text-decoration:none; display:none}");
    write(".parent {font-family: 굴림, Arial, Helvetica, sans-serif; color: #000000; text-decoration:none;}");
    write(".item { color: black; font-size:12px; text-decoration:none;}");
    write(".s_item { color: black; font-size:11px; text-decoration:none;}");
    write(".highlight { color:#FF9900 ; font-size:9pt; text-decoration:none;}");
    write(".heada { font-size:9pt;}");
    write("DIV { color:black; }")
  }
  write("</STYLE>");
}

onload = initIt;

//-->
</script>
<base target="MAIN">
<style type="text/css">
//<!--
BODY { font-family : 굴림, Arial, Helvetica, sans-serif; font-size: 12px; }
//-->
</style>
</HEAD>

<BODY bgColor=#FFCC00 leftMargin=0 topMargin=5 marginheight=0 marginwidth=0><P>


<HR size=1 width=115 align=center>

<div ID="el1Parent" CLASS="parent">
<IMG src=./img/n.gif width=3>
<a class="item" HREF="./no.php3" onClick="expandIt('el1'); return false;">
<img NAME="imEx" SRC="img/plus.gif" BORDER="0" ALT="+" width="9" height="9" ID="el1Img"></a>
<a class="item" HREF="./bank/note.php3?dist=linux_notes" onClick="expandIt('el1');">
<font color="black" class="heada">Linux</font></a>
</div>
<div ID="el1Child" CLASS="child" style='line-height:100%'>
 ├ <a class="s_item" HREF="./bank/class.php3?dist=linux_basic">Basic</a><br>
 ├ <a class="s_item" HREF="./bank/class.php3?dist=linux_admin">Admin Work</a><br>
 ├ <a class="s_item" HREF="./bank/class.php3?dist=linux_network">Networking</a><br>
 └ <a class="s_item" HREF="./bank/class.php3?dist=linux_security">Security</a><br>
<IMG src=./img/n.gif height=5><br>
</div>

<div ID="el2Parent" CLASS="parent">
<IMG src=./img/n.gif width=3>
<a class="item" HREF="./no.php3" onClick="expandIt('el2'); return false;">
<img NAME="imEx" SRC="img/plus.gif" BORDER="0" ALT="+" width="9" height="9" ID="el2Img"></a>
<a class="item" HREF="./bank/note.php3?dist=wb_notes" onClick="expandIt('el2');">
<font color="black" class="heada">Internet</font></a>
</div>
<div ID="el2Child" CLASS="child" style='line-height:100%'>
 ├ <a class="s_item" HREF="./bank/class.php3?dist=ibiz">i-biz info</a><br>
 ├ <a class="s_item" HREF="./documents/color.php3">Color Selector</a><br>
 ├ <a class="s_item" HREF="./bank/class.php3?dist=php_class">php+MySQL</a><br>
 ├ <a class="s_item" HREF="./bank/pds.php3?dist=gn">General pds</a><br>
 ├ <a class="s_item" HREF="./bank/pds.php3?dist=sk">011,017 pds</a><br>
 ├ <a class="s_item" HREF="./bank/pds.php3?dist=nm">016,018 pds</a><br>
 ├ <a class="s_item" HREF="./bank/pds.php3?dist=ez">019 pds</a><br>
 ├ <a class="s_item" HREF="./bank/bookmark.php3">Bookmark</a><br>
 └ <a class="s_item" HREF="./bank/scrshot.php3?dist=H_samples">HP Samples</a><br>
<IMG src=./img/n.gif height=5><br>
</div>

<div ID="el3Parent" CLASS="parent">
<IMG src=./img/n.gif width=3>
<a class="item" HREF="./no.php3" onClick="expandIt('el3'); return false;">
<img NAME="imEx" SRC="img/plus.gif" BORDER="0" ALT="+" width="9" height="9" ID="el3Img"></a>
<a class="item" HREF="./bank/note.php3?dist=report_notes" onClick="expandIt('el3');">
<font color="black" class="heada">Class</font></a>
</div>
<div ID="el3Child" CLASS="child" style='line-height:100%'>
 ├ <a class="s_item" HREF="./bank/class.php3?dist=class_pds">pds</a><br>
 ├ <a class="s_item" HREF="./bank/submit.php3?dist=report_submit">Submit</a><br>
 └ <a class="s_item" HREF="./bank/forum.php3?dist=report_Q_A">Q & A</a><br>
<IMG src=./img/n.gif height=5><br>
</div>

<script LANGUAGE="JavaScript1.2">
  <!--
  if (NS4) {
    firstEl = "el1Parent";
    firstInd = getIndex(firstEl);
    showAll();
    arrange();
  }
  //-->
</script>
글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
보고 레이지로드 이미지뷰어 무한로딩현상 [9] 2015.05.17 by 보고
가을풍경 게시판에서 닉네임 클릭시 회원정보 팝업이 안나타납니다. file  
아낙0160f 파일 업로드 문제좀 문의할게요 [2] 2015.05.16 by 아낙0160f
thdwjdtjr 한 IP당 하루에 자료 다운 갯수를 제한 하고자 합니다 [1] 2015.05.16 by 돼지코구뇽
왜케어렵냐 수원 초보자 글올립니다. [7] 2015.05.16 by 돼지코구뇽
컴출장수리 default.login.css 파일이 멀웨어라고 호스팅을 막네요. 수정 부탁 드립니다.  
LAB_ 희안합니다. 모바일 검색시 pc 화면이 [2] 2015.05.16 by LAB_
color77 xe버전 php버전 운영버전 동일하고 웹서버만 아파치-> nginx로 바꾸는건 기존 설치한 모듈 애드온엔 영향 안주겠죠?  
착한동구 졸졸이 스토커))고정이 안된다면 퀵바 만드는 가이드 있나요?  
ehgud1 xe이용방법 [1] 2015.05.16 by fromthere
착한동구 이런식으로 위젯을 수정해주고싶은데요 [6] file 2015.05.16 by 착한동구
빅스타 간곡히 부탁드립니다. 글작성시 레이아웃이 깨집니다. file  
아나까떼 카테고리 미설정시 글 미등록하는 법? [2] 2015.05.16 by 아나까떼
노력중.. 크롬에서만 홈페이지 접속이 안됩니다. [2] 2015.05.16 by 휘즈
jwsgis 스케치북 유튜브 게시판 설치문의.. [20] file 2015.05.16 by 면봉2
착한동구 레이아웃에 배너달기요  
큰돌♡ 게시판 생성할 때 초기값을 변경할 수 있을까요? [2] 2015.05.16 by 큰돌♡
슬픔아리 1.8 버전 이후 관리자 로그인 페이지가 사라졌나요? [4] 2015.05.16 by 슬픔아리
고고싱229af 기초적인질문입니다 메인화면 마지막 구축단계 도와주세요ㅠㅠ [3] file 2015.05.16 by 고고싱229af
inJin 스케치북 게시판 select 폼 크기관련해서 질문 드립니다 [2] 2015.05.16 by inJin