
function checkform ( form )
{
  if (form.FIRSTNAME.value == "") {
    alert( "The first name field is required to complete and submit this form." );
    form.FIRSTNAME.focus();
    return false ;
  }
  if (form.LASTNAME.value == "") {
    alert( "The last name field is required to complete and submit this form." );
    form.LASTNAME.focus();
    return false ;
  }
    if (form.CITY.value == "") {
    alert( "The city field is required to complete and submit this form." );
    form.CITY.focus();
    return false ;
  }
    if (form.State.value == "") {
    alert( "The state field is required to complete and submit this form." );
    form.State.focus();
    return false ;
  }
  if (form.PHONE.value == "") {
    alert( "The phone number field is required to complete and submit this form." );
    form.PHONE.focus();
    return false ;
  }
  if (form.EMAIL.value == "") {
    alert( "The email address field is required to complete and submit this form." );
    form.EMAIL.focus();
    return false ;
  }
  if (form.EMAIL.value.indexOf("@") < 1) { 
	alert( "Please enter a valid email address with an @ symbol." );
	return false;
	}
	if (form.EMAIL.value.lastIndexOf(".") <= form.EMAIL.value.indexOf("@")) {
	alert( "Please enter a valid email address with a period." );
	return false;
	}
  if (form.AGEVERIFY.checked == false ) {
    alert( "You must be at least 13 years old to subscribe for Hermie & Friends updates. If you are not, please ask your parents for permission.  For persons 13 years or older, please place a check in the checkbox to proceed." );
    form.AGEVERIFY.focus();
    return false ;
  }

  return true ;
}

// Fuction will Capitalize First Letter of Form Fields

function capitalizeMe(obj) {
        val = obj.value;
        newVal = '';
        val = val.split(' ');
        for(var c=0; c < val.length; c++) {
                newVal += val[c].substring(0,1).toUpperCase() +
val[c].substring(1,val[c].length) + ' ';
        }
        obj.value = newVal;
}