// BrowserCheck Object

function BrowserCheck() {
	var b = navigator.appName
	this.mac = (navigator.appVersion.indexOf('Mac') != -1)
	if (b=="Netscape") this.b = 'ns'
	else if (b=="Microsoft Internet Explorer") this.b = 'ie'
	else this.b = b
	this.version = navigator.appVersion
	this.v = parseInt(this.version)
	this.ns = (this.b=="ns" && this.v>=5)
	this.ns5 = (this.b=="ns" && this.v==5)
	this.ns6 = (this.b=="ns" && this.v==5)
	this.ie = (this.b=="ie" && this.v>=4)
	this.ie4 = (this.version.indexOf('MSIE 4')>0)
	this.ie5 = (this.version.indexOf('MSIE 5')>0)
	if (this.mac) this.ie = this.ie5
	this.ie5mac = (this.ie5 && this.mac);
	this.min = (this.ns||this.ie)
}

is = new BrowserCheck();

if ((is.min == false)||(is.ie5mac)){
	alert('Your browser can\'t handle this page. You need NS6 or IE5 on Windows, or NS6 on Mac.');
//	history.back();
}

function PageDim(){
//Get the page width and height
	this.W = 600;
	this.H = 400;
	if (is.ns) this.W = window.innerWidth;
	if (is.ie) this.W = document.body.clientWidth;
	if (is.ns) this.H = window.innerHeight;
	if (is.ie) this.H = document.body.clientHeight;
}

var pg = null;
var InGap = false;

function SuppressBackspace(e){ 
	if (InGap == true){
		return;
	}
	 if (is.ns) {
		thisKey = e.keyCode;
	}
	else {
		thisKey = window.event.keyCode;
	}

var Suppress = false;

//Hide the feedback window if showing
	if (thisKey == 13){
		if (document.getElementById('FeedbackDiv').style.display != 'none'){
			HideFeedback();
			Suppress = true;
		}
	}

	if (thisKey == 8) {
		Suppress = true;
	}

	if (Suppress == true){
		if (is.ie){
			window.event.returnValue = false;	
			window.event.cancelBubble = true;
		}
		else{
			e.preventDefault();
		}
	}
}

var NavLightColor = '#90ae90';
var NavShadeColor = '#102f10';
var NavBarColor = '#215E21';
var FuncLightColor = '#ffffff';
var FuncShadeColor = '#7f7f7f';
var ExBGColor = '#ffffff';

function NavBtnOver(Btn){
	Btn.style.padding = '1px 3px 3px 1px';
	Btn.style.borderLeftColor = NavLightColor;
	Btn.style.borderTopColor = NavLightColor;
	Btn.style.borderRightColor = NavShadeColor;
	Btn.style.borderBottomColor = NavShadeColor;
}

function NavBtnOut(Btn){
	Btn.style.borderColor = NavBarColor;
	Btn.style.padding = '2px 2px 2px 2px';
}

function NavBtnDown(Btn){
	Btn.style.borderLeftColor = NavShadeColor;
	Btn.style.borderTopColor = NavShadeColor;
	Btn.style.borderRightColor = NavLightColor;
	Btn.style.borderBottomColor = NavLightColor;
	Btn.style.padding = '3px 1px 1px 3px';
}

function FuncBtnOver(Btn){
	Btn.style.padding = '2px 7px 4px 5px';
	Btn.style.borderLeftColor = FuncLightColor;
	Btn.style.borderTopColor = FuncLightColor;
	Btn.style.borderRightColor = FuncShadeColor;
	Btn.style.borderBottomColor = FuncShadeColor;
}

function FuncBtnOut(Btn){
	Btn.style.borderColor = '#ffffff';
	Btn.style.padding = '3px 6px 3px 6px';
}

function FuncBtnDown(Btn){
	Btn.style.borderLeftColor = FuncShadeColor;
	Btn.style.borderTopColor = FuncShadeColor;
	Btn.style.borderRightColor = FuncLightColor;
	Btn.style.borderBottomColor = FuncLightColor;
	Btn.style.padding = '4px 5px 2px 7px';
}

