// JavaScript Document

		function validate_required(field,alerttxt)
		{
		with (field)
		{
		if (value==null||value=="")
		  {alert(alerttxt);return false}
		else {return true}
		}
		}
		
		function validate_frmCIS(thisform)
		{
		with (thisform)
		{
			if (validate_required(txtFirstName,"Please provide your first name.")==false) 				{txtFirstName.focus();return false}
			if (validate_required(txtSurname,"Please provide your surname.")==false) 					{txtSurname.focus();return false}
			if (validate_required(txtDOB,"Please provide your date of birth.")==false) 					{txtDOB.focus();return false}
			if (txtDOB.value == "DD/MM/YYYY") {alert("Please provide your date of birth"); txtDOB.focus; return false; }

			if (validate_required(txtAddress,"Please provide your address.")==false) 					{txtAddress.focus();return false}
	
			if (validate_required(txtHourPW,"How many hours are you looking to study at Portsmouth Language College?")==false) 					
{txtHourPW.focus();return false}

			if (validate_required(txtStartDate,"Please enter a start date.")==false) 		{txtStartDate.focus();return false}
			
			if (validate_required(txtMedicalDetails,"Are there any medical problems you need to tell us about?.")==false) 					{txtMedicalDetails.focus();return false}
			
			if (agree.checked == false) { alert("Please confirm you agree to the terms and conditions"); agree.focus(); return false; } 
		}	
}