
// display/hide about

var isAbout = false;

function displayAbout() {
  swapAbout();
  initHistory();
}

function swapAbout() {
  if (!isAbout) {
    var tableHeight = document.getElementById("tableContent").offsetHeight;
    document.getElementById("divAbout").style.display = 'block';
    document.getElementById("divContent").style.display = 'none';
    document.getElementById("tableAbout").style.height = tableHeight+"px";
    isAbout = true;
  } else {
    document.getElementById("divAbout").style.display = 'none';
    document.getElementById("divContent").style.display = 'block';
    isAbout = false;
  }
}

// adjust browser history to support back arrow for about page

var j = 1;
var sitesToLoad = ["iframeHistory.php"];

function initHistory() {
  window.iframeHistory = document.getElementById("iframeHistory");
  currentIndex = 0;
  if (j > 1) j = 1;
  loadSite();
}

function loadSite() {
		
  if (currentIndex == (sitesToLoad.length)) return;

  var currentURL = sitesToLoad[currentIndex];
  currentIndex++;
	
  currentURL = currentURL+"?j="+j;
  j++;
	
  if (window.iframeHistory.readyState) { // IE
    window.iframeHistory.onreadystatechange = function() {
      if (window.iframeHistory.readyState == "complete") {
        window.iframeHistory.onreadystatechange = null;
        loadSite();
      }
    }
  } else {
    window.iframeHistory.onload = loadSite;
  }

  window.iframeHistory.src = currentURL;
	
}

			

