var manditory = ['employment_category', 'first_name', 'surname', 'address', 'town', 'country', 'postcode', 'email'];
function validate(form)
{
	var valid = true;
	for (m in manditory)
	{
		if (manditory[m] == 'employment_category')
		{
			/* if (eval('form.'+manditory[m]).length < 3) valid = false; */
		}
		else if (manditory[m] == 'how_many_children')
		{
			
			if (eval('form.'+manditory[m]).options[eval('form.'+manditory[m]).selectedIndex].value < 1) valid = false;
			
		}
		else
		{
			if (eval('form.'+manditory[m]).value.length < 3) valid = false;
		}
		
		if (!valid)
		{
			alert('Asterisked fields are manditory.');
			break;
		}
	}
	if (valid)
	{
		form.submit();
		alert('Submitted registration request OK.');
	}
	return false;
}
