function isEmpty(textField) {
	if ((textField.length==0) ||(textField==null)) {
		return true;
	} else { 
		return false; 
	}
}

function validateEmail(strValue) {
	var emailReg = "^[\\w-_\.]*[\\w-_\.]\@[\\w]\.+[\\w]+[\\w]$";
	var regex = new RegExp(emailReg);
	return regex.test(strValue);
}

function verifyFields()	{
	var captlength = new Number(document.formSubscribe.captchainput.value.length);
	if (isEmpty(document.formSubscribe.firstname.value)) {
		alert('Error on First Name field: Please enter your First Name here!');
		document.formSubscribe.firstname.focus();
		document.formSubscribe.firstname.select();
		return false;
	}
	if (isEmpty(document.formSubscribe.lastname.value))  {
		alert('Error on First Name field: Please enter your Last Name here!');
		document.formSubscribe.lastname.focus();
		document.formSubscribe.lastname.select();
		return false;
	}
	if ((isEmpty(document.formSubscribe.email.value)) || (!validateEmail(document.formSubscribe.email.value))) {
		alert('Error on email field: Please enter the EMAIL here!');
		document.formSubscribe.email.focus();
		document.formSubscribe.email.select();
		return false;
	}
	if (captlength < 3) {
		alert('Please enter the characters in black in the confirmation box!');
		document.formSubscribe.captchainput.focus();
		document.formSubscribe.captchainput.select();
		return false;
	}
	if (!document.formSubscribe.terms.checked) {
		alert('Please Confirm and Read the Terms of Use before subscribing to our newsletter!');
		document.formSubscribe.terms.focus();
		document.formSubscribe.terms.select();
		return false;
	}
	return true;
}