var topZ = 100;

var CurrentBox = -1;
var Feedback = '';
var CluesAcross = 'Across:';
var CluesDown = 'Down:';
var Correct = 'Correct! Well done.';
var Incorrect = 'Some of your answers are incorrect. Incorrect squares have been blanked out.'; 
var GiveHint = 'A correct letter has been added.';
var YourScoreIs = 'Your score is ';
var BuiltGrid = '';
var BuiltExercise = '';
var Penalties = 0;
var FirstShow = true;
var ReadingURL = '[ReadingURL]';
var TempReading = '';

var CurrBoxElement = null;



var GridOpener = '<center><table border="1" cellpadding="0" cellspacing="0">';
var GridRowOpener = '<tr>';
var GridRowCloser = '</tr>';

var BlankCell = '<td bgcolor="#000000" width="30" height="30">&nbsp;</td>';
var LetterOnlyCell = '<td bgcolor="#ffffff" width="30" height="30" align="center" valign="middle"><span class="GridLetter">[Letter]</span></td>';
var NumLetterCell = '<td bgcolor="#ffffff" style="cursor: pointer; cursor: hand;" width="30" height="30" align="center" valign="top" onclick="ShowClue([ClueNum],[x],[y])"><sup><a href="javascript:DoNothing()" onclick="ShowClue([ClueNum],[x],[y])">[ClueNum]</a></sup>&nbsp;<span class="GridLetter">[Letter]</span></td>';

var GridCloser = '</table></center><br />';

var GetAnswerOpener = '<div class="FunctionButtonBar"><form name="AnswerForm" action="" onSubmit="return false;">';
GetAnswerOpener += '<table border="0" align="center" cellpadding="2" cellspacing="2">';


var GetAnswer = '<tr><td valign="top"><span class="ClueText">[ThisClue]</span></td>';
GetAnswer += '<td valign="top"><input type="text" class="AnswerBox" name="[BoxName]" size="[AnsLength]" maxlength="[AnsLength]" onfocus="InGap=true;"></input></td>';

GetAnswer += '<td valign="top"><span class="FunctionButton" onmouseover="FuncBtnOver(this)" onmouseout="FuncBtnOut(this)" ';
GetAnswer += 'onmousedown="FuncBtnDown(this)" onmouseup="FuncBtnOver(this)" ';
GetAnswer += 'onclick="EnterAnswer(document.AnswerForm.[BoxName].value,[boolAcross],[AnsLength],[x],[y])">';
GetAnswer += '&nbsp;Enter&nbsp;</span></td>';


GetAnswer += '<td valign="top"><span class="FunctionButton" onmouseover="FuncBtnOver(this)" onmouseout="FuncBtnOut(this)" ';
GetAnswer += 'onmousedown="FuncBtnDown(this)" onmouseup="FuncBtnOver(this)" ';
GetAnswer += ' onclick="ShowHint([boolAcross],[x],[y],\'document.AnswerForm.[BoxName]\')">';
GetAnswer += '&nbsp;Hint&nbsp;</span></td>';


GetAnswer += '</tr>';

var GetAnswerCloser = '</table></form></div>';

function WriteFeedback(Feedback){
	var Output = Feedback + '<br /><br />';
	document.getElementById('FeedbackContent').innerHTML = Output;
	var FDiv = document.getElementById('FeedbackDiv');
//Calculate and set its left setting
	topZ++;
	FDiv.style.zIndex = topZ;

//Position the feedback div
	pg = new PageDim();
	FDiv.style.left = Math.floor(pg.W/3) + 'px';
	FDiv.style.width = Math.floor(pg.W/3) + 'px';
//Set the top again in case the window has been resized
	if (is.ns){
		FDiv.style.top = Math.floor(pg.H/3) + window.pageYOffset + 'px';
	}
	else{
		FDiv.style.top = Math.floor(pg.H/3) + document.body.scrollTop + 'px';
	}
	FDiv.style.display = 'block';



	InGap = false;
}

