	// validation script for registration form

	function validate(form) 
	{var e = form.elements, m = '';
	//if(!e['txtfirstname'].value) {m += '- Your first name\n';}
	//if(!e['txtsurname'].value) {m += '- Your surname\n';}
	
	if(!/.+@[^.]+(\.[^.]+)+/.test(e['txtemail'].value)) {
	m += '- Valid email address\n';
	}
	
	if(!e['txt_password'].value) {m += '- Password \n';}
	
	if(e['txt_password'].value){
		if(e['txt_password'].value.length<6) {m += '- Password must be at least 6 characters \n';}
	}

	
	if((e['txt_password2'].value)!=(e['txt_password'].value)) {m += '- Password & confirmation password do not match \n';}


	if(m) {
	alert('The following fields are required:\n\n' + m);
	return false;
	}
	return true;
	}