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