function checkPasswordStrength(password)
{
	var MATCH_NUMBERS = new RegExp('\\d{1}', 'g');
	var MATCH_LOWER_CASE = new RegExp('[a-z]{1}', 'g');
	var MATCH_UPPER_CASE = new RegExp('[A-Z]{1}', 'g');
	var MATCH_SPECIAL_CHARS = new RegExp('[^\\d\\w]', 'g');

	var pwd_score = 0;
	var pwd_length = password.length;



	// check password length strength
	if (pwd_length < 5)
	{
		pwd_score += 5;
	}
	else if (pwd_length >= 5 && pwd_length < 8)
	{
		pwd_score += 10;
	}
	else if (pwd_length >= 8 && pwd_length < 16)
	{
		pwd_score += 15;
	}
	else if (pwd_length >= 16)
	{
		pwd_score += 20;
	}



	// check matching mixed (lower/upper) case
	var match_lower_case = password.match(MATCH_LOWER_CASE);
	var match_upper_case = password.match(MATCH_UPPER_CASE);
	if (match_lower_case && match_upper_case)
	{
		pwd_score += 15;
	}



	// check matching numbers
	var match_numbers = password.match(MATCH_NUMBERS);
	if (match_numbers)
	{
		pwd_score += 15;
	}



	// check matching special chars
	var match_special_chars = password.match(MATCH_SPECIAL_CHARS);
	if (match_special_chars)
	{
		pwd_score += 20;
	}



	if (pwd_length <= 0)
	{
		pwd_score = 0;
	}



	return pwd_score;
}
