<!--
function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function checkrequest(){
	//Verify fields completed for About face request form
	oktogo = true;
	msg = " ";
	if (document.forms[0].Email_Address.value=="") { 
		msg = '- your email address.\n';
	} else {
		test = document.forms[0].Email_Address.value;
		if (test.indexOf('@') < 1 || test.indexOf('.') < 1) { 
			msg = '- a valid email address.\n';
		}
	}
	if (document.forms[0].Contact_Name.value=="") msg += '- your full name.\n';
	
	if (document.forms[0].Request[0].checked) {
		if (document.forms[0].Postal_Address.value=="" || document.forms[0].Postal_Postcode.value=="") msg += '- full postal address for package delivery.\n';
	}
	if (document.forms[0].Request[1].checked) {
		if (document.forms[0].Contact_Phone.value=="") msg += '- daytime telephone number.\n';
		if (document.forms[0].Group_objectives.value=="") msg += '- goals to achieve during training.\n';
	}
	if (!document.forms[0].Request[1].checked && !document.forms[0].Request[0].checked ) {
		msg = '\n- Guidance on how we might assist.\n\n\n Would you like to book or receive a copy of the programme?\n';
	}

	if (msg != " ") { 
		alert ('To assist with your enquiry, we require:\n\n' + msg);
		oktogo = false;
	}
	return oktogo;
}

function checkform(){
	//Verify fields completed for Contact form
	oktogo = true;
	msg = " ";
	if (document.forms[0].Email_Address.value=="") { 
		msg = '- your email address.\n';
	} else {
		test = document.forms[0].Email_Address.value;
		if (test.indexOf('@') < 1 || test.indexOf('.') < 1) { 
			msg = '- a valid email address.\n';
		}
	}
	if (document.forms[0].FirstName.value=="" || document.forms[0].LastName.value=="") msg += '- your full name.\n';
	
	if (msg != " ") { 
		alert ('To assist with your enquiry, we require:\n\n' + msg);
		oktogo = false;
	}
	return oktogo;
}

function checkenrol(){
	oktogo = true;
	msg = "";
	msg2 =" ";
	
	// for (x=1;x<=3;x++){
		//dateset = eval('d.forms[0].CourseDate' + x + '.options.selectedIndex');
		//courseset = eval('d.forms[0].Course' + x + '.options.selectedIndex');
		//if (courseset != 0 && dateset == 0){
		//	msg2 += '- ' + courselist[courseset][1] + '\n';
			//oktogo = false;
		//	}
	//} 
	if (msg2 != " "){
		msg += msg2;
		msg2 = " ";
	}
	else { msg = "";
	}

	if (document.forms[0].Email_Address.value=="") { 
		msg2 = '- your email address.\n';
		oktogo = false;
	} else {
		test = document.forms[0].Email_Address.value;
		if (test.indexOf('@') < 1 || test.indexOf('.') < 1) { 
			msg2 = '- a valid email address.\n';
			oktogo = false;
		}
	}
	

	
	if (document.forms[0].Contact_Name.value=="") {
		msg2 += '- your full name.\n';
		oktogo = false;
	}
	
	if (msg2 != " "){
		msg += '\nAlso to complete the registration, we require:\n\n';
		msg += msg2;
		msg2 = " ";
	}

	if (!oktogo) alert(msg);
	
	return oktogo;
}

//-->
