var stringValidator = {
	validateEmail : function ( str ){
		if( str.match( /.+@.+/ )){ return true; }
		else return false;
	},
	validatePassword : function ( str ){
		if( str.match( /[^a-zA-Z0-9\-\/\$&@\.,\?!#%\+\=_\~\ ]/ )){ return false; }
		else return true;
	},
	checkPasswordStrength : function ( str ){
		if( ! stringValidator.validatePassword( str )){ return 6 }
		else if( str == "" ){ return 0 }
		else if( str.length < 4 ){ return 1}
		else if( str.length < 10 ){
			if( str.match( /[^0-9a-zA-Z]/ )){ return Math.floor( str.length / 2 ) + 1 }
			else if( str.match( /[^0-9]/ )){ return Math.floor( str.length / 2 ) }
			else return Math.floor( str.length / 2 ) - 1
		} else if( str.length < 16 ){
			if( str.match( /[^0-9]/ )){ return 5 }
			else return 4
		} else return 5
	}
}