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