묻고답하기

게시판 삽입시 나모로 만든 메뉴에서 자바스크립트 오류가 납니다....메뉴를 펼칠시 expand에서 오류가 나는데여....

원인을 잘 모르겠습니다.....

밑에는 나모에서 만든 펼침메뉴 소스입니다....

<script language="JavaScript">
<!--
function namosw_list(parent, visible, width, height, font, size, fgColor, bgColor, indent, hbgColor, hfgColor) {
  this.additem = namosw_l_additem;
  this.addlist = namosw_l_addlist;
  this.make    = namosw_l_make;
  this.write   = namosw_l_write;
  this.show    = namosw_l_show;
  this.update  = namosw_l_update;
  this.updateparent = namosw_l_updateparent;
  this.items = new Array();
  this.id = document.namosw_lists.length;
  this.parent_id = 0;
  this.x = 0;
  this.y = 0;
  this.visible = visible;
  this.width    = width;
  this.height   = height;
  this.parent   = parent;
  this.indent = indent;
  this.fgColor = fgColor;
  this.hfgColor = hfgColor;
  this.bgColor  = bgColor;
  this.hbgColor = hbgColor;

  this.font_start = '';
  this.font_end   = '';

        
  this.font_start = '  if (size != '' && size.indexOf('pt', 0) == -1) this.font_start += ' size=' + size;
  this.font_start += '>';

  this.font_start += '<span';
  if (size.indexOf('pt', 0) != -1)
    this.font_start += ' style="font-size:' +size+ ';"';
  this.font_start += '>';

  this.font_end  = '</span>';
  this.font_end += '
';

  this.made     = false;
  this.shown    = false;
  document.namosw_lists[document.namosw_lists.length] = this;
}

function namosw_l_setclip(layer, left, right, top, bottom) {
  if (navigator.appName.indexOf('Netscape', 0) != -1) {
    layer.clip.left   = left;
    layer.clip.right  = right;
    layer.clip.top    = top;  
    layer.clip.bottom = bottom;
  } else {    
    layer.style.pixelWidth  = right-left;
    layer.style.pixelHeight = bottom-top ;
    layer.style.clip  = "rect(" + top + "," + right + "," + bottom + "," + left + ")";
  }
}

function namosw_l_write() {
  var layer, clip, str;
  for(var i = 0; i < this.items.length; i++) {
    layer = this.items[i];
    if (navigator.appName.indexOf('Netscape', 0) != -1)
      layer.visibility = "hidden";
    else
      layer.style.visibility = "hidden";
    str = "";

    str += "<table width="+this.width+" nowrap border='0' cellpadding='0' cellspacing='0' style='border-bottom:1px solid white;'><tr>";
    if (0 < this.indent) str += "<td width="+this.indent+" nowrap> </td>";
    if (layer.type == 'list') {
      str += "<td width=15  valign='middle' nowrap><a";
      if (navigator.appName.indexOf('Netscape', 0) != -1) str += " href="javascript:void(0);"";
      else                                                str += " style="cursor:hand;"";
      str += " onclick="namosw_l_expand("+layer.list.id+");"></td>";
    } else {
      str += "<td width=15 nowrap> </td>";
    }
    str += "<td height="+(this.height-3)+" width="+(this.width-15-this.indent)+" valign='middle' align='left'>";

    if (layer.url)       str += "";
    if (this.font_start) str += this.font_start;
    str += layer.text;
    if (this.font_end) str += this.font_end;
    if (layer.url)       str += "
";
    str += "</td><tr height='1'><td colspan='2'></td></tr></table>";

    str = str.replace("span", "span id='namoswlistspan" + layer.lid + "'");

    if (navigator.appName.indexOf('Netscape', 0) != -1) {
      layer.document.writeln(str);
      layer.document.close();
    } else {
      layer.innerHTML = str;
      layer.span = document.all['namoswlistspan'+layer.lid];
    }
    if (layer.type == 'list' && layer.list.visible)
      this.items[i].list.write();
  }
  this.made = true;
}

