var myScript;
var thisFigNum;
var nextFigNum;
var thisFigLegend

function figureTableUpper() {
	document.write('<form><table>' +
	'<tr bgcolor="#660099" class="contrast">' +
		'<td colspan="2">&nbsp;Molecules in Motion &nbsp;' +
		'</td>' +
	'<\/tr>' +
	'<tr bgcolor="#990099" class="contrast" align="right">' +
		'<td>Original Figure &nbsp;' +
		'</td>' +
		'<td>Interactive Figure &nbsp;' +
		'</td>' +
	'</tr>' +
	
	'<tr>' +
		'<td>' +
			'<image src="' + thisFigNum + '.jpg">' +
			'<br> ' +
			'<script type="text/javascript">' +
				'copyright();' +
			'</script>' +
		'</td>' +
		'<td>' +
		  '<script type="text/javascript">' +
		    'jmolInitialize(".");' +
			'putApplet("script figure_" + thisFigNum + ".spt"); ' +
			'jmolBr;' + 
			'</script>');
	}

function figureTableLower() {
	document.write('</td>' +
			'</tr>' +
	'<tr bgcolor="#FFFFFF">' +
		'<td colspan="2">' +	  
		  '<script type="text/javascript">' +
	  		'jmolHtml("<p class=\'small\'>Figure " + thisFigNum + ". " + thisFigLegend);' +
	  		'</script>' +	
		'</td>' +
	'</tr>'+
		'<tr>' +
		'<td colspan="2">' +
			'<script type="text/javascript">' +
				'title();' + 
				'navLinks();' +   
	  		'</script>' +
		'</td>' +
	'</tr>' +		
	'<tr bgcolor="#990099" class="contrast" align="right">' +
		'<td colspan="2">&nbsp;' +	
		'</td>' +
	'</tr>' +
	'</table></form>');
	}

function putApplet(myScript) {

	jmolSetAppletColor("#FFFFFF");
	jmolApplet([400,400], myScript);

}

function title(){

	document.write("<h4> Structure of the cross-beta spine of amyloid-like fibrils" +
		", R. Nelson <i>et al.</i> Nature 435, 773-778 (9 June 2005) <a href='notes.html'>Notes</a></h4>");

/* 		"<h5>Rebecca Nelson, Michael R. Sawaya, Melinda Balbirnie, Anders ¯. Madsen, Christian Riekel, Robert Grothe & David Eisenberg</h5>"); */

}

function nextFig(){

	document.write("<h4><a href='" + nextFigNum + ".html'>Next figure</a></h4>");
}

function copyright(){
	document.write("<p class='small'><a href='http://www.nature.com'>&copy; Nature Publishing Group</a></p>");
	document.write("");
}

function navLinks(){
	document.write("<p><a href='" + nextFigNum + ".html'>Next figure</a></p>");
}

// +	" <br><br>Drag the structure to rotate: shift-drag to zoom.

/* function figNumAndNav(){ */
/*  */
/* 	document.write('<h4>Figure ' + thisFigNum + '</h4>' + */
/*  	'<p><a href="' + nextFigNum + '.html\">Next figure</a></p>' + */
/* 	  '<form ACTION=URI>\"' + */
/* 		'<select name="figureMenu\"' + */
/* 		' onchange="location.href=(form.figureMenu.options[form.figureMenu.selectedIndex].value)\">' + */
/* 		 '<option value="0\"> Jump to ...</option>' + */
/* 		 '<option value="0\"></option>' + */
/* 		 '<option value="index.html\"> Figure 2a, rocket</option>' + */
/* 		 '<option value="alt2a.html\"> Figure 2a, cartoon</option>' + */
/* 		 '<option value="2b.html\"> Figure 2b</option>' + */
/* 		 '<option value="2c.html\"> Figure 2c</option>' + */
/* 		 '<option value="2d.html\"> Figure 2d</option>' + */
/* 		 '<option value="2e.html\"> Figure 2e</option>' + */
/* 		'</select>' + */
/* 	  '</form>'); */
/* } */
/*  */
