

function isEmpty (inputString) {

	if (inputString == null || inputString == "") {
		return true;
	}
	return false;
}

function isEmailAddr(email)
{
  var result = false
  var theStr = new String(email)
  var index = theStr.indexOf("@");
  if (index > 0)
  {
    var pindex = theStr.indexOf(".",index);
    if ((pindex > index+1) && (theStr.length > pindex+1))
	result = true;
  }
  return result;
}

function checkForm(form) {
	// Newsletter fields and story 1 fields are required
	if (isEmpty(form.Firstname.value) || isEmpty(form.Email.value) || isEmpty(form.Company.value) || isEmpty(form.Position.value) || isEmpty(form.Lastname.value)) {
		alert("\n Please complete all required fields: \n" +
			  " First Name, Last Name, Email Address \n" +
			  " Title/Position, Company/Organization   \n");
		return false;
	} else {
   
  		if (form.Email.value.length < 3){
       		alert("Please be sure to enter your correct email address in the \"email\" field.");
     		form.Email.focus();
			return (false);
 		 }
  return (true);
	}
	
	// Validation was successful...
	return true;
}
