function ToggleDisplay( id )
{
  var obj = GetObject(id).style;
  var state = obj.display == "none" ? "block" : "none";
  obj.display = state;

}

function GetObject( id ) {
  var obj;
  if (document.all) { //IS IE 4 or 5 (or 6 beta)
    obj = eval( "document.all." + id );
  }
  if (document.layers) { //IS NETSCAPE 4 or below
    obj = document.layers[id];
  }
  if (document.getElementById && !document.all) {
    obj = document.getElementById(id);
  }
  return obj;
}

function refresh()
{
  var sURL = unescape(window.location.pathname);
  if (window.location.reload) window.location.reload( true );
  else if (window.location.replace) window.location.replace( sURL );
  else window.location.href = sURL;
}

// click an image named button_NAME and toggle display of a div named group_NAME
function ToggleGroup(curbtn)
{
  var group = curbtn.id.substr(7);
  var curdiv = GetObject("group_" + group);

  if (curdiv.style.display == "none")
  {
    curdiv.style.display = "block";
    curbtn.src = URI_BASE + "css/collapse.gif";
  }
  else
  {
    curdiv.style.display = "none";
    curbtn.src = URI_BASE + "css/expand.gif";
  }
}