function HideFeedback(){
	document.getElementById('FeedbackContent').innerHTML = '';
	document.getElementById('FeedbackDiv').style.display='none';
}

function WriteToInstructions(Feedback) {
	Feedback = '<span class="FeedbackText">' + Feedback + '</span>';
	document.getElementById('InstructionsDiv').innerHTML = Feedback;

}

function WriteClue(ClueText) {
	document.getElementById('ClueDiv').innerHTML = ClueText;

}




function StartUp(){
	if (is.ns){
		window.addEventListener('keypress',SuppressBackspace,false);
	}
	else{
//alert('not netscape; is.min=' + is.min + '; is.ie5mac=' + is.ie5mac);
		if ((is.min == true)&&(is.ie5mac == false)){
			document.attachEvent('onkeydown',SuppressBackspace);
			window.attachEvent('onkeydown',SuppressBackspace);
		}
	}





	BuildExercise();
	DisplayExercise();


}


function BuildExercise(){
	var OutString = '';
	var Temp = '';
	var GridStuff = GridOpener;	

	for (var i=0; i<L.length; i++){
		GridStuff += GridRowOpener;
		for (var j=0; j<L[i].length; j++){
//If the cell is blank, add a black cell
			if (L[i][j] == ''){
				GridStuff += BlankCell;
			}
//else there's a letter there
			else{
//If there's a clue number, add it
				if (C[i][j] > 0){
					Temp = NumLetterCell;
					Temp = ReplaceStuff('[ClueNum]', C[i][j], Temp);
//Add location info
					Temp = ReplaceStuff('[x]', i, Temp);
					Temp = ReplaceStuff('[y]', j, Temp);
				}
//Otherwise add a blank cell
				else{
					Temp = LetterOnlyCell;
				}

//If the cell is already answered, add the letter from the Guess array
				if (G[i][j] != ''){
					Temp = ReplaceStuff('[Letter]', G[i][j], Temp);
				}
//Otherwise, put in a non-breaking space
				else{
					Temp = ReplaceStuff('[Letter]', '&nbsp;', Temp);
				}
				GridStuff += Temp;
			}
		}
		GridStuff += GridRowCloser;
	}

	GridStuff += GridCloser;

//Put the final pieces together
	OutString = GridStuff;
	BuiltExercise = OutString;
}

function DisplayExercise(){
//Build the output string
	var OutString = '';
	OutString += BuiltExercise;

//Write it to the main div
	document.getElementById('GridDiv').innerHTML = OutString;


}

function BuildClue(ClueNum,x,y,Across){
	var OutString = '';
	if (Across == true){
		if (ClueNum >= A.length){
			return '';
		}	
		if (A[ClueNum] == null){
			return '';
		}
		
		OutString = GetAnswer;
		OutString = ReplaceStuff('[ThisClue]', ClueNum + '. ' + A[ClueNum], OutString);
		OutString = ReplaceStuff('[BoxName]', 'BA'+ClueNum, OutString);
//Find out how long the answer is
		AnsLength = 0;
		i = x;
		j = y;
		while (j<L[i].length){
			if (L[i][j] != ''){
				AnsLength++;
			}
			else{
				break;
			}
			j++;
		}
		OutString = ReplaceStuff('[AnsLength]', AnsLength, OutString);
		OutString = ReplaceStuff('[boolAcross]', 'true', OutString);
	}
	else{
		if (ClueNum >= D.length){
			return '';
		}	
		if (D[ClueNum] == null){
			return '';
		}
		
		OutString = GetAnswer;
		OutString = ReplaceStuff('[ThisClue]', ClueNum + '. ' + D[ClueNum], OutString);
		OutString = ReplaceStuff('[BoxName]', 'BD'+ClueNum, OutString);
//Find out how long the answer is
		AnsLength = 0;
		i = x;
		j = y;
		while (i<L.length){
			if (L[i][j] != ''){
				AnsLength++;
			}
			else{
				break;
			}
			i++;
		}
		OutString = ReplaceStuff('[AnsLength]', AnsLength, OutString);
		OutString = ReplaceStuff('[boolAcross]', 'false', OutString);
	}
	OutString = ReplaceStuff('[x]', x ,OutString);
	OutString = ReplaceStuff('[y]', y, OutString);
	return OutString;
}

