
function __EMAIL_DataFormat()
{
	this.lastError = null;
	this.checkData = __EMAIL_checkData;
	this.formatData = __EMAIL_formatData;
	this.__rx = new RegExp("^[A-z0-9\_\.\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\}\|\~]{1,127}\@[A-z0-9\_\.\-]{2,128}$");
}

function __EMAIL_checkData(value)
{
	if(value.match(this.__rx) == null)
	{
		this.lastError = "CHARS";
		return false;
	}
	return true;
}

function __EMAIL_formatData(value)
{
	if(!this.checkData(value))
		return null;
	return value;
}
