// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/* buttons.js has been superceded by dualquad.js.
It remains to provide legacy support.
*/
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

var cancelButtonWriting = false;

function standardButton(moleculeFilename, scriptFilename)
{
	var spinset = spinningStart;
	if (buttonNumber > 0)
		spinset = spinningSame;

	setupButton(1, moleculeFilename, scriptFilename,
		backgroundBlack, spinset);
}

// OBSOLETE
//	buttonNumber++;

	// Complain if either parameter is undefined or blank.

//	var badParameterMsg = "";

//	if (typeof(moleculeFilename) == "undefined")
//		badParameterMsg = "undefined moleculeFilename \"m\".";

//	else if (moleculeFilename == "")
//		badParameterMsg = "blank moleculeFilename \"m\".";

//	else if (typeof(scriptFilename) == "undefined")
//		badParameterMsg = "undefined scriptFilename \"s\".";

//	else if (scriptFilename == "")
//		badParameterMsg = "blank scriptFilename \"s\".";

//	if (badParameterMsg != "")
//	{
//		badParameterMsg = "Authoring error: standardButton(m, s) called with\n" +
//			badParameterMsg +
//			"\n (Button number " + buttonNumber + ")";
//		alert(badParameterMsg);
//		cancelButtonWriting = true;
//		return;
//	}

	// All parameters present. Proceed to set up array.	

//	buttons[buttonNumber] = new Array();

//	buttons[buttonNumber][iMoleculeFilename] = moleculeFilename;

//	if (buttonNumber > 1) // Inherit previous PDB file by default.
//		buttons[buttonNumber][iMoleculeFilename] = buttons[n-1][iMoleculeFilename];

//	buttons[buttonNumber][iScript] = 'script ' + scriptFilename + ';';

//	buttons[buttonNumber][iButtonType] = 'button'; // link, button, radio, or checkbox

	// reset, y, or yes to reset the display before running this script.
	// noreset or no to leave the current view alone.
//	buttons[buttonNumber][iScriptMode] = 'display';

//	buttons[buttonNumber][iButtonLabel] = 'View ' + buttonNumber;
//	buttons[buttonNumber][iButtonPrefixText] = '<br>';
//	buttons[buttonNumber][iButtonText] =
//		"AUTHOR: PUT VIEW DESCRIPTION HERE (in buttons[buttonNumber][iButtonText]).";
//	buttons[buttonNumber][iScriptCheckboxUnchecked] = '';
//	buttons[buttonNumber][iDetailsText] = '';

//	buttons[buttonNumber][iJmolCount] = 1; // for legacy support
//}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