function ShowClue(ClueNum,x,y){
	var OutString = '';
	var Temp = '';
	var ThisClue = '';
	var AnsLength = 0;
	var i;
	var j;
	CurrBoxElement = ClueNum;
	if (A[ClueNum] != null){
		ThisClue = GetAnswer;
		Temp = 'Across: ' + ClueNum + '. ' + A[ClueNum];
		ThisClue = ReplaceStuff('[ThisClue]', Temp, ThisClue);		
		OutString += ThisClue;
		OutString = ReplaceStuff('[BoxName]', 'BA'+ClueNum, OutString);
//Find out how long the answer is
		AnsLength = 0;
		i = x;
		j = y;
		while (j<L[i].length){
			if (L[i][j] != ''){
				AnsLength++;
			}
			else{
				break;
			}
			j++;
		}
		OutString = ReplaceStuff('[AnsLength]', AnsLength, OutString);
		OutString = ReplaceStuff('[boolAcross]', 'true', OutString);
	}
	if (D[ClueNum] != null){
		ThisClue = GetAnswer;
		Temp = 'Down: ' + ClueNum + '. ' + D[ClueNum];
		ThisClue = ReplaceStuff('[ThisClue]', Temp, ThisClue);
		OutString += ThisClue;
		OutString = ReplaceStuff('[BoxName]', 'BD'+ClueNum, OutString);
//Find out how long the answer is
		AnsLength = 0;
		i = x;
		j = y;
		while (i<L.length){
			if (L[i][j] != ''){
				AnsLength++;
			}
			else{
				break;
			}
			i++;
		}
		OutString = ReplaceStuff('[AnsLength]', AnsLength, OutString);
		OutString = ReplaceStuff('[boolAcross]', 'false', OutString);
	}
	OutString = GetAnswerOpener + OutString + GetAnswerCloser;
	OutString = ReplaceStuff('[x]', x ,OutString);
	OutString = ReplaceStuff('[y]', y, OutString);
	WriteClue(OutString); 
	if (eval('document.AnswerForm.BA' + ClueNum) != null){
		eval('document.AnswerForm.BA' + ClueNum).focus();
	}
	else{
		if (eval('document.AnswerForm.BD' + ClueNum) != null){
			eval('document.AnswerForm.BD' + ClueNum).focus();
		}
	}
}

function EnterAnswer(Guess,Across,AnsLength,x,y){
	Guess = Guess.toUpperCase();

	var i=x;
	var j=y;
	var Letter = 0;
	while (Letter < AnsLength){
		if (Letter < Guess.length){
			G[i][j] = Guess.charAt(Letter);
		}
		if (Across == true){
			j++;
		}
		else{
			i++;
		}
		Letter++;
	}

	BuildExercise();
	DisplayExercise();
	InGap = false;
	CurrBox = null;
}

function ShowHint(Across,x,y,BoxName){
	var i=x;
	var j=y;
	var OutString = '';
	if (Across==true){
		while (j<L[i].length){
			if (L[i][j] != ''){
				OutString += L[i][j];
				if (G[i][j] != L[i][j]){
					G[i][j] = L[i][j];
					Penalties++;
					break;
				}
			}
			else{
				break;
			}
		j++;
		}
	}
	else{
		while (i<L.length){
			if (L[i][j] != ''){
				OutString += L[i][j];
				if (G[i][j] != L[i][j]){
					G[i][j] = L[i][j];
					Penalties++;
					break;
				}
			}
			else{
				break;
			}
		i++;
		}
	}
	if (eval(BoxName) != null){
		eval(BoxName).value = OutString;
	}
}

function ReplaceStuff(Token, Replacement, InString){
	var i = InString.indexOf(Token);
	var FirstBit = '';
	var LastBit = '';
	while (i>-1){
		FirstBit = InString.substring(0, i);
		LastBit = InString.substring(i + Token.length, InString.length);	
		InString = FirstBit + Replacement + LastBit;
		i = InString.indexOf(Token);
	}
	return InString;
}