function namosw_l_show() {
  var layer;
  for(var i = 0; i < this.items.length; i++) {
    layer = this.items[i];
    namosw_l_setclip(layer, 0, this.width, 0, this.height);
    if (navigator.appName.indexOf('Netscape', 0) != -1) {
      if (layer.oBgColor) layer.document.bgColor = layer.oBgColor;
      else layer.document.bgColor = this.bgColor;
    } else {
      if (layer.oBgColor) layer.style.backgroundColor = layer.oBgColor;
      else layer.style.backgroundColor = this.bgColor;
    }
    if (layer.type == 'list' && layer.list.visible)
      layer.list.show();
  }
  this.shown = true;
}

function namosw_l_update(parent_visible, x, y) {
  var top = y, layer, list;
  for(var i = 0; i < this.items.length; i++) {
    layer = this.items[i];
    list  = layer.list;
    if (this.visible && parent_visible) {
      if (navigator.appName.indexOf('Netscape', 0) != -1) {
        layer.visibility = "visible";
        layer.top = top;
        layer.left = x;
      } else {
        layer.style.visibility = "visible";
        layer.style.pixelTop   = top;
        layer.style.pixelLeft  = x;        
//        if (layer.url) layer.style.cursor = "hand";
      }
      top += this.height;
    } else {
      if (navigator.appName.indexOf('Netscape', 0) != -1) layer.visibility = "hidden";
      else layer.style.visibility = "hidden";
    }
    if (layer.type == 'list') {
      if (list.visible) {
        if (!list.made)  list.write();
        if (!list.shown) list.show();
        if (navigator.appName.indexOf('Netscape', 0) != -1) layer.document.images[0].src = "collapsed.gif";
        else eval('document.images._img'+list.id+'.src = "collapsed.gif"');
      } else {
        if (navigator.appName.indexOf('Netscape', 0) != -1) layer.document.images[0].src = "expanded.gif";
        else eval('document.images._img'+list.id+'.src = "expanded.gif"');
      }
      if (list.made)
        top = list.update(this.visible && parent_visible, x, top);
    }
  }
  return top;
}

function namosw_l_updateparent(parent_id) {
  this.parent_id = parent_id;
  for(var i = 0; i < this.items.length; i++)
    if (this.items[i].type == 'list')
      this.items[i].list.updateparent(parent_id);
}

function namosw_l_expand(i) {
  document.namosw_lists[i].visible = !document.namosw_lists[i].visible;
  list = document.namosw_lists[document.namosw_lists[i].parent_id];
  list.update(true, list.x, list.y);
}


function namosw_l_make(x, y) {
  this.updateparent(this.id);
  this.write();
  this.show();
  this.update(true, x, y);
  this.x = x;
  this.y = y;
}

function namosw_l_additem(text, url, frame) {
  var layer = null;
  if (navigator.appName.indexOf('Netscape', 0) != -1 && this.parent)
    layer = eval('this.parent.document.layers.namoswlistitem'+document.namosw_lists.lid);
  else
    layer = eval('document.all.namoswlistitem'+document.namosw_lists.lid);
  if (layer == null) {
    if (navigator.appName.indexOf('+ '+ 'Netscape', 0) != -1)
      layer = this.parent ? new Layer(this.width, this.parent) : new Layer(this.width);
  }
  if (layer == null) return;

  if (url)   layer.url   = url;
  if (frame) {
    if (frame.indexOf('parent.') != 0)
      layer.frame = "_" + frame;
    else
      layer.frame = frame.substring(7, frame.length);
  }
  layer.type = 'item';
  layer.text = text;
  layer.lid  = document.namosw_lists.lid;
  this.items[this.items.length] = layer;
  layer.hbgColor = this.hbgColor;
  layer.oBgColor = this.bgColor;
  layer.fgColor = this.fgColor;
  layer.hfgColor = this.hfgColor;
  layer.border = 1;
  if (layer.captureEvents)
    layer.captureEvents(Event.MOUSEOVER|Event.MOUSEOUT|Event.MOUSEUP);
  layer.onmouseover = namosw_l_onmouseover;
  layer.onmouseout  = namosw_l_onmouseout;
//  layer.onmouseup   = namosw_l_onmouseup;
  document.namosw_lists.lid++;
}

