
// this function validates the applicant checklist 
// if valid, it calls loadTest with the service given.
// document.checklist must exist!!
function validateChecklist(service)
{
	var checklist = document.checklist;
	var msg = 'Before continuing with your application, you must indicate that you\n'; 

	if (!checklist.instructions.checked)
	{
		alert(msg + 'have read and understood the ' + service.substring(0,3) + ' Instructions.');
	}
	else if (!checklist.conditions.checked)
	{
		alert(msg + 'have read and understood the ' + service.substring(0,3) + ' Terms and Conditions.');
	}
	else if (!checklist.fees.checked)
	{
		alert(msg + 'are aware of the application processing charges.');
	}
	else if (!checklist.documentation.checked)
	{
		alert(msg + 'understand that late documentation will attract a fee.');
	}
	else 	// checklist is valid
	{
		loadTest(service);
	}
}

function validateNewChecklist(service)
{
	var checklist = document.checklist;
	var msg = 'Before continuing with your application, you must indicate that you\n'; 

	if (!checklist.instructions.checked)
	{
		alert(msg + 'have read and understood the ' + service.substring(0,3) + ' Instructions.');
	}
	else if (!checklist.conditions.checked)
	{
		alert(msg + 'have read and understood the ' + service.substring(0,3) + ' Terms and Conditions.');
	}
	else if (!checklist.documentation.checked)
	{
		alert(msg + 'understand that you are required to provide documentation as soon\nas possible.');
	}
	else 	// checklist is valid
	{
		loadTest(service);
	}
}