L = new Array();
L[0] = new Array('L','E','A','D','','','','','','','','','P','','C','A','R','B','O','N');
L[1] = new Array('I','','','E','L','E','C','T','R','O','N','','E','','U','','N','E','N','E');
L[2] = new Array('S','','','C','','','','','O','','E','S','T','E','R','','A','T','O','P');
L[3] = new Array('T','','D','A','U','G','H','T','E','R','','','A','','I','','','','','T');
L[4] = new Array('E','','','Y','','E','','','N','A','','','','F','E','R','M','I','','U');
L[5] = new Array('R','','A','','P','O','S','I','T','R','O','N','','','','','A','','','N');
L[6] = new Array('','I','C','E','','','','','G','E','','E','','P','B','','S','E','M','I');
L[7] = new Array('C','','I','','','A','','','E','','N','U','C','L','E','U','S','','','U');
L[8] = new Array('R','A','D','I','A','T','I','O','N','','','T','A','U','T','','','','','M');
L[9] = new Array('I','','','O','','O','','','','','','R','I','G','A','','','P','','');
L[10] = new Array('T','R','A','N','S','M','U','T','A','T','I','O','N','','','P','','R','E','M');
L[11] = new Array('I','','','','U','','','','','H','O','N','E','','K','I','L','O','','');
L[12] = new Array('C','H','A','I','N','','H','','','O','','','','','','G','','T','','');
L[13] = new Array('A','','X','S','','C','A','P','T','U','R','E','','F','U','S','I','O','N','');
L[14] = new Array('L','M','I','I','','','L','','A','','','','','I','','','','N','','');
L[15] = new Array('M','A','S','S','D','E','F','E','C','T','','','','S','','G','','','','');
L[16] = new Array('A','S','','','','','L','','K','','','D','O','S','','A','L','P','H','A');
L[17] = new Array('S','T','A','B','I','L','I','T','Y','','H','E','L','I','U','M','','I','A','');
L[18] = new Array('S','','M','A','T','','F','','','','','C','E','O','','M','A','C','H','1');
L[19] = new Array('','','U','N','O','','E','M','I','S','S','I','O','N','','A','R','O','N','');


