String.prototype.isEmpty = function()
{
	return this.match(/^\s*$/);
}

String.prototype.isInteger = function()
{
	return this.match(/^[0-9]+$/);
}

String.prototype.isFloat = function()
{
	return this.match(/^([0-9]+|[0-9]+\.[0-9]+)$/);
}

String.prototype.isEmail = function()
{
	return this.match(/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/);
}

// functions

function nl_subscribe()
{
	if( ! document.getElementById( 'nl_email' ).value.isEmpty() )
	{
		if( document.getElementById( 'nl_email' ).value.isEmail() )
		{
			document.getElementById( 'nl_form' ).submit();
			return;
		}
	}
	
	document.getElementById( 'nl_email' ).className = 'nl_input_red';
	document.getElementById( 'nl_email' ).focus();
	
	return;
}
