function stripBlanks(theString) {
	var result = theString;
	while (result.substring(0,1) == " ") {
			result = result.substring(1,result.length);
	}
	return result;
}

function isEmptyString(theString) {
	theString = stripBlanks(theString);
	return (theString == "" || theString == null);
}

function validEmail(theAddress) {
	var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
	var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/; // valid
	return (!reg1.test(theAddress) && reg2.test(theAddress));
}

function validPhone(theNumber) { // 650-555-1212
	var regexp = /^[0-9\.\-\ \(\)]{7,15}$/i;
	return regexp.test(theNumber);
}