function namosw_l_addlist(list, text, url, frame) {
  var layer = null;

  if (navigator.appName.indexOf('Netscape', 0) != -1 && this.parent)
    layer = eval('this.parent.document.layers.namoswlistitem'+document.namosw_lists.lid);
  else
    layer = eval('document.all.namoswlistitem'+document.namosw_lists.lid);
  if (layer == null) {
    if (navigator.appName.indexOf('Netscape', 0) != -1)
      layer = this.parent ? new Layer(this.width, this.parent) : new Layer(this.width);
  }
  if (layer == null) return;

  if (url)   layer.url   = url;
  if (frame) {
    if (frame.indexOf('parent.'+ ') != 0)
      layer.frame = "_" + frame;
    else
      layer.frame = frame.substring(7, frame.length);
  }
  layer.list = list;
  layer.type = 'list';
  layer.text = text;
  layer.lid  = document.namosw_lists.lid;
  this.items[this.items.length] = layer;
  list.parent = this;
  layer.hbgColor = this.hbgColor;
  layer.oBgColor = this.bgColor;
  layer.fgColor = this.fgColor;
  layer.hfgColor = this.hfgColor;
  if (layer.captureEvents)
    layer.captureEvents(Event.MOUSEOVER|Event.MOUSEOUT|Event.MOUSEUP);
  layer.onmouseover = namosw_l_onmouseover;
  layer.onmouseout  = namosw_l_onmouseout;
//  layer.onmouseup   = namosw_l_onmouseup;
  document.namosw_lists.lid++;
}

function namosw_l_onmouseover()
{
  if (navigator.appName.indexOf('Netscape', 0) != -1) {
    if (this.hbgColor)
      this.bgColor = this.hbgColor;
  } else {
    if (this.hbgColor) this.style.backgroundColor = this.hbgColor;
    if (this.hfgColor) this.span.style.color = this.hfgColor;
  }
  if (this.url) self.status = this.url;
}

function namosw_l_onmouseout()
{
  if (navigator.appName.indexOf('Netscape', 0) != -1) {
    this.bgColor = this.oBgColor;
  } else  {
    this.style.backgroundColor = this.oBgColor;
    this.span.style.color = this.fgColor;
  }
  if (this.url) self.status = '';
}

function namosw_l_onmouseup()
{
  if (this.url) {
    if (this.frame == 'blank') {
      window.open(this.url, 'win1');
    } else {
      var frame_obj;
      if ((frame_obj = eval(this.frame)) != null)
        frame_obj.location = this.url;
    }
  }
}


function namosw_init_list(top_layer)
{
  if (parseInt(navigator.appVersion) < 4)
    return;
  if (top_layer == '')
    return;

  document.namosw_lists     = new Array();
  document.namosw_lists.lid = 0;

  var is_ns4 = navigator.appName.indexOf('Netscape', 0) != -1 && !document.getElementById;
  var is_ns6 = navigator.appName.indexOf('Netscape', 0) != -1 && document.getElementById;

  var layer;
  if (is_ns4)      layer = document.layers[top_layer];  
  else if (is_ns6) layer = document.getElementById(top_layer);
  else             layer = document.all[top_layer];


  var string = "";
  for (i = 0; i < 13; i++) {
    string = string + "
                      "style='position: absolute;'>
";
  }
  layer.innerHTML += string;

  l1 = new namosw_list(layer, true, 150, 25, 'Arial', '8pt', 'white', '#3A9DD0', 0, '#3482A9');
  l1.additem('About KMOLD', '/kmold/about_kmold/kmold_concept.php', 'self');
    l2 = new namosw_list(layer, false, 150, 20, 'Arial', '8pt', 'white', '#7DB3D0', 10, '#6A97C0');
    l2.additem('Architecture', '/KMOLD/KMOLD_Sys/Acrchitecture/kmold_arch.php', 'self');
    l2.additem('IT Solution', '/KMOLD/KMOLD_Sys/IT_Solution/kmold_it.php', 'self');
    l2.additem('Design Solution', '/KMOLD/KMOLD_Sys/Design_Solution/kmold_ramdes.php', 'self');
      l3 = new namosw_list(layer, false, 150, 20, 'Arial', '8pt', '#2A6DA8'+ ', '#A5CFE7', 25, 'white');
      l3.additem('NCM', '/kmold/KMOLD_Sys/Mfg_Solution/NCM/kmold_ncm.php', 'self');
      l3.additem('EDM', '/kmold/KMOLD_Sys/Mfg_Solution/edm/kmold_edm.php', 'self');
      l3.additem('Gundrill', '/KMOLD/KMOLD_Sys/Mfg_Solution/Gundrill/kmold_gundrill.php', 'self');
      l3.additem('Wire Cut', '/KMOLD/KMOLD_Sys/Mfg_Solution/wire_cut/kmold_wire.php', 'self');
    l2.addlist(l3, 'Mfg. Solution', '', 'self');
  l1.addlist(l2, 'KMOLD System', '', 'self');
  l1.additem('User Community', '/zb41pl8/bbs/zboard.php?id=User_Community', 'self');
  l1.additem('KMOLD News', '/zb41pl8/bbs/zboard.php?id=Kmold_News', 'self');

  l1.make(0, 14);
}

function namosw_ns_resize()
{
  window.history.go(0);
}

// -->
</script>

</head>
<body OnLoad="namosw_init_list('layer1');" OnResize="namosw_ns_resize();" bgcolor="#3A9DD0">

    

 




    




위에 빨간색 부분쪽이 잘못된거 같은데...제로보드와 무슨 충돌이 나길래 오류가 나는지 확인 좀 부탁드립니다..
글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
키보 게시판에서 익명글 쓰는방법좀 알려주세요 file  
에스테라 000webhost.com 에서 1.7.3 제대로 작동되나요? [2] 2013.08.14 by 별님왕자
비로코 특정 IP (아이피) 차단에 관해서 [1] 2013.08.14 by S야옹이
민선킴 [급함] 도메인을 구입했는데.. ㅠㅠ [1] file 2014.10.11 by S야옹이
female_nari xe 웹로그 분석태그 질문입니다  
PePe 언어선택  
조광민 1.5.1.1 이상 버전부터 궁금한점. 그리고 사이트 메뉴 편집 관련  
수달장군 특정게시판 글등록과 삭제시 포인트 지급방법문의  
NO1.XE 스크랩에 이미지 추가 하는 방법 문의 드립니다.  
최윤한 페이지 불러오면 cpu 사용 그래프가 100% 가까이 올라갑니다.  
잇힝토리 첨부파일 에러문제 (Error Code: HTTP Error, File name: , Message:500)  
잇힝토리 짧은 주소 사용법 [1] 2013.08.14 by 쿨럭이
ttt22 방문자수가 이상하네요 [1] 2013.08.14 by 쿨럭이
Kimㅇ.ㅅ 확장변수를 기본적으로 체크된 상태로 하려면 어떻게 해야하나요? [1] 2013.08.14 by 쿨럭이
라조 컨텐츠 확장위젯에서 확장변수의 항목이름 나타나게하기!? [1] 2013.08.14 by 쿨럭이
밥많이주세요 로고보튼 누르면 이동할 주소 넣는데, 이중으로 나옵니다...(이동이 안되요) [1] 2013.08.14 by 마음의빈자리
전법소404 도메인주소/~"계정"이 사라지지 않습니다 [1] 2013.08.14 by 마음의빈자리
yoyoya "분류관리"를 검색조건으로 선택하여 검색 [1] file 2013.08.14 by sejin7940
한시운 1.7 오류 입니다. 해결 좀 도와주세요..ㅠ.ㅜ [1] file 2013.08.14 by sejin7940
gggggggggg 크롬 글등록 문제 [1] 2013.08.14 by 전법소404