var quizTitle="Emergency Preparedness for Businesses"
var questions=new Array();
questions[questions.length]=["How many small businesses never recover from a disaster?","10%","6%","25%",3];
questions[questions.length]=["What records should be stored to keep your business running after an emergency?","A list of most important customers","A vacation schedule","Employee birthdays",1];
questions[questions.length]=["How do I address needs of employees with disabilities?","Plan only one escape route","Do not post special needs exit routes","Address needs of those with disabilities at every step of planning",3];
questions[questions.length]=["All employees should assemble a GO BAG  with items they may need in an evacuation including:","A small regional map","My recycling schedule","My shopping list",1];
questions[questions.length]=["Almost every business is required by law to have:","An Emergency Action Plan","A dress code","No specific meeting place outside the building",1];

document.write('<span class="headline">'+quizTitle+'</span><br>');
document.write('<form name="quiz" onSubmit="return checkQuiz()"><ol>');
for(var i=0;i<questions.length;i++){
	document.write('<li>'+questions[i][0]);
	for(var j=1;j<questions[i].length-1;j++){
		document.write('<table cellspacing="0" cellpadding="0" border="0">');
		document.write('<tr><Td><input name="'+i+'" type="radio" value="'+questions[i][j]+'" class="radio" id="'+i+'_'+j+'"></Td>');
		document.write('<td nowrap><label for="'+i+'_'+j+'">'+questions[i][j]+'</label></td></tr></table>');
	}
	document.write("<br></li>");
}
document.write('</ol>');
document.write('<table cellspacing="0" cellpadding="0" border="0" width="499">');
document.write('<tr><Td class="buttons" colspan="2"><input type="submit" class="button" style="width:72px;" value="Submit" />&nbsp;');
document.write('<input type="reset" class="button" style="width:63px;" value="Reset" /></Td></tr></table></form>');

function checkQuiz(){
	var correct=true;
	for(var i=0;i<questions.length;i++){
		correct=correct&&getSelectedRadio(i)==questions[i][(questions.length-1)];
	}
	if(correct){
		document.location.href="../../html/get_prepared/ready_contest_form.shtml?quiz="+escape(quizTitle);
	}else{
		document.location.href="../../html/get_prepared/ready_quiz_wrong.shtml"
	}
	return(false);
}

function getSelectedRadio(theQuestion) {
	var theLength=questions[theQuestion].length-1;
	for(var ans=1;ans<theLength;ans++){
		var theId=theQuestion+"_"+ans;
		if(document.getElementById(theId).checked){
			return(ans);
		}
	}
	return -1;
}