function generatePassword(length) {
length = length || 32;
var source = "abcdefghzklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`0123456789-=//[];',./~!@#$%^&*()_+|{}:/"<>?";
var s = "";
for(var i = 0;i < length; i++) {
s += source.charAt(Math.ceil(Math.random()*1000)%source.length);
}
return s;
}