// Name: Email
// Desc: Object template for centralized email address validation via JS.  
// Args: Instantiate the object with the target address to be manipulated/validated

// 20080118 - KR - initial implementation

function Email( address ) {

	this.address = address;
	this.validatorExpression = new RegExp( /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-\+])+\.)+([a-zA-Z0-9]{2,4})+$/ );

	this.isValid = function() {
		if( this.address.search( this.validatorExpression ) != -1 ) {
			return true;
		}

		return false;	
	};

}
