function isEmptyString(string) {
	if(!string || string==null || string.value=='') {	
		return true;
	}
	return false;
}

function validateForm(thisForm) {
	if(isEmptyString(thisForm.form_username.value) || thisForm.form_username.length < 4 || thisForm.form_username.length > 16) {
		thisForm.form_username.focus();
		alert('You must fill out the "Username" field, and it must be between 4 and 16 characters (inclusive)');
		return false;
	}

	if(isEmptyString(thisForm.form_password.value) || thisForm.form_password.length < 6 || thisForm.form_password.length > 25 || thisForm.form_password.value != thisForm.form_password2.value) {
		thisForm.form_password.focus();
		alert('You must fill out the "Password" fields, they must match, and they must be between 6 and 25 characters (inclusive)');
		return false;
	}
/*
form_username
form_password
form_password2
form_email
form_timezone = 'na'
form_sex
form_month
form_day
form_year
form_country
form_state
form_zip
form_code

	if(isEmptyString(thisForm.form_reason.value) || thisForm.form_reason.value == 'Please select a reason') {
		thisForm.form_reason.focus();
		alert('You must select a reason from the "Reason" selection box.');
		return false;
	}
	if(isEmptyString(thisForm.form_message.value)) {
		thisForm.form_message.focus();
		alert('You must fill out the "Message / Details" field.');
		return false;
	}
	// could add in email validation
	if(isEmptyString(thisForm.form_email.value)) {
		thisForm.form_email.focus();
		alert('You must fill out the "Your Email Address" field.');
		return false;
	}
*/
	return true;
}
