function writeFGControls()
{

	if (checkboxToDebugScripts || debuggingFG)
		document.writeln(
"<form name='controlsForm'> \
<input type='checkbox' onClick='setDebugScripts()' \
name='debugSpts'><font color='red'>Debug \
Scripts</font><br>");

	writeViewLink("rocketSpt", "Secondary Structure", "rocketHelp",
		"Rockets & Planks");
		writeHTML("&nbsp; &nbsp;");
	writeViewLink("cartoonSpt", "Cartoon", "cartoonHelp", "Backbones & Chains");
		writeHTML("&nbsp; &nbsp;");
	writeViewLink("rainbowSpt",
		"<nobr>N<img src='arrow.gif' border='0'>C&nbsp;Rainbow</nobr>",
		"rainbowHelp", "Amino and Carboxy Termini");
		writeHTML("<br>");

	writeViewLink("compositionSpt", "Composition", "compositionHelp",
		"Protein, DNA, RNA, Ligand, & Solvent");
		writeHTML("&nbsp; &nbsp;");
	writeViewLink("polaritySpt", "Hydrophobic/Polar", "polarityHelp",
		"Hydrophilic vs. Lipophilic");
		writeHTML("&nbsp; &nbsp;");
	writeViewLink("chargeSpt", "Charge", "chargeHelp",
		"Negatively & Positively Charged Amino Acids");
		writeHTML("<br>");

	writeViewLink("makePreContactsSpt()", "Contacts..", "makePreContactsHelp()",
		"See Non-Covalent Bonds");
		writeHTML("&nbsp; &nbsp;");
	writeViewLink("makeVineSpt()", "Vines..", "makeVinesHelp()",
		"All-Atom Detail");
		writeHTML("&nbsp; &nbsp;");
	writeViewLink("allModelsSpt", "All&nbsp;Models", "allModelsHelp",
		"See Multiple Models in NMR Ensembles");
		writeHTML("&nbsp; &nbsp;");
	writeViewLink("hideSpt", "Hide..", "makeHideHelp()",
		"Hide Portions of the Molecule");
		writeHTML("&nbsp; &nbsp;");
	writeViewLink("makePreFindSpt()", "Find..", "makeFindHelp()",
		"Locate Sequence Numbers, Elements, Amino Acids, or Bases in 3D");

	// START TABLE CONTAINING BUTTONS

	writeHTML("<table border=\"0\" cellpadding=\"3\"><tr><td>");

// Use of <br> between buttons causes IE to double-space them.
// Firefox and Netscape 4 single-space them.

	writeHTML("<div>");
	writeToggleButton("ligandSpt", "ligandOffSpt", "Ligands+..", "down",
		"makeLigandsHelp()", "Show or Hide Ligands+");
	writeHTML("<\/div>");
	writeToggleButton("waterSpt", "waterOffSpt", "Water..", "up",
		"makeWaterHelp()", "Show or Hide Water");
	writeHTML("<div>");
	writeToggleButton("makeSlabSpt(true)", "slabOffSpt", "Slab..", "up",
		"makeSlabHelp()", "See Uncluttered Details with a Slice through the Interior");
	writeHTML("<\/div>");

	writeHTML("<\/td><td>&nbsp; &nbsp;<\/td><td>");

	writeHTML("<div>");
	writeToggleButton("bgWhiteSpt", "bgBlackSpt", "Background", "down", "",
		"White vs. Black Background");
	writeHTML("<\/div>");
	writeToggleButton("spinOnSpt", "spinOffSpt", "Spin", "down", "",
		"Start or Stop Spinning");

	writeHTML(
"<div> \n\
<a href=\"javascript: top.doZoom('');\">\
<img src=\"zoomup.gif\" border=\"0\" title='Bigger'></a> \n\
<a href=\"javascript: top.doZoom('-');\">\
<img src=\"zoomdown.gif\" border=\"0\" title='Smaller'></a> \n\
Zoom \n\
</div> \n\
");

	// END OF TABLE CONTAINING BUTTONS

	writeHTML("</td></tr></table>\n");

	// CONTROLS BELOW BUTTONS

	writeSafari();

	writeViewLink("moreViews", "More&nbsp;Views..", "makeMoreViewsHelp()",
		"Non-Standard Residues, Model Quality, Distances & Angles, Unit Cell, \
Advanced Features, Related Viewers");
	writeHTML("&nbsp; &nbsp; &nbsp;");

	writeInfoLinks();

		writeHTML("<br>");
	writeViewLink("centerSpt", "Center&nbsp;Atom..", "centerAtomHelp",
		"Center One Atom, or the Entire Molecule");
		writeHTML("&nbsp; &nbsp;");
	writeViewLink("troubleshooting", "Troubleshooting", "makeTroubleHelp()",
		"Pitfalls, Java, Browsers, OSX, Windows, Linux");
		writeHTML("&nbsp; &nbsp;");
	writeViewLink("view1Spt", "Reset", "makeIntroHelp()",
		"Restore the Initial View");
		writeHTML("&nbsp; &nbsp;");
	writeHTML("<a href=\"javascript: closeFgij()\" \
title='Quit This Session'>Close</a>");

	if (checkboxToDebugScripts)
		document.writeln("</form>");
}

