function testPassword(passwd)
{
var description = new Array();
description[0] = "<table><tr><td width=60 bgcolor=#ff0000 class=strcell>Very Poor</td><td width=240 bgcolor=#ffffff class=strcell></td></tr></table>";
description[1] = "<table><tr><td width=120 bgcolor=#bb0000 class=strcell>Poor</td><td width=180 bgcolor=#ffffff class=strcell></td></tr></table>";
description[2] = "<table><tr><td width=180 bgcolor=#ff9900 class=strcell>Good</td><td width=120 bgcolor=#ffffff class=strcell></td></tr></table>";
description[3] = "<table><tr><td width=240 bgcolor=#00bb00 class=strcell>Very Good</td><td width=60 bgcolor=#ffffff class=strcell></td></tr></table>";
description[4] = "<table><tr><td width=304 bgcolor=#00ee00 class=strcell>Excelent</td></tr></table>";
description[5] = "<table><tr><td width=304 bgcolor=#ffffff class=strcell></td></tr></table>";
 
		var intScore   = 0
		var strVerdict = 0
		
		if (passwd.length==0 || !passwd.length)
		{
			intScore = -1
		}
		else if (passwd.length>0 && passwd.length<5)
		{
			intScore = (intScore+3)
		}
		else if (passwd.length>4 && passwd.length<8)
		{
			intScore = (intScore+6)
		}
		else if (passwd.length>7 && passwd.length<12)
		{
			intScore = (intScore+12)
		}
		else if (passwd.length>11)
		{
			intScore = (intScore+18)
		}

		if (passwd.match(/[a-z]/))
		{
			intScore = (intScore+1)
		}
		
		if (passwd.match(/[A-Z]/))
		{
			intScore = (intScore+5)
		}
		
		if (passwd.match(/\d+/))
		{
			intScore = (intScore+5)
		}
		
		if (passwd.match(/(.*[0-9].*[0-9].*[0-9])/))
		{
			intScore = (intScore+5)
		}
	
		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(/(\d.*\D)|(\D.*\d)/))
		{
			intScore = (intScore+2)
		}
 
		if (passwd.match(/([a-zA-Z0-9].*[!,@,#,$,%,^,&,*,?,_,~])|([!,@,#,$,%,^,&,*,?,_,~].*[a-zA-Z0-9])/))
		{
			intScore = (intScore+2)
		}
	
		if(intScore == -1)
		{
		   strVerdict = description[5];
		}
		else if(intScore > -1 && intScore < 16)
		{
		   strVerdict = description[0];
		}
		else if (intScore > 15 && intScore < 25)
		{
		   strVerdict = description[1];
		}
		else if (intScore > 24 && intScore < 35)
		{
		   strVerdict = description[2];
		}
		else if (intScore > 34 && intScore < 45)
		{
		   strVerdict = description[3];
		}
		else
		{
		   strVerdict = description[4];
		}
	
	document.getElementById("Words").innerHTML= (strVerdict);
	
}
