
function MM_openBrWindow() { //v2.0
  window.open('../dtHistory.asp','HistoryQuestion','scrollbars=yes,resizable=yes,width=800,height=600');
}

function openFinalHistoryWindow(url){
	window.open(url,'History','scrollbars=yes,resize=yes,width=800,height=600');
}

function openGlossWindow(url) {
  window.open(url,'Glossary','scrollbars=yes,resizable=yes,width=400,height=200');
}

function openStdWindow(url){
	window.open(url,'ConservationDecisionTree','scrollbars=yes,resizable=yes,width=600,height=600');
}

function openFinalRptWindow(url){
	window.open(url,'FinalReport','scrollbars=yes,resize=yes,width=800,height=600');
}

function openBlackboxWindow(str){
alert(str)
}

function validateForm()
{
var radio_choice = false;
for (counter = 0; counter < document.form2.RadioGroup1.length; counter++)
{
// If a radio button has been selected it will return true
// (If not it will return false)
if (document.form2.RadioGroup1[counter].checked)
radio_choice = true; 

}

if (!radio_choice)
{
// If there were no selections made display an alert box 
alert("Please select an answer!")
return (false);
}

return (true);
}

function validateText()
{
var txtBox = false;
if(document.form2.elements[0].value != "")
txtBox = true;

if (!txtBox)
{
// If there were no selections made display an alert box 
alert("Please enter a value.")
return (false);
}
return (true);
}


function getSelectedButton(buttonGroup){
for (var i = 0; i < buttonGroup.length; i++) {
		if (buttonGroup[i].checked) {
			return i
		}
	}
	return 0
}


function checkAnswer(ques) {
var i = getSelectedButton(form2.RadioGroup1)
var choice = document.form2.RadioGroup1[i].value
var questionNum = new Array(10)
questionNum[0] = "True"
questionNum[1] = "E"
questionNum[2] = "D"
questionNum[3] = "E"
questionNum[4] = "D"
questionNum[5] = "C"
questionNum[6] = "E"
questionNum[7] = "D"
questionNum[8] = "E"
questionNum[9] = "B"

if(choice == questionNum[ques]){
alert("You are Correct!")
}
else{
alert("Incorrect, Please try again!")
}

} 