/*
	This regular expression for US phone numbers conforms to NANP
	A-digit and D-digit requirments (ANN-DNN-NNNN). Area Codes 001-199
	are not permitted; Central Office Codes 001-199 are not permitted. 
	Format validation accepts 10-digits without delimiters, optional 
	parens on area code, and optional spaces or dashes between area code, 
	central office code and station code. Acceptable formats include 
	2225551212, 222 555 1212, 222-555-1212, (222) 555 1212, (222) 555-1212, etc.
*/
function isUSPhone ( str, allowBlank ) {
	if ( (str.length < 1) && (allowBlank == true) ) return true;
	if ( (str.length < 1) && (allowBlank == false) ) return false;
	re = /^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/i;
	return re.test( str );
}