function toggleLayer( whichLayer, whichTab )
{
  var elem, vis;
  if( document.getElementById ) { // this is the way the standards work 
    elem = document.getElementById( whichLayer );
  }
  else if( document.all ) { // this is the way old msie versions work
      elem = document.all[whichLayer];
  }
  else if( document.layers ) { // this is the way nn4 works
    elem = document.layers[whichLayer];
  }
  vis = elem.style;
  // if the style.display value is blank we try to figure it out here
  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
    vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
  vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}

function toggleSummary( whichTab)
{
  var elem_t, vis_t;
  if( document.getElementById ) { // this is the way the standards work 
    elem_t = document.getElementById( whichTab );
  }
  else if( document.all ) { // this is the way old msie versions work
      elem_t = document.all[whichTab];
  }
  else if( document.layers ) { // this is the way nn4 works
    elem_t = document.layers[whichTab];
  }
  vis_t = elem_t.style;
  // if the style.display value is blank we try to figure it out here
  if(vis_t.display==''&&elem_t.offsetWidth!=undefined&&elem_t.offsetHeight!=undefined)
    vis_t.display = (elem_t.offsetWidth!=0&&elem_t.offsetHeight!=0)?'block':'none';
  vis_t.backgroundPosition = (vis_t.backgroundPosition=='' || vis_t.backgroundPosition=='left -21px')?'left -1px':'left -21px';
}
