Вход Регистрация
Файл: _rootmenu/passwd.js
Строк: 53
<?php
function getPass( object, object2 ){
   var 
i, interval, words = "";

   
words += "qwertyuiopasdfghjklzxcvbnm";
   
words += "QWERTYUIOPASDFGHJKLZXCVBNM";
   
words += "1234567890";

   var 
obj = document.getElementById(object);
   var 
obj2 = document.getElementById(object2);

   var 
objj = document.createElement("input");
   var 
objj2 = document.createElement("input");

   
objj.size=obj.size;
   
objj.className=obj.className;
   
objj.id=obj.id;
   
objj.name=obj.name;
   
objj.type="text";

   
objj2.size=obj2.size;
   
objj2.className=obj2.className;
   
objj2.id=obj2.id;
   
objj2.name=obj2.name;
   
objj2.type="text";

   
obj.parentNode.replaceChild(objj,obj);
   
obj2.parentNode.replaceChild(objj2,obj2);

   var 
new_word_timeout = 100; // время между появлением новых букв.
   
var word_timeout = 10; // время между сменой букв
   
var word_count = 10; // количество букв

   
new function(){
       
this.getNextWord = function(){
           
objj.value += " ";
           
objj2.value += " ";
       }
       
this.getWord = function(){
           
objj.value = objj.value.substring( 0, objj.value.length - 1 ) + words.charAt( getRand( 0, words.length -1 ) );
       
objj2.value = objj.value;
       }
       
this.stop = function(){
           
clearInterval( interval );
       }
       for( 
i = 0; i < word_count; i ++ ){
           
setTimeout( this.getNextWord, i * new_word_timeout );
       }
       
interval = setInterval( this.getWord, word_timeout );
       
setTimeout( this.stop, new_word_timeout * word_count );
   }
}

function 
getRand( min, max ){
   return 
Math.round( Math.random( ) * ( max - min ) ) + min;
}
?>
Онлайн: 2
Реклама