C = new Array();
C[0] = new Array(1,0,0,2,0,0,0,0,0,0,0,0,3,0,4,0,5,6,7,8);
C[1] = new Array(0,0,0,9,0,0,0,0,10,0,11,0,0,0,0,0,12,0,0,0);
C[2] = new Array(0,0,0,0,0,0,0,0,0,0,13,0,0,0,0,0,14,0,0,0);
C[3] = new Array(0,0,15,0,0,16,0,0,0,17,0,0,0,0,0,0,0,0,0,0);
C[4] = new Array(0,0,0,0,0,0,0,0,18,0,0,0,0,19,0,0,20,0,0,0);
C[5] = new Array(0,0,21,0,22,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0);
C[6] = new Array(0,24,0,0,0,0,0,0,25,0,0,0,0,26,27,0,28,0,0,0);
C[7] = new Array(29,0,0,0,0,30,0,0,0,0,31,0,32,0,0,0,0,0,0,0);
C[8] = new Array(33,0,0,34,0,0,0,0,0,0,0,35,0,0,0,0,0,0,0,0);
C[9] = new Array(0,0,0,0,0,0,0,0,0,0,0,36,0,0,0,0,0,37,0,0);
C[10] = new Array(38,0,0,0,39,0,0,0,0,40,41,0,0,0,0,42,0,43,0,0);
C[11] = new Array(0,0,0,0,0,0,0,0,0,44,0,0,0,0,45,0,0,0,0,0);
C[12] = new Array(46,0,47,48,0,0,49,0,0,0,0,0,0,0,0,0,0,0,0,0);
C[13] = new Array(0,0,50,0,0,51,0,0,52,0,0,0,0,53,0,0,0,0,0,0);
C[14] = new Array(54,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
C[15] = new Array(56,0,0,0,0,0,0,0,0,0,0,0,0,0,0,57,0,0,0,0);
C[16] = new Array(58,0,0,0,0,0,0,0,0,0,0,59,60,0,0,61,0,62,63,0);
C[17] = new Array(64,0,65,66,67,0,0,0,0,0,68,0,0,0,0,0,0,69,0,0);
C[18] = new Array(0,0,70,0,0,0,0,0,0,0,0,71,0,0,0,72,73,0,0,0);
C[19] = new Array(0,0,74,0,0,0,75,0,0,0,0,0,0,0,0,76,0,0,0,0);


G = new Array();
G[0] = new Array('','','','','','','','','','','','','','','','','','','','');
G[1] = new Array('','','','','','','','','','','','','','','','','','','','');
G[2] = new Array('','','','','','','','','','','','','','','','','','','','');
G[3] = new Array('','','','','','','','','','','','','','','','','','','','');
G[4] = new Array('','','','','','','','','','','','','','','','','','','','');
G[5] = new Array('','','','','','','','','','','','','','','','','','','','');
G[6] = new Array('','','','','','','','','','','','','','','','','','','','');
G[7] = new Array('','','','','','','','','','','','','','','','','','','','');
G[8] = new Array('','','','','','','','','','','','','','','','','','','','');
G[9] = new Array('','','','','','','','','','','','','','','','','','','','');
G[10] = new Array('','','','','','','','','','','','','','','','','','','','');
G[11] = new Array('','','','','','','','','','','','','','','','','','','','');
G[12] = new Array('','','','','','','','','','','','','','','','','','','','');
G[13] = new Array('','','','','','','','','','','','','','','','','','','','');
G[14] = new Array('','','','','','','','','','','','','','','','','','','','');
G[15] = new Array('','','','','','','','','','','','','','','','','','','','');
G[16] = new Array('','','','','','','','','','','','','','','','','','','','');
G[17] = new Array('','','','','','','','','','','','','','','','','','','','');
G[18] = new Array('','','','','','','','','','','','','','','','','','','','');
G[19] = new Array('','','','','','','','','','','','','','','','','','','','');


A = new Array();
A[1]='Gamma radiation can penetrate this.';
A[4]='__________________-14 is a radioactive isotope used to determine the approximate age of organic material.';
A[9]='A proton may be formed when a(n) __________________ is emitted from a neutron.';
A[12]='Hawaiian goose';
A[13]='An organic compound with a carboxylic acid group in which the hydrogen of the hydroxyl group has been replaced by an alkyl group.';
A[14]='Mounted';
A[15]='Nuclide produced by the decay of the parent nuclide.';
A[18]='Sodium';
A[19]='Enrico ______________, the first chemist to produce transuranium elements.';
A[22]='A particle with a positive charge and a mass number of zero.';
A[24]='H<sub>2</sub>O in solid form.';
A[25]='Germanium';
A[26]='Lead';
A[28]='Metalloids are ______conductors.';
A[31]='The central portion of the atom.';
A[33]='Particles or electromagnetic waves emitted from the nucleus during decay are called nuclear __________________.';
A[35]='Tight or tense; as a rope.';
A[36]='European capital';
A[38]='A change in the identity of a nucleus as a result of a change in the number of its protons.';
A[43]='A radiation dose, or a rock group.';
A[44]='Sharpen';
A[45]='Metric prefix meaning 1000.';
A[46]='______________ reaction - When the material that starts the reaction is also one of the products, and can start another reaction.';
A[50]='Clothing size';
A[51]='A proton may be converted to a neutron by electron ________________.';
A[53]='Light mass nuclei combining to form a heavier, more stable nucleus.';
A[54]='952, to Caesar.';
A[56]='The difference between the mass of an atom and the sum of the masses of its particles.';
A[58]='With Old Lace, it makes a movie or play title.';
A[59]='Text based computer operating system.';
A[61]='210-Po converts to 206-Pb during ____________ emission.';
A[64]='The stable nuclei cluster over a range of neutron-proton ratio is referred to as the band of ___________________.';
A[68]='An alpha particle is a bare _______________ nucleus.';
A[69]='Part of the mailing address for Cedar Rapids.';
A[70]='Grappler\'s venue.';
A[71]='Big boss (abbrev.)';
A[72]='Speed of sound';
A[74]='One (spanish).';
A[75]='Though nuclear decay can occur by capture of a particle, it most often occurs by ________________ of particles.';
A[76]='Elvis _______ Presley.';


D = new Array();
D[1]='Scottish doctor who performed the first antiseptic surgery.';
D[2]='Spontaneous disintegration of a nucleus into a slightly lighter and more stable nucleus.';
D[3]='Prefix meaning 10<sup>15</sup>.';
D[4]='Marie and Pierre _______________.';
D[5]='Ribonucleic acid';
D[6]='Wager';
D[7]='Lennon\'s wife';
D[8]='First transuranium element.';
D[10]='A unit used to measure nuclear radiation.';
D[11]='Noble gas used in decorative lighting.';
D[16]='Prefix meaning "earth."';
D[17]='The first 11 transuranium elements are ________ earth elements.';
D[20]='Protons + neutrons = _____________ number';
D[21]='A proton donor.';
D[23]='A nuclear particle with no charge and a mass number of 1. ';
D[26]='Advertisement';
D[27]='An electron emitted from the during radioactive decay is known as a ____________ particle.';
D[29]='The minimum amount of nuclide that provides the number of neutrons needed to sustain a chain reaction.';
D[30]='The smallest particle of an element that retains all of the properties of that element.';
D[32]='Queeg\'s vessel';
D[34]='A particle with an unbalanced electrostatic charge.';
D[37]='Electron capture may form a neutron from a ___________________.';
D[39]='Large fusion reactor.';
D[40]='You, to King James.';
D[41]='One of Jupiter\'s twelve satellites.';
D[42]='Swine';
D[47]='X, Y, or Z in graphing.';
D[48]='Wife of Osiris, goddess of fertility, in ancient Egypt.';
D[49]='The time required for half the atoms of a radioactive nuclide to decay.';
D[52]='Wet paint, or polyester worn at prom.';
D[53]='Heavy nuclei splitting into more stable nuclei of intermediate mass.';
D[55]='Place for a mainsail.';
D[57]='High energy electromagnetic radiation - ___________ rays.';
D[59]='Metric prefix: 1/10';
D[60]='Partially hydrogenated vegetable oils; bread spread.';
D[62]='Metric prefix equal to 10<sup>-12</sup>';
D[63]='1944 Nobel prize winner for the discovery of fission.';
D[65]='Atomic mass unit (abbrev.)';
D[66]='Disallow by law, or an antiperspirant.';
D[67]='Judge in the O.J. Simpson case.';
D[73]='Nobel gas; atomic number 18.';



function CheckAnswers(){

	var AllCorrect = true;
	var TotLetters = 0;
	var CorrectLetters = 0;

//Check each letter
	for (var i=0; i<L.length; i++){
		for (var j=0; j<L[i].length; j++){
			if (L[i][j] != ''){
				TotLetters++;
				if (G[i][j] != L[i][j]){
					G[i][j] = '';
					AllCorrect = false;
				}
				else{
					CorrectLetters++;
				}
			}
		}
	}

	var Score = Math.floor(((CorrectLetters-Penalties) * 100)/TotLetters);

//Compile the output
	var Output = '';

	if (AllCorrect == true){
		WriteClue('&nbsp;');
		Output = Correct + '<br />';
	}

	Output += YourScoreIs + ' ' + Score + '%.<br />';
	if (AllCorrect == false){
		Output += Incorrect;
		Penalties++;
	}
	BuildExercise();
	WriteFeedback(Output);
	WriteToInstructions(Output);

		


	DisplayExercise();
}







function DoNothing(){}

function Blank(){
	return '<html><body>&copy;Half-Baked Software. Loading...</body></html>';
}

//-->

//]]>
