// **************************************************************************
function toggleDiv( divID )
{
  var elem, vis;

  if( document.getElementById ) { // this is the way the standards work
    elem = document.getElementById( divID );
  }
  else if( document.all ) { // this is the way old msie versions work
    elem = document.all[divID];
  }
  else if( document.layers ) { // this is the way nn4 works
    elem = document.layers[divID];
  }

  // toggle element
  vis = elem.style;

  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';

  // turn off all of the other detail divs
  toggleOffAllDetailDivs( divID );
}

// **************************************************************************
function toggleOffAllDetailDivs( divID )
{
  for( var i = 1; i <= 100; i++ ) {
    var elemID = 'details' + i;

    // don't make the divID element invisible
    if( elemID == divID ) {
      continue;
    }

    // get element
    if( document.getElementById ) { // this is the way the standards work
      elem = document.getElementById( elemID );
    }
    else if( document.all ) { // this is the way old msie versions work
      elem = document.all[elemID];
    }
    else if( document.layers ) { // this is the way nn4 works
      elem = document.layers[elemID];
    }
    else {
      return;
    }

    if( !elem ) {
      return;
    }

    elem.style.display = 'none';
  }
}