// jpcontents mt seminar_dl

fold = 20;

function view_sddata(){
  deldata = new Array();

  cnt = 0;
  wnobj.innerHTML = wnhtml;
  if (wncat != "all" || vmode != "all"){
    array = findobj("sdmain").childNodes;
    for (i=0; i<array.length; i++){
      eid = array[i];
      if (eid.tagName == "TR"){
        if (wncat != "all" && eid.id.substring(0, eid.id.length - 7) != wncat){
          deldata.push(eid);
        } else {
          cnt++;
          if (vmode == "fold" && cnt > fold){
            deldata.push(eid);
          } else {
            eid.className = "featshade" + ((cnt + 1) % 2 + 1);
          }
        }
      }
    }
  }

  for (i=0; i<deldata.length; i++){
    deleteobj(deldata[i]);
  }

  if (vmode == "all" || cnt <= fold){
    sdfootobj = findobj("sdfoot");
    deleteobj(sdfootobj);
  }
}

function view_all(){
  vmode = "all";
  view_sddata();
}

function findobj(fid){
  if (document.all){
    return (document.all(fid));
  } else if (document.getElementById){
    return (document.getElementById(fid));
  }
}

function deleteobj(did){
  pele = did.parentNode;
  pele.removeChild(did);
}

wnobj  = findobj("sd");
wnhtml = wnobj.innerHTML;

wncat = "all";
vmode = "fold";
view_sddata();

