
function validateLogin(){
	with(document.frmlogin){
		if(email.value==''){
			window.alert('To login you must enter your email address.');
			email.focus()
			return false;
		}
		if(password.value==''){
			window.alert('To login you must enter your password.');
			password.focus();
			return false;
		}
	}
	return true;
}

function validateRegistration(){
	with(document.frmmember){
		if(Email.value == ''){
			window.alert('Please fill in your email.');
			email.focus();
			return false;
		}
		if(Password.value == ''){
			window.alert('Please fill in your password.');
			Password.focus();
			return false;
		}
		if(Company.value == ''){
			window.alert('Please fill in your company name.');
			Company.focus();
			return false;
		}
		if(FirstName.value == ''){
			window.alert('Please fill in your first name.');
			FirstName.focus();
			return false;
		}
		if(LastName.value == ''){
			window.alert('Please fill in your last name.');
			LastName.focus();
			return false;
		}
		if(Address1.value == ''){
			window.alert('Please fill in your address.');
			Address1.focus();
			return false;
		}
		if(City.value == ''){
			window.alert('Please fill in your city.');
			City.focus();
			return false;
		}
		if(StateProv.value == ''){
			window.alert('Please fill in your state or province.');
			StateProv.focus();
			return false;
		}
		if(Country.value == ''){
			window.alert('Please fill in your country.');
			Country.focus();
			return false;
		}
		if(PostalCode.value == ''){
			window.alert('Please fill in your zip code/postal code.');
			.focus();
			return false;
		}
		if(Phone.value == ''){
			window.alert('Please fill in your phone number.');
			Phone.focus();
			return false;
		}
	}
	return true;
}

function validatePayment(){
	with(document.frmpayment){
		if(cardholder.value == ''){
			window.alert('Please fill in the credit card holder\'s name.');
			cardholder.focus();
			return false;
		}
		if(cardnumber.value == ''){
			window.alert('Please fill in the credit card number.');
			cardnumber.focus();
			return false;
		}
		if(cardexpmonth.selectedIndex > 0){
			window.alert('Please fill in the credit card expiration month.');
			cardexpmonth.focus();
			return false;
		}
		if(cardexpyear.selectedIndex > 0){
			window.alert('Please fill in the credit card expiration year.');
			cardexpyear.focus();
			return false;
		}
		if(cardcode.value == ''){
			window.alert('Please fill in the credit card security code that appears on the back of the card.');
			cardholder.focus();
			return false;
		}
	}
	return true;
}
