function treeMenu(id) {
 var disp = document.all(id).style.display;
 document.all(id).style.display = "none";

 if(disp == "none" || disp ==""){
   document.all(id).style.display = "block";
 }

// if(disp != "none" || disp == "") {
//   document.all(id).style.display = "none";
//  }
// else {
//   document.all(id).style.display = "block";
//  }
}

function topstyle(n){
 var mao = 4;//クラス数
 var t = Math.floor(Math.random()*4);
// var clas = document.all([0-9]).class;
 opp = new Array("g","p","r","y");//クラス名
 

 return opp[t];
}

function j(thread_num,sta,end){
 if(thread_num == "now"){
   var tt = document.URL;
   if(tt.match(/\?(n|p)(\d{10})/)){
     thread_num = RegExp.$2;
     var fl = RegExp.$1;
   }else{
     alert("ＵＲＩが不正です。on Javascript");
   }

// alert(thread_num);

 }else{
   alert("まだ未対応です。");
 }

 if(end == ""){
   var loop = "0000";
 }else{
   var loop = ("0000" + Math.abs(end - sta)).slice(-4);
 }
 
/* if(sta > end){
   sta = end;
 }
*/
// alert(sta);
 sta = ("00000" + sta).slice(-5);
 
// alert("april.cgi?" + fl + thread_num + sta + "." + loop);
 location.href = "april.cgi?" + fl + thread_num + sta + "." + loop;
}

