function chkpwd(w) {
var StrengthValue
StrengthValue = 0; x1 = /[A-Z]/; x2 = /[a-z]/; x3 = /\d/; x4 = /[^a-zA-Z0-9]/;

if (x1.test(w) == true) {StrengthValue = StrengthValue + 1;};if (x2.test(w) == true) {StrengthValue = StrengthValue + 1;};if (x3.test(w) == true) {StrengthValue = StrengthValue + 1;};
if (x4.test(w) == true) {StrengthValue = StrengthValue + 1;};if (StrengthValue > 3) {StrengthValue = 3;};if (w.length == 0) {StrengthValue = 0;};
if (w.length > 9 && StrengthValue == 2) {StrengthValue = 3;};if (w.length < 7 && StrengthValue == 3) {StrengthValue = 2;};if (w.length > 6 && StrengthValue == 1) {StrengthValue = 2;};
if (StrengthValue == 0) {document.getElementById("div1w").innerHTML = "";document.getElementById("div2w").innerHTML = "&nbsp;";document.getElementById("div3w").innerHTML = "";
document.getElementById("td1").style.backgroundColor = "#EBEBEB";document.getElementById("td2").style.backgroundColor = "#EBEBEB";
document.getElementById("td3").style.backgroundColor = "#EBEBEB";document.getElementById("tab1").style.visibility = "hidden"; };
if (StrengthValue == 1) {document.getElementById("div1w").innerHTML = "Zwak";document.getElementById("div2w").innerHTML = "";document.getElementById("div3w").innerHTML = "";
document.getElementById("td1").style.backgroundColor = "#FF4545";document.getElementById("td2").style.backgroundColor = "#EBEBEB";
document.getElementById("td3").style.backgroundColor = "#EBEBEB";document.getElementById("tab1").style.visibility = "visible"; };
if (StrengthValue == 2) {document.getElementById("div1w").innerHTML = "";document.getElementById("div2w").innerHTML = "Redelijk";document.getElementById("div3w").innerHTML = "";
document.getElementById("td1").style.backgroundColor = "#FFD35E";document.getElementById("td2").style.backgroundColor = "#FFD35E";
document.getElementById("td3").style.backgroundColor = "#EBEBEB";document.getElementById("tab1").style.visibility = "visible";};
if (StrengthValue == 3) {document.getElementById("div1w").innerHTML = "";document.getElementById("div2w").innerHTML = "";document.getElementById("div3w").innerHTML = "Sterk";
document.getElementById("td1").style.backgroundColor = "#3ABB1C";document.getElementById("td2").style.backgroundColor = "#3ABB1C";
document.getElementById("td3").style.backgroundColor = "#3ABB1C";document.getElementById("tab1").style.visibility = "visible";};
if (w.length > 0 && w.length < 5) {document.getElementById("div1w").innerHTML = "Te kort";document.getElementById("div2w").innerHTML = "";document.getElementById("div3w").innerHTML = "";
document.getElementById("td1").style.backgroundColor = "#FF4545";document.getElementById("td2").style.backgroundColor = "#EBEBEB";
document.getElementById("td3").style.backgroundColor = "#EBEBEB";document.getElementById("tab1").style.visibility = "visible";}
}
