&& (q2 = prompt("please enter second new question:",question2))!=null
&& (a2 = prompt("please enter answer of second question:",""))!=null
&& (q3 = prompt("please enter third new question:",question3))!=null
&& (a3 = prompt("please enter answer of third question:",""))!=null)
question1 = q1;
question2 = q2;
question3 = q3;
reminder = key.xor(generatekeybypwd("answer1:"+a1)).xor(generatekeybypwd("answer2:"+a2)).xor(generatekeybypwd("answer3:"+a3));
answermd5 = md5("answers:"+escape(a1+a2+a3));
storepwds();
}
function modifytitle(e){
var oldtitle = e.innertext;
var spwd = e.nextsibling.innertext;
var newtitle = prompt("please enter new password title",oldtitle);
if (!newtitle) return;
pwds[escape(oldtitle.xor())]=null;
pwds[escape(newtitle.xor())]=escape(spwd.xor());
storepwds();
showpwds();
}
function modifypwd(e){
var stitle = e.previoussibling.innertext;
var oldpwd = e.innertext
var newpwd = prompt("please enter new password",oldpwd);
if (!newpwd) return;
pwds[escape(stitle.xor())]=escape(newpwd.xor());
storepwds();
showpwds();
}
function removepwd(k){
pwds[k]=null;
storepwds();
showpwds();
}
function createpwd(){
var charset = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz0123456789";
var result = "";
var st = md5((new date()-math.random()).tostring())+md5((new date()+math.random()).tostring());
for (var i=0;i<st.length;i+=2)
result += charset.charat(parseint(st.substr(i,2),16)%charset.length)
clipboarddata.setdata('text',result);
alert("generated password \""+result+"\" was copied into clipboard.");
}
function generatekeybypwd(p){
return unescape((md5(p)+md5(p+" ")+md5(p+"+")+md5(p+"-")).replace(/(....)/g,"%u$1"))
}
//-->
</script>
</head>
<body>
<div id=content></div>
<br>
<center>
<button onclick="addpwd()" disabled>add new<br>password item</button>
<button onclick="changeaccesspwd()" disabled>change access<br>password</button>
<button onclick="changeaccesspwdremander()" disabled>change access<br>password remander</button>
<button onclick="createpwd()" disabled>create a new<br>random password</button>
</center>
</body>
</html>