var currentContentId = null;

function showContent(contentId)
{
  var content = document.getElementById(contentId);

  if (content == undefined) {
    alert("Cannot find content with ID: " + contentId);
    return;
  }

  // hide current content
  if (currentContentId != null) {
    var oldContent = document.getElementById(currentContentId);
    if (oldContent != undefined) {
      oldContent.style.display = 'none';
      oldContent.style.visibility = 'hidden';
    }
  }

  // show intented content
  content.style.display = 'block';
  content.style.visibility = 'visible';
  currentContentId = contentId;
}


