function validate_email(addr) {
	var invalidChars = '\/\'\\ ";:?!()[]\{\}^|';
	for (i=0; i<invalidChars.length; i++) {
		if (addr.indexOf(invalidChars.charAt(i),0) > -1) {
			alert('We could not validate your email address:\n> email address contains invalid characters');
			return false;
			}
		}
	var atPos = addr.indexOf('@',0);
	if (atPos == -1) {
		alert('We could not validate your email address:\n> email address must contain an "@"');
		return false;
		}
	if (atPos == 0) {
		alert('We could not validate your email address:\n> email address must not start with "@"');
		return false;
		}
	if (addr.indexOf('@', atPos + 1) > - 1) {
		alert('We could not validate your email address:\n> email address can contain only one "@"');
		return false;
		}
	if (addr.indexOf('.', atPos) == -1) {
		alert('We could not validate your email address:\n> email address must contain a "." in the domain name');
		return false;
		}
	if (addr.indexOf('@.',0) != -1) {
		alert('We could not validate your email address:\n> "." must not immediately follow "@" in email address');
		return false;
		}
	if (addr.indexOf('.@',0) != -1) {
		alert('We could not validate your email address:\n> "." must not immediately precede "@" in email address');
		return false;
		}
	if (addr.indexOf('..',0) != -1) {
		alert('We could not validate your email address:\n> two "." must not be adjacent in email address');
		return false;
		}
	var suffix = addr.substring(addr.lastIndexOf('.')+1);
	if (suffix.length != 2 && suffix != 'com' && suffix != 'net' && suffix != 'org' && suffix != 'edu' && suffix != 'int' && suffix != 'mil' && suffix != 'gov' & suffix != 'arpa' && suffix != 'biz' && suffix != 'aero' && suffix != 'name' && suffix != 'coop' && suffix != 'info' && suffix != 'pro' && suffix != 'museum') {
		alert('We could not validate your email address:\n> invalid primary domain in email address (e.g. ".com")');
		return false;
		}
	return true;
	}