651. File Comparison Report

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

651.1 Files compared

# Location File Last Modified
1 Dolphin-v.6.0.5\plugins\tiny_mce\themes\advanced editor_template.js Thu Sep 20 08:59:24 2007 UTC
2 Dolphin-v.6.1.0\plugins\tiny_mce\themes\advanced editor_template.js Thu Mar 27 13:53:28 2008 UTC

651.2 Comparison summary

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

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

651.4 Active regular expressions

No regular expressions were active.

651.5 Comparison detail

1   tinyMCE.im portThemeL anguagePac k('advance d');var Ti nyMCE_Adva ncedTheme= {_defColor s:"000000, 993300,333 300,003300 ,003366,00 0080,33339 9,333333,8 00000,FF66 00,808000, 008000,008 080,0000FF ,666699,80 8080,FF000 0,FF9900,9 9CC00,3399 66,33CCCC, 3366FF,800 080,999999 ,FF00FF,FF CC00,FFFF0 0,00FF00,0 0FFFF,00CC FF,993366, C0C0C0,FF9 9CC,FFCC99 ,FFFF99,CC FFCC,CCFFF F,99CCFF,C C99FF,FFFF FF",_autoI mportCSSCl asses:true ,_resizer: {},_button s:[['bold' ,'{$lang_b old_img}', 'lang_bold _desc','Bo ld'],['ita lic','{$la ng_italic_ img}','lan g_italic_d esc','Ital ic'],['und erline','{ $lang_unde rline_img} ','lang_un derline_de sc','Under line'],['s trikethrou gh','strik ethrough.g if','lang_ striketrou gh_desc',' Strikethro ugh'],['ju stifyleft' ,'justifyl eft.gif',' lang_justi fyleft_des c','Justif yLeft'],[' justifycen ter','just ifycenter. gif','lang _justifyce nter_desc' ,'JustifyC enter'],[' justifyrig ht','justi fyright.gi f','lang_j ustifyrigh t_desc','J ustifyRigh t'],['just ifyfull',' justifyful l.gif','la ng_justify full_desc' ,'JustifyF ull'],['bu llist','bu llist.gif' ,'lang_bul list_desc' ,'InsertUn orderedLis t'],['numl ist','numl ist.gif',' lang_numli st_desc',' InsertOrde redList'], ['outdent' ,'outdent. gif','lang _outdent_d esc','Outd ent'],['in dent','ind ent.gif',' lang_inden t_desc','I ndent'],[' cut','cut. gif','lang _cut_desc' ,'Cut'],[' copy','cop y.gif','la ng_copy_de sc','Copy' ],['paste' ,'paste.gi f','lang_p aste_desc' ,'Paste'], ['undo','u ndo.gif',' lang_undo_ desc','Und o'],['redo ','redo.gi f','lang_r edo_desc', 'Redo'],[' link','lin k.gif','la ng_link_de sc','mceLi nk',true], ['unlink', 'unlink.gi f','lang_u nlink_desc ','unlink' ],['image' ,'image.gi f','lang_i mage_desc' ,'mceImage ',true],[' cleanup',' cleanup.gi f','lang_c leanup_des c','mceCle anup'],['h elp','help .gif','lan g_help_des c','mceHel p'],['code ','code.gi f','lang_t heme_code_ desc','mce CodeEditor '],['hr',' hr.gif','l ang_theme_ hr_desc',' inserthori zontalrule '],['remov eformat',' removeform at.gif','l ang_theme_ removeform at_desc',' removeform at'],['sub ','sub.gif ','lang_th eme_sub_de sc','subsc ript'],['s up','sup.g if','lang_ theme_sup_ desc','sup erscript'] ,['forecol or','forec olor.gif', 'lang_them e_forecolo r_desc','f orecolor', true],['fo recolorpic ker','fore color.gif' ,'lang_the me_forecol or_desc',' forecolorp icker',tru e],['backc olor','bac kcolor.gif ','lang_th eme_backco lor_desc', 'HiliteCol or',true], ['backcolo rpicker',' backcolor. gif','lang _theme_bac kcolor_des c','backco lorpicker' ,true],['c harmap','c harmap.gif ','lang_th eme_charma p_desc','m ceCharMap' ],['visual aid','visu alaid.gif' ,'lang_the me_visuala id_desc',' mceToggleV isualAid'] ,['anchor' ,'anchor.g if','lang_ theme_anch or_desc',' mceInsertA nchor'],[' newdocumen t','newdoc ument.gif' ,'lang_new document_d esc','mceN ewDocument ']],_butto nMap:'anch or,backcol or,bold,bu llist,char map,cleanu p,code,cop y,cut,fore color,help ,hr,image, indent,ita lic,justif ycenter,ju stifyfull, justifylef t,justifyr ight,link, newdocumen t,numlist, outdent,pa ste,redo,r emoveforma t,striketh rough,sub, sup,underl ine,undo,u nlink,visu alaid,advh r,ltr,rtl, emotions,f lash,fullp age,fullsc reen,iespe ll,insertd ate,insert time,paste text,paste word,selec tall,previ ew,print,s ave,replac e,search,t able,cell_ props,dele te_col,del ete_row,co l_after,co l_before,r ow_after,r ow_before, merge_cell s,row_prop s,split_ce lls,delete _table',ge tControlHT ML:functio n(button_n ame){var i ,x,but;for (i=0;i<Tin yMCE_Advan cedTheme._ buttons.le ngth;i++){ but=TinyMC E_Advanced Theme._but tons[i];if (but[0]==b utton_name &&(button_ name=="for ecolor"||b utton_name =="backcol or"))retur n tinyMCE. getMenuBut tonHTML(bu t[0],but[2 ],'{$theme url}/image s/'+but[1] ,but[3]+"M enu",but[3 ],(but.len gth>4?but[ 4]:false), (but.lengt h>5?but[5] :null));if (but[0]==b utton_name )return ti nyMCE.getB uttonHTML( but[0],but [2],'{$the meurl}/ima ges/'+but[ 1],but[3], (but.lengt h>4?but[4] :false),(b ut.length> 5?but[5]:n ull))}swit ch(button_ name){case "formatsel ect":var h tml='<sele ct id="{$e ditor_id}_ formatSele ct" name=" {$editor_i d}_formatS elect" onf ocus="tiny MCE.addSel ectAccessi bility(eve nt, this,  window);"  onchange=" tinyMCE.ex ecInstance Command(\' {$editor_i d}\',\'For matBlock\' ,false,thi s.options[ this.selec tedIndex]. value);" c lass="mceS electList" >';var for mats=tinyM CE.getPara m("theme_a dvanced_bl ockformats ","p,addre ss,pre,h1, h2,h3,h4,h 5,h6",true ).split(', ');var loo kup=[['p', '{$lang_th eme_paragr aph}'],['a ddress','{ $lang_them e_address} '],['pre', '{$lang_th eme_pre}'] ,['h1','{$ lang_theme _h1}'],['h 2','{$lang _theme_h2} '],['h3',' {$lang_the me_h3}'],[ 'h4','{$la ng_theme_h 4}'],['h5' ,'{$lang_t heme_h5}'] ,['h6','{$ lang_theme _h6}'],['d iv','{$lan g_theme_di v}'],['blo ckquote',' {$lang_the me_blockqu ote}'],['c ode','{$la ng_theme_c ode}'],['d t','{$lang _theme_dt} '],['dd',' {$lang_the me_dd}'],[ 'samp','{$ lang_theme _samp}']]; html+='<op tion value ="">{$lang _theme_blo ck}</optio n>';for(va r i=0;i<fo rmats.leng th;i++){fo r(var x=0; x<lookup.l ength;x++) {if(format s[i]==look up[x][0])h tml+='<opt ion value= "&lt;'+loo kup[x][0]+ '&gt;">'+l ookup[x][1 ]+'</optio n>'}}html+ ='</select >';return  html;case" styleselec t":return' <select id ="{$editor _id}_style Select" on mousedown= "tinyMCE.t hemes.adva nced._setu pCSSClasse s(\'{$edit or_id}\'); " name="{$ editor_id} _styleSele ct" onfocu s="tinyMCE .addSelect Accessibil ity(event, this,windo w);" oncha nge="tinyM CE.execIns tanceComma nd(\'{$edi tor_id}\', \'mceSetCS SClass\',f alse,this. options[th is.selecte dIndex].va lue);" cla ss="mceSel ectList">{ $style_sel ect_option s}</select >';case"fo ntselect": var fontHT ML='<selec t id="{$ed itor_id}_f ontNameSel ect" name= "{$editor_ id}_fontNa meSelect"  onfocus="t inyMCE.add SelectAcce ssibility( event, thi s, window) ;" onchang e="tinyMCE .execInsta nceCommand (\'{$edito r_id}\',\' FontName\' ,false,thi s.options[ this.selec tedIndex]. value);" c lass="mceS electList" ><option v alue="">{$ lang_theme _fontdefau lt}</optio n>';var iF onts='Aria l=arial,he lvetica,sa ns-serif;C ourier New =courier n ew,courier ,monospace ;Georgia=g eorgia,tim es new rom an,times,s erif;Tahom a=tahoma,a rial,helve tica,sans- serif;Time s New Roma n=times ne w roman,ti mes,serif; Verdana=ve rdana,aria l,helvetic a,sans-ser if;Impact= impact;Win gDings=win gdings';va r nFonts=' Andale Mon o=andale m ono,times; Arial=aria l,helvetic a,sans-ser if;Arial B lack=arial  black,ava nt garde;B ook Antiqu a=book ant iqua,palat ino;Comic  Sans MS=co mic sans m s,sand;Cou rier New=c ourier new ,courier;G eorgia=geo rgia,palat ino;Helvet ica=helvet ica;Impact =impact,ch icago;Symb ol=symbol; Tahoma=tah oma,arial, helvetica, sans-serif ;Terminal= terminal,m onaco;Time s New Roma n=times ne w roman,ti mes;Trebuc het MS=tre buchet ms, geneva;Ver dana=verda na,geneva; Webdings=w ebdings;Wi ngdings=wi ngdings,za pf dingbat s';var fon ts=tinyMCE .getParam( "theme_adv anced_font s",nFonts) .split(';' );for(i=0; i<fonts.le ngth;i++){ if(fonts[i ]!=''){var  parts=fon ts[i].spli t('=');fon tHTML+='<o ption valu e="'+parts [1]+'">'+p arts[0]+'< /option>'} }fontHTML+ ='</select >';return  fontHTML;c ase"fontsi zeselect": return'<se lect id="{ $editor_id }_fontSize Select" na me="{$edit or_id}_fon tSizeSelec t" onfocus ="tinyMCE. addSelectA ccessibili ty(event,  this, wind ow);" onch ange="tiny MCE.execIn stanceComm and(\'{$ed itor_id}\' ,\'FontSiz e\',false, this.optio ns[this.se lectedInde x].value); " class="m ceSelectLi st">'+'<op tion value ="0">{$lan g_theme_fo nt_size}</ option>'+' <option va lue="1">1  (8 pt)</op tion>'+'<o ption valu e="2">2 (1 0 pt)</opt ion>'+'<op tion value ="3">3 (12  pt)</opti on>'+'<opt ion value= "4">4 (14  pt)</optio n>'+'<opti on value=" 5">5 (18 p t)</option >'+'<optio n value="6 ">6 (24 pt )</option> '+'<option  value="7" >7 (36 pt) </option>' +'</select >';case"|" :case"sepa rator":ret urn'<img s rc="{$them eurl}/imag es/separat or.gif" wi dth="2" he ight="20"  class="mce SeparatorL ine" alt=" " />';case "spacer":r eturn'<img  src="{$th emeurl}/im ages/separ ator.gif"  width="2"  height="15 " border=" 0" class=" mceSeparat orLine" st yle="verti cal-align:  middle" a lt="" />'; case"rowse parator":r eturn'<br  />'}return ""},execCo mmand:func tion(edito r_id,eleme nt,command ,user_inte rface,valu e){switch( command){c ase'mceHel p':tinyMCE .openWindo w({file:'a bout.htm', width:480, height:380 },{tinymce _version:t inyMCE.maj orVersion+ "."+tinyMC E.minorVer sion,tinym ce_release date:tinyM CE.release Date,inlin e:"yes"}); return tru e;case"mce Link":var  inst=tinyM CE.getInst anceById(e ditor_id); var doc=in st.getDoc( );var sele ctedText=" ";if(tinyM CE.isMSIE) {var rng=d oc.selecti on.createR ange();sel ectedText= rng.text}e lse select edText=ins t.getSel() .toString( );if(!tiny MCE.linkEl ement){if( (tinyMCE.s electedEle ment.nodeN ame.toLowe rCase()!=" img")&&(se lectedText .length<=0 ))return t rue}var hr ef="",targ et="",titl e="",oncli ck="",acti on="insert ",style_cl ass="";if( tinyMCE.se lectedElem ent.nodeNa me.toLower Case()=="a ")tinyMCE. linkElemen t=tinyMCE. selectedEl ement;if(t inyMCE.lin kElement!= null&&tiny MCE.getAtt rib(tinyMC E.linkElem ent,'href' )=="")tiny MCE.linkEl ement=null ;if(tinyMC E.linkElem ent){href= tinyMCE.ge tAttrib(ti nyMCE.link Element,'h ref');targ et=tinyMCE .getAttrib (tinyMCE.l inkElement ,'target') ;title=tin yMCE.getAt trib(tinyM CE.linkEle ment,'titl e');onclic k=tinyMCE. getAttrib( tinyMCE.li nkElement, 'onclick') ;style_cla ss=tinyMCE .getAttrib (tinyMCE.l inkElement ,'class'); if(onclick =="")oncli ck=tinyMCE .getAttrib (tinyMCE.l inkElement ,'onclick' );onclick= tinyMCE.cl eanupEvent Str(onclic k);href=ev al(tinyMCE .settings[ 'urlconver ter_callba ck']+"(hre f, tinyMCE .linkEleme nt, true); ");mceReal Href=tinyM CE.getAttr ib(tinyMCE .linkEleme nt,'mce_hr ef');if(mc eRealHref! =""){href= mceRealHre f;if(tinyM CE.getPara m('convert _urls'))hr ef=eval(ti nyMCE.sett ings['urlc onverter_c allback']+ "(href, ti nyMCE.link Element, t rue);")}ac tion="upda te"}var te mplate=new  Array();t emplate['f ile']='lin k.htm';tem plate['wid th']=310;t emplate['h eight']=20 0;template ['width']+ =tinyMCE.g etLang('la ng_insert_ link_delta _width',0) ;template[ 'height']+ =tinyMCE.g etLang('la ng_insert_ link_delta _height',0 );if(inst. settings[' insertlink _callback' ]){var ret urnVal=eva l(inst.set tings['ins ertlink_ca llback']+" (href, tar get, title , onclick,  action, s tyle_class );");if(re turnVal&&r eturnVal[' href'])Tin yMCE_Advan cedTheme._ insertLink (returnVal ['href'],r eturnVal[' target'],r eturnVal[' title'],re turnVal['o nclick'],r eturnVal[' style_clas s'])}else{ tinyMCE.op enWindow(t emplate,{h ref:href,t arget:targ et,title:t itle,oncli ck:onclick ,action:ac tion,class Name:style _class,inl ine:"yes"} )}return t rue;case"m ceImage":v ar src="", alt="",bor der="",hsp ace="",vsp ace="",wid th="",heig ht="",alig n="";var t itle="",on mouseover= "",onmouse out="",act ion="inser t";var img =tinyMCE.i mgElement; var inst=t inyMCE.get InstanceBy Id(editor_ id);if(tin yMCE.selec tedElement !=null&&ti nyMCE.sele ctedElemen t.nodeName .toLowerCa se()=="img "){img=tin yMCE.selec tedElement ;tinyMCE.i mgElement= img}if(img ){if(tinyM CE.getAttr ib(img,'na me').index Of('mce_') ==0)return  true;src= tinyMCE.ge tAttrib(im g,'src');a lt=tinyMCE .getAttrib (img,'alt' );if(alt== "")alt=tin yMCE.getAt trib(img,' title');if (tinyMCE.i sGecko){va r w=img.st yle.width; if(w!=null &&w!="")im g.setAttri bute("widt h",w);var  h=img.styl e.height;i f(h!=null& &h!="")img .setAttrib ute("heigh t",h)}bord er=tinyMCE .getAttrib (img,'bord er');hspac e=tinyMCE. getAttrib( img,'hspac e');vspace =tinyMCE.g etAttrib(i mg,'vspace ');width=t inyMCE.get Attrib(img ,'width'); height=tin yMCE.getAt trib(img,' height');a lign=tinyM CE.getAttr ib(img,'al ign');onmo useover=ti nyMCE.getA ttrib(img, 'onmouseov er');onmou seout=tiny MCE.getAtt rib(img,'o nmouseout' );title=ti nyMCE.getA ttrib(img, 'title');i f(tinyMCE. isMSIE){wi dth=img.at tributes[' width'].sp ecified?wi dth:"";hei ght=img.at tributes[' height'].s pecified?h eight:""}s rc=eval(ti nyMCE.sett ings['urlc onverter_c allback']+ "(src, img , true);") ;mceRealSr c=tinyMCE. getAttrib( img,'mce_s rc');if(mc eRealSrc!= ""){src=mc eRealSrc;i f(tinyMCE. getParam(' convert_ur ls'))src=e val(tinyMC E.settings ['urlconve rter_callb ack']+"(sr c, img, tr ue);")}act ion="updat e"}var tem plate=new  Array();te mplate['fi le']='imag e.htm?src= {$src}';te mplate['wi dth']=355; template[' height']=2 65+(tinyMC E.isMSIE?2 5:0);templ ate['width ']+=tinyMC E.getLang( 'lang_inse rt_image_d elta_width ',0);templ ate['heigh t']+=tinyM CE.getLang ('lang_ins ert_image_ delta_heig ht',0);if( inst.setti ngs['inser timage_cal lback']){v ar returnV al=eval(in st.setting s['inserti mage_callb ack']+"(sr c, alt, bo rder, hspa ce, vspace , width, h eight, ali gn, title,  onmouseov er, onmous eout, acti on);");if( returnVal& &returnVal ['src'])Ti nyMCE_Adva ncedTheme. _insertIma ge(returnV al['src'], returnVal[ 'alt'],ret urnVal['bo rder'],ret urnVal['hs pace'],ret urnVal['vs pace'],ret urnVal['wi dth'],retu rnVal['hei ght'],retu rnVal['ali gn'],retur nVal['titl e'],return Val['onmou seover'],r eturnVal[' onmouseout '])}else t inyMCE.ope nWindow(te mplate,{sr c:src,alt: alt,border :border,hs pace:hspac e,vspace:v space,widt h:width,he ight:heigh t,align:al ign,title: title,onmo useover:on mouseover, onmouseout :onmouseou t,action:a ction,inli ne:"yes"}) ;return tr ue;case"fo recolor":v ar fcp=new  TinyMCE_L ayer(edito r_id+'_fcP review',fa lse),p,img ,elm;TinyM CE_Advance dTheme._hi deMenus(ed itor_id);i f(!fcp.exi sts()){fcp .create('d iv','mceCo lorPreview ',document .getElemen tById(edit or_id+'_to olbar'));e lm=fcp.get Element(); elm._edito r_id=edito r_id;elm._ command="f orecolor"; elm._switc hId=editor _id+"_fore color";tin yMCE.addEv ent(elm,'c lick',Tiny MCE_Advanc edTheme._h andleMenuE vent);tiny MCE.addEve nt(elm,'mo useover',T inyMCE_Adv ancedTheme ._handleMe nuEvent);t inyMCE.add Event(elm, 'mouseout' ,TinyMCE_A dvancedThe me._handle MenuEvent) }img=tinyM CE.selectN odes(docum ent.getEle mentById(e ditor_id+" _forecolor "),functio n(n){retur n n.nodeNa me=="IMG"} )[0];p=tin yMCE.getAb sPosition( img,docume nt.getElem entById(ed itor_id+'_ toolbar')) ;fcp.moveT o(p.absLef t,p.absTop );fcp.getE lement().s tyle.backg roundColor =value!=nu ll?value:t inyMCE.get InstanceBy Id(editor_ id).foreCo lor;fcp.sh ow();retur n false;ca se"forecol orpicker": this._pick Color(edit or_id,'for ecolor');r eturn true ;case"fore colorMenu" :TinyMCE_A dvancedThe me._hideMe nus(editor _id);var m l=new Tiny MCE_Layer( editor_id+ '_fcMenu') ;if(!ml.ex ists())ml. create('di v','mceMen u',documen t.body,Tin yMCE_Advan cedTheme._ getColorHT ML(editor_ id,'theme_ advanced_t ext_colors ','forecol or'));tiny MCE.switch Class(edit or_id+'_fo recolor',' mceMenuBut tonFocus') ;ml.moveRe lativeTo(d ocument.ge tElementBy Id(editor_ id+"_forec olor"),'bl ');ml.move By(tinyMCE .isMSIE&&! tinyMCE.is Opera?-1:1 ,-1);if(ti nyMCE.isOp era)ml.mov eBy(0,-2); ml.show(); return tru e;case"Hil iteColor": var bcp=ne w TinyMCE_ Layer(edit or_id+'_bc Preview',f alse),p,im g;TinyMCE_ AdvancedTh eme._hideM enus(edito r_id);if(! bcp.exists ()){bcp.cr eate('div' ,'mceColor Preview',d ocument.ge tElementBy Id(editor_ id+'_toolb ar'));elm= bcp.getEle ment();elm ._editor_i d=editor_i d;elm._com mand="Hili teColor";e lm._switch Id=editor_ id+"_backc olor";tiny MCE.addEve nt(elm,'cl ick',TinyM CE_Advance dTheme._ha ndleMenuEv ent);tinyM CE.addEven t(elm,'mou seover',Ti nyMCE_Adva ncedTheme. _handleMen uEvent);ti nyMCE.addE vent(elm,' mouseout', TinyMCE_Ad vancedThem e._handleM enuEvent)} img=tinyMC E.selectNo des(docume nt.getElem entById(ed itor_id+"_ backcolor" ),function (n){return  n.nodeNam e=="IMG"}) [0];p=tiny MCE.getAbs Position(i mg,documen t.getEleme ntById(edi tor_id+'_t oolbar')); bcp.moveTo (p.absLeft ,p.absTop) ;bcp.getEl ement().st yle.backgr oundColor= value!=nul l?value:ti nyMCE.getI nstanceByI d(editor_i d).backCol or;bcp.sho w();return  false;cas e"HiliteCo lorMenu":T inyMCE_Adv ancedTheme ._hideMenu s(editor_i d);var ml= new TinyMC E_Layer(ed itor_id+'_ bcMenu');i f(!ml.exis ts())ml.cr eate('div' ,'mceMenu' ,document. body,TinyM CE_Advance dTheme._ge tColorHTML (editor_id ,'theme_ad vanced_bac kground_co lors','Hil iteColor') );tinyMCE. switchClas s(editor_i d+'_backco lor','mceM enuButtonF ocus');ml. moveRelati veTo(docum ent.getEle mentById(e ditor_id+" _backcolor "),'bl');m l.moveBy(t inyMCE.isM SIE&&!tiny MCE.isOper a?-1:1,-1) ;if(tinyMC E.isOpera) ml.moveBy( 0,-2);ml.s how();retu rn true;ca se"backcol orpicker": this._pick Color(edit or_id,'Hil iteColor') ;return tr ue;case"mc eColorPick er":if(use r_interfac e){var tem plate=[];i f(!value[' callback'] &&!value[' color'])va lue['color ']=value[' document'] .getElemen tById(valu e['element _id']).val ue;templat e['file']= 'color_pic ker.htm';t emplate['w idth']=380 ;template[ 'height']= 250;templa te['close_ previous'] ="no";temp late['widt h']+=tinyM CE.getLang ('lang_the me_advance d_colorpic ker_delta_ width',0); template[' height']+= tinyMCE.ge tLang('lan g_theme_ad vanced_col orpicker_d elta_heigh t',0);if(t ypeof(valu e['store_s election'] )=="undefi ned")value ['store_se lection']= true;tinyM CE.lastCol orPickerVa lue=value; tinyMCE.op enWindow(t emplate,{e ditor_id:e ditor_id,m ce_store_s election:v alue['stor e_selectio n'],inline :"yes",com mand:"mceC olorPicker ",input_co lor:value[ 'color']}) }else{var  savedVal=t inyMCE.las tColorPick erValue,el m;if(saved Val['callb ack']){sav edVal['cal lback'](va lue);retur n true}elm =savedVal[ 'document' ].getEleme ntById(sav edVal['ele ment_id']) ;elm.value =value;if( elm.onchan ge!=null&& elm.onchan ge!='')eva l('elm.onc hange();') }return tr ue;case"mc eCodeEdito r":var tem plate=new  Array();te mplate['fi le']='sour ce_editor. htm';templ ate['width ']=parseIn t(tinyMCE. getParam(" theme_adva nced_sourc e_editor_w idth",720) );template ['height'] =parseInt( tinyMCE.ge tParam("th eme_advanc ed_source_ editor_hei ght",580)) ;tinyMCE.o penWindow( template,{ editor_id: editor_id, resizable: "yes",scro llbars:"no ",inline:" yes"});ret urn true;c ase"mceCha rMap":var  template=n ew Array() ;template[ 'file']='c harmap.htm ';template ['width']= 550+(tinyM CE.isOpera ?40:0);tem plate['hei ght']=250; template[' width']+=t inyMCE.get Lang('lang _theme_adv anced_char map_delta_ width',0); template[' height']+= tinyMCE.ge tLang('lan g_theme_ad vanced_cha rmap_delta _height',0 );tinyMCE. openWindow (template, {editor_id :editor_id ,inline:"y es"});retu rn true;ca se"mceInse rtAnchor": var templa te=new Arr ay();templ ate['file' ]='anchor. htm';templ ate['width ']=320;tem plate['hei ght']=90+( tinyMCE.is NS7?30:0); template[' width']+=t inyMCE.get Lang('lang _theme_adv anced_anch or_delta_w idth',0);t emplate['h eight']+=t inyMCE.get Lang('lang _theme_adv anced_anch or_delta_h eight',0); tinyMCE.op enWindow(t emplate,{e ditor_id:e ditor_id,i nline:"yes "});return  true;case "mceNewDoc ument":if( confirm(ti nyMCE.getL ang('lang_ newdocumen t')))tinyM CE.execIns tanceComma nd(editor_ id,'mceSet Content',f alse,' '); return tru e}return f alse},getE ditorTempl ate:functi on(setting s,editorId ){function  removeFro mArray(in_ array,remo ve_array){ var outArr ay=new Arr ay(),skip; for(var i= 0;i<in_arr ay.length; i++){skip= false;for( var j=0;j< remove_arr ay.length; j++){if(in _array[i]= =remove_ar ray[j]){sk ip=true}}i f(!skip){o utArray[ou tArray.len gth]=in_ar ray[i]}}re turn outAr ray}functi on addToAr ray(in_arr ay,add_arr ay){for(va r i=0;i<ad d_array.le ngth;i++){ in_array[i n_array.le ngth]=add_ array[i]}r eturn in_a rray}var t emplate=ne w Array(); var deltaH eight=0;va r resizing =tinyMCE.g etParam("t heme_advan ced_resizi ng",false) ;var path= tinyMCE.ge tParam("th eme_advanc ed_path",t rue);var s tatusbarHT ML='<div i d="{$edito r_id}_path " class="m ceStatusba rPathText"  style="di splay: '+( path?"bloc k":"none") +'">&#160; </div><div  id="{$edi tor_id}_re size" clas s="mceStat usbarResiz e" style=" display: ' +(resizing ?"block":" none")+'"  onmousedow n="tinyMCE .themes.ad vanced._se tResizing( event,\'{$ editor_id} \',true);" ></div><br  style="cl ear: both"  />';var l ayoutManag er=tinyMCE .getParam( "theme_adv anced_layo ut_manager ","SimpleL ayout");va r styleSel ectHTML='< option val ue="">{$la ng_theme_s tyle_selec t}</option >';if(sett ings['them e_advanced _styles']) {var style sAr=settin gs['theme_ advanced_s tyles'].sp lit(';');f or(var i=0 ;i<stylesA r.length;i ++){var ke y,value;ke y=stylesAr [i].split( '=')[0];va lue=styles Ar[i].spli t('=')[1]; styleSelec tHTML+='<o ption valu e="'+value +'">'+key+ '</option> '}TinyMCE_ AdvancedTh eme._autoI mportCSSCl asses=fals e}switch(l ayoutManag er){case"S impleLayou t":var too lbarHTML=" ";var tool barLocatio n=tinyMCE. getParam(" theme_adva nced_toolb ar_locatio n","bottom ");var too lbarAlign= tinyMCE.ge tParam("th eme_advanc ed_toolbar _align","c enter");va r pathLoca tion=tinyM CE.getPara m("theme_a dvanced_pa th_locatio n","none") ;var statu sbarLocati on=tinyMCE .getParam( "theme_adv anced_stat usbar_loca tion",path Location); var defVal s={theme_a dvanced_bu ttons1:"bo ld,italic, underline, strikethro ugh,separa tor,justif yleft,just ifycenter, justifyrig ht,justify full,separ ator,style select,for matselect" ,theme_adv anced_butt ons2:"bull ist,numlis t,separato r,outdent, indent,sep arator,und o,redo,sep arator,lin k,unlink,a nchor,imag e,cleanup, help,code" ,theme_adv anced_butt ons3:"hr,r emoveforma t,visualai d,separato r,sub,sup, separator, charmap"}; toolbarHTM L+='<a hre f="#" acce sskey="q"  title="'+t inyMCE.get Lang("lang _toolbar_f ocus")+'"' ;if(!tinyM CE.getPara m("accessi bility_foc us"))toolb arHTML+='  onfocus="t inyMCE.get InstanceBy Id(\''+edi torId+'\') .getWin(). focus();"' ;toolbarHT ML+='></a> ';for(var  i=1;i<100; i++){var d ef=defVals ["theme_ad vanced_but tons"+i];v ar buttons =tinyMCE.g etParam("t heme_advan ced_button s"+i,def== null?'':de f,true,',' );if(butto ns.length= =0)break;b uttons=rem oveFromArr ay(buttons ,tinyMCE.g etParam("t heme_advan ced_disabl e","",true ,','));but tons=addTo Array(butt ons,tinyMC E.getParam ("theme_ad vanced_but tons"+i+"_ add","",tr ue,','));b uttons=add ToArray(ti nyMCE.getP aram("them e_advanced _buttons"+ i+"_add_be fore","",t rue,','),b uttons);fo r(var b=0; b<buttons. length;b++ )toolbarHT ML+=tinyMC E.getContr olHTML(but tons[b]);i f(buttons. length>0){ toolbarHTM L+="<br /> ";deltaHei ght-=23}}t oolbarHTML +='<a href ="#" acces skey="z" o nfocus="ti nyMCE.getI nstanceByI d(\''+edit orId+'\'). getWin().f ocus();">< /a>';templ ate['html' ]='<table  class="mce Editor" bo rder="0" c ellpadding ="0" cells pacing="0"  width="{$ width}" he ight="{$he ight}" sty le="width: {$width_st yle};heigh t:{$height _style}">< tbody>';if (toolbarLo cation=="t op")templa te['html'] +='<tr><td  dir="ltr"  class="mc eToolbarTo p" align=" '+toolbarA lign+'" he ight="1" n owrap="now rap"><span  id="'+edi torId+'_to olbar" cla ss="mceToo lbarContai ner">'+too lbarHTML+' </span></t d></tr>';i f(statusba rLocation= ="top"){te mplate['ht ml']+='<tr ><td class ="mceStatu sbarTop" h eight="1"> '+statusba rHTML+'</t d></tr>';d eltaHeight -=23}templ ate['html' ]+='<tr><t d align="c enter"><sp an id="{$e ditor_id}" ></span></ td></tr>'; if(toolbar Location== "bottom")t emplate['h tml']+='<t r><td dir= "ltr" clas s="mceTool barBottom"  align="'+ toolbarAli gn+'" heig ht="1"><sp an id="'+e ditorId+'_ toolbar" c lass="mceT oolbarCont ainer">'+t oolbarHTML +'</span>< /td></tr>' ;if(toolba rLocation= ="external "){var bod =document. body;var e lm=documen t.createEl ement("div ");toolbar HTML=tinyM CE.replace Var(toolba rHTML,'sty le_select_ options',s tyleSelect HTML);tool barHTML=ti nyMCE.appl yTemplate( toolbarHTM L,{editor_ id:editorI d});elm.cl assName="m ceToolbarE xternal";e lm.id=edit orId+"_too lbar";elm. innerHTML= '<table wi dth="100%"  border="0 " align="c enter"><tr ><td align ="center"> '+toolbarH TML+'</td> </tr></tab le>';bod.a ppendChild (elm);delt aHeight=0; tinyMCE.ge tInstanceB yId(editor Id).toolba rElement=e lm;}else{t inyMCE.get InstanceBy Id(editorI d).toolbar Element=nu ll}if(stat usbarLocat ion=="bott om"){templ ate['html' ]+='<tr><t d class="m ceStatusba rBottom" h eight="1"> '+statusba rHTML+'</t d></tr>';d eltaHeight -=23}templ ate['html' ]+='</tbod y></table> ';break;ca se"RowLayo ut":templa te['html'] ='<table c lass="mceE ditor" bor der="0" ce llpadding= "0" cellsp acing="0"  width="{$w idth}" hei ght="{$hei ght}" styl e="width:{ $width}px; height:{$h eight}px"> <tbody>';v ar contain ers=tinyMC E.getParam ("theme_ad vanced_con tainers"," ",true,"," );var defa ultContain erCSS=tiny MCE.getPar am("theme_ advanced_c ontainers_ default_cl ass","cont ainer");va r defaultC ontainerAl ign=tinyMC E.getParam ("theme_ad vanced_con tainers_de fault_alig n","center ");for(var  i=0;i<con tainers.le ngth;i++){ if(contain ers[i]=="m ceEditor") template[' html']+='< tr><td ali gn="center " class="m ceEditor_b order"><sp an id="{$e ditor_id}" ></span></ td></tr>'; else if(co ntainers[i ]=="mceEle mentpath"| |container s[i]=="mce Statusbar" ){var path Class="mce Statusbar" ;if(i==con tainers.le ngth-1){pa thClass="m ceStatusba rBottom"}e lse if(i== 0){pathCla ss="mceSta tusbar"}el se{deltaHe ight-=2}te mplate['ht ml']+='<tr ><td class ="'+pathCl ass+'" hei ght="1">'+ statusbarH TML+'</td> </tr>';del taHeight-= 22}else{va r curConta iner=tinyM CE.getPara m("theme_a dvanced_co ntainer_"+ containers [i],"",tru e,',');var  curContai nerHTML="" ;var curAl ign=tinyMC E.getParam ("theme_ad vanced_con tainer_"+c ontainers[ i]+"_align ",defaultC ontainerAl ign);var c urCSS=tiny MCE.getPar am("theme_ advanced_c ontainer_" +container s[i]+"_cla ss",defaul tContainer CSS);curCo ntainer=re moveFromAr ray(curCon tainer,tin yMCE.getPa ram("theme _advanced_ disable"," ",true,',' ));for(var  j=0;j<cur Container. length;j++ )curContai nerHTML+=t inyMCE.get ControlHTM L(curConta iner[j]);i f(curConta iner.lengt h>0){curCo ntainerHTM L+="<br /> ";deltaHei ght-=23}te mplate['ht ml']+='<tr ><td class ="'+curCSS +'" align= "'+curAlig n+'" heigh t="1">'+cu rContainer HTML+'</td ></tr>'}}t emplate['h tml']+='</ tbody></ta ble>';brea k;case"Cus tomLayout" :var custo mLayout=ti nyMCE.getP aram("them e_advanced _custom_la yout",""); if(customL ayout!=""& &eval("typ eof("+cust omLayout+" )")!="unde fined"){te mplate=eva l(customLa yout+"(tem plate);")} break}if(r esizing)te mplate['ht ml']+='<sp an id="{$e ditor_id}_ resize_box " class="m ceResizeBo x"></span> ';template ['html']=t inyMCE.rep laceVar(te mplate['ht ml'],'styl e_select_o ptions',st yleSelectH TML);if(!t emplate['d elta_width '])templat e['delta_w idth']=0;i f(!templat e['delta_h eight'])te mplate['de lta_height ']=deltaHe ight;retur n template },initInst ance:funct ion(inst){ if(tinyMCE .getParam( "theme_adv anced_resi zing",fals e)){if(tin yMCE.getPa ram("theme _advanced_ resizing_u se_cookie" ,true)){va r w=TinyMC E_Advanced Theme._get Cookie("Ti nyMCE_"+in st.editorI d+"_width" );var h=Ti nyMCE_Adva ncedTheme. _getCookie ("TinyMCE_ "+inst.edi torId+"_he ight");Tin yMCE_Advan cedTheme._ resizeTo(i nst,w,h,ti nyMCE.getP aram("them e_advanced _resize_ho rizontal", true))}}in st.addShor tcut('ctrl ','k','lan g_link_des c','mceLin k')},remov eInstance: function(i nst){new T inyMCE_Lay er(inst.ed itorId+'_f cMenu').re move();new  TinyMCE_L ayer(inst. editorId+' _bcMenu'). remove()}, hideInstan ce:functio n(inst){Ti nyMCE_Adva ncedTheme. _hideMenus (inst.edit orId)},_ha ndleMenuEv ent:functi on(e){var  te=tinyMCE .isMSIE?wi ndow.event .srcElemen t:e.target ;tinyMCE._ menuButton Event(e.ty pe=="mouse over"?"ove r":"out",d ocument.ge tElementBy Id(te._swi tchId));if (e.type==" click")tin yMCE.execI nstanceCom mand(te._e ditor_id,t e._command )},_hideMe nus:functi on(id){var  fcml=new  TinyMCE_La yer(id+'_f cMenu'),bc ml=new Tin yMCE_Layer (id+'_bcMe nu');if(fc ml.exists( )&&fcml.is Visible()) {tinyMCE.s witchClass (id+'_fore color','mc eMenuButto n');fcml.h ide()}if(b cml.exists ()&&bcml.i sVisible() ){tinyMCE. switchClas s(id+'_bac kcolor','m ceMenuButt on');bcml. hide()}},h andleNodeC hange:func tion(edito r_id,node, undo_index ,undo_leve ls,visual_ aid,any_se lection,se tup_conten t){var ali gnNode,bre akOut,clas sNode;func tion selec tByValue(s elect_elm, value,firs t_index){f irst_index =typeof(fi rst_index) =="undefin ed"?false: true;if(se lect_elm){ for(var i= 0;i<select _elm.optio ns.length; i++){var o v=""+selec t_elm.opti ons[i].val ue;if(firs t_index&&o v.toLowerC ase().inde xOf(value. toLowerCas e())==0){s elect_elm. selectedIn dex=i;retu rn true}if (ov==value ){select_e lm.selecte dIndex=i;r eturn true }}}return  false};if( node==null )return;va r pathElm= document.g etElementB yId(editor _id+"_path ");var ins t=tinyMCE. getInstanc eById(edit or_id);var  doc=inst. getDoc();T inyMCE_Adv ancedTheme ._hideMenu s(editor_i d);if(path Elm){var p arentNode= node;var p ath=new Ar ray();whil e(parentNo de!=null){ if(parentN ode.nodeNa me.toUpper Case()=="B ODY"){brea k}if(paren tNode.node Type==1&&t inyMCE.get Attrib(par entNode,"c lass").ind exOf('mceI temHidden' )==-1){pat h[path.len gth]=paren tNode}pare ntNode=par entNode.pa rentNode}v ar html="" ;for(var i =path.leng th-1;i>=0; i--){var n odeName=pa th[i].node Name.toLow erCase();v ar nodeDat a="";if(no deName.ind exOf("html :")==0)nod eName=node Name.subst ring(5);if (nodeName= ="b"){node Name="stro ng"}if(nod eName=="i" ){nodeName ="em"}if(n odeName==" span"){var  cn=tinyMC E.getAttri b(path[i], "class");i f(cn!=""&& cn.indexOf ('mceItem' )==-1)node Data+="cla ss: "+cn+"  ";var st= tinyMCE.ge tAttrib(pa th[i],"sty le");if(st !=""){st=t inyMCE.ser ializeStyl e(tinyMCE. parseStyle (st));node Data+="sty le: "+tiny MCE.xmlEnc ode(st)+"  "}}if(node Name=="fon t"){if(tin yMCE.getPa ram("conve rt_fonts_t o_spans")) nodeName=" span";var  face=tinyM CE.getAttr ib(path[i] ,"face");i f(face!="" )nodeData+ ="font: "+ tinyMCE.xm lEncode(fa ce)+" ";va r size=tin yMCE.getAt trib(path[ i],"size") ;if(size!= "")nodeDat a+="size:  "+tinyMCE. xmlEncode( size)+" "; var color= tinyMCE.ge tAttrib(pa th[i],"col or");if(co lor!="")no deData+="c olor: "+ti nyMCE.xmlE ncode(colo r)+" "}if( tinyMCE.ge tAttrib(pa th[i],'id' )!=""){nod eData+="id : "+path[i ].getAttri bute('id') +" "}var c lassName=t inyMCE.get VisualAidC lass(tinyM CE.getAttr ib(path[i] ,"class"), false);if( className! =""&&class Name.index Of('mceIte m')==-1)no deData+="c lass: "+cl assName+"  ";if(tinyM CE.getAttr ib(path[i] ,'src')!=" "){var src =tinyMCE.g etAttrib(p ath[i],"mc e_src");if (src=="")s rc=tinyMCE .getAttrib (path[i]," src");node Data+="src : "+tinyMC E.xmlEncod e(src)+" " }if(path[i ].nodeName =='A'&&tin yMCE.getAt trib(path[ i],'href') !=""){var  href=tinyM CE.getAttr ib(path[i] ,"mce_href ");if(href =="")href= tinyMCE.ge tAttrib(pa th[i],"hre f");nodeDa ta+="href:  "+tinyMCE .xmlEncode (href)+" " }className =tinyMCE.g etAttrib(p ath[i],"cl ass");if(( nodeName== "img"||nod eName=="sp an")&&clas sName.inde xOf('mceIt em')!=-1){ nodeName=c lassName.r eplace(/mc eItem([a-z ]+)/gi,'$1 ').toLower Case();nod eData=path [i].getAtt ribute('ti tle')}if(n odeName==" a"&&(ancho r=tinyMCE. getAttrib( path[i],"n ame"))!="" ){nodeName ="a";nodeN ame+="#"+t inyMCE.xml Encode(anc hor);nodeD ata=""}if( tinyMCE.ge tAttrib(pa th[i],'nam e').indexO f("mce_")! =0){var cl assName=ti nyMCE.getV isualAidCl ass(tinyMC E.getAttri b(path[i], "class"),f alse);if(c lassName!= ""&&classN ame.indexO f('mceItem ')==-1){no deName+=". "+classNam e}}var cmd ='tinyMCE. execInstan ceCommand( \''+editor _id+'\',\' mceSelectN odeDepth\' ,false,\'' +i+'\');'; html+='<a  title="'+n odeData+'"  href="jav ascript:'+ cmd+'" onc lick="'+cm d+'return  false;" on mousedown= "return fa lse;" targ et="_self"  class="mc ePathItem" >'+nodeNam e+'</a>';i f(i>0){htm l+=" &raqu o; "}}path Elm.innerH TML='<a hr ef="#" acc esskey="x" ></a>'+tin yMCE.getLa ng('lang_t heme_path' )+": "+htm l+'&#160;' }tinyMCE.s witchClass (editor_id +'_justify left','mce ButtonNorm al');tinyM CE.switchC lass(edito r_id+'_jus tifyright' ,'mceButto nNormal'); tinyMCE.sw itchClass( editor_id+ '_justifyc enter','mc eButtonNor mal');tiny MCE.switch Class(edit or_id+'_ju stifyfull' ,'mceButto nNormal'); tinyMCE.sw itchClass( editor_id+ '_bold','m ceButtonNo rmal');tin yMCE.switc hClass(edi tor_id+'_i talic','mc eButtonNor mal');tiny MCE.switch Class(edit or_id+'_un derline',' mceButtonN ormal');ti nyMCE.swit chClass(ed itor_id+'_ strikethro ugh','mceB uttonNorma l');tinyMC E.switchCl ass(editor _id+'_bull ist','mceB uttonNorma l');tinyMC E.switchCl ass(editor _id+'_numl ist','mceB uttonNorma l');tinyMC E.switchCl ass(editor _id+'_sub' ,'mceButto nNormal'); tinyMCE.sw itchClass( editor_id+ '_sup','mc eButtonNor mal');tiny MCE.switch Class(edit or_id+'_an chor','mce ButtonNorm al');tinyM CE.switchC lass(edito r_id+'_lin k','mceBut tonDisable d');tinyMC E.switchCl ass(editor _id+'_unli nk','mceBu ttonDisabl ed');tinyM CE.switchC lass(edito r_id+'_out dent','mce ButtonDisa bled');tin yMCE.switc hClass(edi tor_id+'_i mage','mce ButtonNorm al');tinyM CE.switchC lass(edito r_id+'_hr' ,'mceButto nNormal'); if(node.no deName=="A "&&tinyMCE .getAttrib (node,"cla ss").index Of('mceIte mAnchor')! =-1)tinyMC E.switchCl ass(editor _id+'_anch or','mceBu ttonSelect ed');var a nchorLink= tinyMCE.ge tParentEle ment(node, "a","href" );if(ancho rLink||any _selection ){tinyMCE. switchClas s(editor_i d+'_link', anchorLink ?'mceButto nSelected' :'mceButto nNormal'); tinyMCE.sw itchClass( editor_id+ '_unlink', anchorLink ?'mceButto nSelected' :'mceButto nNormal')} tinyMCE.sw itchClass( editor_id+ '_visualai d',visual_ aid?'mceBu ttonSelect ed':'mceBu ttonNormal ');if(undo _levels!=- 1){tinyMCE .switchCla ss(editor_ id+'_undo' ,'mceButto nDisabled' );tinyMCE. switchClas s(editor_i d+'_redo', 'mceButton Disabled') }if(tinyMC E.getParen tElement(n ode,"li,bl ockquote") )tinyMCE.s witchClass (editor_id +'_outdent ','mceButt onNormal') ;if(undo_i ndex!=-1&& (undo_inde x<undo_lev els-1&&und o_levels>0 ))tinyMCE. switchClas s(editor_i d+'_redo', 'mceButton Normal');i f(undo_ind ex!=-1&&(u ndo_index> 0&&undo_le vels>0))ti nyMCE.swit chClass(ed itor_id+'_ undo','mce ButtonNorm al');var s electElm=d ocument.ge tElementBy Id(editor_ id+"_style Select");i f(selectEl m){TinyMCE _AdvancedT heme._setu pCSSClasse s(editor_i d);classNo de=node;br eakOut=fal se;var ind ex=0;do{if (classNode &&classNod e.classNam e){for(var  i=0;i<sel ectElm.opt ions.lengt h;i++){if( selectElm. options[i] .value==cl assNode.cl assName){i ndex=i;bre akOut=true ;break}}}} while(!bre akOut&&cla ssNode!=nu ll&&(class Node=class Node.paren tNode)!=nu ll);select Elm.select edIndex=in dex}var se lectElm=do cument.get ElementByI d(editor_i d+"_format Select");i f(selectEl m){var elm =tinyMCE.g etParentEl ement(node ,"p,div,h1 ,h2,h3,h4, h5,h6,pre, address"); if(elm)sel ectByValue (selectElm ,"<"+elm.n odeName.to LowerCase( )+">");els e selectBy Value(sele ctElm,"")} var select Elm=docume nt.getElem entById(ed itor_id+"_ fontNameSe lect");if( selectElm) {if(!tinyM CE.isSafar i&&!(tinyM CE.isMSIE& &!tinyMCE. isOpera)){ var face=i nst.queryC ommandValu e('FontNam e');face=f ace==null| |face==""? "":face;se lectByValu e(selectEl m,face,fac e!="")}els e{var elm= tinyMCE.ge tParentEle ment(node, "font","fa ce");if(el m){var fam ily=tinyMC E.getAttri b(elm,"fac e");if(fam ily=='')fa mily=''+el m.style.fo ntFamily;i f(!selectB yValue(sel ectElm,fam ily,family !=""))sele ctByValue( selectElm, "")}else s electByVal ue(selectE lm,"")}}va r selectEl m=document .getElemen tById(edit or_id+"_fo ntSizeSele ct");if(se lectElm){i f(!tinyMCE .isSafari& &!tinyMCE. isOpera){v ar size=in st.queryCo mmandValue ('FontSize ');selectB yValue(sel ectElm,siz e==null||s ize==""?"0 ":size)}el se{var elm =tinyMCE.g etParentEl ement(node ,"font","s ize");if(e lm){var si ze=tinyMCE .getAttrib (elm,"size ");if(size ==''){var  sizes=new  Array('',' 8px','10px ','12px',' 14px','18p x','24px', '36px');si ze=''+elm. style.font Size;for(v ar i=0;i<s izes.lengt h;i++){if( (''+sizes[ i])==size) {size=i;br eak}}}if(! selectByVa lue(select Elm,size)) selectByVa lue(select Elm,"")}el se selectB yValue(sel ectElm,"0" )}}alignNo de=node;br eakOut=fal se;do{if(! alignNode. getAttribu te||!align Node.getAt tribute('a lign'))con tinue;swit ch(alignNo de.getAttr ibute('ali gn').toLow erCase()){ case"left" :tinyMCE.s witchClass (editor_id +'_justify left','mce ButtonSele cted');bre akOut=true ;break;cas e"right":t inyMCE.swi tchClass(e ditor_id+' _justifyri ght','mceB uttonSelec ted');brea kOut=true; break;case "middle":c ase"center ":tinyMCE. switchClas s(editor_i d+'_justif ycenter',' mceButtonS elected'); breakOut=t rue;break; case"justi fy":tinyMC E.switchCl ass(editor _id+'_just ifyfull',' mceButtonS elected'); breakOut=t rue;break} }while(!br eakOut&&(a lignNode=a lignNode.p arentNode) !=null);va r div=tiny MCE.getPar entElement (node,"div ");if(div& &div.style .textAlign =="center" )tinyMCE.s witchClass (editor_id +'_justify center','m ceButtonSe lected');i f(!setup_c ontent){va r ar=new A rray("Bold ","_bold", "Italic"," _italic"," Strikethro ugh","_str ikethrough ","supersc ript","_su p","subscr ipt","_sub ");for(var  i=0;i<ar. length;i+= 2){if(inst .queryComm andState(a r[i]))tiny MCE.switch Class(edit or_id+ar[i +1],'mceBu ttonSelect ed')}if(in st.queryCo mmandState ("Underlin e")&&(node .parentNod e==null||n ode.parent Node.nodeN ame!="A")) tinyMCE.sw itchClass( editor_id+ '_underlin e','mceBut tonSelecte d')}do{swi tch(node.n odeName){c ase"UL":ti nyMCE.swit chClass(ed itor_id+'_ bullist',' mceButtonS elected'); break;case "OL":tinyM CE.switchC lass(edito r_id+'_num list','mce ButtonSele cted');bre ak;case"HR ":tinyMCE. switchClas s(editor_i d+'_hr','m ceButtonSe lected');b reak;case" IMG":if(ti nyMCE.getA ttrib(node ,'name').i ndexOf('mc e_')!=0&&t inyMCE.get Attrib(nod e,'class') .indexOf(' mceItem')= =-1){tinyM CE.switchC lass(edito r_id+'_ima ge','mceBu ttonSelect ed')}break }}while((n ode=node.p arentNode) !=null)},_ setupCSSCl asses:func tion(edito r_id){var  i,selectEl m;if(!Tiny MCE_Advanc edTheme._a utoImportC SSClasses) return;sel ectElm=doc ument.getE lementById (editor_id +'_styleSe lect');if( selectElm& &selectElm .getAttrib ute('cssIm ported')!= 'true'){va r csses=ti nyMCE.getC SSClasses( editor_id) ;if(csses& &selectElm ){for(i=0; i<csses.le ngth;i++)s electElm.o ptions[sel ectElm.opt ions.lengt h]=new Opt ion(csses[ i],csses[i ])}if(csse s!=null&&c sses.lengt h>0)select Elm.setAtt ribute('cs sImported' ,'true')}} ,_setCooki e:function (name,valu e,expires, path,domai n,secure){ var curCoo kie=name+" ="+escape( value)+((e xpires)?";  expires=" +expires.t oGMTString ():"")+((p ath)?"; pa th="+escap e(path):"" )+((domain )?"; domai n="+domain :"")+((sec ure)?"; se cure":""); document.c ookie=curC ookie},_ge tCookie:fu nction(nam e){var dc= document.c ookie;var  prefix=nam e+"=";var  begin=dc.i ndexOf(";  "+prefix); if(begin== -1){begin= dc.indexOf (prefix);i f(begin!=0 )return nu ll}else be gin+=2;var  end=docum ent.cookie .indexOf(" ;",begin); if(end==-1 )end=dc.le ngth;retur n unescape (dc.substr ing(begin+ prefix.len gth,end))} ,_resizeTo :function( inst,w,h,s et_w){var  editorCont ainer=docu ment.getEl ementById( inst.edito rId+'_pare nt');var t ableElm=ed itorContai ner.firstC hild;var i frame=inst .iframeEle ment;if(w= =null||w== "null"){se t_w=false; w=0}if(h== null||h==" null")retu rn;w=parse Int(w);h=p arseInt(h) ;if(tinyMC E.isGecko) {w+=2;h+=2 }var dx=w- tableElm.c lientWidth ;var dy=h- tableElm.c lientHeigh t;w=w<1?30 :w;h=h<1?3 0:h;if(set _w)tableEl m.style.wi dth=w+"px" ;tableElm. style.heig ht=h+"px"; iw=iframe. clientWidt h+dx;ih=if rame.clien tHeight+dy ;iw=iw<1?3 0:iw;ih=ih <1?30:ih;i f(tinyMCE. isGecko){i w-=2;ih-=2 }if(set_w) iframe.sty le.width=i w+"px";ifr ame.style. height=ih+ "px";if(se t_w){var t ableBodyEl m=tableElm .firstChil d;var minI frameWidth =tableBody Elm.scroll Width;if(i nst.iframe Element.cl ientWidth< minIframeW idth){dx=m inIframeWi dth-inst.i frameEleme nt.clientW idth;inst. iframeElem ent.style. width=(iw+ dx)+"px"}} inst.useCS S=false},_ resizeEven tHandler:f unction(e) {var resiz er=TinyMCE _AdvancedT heme._resi zer;if(!re sizer.resi zing)retur n;e=typeof (e)=="unde fined"?win dow.event: e;var dx=e .screenX-r esizer.dow nX;var dy= e.screenY- resizer.do wnY;var re sizeBox=re sizer.resi zeBox;var  editorId=r esizer.edi torId;swit ch(e.type) {case"mous emove":var  w,h;w=res izer.width +dx;h=resi zer.height +dy;w=w<1? 1:w;h=h<1? 1:h;if(res izer.horiz ontal)resi zeBox.styl e.width=w+ "px";resiz eBox.style .height=h+ "px";break ;case"mous eup":TinyM CE_Advance dTheme._se tResizing( e,editorId ,false);Ti nyMCE_Adva ncedTheme. _resizeTo( tinyMCE.ge tInstanceB yId(editor Id),resize r.width+dx ,resizer.h eight+dy,r esizer.hor izontal);i f(tinyMCE. getParam(" theme_adva nced_resiz ing_use_co okie",true )){var exp ires=new D ate();expi res.setTim e(expires. getTime()+ 3600000*24 *30);TinyM CE_Advance dTheme._se tCookie("T inyMCE_"+e ditorId+"_ width",""+ (resizer.h orizontal? resizer.wi dth+dx:"") ,expires); TinyMCE_Ad vancedThem e._setCook ie("TinyMC E_"+editor Id+"_heigh t",""+(res izer.heigh t+dy),expi res)}break }},_setRes izing:func tion(e,edi tor_id,sta te){e=type of(e)=="un defined"?w indow.even t:e;var re sizer=Tiny MCE_Advanc edTheme._r esizer;var  editorCon tainer=doc ument.getE lementById (editor_id +'_parent' );var edit orArea=doc ument.getE lementById (editor_id +'_parent' ).firstChi ld;var res izeBox=doc ument.getE lementById (editor_id +'_resize_ box');var  inst=tinyM CE.getInst anceById(e ditor_id); if(state){ var width= editorArea .clientWid th;var hei ght=editor Area.clien tHeight;re sizeBox.st yle.width= width+"px" ;resizeBox .style.hei ght=height +"px";resi zer.iframe Width=inst .iframeEle ment.clien tWidth;res izer.ifram eHeight=in st.iframeE lement.cli entHeight; editorArea .style.dis play="none ";resizeBo x.style.di splay="blo ck";if(!re sizer.even tHandlers) {if(tinyMC E.isMSIE)t inyMCE.add Event(docu ment,"mous emove",Tin yMCE_Advan cedTheme._ resizeEven tHandler); else tinyM CE.addEven t(window," mousemove" ,TinyMCE_A dvancedThe me._resize EventHandl er);tinyMC E.addEvent (document, "mouseup", TinyMCE_Ad vancedThem e._resizeE ventHandle r);resizer .eventHand lers=true} resizer.re sizing=tru e;resizer. downX=e.sc reenX;resi zer.downY= e.screenY; resizer.wi dth=parseI nt(resizeB ox.style.w idth);resi zer.height =parseInt( resizeBox. style.heig ht);resize r.editorId =editor_id ;resizer.r esizeBox=r esizeBox;r esizer.hor izontal=ti nyMCE.getP aram("them e_advanced _resize_ho rizontal", true)}else {resizer.r esizing=fa lse;resize Box.style. display="n one";edito rArea.styl e.display= tinyMCE.is MSIE&&!tin yMCE.isOpe ra?"block" :"table";t inyMCE.exe cCommand(' mceResetDe signMode') }},_getCol orHTML:fun ction(id,n ,cm){var i ,h,cl;h='< span class ="mceMenuL ine"></spa n>';cl=tin yMCE.getPa ram(n,Tiny MCE_Advanc edTheme._d efColors). split(',') ;h+='<tabl e class="m ceColors"> <tr>';for( i=0;i<cl.l ength;i++) {c='tinyMC E.execInst anceComman d(\''+id+' \', \''+cm +'\', fals e, \'#'+cl [i]+'\');' ;h+='<td>< a href="ja vascript:' +c+'" styl e="backgro und-color:  #'+cl[i]+ '" onclick ="'+c+';re turn false ;"></a></t d>';if((i+ 1)%8==0)h+ ='</tr><tr >'}h+='</t r></table> ';if(tinyM CE.getPara m("theme_a dvanced_mo re_colors" ,true))h+= '<a href=" javascript :void(0);"  onclick=" TinyMCE_Ad vancedThem e._pickCol or(\''+id+ '\',\''+cm +'\');" cl ass="mceMo reColors"> '+tinyMCE. getLang('l ang_more_c olors')+'< /a>';retur n h},_pick Color:func tion(id,cm ){var inpu tColor,ins t=tinyMCE. selectedIn stance;if( cm=='forec olor'&&ins t)inputCol or=inst.fo reColor;if ((cm=='bac kcolor'||c m=='Hilite Color')&&i nst)inputC olor=inst. backColor; tinyMCE.ex ecCommand( 'mceColorP icker',tru e,{color:i nputColor, callback:f unction(c) {tinyMCE.e xecInstanc eCommand(i d,cm,false ,c)}})},_i nsertImage :function( src,alt,bo rder,hspac e,vspace,w idth,heigh t,align,ti tle,onmous eover,onmo useout){ti nyMCE.exec Command("m ceInsertCo ntent",fal se,tinyMCE .createTag HTML('img' ,{src:tiny MCE.conver tRelativeT oAbsoluteU RL(tinyMCE .settings[ 'base_href '],src),mc e_src:src, alt:alt,bo rder:borde r,hspace:h space,vspa ce:vspace, width:widt h,height:h eight,alig n:align,ti tle:title, onmouseove r:onmouseo ver,onmous eout:onmou seout}))}, _insertLin k:function (href,targ et,title,o nclick,sty le_class){ tinyMCE.ex ecCommand( 'mceBeginU ndoLevel') ;if(tinyMC E.selected Instance&& tinyMCE.se lectedElem ent&&tinyM CE.selecte dElement.n odeName.to LowerCase( )=="img"){ var doc=ti nyMCE.sele ctedInstan ce.getDoc( );var link Element=ti nyMCE.getP arentEleme nt(tinyMCE .selectedE lement,"a" );var newL ink=false; if(!linkEl ement){lin kElement=d oc.createE lement("a" );newLink= true}var m href=href; var thref= eval(tinyM CE.setting s['urlconv erter_call back']+"(h ref, linkE lement);") ;mhref=tin yMCE.getPa ram('conve rt_urls')? href:mhref ;tinyMCE.s etAttrib(l inkElement ,'href',th ref);tinyM CE.setAttr ib(linkEle ment,'mce_ href',mhre f);tinyMCE .setAttrib (linkEleme nt,'target ',target); tinyMCE.se tAttrib(li nkElement, 'title',ti tle);tinyM CE.setAttr ib(linkEle ment,'oncl ick',oncli ck);tinyMC E.setAttri b(linkElem ent,'class ',style_cl ass);if(ne wLink){lin kElement.a ppendChild (tinyMCE.s electedEle ment.clone Node(true) );tinyMCE. selectedEl ement.pare ntNode.rep laceChild( linkElemen t,tinyMCE. selectedEl ement)}ret urn}if(!ti nyMCE.link Element&&t inyMCE.sel ectedInsta nce){if(ti nyMCE.isSa fari){tiny MCE.execCo mmand("mce InsertCont ent",false ,'<a href= "'+tinyMCE .uniqueURL +'">'+tiny MCE.select edInstance .selection .getSelect edHTML()+' </a>')}els e tinyMCE. selectedIn stance.con tentDocume nt.execCom mand("crea telink",fa lse,tinyMC E.uniqueUR L);tinyMCE .linkEleme nt=tinyMCE .getElemen tByAttribu teValue(ti nyMCE.sele ctedInstan ce.content Document.b ody,"a","h ref",tinyM CE.uniqueU RL);var el ementArray =tinyMCE.g etElements ByAttribut eValue(tin yMCE.selec tedInstanc e.contentD ocument.bo dy,"a","hr ef",tinyMC E.uniqueUR L);for(var  i=0;i<ele mentArray. length;i++ ){var mhre f=href;var  thref=eva l(tinyMCE. settings[' urlconvert er_callbac k']+"(href , elementA rray[i]);" );mhref=ti nyMCE.getP aram('conv ert_urls') ?href:mhre f;tinyMCE. setAttrib( elementArr ay[i],'hre f',thref); tinyMCE.se tAttrib(el ementArray [i],'mce_h ref',mhref );tinyMCE. setAttrib( elementArr ay[i],'tar get',targe t);tinyMCE .setAttrib (elementAr ray[i],'ti tle',title );tinyMCE. setAttrib( elementArr ay[i],'onc lick',oncl ick);tinyM CE.setAttr ib(element Array[i],' class',sty le_class)} tinyMCE.li nkElement= elementArr ay[0]}if(t inyMCE.lin kElement){ var mhref= href;href= eval(tinyM CE.setting s['urlconv erter_call back']+"(h ref, tinyM CE.linkEle ment);");m href=tinyM CE.getPara m('convert _urls')?hr ef:mhref;t inyMCE.set Attrib(tin yMCE.linkE lement,'hr ef',href); tinyMCE.se tAttrib(ti nyMCE.link Element,'m ce_href',m href);tiny MCE.setAtt rib(tinyMC E.linkElem ent,'targe t',target) ;tinyMCE.s etAttrib(t inyMCE.lin kElement,' title',tit le);tinyMC E.setAttri b(tinyMCE. linkElemen t,'onclick ',onclick) ;tinyMCE.s etAttrib(t inyMCE.lin kElement,' class',sty le_class)} tinyMCE.ex ecCommand( 'mceEndUnd oLevel')}} ;tinyMCE.a ddTheme("a dvanced",T inyMCE_Adv ancedTheme );tinyMCE. addButtonM ap(TinyMCE _AdvancedT heme._butt onMap);   1   (function( ){var DOM= tinymce.DO M,Event=ti nymce.dom. Event,exte nd=tinymce .extend,ea ch=tinymce .each,Cook ie=tinymce .util.Cook ie,lastExt ID,explode =tinymce.e xplode;tin ymce.Theme Manager.re quireLangP ack('advan ced');tiny mce.create ('tinymce. themes.Adv ancedTheme ',{control s:{bold:[' bold_desc' ,'Bold'],i talic:['it alic_desc' ,'Italic'] ,underline :['underli ne_desc',' Underline' ],striketh rough:['st riketrough _desc','St rikethroug h'],justif yleft:['ju stifyleft_ desc','Jus tifyLeft'] ,justifyce nter:['jus tifycenter _desc','Ju stifyCente r'],justif yright:['j ustifyrigh t_desc','J ustifyRigh t'],justif yfull:['ju stifyfull_ desc','Jus tifyFull'] ,bullist:[ 'bullist_d esc','Inse rtUnordere dList'],nu mlist:['nu mlist_desc ','InsertO rderedList '],outdent :['outdent _desc','Ou tdent'],in dent:['ind ent_desc', 'Indent'], cut:['cut_ desc','Cut '],copy:[' copy_desc' ,'Copy'],p aste:['pas te_desc',' Paste'],un do:['undo_ desc','Und o'],redo:[ 'redo_desc ','Redo'], link:['lin k_desc','m ceLink'],u nlink:['un link_desc' ,'unlink'] ,image:['i mage_desc' ,'mceImage '],cleanup :['cleanup _desc','mc eCleanup'] ,help:['he lp_desc',' mceHelp'], code:['cod e_desc','m ceCodeEdit or'],hr:[' hr_desc',' InsertHori zontalRule '],removef ormat:['re moveformat _desc','Re moveFormat '],sub:['s ub_desc',' subscript' ],sup:['su p_desc','s uperscript '],forecol or:['forec olor_desc' ,'ForeColo r'],foreco lorpicker: ['forecolo r_desc','m ceForeColo r'],backco lor:['back color_desc ','HiliteC olor'],bac kcolorpick er:['backc olor_desc' ,'mceBackC olor'],cha rmap:['cha rmap_desc' ,'mceCharM ap'],visua laid:['vis ualaid_des c','mceTog gleVisualA id'],ancho r:['anchor _desc','mc eInsertAnc hor'],newd ocument:[' newdocumen t_desc','m ceNewDocum ent'],bloc kquote:['b lockquote_ desc','mce BlockQuote ']},stateC ontrols:[' bold','ita lic','unde rline','st rikethroug h','bullis t','numlis t','justif yleft','ju stifycente r','justif yright','j ustifyfull ','sub','s up','block quote'],in it:functio n(ed,url){ var t=this ,s,v;t.edi tor=ed;t.u rl=url;t.o nResolveNa me=new tin ymce.util. Dispatcher (this);t.s ettings=s= extend({th eme_advanc ed_path:tr ue,theme_a dvanced_to olbar_loca tion:'bott om',theme_ advanced_b uttons1:"b old,italic ,underline ,strikethr ough,|,jus tifyleft,j ustifycent er,justify right,just ifyfull,|, styleselec t,formatse lect",them e_advanced _buttons2: "bullist,n umlist,|,o utdent,ind ent,|,undo ,redo,|,li nk,unlink, anchor,ima ge,cleanup ,help,code ",theme_ad vanced_but tons3:"hr, removeform at,visuala id,|,sub,s up,|,charm ap",theme_ advanced_b lockformat s:"p,addre ss,pre,h1, h2,h3,h4,h 5,h6",them e_advanced _toolbar_a lign:"cent er",theme_ advanced_f onts:"Anda le Mono=an dale mono, times;Aria l=arial,he lvetica,sa ns-serif;A rial Black =arial bla ck,avant g arde;Book  Antiqua=bo ok antiqua ,palatino; Comic Sans  MS=comic  sans ms,sa ns-serif;C ourier New =courier n ew,courier ;Georgia=g eorgia,pal atino;Helv etica=helv etica;Impa ct=impact, chicago;Sy mbol=symbo l;Tahoma=t ahoma,aria l,helvetic a,sans-ser if;Termina l=terminal ,monaco;Ti mes New Ro man=times  new roman, times;Treb uchet MS=t rebuchet m s,geneva;V erdana=ver dana,genev a;Webdings =webdings; Wingdings= wingdings, zapf dingb ats",theme _advanced_ font_sizes :"1,2,3,4, 5,6,7",the me_advance d_more_col ors:1,them e_advanced _row_heigh t:23,theme _advanced_ resize_hor izontal:1, theme_adva nced_resiz ing_use_co okie:1},ed .settings) ;if((v=s.t heme_advan ced_path_l ocation)&& v!='none') s.theme_ad vanced_sta tusbar_loc ation=s.th eme_advanc ed_path_lo cation;if( s.theme_ad vanced_sta tusbar_loc ation=='no ne')s.them e_advanced _statusbar _location= 0;ed.onIni t.add(func tion(){ed. onNodeChan ge.add(t._ nodeChange d,t);ed.do m.loadCSS( ed.baseURI .toAbsolut e("themes/ advanced/s kins/"+ed. settings.s kin+"/cont ent.css")) ;});ed.onS etProgress State.add( function(e d,b,ti){va r co,id=ed .id,tb;if( b){t.progr essTimer=s etTimeout( function() {co=ed.get Container( );co=co.in sertBefore (DOM.creat e('DIV',{s tyle:'posi tion:relat ive'}),co. firstChild );tb=DOM.g et(ed.id+' _tbl');DOM .add(co,'d iv',{id:id +'_blocker ','class': 'mceBlocke r',style:{ width:tb.c lientWidth +2,height: tb.clientH eight+2}}) ;DOM.add(c o,'div',{i d:id+'_pro gress','cl ass':'mceP rogress',s tyle:{left :tb.client Width/ 2,  top : tb.c lientHeigh t /2}});}, ti||0);}el se{DOM.rem ove(id+'_b locker');D OM.remove( id+'_progr ess');clea rTimeout(t .progressT imer);}}); DOM.loadCS S(ed.baseU RI.toAbsol ute(s.edit or_css||"t hemes/adva nced/skins /"+ed.sett ings.skin+ "/ui.css") );if(s.ski n_variant) DOM.loadCS S(ed.baseU RI.toAbsol ute(s.edit or_css||"t hemes/adva nced/skins /"+ed.sett ings.skin+ "/ui_"+s.s kin_varian t+".css")) ;},createC ontrol:fun ction(n,cf ){var cd,c ;if(c=cf.c reateContr ol(n))retu rn c;switc h(n){case" styleselec t":return  this._crea teStyleSel ect();case "formatsel ect":retur n this._cr eateBlockF ormats();c ase"fontse lect":retu rn this._c reateFontS elect();ca se"fontsiz eselect":r eturn this ._createFo ntSizeSele ct();case" forecolor" :return th is._create ForeColorM enu();case "backcolor ":return t his._creat eBackColor Menu();}if ((cd=this. controls[n ]))return  cf.createB utton(n,{t itle:"adva nced."+cd[ 0],cmd:cd[ 1],ui:cd[2 ],value:cd [3]});},ex ecCommand: function(c md,ui,val) {var f=thi s['_'+cmd] ;if(f){f.c all(this,u i,val);ret urn true;} return fal se;},_impo rtClasses: function() {var ed=th is.editor, c=ed.contr olManager. get('style select');i f(c.getLen gth()==0){ each(ed.do m.getClass es(),funct ion(o){c.a dd(o['clas s'],o['cla ss']);});} },_createS tyleSelect :function( n){var t=t his,ed=t.e ditor,cf=e d.controlM anager,c=c f.createLi stBox('sty leselect', {title:'ad vanced.sty le_select' ,onselect: function(v ){if(c.sel ectedValue ===v){ed.e xecCommand ('mceSetSt yleInfo',0 ,{command: 'removefor mat'});c.s elect();re turn false ;}else ed. execComman d('mceSetC SSClass',0 ,v);}});ea ch(ed.getP aram('them e_advanced _styles',' ','hash'), function(v ,k){if(v)c .add(t.edi tor.transl ate(k),v); });c.onPos tRender.ad d(function (ed,n){Eve nt.add(n,' focus',t._ importClas ses,t);Eve nt.add(n,' mousedown' ,t._import Classes,t) ;});return  c;},_crea teFontSele ct:functio n(){var c, t=this,ed= t.editor;c =ed.contro lManager.c reateListB ox('fontse lect',{tit le:'advanc ed.fontdef ault',cmd: 'FontName' });each(ed .getParam( 'theme_adv anced_font s',t.setti ngs.theme_ advanced_f onts,'hash '),functio n(v,k){c.a dd(ed.tran slate(k),v ,{style:v. indexOf('d ings')==-1 ?'font-fam ily:'+v:'' });});retu rn c;},_cr eateFontSi zeSelect:f unction(){ var c,t=th is,lo=["1  (8 pt)","2  (10 pt)", "3 (12 pt) ","4 (14 p t)","5 (18  pt)","6 ( 24 pt)","7  (36 pt)"] ,fz=[8,10, 12,14,18,2 4,36];c=t. editor.con trolManage r.createLi stBox('fon tsizeselec t',{title: 'advanced. font_size' ,cmd:'Font Size'});ea ch(explode (t.setting s.theme_ad vanced_fon t_sizes),f unction(v) {c.add(lo[ parseInt(v )-1],v,{'s tyle':'fon t-size:'+f z[v-1]+'pt ','class': 'mceFontSi ze'+v});}) ;return c; },_createB lockFormat s:function (){var c,f mts={p:'ad vanced.par agraph',ad dress:'adv anced.addr ess',pre:' advanced.p re',h1:'ad vanced.h1' ,h2:'advan ced.h2',h3 :'advanced .h3',h4:'a dvanced.h4 ',h5:'adva nced.h5',h 6:'advance d.h6',div: 'advanced. div',block quote:'adv anced.bloc kquote',co de:'advanc ed.code',d t:'advance d.dt',dd:' advanced.d d',samp:'a dvanced.sa mp'},t=thi s;c=t.edit or.control Manager.cr eateListBo x('formats elect',{ti tle:'advan ced.block' ,cmd:'Form atBlock'}) ;each(expl ode(t.sett ings.theme _advanced_ blockforma ts),functi on(v){c.ad d(t.editor .translate (fmts[v]), v,{'class' :'mce_form atPreview  mce_'+v}); });return  c;},_creat eForeColor Menu:funct ion(){var  c,t=this,s =t.setting s,o={},v;i f(s.theme_ advanced_m ore_colors ){o.more_c olors_func =function( ){t._mceCo lorPicker( 0,{color:c .value,fun c:function (co){c.set Color(co); }});};}if( v=s.theme_ advanced_t ext_colors )o.colors= v;o.title= 'advanced. forecolor_ desc';o.cm d='ForeCol or';o.scop e=this;c=t .editor.co ntrolManag er.createC olorSplitB utton('for ecolor',o) ;return c; },_createB ackColorMe nu:functio n(){var c, t=this,s=t .settings, o={},v;if( s.theme_ad vanced_mor e_colors){ o.more_col ors_func=f unction(){ t._mceColo rPicker(0, {color:c.v alue,func: function(c o){c.setCo lor(co);}} );};}if(v= s.theme_ad vanced_bac kground_co lors)o.col ors=v;o.ti tle='advan ced.backco lor_desc'; o.cmd='Hil iteColor'; o.scope=th is;c=t.edi tor.contro lManager.c reateColor SplitButto n('backcol or',o);ret urn c;},re nderUI:fun ction(o){v ar n,ic,tb ,t=this,ed =t.editor, s=t.settin gs,sc,p,nl ;n=p=DOM.c reate('spa n',{id:ed. id+'_paren t','class' :'mceEdito r '+ed.set tings.skin +'Skin'+(s .skin_vari ant?' '+ed .settings. skin+'Skin '+t._ufirs t(s.skin_v ariant):'' )});if(!DO M.boxModel )n=DOM.add (n,'div',{ 'class':'m ceOldBoxMo del'});n=s c=DOM.add( n,'table', {id:ed.id+ '_tbl',dir :'ltr','cl ass':'mceL ayout',cel lSpacing:0 ,cellPaddi ng:0});n=t b=DOM.add( n,'tbody') ;switch((s .theme_adv anced_layo ut_manager ||'').toLo werCase()) {case"rowl ayout":ic= t._rowLayo ut(s,tb,o) ;break;cas e"customla yout":ic=e d.execCall back("them e_advanced _custom_la yout",s,tb ,o,p);brea k;default: ic=t._simp leLayout(s ,tb,o,p);} n=o.target Node;nl=DO M.stdMode? sc.getElem entsByTagN ame('tr'): sc.rows;DO M.addClass (nl[0],'mc eFirst');D OM.addClas s(nl[nl.le ngth-1],'m ceLast');e ach(DOM.se lect('tr', tb),functi on(n){DOM. addClass(n .firstChil d,'mceFirs t');DOM.ad dClass(n.c hildNodes[ n.childNod es.length- 1],'mceLas t');});if( DOM.get(s. theme_adva nced_toolb ar_contain er))DOM.ge t(s.theme_ advanced_t oolbar_con tainer).ap pendChild( p);else DO M.insertAf ter(p,n);E vent.add(e d.id+'_pat h_row','cl ick',funct ion(e){e=e .target;if (e.nodeNam e=='A'){t. _sel(e.cla ssName.rep lace(/^.*m cePath_([0 -9]+).*$/, '$1'));ret urn Event. cancel(e); }});if(!ed .getParam( 'accessibi lity_focus ')||ed.get Param('tab _focus'))E vent.add(D OM.add(p,' a',{href:' #'},'<!--  IE -->'),' focus',fun ction(){ti nyMCE.get( ed.id).foc us();});if (s.theme_a dvanced_to olbar_loca tion=='ext ernal')o.d eltaHeight =0;t.delta Height=o.d eltaHeight ;o.targetN ode=null;r eturn{ifra meContaine r:ic,edito rContainer :ed.id+'_p arent',siz eContainer :sc,deltaH eight:o.de ltaHeight} ;},getInfo :function( ){return{l ongname:'A dvanced th eme',autho r:'Moxieco de Systems  AB',autho rurl:'http ://tinymce .moxiecode .com',vers ion:tinymc e.majorVer sion+"."+t inymce.min orVersion} },resizeBy :function( dw,dh){var  e=DOM.get (this.edit or.id+'_tb l');this.r esizeTo(e. clientWidt h+dw,e.cli entHeight+ dh);},resi zeTo:funct ion(w,h){v ar ed=this .editor,s= ed.setting s,e=DOM.ge t(ed.id+'_ tbl'),ifr= DOM.get(ed .id+'_ifr' ),dh;w=Mat h.max(s.th eme_advanc ed_resizin g_min_widt h||100,w); h=Math.max (s.theme_a dvanced_re sizing_min _height||1 00,h);w=Ma th.min(s.t heme_advan ced_resizi ng_max_wid th||0xFFFF ,w);h=Math .min(s.the me_advance d_resizing _max_heigh t||0xFFFF, h);dh=e.cl ientHeight -ifr.clien tHeight;DO M.setStyle (ifr,'heig ht',h-dh); DOM.setSty les(e,{wid th:w,heigh t:h});},_s impleLayou t:function (s,tb,o,p) {var t=thi s,ed=t.edi tor,lo=s.t heme_advan ced_toolba r_location ,sl=s.them e_advanced _statusbar _location, n,ic,etb,c ;if(lo=='t op')t._add Toolbars(t b,o);if(lo =='externa l'){n=c=DO M.create(' div',{styl e:'positio n:relative '});n=DOM. add(n,'div ',{id:ed.i d+'_extern al','class ':'mceExte rnalToolba r'});DOM.a dd(n,'a',{ id:ed.id+' _external_ close',hre f:'javascr ipt:;','cl ass':'mceE xternalClo se'});n=DO M.add(n,'t able',{id: ed.id+'_tb lext',cell Spacing:0, cellPaddin g:0});etb= DOM.add(n, 'tbody');i f(p.firstC hild.class Name=='mce OldBoxMode l')p.first Child.appe ndChild(c) ;else p.in sertBefore (c,p.first Child);t._ addToolbar s(etb,o);e d.onMouseU p.add(func tion(){var  e=DOM.get (ed.id+'_e xternal'); DOM.show(e );DOM.hide (lastExtID );var f=Ev ent.add(ed .id+'_exte rnal_close ','click', function() {DOM.hide( ed.id+'_ex ternal');E vent.remov e(ed.id+'_ external_c lose','cli ck',f);}); DOM.show(e );DOM.setS tyle(e,'to p',0-DOM.g etRect(ed. id+'_tblex t').h-1);D OM.hide(e) ;DOM.show( e);e.style .filter='' ;lastExtID =ed.id+'_e xternal';e =null;});} if(sl=='to p')t._addS tatusBar(t b,o);if(!s .theme_adv anced_tool bar_contai ner){n=DOM .add(tb,'t r');n=ic=D OM.add(n,' td',{'clas s':'mceIfr ameContain er'});}if( lo=='botto m')t._addT oolbars(tb ,o);if(sl= ='bottom') t._addStat usBar(tb,o );return i c;},_rowLa yout:funct ion(s,tb,o ){var t=th is,ed=t.ed itor,dc,da ,cf=ed.con trolManage r,n,ic,to, a;dc=s.the me_advance d_containe rs_default _class||'' ;da=s.them e_advanced _container s_default_ align||'ce nter';each (explode(s .theme_adv anced_cont ainers||'' ),function (c,i){var  v=s['theme _advanced_ container_ '+c]||'';s witch(c.to LowerCase( )){case'mc eeditor':n =DOM.add(t b,'tr');n= ic=DOM.add (n,'td',{' class':'mc eIframeCon tainer'}); break;case 'mceelemen tpath':t._ addStatusB ar(tb,o);b reak;defau lt:a=s['th eme_advanc ed_contain er_'+c+'_a lign'].toL owerCase() ;a='mce'+t ._ufirst(a );n=DOM.ad d(DOM.add( tb,'tr'),' td',{'clas s':'mceToo lbar '+(s[ 'theme_adv anced_cont ainer_'+c+ '_class']| |dc)+' '+a ||da});to= cf.createT oolbar("to olbar"+i); t._addCont rols(v,to) ;DOM.setHT ML(n,to.re nderHTML() );o.deltaH eight-=s.t heme_advan ced_row_he ight;}});r eturn ic;} ,_addContr ols:functi on(v,tb){v ar t=this, s=t.settin gs,di,cf=t .editor.co ntrolManag er;if(s.th eme_advanc ed_disable &&!t._disa bled){di={ };each(exp lode(s.the me_advance d_disable) ,function( v){di[v]=1 ;});t._dis abled=di;} else di=t. _disabled; each(explo de(v),func tion(n){va r c;if(di& &di[n])ret urn;if(n== 'tablecont rols'){eac h(["table" ,"|","row_ props","ce ll_props", "|","row_b efore","ro w_after"," delete_row ","|","col _before"," col_after" ,"delete_c ol","|","s plit_cells ","merge_c ells"],fun ction(n){n =t.createC ontrol(n,c f);if(n)tb .add(n);}) ;return;}c =t.createC ontrol(n,c f);if(c)tb .add(c);}) ;},_addToo lbars:func tion(c,o){ var t=this ,i,tb,ed=t .editor,s= t.settings ,v,cf=ed.c ontrolMana ger,di,n,h =[],a;a=s. theme_adva nced_toolb ar_align.t oLowerCase ();a='mce' +t._ufirst (a);n=DOM. add(DOM.ad d(c,'tr'), 'td',{'cla ss':'mceTo olbar '+a} );if(!ed.g etParam('a ccessibili ty_focus') ||ed.getPa ram('tab_f ocus'))h.p ush(DOM.cr eateHTML(' a',{href:' #',onfocus :'tinyMCE. get(\''+ed .id+'\').f ocus();'}, '<!-- IE - ->'));h.pu sh(DOM.cre ateHTML('a ',{href:'# ',accesske y:'q',titl e:ed.getLa ng("advanc ed.toolbar _focus")}, '<!-- IE - ->'));for( i=1;(v=s[' theme_adva nced_butto ns'+i]);i+ +){tb=cf.c reateToolb ar("toolba r"+i,{'cla ss':'mceTo olbarRow'+ i});if(s[' theme_adva nced_butto ns'+i+'_ad d'])v+=',' +s['theme_ advanced_b uttons'+i+ '_add'];if (s['theme_ advanced_b uttons'+i+ '_add_befo re'])v=s[' theme_adva nced_butto ns'+i+'_ad d_before'] +','+v;t._ addControl s(v,tb);h. push(tb.re nderHTML() );o.deltaH eight-=s.t heme_advan ced_row_he ight;}h.pu sh(DOM.cre ateHTML('a ',{href:'# ',accesske y:'z',titl e:ed.getLa ng("advanc ed.toolbar _focus"),o nfocus:'ti nyMCE.getI nstanceByI d(\''+ed.i d+'\').foc us();'},'< !-- IE --> '));DOM.se tHTML(n,h. join('')); },_addStat usBar:func tion(tb,o) {var n,t=t his,ed=t.e ditor,s=t. settings,r ,mf,me,td; n=DOM.add( tb,'tr');n =td=DOM.ad d(n,'td',{ 'class':'m ceStatusba r'});n=DOM .add(n,'di v',{id:ed. id+'_path_ row'},s.th eme_advanc ed_path?ed .translate ('advanced .path')+':  ':'&nbsp; ');DOM.add (n,'a',{hr ef:'#',acc esskey:'x' });if(s.th eme_advanc ed_resizin g&&!tinymc e.isOldWeb Kit){DOM.a dd(td,'a', {id:ed.id+ '_resize', href:'java script:;', onclick:"r eturn fals e;",'class ':'mceResi ze'});if(s .theme_adv anced_resi zing_use_c ookie){ed. onPostRend er.add(fun ction(){va r o=Cookie .getHash(" TinyMCE_"+ ed.id+"_si ze"),c=DOM .get(ed.id +'_tbl');i f(!o)retur n;if(s.the me_advance d_resize_h orizontal) c.style.wi dth=o.cw+' px';c.styl e.height=o .ch+'px';D OM.get(ed. id+'_ifr') .style.hei ght=(parse Int(o.ch)+ t.deltaHei ght)+'px'; });}ed.onP ostRender. add(functi on(){Event .add(ed.id +'_resize' ,'mousedow n',functio n(e){var c ,p,w,h,n,p a;c=DOM.ge t(ed.id+'_ tbl');w=c. clientWidt h;h=c.clie ntHeight;m iw=s.theme _advanced_ resizing_m in_width|| 100;mih=s. theme_adva nced_resiz ing_min_he ight||100; maw=s.them e_advanced _resizing_ max_width| |0xFFFF;ma h=s.theme_ advanced_r esizing_ma x_height|| 0xFFFF;p=D OM.add(DOM .get(ed.id +'_parent' ),'div',{' class':'mc ePlaceHold er'});DOM. setStyles( p,{width:w ,height:h} );DOM.hide (c);DOM.sh ow(p);r={x :e.screenX ,y:e.scree nY,w:w,h:h ,dx:null,d y:null};mf =Event.add (document, 'mousemove ',function (e){var w, h;r.dx=e.s creenX-r.x ;r.dy=e.sc reenY-r.y; w=Math.max (miw,r.w+r .dx);h=Mat h.max(mih, r.h+r.dy); w=Math.min (maw,w);h= Math.min(m ah,h);if(s .theme_adv anced_resi ze_horizon tal)p.styl e.width=w+ 'px';p.sty le.height= h+'px';ret urn Event. cancel(e); });me=Even t.add(docu ment,'mous eup',funct ion(e){var  ifr;Event .remove(do cument,'mo usemove',m f);Event.r emove(docu ment,'mous eup',me);c .style.dis play='';DO M.remove(p );if(r.dx= ==null)ret urn;ifr=DO M.get(ed.i d+'_ifr'); if(s.theme _advanced_ resize_hor izontal)c. style.widt h=(r.w+r.d x)+'px';c. style.heig ht=(r.h+r. dy)+'px';i fr.style.h eight=(ifr .clientHei ght+r.dy)+ 'px';if(s. theme_adva nced_resiz ing_use_co okie){Cook ie.setHash ("TinyMCE_ "+ed.id+"_ size",{cw: r.w+r.dx,c h:r.h+r.dy });}});ret urn Event. cancel(e); });});}o.d eltaHeight -=21;n=tb= null;},_no deChanged: function(e d,cm,n,co) {var t=thi s,p,de=0,v ,c,s=t.set tings;tiny mce.each(t .stateCont rols,funct ion(c){cm. setActive( c,ed.query CommandSta te(t.contr ols[c][1]) );});cm.se tActive('v isualaid', ed.hasVisu al);cm.set Disabled(' undo',!ed. undoManage r.hasUndo( )&&!ed.typ ing);cm.se tDisabled( 'redo',!ed .undoManag er.hasRedo ());cm.set Disabled(' outdent',! ed.queryCo mmandState ('Outdent' ));p=DOM.g etParent(n ,'A');if(c =cm.get('l ink')){if( !p||!p.nam e){c.setDi sabled(!p& &co);c.set Active(!!p );}}if(c=c m.get('unl ink')){c.s etDisabled (!p&&co);c .setActive (!!p&&!p.n ame);}if(c =cm.get('a nchor')){c .setActive (!!p&&p.na me);if(tin ymce.isWeb Kit){p=DOM .getParent (n,'IMG'); c.setActiv e(!!p&&DOM .getAttrib (p,'mce_na me')=='a') ;}}p=DOM.g etParent(n ,'IMG');if (c=cm.get( 'image'))c .setActive (!!p&&n.cl assName.in dexOf('mce Item')==-1 );if(c=cm. get('style select')){ if(n.class Name){t._i mportClass es();c.sel ect(n.clas sName);}el se c.selec t();}if(c= cm.get('fo rmatselect ')){p=DOM. getParent( n,DOM.isBl ock);if(p) c.select(p .nodeName. toLowerCas e());}if(c =cm.get('f ontselect' ))c.select (ed.queryC ommandValu e('FontNam e'));if(c= cm.get('fo ntsizesele ct'))c.sel ect(ed.que ryCommandV alue('Font Size'));if (s.theme_a dvanced_pa th&&s.them e_advanced _statusbar _location) {p=DOM.get (ed.id+'_p ath')||DOM .add(ed.id +'_path_ro w','span', {id:ed.id+ '_path'}); DOM.setHTM L(p,'');ed .dom.getPa rent(n,fun ction(n){v ar na=n.no deName.toL owerCase() ,u,pi,ti=' ';if(n.nod eType!=1|| (DOM.hasCl ass(n,'mce ItemHidden ')||DOM.ha sClass(n,' mceItemRem oved')))re turn;if(v= DOM.getAtt rib(n,'mce _name'))na =v;if(tiny mce.isIE&& n.scopeNam e!=='HTML' )na=n.scop eName+':'+ na;na=na.r eplace(/mc e\:/g,''); switch(na) {case'b':n a='strong' ;break;cas e'i':na='e m';break;c ase'img':i f(v=DOM.ge tAttrib(n, 'src'))ti+ ='src: '+v +' ';break ;case'a':i f(v=DOM.ge tAttrib(n, 'name')){t i+='name:  '+v+' ';na +='#'+v;}i f(v=DOM.ge tAttrib(n, 'href'))ti +='href: ' +v+' ';bre ak;case'fo nt':if(s.c onvert_fon ts_to_span s)na='span ';if(v=DOM .getAttrib (n,'face') )ti+='font : '+v+' '; if(v=DOM.g etAttrib(n ,'size'))t i+='size:  '+v+' ';if (v=DOM.get Attrib(n,' color'))ti +='color:  '+v+' ';br eak;case's pan':if(v= DOM.getAtt rib(n,'sty le'))ti+=' style: '+v +' ';break ;}if(v=DOM .getAttrib (n,'id'))t i+='id: '+ v+' ';if(v =n.classNa me){v=v.re place(/(we bkit-[\w\- ]+|Apple-[ \w\-]+|mce Item\w+|mc eVisualAid )/g,'');if (v&&v.inde xOf('mceIt em')==-1){ ti+='class : '+v+' '; if(DOM.isB lock(n)||n a=='img'|| na=='span' )na+='.'+v ;}}na=na.r eplace(/(h tml:)/g,'' );na={name :na,node:n ,title:ti} ;t.onResol veName.dis patch(t,na );ti=na.ti tle;na=na. name;pi=DO M.create(' a',{'href' :"javascri pt:;",onmo usedown:"r eturn fals e;",title: ti,'class' :'mcePath_ '+(de++)}, na);if(p.h asChildNod es()){p.in sertBefore (document. createText Node(' \u0 0bb '),p.f irstChild) ;p.insertB efore(pi,p .firstChil d);}else p .appendChi ld(pi);},e d.getBody( ));}},_sel :function( v){this.ed itor.execC ommand('mc eSelectNod eDepth',fa lse,v);},_ mceInsertA nchor:func tion(ui,v) {var ed=th is.editor; ed.windowM anager.ope n({url:tin ymce.baseU RL+'/theme s/advanced /anchor.ht m',width:3 20+parseIn t(ed.getLa ng('advanc ed.anchor_ delta_widt h',0)),hei ght:90+par seInt(ed.g etLang('ad vanced.anc hor_delta_ height',0) ),inline:t rue},{them e_url:this .url});},_ mceCharMap :function( ){var ed=t his.editor ;ed.window Manager.op en({url:ti nymce.base URL+'/them es/advance d/charmap. htm',width :550+parse Int(ed.get Lang('adva nced.charm ap_delta_w idth',0)), height:250 +parseInt( ed.getLang ('advanced .charmap_d elta_heigh t',0)),inl ine:true}, {theme_url :this.url} );},_mceHe lp:functio n(){var ed =this.edit or;ed.wind owManager. open({url: tinymce.ba seURL+'/th emes/advan ced/about. htm',width :480,heigh t:380,inli ne:true},{ theme_url: this.url}) ;},_mceCol orPicker:f unction(u, v){var ed= this.edito r;v=v||{}; ed.windowM anager.ope n({url:tin ymce.baseU RL+'/theme s/advanced /color_pic ker.htm',w idth:375+p arseInt(ed .getLang(' advanced.c olorpicker _delta_wid th',0)),he ight:250+p arseInt(ed .getLang(' advanced.c olorpicker _delta_hei ght',0)),c lose_previ ous:false, inline:tru e},{input_ color:v.co lor,func:v .func,them e_url:this .url});},_ mceCodeEdi tor:functi on(ui,val) {var ed=th is.editor; ed.windowM anager.ope n({url:tin ymce.baseU RL+'/theme s/advanced /source_ed itor.htm', width:pars eInt(ed.ge tParam("th eme_advanc ed_source_ editor_wid th",720)), height:par seInt(ed.g etParam("t heme_advan ced_source _editor_he ight",580) ),inline:t rue,resiza ble:true,m aximizable :true},{th eme_url:th is.url});} ,_mceImage :function( ui,val){va r ed=this. editor;if( ed.dom.get Attrib(ed. selection. getNode(), 'class').i ndexOf('mc eItem')!=- 1)return;e d.windowMa nager.open ({url:tiny mce.baseUR L+'/themes /advanced/ image.htm' ,width:355 +parseInt( ed.getLang ('advanced .image_del ta_width', 0)),height :275+parse Int(ed.get Lang('adva nced.image _delta_hei ght',0)),i nline:true },{theme_u rl:this.ur l});},_mce Link:funct ion(ui,val ){var ed=t his.editor ;ed.window Manager.op en({url:ti nymce.base URL+'/them es/advance d/link.htm ',width:31 0+parseInt (ed.getLan g('advance d.link_del ta_width', 0)),height :200+parse Int(ed.get Lang('adva nced.link_ delta_heig ht',0)),in line:true} ,{theme_ur l:this.url });},_mceN ewDocument :function( ){var ed=t his.editor ;ed.window Manager.co nfirm('adv anced.newd ocument',f unction(s) {if(s)ed.e xecCommand ('mceSetCo ntent',fal se,'');}); },_mceFore Color:func tion(){var  t=this;th is._mceCol orPicker(0 ,{func:fun ction(co){ t.editor.e xecCommand ('ForeColo r',false,c o);}});},_ mceBackCol or:functio n(){var t= this;this. _mceColorP icker(0,{f unc:functi on(co){t.e ditor.exec Command('H iliteColor ',false,co );}});},_u first:func tion(s){re turn s.sub string(0,1 ).toUpperC ase()+s.su bstring(1) ;}});tinym ce.ThemeMa nager.add( 'advanced' ,tinymce.t hemes.Adva ncedTheme) ;}());