function switchVisibility(obj) {
  var el = document.getElementById(obj);
  if (typeof el !== 'undefined' && el !== null) {
      if ( el.style.display != "none" ) {
        el.style.display = 'none';
      } else {
        el.style.display = 'block';
      }
  }
}

function switchClassVisibility(className) {
  var elList = document.getElementsByClassName(className);
  var i;
  for (i = 0; i < elList.length; i++) {
      var el = elList[i];
      if ( el.style.display != "none" ) {
        el.style.display = 'none';
      } else {
        el.style.display = 'block';
      }
  }
}
