
function validate(theForm)
{
	log = '';
		
	if (theForm.fname.value == '' )
		log += '- First name\n';
	
	if (theForm.lname.value == '' )
		log += '- Last name\n';
	
	if (theForm.state.value == '')
		log += '- State/Province\n';	
	
	if (theForm.country.value == '')
		log += '- Country\n';

	if (theForm.email.value == '')
			log += '- E-mail\n';
			
	if ( theForm.paypal.value != '' && (!theForm.processor[0].checked && !theForm.processor[1].checked) )
		log += '- Please select your preferred payment processor to receive commissions.\n';
		
	if (theForm.timezone.value == '')
		log += '- Time zone\n';
	
	if (theForm.login.value == '')
		log += '- Login\n';
	if (theForm.pw.value == '')
		log += '- Password\n';
	if (theForm.pw2.value == '' )
		log += '- Confirm password\n';
	if (theForm.pw.value != theForm.pw2.value)	
		log += '- Passwords do not match\n';
			
	if ( (!theForm.paidby[0].checked && !theForm.paidby[1].checked) )		
		log += '- Select your preferred payment processor (Pay by PayPal or StormPay?).\n';
			
	if ( theForm.subscription_type.value == '' )
		log += '- Select subscription type.\n';		
	
	if (!theForm.tos.checked)
		log += '- You must agree to our Terms of Service.';
		
	if (log == '' ) {
		theForm.btnSubmit.value = 'Please wait ...';
		theForm.btnSubmit.disabled = true;	
		return true;
	}		
	else
	{				
		alert('The following fields are incomplete:\n\n' + log);
		return false;
	}
}
