function validateForm(theForm){
	var msg = "";
	var errorNum = 0;
	
	if(theForm.reg_email.value == ""){
		msg = msg + ++errorNum + ") Email field is a required field\n";
	} else{
		var x = theForm.enq_email.value;
		var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if (!filter.test(x)){
			msg = msg + ++errorNum + ") Email field requires a valid email address\n";
		}
	}
	
	if(theForm.reg_confirmemail.value == ""){
		msg = msg + ++errorNum + ") Please confirm your email\n";
	} else{
		var x = theForm.enq_email.value;
		var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if (!filter.test(x)){
			msg = msg + ++errorNum + ") Email Confirmation field requires a valid email address\n";
		}
	}
	
	if(theForm.reg_confirmemail.value != theForm.reg_email.value){
		msg = msg + ++errorNum + ") Please provide the same email address as your intended registered email\n";
	}
	
	if(theForm.reg_pswd.value == ""){
		msg = msg + ++errorNum + ") Please provide a password\n";
	}
	
	if(theForm.reg_confirmpswd.value == ""){
		msg = msg + ++errorNum + ") Please confirm your password\n";
	}
	
	if(theForm.reg_pswd.value != theForm.reg_confirmpswd.value){
		msg = msg + ++errorNum + ") Please provide the same passwords\n";
	}
	
	if(theForm.reg_fname.value == ""){
		msg = msg + ++errorNum + ") First name is a required field\n";
	}
	
	if(theForm.reg_lname.value == ""){
		msg = msg + ++errorNum + ") Last name is a required field\n";
	}
	
	if(theForm.reg_compname.value == ""){
		msg = msg + ++errorNum + ") Company name is a required field\n";
	}
	
	if(theForm.reg_add1.value == ""){
		msg = msg + ++errorNum + ") Address 1 is a required field\n";
	}
	
	if(theForm.reg_town.value == ""){
		msg = msg + ++errorNum + ") Town is a required field\n";
	}
	
	if(theForm.reg_zip.value == ""){
		msg = msg + ++errorNum + ") Zip is a required field\n";
	}
	
	if(theForm.reg_country.value == ""){
		msg = msg + ++errorNum + ") Country is a required field\n";
	}
	
	if(theForm.reg_contact.value == ""){
		msg = msg + ++errorNum + ") Contact is a required field\n";
	}
	
	if(msg != ""){
		alert(msg);
		return false;
	}
}