545. File Comparison Report

Produced on Mon May 12 13:06:19 2008 UTC. This report uses XHTML and CSS2, and is best viewed with a reasonably standards compliant browser such as the latest version of Firefox or Internet Explorer. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

545.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.0.5\plugins\tiny_mce\plugins\style\jscripts props.js Thu Sep 20 08:59:10 2007 UTC
2 Mon May 12 13:06:19 2008 UTC

545.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 0 0
Changed 0 0
Inserted 0 0
Removed 1 633

545.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

545.4 Active regular expressions

No regular expressions were active.

545.5 Comparison detail

1   var defaul tFonts = " " +     
2       "Arial , Helvetic a, sans-se rif=Arial,  Helvetica , sans-ser if;" +     
3       "Times  New Roman , Times, s erif=Times  New Roman , Times, s erif;" +     
4       "Couri er New, Co urier, mon o=Courier  New, Couri er, mono;"  +     
5       "Times  New Roman , Times, s erif=Times  New Roman , Times, s erif;" +     
6       "Georg ia, Times  New Roman,  Times, se rif=Georgi a, Times N ew Roman,  Times, ser if;" +     
7       "Verda na, Arial,  Helvetica , sans-ser if=Verdana , Arial, H elvetica,  sans-serif ;" +     
8       "Genev a, Arial,  Helvetica,  sans-seri f=Geneva,  Arial, Hel vetica, sa ns-serif";    
9      
10   var defaul tSizes = " 9;10;12;14 ;16;18;24; xx-small;x -small;sma ll;medium; large;x-la rge;xx-lar ge;smaller ;larger";    
11   var defaul tMeasureme nt = "+pix els=px;poi nts=pt;in; cm;mm;pica s;ems;exs; %";    
12   var defaul tSpacingMe asurement  = "pixels= px;points= pt;in;cm;m m;picas;+e ms;exs;%";    
13   var defaul tIndentMea surement =  "pixels=p x;+points= pt;in;cm;m m;picas;em s;exs;%";    
14   var defaul tWeight =  "normal;bo ld;bolder; lighter;10 0;200;300; 400;500;60 0;700;800; 900";    
15   var defaul tTextStyle  = "normal ;italic;ob lique";    
16   var defaul tVariant =  "normal;s mall-caps" ;    
17   var defaul tLineHeigh t = "norma l";    
18   var defaul tAttachmen t = "fixed ;scroll";    
19   var defaul tRepeat =  "no-repeat ;repeat;re peat-x;rep eat-y";    
20   var defaul tPosH = "l eft;center ;right";    
21   var defaul tPosV = "t op;center; bottom";    
22   var defaul tVAlign =  "baseline; sub;super; top;text-t op;middle; bottom;tex t-bottom";    
23   var defaul tDisplay =  "inline;b lock;list- item;run-i n;compact; marker;tab le;inline- table;tabl e-row-grou p;table-he ader-group ;table-foo ter-group; table-row; table-colu mn-group;t able-colum n;table-ce ll;table-c aption;non e";    
24   var defaul tBorderSty le = "none ;solid;das hed;dotted ;double;gr oove;ridge ;inset;out set";    
25   var defaul tBorderWid th = "thin ;medium;th ick";    
26   var defaul tListType  = "disc;ci rcle;squar e;decimal; lower-roma n;upper-ro man;lower- alpha;uppe r-alpha;no ne";    
27      
28   function i nit() {    
29       var ce  = documen t.getEleme ntById('co ntainer'),  h;    
30      
31       ce.sty le.cssText  = tinyMCE Popup.getW indowArg(' style_text ');    
32      
33       h = ge tBrowserHT ML('backgr ound_image _browser', 'backgroun d_image',' image','ad vimage');    
34       docume nt.getElem entById("b ackground_ image_brow ser").inne rHTML = h;    
35      
36       tinyMC EPopup.res izeToInner Size();    
37      
38       docume nt.getElem entById('t ext_color_ pickcontai ner').inne rHTML = ge tColorPick erHTML('te xt_color_p ick','text _color');    
39       docume nt.getElem entById('b ackground_ color_pick container' ).innerHTM L = getCol orPickerHT ML('backgr ound_color _pick','ba ckground_c olor');    
40       docume nt.getElem entById('b order_colo r_top_pick container' ).innerHTM L = getCol orPickerHT ML('border _color_top _pick','bo rder_color _top');    
41       docume nt.getElem entById('b order_colo r_right_pi ckcontaine r').innerH TML = getC olorPicker HTML('bord er_color_r ight_pick' ,'border_c olor_right ');    
42       docume nt.getElem entById('b order_colo r_bottom_p ickcontain er').inner HTML = get ColorPicke rHTML('bor der_color_ bottom_pic k','border _color_bot tom');    
43       docume nt.getElem entById('b order_colo r_left_pic kcontainer ').innerHT ML = getCo lorPickerH TML('borde r_color_le ft_pick',' border_col or_left');    
44      
45       fillSe lect(0, 't ext_font',  'style_fo nt', defau ltFonts, ' ;', true);    
46       fillSe lect(0, 't ext_size',  'style_fo nt_size',  defaultSiz es, ';', t rue);    
47       fillSe lect(0, 't ext_size_m easurement ', 'style_ font_size_ measuremen t', defaul tMeasureme nt, ';', t rue);    
48       fillSe lect(0, 't ext_case',  'style_te xt_case',  "capitaliz e;uppercas e;lowercas e", ';', t rue);    
49       fillSe lect(0, 't ext_weight ', 'style_ font_weigh t', defaul tWeight, ' ;', true);    
50       fillSe lect(0, 't ext_style' , 'style_f ont_style' , defaultT extStyle,  ';', true) ;    
51       fillSe lect(0, 't ext_varian t', 'style _font_vari ant', defa ultVariant , ';', tru e);    
52       fillSe lect(0, 't ext_linehe ight', 'st yle_font_l ine_height ', default LineHeight , ';', tru e);    
53       fillSe lect(0, 't ext_linehe ight_measu rement', ' style_font _line_heig ht_measure ment', def aultMeasur ement, ';' , true);    
54      
55       fillSe lect(0, 'b ackground_ attachment ', 'style_ background _attachmen t', defaul tAttachmen t, ';', tr ue);    
56       fillSe lect(0, 'b ackground_ repeat', ' style_back ground_rep eat', defa ultRepeat,  ';', true );    
57      
58       fillSe lect(0, 'b ackground_ hpos_measu rement', ' style_back ground_hpo s_measurem ent', defa ultMeasure ment, ';',  true);    
59       fillSe lect(0, 'b ackground_ vpos_measu rement', ' style_back ground_vpo s_measurem ent', defa ultMeasure ment, ';',  true);    
60      
61       fillSe lect(0, 'b ackground_ hpos', 'st yle_backgr ound_hpos' , defaultP osH, ';',  true);    
62       fillSe lect(0, 'b ackground_ vpos', 'st yle_backgr ound_vpos' , defaultP osV, ';',  true);    
63      
64       fillSe lect(0, 'b lock_words pacing', ' style_word spacing',  'normal',  ';', true) ;    
65       fillSe lect(0, 'b lock_words pacing_mea surement',  'style_wo rdspacing_ measuremen t', defaul tSpacingMe asurement,  ';', true );    
66       fillSe lect(0, 'b lock_lette rspacing',  'style_le tterspacin g', 'norma l', ';', t rue);    
67       fillSe lect(0, 'b lock_lette rspacing_m easurement ', 'style_ letterspac ing_measur ement', de faultSpaci ngMeasurem ent, ';',  true);    
68       fillSe lect(0, 'b lock_verti cal_alignm ent', 'sty le_vertica l_alignmen t', defaul tVAlign, ' ;', true);    
69       fillSe lect(0, 'b lock_text_ align', 's tyle_text_ align', "l eft;right; center;jus tify", ';' , true);    
70       fillSe lect(0, 'b lock_white space', 's tyle_white space', "n ormal;pre; nowrap", ' ;', true);    
71       fillSe lect(0, 'b lock_displ ay', 'styl e_display' , defaultD isplay, '; ', true);    
72       fillSe lect(0, 'b lock_text_ indent_mea surement',  'style_te xt_indent_ measuremen t', defaul tIndentMea surement,  ';', true) ;    
73      
74       fillSe lect(0, 'b ox_width_m easurement ', 'style_ box_width_ measuremen t', defaul tMeasureme nt, ';', t rue);    
75       fillSe lect(0, 'b ox_height_ measuremen t', 'style _box_heigh t_measurem ent', defa ultMeasure ment, ';',  true);    
76       fillSe lect(0, 'b ox_float',  'style_fl oat', 'lef t;right;no ne', ';',  true);    
77       fillSe lect(0, 'b ox_clear',  'style_cl ear', 'lef t;right;bo th;none',  ';', true) ;    
78       fillSe lect(0, 'b ox_padding _left_meas urement',  'style_pad ding_left_ measuremen t', defaul tMeasureme nt, ';', t rue);    
79       fillSe lect(0, 'b ox_padding _top_measu rement', ' style_padd ing_top_me asurement' , defaultM easurement , ';', tru e);    
80       fillSe lect(0, 'b ox_padding _bottom_me asurement' , 'style_p adding_bot tom_measur ement', de faultMeasu rement, '; ', true);    
81       fillSe lect(0, 'b ox_padding _right_mea surement',  'style_pa dding_righ t_measurem ent', defa ultMeasure ment, ';',  true);    
82       fillSe lect(0, 'b ox_margin_ left_measu rement', ' style_marg in_left_me asurement' , defaultM easurement , ';', tru e);    
83       fillSe lect(0, 'b ox_margin_ top_measur ement', 's tyle_margi n_top_meas urement',  defaultMea surement,  ';', true) ;    
84       fillSe lect(0, 'b ox_margin_ bottom_mea surement',  'style_ma rgin_botto m_measurem ent', defa ultMeasure ment, ';',  true);    
85       fillSe lect(0, 'b ox_margin_ right_meas urement',  'style_mar gin_right_ measuremen t', defaul tMeasureme nt, ';', t rue);    
86      
87       fillSe lect(0, 'b order_styl e_top', 's tyle_borde r_style_to p', defaul tBorderSty le, ';', t rue);    
88       fillSe lect(0, 'b order_styl e_right',  'style_bor der_style_ right', de faultBorde rStyle, '; ', true);    
89       fillSe lect(0, 'b order_styl e_bottom',  'style_bo rder_style _bottom',  defaultBor derStyle,  ';', true) ;    
90       fillSe lect(0, 'b order_styl e_left', ' style_bord er_style_l eft', defa ultBorderS tyle, ';',  true);    
91      
92       fillSe lect(0, 'b order_widt h_top', 's tyle_borde r_width_to p', defaul tBorderWid th, ';', t rue);    
93       fillSe lect(0, 'b order_widt h_right',  'style_bor der_width_ right', de faultBorde rWidth, '; ', true);    
94       fillSe lect(0, 'b order_widt h_bottom',  'style_bo rder_width _bottom',  defaultBor derWidth,  ';', true) ;    
95       fillSe lect(0, 'b order_widt h_left', ' style_bord er_width_l eft', defa ultBorderW idth, ';',  true);    
96      
97       fillSe lect(0, 'b order_widt h_top_meas urement',  'style_bor der_width_ top_measur ement', de faultMeasu rement, '; ', true);    
98       fillSe lect(0, 'b order_widt h_right_me asurement' , 'style_b order_widt h_right_me asurement' , defaultM easurement , ';', tru e);    
99       fillSe lect(0, 'b order_widt h_bottom_m easurement ', 'style_ border_wid th_bottom_ measuremen t', defaul tMeasureme nt, ';', t rue);    
100       fillSe lect(0, 'b order_widt h_left_mea surement',  'style_bo rder_width _left_meas urement',  defaultMea surement,  ';', true) ;    
101      
102       fillSe lect(0, 'l ist_type',  'style_li st_type',  defaultLis tType, ';' , true);    
103       fillSe lect(0, 'l ist_positi on', 'styl e_list_pos ition', "i nside;outs ide", ';',  true);    
104      
105       fillSe lect(0, 'p ositioning _type', 's tyle_posit ioning_typ e', "absol ute;relati ve;static" , ';', tru e);    
106       fillSe lect(0, 'p ositioning _visibilit y', 'style _positioni ng_visibil ity', "inh erit;visib le;hidden" , ';', tru e);    
107      
108       fillSe lect(0, 'p ositioning _width_mea surement',  'style_po sitioning_ width_meas urement',  defaultMea surement,  ';', true) ;    
109       fillSe lect(0, 'p ositioning _height_me asurement' , 'style_p ositioning _height_me asurement' , defaultM easurement , ';', tru e);    
110       fillSe lect(0, 'p ositioning _overflow' , 'style_p ositioning _overflow' , "visible ;hidden;sc roll;auto" , ';', tru e);    
111      
112       fillSe lect(0, 'p ositioning _placement _top_measu rement', ' style_posi tioning_pl acement_to p_measurem ent', defa ultMeasure ment, ';',  true);    
113       fillSe lect(0, 'p ositioning _placement _right_mea surement',  'style_po sitioning_ placement_ right_meas urement',  defaultMea surement,  ';', true) ;    
114       fillSe lect(0, 'p ositioning _placement _bottom_me asurement' , 'style_p ositioning _placement _bottom_me asurement' , defaultM easurement , ';', tru e);    
115       fillSe lect(0, 'p ositioning _placement _left_meas urement',  'style_pos itioning_p lacement_l eft_measur ement', de faultMeasu rement, '; ', true);    
116      
117       fillSe lect(0, 'p ositioning _clip_top_ measuremen t', 'style _positioni ng_clip_to p_measurem ent', defa ultMeasure ment, ';',  true);    
118       fillSe lect(0, 'p ositioning _clip_righ t_measurem ent', 'sty le_positio ning_clip_ right_meas urement',  defaultMea surement,  ';', true) ;    
119       fillSe lect(0, 'p ositioning _clip_bott om_measure ment', 'st yle_positi oning_clip _bottom_me asurement' , defaultM easurement , ';', tru e);    
120       fillSe lect(0, 'p ositioning _clip_left _measureme nt', 'styl e_position ing_clip_l eft_measur ement', de faultMeasu rement, '; ', true);    
121      
122       TinyMC E_Editable Selects.in it();    
123       setupF ormData();    
124       showDi sabledCont rols();    
125   }    
126      
127   function s etupFormDa ta() {    
128       var ce  = documen t.getEleme ntById('co ntainer'),  f = docum ent.forms[ 0], s, b,  i;    
129      
130       // Set up text fi elds    
131      
132       select ByValue(f,  'text_fon t', ce.sty le.fontFam ily, true,  true);    
133       select ByValue(f,  'text_siz e', getNum (ce.style. fontSize),  true, tru e);    
134       select ByValue(f,  'text_siz e_measurem ent', getM easurement (ce.style. fontSize)) ;    
135       select ByValue(f,  'text_wei ght', ce.s tyle.fontW eight, tru e, true);    
136       select ByValue(f,  'text_sty le', ce.st yle.fontSt yle, true,  true);    
137       select ByValue(f,  'text_lin eheight',  getNum(ce. style.line Height), t rue, true) ;    
138       select ByValue(f,  'text_lin eheight_me asurement' , getMeasu rement(ce. style.line Height));    
139       select ByValue(f,  'text_cas e', ce.sty le.textTra nsform, tr ue, true);    
140       select ByValue(f,  'text_var iant', ce. style.font Variant, t rue, true) ;    
141       f.text _color.val ue = ce.st yle.color;    
142       update Color('tex t_color_pi ck', 'text _color');    
143       f.text _underline .checked =  inStr(ce. style.text Decoration , 'underli ne');    
144       f.text _overline. checked =  inStr(ce.s tyle.textD ecoration,  'overline ');    
145       f.text _linethrou gh.checked  = inStr(c e.style.te xtDecorati on, 'line- through');    
146       f.text _blink.che cked = inS tr(ce.styl e.textDeco ration, 'b link');    
147      
148       // Set up backgro und fields    
149      
150       f.back ground_col or.value =  ce.style. background Color;    
151       update Color('bac kground_co lor_pick',  'backgrou nd_color') ;    
152       f.back ground_ima ge.value =  ce.style. background Image.repl ace(new Re gExp("url\ \('?([^']* )'?\\)", ' gi'), "$1" );    
153       select ByValue(f,  'backgrou nd_repeat' , ce.style .backgroun dRepeat, t rue, true) ;    
154       select ByValue(f,  'backgrou nd_attachm ent', ce.s tyle.backg roundAttac hment, tru e, true);    
155       select ByValue(f,  'backgrou nd_hpos',  getNum(get Val(ce.sty le.backgro undPositio n, 0)), tr ue, true);    
156       select ByValue(f,  'backgrou nd_hpos_me asurement' , getMeasu rement(get Val(ce.sty le.backgro undPositio n, 0)));    
157       select ByValue(f,  'backgrou nd_vpos',  getNum(get Val(ce.sty le.backgro undPositio n, 1)), tr ue, true);    
158       select ByValue(f,  'backgrou nd_vpos_me asurement' , getMeasu rement(get Val(ce.sty le.backgro undPositio n, 1)));    
159      
160       // Set up block f ields    
161      
162       select ByValue(f,  'block_wo rdspacing' , getNum(c e.style.wo rdSpacing) , true, tr ue);    
163       select ByValue(f,  'block_wo rdspacing_ measuremen t', getMea surement(c e.style.wo rdSpacing) );    
164       select ByValue(f,  'block_le tterspacin g', getNum (ce.style. letterSpac ing), true , true);    
165       select ByValue(f,  'block_le tterspacin g_measurem ent', getM easurement (ce.style. letterSpac ing));    
166       select ByValue(f,  'block_ve rtical_ali gnment', c e.style.ve rticalAlig n, true, t rue);    
167       select ByValue(f,  'block_te xt_align',  ce.style. textAlign,  true, tru e);    
168       f.bloc k_text_ind ent.value  = getNum(c e.style.te xtIndent);    
169       select ByValue(f,  'block_te xt_indent_ measuremen t', getMea surement(c e.style.te xtIndent)) ;    
170       select ByValue(f,  'block_wh itespace',  ce.style. whiteSpace , true, tr ue);    
171       select ByValue(f,  'block_di splay', ce .style.dis play, true , true);    
172      
173       // Set up box fie lds    
174      
175       f.box_ width.valu e = getNum (ce.style. width);    
176       select ByValue(f,  'box_widt h_measurem ent', getM easurement (ce.style. width));    
177      
178       f.box_ height.val ue = getNu m(ce.style .height);    
179       select ByValue(f,  'box_heig ht_measure ment', get Measuremen t(ce.style .height));    
180      
181       if (ti nyMCE.isGe cko)    
182           se lectByValu e(f, 'box_ float', ce .style.css Float, tru e, true);    
183       else    
184           se lectByValu e(f, 'box_ float', ce .style.sty leFloat, t rue, true) ;    
185      
186       select ByValue(f,  'box_clea r', ce.sty le.clear,  true, true );    
187      
188       setupB ox(f, ce,  'box_paddi ng', 'padd ing', '');    
189       setupB ox(f, ce,  'box_margi n', 'margi n', '');    
190      
191       // Set up border  fields    
192      
193       setupB ox(f, ce,  'border_st yle', 'bor der', 'Sty le');    
194       setupB ox(f, ce,  'border_wi dth', 'bor der', 'Wid th');    
195       setupB ox(f, ce,  'border_co lor', 'bor der', 'Col or');    
196      
197       update Color('bor der_color_ top_pick',  'border_c olor_top') ;    
198       update Color('bor der_color_ right_pick ', 'border _color_rig ht');    
199       update Color('bor der_color_ bottom_pic k', 'borde r_color_bo ttom');    
200       update Color('bor der_color_ left_pick' , 'border_ color_left ');    
201      
202       // Set up list fi elds    
203      
204       select ByValue(f,  'list_typ e', ce.sty le.listSty leType, tr ue, true);    
205       select ByValue(f,  'list_pos ition', ce .style.lis tStylePosi tion, true , true);    
206       f.list _bullet_im age.value  = ce.style .listStyle Image.repl ace(new Re gExp("url\ \('?([^']* )'?\\)", ' gi'), "$1" );    
207      
208       // Set up box fie lds    
209      
210       select ByValue(f,  'position ing_type',  ce.style. position,  true, true );    
211       select ByValue(f,  'position ing_visibi lity', ce. style.visi bility, tr ue, true);    
212       select ByValue(f,  'position ing_overfl ow', ce.st yle.overfl ow, true,  true);    
213       f.posi tioning_zi ndex.value  = ce.styl e.zIndex ?  ce.style. zIndex : " ";    
214      
215       f.posi tioning_wi dth.value  = getNum(c e.style.wi dth);    
216       select ByValue(f,  'position ing_width_ measuremen t', getMea surement(c e.style.wi dth));    
217      
218       f.posi tioning_he ight.value  = getNum( ce.style.h eight);    
219       select ByValue(f,  'position ing_height _measureme nt', getMe asurement( ce.style.h eight));    
220      
221       setupB ox(f, ce,  'positioni ng_placeme nt', '', ' ', new Arr ay('top',  'right', ' bottom', ' left'));    
222      
223       s = ce .style.cli p.replace( new RegExp ("rect\\(' ?([^']*)'? \\)", 'gi' ), "$1");    
224       s = s. replace(/, /g, ' ');    
225      
226       if (!h asEqualVal ues(new Ar ray(getVal (s, 0), ge tVal(s, 1) , getVal(s , 2), getV al(s, 3))) ) {    
227           f. positionin g_clip_top .value = g etNum(getV al(s, 0));    
228           se lectByValu e(f, 'posi tioning_cl ip_top_mea surement',  getMeasur ement(getV al(s, 0))) ;    
229           f. positionin g_clip_rig ht.value =  getNum(ge tVal(s, 1) );    
230           se lectByValu e(f, 'posi tioning_cl ip_right_m easurement ', getMeas urement(ge tVal(s, 1) ));    
231           f. positionin g_clip_bot tom.value  = getNum(g etVal(s, 2 ));    
232           se lectByValu e(f, 'posi tioning_cl ip_bottom_ measuremen t', getMea surement(g etVal(s, 2 )));    
233           f. positionin g_clip_lef t.value =  getNum(get Val(s, 3)) ;    
234           se lectByValu e(f, 'posi tioning_cl ip_left_me asurement' , getMeasu rement(get Val(s, 3)) );    
235       } else  {    
236           f. positionin g_clip_top .value = g etNum(getV al(s, 0));    
237           se lectByValu e(f, 'posi tioning_cl ip_top_mea surement',  getMeasur ement(getV al(s, 0))) ;    
238           f. positionin g_clip_rig ht.value =  f.positio ning_clip_ bottom.val ue = f.pos itioning_c lip_left.v alue;    
239       }    
240      
241   //  setupB ox(f, ce,  '', 'borde r', 'Color ');    
242   }    
243      
244   function g etMeasurem ent(s) {    
245       return  s.replace (/^([0-9]+ )(.*)$/, " $2");    
246   }    
247      
248   function g etNum(s) {    
249       if (ne w RegExp(' ^[0-9]+[a- z%]+$', 'g i').test(s ))    
250           re turn s.rep lace(/[^0- 9]/g, '');    
251      
252       return  s;    
253   }    
254      
255   function i nStr(s, n)  {    
256       return  new RegEx p(n, 'gi') .test(s);    
257   }    
258      
259   function g etVal(s, i ) {    
260       var a  = tinyMCE. explode('  ', s);    
261      
262       if (a. length > 1 )    
263           re turn a[i];    
264      
265       return  "";    
266   }    
267      
268   function s etValue(f,  n, v) {    
269       if (f. elements[n ].type ==  "text")    
270           f. elements[n ].value =  v;    
271       else    
272           se lectByValu e(f, n, v,  true, tru e);    
273   }    
274      
275   function s etupBox(f,  ce, fp, p r, sf, b)  {    
276       if (ty peof(b) ==  "undefine d")    
277           b  = new Arra y('Top', ' Right', 'B ottom', 'L eft');    
278      
279       if (is Same(ce, p r, sf, b))  {    
280           f. elements[f p + "_same "].checked  = true;    
281      
282           se tValue(f,  fp + "_top ", getNum( ce.style[p r + b[0] +  sf]));    
283           f. elements[f p + "_top" ].disabled  = false;    
284      
285           f. elements[f p + "_righ t"].value  = "";    
286           f. elements[f p + "_righ t"].disabl ed = true;    
287           f. elements[f p + "_bott om"].value  = "";    
288           f. elements[f p + "_bott om"].disab led = true ;    
289           f. elements[f p + "_left "].value =  "";    
290           f. elements[f p + "_left "].disable d = true;    
291      
292           if  (f.elemen ts[fp + "_ top_measur ement"]) {    
293                selectBy Value(f, f p + '_top_ measuremen t', getMea surement(c e.style[pr  + b[0] +  sf]));    
294                f.elemen ts[fp + "_ left_measu rement"].d isabled =  true;    
295                f.elemen ts[fp + "_ bottom_mea surement"] .disabled  = true;    
296                f.elemen ts[fp + "_ right_meas urement"]. disabled =  true;    
297           }    
298       } else  {    
299           f. elements[f p + "_same "].checked  = false;    
300      
301           se tValue(f,  fp + "_top ", getNum( ce.style[p r + b[0] +  sf]));    
302           f. elements[f p + "_top" ].disabled  = false;    
303      
304           se tValue(f,  fp + "_rig ht", getNu m(ce.style [pr + b[1]  + sf]));    
305           f. elements[f p + "_righ t"].disabl ed = false ;    
306      
307           se tValue(f,  fp + "_bot tom", getN um(ce.styl e[pr + b[2 ] + sf]));    
308           f. elements[f p + "_bott om"].disab led = fals e;    
309      
310           se tValue(f,  fp + "_lef t", getNum (ce.style[ pr + b[3]  + sf]));    
311           f. elements[f p + "_left "].disable d = false;    
312      
313           if  (f.elemen ts[fp + "_ top_measur ement"]) {    
314                selectBy Value(f, f p + '_top_ measuremen t', getMea surement(c e.style[pr  + b[0] +  sf]));    
315                selectBy Value(f, f p + '_righ t_measurem ent', getM easurement (ce.style[ pr + b[1]  + sf]));    
316                selectBy Value(f, f p + '_bott om_measure ment', get Measuremen t(ce.style [pr + b[2]  + sf]));    
317                selectBy Value(f, f p + '_left _measureme nt', getMe asurement( ce.style[p r + b[3] +  sf]));    
318                f.elemen ts[fp + "_ left_measu rement"].d isabled =  false;    
319                f.elemen ts[fp + "_ bottom_mea surement"] .disabled  = false;    
320                f.elemen ts[fp + "_ right_meas urement"]. disabled =  false;    
321           }    
322       }    
323   }    
324      
325   function i sSame(e, p r, sf, b)  {    
326       var a  = new Arra y(), i, x;    
327      
328       if (ty peof(b) ==  "undefine d")    
329           b  = new Arra y('Top', ' Right', 'B ottom', 'L eft');    
330      
331       if (ty peof(sf) = = "undefin ed" || sf  == null)    
332           sf  = "";    
333      
334       a[0] =  e.style[p r + b[0] +  sf];    
335       a[1] =  e.style[p r + b[1] +  sf];    
336       a[2] =  e.style[p r + b[2] +  sf];    
337       a[3] =  e.style[p r + b[3] +  sf];    
338      
339       for (i =0; i<a.le ngth; i++)  {    
340           if  (a[i] ==  null)    
341                return f alse;    
342      
343           fo r (x=0; x< a.length;  x++) {    
344                if (a[x]  != a[i])    
345                    retu rn false;    
346           }    
347       }    
348      
349       return  true;    
350   };    
351      
352   function h asEqualVal ues(a) {    
353       var i,  x;    
354      
355       for (i =0; i<a.le ngth; i++)  {    
356           if  (a[i] ==  null)    
357                return f alse;    
358      
359           fo r (x=0; x< a.length;  x++) {    
360                if (a[x]  != a[i])    
361                    retu rn false;    
362           }    
363       }    
364      
365       return  true;    
366   }    
367      
368   function a pplyAction () {    
369       var ce  = documen t.getEleme ntById('co ntainer');    
370      
371       genera teCSS();    
372      
373       tinyMC EPopup.exe cCommand(' mceSetElem entStyle',  false, ti nyMCE.seri alizeStyle (tinyMCE.p arseStyle( ce.style.c ssText)));    
374   }    
375      
376   function u pdateActio n() {    
377       applyA ction();    
378       tinyMC EPopup.clo se();    
379   }    
380      
381   function g enerateCSS () {    
382       var ce  = documen t.getEleme ntById('co ntainer'),  f = docum ent.forms[ 0], num =  new RegExp ('[0-9]+',  'g'), s,  t;    
383      
384       ce.sty le.cssText  = "";    
385      
386       // Bui ld text st yles    
387       ce.sty le.fontFam ily = f.te xt_font.va lue;    
388       ce.sty le.fontSiz e = f.text _size.valu e + (isNum (f.text_si ze.value)  ? f.text_s ize_measur ement.valu e : "");    
389       ce.sty le.fontSty le = f.tex t_style.va lue;    
390       ce.sty le.lineHei ght = f.te xt_linehei ght.value  + (isNum(f .text_line height.val ue) ? f.te xt_linehei ght_measur ement.valu e : "");    
391       ce.sty le.textTra nsform = f .text_case .value;    
392       ce.sty le.fontWei ght = f.te xt_weight. value;    
393       ce.sty le.fontVar iant = f.t ext_varian t.value;    
394       ce.sty le.color =  f.text_co lor.value;    
395      
396       s = "" ;    
397       s += f .text_unde rline.chec ked ? " un derline" :  "";    
398       s += f .text_over line.check ed ? " ove rline" : " ";    
399       s += f .text_line through.ch ecked ? "  line-throu gh" : "";    
400       s += f .text_blin k.checked  ? " blink"  : "";    
401       s = s. length > 0  ? s.subst ring(1) :  s;    
402      
403       if (f. text_none. checked)    
404           s  = "none";    
405      
406       ce.sty le.textDec oration =  s;    
407      
408       // Bui ld backgro und styles    
409      
410       ce.sty le.backgro undColor =  f.backgro und_color. value;    
411       ce.sty le.backgro undImage =  f.backgro und_image. value != " " ? "url("  + f.backg round_imag e.value +  ")" : "";    
412       ce.sty le.backgro undRepeat  = f.backgr ound_repea t.value;    
413       ce.sty le.backgro undAttachm ent = f.ba ckground_a ttachment. value;    
414      
415       if (f. background _hpos.valu e != "") {    
416           s  = "";    
417           s  += f.backg round_hpos .value + ( isNum(f.ba ckground_h pos.value)  ? f.backg round_hpos _measureme nt.value :  "") + " " ;    
418           s  += f.backg round_vpos .value + ( isNum(f.ba ckground_v pos.value)  ? f.backg round_vpos _measureme nt.value :  "");    
419           ce .style.bac kgroundPos ition = s;    
420       }    
421      
422       // Bui ld block s tyles    
423      
424       ce.sty le.wordSpa cing = f.b lock_words pacing.val ue + (isNu m(f.block_ wordspacin g.value) ?  f.block_w ordspacing _measureme nt.value :  "");    
425       ce.sty le.letterS pacing = f .block_let terspacing .value + ( isNum(f.bl ock_letter spacing.va lue) ? f.b lock_lette rspacing_m easurement .value : " ");    
426       ce.sty le.vertica lAlign = f .block_ver tical_alig nment.valu e;    
427       ce.sty le.textAli gn = f.blo ck_text_al ign.value;    
428       ce.sty le.textInd ent = f.bl ock_text_i ndent.valu e + (isNum (f.block_t ext_indent .value) ?  f.block_te xt_indent_ measuremen t.value :  "");    
429       ce.sty le.whiteSp ace = f.bl ock_whites pace.value ;    
430       ce.sty le.display  = f.block _display.v alue;    
431      
432       // Bui ld box sty les    
433      
434       ce.sty le.width =  f.box_wid th.value +  (isNum(f. box_width. value) ? f .box_width _measureme nt.value :  "");    
435       ce.sty le.height  = f.box_he ight.value  + (isNum( f.box_heig ht.value)  ? f.box_he ight_measu rement.val ue : "");    
436       ce.sty le.styleFl oat = f.bo x_float.va lue;    
437      
438       if (ti nyMCE.isGe cko)    
439           ce .style.css Float = f. box_float. value;    
440      
441       ce.sty le.clear =  f.box_cle ar.value;    
442      
443       if (!f .box_paddi ng_same.ch ecked) {    
444           ce .style.pad dingTop =  f.box_padd ing_top.va lue + (isN um(f.box_p adding_top .value) ?  f.box_padd ing_top_me asurement. value : "" );    
445           ce .style.pad dingRight  = f.box_pa dding_righ t.value +  (isNum(f.b ox_padding _right.val ue) ? f.bo x_padding_ right_meas urement.va lue : "");    
446           ce .style.pad dingBottom  = f.box_p adding_bot tom.value  + (isNum(f .box_paddi ng_bottom. value) ? f .box_paddi ng_bottom_ measuremen t.value :  "");    
447           ce .style.pad dingLeft =  f.box_pad ding_left. value + (i sNum(f.box _padding_l eft.value)  ? f.box_p adding_lef t_measurem ent.value  : "");    
448       } else    
449           ce .style.pad ding = f.b ox_padding _top.value  + (isNum( f.box_padd ing_top.va lue) ? f.b ox_padding _top_measu rement.val ue : "");            
450      
451       if (!f .box_margi n_same.che cked) {    
452           ce .style.mar ginTop = f .box_margi n_top.valu e + (isNum (f.box_mar gin_top.va lue) ? f.b ox_margin_ top_measur ement.valu e : "");    
453           ce .style.mar ginRight =  f.box_mar gin_right. value + (i sNum(f.box _margin_ri ght.value)  ? f.box_m argin_righ t_measurem ent.value  : "");    
454           ce .style.mar ginBottom  = f.box_ma rgin_botto m.value +  (isNum(f.b ox_margin_ bottom.val ue) ? f.bo x_margin_b ottom_meas urement.va lue : "");    
455           ce .style.mar ginLeft =  f.box_marg in_left.va lue + (isN um(f.box_m argin_left .value) ?  f.box_marg in_left_me asurement. value : "" );    
456       } else    
457           ce .style.mar gin = f.bo x_margin_t op.value +  (isNum(f. box_margin _top.value ) ? f.box_ margin_top _measureme nt.value :  "");            
458      
459       // Bui ld border  styles    
460      
461       if (!f .border_st yle_same.c hecked) {    
462           ce .style.bor derTopStyl e = f.bord er_style_t op.value;    
463           ce .style.bor derRightSt yle = f.bo rder_style _right.val ue;    
464           ce .style.bor derBottomS tyle = f.b order_styl e_bottom.v alue;    
465           ce .style.bor derLeftSty le = f.bor der_style_ left.value ;    
466       } else    
467           ce .style.bor derStyle =  f.border_ style_top. value;    
468      
469       if (!f .border_wi dth_same.c hecked) {    
470           ce .style.bor derTopWidt h = f.bord er_width_t op.value +  (isNum(f. border_wid th_top.val ue) ? f.bo rder_width _top_measu rement.val ue : "");    
471           ce .style.bor derRightWi dth = f.bo rder_width _right.val ue + (isNu m(f.border _width_rig ht.value)  ? f.border _width_rig ht_measure ment.value  : "");    
472           ce .style.bor derBottomW idth = f.b order_widt h_bottom.v alue + (is Num(f.bord er_width_b ottom.valu e) ? f.bor der_width_ bottom_mea surement.v alue : "") ;    
473           ce .style.bor derLeftWid th = f.bor der_width_ left.value  + (isNum( f.border_w idth_left. value) ? f .border_wi dth_left_m easurement .value : " ");    
474       } else    
475           ce .style.bor derWidth =  f.border_ width_top. value;    
476      
477       if (!f .border_co lor_same.c hecked) {    
478           ce .style.bor derTopColo r = f.bord er_color_t op.value;    
479           ce .style.bor derRightCo lor = f.bo rder_color _right.val ue;    
480           ce .style.bor derBottomC olor = f.b order_colo r_bottom.v alue;    
481           ce .style.bor derLeftCol or = f.bor der_color_ left.value ;    
482       } else    
483           ce .style.bor derColor =  f.border_ color_top. value;    
484      
485       // Bui ld list st yles    
486      
487       ce.sty le.listSty leType = f .list_type .value;    
488       ce.sty le.listSty lePosition  = f.list_ position.v alue;    
489       ce.sty le.listSty leImage =  f.list_bul let_image. value != " " ? "url("  + f.list_ bullet_ima ge.value +  ")" : "";    
490      
491       // Bui ld positio ning style s    
492      
493       ce.sty le.positio n = f.posi tioning_ty pe.value;    
494       ce.sty le.visibil ity = f.po sitioning_ visibility .value;    
495      
496       if (ce .style.wid th == "")    
497           ce .style.wid th = f.pos itioning_w idth.value  + (isNum( f.position ing_width. value) ? f .positioni ng_width_m easurement .value : " ");    
498      
499       if (ce .style.hei ght == "")    
500           ce .style.hei ght = f.po sitioning_ height.val ue + (isNu m(f.positi oning_heig ht.value)  ? f.positi oning_heig ht_measure ment.value  : "");    
501      
502       ce.sty le.zIndex  = f.positi oning_zind ex.value;    
503       ce.sty le.overflo w = f.posi tioning_ov erflow.val ue;    
504      
505       if (!f .positioni ng_placeme nt_same.ch ecked) {    
506           ce .style.top  = f.posit ioning_pla cement_top .value + ( isNum(f.po sitioning_ placement_ top.value)  ? f.posit ioning_pla cement_top _measureme nt.value :  "");    
507           ce .style.rig ht = f.pos itioning_p lacement_r ight.value  + (isNum( f.position ing_placem ent_right. value) ? f .positioni ng_placeme nt_right_m easurement .value : " ");    
508           ce .style.bot tom = f.po sitioning_ placement_ bottom.val ue + (isNu m(f.positi oning_plac ement_bott om.value)  ? f.positi oning_plac ement_bott om_measure ment.value  : "");    
509           ce .style.lef t = f.posi tioning_pl acement_le ft.value +  (isNum(f. positionin g_placemen t_left.val ue) ? f.po sitioning_ placement_ left_measu rement.val ue : "");    
510       } else  {    
511           s  = f.positi oning_plac ement_top. value + (i sNum(f.pos itioning_p lacement_t op.value)  ? f.positi oning_plac ement_top_ measuremen t.value :  "");    
512           ce .style.top  = s;    
513           ce .style.rig ht = s;    
514           ce .style.bot tom = s;    
515           ce .style.lef t = s;    
516       }    
517      
518       if (!f .positioni ng_clip_sa me.checked ) {    
519           s  = "rect(";    
520           s  += (isNum( f.position ing_clip_t op.value)  ? f.positi oning_clip _top.value  + f.posit ioning_cli p_top_meas urement.va lue : "aut o") + " ";    
521           s  += (isNum( f.position ing_clip_r ight.value ) ? f.posi tioning_cl ip_right.v alue + f.p ositioning _clip_righ t_measurem ent.value  : "auto")  + " ";    
522           s  += (isNum( f.position ing_clip_b ottom.valu e) ? f.pos itioning_c lip_bottom .value + f .positioni ng_clip_bo ttom_measu rement.val ue : "auto ") + " ";    
523           s  += (isNum( f.position ing_clip_l eft.value)  ? f.posit ioning_cli p_left.val ue + f.pos itioning_c lip_left_m easurement .value : " auto");    
524           s  += ")";    
525      
526           if  (s != "re ct(auto au to auto au to)")    
527                ce.style .clip = s;    
528       } else  {    
529           s  = "rect(";    
530           t  = isNum(f. positionin g_clip_top .value) ?  f.position ing_clip_t op.value +  f.positio ning_clip_ top_measur ement.valu e : "auto" ;    
531           s  += t + " " ;    
532           s  += t + " " ;    
533           s  += t + " " ;    
534           s  += t + ")" ;    
535      
536           if  (s != "re ct(auto au to auto au to)")    
537                ce.style .clip = s;    
538       }    
539      
540       ce.sty le.cssText  = tinyMCE .serialize Style(tiny MCE.parseS tyle(ce.st yle.cssTex t));    
541   }    
542      
543   function i sNum(s) {    
544       return  new RegEx p('[0-9]+' , 'g').tes t(s);    
545   }    
546      
547   function s howDisable dControls( ) {    
548       var f  = document .forms, i,  a;    
549      
550       for (i =0; i<f.le ngth; i++)  {    
551           fo r (a=0; a< f[i].eleme nts.length ; a++) {    
552                if (f[i] .elements[ a].disable d)    
553                    tiny MCE.addCSS Class(f[i] .elements[ a], "disab led");    
554                else    
555                    tiny MCE.remove CSSClass(f [i].elemen ts[a], "di sabled");    
556           }    
557       }    
558   }    
559      
560   function f illSelect( f, s, para m, dval, s ep, em) {    
561       var i,  ar, p, se ;    
562      
563       f = do cument.for ms[f];    
564       sep =  typeof(sep ) == "unde fined" ? " ;" : sep;    
565      
566       if (em )    
567           ad dSelectVal ue(f, s, " ", "");    
568      
569       ar = t inyMCE.get Param(para m, dval).s plit(sep);    
570       for (i =0; i<ar.l ength; i++ ) {    
571           se  = false;    
572      
573           if  (ar[i].ch arAt(0) ==  '+') {    
574                ar[i] =  ar[i].subs tring(1);    
575                se = tru e;    
576           }    
577      
578           p  = ar[i].sp lit('=');    
579      
580           if  (p.length  > 1) {    
581                addSelec tValue(f,  s, p[0], p [1]);    
582      
583                if (se)    
584                    sele ctByValue( f, s, p[1] );    
585           }  else {    
586                addSelec tValue(f,  s, p[0], p [0]);    
587      
588                if (se)    
589                    sele ctByValue( f, s, p[0] );    
590           }    
591       }    
592   }    
593      
594   function t oggleSame( ce, pre) {    
595       var el  = documen t.forms[0] .elements,  i;    
596      
597       if (ce .checked)  {    
598           el [pre + "_t op"].disab led = fals e;    
599           el [pre + "_r ight"].dis abled = tr ue;    
600           el [pre + "_b ottom"].di sabled = t rue;    
601           el [pre + "_l eft"].disa bled = tru e;    
602      
603           if  (el[pre +  "_top_mea surement"] ) {    
604                el[pre +  "_top_mea surement"] .disabled  = false;    
605                el[pre +  "_right_m easurement "].disable d = true;    
606                el[pre +  "_bottom_ measuremen t"].disabl ed = true;    
607                el[pre +  "_left_me asurement" ].disabled  = true;    
608           }    
609       } else  {    
610           el [pre + "_t op"].disab led = fals e;    
611           el [pre + "_r ight"].dis abled = fa lse;    
612           el [pre + "_b ottom"].di sabled = f alse;    
613           el [pre + "_l eft"].disa bled = fal se;    
614      
615           if  (el[pre +  "_top_mea surement"] ) {    
616                el[pre +  "_top_mea surement"] .disabled  = false;    
617                el[pre +  "_right_m easurement "].disable d = false;    
618                el[pre +  "_bottom_ measuremen t"].disabl ed = false ;    
619                el[pre +  "_left_me asurement" ].disabled  = false;    
620           }    
621       }    
622      
623       showDi sabledCont rols();    
624   }    
625      
626   function s ynch(fr, t o) {    
627       var f  = document .forms[0];    
628      
629       f.elem ents[to].v alue = f.e lements[fr ].value;    
630      
631       if (f. elements[f r + "_meas urement"])    
632           se lectByValu e(f, to +  "_measurem ent", f.el ements[fr  + "_measur ement"].va lue);    
633   }