function eventLogin(ret){
	
	var challengeA=document.form.textChallenge.value;
	var loginidB=document.form.textLoginId.value;
	var passwordC=document.form.textPassword.value;
	var passwordHashD=passowrdHash(passwordC, loginidB);
	document.form.textPasswordHash.value=passwordHashD;
	document.form.textChallengeResponse.value=challengeResponse(passwordHashD, challengeA);
	
	if(ret == true) {
		/* パスワード、パスワードハッシュは送信しないので消去 */
		document.form.textPassword.value="";
		document.form.textPasswordHash.value="";
	}

	
	return ret;
}

function passowrdHash(password, account){
	return CryptoJS.SHA256(account+":"+password);
}
function challengeResponse(phash, chvalue) {
	return CryptoJS.SHA256(phash+":"+chvalue);
}