function isValidPassword(text)
{
//	var chardigit='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789/-_/!/@/#/$/%/^/&/*/~/.';
//	var charset='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789/-_/!/@/#/$/%/^/&/*/~/.';
	var chardigit='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
	var charset='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
	var i=0;
	var correct='true';
	var ch;

	if (text.length < 6 || text.length > 20){
		alert('M\u1eadt kh\u1ea9u ph\u1ea3i c\u00f3 \u00edt nh\u1ea5t 6 k\u00fd t\u1ef1 v\u00e0 kh\u00f4ng qu\u00e1 20 k\u00fd t\u1ef1!');
		return false;
	}
	while(i<text.length && correct=='true')
	{
		ch=text.charAt(i);
		if(chardigit.indexOf(ch)==-1)
		correct='false';
		i++;
	}//end of while
	if (correct=='true')
		return true;
	else{
		alert('M\u1eadt kh\u1ea9u sai c\u00fa ph\u00e1p\nKh\u00f4ng \u0111\u01b0\u1ee3c ch\u1ee9a k\u00fd t\u1ef1 tr\u1ed1ng v\u00e0 m\u1ed9t s\u1ed1 k\u00fd t\u1ef1 \u0111\u1eb7c bi\u1ec7t kh\u00e1c');
		return false;
	}   
}//end of isValidPasswd(text)

function checkForm(f) {
            if (isValidPassword(f.newpass.value)) {
                    return true;
            }
            f.newpass.focus();
            return false;
}//end of checkForm(f)
