function checkPassword (strng) {
if (strng.value == "") {
   alert ("You didn't enter a new password.\n");
   return (false);
}
    var illegalChars = /[\W_]/; // allow only letters and numbers
    
    if (strng.value.length < 8 || strng.value.length > 12) {
       alert ("The password is the wrong length.\n");
       strng.value="";
       return (false);
    }
    else if (illegalChars.test(strng.value)) {
      alert ("The password contains illegal characters.\n");
      strng.value="";
      return (false);
    } 
    else if (!((strng.value.search(/(a-z)+/)) && (strng.value.search(/(0-9)+/)))) {
       alert ("The password must contain at least one uppercase letter, one lowercase letter, and one numeral.\n");
       strng.value="";
       return (false);
    }  
    
    else {
	    alert ("Your new password is fine and you will now be redirected to a confirmation page."); 
    	return (true);
    	}
   
}    





function checkPostcode(postcode) {
if (postcode.value == "") {
   alert ("You didn't enter your postcode/location.We need a postcode/location to assist you better.\n");
   return (false);
}
       else if (postcode.value.length < 4 ) {
       alert ("Please make sure you enter your full postcode/location.\n");
       postcode.value="";
       return (false);
    } 
    else {
	    alert ("You will now be forwarded to the confirmation screen......."); 
    	return (true);
    	}
   
}   




