function hasSubstance(obj) {
	return (trim(obj) !== '' && obj !== null && obj !== undefined);
}

function isEmailAddress(str) {
	return /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*\.(\w{2}|(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum))$/.test(trim(str));
}

function isTelephoneNumber(str) {
	return /^[\d ()\+]+$/.test(trim(str));
}

function validate(el, msg, valid) {
	trim(el);
	if (!valid) {
		alert(msg);
		el.focus();
	}
	return valid;
}