/* More basic show/hide functions written by Chris for use on mini course pages */
function showMe(element,dowhat) {
  if (dowhat=='show') {document.getElementById(element).style.display='block';}
  else if (dowhat=='hide') {document.getElementById(element).style.display='none';}
  else {
    if (document.getElementById(element).style.display=='block') {document.getElementById(element).style.display='none';}
    else if (document.getElementById(element).style.display=='none') {document.getElementById(element).style.display='block';}
  }
}
function showContent(element) {
  if (document.getElementById(element).style.display=='block') {document.getElementById(element).style.display='none';}
  else {document.getElementById(element).style.display='block';}
}
function showAll(dowhat,last,prefix,delay) {
  var thistimeout = 0;
  if (dowhat=='hide') {var thistimeout = delay*(last-1);}
  do {
    setTimeout('showMe(\'' + prefix + last + '\', \'' + dowhat + '\')', thistimeout);
    last = last-1;
    if (dowhat=='show') {thistimeout = thistimeout + delay;}
    else if (dowhat=='hide') {thistimeout = thistimeout - delay;}
  }
  while (last > 0);
}
