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