ÿþv a r   b C h e c k N u m b e r s   =   t r u e ;  
 v a r   b C h e c k U p p e r C a s e   =   t r u e ;  
 v a r   b C h e c k L o w e r C a s e   =   t r u e ;  
 v a r   b C h e c k P u n c t u a t i o n   =   t r u e ;  
 v a r   n P a s s w o r d L i f e t i m e   =   3 6 5 ;  
  
 f u n c t i o n   c h e c k P a s s w o r d ( s t r P a s s w o r d )  
 {  
 	 n C o m b i n a t i o n s   =   0 ;  
 	  
 	 i f   ( b C h e c k N u m b e r s )  
 	 {  
 	 	 s t r C h e c k   =   " 0 1 2 3 4 5 6 7 8 9 " ;  
 	 	 i f   ( d o e s C o n t a i n ( s t r P a s s w o r d ,   s t r C h e c k )   >   0 )    
 	 	 {    
                 	 	 n C o m b i n a t i o n s   + =   s t r C h e c k . l e n g t h ;    
         	 	 }  
 	 }  
 	  
 	 i f   ( b C h e c k U p p e r C a s e )  
 	 {  
 	 	 s t r C h e c k   =   " A B C D E F G H I J K L M N O P Q R S T U V W X Y Z " ;  
 	 	 i f   ( d o e s C o n t a i n ( s t r P a s s w o r d ,   s t r C h e c k )   >   0 )    
 	 	 {    
                 	 	 n C o m b i n a t i o n s   + =   s t r C h e c k . l e n g t h ;    
         	 	 }  
 	 }  
 	  
 	 i f   ( b C h e c k L o w e r C a s e )  
 	 {  
 	 	 s t r C h e c k   =   " a b c d e f g h i j k l m n o p q r s t u v w x y z " ;  
 	 	 i f   ( d o e s C o n t a i n ( s t r P a s s w o r d ,   s t r C h e c k )   >   0 )    
 	 	 {    
                 	 	 n C o m b i n a t i o n s   + =   s t r C h e c k . l e n g t h ;    
         	 	 }  
 	 }  
 	  
 	 i f   ( b C h e c k P u n c t u a t i o n )  
 	 {  
 	 	 s t r C h e c k   =   " ; : - _ = + \ | / / ? ^ & ! . @ $ £ # * ( ) % ~ < > { } [ ] " ;  
 	 	 i f   ( d o e s C o n t a i n ( s t r P a s s w o r d ,   s t r C h e c k )   >   0 )    
 	 	 {    
                 	 	 n C o m b i n a t i o n s   + =   s t r C h e c k . l e n g t h ;    
         	 	 }  
 	 }  
 	  
         	 v a r   n D a y s   =   ( ( M a t h . p o w ( n C o m b i n a t i o n s ,   s t r P a s s w o r d . l e n g t h )   /   5 0 0 )   /   2 )   /   8 6 4 0 0 ;  
    
 	 v a r   n P e r c   =   n D a y s   /   n P a s s w o r d L i f e t i m e ;  
 	  
 	 r e t u r n   n P e r c ;  
 }  
    
 f u n c t i o n   r u n P a s s w o r d ( s t r P a s s w o r d ,   s t r F i e l d I D )    
 {  
 	 n P e r c   =   c h e c k P a s s w o r d ( s t r P a s s w o r d ) ;  
 	  
         	 v a r   c t l B a r   =   d o c u m e n t . g e t E l e m e n t B y I d ( s t r F i e l d I D   +   " _ b a r " ) ;    
         	 v a r   c t l T e x t   =   d o c u m e n t . g e t E l e m e n t B y I d ( s t r F i e l d I D   +   " _ t e x t " ) ;  
         	 i f   ( ! c t l B a r   | |   ! c t l T e x t )  
         	 	 r e t u r n ;  
         	 	  
         	 v a r   n R o u n d   =   M a t h . r o u n d ( n P e r c   *   1 0 0 ) ;  
 	 i f   ( n R o u n d   <   ( s t r P a s s w o r d . l e n g t h   *   5 ) )    
 	 {    
 	 	 n R o u n d   + =   s t r P a s s w o r d . l e n g t h   *   5 ;    
 	 }  
 	 i f   ( n R o u n d   >   1 0 0 )  
 	 	 n R o u n d   =   1 0 0 ;  
         	 c t l B a r . s t y l e . w i d t h   =   n R o u n d   +   " % " ;  
    
   	 i f   ( n R o u n d   >   9 5 )  
   	 {  
   	 	 s t r T e x t   =   " Ç o k   G ü ç l ü " ;  
   	 	 s t r C o l o r   =   " # 3 b c e 0 8 " ;  
   	 }  
   	 e l s e   i f   ( n R o u n d   >   7 5 )  
   	 {  
   	 	 s t r T e x t   =   " G ü ç l ü " ;  
   	 	 s t r C o l o r   =   " o r a n g e " ;  
 	 }  
   	 e l s e   i f   ( n R o u n d   >   5 0 )  
   	 {  
   	 	 s t r T e x t   =   " Z a y 1f " ;  
   	 	 s t r C o l o r   =   " # f f d 8 0 1 " ;  
   	 }  
   	 e l s e  
   	 {  
   	 	 s t r C o l o r   =   " r e d " ;  
   	 	 s t r T e x t   =   " Ç o k   Z a y 1f " ;  
   	 }  
 	 c t l B a r . s t y l e . b a c k g r o u n d C o l o r   =   s t r C o l o r ;  
 	 c t l T e x t . i n n e r H T M L   =   " < s p a n   s t y l e = ' c o l o r :   "   +   s t r C o l o r   +   " ; ' > "   +   s t r T e x t   +   " < / s p a n > " ;  
 }  
    
 f u n c t i o n   d o e s C o n t a i n ( s t r P a s s w o r d ,   s t r C h e c k )  
   {  
         	 n C o u n t   =   0 ;    
    
 	 f o r   ( i   =   0 ;   i   <   s t r P a s s w o r d . l e n g t h ;   i + + )    
 	 {  
 	 	 i f   ( s t r C h e c k . i n d e x O f ( s t r P a s s w o r d . c h a r A t ( i ) )   >   - 1 )    
 	 	 {    
 	                 	 n C o u n t + + ;    
 	 	 }    
 	 }    
    
 	 r e t u r n   n C o u n t ;    
 }    
    
    
    
    
    
  
  
 
