486. File Comparison Report

Produced on Mon May 12 13:06:11 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.

486.1 Files compared

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

486.2 Comparison summary

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

486.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

486.4 Active regular expressions

No regular expressions were active.

486.5 Comparison detail

1   var oldWid th, oldHei ght;    
2   var url =  tinyMCE.ge tParam("me dia_extern al_list_ur l");    
3   if (url !=  null) {    
4       // Fix  relative    
5       if (ur l.charAt(0 ) != '/' & & url.inde xOf('://')  == -1)    
6           ur l = tinyMC E.document BasePath +  "/" + url ;    
7      
8       docume nt.write(' <sc'+'ript  language= "javascrip t" type="t ext/javasc ript" src= "' + url +  '"></sc'+ 'ript>');    
9   }    
10      
11   function i nit() {    
12       var pl  = "", f,  val;    
13       var ty pe = "flas h", fe, i;    
14      
15       tinyMC EPopup.res izeToInner Size();    
16       f = do cument.for ms[0]    
17      
18       fe = t inyMCE.sel ectedInsta nce.getFoc usElement( );    
19       if (/m ceItem(Fla sh|ShockWa ve|Windows Media|Quic kTime|Real Media)/.te st(tinyMCE .getAttrib (fe, 'clas s'))) {    
20           pl  = "x={" +  fe.title  + "};";    
21      
22           sw itch (tiny MCE.getAtt rib(fe, 'c lass')) {    
23                case 'mc eItemFlash ':    
24                    type  = 'flash' ;    
25                    brea k;    
26      
27                case 'mc eItemShock Wave':    
28                    type  = 'shockw ave';    
29                    brea k;    
30      
31                case 'mc eItemWindo wsMedia':    
32                    type  = 'wmp';    
33                    brea k;    
34      
35                case 'mc eItemQuick Time':    
36                    type  = 'qt';    
37                    brea k;    
38      
39                case 'mc eItemRealM edia':    
40                    type  = 'rmp';    
41                    brea k;    
42           }    
43      
44           do cument.for ms[0].inse rt.value =  tinyMCE.g etLang('la ng_update' , 'Insert' , true);     
45       }    
46      
47       docume nt.getElem entById('f ilebrowser container' ).innerHTM L = getBro wserHTML(' filebrowse r','src',' media','me dia');    
48       docume nt.getElem entById('q tsrcfilebr owserconta iner').inn erHTML = g etBrowserH TML('qtsrc filebrowse r','qt_qts rc','media ','media') ;    
49       docume nt.getElem entById('b gcolor_pic kcontainer ').innerHT ML = getCo lorPickerH TML('bgcol or_pick',' bgcolor');    
50      
51       var ht ml = getMe diaListHTM L('filebro wser','src ','media', 'media');    
52       if (ht ml == "")    
53           do cument.get ElementByI d("linklis trow").sty le.display  = 'none';    
54       else    
55           do cument.get ElementByI d("linklis tcontainer ").innerHT ML = html;    
56      
57       // Res ize some e lements    
58       if (is Visible('f ilebrowser container' ))    
59           do cument.get ElementByI d('src').s tyle.width  = '230px' ;    
60      
61       // Set up form    
62       if (pl  != "") {    
63           pl  = eval(pl );    
64      
65           sw itch (type ) {    
66                case "fl ash":    
67                    setB ool(pl, 'f lash', 'pl ay');    
68                    setB ool(pl, 'f lash', 'lo op');    
69                    setB ool(pl, 'f lash', 'me nu');    
70                    setB ool(pl, 'f lash', 'sw liveconnec t');    
71                    setS tr(pl, 'fl ash', 'qua lity');    
72                    setS tr(pl, 'fl ash', 'sca le');    
73                    setS tr(pl, 'fl ash', 'sal ign');    
74                    setS tr(pl, 'fl ash', 'wmo de');    
75                    setS tr(pl, 'fl ash', 'bas e');    
76                    setS tr(pl, 'fl ash', 'fla shvars');    
77                break;    
78      
79                case "qt ":    
80                    setB ool(pl, 'q t', 'loop' );    
81                    setB ool(pl, 'q t', 'autop lay');    
82                    setB ool(pl, 'q t', 'cache ');    
83                    setB ool(pl, 'q t', 'contr oller');    
84                    setB ool(pl, 'q t', 'corre ction');    
85                    setB ool(pl, 'q t', 'enabl ejavascrip t');    
86                    setB ool(pl, 'q t', 'kiosk mode');    
87                    setB ool(pl, 'q t', 'autoh ref');    
88                    setB ool(pl, 'q t', 'playe veryframe' );    
89                    setB ool(pl, 'q t', 'tarse tcache');    
90                    setS tr(pl, 'qt ', 'scale' );    
91                    setS tr(pl, 'qt ', 'startt ime');    
92                    setS tr(pl, 'qt ', 'endtim e');    
93                    setS tr(pl, 'qt ', 'tarset ');    
94                    setS tr(pl, 'qt ', 'qtsrcc hokespeed' );    
95                    setS tr(pl, 'qt ', 'volume ');    
96                    setS tr(pl, 'qt ', 'qtsrc' );    
97                break;    
98      
99                case "sh ockwave":    
100                    setB ool(pl, 's hockwave',  'sound');    
101                    setB ool(pl, 's hockwave',  'progress ');    
102                    setB ool(pl, 's hockwave',  'autostar t');    
103                    setB ool(pl, 's hockwave',  'swliveco nnect');    
104                    setS tr(pl, 'sh ockwave',  'swvolume' );    
105                    setS tr(pl, 'sh ockwave',  'swstretch style');    
106                    setS tr(pl, 'sh ockwave',  'swstretch halign');    
107                    setS tr(pl, 'sh ockwave',  'swstretch valign');    
108                break;    
109      
110                case "wm p":    
111                    setB ool(pl, 'w mp', 'auto start');    
112                    setB ool(pl, 'w mp', 'enab led');    
113                    setB ool(pl, 'w mp', 'enab lecontextm enu');    
114                    setB ool(pl, 'w mp', 'full screen');    
115                    setB ool(pl, 'w mp', 'invo keurls');    
116                    setB ool(pl, 'w mp', 'mute ');    
117                    setB ool(pl, 'w mp', 'stre tchtofit') ;    
118                    setB ool(pl, 'w mp', 'wind owlessvide o');    
119                    setS tr(pl, 'wm p', 'balan ce');    
120                    setS tr(pl, 'wm p', 'baseu rl');    
121                    setS tr(pl, 'wm p', 'capti oningid');    
122                    setS tr(pl, 'wm p', 'curre ntmarker') ;    
123                    setS tr(pl, 'wm p', 'curre ntposition ');    
124                    setS tr(pl, 'wm p', 'defau ltframe');    
125                    setS tr(pl, 'wm p', 'playc ount');    
126                    setS tr(pl, 'wm p', 'rate' );    
127                    setS tr(pl, 'wm p', 'uimod e');    
128                    setS tr(pl, 'wm p', 'volum e');    
129                break;    
130      
131                case "rm p":    
132                    setB ool(pl, 'r mp', 'auto start');    
133                    setB ool(pl, 'r mp', 'loop ');    
134                    setB ool(pl, 'r mp', 'auto gotourl');    
135                    setB ool(pl, 'r mp', 'cent er');    
136                    setB ool(pl, 'r mp', 'imag estatus');    
137                    setB ool(pl, 'r mp', 'main tainaspect ');    
138                    setB ool(pl, 'r mp', 'noja va');    
139                    setB ool(pl, 'r mp', 'pref etch');    
140                    setB ool(pl, 'r mp', 'shuf fle');    
141                    setS tr(pl, 'rm p', 'conso le');    
142                    setS tr(pl, 'rm p', 'contr ols');    
143                    setS tr(pl, 'rm p', 'numlo op');    
144                    setS tr(pl, 'rm p', 'scrip tcallbacks ');    
145                break;    
146           }    
147      
148           se tStr(pl, n ull, 'src' );    
149           se tStr(pl, n ull, 'id') ;    
150           se tStr(pl, n ull, 'name ');    
151           se tStr(pl, n ull, 'vspa ce');    
152           se tStr(pl, n ull, 'hspa ce');    
153           se tStr(pl, n ull, 'bgco lor');    
154           se tStr(pl, n ull, 'alig n');    
155           se tStr(pl, n ull, 'widt h');    
156           se tStr(pl, n ull, 'heig ht');    
157      
158           if  ((val = t inyMCE.get Attrib(fe,  "width"))  != "")    
159                pl.width  = f.width .value = v al;    
160      
161           if  ((val = t inyMCE.get Attrib(fe,  "height") ) != "")    
162                pl.heigh t = f.heig ht.value =  val;    
163      
164           ol dWidth = p l.width ?  parseInt(p l.width) :  0;    
165           ol dHeight =  pl.height  ? parseInt (pl.height ) : 0;    
166       } else    
167           ol dWidth = o ldHeight =  0;    
168      
169       select ByValue(f,  'media_ty pe', type) ;    
170       change dType(type );    
171       update Color('bgc olor_pick' , 'bgcolor ');    
172      
173       TinyMC E_Editable Selects.in it();    
174       genera tePreview( );    
175   }    
176      
177   function i nsertMedia () {    
178       var fe , f = docu ment.forms [0], h;    
179      
180       if (!A utoValidat or.validat e(f)) {    
181           al ert(tinyMC E.getLang( 'lang_inva lid_data') );    
182           re turn false ;    
183       }    
184      
185       f.widt h.value =  f.width.va lue == ""  ? 100 : f. width.valu e;    
186       f.heig ht.value =  f.height. value == " " ? 100 :  f.height.v alue;    
187      
188       fe = t inyMCE.sel ectedInsta nce.getFoc usElement( );    
189       if (fe  != null & & /mceItem (Flash|Sho ckWave|Win dowsMedia| QuickTime| RealMedia) /.test(tin yMCE.getAt trib(fe, ' class')))  {    
190           sw itch (f.me dia_type.o ptions[f.m edia_type. selectedIn dex].value ) {    
191                case "fl ash":    
192                    fe.c lassName =  "mceItemF lash";    
193                    brea k;    
194      
195                case "sh ockwave":    
196                    fe.c lassName =  "mceItemS hockWave";    
197                    brea k;    
198      
199                case "qt ":    
200                    fe.c lassName =  "mceItemQ uickTime";    
201                    brea k;    
202      
203                case "wm p":    
204                    fe.c lassName =  "mceItemW indowsMedi a";    
205                    brea k;    
206      
207                case "rm p":    
208                    fe.c lassName =  "mceItemR ealMedia";    
209                    brea k;    
210           }    
211      
212           if  (fe.width  != f.widt h.value ||  fe.height  != f.heig ht.height)    
213                tinyMCE. selectedIn stance.rep aint();    
214      
215           fe .title = s erializePa rameters() ;    
216           fe .width = f .width.val ue;    
217           fe .height =  f.height.v alue;    
218           fe .style.wid th = f.wid th.value +  (f.width. value.inde xOf('%') = = -1 ? 'px ' : '');    
219           fe .style.hei ght = f.he ight.value  + (f.heig ht.value.i ndexOf('%' ) == -1 ?  'px' : '') ;    
220           fe .align = f .align.opt ions[f.ali gn.selecte dIndex].va lue;    
221       } else  {    
222           h  = '<img sr c="' + tin yMCE.getPa ram("theme _href") +  '/images/s pacer.gif" ' ;    
223      
224           sw itch (f.me dia_type.o ptions[f.m edia_type. selectedIn dex].value ) {    
225                case "fl ash":    
226                    h +=  ' class=" mceItemFla sh"';    
227                    brea k;    
228      
229                case "sh ockwave":    
230                    h +=  ' class=" mceItemSho ckWave"';    
231                    brea k;    
232      
233                case "qt ":    
234                    h +=  ' class=" mceItemQui ckTime"';    
235                    brea k;    
236      
237                case "wm p":    
238                    h +=  ' class=" mceItemWin dowsMedia" ';    
239                    brea k;    
240      
241                case "rm p":    
242                    h +=  ' class=" mceItemRea lMedia"';    
243                    brea k;    
244           }    
245      
246           h  += ' title ="' + seri alizeParam eters() +  '"';    
247           h  += ' width ="' + f.wi dth.value  + '"';    
248           h  += ' heigh t="' + f.h eight.valu e + '"';    
249           h  += ' align ="' + f.al ign.option s[f.align. selectedIn dex].value  + '"';    
250      
251           h  += ' />';    
252      
253           ti nyMCE.sele ctedInstan ce.execCom mand('mceI nsertConte nt', false , h);    
254       }    
255      
256       tinyMC EPopup.clo se();    
257   }    
258      
259   function g etMediaLis tHTML() {    
260       if (ty peof(tinyM CEMediaLis t) != "und efined" &&  tinyMCEMe diaList.le ngth > 0)  {    
261           va r html = " ";    
262      
263           ht ml += '<se lect id="l inklist" n ame="linkl ist" style ="width: 2 50px" onfo cus="tinyM CE.addSele ctAccessib ility(even t, this, w indow);" o nchange="t his.form.s rc.value=t his.option s[this.sel ectedIndex ].value;"> ';    
264           ht ml += '<op tion value ="">---</o ption>';    
265      
266           fo r (var i=0 ; i<tinyMC EMediaList .length; i ++)    
267                html +=  '<option v alue="' +  tinyMCEMed iaList[i][ 1] + '">'  + tinyMCEM ediaList[i ][0] + '</ option>';    
268      
269           ht ml += '</s elect>';    
270      
271           re turn html;    
272       }    
273      
274       return  "";    
275   }    
276      
277   function g etType(v)  {    
278       var fo , i, c, el , x, f = d ocument.fo rms[0];    
279      
280       fo = t inyMCE.get Param("med ia_types",  "flash=sw f;shockwav e=dcr;qt=m ov,qt,mpg, mp3,mp4,mp eg;shockwa ve=dcr;wmp =avi,wmv,w m,asf,asx, wmx,wvx;rm p=rm,ra,ra m").split( ';');    
281      
282       // You Tube    
283       if (v. indexOf('h ttp://www. youtube.co m/watch?v= ') == 0) {    
284           f. width.valu e = '425';    
285           f. height.val ue = '350' ;    
286           f. src.value  = 'http:// www.youtub e.com/v/'  + v.substr ing('http: //www.yout ube.com/wa tch?v='.le ngth);    
287           re turn 'flas h';    
288       }    
289      
290       // Goo gle video    
291       if (v. indexOf('h ttp://vide o.google.c om/videopl ay?docid=' ) == 0) {    
292           f. width.valu e = '425';    
293           f. height.val ue = '326' ;    
294           f. src.value  = 'http:// video.goog le.com/goo gleplayer. swf?docId= ' + v.subs tring('htt p://video. google.com /videoplay ?docid='.l ength) + ' &hl=en';    
295           re turn 'flas h';    
296       }    
297      
298       for (i =0; i<fo.l ength; i++ ) {    
299           c  = fo[i].sp lit('=');    
300      
301           el  = c[1].sp lit(',');    
302           fo r (x=0; x< el.length;  x++)    
303           if  (v.indexO f('.' + el [x]) != -1 )    
304                return c [0];    
305       }    
306      
307       return  null;    
308   }    
309      
310   function s witchType( v) {    
311       var t  = getType( v), d = do cument, f  = d.forms[ 0];    
312      
313       if (!t )    
314           re turn;    
315      
316       select ByValue(d. forms[0],  'media_typ e', t);    
317       change dType(t);    
318      
319       // Upd ate qtsrc  also    
320       if (t  == 'qt' &&  f.src.val ue.toLower Case().ind exOf('rtsp ://') != - 1) {    
321           al ert(tinyMC E.getLang( "lang_medi a_qt_strea m_warn"));    
322      
323           if  (f.qt_qts rc.value = = '')    
324                f.qt_qts rc.value =  f.src.val ue;    
325       }    
326   }    
327      
328   function c hangedType (t) {    
329       var d  = document ;    
330      
331       d.getE lementById ('flash_op tions').st yle.displa y = 'none' ;    
332       d.getE lementById ('qt_optio ns').style .display =  'none';    
333       d.getE lementById ('shockwav e_options' ).style.di splay = 'n one';    
334       d.getE lementById ('wmp_opti ons').styl e.display  = 'none';    
335       d.getE lementById ('rmp_opti ons').styl e.display  = 'none';    
336       d.getE lementById (t + '_opt ions').sty le.display  = 'block' ;    
337   }    
338      
339   function s erializePa rameters()  {    
340       var d  = document , f = d.fo rms[0], s  = '';    
341      
342       switch  (f.media_ type.optio ns[f.media _type.sele ctedIndex] .value) {    
343           ca se "flash" :    
344                s += get Bool('flas h', 'play' , true);    
345                s += get Bool('flas h', 'loop' , true);    
346                s += get Bool('flas h', 'menu' , true);    
347                s += get Bool('flas h', 'swliv econnect',  false);    
348                s += get Str('flash ', 'qualit y');    
349                s += get Str('flash ', 'scale' );    
350                s += get Str('flash ', 'salign ');    
351                s += get Str('flash ', 'wmode' );    
352                s += get Str('flash ', 'base') ;    
353                s += get Str('flash ', 'flashv ars');    
354           br eak;    
355      
356           ca se "qt":    
357                s += get Bool('qt',  'loop', f alse);    
358                s += get Bool('qt',  'autoplay ', true);    
359                s += get Bool('qt',  'cache',  false);    
360                s += get Bool('qt',  'controll er', true) ;    
361                s += get Bool('qt',  'correcti on', false , 'none',  'full');    
362                s += get Bool('qt',  'enableja vascript',  false);    
363                s += get Bool('qt',  'kioskmod e', false) ;    
364                s += get Bool('qt',  'autohref ', false);    
365                s += get Bool('qt',  'playever yframe', f alse);    
366                s += get Bool('qt',  'targetca che', fals e);    
367                s += get Str('qt',  'scale');    
368                s += get Str('qt',  'starttime ');    
369                s += get Str('qt',  'endtime') ;    
370                s += get Str('qt',  'target');    
371                s += get Str('qt',  'qtsrcchok espeed');    
372                s += get Str('qt',  'volume');    
373                s += get Str('qt',  'qtsrc');    
374           br eak;    
375      
376           ca se "shockw ave":    
377                s += get Bool('shoc kwave', 's ound');    
378                s += get Bool('shoc kwave', 'p rogress');    
379                s += get Bool('shoc kwave', 'a utostart') ;    
380                s += get Bool('shoc kwave', 's wliveconne ct');    
381                s += get Str('shock wave', 'sw volume');    
382                s += get Str('shock wave', 'sw stretchsty le');    
383                s += get Str('shock wave', 'sw stretchhal ign');    
384                s += get Str('shock wave', 'sw stretchval ign');    
385           br eak;    
386      
387           ca se "wmp":    
388                s += get Bool('wmp' , 'autosta rt', true) ;    
389                s += get Bool('wmp' , 'enabled ', false);    
390                s += get Bool('wmp' , 'enablec ontextmenu ', true);    
391                s += get Bool('wmp' , 'fullscr een', fals e);    
392                s += get Bool('wmp' , 'invokeu rls', true );    
393                s += get Bool('wmp' , 'mute',  false);    
394                s += get Bool('wmp' , 'stretch tofit', fa lse);    
395                s += get Bool('wmp' , 'windowl essvideo',  false);    
396                s += get Str('wmp',  'balance' );    
397                s += get Str('wmp',  'baseurl' );    
398                s += get Str('wmp',  'captioni ngid');    
399                s += get Str('wmp',  'currentm arker');    
400                s += get Str('wmp',  'currentp osition');    
401                s += get Str('wmp',  'defaultf rame');    
402                s += get Str('wmp',  'playcoun t');    
403                s += get Str('wmp',  'rate');    
404                s += get Str('wmp',  'uimode') ;    
405                s += get Str('wmp',  'volume') ;    
406           br eak;    
407      
408           ca se "rmp":    
409                s += get Bool('rmp' , 'autosta rt', false );    
410                s += get Bool('rmp' , 'loop',  false);    
411                s += get Bool('rmp' , 'autogot ourl', tru e);    
412                s += get Bool('rmp' , 'center' , false);    
413                s += get Bool('rmp' , 'imagest atus', tru e);    
414                s += get Bool('rmp' , 'maintai naspect',  false);    
415                s += get Bool('rmp' , 'nojava' , false);    
416                s += get Bool('rmp' , 'prefetc h', false) ;    
417                s += get Bool('rmp' , 'shuffle ', false);    
418                s += get Str('rmp',  'console' );    
419                s += get Str('rmp',  'controls ');    
420                s += get Str('rmp',  'numloop' );    
421                s += get Str('rmp',  'scriptca llbacks');    
422           br eak;    
423       }    
424      
425       s += g etStr(null , 'id');    
426       s += g etStr(null , 'name');    
427       s += g etStr(null , 'src');    
428       s += g etStr(null , 'align') ;    
429       s += g etStr(null , 'bgcolor ');    
430       s += g etInt(null , 'vspace' );    
431       s += g etInt(null , 'hspace' );    
432       s += g etStr(null , 'width') ;    
433       s += g etStr(null , 'height' );    
434      
435       s = s. length > 0  ? s.subst ring(0, s. length - 1 ) : s;    
436      
437       return  s;    
438   }    
439      
440   function s etBool(pl,  p, n) {    
441       if (ty peof(pl[n] ) == "unde fined")    
442           re turn;    
443      
444       docume nt.forms[0 ].elements [p + "_" +  n].checke d = pl[n];    
445   }    
446      
447   function s etStr(pl,  p, n) {    
448       var f  = document .forms[0],  e = f.ele ments[(p ! = null ? p  + "_" : ' ') + n];    
449      
450       if (ty peof(pl[n] ) == "unde fined")    
451           re turn;    
452      
453       if (e. type == "t ext")    
454           e. value = pl [n];    
455       else    
456           se lectByValu e(f, (p !=  null ? p  + "_" : '' ) + n, pl[ n]);    
457   }    
458      
459   function g etBool(p,  n, d, tv,  fv) {    
460       var v  = document .forms[0]. elements[p  + "_" + n ].checked;    
461      
462       tv = t ypeof(tv)  == 'undefi ned' ? 'tr ue' : "'"  + jsEncode (tv) + "'" ;    
463       fv = t ypeof(fv)  == 'undefi ned' ? 'fa lse' : "'"  + jsEncod e(fv) + "' ";    
464      
465       return  (v == d)  ? '' : n +  (v ? ':'  + tv + ','  : ':' + f v + ',');    
466   }    
467      
468   function g etStr(p, n , d) {    
469       var e  = document .forms[0]. elements[( p != null  ? p + "_"  : "") + n] ;    
470       var v  = e.type = = "text" ?  e.value :  e.options [e.selecte dIndex].va lue;    
471      
472       return  ((n == d  || v == '' ) ? '' : n  + ":'" +  jsEncode(v ) + "',");    
473   }    
474      
475   function g etInt(p, n , d) {    
476       var e  = document .forms[0]. elements[( p != null  ? p + "_"  : "") + n] ;    
477       var v  = e.type = = "text" ?  e.value :  e.options [e.selecte dIndex].va lue;    
478      
479       return  ((n == d  || v == '' ) ? '' : n  + ":" + v .replace(/ [^0-9]+/g,  '') + "," );    
480   }    
481      
482   function j sEncode(s)  {    
483       s = s. replace(ne w RegExp(' \\\\', 'g' ), '\\\\') ;    
484       s = s. replace(ne w RegExp(' "', 'g'),  '\\"');    
485       s = s. replace(ne w RegExp(" '", 'g'),  "\\'");    
486      
487       return  s;    
488   }    
489      
490   function g eneratePre view(c) {    
491       var f  = document .forms[0],  p = docum ent.getEle mentById(' prev'), h  = '', cls,  pl, n, ty pe, codeba se, wp, hp , nw, nh;    
492      
493       p.inne rHTML = '< !-- x ---> ';    
494      
495       nw = p arseInt(f. width.valu e);    
496       nh = p arseInt(f. height.val ue);    
497      
498       if (f. width.valu e != "" &&  f.height. value != " ") {    
499           if  (f.constr ain.checke d) {    
500                if (c ==  'width' & & oldWidth  != 0) {    
501                    wp =  nw / oldW idth;    
502                    nh =  Math.roun d(wp * nh) ;    
503                    f.he ight.value  = nh;    
504                } else i f (c == 'h eight' &&  oldHeight  != 0) {    
505                    hp =  nh / oldH eight;    
506                    nw =  Math.roun d(hp * nw) ;    
507                    f.wi dth.value  = nw;    
508                }    
509           }    
510       }    
511      
512       if (f. width.valu e != "")    
513           ol dWidth = n w;    
514      
515       if (f. height.val ue != "")    
516           ol dHeight =  nh;    
517      
518       // Aft er constra in    
519       pl = s erializePa rameters() ;    
520      
521       switch  (f.media_ type.optio ns[f.media _type.sele ctedIndex] .value) {    
522           ca se "flash" :    
523                cls = 'c lsid:D27CD B6E-AE6D-1 1cf-96B8-4 4455354000 0';    
524                codebase  = 'http:/ /download. macromedia .com/pub/s hockwave/c abs/flash/ swflash.ca b#version= 6,0,40,0';    
525                type = ' applicatio n/x-shockw ave-flash' ;    
526                break;    
527      
528           ca se "shockw ave":    
529                cls = 'c lsid:166B1 BCA-3F9C-1 1CF-8075-4 4455354000 0';    
530                codebase  = 'http:/ /download. macromedia .com/pub/s hockwave/c abs/direct or/sw.cab# version=8, 5,1,0';    
531                type = ' applicatio n/x-direct or';    
532                break;    
533      
534           ca se "qt":    
535                cls = 'c lsid:02BF2 5D5-8C17-4 B23-BC80-D 3488ABDDC6 B';    
536                codebase  = 'http:/ /www.apple .com/qtact ivex/qtplu gin.cab#ve rsion=6,0, 2,0';    
537                type = ' video/quic ktime';    
538                break;    
539      
540           ca se "wmp":    
541                cls = ti nyMCE.getP aram('medi a_wmp6_com patible')  ? 'clsid:0 5589FA1-C3 56-11CE-BF 01-00AA005 5595A' : ' clsid:6BF5 2A52-394A- 11D3-B153- 00C04F79FA A6';    
542                codebase  = 'http:/ /activex.m icrosoft.c om/activex /controls/ mplayer/en /nsmp2inf. cab#Versio n=5,1,52,7 01';    
543                type = ' applicatio n/x-mplaye r2';    
544                break;    
545      
546           ca se "rmp":    
547                cls = 'c lsid:CFCDA A03-8BE4-1 1cf-B84B-0 020AFBBCCF A';    
548                codebase  = 'http:/ /activex.m icrosoft.c om/activex /controls/ mplayer/en /nsmp2inf. cab#Versio n=5,1,52,7 01';    
549                type = ' audio/x-pn -realaudio -plugin';    
550                break;    
551       }    
552      
553       if (pl  == '') {    
554           p. innerHTML  = '';    
555           re turn;    
556       }    
557      
558       pl = e val('x={'  + pl + '}; ');    
559      
560       if (!p l.src) {    
561           p. innerHTML  = '';    
562           re turn;    
563       }    
564      
565       pl.src  = tinyMCE .convertRe lativeToAb soluteURL( tinyMCE.se ttings['ba se_href'],  pl.src);    
566       pl.wid th = !pl.w idth ? 100  : pl.widt h;    
567       pl.hei ght = !pl. height ? 1 00 : pl.he ight;    
568       pl.id  = !pl.id ?  'obj' : p l.id;    
569       pl.nam e = !pl.na me ? 'eobj ' : pl.nam e;    
570       pl.ali gn = !pl.a lign ? ''  : pl.align ;    
571      
572       h += ' <object cl assid="cls id:' + cls  + '" code base="' +  codebase +  '" width= "' + pl.wi dth + '" h eight="' +  pl.height  + '" id=" ' + pl.id  + '" name= "' + pl.na me + '" al ign="' + p l.align +  '">';    
573      
574       for (n  in pl) {    
575           h  += '<param  name="' +  n + '" va lue="' + p l[n] + '"> ';    
576      
577           //  Add extra  url param eter if it 's an abso lute URL    
578           if  (n == 'sr c' && pl[n ].indexOf( '://') !=  -1)    
579                h += '<p aram name= "url" valu e="' + pl[ n] + '" /> ';    
580       }    
581      
582       h += ' <embed typ e="' + typ e + '" ';    
583      
584       for (n  in pl)    
585           h  += n + '=" ' + pl[n]  + '" ';    
586      
587       h += ' ></embed>< /object>';    
588      
589       p.inne rHTML = "< !-- x ---> " + h;    
590   }