var myDirectory
var pathInStartsWith
var pathOutStartsWith

function writeTableOfContents(myDirectory) {

  if (myDirectory == "materials"){
	pathInStartsWith = ""
	pathOutStartsWith = "../"
	}

  else if (myDirectory == "bme3d"){
	pathInStartsWith = "materials/"
	pathOutStartsWith = ""
	}

  document.write(
	'<p class="titlesmall">' +
	  '<img src="' + pathInStartsWith + 'images/an_dna.gif" width="88" height="136" align="right">' +
	  '<strong><br>BME3D Contents</strong></p>' +
	  '<p class="text"> <a href="' + pathOutStartsWith + 'index.html">Welcome</a><br>' +
	  '<a href="' + pathInStartsWith + 'guide.html">A Guide to BME3D Resources</a><br>' +
	  '<a href="' + pathInStartsWith + 'explore.html">Explore the Molecules</a><br>' +
	  '<a href="' + pathInStartsWith + 'faq.html">Frequently Asked Questions</a><br>' +
	  '<a href="' + pathInStartsWith + 'contact.html">Contact Us/Credits</a></p>');
}




/* This is a simpler way to do the TOC, but would require 2 changes for each revision
*/

/*

function writeTableOfContents(myDirectory) {
  if (myDirectory == "materials"){
	document.write(
	'<p class="titlesmall">' +
	  '<img src="images/an_dna.gif" width="88" height="136" align="right">' +
	  '<strong>BME3D Contents</strong></p>' +
	  '<p class="text"> <a href="../index.html">Welcome</a><br>' +
	  '<a href="guide.html">A Guide to These Resources</a><br>' +
	  '<a href="explore.html">Explore the Molecules</a><br>' +
	  '<a href="faq.html">Frequently Asked Questions</a><br>' +
	  '<a href="contact.html">Contact Us/Credits</a></p>');
	}

  else if (myDirectory == "bme3d"){
	document.write(
	'<p class="titlesmall">' +
	  '<img src="materials/images/an_dna.gif" width="88" height="136" align="right">' +
	  '<strong>BME3D Contents</strong></p>' +
	  '<p class="text"> <a href="index.html">Welcome</a><br>' +
	  '<a href="materials/guide.html">A Guide to BME3D Resources</a><br>' +
	  '<a href="materials/explore.html">Explore the Molecules</a><br>' +
	  '<a href="materials/faq.html">Frequently Asked Questions</a><br>' +
	  '<a href="materials/contact.html">Contact Us/Credits</a></p>');
	}

}

*/