391. File Comparison Report

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

391.1 Files compared

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

391.2 Comparison summary

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

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

391.4 Active regular expressions

No regular expressions were active.

391.5 Comparison detail

1   /* Functio ns for the  advlink p lugin popu p */    
2      
3   var templa tes = {    
4       "windo w.open" :  "window.op en('${url} ','${targe t}','${opt ions}')"    
5   };    
6      
7   function p reinit() {    
8       // Ini tialize    
9       tinyMC E.setWindo wArg('mce_ windowresi ze', false );    
10      
11       // Imp ort extern al list ur l javascri pt    
12       var ur l = tinyMC E.getParam ("external _link_list _url");    
13       if (ur l != null)  {    
14           //  Fix relat ive    
15           if  (url.char At(0) != ' /' && url. indexOf(': //') == -1 )    
16                url = ti nyMCE.docu mentBasePa th + "/" +  url;    
17      
18           do cument.wri te('<sc'+' ript langu age="javas cript" typ e="text/ja vascript"  src="' + u rl + '"></ sc'+'ript> ');    
19       }    
20   }    
21      
22   function c hangeClass () {    
23       var fo rmObj = do cument.for ms[0];    
24       formOb j.classes. value = ge tSelectVal ue(formObj , 'classli st');    
25   }    
26      
27   function i nit() {    
28       tinyMC EPopup.res izeToInner Size();    
29      
30       var fo rmObj = do cument.for ms[0];    
31       var in st = tinyM CE.getInst anceById(t inyMCE.get WindowArg( 'editor_id '));    
32       var el m = inst.g etFocusEle ment();    
33       var ac tion = "in sert";    
34       var ht ml;    
35      
36       docume nt.getElem entById('h refbrowser container' ).innerHTM L = getBro wserHTML(' hrefbrowse r','href', 'file','ad vlink');    
37       docume nt.getElem entById('p opupurlbro wsercontai ner').inne rHTML = ge tBrowserHT ML('popupu rlbrowser' ,'popupurl ','file',' advlink');    
38       docume nt.getElem entById('l inklisthre fcontainer ').innerHT ML = getLi nkListHTML ('linklist href','hre f');    
39       docume nt.getElem entById('a nchorlistc ontainer') .innerHTML  = getAnch orListHTML ('anchorli st','href' );    
40       docume nt.getElem entById('t argetlistc ontainer') .innerHTML  = getTarg etListHTML ('targetli st','targe t');    
41      
42       // Lin k list    
43       html =  getLinkLi stHTML('li nklisthref ','href');    
44       if (ht ml == "")    
45           do cument.get ElementByI d("linklis threfrow") .style.dis play = 'no ne';    
46       else    
47           do cument.get ElementByI d("linklis threfconta iner").inn erHTML = h tml;    
48      
49       // Res ize some e lements    
50       if (is Visible('h refbrowser '))    
51           do cument.get ElementByI d('href'). style.widt h = '260px ';    
52      
53       if (is Visible('p opupurlbro wser'))    
54           do cument.get ElementByI d('popupur l').style. width = '1 80px';    
55      
56       elm =  tinyMCE.ge tParentEle ment(elm,  "a");    
57       if (el m != null  && elm.nod eName == " A")    
58           ac tion = "up date";    
59      
60       formOb j.insert.v alue = tin yMCE.getLa ng('lang_'  + action,  'Insert',  true);     
61      
62       setPop upControls Disabled(t rue);    
63      
64       if (ac tion == "u pdate") {    
65           va r href = t inyMCE.get Attrib(elm , 'href');    
66      
67           hr ef = conve rtURL(href , elm, tru e);    
68      
69           //  Use mce_h ref if fou nd    
70           va r mceRealH ref = tiny MCE.getAtt rib(elm, ' mce_href') ;    
71           if  (mceRealH ref != "")  {    
72                href = m ceRealHref ;    
73      
74                if (tiny MCE.getPar am('conver t_urls'))    
75                    href  = convert URL(href,  elm, true) ;    
76           }    
77      
78           va r onclick  = tinyMCE. cleanupEve ntStr(tiny MCE.getAtt rib(elm, ' onclick')) ;    
79      
80           //  Setup for m data    
81           se tFormValue ('href', h ref);    
82           se tFormValue ('title',  tinyMCE.ge tAttrib(el m, 'title' ));    
83           se tFormValue ('id', tin yMCE.getAt trib(elm,  'id'));    
84           se tFormValue ('style',  tinyMCE.se rializeSty le(tinyMCE .parseStyl e(tinyMCE. getAttrib( elm, "styl e"))));    
85           se tFormValue ('rel', ti nyMCE.getA ttrib(elm,  'rel'));    
86           se tFormValue ('rev', ti nyMCE.getA ttrib(elm,  'rev'));    
87           se tFormValue ('charset' , tinyMCE. getAttrib( elm, 'char set'));    
88           se tFormValue ('hreflang ', tinyMCE .getAttrib (elm, 'hre flang'));    
89           se tFormValue ('dir', ti nyMCE.getA ttrib(elm,  'dir'));    
90           se tFormValue ('lang', t inyMCE.get Attrib(elm , 'lang')) ;    
91           se tFormValue ('tabindex ', tinyMCE .getAttrib (elm, 'tab index', ty peof(elm.t abindex) ! = "undefin ed" ? elm. tabindex :  ""));    
92           se tFormValue ('accesske y', tinyMC E.getAttri b(elm, 'ac cesskey',  typeof(elm .accesskey ) != "unde fined" ? e lm.accessk ey : ""));    
93           se tFormValue ('type', t inyMCE.get Attrib(elm , 'type')) ;    
94           se tFormValue ('onfocus' , tinyMCE. cleanupEve ntStr(tiny MCE.getAtt rib(elm, ' onfocus')) );    
95           se tFormValue ('onblur',  tinyMCE.c leanupEven tStr(tinyM CE.getAttr ib(elm, 'o nblur')));    
96           se tFormValue ('onclick' , onclick) ;    
97           se tFormValue ('ondblcli ck', tinyM CE.cleanup EventStr(t inyMCE.get Attrib(elm , 'ondblcl ick')));    
98           se tFormValue ('onmoused own', tiny MCE.cleanu pEventStr( tinyMCE.ge tAttrib(el m, 'onmous edown')));    
99           se tFormValue ('onmouseu p', tinyMC E.cleanupE ventStr(ti nyMCE.getA ttrib(elm,  'onmouseu p')));    
100           se tFormValue ('onmouseo ver', tiny MCE.cleanu pEventStr( tinyMCE.ge tAttrib(el m, 'onmous eover')));    
101           se tFormValue ('onmousem ove', tiny MCE.cleanu pEventStr( tinyMCE.ge tAttrib(el m, 'onmous emove')));    
102           se tFormValue ('onmouseo ut', tinyM CE.cleanup EventStr(t inyMCE.get Attrib(elm , 'onmouse out')));    
103           se tFormValue ('onkeypre ss', tinyM CE.cleanup EventStr(t inyMCE.get Attrib(elm , 'onkeypr ess')));    
104           se tFormValue ('onkeydow n', tinyMC E.cleanupE ventStr(ti nyMCE.getA ttrib(elm,  'onkeydow n')));    
105           se tFormValue ('onkeyup' , tinyMCE. cleanupEve ntStr(tiny MCE.getAtt rib(elm, ' onkeyup')) );    
106           se tFormValue ('target',  tinyMCE.g etAttrib(e lm, 'targe t'));    
107           se tFormValue ('classes' , tinyMCE. getAttrib( elm, 'clas s'));    
108      
109           //  Parse onc lick data    
110           if  (onclick  != null &&  onclick.i ndexOf('wi ndow.open' ) != -1)    
111                parseWin dowOpen(on click);    
112           el se    
113                parseFun ction(oncl ick);    
114      
115           //  Select by  the value s    
116           se lectByValu e(formObj,  'dir', ti nyMCE.getA ttrib(elm,  'dir'));    
117           se lectByValu e(formObj,  'rel', ti nyMCE.getA ttrib(elm,  'rel'));    
118           se lectByValu e(formObj,  'rev', ti nyMCE.getA ttrib(elm,  'rev'));    
119           se lectByValu e(formObj,  'linklist href', hre f);    
120      
121           if  (href.cha rAt(0) ==  '#')    
122                selectBy Value(form Obj, 'anch orlist', h ref);    
123      
124           ad dClassesTo List('clas slist', 'a dvlink_sty les');    
125      
126           se lectByValu e(formObj,  'classlis t', tinyMC E.getAttri b(elm, 'cl ass'), tru e);    
127           se lectByValu e(formObj,  'targetli st', tinyM CE.getAttr ib(elm, 't arget'), t rue);    
128       } else    
129           ad dClassesTo List('clas slist', 'a dvlink_sty les');    
130      
131       window .focus();    
132   }    
133      
134   function c heckPrefix (n) {    
135       if (Va lidator.is Email(n) & & !/^\s*ma ilto:/i.te st(n.value ) && confi rm(tinyMCE .getLang(' lang_is_em ail')))    
136           n. value = 'm ailto:' +  n.value;    
137      
138       if (/^ \s*www./i. test(n.val ue) && con firm(tinyM CE.getLang ('lang_is_ external') ))    
139           n. value = 'h ttp://' +  n.value;    
140   }    
141      
142   function s etFormValu e(name, va lue) {    
143       docume nt.forms[0 ].elements [name].val ue = value ;    
144   }    
145      
146   function c onvertURL( url, node,  on_save)  {    
147       return  eval("tin yMCEPopup. windowOpen er." + tin yMCE.setti ngs['urlco nverter_ca llback'] +  "(url, no de, on_sav e);");    
148   }    
149      
150   function p arseWindow Open(oncli ck) {    
151       var fo rmObj = do cument.for ms[0];    
152      
153       // Pre process ce nter code    
154       if (on click.inde xOf('retur n false;')  != -1) {    
155           fo rmObj.popu preturn.ch ecked = tr ue;    
156           on click = on click.repl ace('retur n false;',  '');    
157       } else    
158           fo rmObj.popu preturn.ch ecked = fa lse;    
159      
160       var on ClickData  = parseLin k(onclick) ;    
161      
162       if (on ClickData  != null) {    
163           fo rmObj.ispo pup.checke d = true;    
164           se tPopupCont rolsDisabl ed(false);    
165      
166           va r onClickW indowOptio ns = parse Options(on ClickData[ 'options'] );    
167           va r url = on ClickData[ 'url'];    
168      
169           if  (tinyMCE. getParam(' convert_ur ls'))    
170                url = co nvertURL(u rl, null,  true);    
171      
172           fo rmObj.popu pname.valu e = onClic kData['tar get'];    
173           fo rmObj.popu purl.value  = url;    
174           fo rmObj.popu pwidth.val ue = getOp tion(onCli ckWindowOp tions, 'wi dth');    
175           fo rmObj.popu pheight.va lue = getO ption(onCl ickWindowO ptions, 'h eight');    
176      
177           fo rmObj.popu pleft.valu e = getOpt ion(onClic kWindowOpt ions, 'lef t');    
178           fo rmObj.popu ptop.value  = getOpti on(onClick WindowOpti ons, 'top' );    
179      
180           if  (formObj. popupleft. value.inde xOf('scree n') != -1)    
181                formObj. popupleft. value = "c ";    
182      
183           if  (formObj. popuptop.v alue.index Of('screen ') != -1)    
184                formObj. popuptop.v alue = "c" ;    
185      
186           fo rmObj.popu plocation. checked =  getOption( onClickWin dowOptions , 'locatio n') == "ye s";    
187           fo rmObj.popu pscrollbar s.checked  = getOptio n(onClickW indowOptio ns, 'scrol lbars') ==  "yes";    
188           fo rmObj.popu pmenubar.c hecked = g etOption(o nClickWind owOptions,  'menubar' ) == "yes" ;    
189           fo rmObj.popu presizable .checked =  getOption (onClickWi ndowOption s, 'resiza ble') == " yes";    
190           fo rmObj.popu ptoolbar.c hecked = g etOption(o nClickWind owOptions,  'toolbar' ) == "yes" ;    
191           fo rmObj.popu pstatus.ch ecked = ge tOption(on ClickWindo wOptions,  'status')  == "yes";    
192           fo rmObj.popu pdependent .checked =  getOption (onClickWi ndowOption s, 'depend ent') == " yes";    
193      
194           bu ildOnClick ();    
195       }    
196   }    
197      
198   function p arseFuncti on(onclick ) {    
199       var fo rmObj = do cument.for ms[0];    
200       var on ClickData  = parseLin k(onclick) ;    
201      
202       // TOD O: Add stu ff here    
203   }    
204      
205   function g etOption(o pts, name)  {    
206       return  typeof(op ts[name])  == "undefi ned" ? ""  : opts[nam e];    
207   }    
208      
209   function s etPopupCon trolsDisab led(state)  {    
210       var fo rmObj = do cument.for ms[0];    
211      
212       formOb j.popupnam e.disabled  = state;    
213       formOb j.popupurl .disabled  = state;    
214       formOb j.popupwid th.disable d = state;    
215       formOb j.popuphei ght.disabl ed = state ;    
216       formOb j.popuplef t.disabled  = state;    
217       formOb j.popuptop .disabled  = state;    
218       formOb j.popuploc ation.disa bled = sta te;    
219       formOb j.popupscr ollbars.di sabled = s tate;    
220       formOb j.popupmen ubar.disab led = stat e;    
221       formOb j.popupres izable.dis abled = st ate;    
222       formOb j.popuptoo lbar.disab led = stat e;    
223       formOb j.popupsta tus.disabl ed = state ;    
224       formOb j.popupret urn.disabl ed = state ;    
225       formOb j.popupdep endent.dis abled = st ate;    
226      
227       setBro wserDisabl ed('popupu rlbrowser' , state);    
228   }    
229      
230   function p arseLink(l ink) {    
231       link =  link.repl ace(new Re gExp('&#39 ;', 'g'),  "'");    
232      
233       var fn Name = lin k.replace( new RegExp ("\\s*([A- Za-z0-9\.] *)\\s*\\(. *", "gi"),  "$1");    
234      
235       // Is  function n ame a temp late funct ion    
236       var te mplate = t emplates[f nName];    
237       if (te mplate) {    
238           //  Build reg exp    
239           va r variable Names = te mplate.mat ch(new Reg Exp("'?\\$ \\{[A-Za-z 0-9\.]*\\} '?", "gi") );    
240           va r regExp =  "\\s*[A-Z a-z0-9\.]* \\s*\\(";    
241           va r replaceS tr = "";    
242           fo r (var i=0 ; i<variab leNames.le ngth; i++)  {    
243                // Is st ring value    
244                if (vari ableNames[ i].indexOf ("'${") !=  -1)    
245                    regE xp += "'(. *)'";    
246                else //  Number val ue    
247                    regE xp += "([0 -9]*)";    
248      
249                replaceS tr += "$"  + (i+1);    
250      
251                // Clean up variabl e name    
252                variable Names[i] =  variableN ames[i].re place(new  RegExp("[^ A-Za-z0-9] ", "gi"),  "");    
253      
254                if (i !=  variableN ames.lengt h-1) {    
255                    regE xp += "\\s *,\\s*";    
256                    repl aceStr +=  "<delim>";    
257                } else    
258                    regE xp += ".*" ;    
259           }    
260      
261           re gExp += "\ \);?";    
262      
263           //  Build var iable arra y    
264           va r variable s = new Ar ray();    
265           va riables["_ function"]  = fnName;    
266           va r variable Values = l ink.replac e(new RegE xp(regExp,  "gi"), re placeStr). split('<de lim>');    
267           fo r (var i=0 ; i<variab leNames.le ngth; i++)    
268                variable s[variable Names[i]]  = variable Values[i];    
269      
270           re turn varia bles;    
271       }    
272      
273       return  null;    
274   }    
275      
276   function p arseOption s(opts) {    
277       if (op ts == null  || opts = = "")    
278           re turn new A rray();    
279      
280       // Cle anup the o ptions    
281       opts =  opts.toLo werCase();    
282       opts =  opts.repl ace(/;/g,  ",");    
283       opts =  opts.repl ace(/[^0-9 a-z=,]/g,  "");    
284      
285       var op tionChunks  = opts.sp lit(',');    
286       var op tions = ne w Array();    
287      
288       for (v ar i=0; i< optionChun ks.length;  i++) {    
289           va r parts =  optionChun ks[i].spli t('=');    
290      
291           if  (parts.le ngth == 2)    
292                options[ parts[0]]  = parts[1] ;    
293       }    
294      
295       return  options;    
296   }    
297      
298   function b uildOnClic k() {    
299       var fo rmObj = do cument.for ms[0];    
300      
301       if (!f ormObj.isp opup.check ed) {    
302           fo rmObj.oncl ick.value  = "";    
303           re turn;    
304       }    
305      
306       var on click = "w indow.open ('";    
307       var ur l = formOb j.popupurl .value;    
308      
309       if (ti nyMCE.getP aram('conv ert_urls') )    
310           ur l = conver tURL(url,  null, true );    
311      
312       onclic k += url +  "','";    
313       onclic k += formO bj.popupna me.value +  "','";    
314      
315       if (fo rmObj.popu plocation. checked)    
316           on click += " location=y es,";    
317      
318       if (fo rmObj.popu pscrollbar s.checked)    
319           on click += " scrollbars =yes,";    
320      
321       if (fo rmObj.popu pmenubar.c hecked)    
322           on click += " menubar=ye s,";    
323      
324       if (fo rmObj.popu presizable .checked)    
325           on click += " resizable= yes,";    
326      
327       if (fo rmObj.popu ptoolbar.c hecked)    
328           on click += " toolbar=ye s,";    
329      
330       if (fo rmObj.popu pstatus.ch ecked)    
331           on click += " status=yes ,";    
332      
333       if (fo rmObj.popu pdependent .checked)    
334           on click += " dependent= yes,";    
335      
336       if (fo rmObj.popu pwidth.val ue != "")    
337           on click += " width=" +  formObj.po pupwidth.v alue + "," ;    
338      
339       if (fo rmObj.popu pheight.va lue != "")    
340           on click += " height=" +  formObj.p opupheight .value + " ,";    
341      
342       if (fo rmObj.popu pleft.valu e != "") {    
343           if  (formObj. popupleft. value != " c")    
344                onclick  += "left="  + formObj .popupleft .value + " ,";    
345           el se    
346                onclick  += "left=' +(screen.a vailWidth/ 2-" + (for mObj.popup width.valu e/2) + ")+ ',";    
347       }    
348      
349       if (fo rmObj.popu ptop.value  != "") {    
350           if  (formObj. popuptop.v alue != "c ")    
351                onclick  += "top="  + formObj. popuptop.v alue + "," ;    
352           el se    
353                onclick  += "top='+ (screen.av ailHeight/ 2-" + (for mObj.popup height.val ue/2) + ") +',";    
354       }    
355      
356       if (on click.char At(onclick .length-1)  == ',')    
357           on click = on click.subs tring(0, o nclick.len gth-1);    
358      
359       onclic k += "');" ;    
360      
361       if (fo rmObj.popu preturn.ch ecked)    
362           on click += " return fal se;";    
363      
364       // tin yMCE.debug (onclick);    
365      
366       formOb j.onclick. value = on click;    
367      
368       if (fo rmObj.href .value ==  "")    
369           fo rmObj.href .value = u rl;    
370   }    
371      
372   function s etAttrib(e lm, attrib , value) {    
373       var fo rmObj = do cument.for ms[0];    
374       var va lueElm = f ormObj.ele ments[attr ib.toLower Case()];    
375      
376       if (ty peof(value ) == "unde fined" ||  value == n ull) {    
377           va lue = "";    
378      
379           if  (valueElm )    
380                value =  valueElm.v alue;    
381       }    
382      
383       if (va lue != "")  {    
384           el m.setAttri bute(attri b.toLowerC ase(), val ue);    
385      
386           if  (attrib = = "style")    
387                attrib =  "style.cs sText";    
388      
389           if  (attrib.s ubstring(0 , 2) == 'o n')    
390                value =  'return tr ue;' + val ue;    
391      
392           if  (attrib = = "class")    
393                attrib =  "classNam e";    
394      
395           ev al('elm.'  + attrib +  "=value;" );    
396       } else    
397           el m.removeAt tribute(at trib);    
398   }    
399      
400   function g etAnchorLi stHTML(id,  target) {    
401       var in st = tinyM CE.getInst anceById(t inyMCE.get WindowArg( 'editor_id '));    
402       var no des = inst .getBody() .getElemen tsByTagNam e("a"), na me, i;    
403       var ht ml = "";    
404      
405       html + = '<select  id="' + i d + '" nam e="' + id  + '" class ="mceAncho rList" onf ocus="tiny MCE.addSel ectAccessi bility(eve nt, this,  window);"  onchange=" this.form. ' + target  + '.value =';    
406       html + = 'this.op tions[this .selectedI ndex].valu e;">';    
407       html + = '<option  value=""> ---</optio n>';    
408      
409       for (i =0; i<node s.length;  i++) {    
410           if  ((name =  tinyMCE.ge tAttrib(no des[i], "n ame")) !=  "")    
411                html +=  '<option v alue="#' +  name + '" >' + name  + '</optio n>';    
412       }    
413      
414       html + = '</selec t>';    
415      
416       return  html;    
417   }    
418      
419   function i nsertActio n() {    
420       var in st = tinyM CE.getInst anceById(t inyMCE.get WindowArg( 'editor_id '));    
421       var el m = inst.g etFocusEle ment();    
422      
423       checkP refix(docu ment.forms [0].href);    
424      
425       elm =  tinyMCE.ge tParentEle ment(elm,  "a");    
426      
427       tinyMC EPopup.exe cCommand(" mceBeginUn doLevel");    
428      
429       // Cre ate new an chor eleme nts    
430       if (el m == null)  {    
431           if  (tinyMCE. isSafari)    
432                tinyMCEP opup.execC ommand("mc eInsertCon tent", fal se, '<a hr ef="#mce_t emp_url#"> ' + inst.s election.g etSelected HTML() + ' </a>');    
433           el se    
434                tinyMCEP opup.execC ommand("cr eatelink",  false, "# mce_temp_u rl#");    
435      
436           va r elementA rray = tin yMCE.getEl ementsByAt tributeVal ue(inst.ge tBody(), " a", "href" , "#mce_te mp_url#");    
437           fo r (var i=0 ; i<elemen tArray.len gth; i++)  {    
438                var elm  = elementA rray[i];    
439      
440                // Move  cursor to  end    
441                try {    
442                    tiny MCE.select edInstance .selection .collapse( false);    
443                } catch  (ex) {    
444                    // I gnore    
445                }    
446      
447                // Move  cursor beh ind the ne w anchor    
448                // Don't  remember  why this w as needed  so it's no w removed    
449                /*    
450                if (tiny MCE.isGeck o) {    
451                    var  sp = inst. getDoc().c reateTextN ode(" ");    
452      
453                    if ( elm.nextSi bling)    
454                         elm.parent Node.inser tBefore(sp , elm.next Sibling);    
455                    else    
456                         elm.parent Node.appen dChild(sp) ;    
457      
458                    // S et range a fter link    
459                    var  rng = inst .getDoc(). createRang e();    
460                    rng. setStartAf ter(elm);    
461                    rng. setEndAfte r(elm);    
462      
463                    // U pdate sele ction    
464                    var  sel = inst .getSel();    
465                    sel. removeAllR anges();    
466                    sel. addRange(r ng);    
467                }    
468                */    
469      
470                setAllAt tribs(elm) ;    
471           }    
472       } else    
473           se tAllAttrib s(elm);    
474      
475       tinyMC E._setEven tsEnabled( inst.getBo dy(), fals e);    
476       tinyMC EPopup.exe cCommand(" mceEndUndo Level");    
477       tinyMC EPopup.clo se();    
478   }    
479      
480   function s etAllAttri bs(elm) {    
481       var fo rmObj = do cument.for ms[0];    
482       var hr ef = formO bj.href.va lue;    
483       var ta rget = get SelectValu e(formObj,  'targetli st');    
484      
485       // Mak e anchors  absolute    
486       if (hr ef.charAt( 0) != '#')    
487           hr ef = conve rtURL(href , elm);    
488      
489       setAtt rib(elm, ' href', hre f);    
490       setAtt rib(elm, ' mce_href',  href);    
491       setAtt rib(elm, ' title');    
492       setAtt rib(elm, ' target', t arget == ' _self' ? ' ' : target );    
493       setAtt rib(elm, ' id');    
494       setAtt rib(elm, ' style');    
495       setAtt rib(elm, ' class', ge tSelectVal ue(formObj , 'classli st'));    
496       setAtt rib(elm, ' rel');    
497       setAtt rib(elm, ' rev');    
498       setAtt rib(elm, ' charset');    
499       setAtt rib(elm, ' hreflang') ;    
500       setAtt rib(elm, ' dir');    
501       setAtt rib(elm, ' lang');    
502       setAtt rib(elm, ' tabindex') ;    
503       setAtt rib(elm, ' accesskey' );    
504       setAtt rib(elm, ' type');    
505       setAtt rib(elm, ' onfocus');    
506       setAtt rib(elm, ' onblur');    
507       setAtt rib(elm, ' onclick');    
508       setAtt rib(elm, ' ondblclick ');    
509       setAtt rib(elm, ' onmousedow n');    
510       setAtt rib(elm, ' onmouseup' );    
511       setAtt rib(elm, ' onmouseove r');    
512       setAtt rib(elm, ' onmousemov e');    
513       setAtt rib(elm, ' onmouseout ');    
514       setAtt rib(elm, ' onkeypress ');    
515       setAtt rib(elm, ' onkeydown' );    
516       setAtt rib(elm, ' onkeyup');    
517      
518       // Ref resh in ol d MSIE    
519       if (ti nyMCE.isMS IE5)    
520           el m.outerHTM L = elm.ou terHTML;    
521   }    
522      
523   function g etSelectVa lue(form_o bj, field_ name) {    
524       var el m = form_o bj.element s[field_na me];    
525      
526       if (el m == null  || elm.opt ions == nu ll)    
527           re turn "";    
528      
529       return  elm.optio ns[elm.sel ectedIndex ].value;    
530   }    
531      
532   function g etLinkList HTML(elm_i d, target_ form_eleme nt, onchan ge_func) {    
533       if (ty peof(tinyM CELinkList ) == "unde fined" ||  tinyMCELin kList.leng th == 0)    
534           re turn "";    
535      
536       var ht ml = "";    
537      
538       html + = '<select  id="' + e lm_id + '"  name="' +  elm_id +  '"';    
539       html + = ' class= "mceLinkLi st" onfocu s="tinyMCE .addSelect Accessibil ity(event,  this, win dow);" onc hange="thi s.form.' +  target_fo rm_element  + '.value =';    
540       html + = 'this.op tions[this .selectedI ndex].valu e;';    
541      
542       if (ty peof(oncha nge_func)  != "undefi ned")    
543           ht ml += onch ange_func  + '(\'' +  target_for m_element  + '\',this .options[t his.select edIndex].t ext,this.o ptions[thi s.selected Index].val ue);';    
544      
545       html + = '"><opti on value=" ">---</opt ion>';    
546      
547       for (v ar i=0; i< tinyMCELin kList.leng th; i++)    
548           ht ml += '<op tion value ="' + tiny MCELinkLis t[i][1] +  '">' + tin yMCELinkLi st[i][0] +  '</option >';    
549      
550       html + = '</selec t>';    
551      
552       return  html;    
553      
554       // tin yMCE.debug ('-- image  list star t --', htm l, '-- ima ge list en d --');    
555   }    
556      
557   function g etTargetLi stHTML(elm _id, targe t_form_ele ment) {    
558       var ta rgets = ti nyMCE.getP aram('them e_advanced _link_targ ets', ''). split(';') ;    
559       var ht ml = '';    
560      
561       html + = '<select  id="' + e lm_id + '"  name="' +  elm_id +  '" onfocus ="tinyMCE. addSelectA ccessibili ty(event,  this, wind ow);" onch ange="this .form.' +  target_for m_element  + '.value= ';    
562       html + = 'this.op tions[this .selectedI ndex].valu e;">';    
563      
564       html + = '<option  value="_s elf">' + t inyMCE.get Lang('lang _advlink_t arget_same ') + '</op tion>';    
565       html + = '<option  value="_b lank">' +  tinyMCE.ge tLang('lan g_advlink_ target_bla nk') + ' ( _blank)</o ption>';    
566       html + = '<option  value="_p arent">' +  tinyMCE.g etLang('la ng_advlink _target_pa rent') + '  (_parent) </option>' ;    
567       html + = '<option  value="_t op">' + ti nyMCE.getL ang('lang_ advlink_ta rget_top')  + ' (_top )</option> ';    
568      
569       for (v ar i=0; i< targets.le ngth; i++)  {    
570           va r key, val ue;    
571      
572           if  (targets[ i] == "")    
573                continue ;    
574      
575           ke y = target s[i].split ('=')[0];    
576           va lue = targ ets[i].spl it('=')[1] ;    
577      
578           ht ml += '<op tion value ="' + key  + '">' + v alue + ' ( ' + key +  ')</option >';    
579       }    
580      
581       html + = '</selec t>';    
582      
583       return  html;    
584   }    
585      
586   // While l oading    
587   preinit();