// no email
errors['noemail']     = "Please type in your e-mail address, then click <B>\"" + button + "\"</B> again.";

// invalid email format
errors['emailformat'] = "There is a problem with that e-mail address.<br>Please make sure the address is correct, then click <B>\"" + button + "\"</B> again.";

function okEmail(field)
{
	// first check if the field is there
	if(field == null)
	  return true;
		
	var email = field.value;
		
        if(email == '')
       	  return true;
		
	var regexp = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
		
        if(email.search(regexp) == -1)
	{
	  error('emailformat',field);
	  return false;
	}
	
	return true;
}

