function testPassword(passwd)
{
		var intScore   = 0
		var strVerdict = "gyenge"
		var strLog     = ""
		
		if (passwd.length<5 && passwd.length>0) 
		{
			intScore = (intScore+3);
		}
		else if (passwd.length>4 && passwd.length<8)
		{
			intScore = (intScore+6);
                }
		else if (passwd.length>7 && passwd.length<16)
		{
			intScore = (intScore+12);
		}
		else if (passwd.length>15)
		{
			intScore = (intScore+18);
		}

		if (passwd.match(/[a-z]/))
		{
			intScore = (intScore+1);
		}
		
		if (passwd.match(/[A-Z]/))
		{
			intScore = (intScore+5);
		}
		
		// NUMBERS
		if (passwd.match(/\d+/))
		{
			intScore = (intScore+5);
		}
		
		if (passwd.match(/(.*[0-9].*[0-9].*[0-9])/))
		{
			intScore = (intScore+5);
		}
		
		
		// SPECIAL CHAR
		if (passwd.match(/.[!,@,#,$,%,^,&,*,?,_,~]/))
		{
			intScore = (intScore+5)
		}
		
		if (passwd.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/))
		{
			intScore = (intScore+5);
		}
		if (passwd.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/))
		{
			intScore = (intScore+2);
		}

		if (passwd.match(/([a-zA-Z])/) && passwd.match(/([0-9])/))
		{
			intScore = (intScore+2);
		}
 
		if (passwd.match(/([a-zA-Z0-9].*[!,@,#,$,%,^,&,*,?,_,~])|([!,@,#,$,%,^,&,*,?,_,~].*[a-zA-Z0-9])/))
		{
			intScore = (intScore+2);
		}
		if(intScore < 16)
		{
		   strVerdict = "Nagyon gyenge";
                   color="#FF0000";
		}
		else if (intScore > 15 && intScore < 25)
		{
		   strVerdict = "Gyenge";
                   color="#ff6d6d";
		}
		else if (intScore > 24 && intScore < 35)
		{
		   strVerdict = "Elfogadható";
                   color="#fff36d";
		}
		else if (intScore > 34 && intScore < 45)
		{
		   strVerdict = "Erős";
                   color="#aeff6d";
		}
		else
		{
		   strVerdict = "Elég erős";
                   color="#00FF00";
		}
	
	//Az érték intScore
        
        
        
        
	document.getElementById('pwdinfo0').innerHTML = strVerdict;
        document.getElementById('pwdinfo0').bgColor = color;
}

