//help functions
//---------------------------------
var hSel = 'help-intro';

function help() {
  var x = document.getElementById('help');
  var y = document.getElementById('help-link');
  if(x.className == 'h-hide') {
    x.className = 'h-show';
    y.innerHTML = 'Hide Help';
  }
  else {
    x.className = 'h-hide';
    y.innerHTML = 'Help';
  }
}
function about() {
  switchHelp('help-about');
  if(document.getElementById('help').className == 'h-hide') help();
}
function keys() {
  switchHelp('help-keys');
  if(document.getElementById('help').className == 'h-hide') help();
}
function switchHelp(id) {
  if(id == hSel) return;
  document.getElementById(hSel).className = 'h-hide';
  document.getElementById('a-'+hSel).className = 'h-show';
  hSel = id;
  document.getElementById(id).className = 'h-show';
  document.getElementById('a-'+id).className = 'help-selected';
}
