
w = null;

function Layer(name) {
  if (document.getElementById) {
    this.obj = document.getElementById(name);
    this.style = document.getElementById(name).style;
  }
  else if (document.all) {
    this.obj = document.all[name];
    this.style = document.all[name].style;
  }
  else if (document.layers) {
    this.obj = document.layers[name];
    this.style = document.layers[name];
  }
}


function show_commands(id) {
//   w = window.open('/members/commands.php?id=' + id, 'commands',
//                'width=200,height=200,toolbar=0,directories=0,menubar=0,status=0,resizable=0,titlebar=0,location=0,scrollbars=no,copyhistory=0');
//   w.focus();

  var cmds = new Layer('cmds_' + id);
  cmds.style.visibility = 'visible';
  cmds.style.display = 'block';
  var smry = new Layer('smry_' + id);
  smry.style.visibility = 'hidden';
  smry.style.display = 'none';
}

function hide_commands(id) {
//   var target = obj.fromElement;
//   if (!target) {
//     target = obj.currentTarget;
//   }
//   document.write('<pre>');
//   for (i in obj) {
//     document.write(i + '=' + obj[i] + '<br>');
//   }
//   document.write('</pre>');
  var cmds = new Layer('cmds_' + id);
  cmds.style.visibility = 'hidden';
  cmds.style.display = 'none';
  var smry = new Layer('smry_' + id);
  smry.style.visibility = 'visible';
  smry.style.display = 'block';
}

