/*
 * ??????????????????????????????????????????????????????????????????MD5???
 */

function pwdEncode(pwdid){
	rawPasswd = document.getElementById(pwdid).value;
	if (trim(rawPasswd).length > 0 && trim(rawPasswd).length != 32 && !isHttps()) {
		document.getElementById(pwdid).value = hex_md5(rawPasswd);
	}
}

function trim(str) {
	return str.replace(/^\s+|\s+$/g, "");
}

function isHttps(){
	if (document.URL.toLowerCase().indexOf("https") == 0) {
		return true;
	} else {
		return false;
	}
}
