function tidyUp()
{
	var i = 1;
	while (i <= 26) {
	  // Wipe all previous lights - make font colour grey
	  document.getElementById('l_'+ENIGMA.plaintext.charAt(i)).setAttribute('class', 'led_off'); 
	  i++;
	}

	document.getElementById('save').removeAttribute('class');

	var muckyurl = document.URL;
	var cleanurl = muckyurl.replace(/\?.*/gi, "");
	document.location = cleanurl;

	ENIGMA.usedletters = "";
	ENIGMA.lastkeypressed = "";
	ENIGMA.counter = 0;
}
/* FUNCTION --------------------------------------------------------
	Tidy up after the reset button is pressed
   ----------------------------------------------------------------- */
FUNCTION
Tidy up after the reset button is pressed
FUNCTION Tidy up after the reset button is pressed
function tidyUp()
{
	var i = 1;
	while (i <= 26) {
	  document.getElementById('l_'+ENIGMA.plaintext.charAt(i)).setAttribute('class', 'led_off'); 
	  i++;
	}
	document.getElementById('save').removeAttribute('class');
	var muckyurl = document.URL;
	var cleanurl = muckyurl.replace(/\?.*/gi, "");
	document.location = cleanurl;
	ENIGMA.usedletters = "";
	ENIGMA.lastkeypressed = "";
	ENIGMA.counter = 0;
}
function tidyUp ( ) { var i = 1 ; while ( i <= 26 ) { document . getElementById ( 'l_' + ENIGMA . plaintext . charAt ( i ) ) . setAttribute ( 'class' , 'led_off' ) ; i ++ ; } document . getElementById ( 'save' ) . removeAttribute ( 'class' ) ; var muckyurl = document . URL ; var cleanurl = muckyurl . replace ( / \?.* / gi , "" ) ; document . location = cleanurl ; ENIGMA . usedletters = "" ; ENIGMA . lastkeypressed = "" ; ENIGMA . counter = 0 ; }
FUNCTION
Tidy up after the reset button is pressed
FUNCTION Tidy up after the reset button is pressed
// Wipe all previous lights - make font colour grey