/***********************************************************************************************************
 * ntld.wordgenerator.javascript.PasswordGenerator
 * Location: http://www.oclib.com/library/ntld/wordgenerator/javascript/PasswordGenerator.js
 * Version Location: http://www.oclib.com/library/ntld/wordgenerator/javascript/passwordGenerator/20070130/PasswordGenerator.js
 * Index Version Location: http://www.oclib.com/library/ntld/wordgenerator/javascript/passwordGenerator/20070130/index.html
 * © Open Class Library (http://www.oclib.com/)
***********************************************************************************************************/
if (typeof ntld == "undefined") {ntld = {};};
if (typeof ntld.wordgenerator == "undefined") {ntld.wordgenerator = {};};
if (typeof ntld.wordgenerator.javascript == "undefined") {ntld.wordgenerator.javascript = {};};

if (typeof ntld.wordgenerator.javascript.PasswordGenerator == "undefined") {
 ntld.wordgenerator.javascript.PasswordGenerator = function() {this.init();};

 ntld.wordgenerator.javascript.PasswordGenerator.prototype = new com.oclib.javascript.lang.Root();

 ntld.wordgenerator.javascript.PasswordGenerator.prototype.className = "PasswordGenerator"; 
 ntld.wordgenerator.javascript.PasswordGenerator.prototype.classNamespace = "ntld.wordgenerator.javascript.PasswordGenerator"; 
 ntld.wordgenerator.javascript.PasswordGenerator.prototype.classCreated = "20070130"; 
 ntld.wordgenerator.javascript.PasswordGenerator.prototype.classCreator = "http://www.oclib.com/"; 
 ntld.wordgenerator.javascript.PasswordGenerator.prototype.classLocation = "http://www.oclib.com/library/ntld/wordgenerator/javascript/PasswordGenerator.js"; 
 ntld.wordgenerator.javascript.PasswordGenerator.prototype.classIndexLocation = "http://www.oclib.com/library/ntld/wordgenerator/javascript/passwordGenerator/"; 
 ntld.wordgenerator.javascript.PasswordGenerator.prototype.classVersion = "20070130"; 
 ntld.wordgenerator.javascript.PasswordGenerator.prototype.classVersionLocation = "http://www.oclib.com/library/ntld/wordgenerator/javascript/passwordGenerator/20070130/PasswordGenerator.js"; 
 ntld.wordgenerator.javascript.PasswordGenerator.prototype.classVersionIndexLocation = "http://www.oclib.com/library/ntld/wordgenerator/javascript/passwordGenerator/20070130/"; 

 ntld.wordgenerator.javascript.PasswordGenerator.prototype.includeLowerCase = true; 
  ntld.wordgenerator.javascript.PasswordGenerator.prototype.getIncludeLowerCase = function () {return this.includeLowerCase;};
  ntld.wordgenerator.javascript.PasswordGenerator.prototype.setIncludeLowerCase = function (includeLowerCase) {this.includeLowerCase = includeLowerCase;this.createTotalSet();return 1;};
 ntld.wordgenerator.javascript.PasswordGenerator.prototype.includeNumbers = true; 
  ntld.wordgenerator.javascript.PasswordGenerator.prototype.getIncludeNumbers = function () {return this.includeNumbers;};
  ntld.wordgenerator.javascript.PasswordGenerator.prototype.setIncludeNumbers = function (includeNumbers) {this.includeNumbers = includeNumbers;this.createTotalSet();return 1;};
 ntld.wordgenerator.javascript.PasswordGenerator.prototype.includePunctuation = false; 
  ntld.wordgenerator.javascript.PasswordGenerator.prototype.getIncludePunctuation = function () {return this.includePunctuation;};
  ntld.wordgenerator.javascript.PasswordGenerator.prototype.setIncludePunctuation = function (includePunctuation) {this.includePunctuation = includePunctuation;this.createTotalSet();return 1;};
 ntld.wordgenerator.javascript.PasswordGenerator.prototype.includeSimilar = false; 
  ntld.wordgenerator.javascript.PasswordGenerator.prototype.getIncludeSimilar = function () {return this.includeSimilar;};
  ntld.wordgenerator.javascript.PasswordGenerator.prototype.setIncludeSimilar = function (includeSimilar) {this.includeSimilar = includeSimilar;this.createTotalSet();return 1;};
 ntld.wordgenerator.javascript.PasswordGenerator.prototype.includeUpperCase = true; 
  ntld.wordgenerator.javascript.PasswordGenerator.prototype.getIncludeUpperCase = function () {return this.includeUpperCase;};
  ntld.wordgenerator.javascript.PasswordGenerator.prototype.setIncludeUpperCase = function (includeUpperCase) {this.includeUpperCase = includeUpperCase;this.createTotalSet();return 1;};
 ntld.wordgenerator.javascript.PasswordGenerator.prototype.length = 8; 
  ntld.wordgenerator.javascript.PasswordGenerator.prototype.getLength = function () {return this.length;};
  ntld.wordgenerator.javascript.PasswordGenerator.prototype.setLength = function (length) {this.length = length; return 1;};
 ntld.wordgenerator.javascript.PasswordGenerator.prototype.lowerCaseCharacters = "abcdefghijklmnopqrstuvwxyz"; 
  ntld.wordgenerator.javascript.PasswordGenerator.prototype.getLowerCaseCharacters = function () {return this.lowerCaseCharacters;};
  ntld.wordgenerator.javascript.PasswordGenerator.prototype.setLowerCaseCharacters = function (lowerCaseCharacters) {this.lowerCaseCharacters = lowerCaseCharacters;this.createTotalSet();return 1;};
 ntld.wordgenerator.javascript.PasswordGenerator.prototype.lowerCaseCharactersWithoutSimilar = "abcdefghjkmnpqrstuvwxyz"; 
  ntld.wordgenerator.javascript.PasswordGenerator.prototype.getLowerCaseCharactersWithoutSimilar = function () {return this.lowerCaseCharactersWithoutSimilar;};
  ntld.wordgenerator.javascript.PasswordGenerator.prototype.setLowerCaseCharactersWithoutSimilar = function (lowerCaseCharactersWithoutSimilar) {this.lowerCaseCharactersWithoutSimilar = lowerCaseCharactersWithoutSimilar;this.createTotalSet();return 1;};
 ntld.wordgenerator.javascript.PasswordGenerator.prototype.numbers = "0123456789"; 
  ntld.wordgenerator.javascript.PasswordGenerator.prototype.getNumbers = function () {return this.numbers;};
  ntld.wordgenerator.javascript.PasswordGenerator.prototype.setNumbers = function (numbers) {this.numbers = numbers;this.createTotalSet();return 1;};
 ntld.wordgenerator.javascript.PasswordGenerator.prototype.numbersWithoutSimilar = "23456789"; 
  ntld.wordgenerator.javascript.PasswordGenerator.prototype.getNumbersWithoutSimilar = function () {return this.numbersWithoutSimilar;};
  ntld.wordgenerator.javascript.PasswordGenerator.prototype.setNumbersWithoutSimilar = function (numbersWithoutSimilar) {this.numbersWithoutSimilar = numbersWithoutSimilar;this.createTotalSet();return 1;};
 ntld.wordgenerator.javascript.PasswordGenerator.prototype.punctuation = "~`!@#$%^&*()_-+={[}]:;\"'<,>.?/|\\"; 
  ntld.wordgenerator.javascript.PasswordGenerator.prototype.getPunctuation = function () {return this.punctuation;};
  ntld.wordgenerator.javascript.PasswordGenerator.prototype.setPunctuation = function (punctuation) {this.punctuation = punctuation;this.createTotalSet();return 1;};
 ntld.wordgenerator.javascript.PasswordGenerator.prototype.punctuationWithoutSimilar = "~!@#$%^&*()_-+={[}]:;<,>.?/\\"; 
  ntld.wordgenerator.javascript.PasswordGenerator.prototype.getPunctuationWithoutSimilar = function () {return this.punctuationWithoutSimilar;};
  ntld.wordgenerator.javascript.PasswordGenerator.prototype.setPunctuationWithoutSimilar = function (punctuationWithoutSimilar) {this.punctuationWithoutSimilar = punctuationWithoutSimilar;this.createTotalSet();return 1;};
 ntld.wordgenerator.javascript.PasswordGenerator.prototype.totalSet = ""; 
  ntld.wordgenerator.javascript.PasswordGenerator.prototype.createTotalSet = function () {
   if(this.mustTrace()) {this.getLog().println("PasswordGenerator.createTotalSet is running...");};
   this.totalSet = "";
   if(this.includeUpperCase) {if(this.includeSimilar) {this.totalSet += this.upperCaseCharacters;} else {this.totalSet += this.upperCaseCharactersWithoutSimilar;};};
   if(this.includeLowerCase) {if(this.includeSimilar) {this.totalSet += this.lowerCaseCharacters;} else {this.totalSet += this.lowerCaseCharactersWithoutSimilar;};};
   if(this.includeNumbers) {if(this.includeSimilar) {this.totalSet += this.numbers;} else {this.totalSet += this.numbersWithoutSimilar;};};
   if(this.includePunctuation) {if(this.includeSimilar) {this.totalSet += this.punctuation;} else {this.totalSet += this.punctuationWithoutSimilar;};};
   return this.totalSet;
  };
  ntld.wordgenerator.javascript.PasswordGenerator.prototype.getTotalSet = function () {return this.totalSet;};
  ntld.wordgenerator.javascript.PasswordGenerator.prototype.setTotalSet = function (totalSet) {this.totalSet = totalSet; return 1;};
 ntld.wordgenerator.javascript.PasswordGenerator.prototype.upperCaseCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; 
  ntld.wordgenerator.javascript.PasswordGenerator.prototype.getUpperCaseCharacters = function () {return this.upperCaseCharacters;};
  ntld.wordgenerator.javascript.PasswordGenerator.prototype.setUpperCaseCharacters = function (upperCaseCharacters) {this.upperCaseCharacters = upperCaseCharacters;this.createTotalSet();return 1;};
 ntld.wordgenerator.javascript.PasswordGenerator.prototype.upperCaseCharactersWithoutSimilar = "ABCDEFGHJKMNPQRSTUVWXYZ"; 
  ntld.wordgenerator.javascript.PasswordGenerator.prototype.getUpperCaseCharactersWithoutSimilar = function () {return this.upperCaseCharactersWithoutSimilar;};
  ntld.wordgenerator.javascript.PasswordGenerator.prototype.setUpperCaseCharactersWithoutSimilar = function (upperCaseCharactersWithoutSimilar) {this.upperCaseCharactersWithoutSimilar = upperCaseCharactersWithoutSimilar;this.createTotalSet();return 1;};
 
 ntld.wordgenerator.javascript.PasswordGenerator.prototype.getWord = function() {
  if(this.mustTrace()) {this.getLog().println("PasswordGenerator.getWord is running...");};
  var word = "";
  for(var i=0; i<this.length; i++) {
   word += this.totalSet.charAt(this.roll(this.totalSet.length));
  };
  if(this.mustDebug()) {this.getLog().println("PasswordGenerator.getWord word="+word);};
  return word;
 }; 
 
 ntld.wordgenerator.javascript.PasswordGenerator.prototype.init = function() {
  if(this.mustTrace()) {this.getLog().println("PasswordGenerator.init is running...");};
  return this.createTotalSet();
 };
 
 ntld.wordgenerator.javascript.PasswordGenerator.prototype.roll = function(num) {
  return Math.floor(Math.random() * num);
 };
};