// ツリーメニュー
new Image().src = "../common/img/tm2.gif";
var op="../common/img/tm2.gif";
var cl="../common/img/tm1.gif";

function opnall(){

var cts=8;  //カテゴリ数
for (i = 1; i < cts; i++) {
  var ids = 'tM' + i;
  treeMenu(ids);
}

}

function treeMenu(id) {

 if(document.all) {
   objstyle = document.all(id).style;
   objstyle2 = document.all(id + "ex").style;
 }
 else if(document.getElementById) {
  objstyle = document.getElementById(id).style;
  objstyle2 = document.getElementById(id + "ex").style;
 }

 if(objstyle) {
  if(objstyle.display=='none') {
   objstyle.display='';
   objstyle2.background = 'url(../common/img/tm2.gif) no-repeat';
  }
  else if(objstyle.display=='') {
   objstyle.display='none';
   objstyle2.background = 'url(../common/img/tm1.gif) no-repeat';
  }
 }
}
