summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-06-25 12:08:59 +0200
committerAleksander Machniak <alec@alec.pl>2012-06-25 12:10:05 +0200
commit8f07bdcf20bcd0ac6749842bd85d710790c2c9ac (patch)
tree0f16dab1664635e586ebab8b39e1540dbe62bb49
parenta008a3f0e30bcddf6d9ce4a0015495bf8978c8c2 (diff)
Update to TinyMCE 3.5.4.1
-rw-r--r--CHANGELOG1
-rw-r--r--program/js/tiny_mce/langs/nl.js2
-rw-r--r--program/js/tiny_mce/langs/sk.js2
-rw-r--r--program/js/tiny_mce/langs/uk.js2
-rw-r--r--program/js/tiny_mce/plugins/advimage/langs/nl_dlg.js2
-rw-r--r--program/js/tiny_mce/plugins/advimage/langs/uk_dlg.js2
-rw-r--r--program/js/tiny_mce/plugins/advlink/langs/nl_dlg.js2
-rw-r--r--program/js/tiny_mce/plugins/advlink/langs/uk_dlg.js2
-rw-r--r--program/js/tiny_mce/plugins/autolink/editor_plugin_src.js362
-rw-r--r--program/js/tiny_mce/plugins/autoresize/editor_plugin_src.js238
-rw-r--r--program/js/tiny_mce/plugins/autosave/editor_plugin.js2
-rw-r--r--program/js/tiny_mce/plugins/autosave/editor_plugin_src.js6
-rw-r--r--program/js/tiny_mce/plugins/contextmenu/editor_plugin.js2
-rw-r--r--program/js/tiny_mce/plugins/contextmenu/editor_plugin_src.js16
-rw-r--r--program/js/tiny_mce/plugins/emotions/langs/uk_dlg.js2
-rw-r--r--program/js/tiny_mce/plugins/example_dependency/editor_plugin_src.js100
-rw-r--r--program/js/tiny_mce/plugins/fullpage/langs/nl_dlg.js2
-rw-r--r--program/js/tiny_mce/plugins/lists/editor_plugin.js2
-rw-r--r--program/js/tiny_mce/plugins/lists/editor_plugin_src.js1903
-rw-r--r--program/js/tiny_mce/plugins/media/editor_plugin.js2
-rw-r--r--program/js/tiny_mce/plugins/media/editor_plugin_src.js36
-rw-r--r--program/js/tiny_mce/plugins/media/langs/en_dlg.js2
-rw-r--r--program/js/tiny_mce/plugins/media/langs/uk_dlg.js2
-rw-r--r--program/js/tiny_mce/plugins/style/langs/uk_dlg.js2
-rw-r--r--program/js/tiny_mce/plugins/style/props.htm1690
-rw-r--r--program/js/tiny_mce/plugins/style/readme.txt38
-rw-r--r--program/js/tiny_mce/plugins/tabfocus/editor_plugin_src.js244
-rw-r--r--program/js/tiny_mce/plugins/table/editor_plugin.js2
-rw-r--r--program/js/tiny_mce/plugins/table/editor_plugin_src.js2895
-rw-r--r--program/js/tiny_mce/plugins/table/js/table.js5
-rw-r--r--program/js/tiny_mce/themes/advanced/js/color_picker.js690
-rw-r--r--program/js/tiny_mce/themes/advanced/langs/uk.js2
-rw-r--r--program/js/tiny_mce/themes/advanced/langs/uk_dlg.js2
-rw-r--r--program/js/tiny_mce/themes/advanced/skins/default/content.css1
-rw-r--r--program/js/tiny_mce/themes/advanced/skins/highcontrast/content.css1
-rw-r--r--program/js/tiny_mce/themes/advanced/skins/o2k7/content.css1
-rw-r--r--program/js/tiny_mce/themes/advanced/source_editor.htm2
-rw-r--r--program/js/tiny_mce/tiny_mce.js2
-rw-r--r--program/js/tiny_mce/tiny_mce_src.js552
39 files changed, 4537 insertions, 4284 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 25c0ca970..909d51f12 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
+- Update to TinyMCE 3.5.4.1
- Better icons with distinct shapes for priority columns (#1488377)
- Show dedicated icon for multipart/report messages (#1488524)
- Properly hide text of icon links/buttons (#1488534)
diff --git a/program/js/tiny_mce/langs/nl.js b/program/js/tiny_mce/langs/nl.js
index c5fa704a7..a8cdad2e5 100644
--- a/program/js/tiny_mce/langs/nl.js
+++ b/program/js/tiny_mce/langs/nl.js
@@ -1 +1 @@
-tinyMCE.addI18n({nl:{common:{"more_colors":"Meer kleuren","invalid_data":"Fout: Er zijn ongeldige waardes ingevoerd, deze zijn rood gemarkeerd.","popup_blocked":"U zult uw popup-blocker tijdelijk moeten uitschakelen voor deze website om gebruik te kunnen maken van alle functies van deze teksteditor.","clipboard_no_support":"Kopi\u00ebren/knippen/plakken wordt niet ondersteund door uw browser, gebruik hiervoor de sneltoetsen.","clipboard_msg":"Kopi\u00ebren/knippen/plakken is niet beschikbaar in Mozilla en Firefox.\nWilt u meer informatie over deze beperking?","not_set":"- Standaard -","class_name":"Klasse",browse:"Bladeren",close:"Sluiten",cancel:"Annuleren",update:"Bijwerken",insert:"Invoegen",apply:"Toepassen","edit_confirm":"Weet u zeker dat u tekst in WYSIWYG mode wilt bewerken in dit tekstveld?","invalid_data_number":"{#field} moet een nummer zijn","invalid_data_min":"{#field} moet groter zijn dan {#min}","invalid_data_size":"{#field} moet een nummer of percentage zijn",value:"(waarde aanpassen)"},contextmenu:{full:"Uitvullen",right:"Rechts",center:"Centreren",left:"Links",align:"Uitlijning"},insertdatetime:{"day_short":"zo,ma,di,wo,do,vr,za,zo","day_long":"Zondag,Maandag,Dinsdag,Woensdag,Donderdag,Vrijdag,Zaterdag,Zondag","months_short":"Jan,Feb,Mar,Apr,Mei,Jun,Jul,Aug,Sep,Okt,Nov,Dec","months_long":"Januari,Februari,Maart,April,Mei,Juni,Juli,Augustus,September,Oktober,November,December","inserttime_desc":"Tijd invoegen","insertdate_desc":"Datum invoegen","time_fmt":"%H:%M:%S","date_fmt":"%d-%m-%Y"},print:{"print_desc":"Afdrukken"},preview:{"preview_desc":"Voorbeeld"},directionality:{"rtl_desc":"Van rechts naar links","ltr_desc":"Van links naar rechts"},layer:{content:"Nieuwe laag...","absolute_desc":"Absoluut positioneren inschakelen","backward_desc":"Vorige laag","forward_desc":"Volgende laag","insertlayer_desc":"Nieuwe laag invoegen"},save:{"save_desc":"Opslaan","cancel_desc":"Alle wijzigingen annuleren"},nonbreaking:{"nonbreaking_desc":"Open ruimte invoegen"},iespell:{download:"ieSpell niet gevonden. Wilt u deze nu installeren?","iespell_desc":"Spellingcontrole"},advhr:{"advhr_desc":"Scheidingslijn","delta_height":"","delta_width":""},emotions:{"emotions_desc":"Emoties","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"Zoeken/Vervangen","search_desc":"Zoeken","delta_width":"","delta_height":""},advimage:{"image_desc":"Afbeelding invoegen/bewerken","delta_width":"","delta_height":""},advlink:{"link_desc":"Link invoegen/bewerken","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"Attributen invoegen/bewerken","ins_desc":"Ingevoegd","del_desc":"Verwijderd","acronym_desc":"Synoniem","abbr_desc":"Afkorting","cite_desc":"Citaat","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"CSS Stijl bewerken","delta_height":"","delta_width":""},paste:{"plaintext_mode":"Plakken is nu in plattetekstmodus. Klik nog een keer om terug te gaan naar normaal plakken.","plaintext_mode_sticky":"Plakken is nu in plattetekstmodus. Klik nog een keer om terug te gaan naar normaal plakken. Nadat u iets plakt, keert u terug naar normaal plakken.","selectall_desc":"Alles selecteren","paste_word_desc":"Vanuit Word plakken","paste_text_desc":"Als platte tekst plakken"},"paste_dlg":{"word_title":"Gebruik Ctrl+V om tekst in het venster te plakken.","text_linebreaks":"Regelafbreking bewaren","text_title":"Gebruik Ctrl+V om tekst in het venster te plakken."},table:{cell:"Cel",col:"Kolom",row:"Rij",del:"Tabel verwijderen","copy_row_desc":"Rij kopi\u00ebren","cut_row_desc":"Rij knippen","paste_row_after_desc":"Rij onder plakken","paste_row_before_desc":"Rij boven plakken","props_desc":"Tabeleigenschappen","cell_desc":"Cel-eigenschappen","row_desc":"Rij-eigenschappen","merge_cells_desc":"Cellen samenvoegen","split_cells_desc":"Cellen splitsen","delete_col_desc":"Kolom verwijderen","col_after_desc":"Kolom rechts invoegen","col_before_desc":"Kolom links invoegen","delete_row_desc":"Rij verwijderen","row_after_desc":"Rij onder invoegen","row_before_desc":"Rij boven invoegen",desc:"Tabel invoegen/bewerken","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"Als u de opgeslagen inhoud laadt, verliest u de inhoud die zich momenteel in de editor bevindt.\n\nWeet u zeker dat u de opgeslagen inhoud wilt laden?","restore_content":"Automatisch opgeslagen inhoud laden.","unload_msg":"De wijzigingen zullen verloren gaan als u nu deze pagina verlaat."},fullscreen:{desc:"Volledig scherm"},media:{edit:"Media bewerken",desc:"Media invoegen/bewerken","delta_height":"","delta_width":""},fullpage:{desc:"Documenteigenschappen","delta_width":"","delta_height":""},template:{desc:"Voorgedefinieerd sjabloon invoegen"},visualchars:{desc:"Zichtbare symbolen"},spellchecker:{desc:"Spellingcontrole",menu:"Instellingen spellingcontrole","ignore_word":"Woord negeren","ignore_words":"Alles negeren",langs:"Talen",wait:"Een ogenblik geduld\u2026",sug:"Suggesties","no_sug":"Geen suggesties","no_mpell":"Geen spelfouten gevonden.","learn_word":"Woord toevoegen aan spellingscontrole"},pagebreak:{desc:"Pagina-einde invoegen"},advlist:{types:"Types",def:"Standaard","lower_alpha":"Alfa (klein)","lower_greek":"Griekse letters (klein)","lower_roman":"Romeinse letters (klein)","upper_alpha":"Alfa (groot)","upper_roman":"Romeinse letters (groot)",circle:"Cirkel",disc:"Schijf",square:"Vierkant"},colors:{"333300":"Donkerolijf","993300":"Gebrand oranje","000000":"Zwart","003300":"Donkergroen","003366":"Donkerazuur","000080":"Marineblauw","333399":"Indigo","333333":"Heel donkergrijs","800000":"Kastanjebruin",FF6600:"Oranje","808000":"Olijf","008000":"Groen","008080":"Teal","0000FF":"Blauw","666699":"Grijsblauw","808080":"Grijs",FF0000:"Rood",FF9900:"Amber","99CC00":"Geelgroen","339966":"Zeegroen","33CCCC":"Turkoois","3366FF":"Koningsblauw","800080":"Paars","999999":"Middengrijs",FF00FF:"Magenta",FFCC00:"Goud",FFFF00:"Geel","00FF00":"Limoen","00FFFF":"Aqua","00CCFF":"Hemelsblauw","993366":"Bruin",C0C0C0:"Zilver",FF99CC:"Roze",FFCC99:"Perzik",FFFF99:"Lichtgeel",CCFFCC:"Bleekgroen",CCFFFF:"Bleekcyaan","99CCFF":"Licht hemelsblauw",CC99FF:"Pruim",FFFFFF:"Wit"},aria:{"rich_text_area":"Tekst met opmaak"},wordcount:{words:"Aantal woorden:"}}}); \ No newline at end of file
+tinyMCE.addI18n({nl:{common:{"more_colors":"Meer kleuren","invalid_data":"Fout: Er zijn ongeldige waardes ingevoerd, deze zijn rood gemarkeerd.","popup_blocked":"U zult uw popup-blocker tijdelijk moeten uitschakelen voor deze website om gebruik te kunnen maken van alle functies van deze teksteditor.","clipboard_no_support":"Kopi\u00ebren/knippen/plakken wordt niet ondersteund door uw browser, gebruik hiervoor de sneltoetsen.","clipboard_msg":"Kopi\u00ebren/knippen/plakken is niet beschikbaar in Mozilla en Firefox.\nWilt u meer informatie over deze beperking?","not_set":"- Standaard -","class_name":"Klasse",browse:"Bladeren",close:"Sluiten",cancel:"Annuleren",update:"Bijwerken",insert:"Invoegen",apply:"Toepassen","edit_confirm":"Weet u zeker dat u tekst in WYSIWYG mode wilt bewerken in dit tekstveld?","invalid_data_number":"{#field} moet een nummer zijn","invalid_data_min":"{#field} moet groter zijn dan {#min}","invalid_data_size":"{#field} moet een nummer of percentage zijn",value:"(waarde aanpassen)"},contextmenu:{full:"Uitvullen",right:"Rechts",center:"Centreren",left:"Links",align:"Uitlijning"},insertdatetime:{"day_short":"zo,ma,di,wo,do,vr,za,zo","day_long":"Zondag,Maandag,Dinsdag,Woensdag,Donderdag,Vrijdag,Zaterdag,Zondag","months_short":"Jan,Feb,Mar,Apr,Mei,Jun,Jul,Aug,Sep,Okt,Nov,Dec","months_long":"Januari,Februari,Maart,April,Mei,Juni,Juli,Augustus,September,Oktober,November,December","inserttime_desc":"Tijd invoegen","insertdate_desc":"Datum invoegen","time_fmt":"%H:%M:%S","date_fmt":"%d-%m-%Y"},print:{"print_desc":"Afdrukken"},preview:{"preview_desc":"Voorbeeld"},directionality:{"rtl_desc":"Van rechts naar links","ltr_desc":"Van links naar rechts"},layer:{content:"Nieuwe laag...","absolute_desc":"Absoluut positioneren inschakelen","backward_desc":"Vorige laag","forward_desc":"Volgende laag","insertlayer_desc":"Nieuwe laag invoegen"},save:{"save_desc":"Opslaan","cancel_desc":"Alle wijzigingen annuleren"},nonbreaking:{"nonbreaking_desc":"Harde spatie invoegen"},iespell:{download:"ieSpell niet gevonden. Wilt u deze nu installeren?","iespell_desc":"Spellingcontrole"},advhr:{"advhr_desc":"Scheidingslijn","delta_height":"","delta_width":""},emotions:{"emotions_desc":"Emoties","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"Zoeken/Vervangen","search_desc":"Zoeken","delta_width":"","delta_height":""},advimage:{"image_desc":"Afbeelding invoegen/bewerken","delta_width":"","delta_height":""},advlink:{"link_desc":"Link invoegen/bewerken","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"Attributen invoegen/bewerken","ins_desc":"Ingevoegd","del_desc":"Verwijderd","acronym_desc":"Synoniem","abbr_desc":"Afkorting","cite_desc":"Citaat","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"CSS Stijl bewerken","delta_height":"","delta_width":""},paste:{"plaintext_mode":"Plakken is nu in plattetekstmodus. Klik nog een keer om terug te gaan naar normaal plakken.","plaintext_mode_sticky":"Plakken is nu in plattetekstmodus. Klik nog een keer om terug te gaan naar normaal plakken. Nadat u iets plakt, keert u terug naar normaal plakken.","selectall_desc":"Alles selecteren","paste_word_desc":"Vanuit Word plakken","paste_text_desc":"Als platte tekst plakken"},"paste_dlg":{"word_title":"Gebruik Ctrl+V om tekst in het venster te plakken.","text_linebreaks":"Regelafbreking bewaren","text_title":"Gebruik Ctrl+V om tekst in het venster te plakken."},table:{cell:"Cel",col:"Kolom",row:"Rij",del:"Tabel verwijderen","copy_row_desc":"Rij kopi\u00ebren","cut_row_desc":"Rij knippen","paste_row_after_desc":"Rij onder plakken","paste_row_before_desc":"Rij boven plakken","props_desc":"Tabeleigenschappen","cell_desc":"Cel-eigenschappen","row_desc":"Rij-eigenschappen","merge_cells_desc":"Cellen samenvoegen","split_cells_desc":"Cellen splitsen","delete_col_desc":"Kolom verwijderen","col_after_desc":"Kolom rechts invoegen","col_before_desc":"Kolom links invoegen","delete_row_desc":"Rij verwijderen","row_after_desc":"Rij onder invoegen","row_before_desc":"Rij boven invoegen",desc:"Tabel invoegen/bewerken","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"Als u de opgeslagen inhoud laadt, verliest u de inhoud die zich momenteel in de editor bevindt.\n\nWeet u zeker dat u de opgeslagen inhoud wilt laden?","restore_content":"Automatisch opgeslagen inhoud laden.","unload_msg":"De wijzigingen zullen verloren gaan als u nu deze pagina verlaat."},fullscreen:{desc:"Volledig scherm"},media:{edit:"Media bewerken",desc:"Media invoegen/bewerken","delta_height":"","delta_width":""},fullpage:{desc:"Documenteigenschappen","delta_width":"","delta_height":""},template:{desc:"Voorgedefinieerd sjabloon invoegen"},visualchars:{desc:"Zichtbare symbolen"},spellchecker:{desc:"Spellingcontrole",menu:"Instellingen spellingcontrole","ignore_word":"Woord negeren","ignore_words":"Alles negeren",langs:"Talen",wait:"Een ogenblik geduld\u2026",sug:"Suggesties","no_sug":"Geen suggesties","no_mpell":"Geen spelfouten gevonden.","learn_word":"Woord toevoegen aan spellingscontrole"},pagebreak:{desc:"Pagina-einde invoegen"},advlist:{types:"Types",def:"Standaard","lower_alpha":"Alfa (klein)","lower_greek":"Griekse letters (klein)","lower_roman":"Romeinse letters (klein)","upper_alpha":"Alfa (groot)","upper_roman":"Romeinse letters (groot)",circle:"Cirkel",disc:"Schijf",square:"Vierkant"},colors:{"333300":"Donkerolijf","993300":"Gebrand oranje","000000":"Zwart","003300":"Donkergroen","003366":"Donkerazuur","000080":"Marineblauw","333399":"Indigo","333333":"Heel donkergrijs","800000":"Kastanjebruin",FF6600:"Oranje","808000":"Olijf","008000":"Groen","008080":"Teal","0000FF":"Blauw","666699":"Grijsblauw","808080":"Grijs",FF0000:"Rood",FF9900:"Amber","99CC00":"Geelgroen","339966":"Zeegroen","33CCCC":"Turkoois","3366FF":"Koningsblauw","800080":"Paars","999999":"Middengrijs",FF00FF:"Magenta",FFCC00:"Goud",FFFF00:"Geel","00FF00":"Limoen","00FFFF":"Aqua","00CCFF":"Hemelsblauw","993366":"Bruin",C0C0C0:"Zilver",FF99CC:"Roze",FFCC99:"Perzik",FFFF99:"Lichtgeel",CCFFCC:"Bleekgroen",CCFFFF:"Bleekcyaan","99CCFF":"Licht hemelsblauw",CC99FF:"Pruim",FFFFFF:"Wit"},aria:{"rich_text_area":"Tekst met opmaak"},wordcount:{words:"Aantal woorden:"}}}); \ No newline at end of file
diff --git a/program/js/tiny_mce/langs/sk.js b/program/js/tiny_mce/langs/sk.js
index d3398ba1a..f25f268ac 100644
--- a/program/js/tiny_mce/langs/sk.js
+++ b/program/js/tiny_mce/langs/sk.js
@@ -1 +1 @@
-tinyMCE.addI18n({sk:{common:{"more_colors":"Viac farieb...","invalid_data":"Chyba: Boli zadan\u00e9 neplatn\u00e9 hodnoty a tieto boli ozna\u010den\u00e9 \u010dervenou farbou.","popup_blocked":"Blokovanie vyskakovac\u00edch okien neumo\u017enilo otvori\u0165 okno, ktor\u00e9 poskytuje funk\u010dnos\u0165 aplik\u00e1cie. Pre pln\u00e9 vyu\u017eitie mo\u017enost\u00ed aplik\u00e1cie mus\u00edte vypn\u00fa\u0165 blokovanie vyskakovac\u00edch okien pre tento web.","clipboard_no_support":"T\u00e1to funkcia nie je va\u0161\u00edm prehliada\u010dom podporovan\u00e1. Pou\u017eite namiesto toho kl\u00e1vesov\u00fa skratku.","clipboard_msg":"Funkcie kop\u00edrova\u0165/vystrihn\u00fa\u0165/vlo\u017ei\u0165 nie s\u00fa prehliada\u010dom Mozilla Firefox podporovan\u00e9.\nChcete viac inform\u00e1ci\u00ed o tomto probl\u00e9me?","not_set":"-- Nezadan\u00e9 --","class_name":"Trieda",browse:"Prech\u00e1dza\u0165",close:"Zavrie\u0165",cancel:"Storno",update:"Aktualizova\u0165",insert:"Vlo\u017ei\u0165",apply:"Pou\u017ei\u0165","edit_confirm":"Chcete pou\u017ei\u0165 WYSIWYG re\u017eim pre tento text?","invalid_data_number":"{#field} mus\u00ed by\u0165 \u010d\u00edslo","invalid_data_min":"{#field} mus\u00ed by\u0165 \u010d\u00edslo v\u00e4\u010d\u0161ie ako {#min}","invalid_data_size":"{#field} mus\u00ed by\u0165 \u010d\u00edslo lebo percento",value:"(hodnota)"},contextmenu:{full:"Do bloku",right:"Doprava",center:"Na stred",left:"Do\u013eava",align:"Zarovnanie"},insertdatetime:{"day_short":"Ne,Po,Ut,St,\u0160t,Pi,So,Ne","day_long":"Nede\u013ea,Pondelok,Utorok,Streda,\u0160tvrtok,Piatok,Sobota,Nede\u013ea","months_short":"Jan,Feb,Mar,Apr,M\u00e1j,J\u00fan,J\u00fal,Aug,Sep,Okt,Nov,Dec","months_long":"Janu\u00e1r,Febru\u00e1r,Marec,Apr\u00edl,M\u00e1j,J\u00fan,J\u00fal,August,September,Okt\u00f3ber,November,December","inserttime_desc":"Vlo\u017ei\u0165 \u010das","insertdate_desc":"Vlo\u017ei\u0165 d\u00e1tum","time_fmt":"%H:%M:%S","date_fmt":"%d.%m.%Y"},print:{"print_desc":"Tla\u010d"},preview:{"preview_desc":"N\u00e1h\u013ead"},directionality:{"rtl_desc":"Smer sprava do\u013eava","ltr_desc":"Smer z\u013eava doprava"},layer:{content:"Nov\u00e1 vrstva...","absolute_desc":"Prepn\u00fa\u0165 na absol\u00fatne poz\u00edciovanie","backward_desc":"Presun\u00fa\u0165 dozadu","forward_desc":"Presun\u00fa\u0165 dopredu","insertlayer_desc":"Vlo\u017ei\u0165 nov\u00fa vrstvu"},save:{"save_desc":"Ulo\u017ei\u0165","cancel_desc":"Zru\u0161i\u0165 v\u0161etky zmeny"},nonbreaking:{"nonbreaking_desc":"Vlo\u017ei\u0165 nerozdelite\u013en\u00fa medzeru"},iespell:{download:"Pr\u00edtomnos\u0165 slovn\u00edkaieSpell nebola zisten\u00e1. Chcete slovn\u00edk nain\u0161talova\u0165?","iespell_desc":"Spusti\u0165 kontrolu pravopisu"},advhr:{"advhr_desc":"Vodorovn\u00fd odde\u013eova\u010d","delta_height":"","delta_width":""},emotions:{"emotions_desc":"Emotikony","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"H\u013eada\u0165 a nahradi\u0165","search_desc":"H\u013eada\u0165","delta_width":"","delta_height":""},advimage:{"delta_width":"40","image_desc":"Vlo\u017ei\u0165/upravi\u0165 obr\u00e1zok","delta_height":""},advlink:{"link_desc":"Vlo\u017ei\u0165/upravi\u0165 odkaz","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"Vlo\u017ei\u0165/upravi\u0165 atrib\u00faty","ins_desc":"Pridan\u00fd text","del_desc":"Odstr\u00e1nen\u00fd text","acronym_desc":"Akronym","abbr_desc":"Skratka","cite_desc":"Cit\u00e1cia","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{"delta_width":"35",desc:"Upravi\u0165 CSS \u0161t\u00fdl","delta_height":""},paste:{"plaintext_mode":"Funkcia vlo\u017ei\u0165 je teraz v re\u017eime prost\u00fd text. Op\u00e4tovn\u00e9 kliknutie prepne t\u00fato funkciu nasp\u00e4\u0165 do norm\u00e1lneho re\u017eimu.","plaintext_mode_sticky":"Funkcia vlo\u017ei\u0165 je teraz v re\u017eime prost\u00fd text. Op\u00e4tovn\u00e9 kliknutie prepne t\u00fato funkciu nasp\u00e4\u0165 do norm\u00e1lneho re\u017eimu. Po vlo\u017een\u00ed \u010dohoko\u013evek bude t\u00e1to funkcia navr\u00e1ten\u00e1 sp\u00e4\u0165 do norm\u00e1lneho re\u017eimu.","selectall_desc":"Ozna\u010di\u0165 v\u0161etko","paste_word_desc":"Vlo\u017ei\u0165 z MS Word","paste_text_desc":"Vlo\u017ei\u0165 ako prost\u00fd text"},"paste_dlg":{"word_title":"Pou\u017eite CTRL+V pre vlo\u017eenie textu do okna.","text_linebreaks":"Zachova\u0165 zalamovanie riadkov","text_title":"Pou\u017eite CTRL+V pre vlo\u017eenie textu do okna."},table:{"table_delta_width":"50","cellprops_delta_width":"105",cell:"Bunka",col:"St\u013apec",row:"Riadok",del:"Odstr\u00e1ni\u0165 tabu\u013eku","copy_row_desc":"Kop\u00edrova\u0165 riadok tabu\u013eky","cut_row_desc":"Vystrihn\u00fa\u0165 riadok tabu\u013eky","paste_row_after_desc":"Vlo\u017ei\u0165 riadok za","paste_row_before_desc":"Vlo\u017ei\u0165 riadok pred","props_desc":"Vlastnosti tabu\u013eky","cell_desc":"Vlastnosti bunky","row_desc":"Vlastnosti riadky tabu\u013eky","merge_cells_desc":"Zl\u00fa\u010di\u0165 bunky","split_cells_desc":"Rozdeli\u0165 bunky","delete_col_desc":"Odstr\u00e1ni\u0165 st\u013apec tabu\u013eky","col_after_desc":"Vlo\u017ei\u0165 st\u013apec za","col_before_desc":"Vlo\u017ei\u0165 st\u013apec pred","delete_row_desc":"Odstr\u00e1ni\u0165 riadok tabu\u013eky","row_after_desc":"Vlo\u017ei\u0165 riadok za","row_before_desc":"Vlo\u017ei\u0165 riadok pred",desc:"Vlo\u017ei\u0165 nov\u00fa tabu\u013eku","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","cellprops_delta_height":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"Pokia\u013e obnov\u00edte ulo\u017een\u00fd obsah, strat\u00edte t\u00fdm v\u0161etok obsah, ktor\u00fd je pr\u00e1ve v okne editora.\n\nSkuto\u010dne chcete obnovi\u0165 ulo\u017een\u00fd obsah?","restore_content":"Obnovi\u0165 automaticky ulo\u017een\u00fd obsah.","unload_msg":"Preveden\u00e9 zmeny m\u00f4\u017eu by\u0165 straten\u00e9, ak opust\u00edte t\u00fato str\u00e1nku."},fullscreen:{desc:"Prepn\u00fa\u0165 na celostr\u00e1nkov\u00e9 zobrazenie"},media:{"delta_width":"180",edit:"Upravi\u0165 m\u00e9di\u00e1",desc:"Vlo\u017ei\u0165/upravi\u0165 m\u00e9di\u00e1","delta_height":""},fullpage:{desc:"Vlastnosti dokumentu","delta_width":"","delta_height":""},template:{desc:"Vlo\u017ei\u0165 preddefinovan\u00fd obsah zo \u0161abl\u00f3ny"},visualchars:{desc:"Zobrazenie skryt\u00fdch znakov zap/vyp"},spellchecker:{desc:"Prepn\u00fa\u0165 kontrolu pravopisu",menu:"Nastavenie kontroly pravopisu","ignore_word":"Vynecha\u0165 slovo","ignore_words":"Vynecha\u0165 v\u0161etky",langs:"Jazyky",wait:"\u010cakajte pros\u00edm...",sug:"Ponuky","no_sug":"\u017diadne ponuky","no_mpell":"Bez pravopisn\u00fdch ch\u00fdb.","learn_word":"Nau\u010di\u0165 slovo"},pagebreak:{desc:"Vlo\u017ei\u0165 zalomenie str\u00e1nky."},advlist:{types:"Typ",def:"Predvolen\u00fd","lower_alpha":"Mal\u00e9 p\u00edsmen\u00e1","lower_greek":"Mal\u00e9 gr\u00e9cke p\u00edsmen\u00e1","lower_roman":"Mal\u00e9 r\u00edmske \u010d\u00edslice","upper_alpha":"Ve\u013ek\u00e9 p\u00edsmen\u00e1","upper_roman":"Ve\u013ek\u00e9 r\u00edmske \u010d\u00edslice",circle:"Kr\u00fa\u017eok",disc:"Pln\u00e9 koliesko",square:"\u0160tvor\u010dek"},colors:{"333300":"Tmavo olivov\u00e1","993300":"Tmavo oran\u017eov\u00e1","000000":"\u010cierna","003300":"Tmavo zelen\u00e1","003366":"Tmavo az\u00farov\u00e1","000080":"N\u00e1morn\u00edcka modr\u00e1","333399":"Indigo modr\u00e1","333333":"Tmavo siv\u00e1","800000":"Tmavo \u010derven\u00e1",FF6600:"Oran\u017eov\u00e1","808000":"Olivov\u00e1","008000":"Zelen\u00e1","008080":"Modrozelen\u00e1","0000FF":"Modr\u00e1","666699":"\u0160edomodr\u00e1","808080":"Siv\u00e1",FF0000:"\u010cerven\u00e1",FF9900:"Jant\u00e1rov\u00e1","99CC00":"\u017dltozelen\u00e1","339966":"Morsky zelen\u00e1","33CCCC":"Tyrkysov\u00e1","3366FF":"Kr\u00e1\u013eovsk\u00e1 modr\u00e1","800080":"Nachov\u00e1","999999":"Svetlo siv\u00e1",FF00FF:"Purpurov\u00e1",FFCC00:"Zlat\u00e1",FFFF00:"\u017dlt\u00e1","00FF00":"Limetkov\u00e1","00FFFF":"Vodov\u00e1","00CCFF":"Nebesk\u00e1 modr\u00e1","993366":"Hned\u00e1",C0C0C0:"Strieborn\u00e1",FF99CC:"Ru\u017eov\u00e1",FFCC99:"Brosky\u0148ov\u00e1",FFFF99:"Svetlo\u017elt\u00e1",CCFFCC:"Svetlo zelen\u00e1",CCFFFF:"Svetlo az\u00farov\u00e1","99CCFF":"Svetl\u00e1 nebesk\u00e1 modr\u00e1",CC99FF:"Slivkov\u00e1",FFFFFF:"Biela"},aria:{"rich_text_area":"Oblas\u0165 s form\u00e1tovan\u00fdm textom"},wordcount:{words:"Po\u010det slov: "}}}); \ No newline at end of file
+tinyMCE.addI18n({sk:{common:{"more_colors":"Viac farieb...","invalid_data":"Chyba: Boli zadan\u00e9 neplatn\u00e9 hodnoty a tieto boli ozna\u010den\u00e9 \u010dervenou farbou.","popup_blocked":"Blokovanie vyskakovac\u00edch okien neumo\u017enilo otvori\u0165 okno, ktor\u00e9 poskytuje funk\u010dnos\u0165 aplik\u00e1cie. Pre pln\u00e9 vyu\u017eitie mo\u017enost\u00ed aplik\u00e1cie mus\u00edte vypn\u00fa\u0165 blokovanie vyskakovac\u00edch okien pre tento web.","clipboard_no_support":"T\u00e1to funkcia nie je va\u0161\u00edm prehliada\u010dom podporovan\u00e1. Pou\u017eite namiesto toho kl\u00e1vesov\u00fa skratku.","clipboard_msg":"Funkcie kop\u00edrova\u0165/vystrihn\u00fa\u0165/vlo\u017ei\u0165 nie s\u00fa prehliada\u010dom Mozilla Firefox podporovan\u00e9.\nChcete viac inform\u00e1ci\u00ed o tomto probl\u00e9me?","not_set":"-- Nezadan\u00e9 --","class_name":"Trieda",browse:"Prech\u00e1dza\u0165",close:"Zavrie\u0165",cancel:"Storno",update:"Aktualizova\u0165",insert:"Vlo\u017ei\u0165",apply:"Pou\u017ei\u0165","edit_confirm":"Chcete pou\u017ei\u0165 WYSIWYG re\u017eim pre tento text?","invalid_data_number":"{#field} mus\u00ed by\u0165 \u010d\u00edslo","invalid_data_min":"{#field} mus\u00ed by\u0165 \u010d\u00edslo v\u00e4\u010d\u0161ie ako {#min}","invalid_data_size":"{#field} mus\u00ed by\u0165 \u010d\u00edslo lebo percento",value:"(hodnota)"},contextmenu:{full:"Do bloku",right:"Doprava",center:"Na stred",left:"Do\u013eava",align:"Zarovnanie"},insertdatetime:{"day_short":"Ne,Po,Ut,St,\u0160t,Pi,So,Ne","day_long":"Nede\u013ea,Pondelok,Utorok,Streda,\u0160tvrtok,Piatok,Sobota,Nede\u013ea","months_short":"Jan,Feb,Mar,Apr,M\u00e1j,J\u00fan,J\u00fal,Aug,Sep,Okt,Nov,Dec","months_long":"Janu\u00e1r,Febru\u00e1r,Marec,Apr\u00edl,M\u00e1j,J\u00fan,J\u00fal,August,September,Okt\u00f3ber,November,December","inserttime_desc":"Vlo\u017ei\u0165 \u010das","insertdate_desc":"Vlo\u017ei\u0165 d\u00e1tum","time_fmt":"%H:%M:%S","date_fmt":"%d.%m.%Y"},print:{"print_desc":"Tla\u010d"},preview:{"preview_desc":"N\u00e1h\u013ead"},directionality:{"rtl_desc":"Smer sprava do\u013eava","ltr_desc":"Smer z\u013eava doprava"},layer:{content:"Nov\u00e1 vrstva...","absolute_desc":"Prepn\u00fa\u0165 na absol\u00fatne poz\u00edciovanie","backward_desc":"Presun\u00fa\u0165 dozadu","forward_desc":"Presun\u00fa\u0165 dopredu","insertlayer_desc":"Vlo\u017ei\u0165 nov\u00fa vrstvu"},save:{"save_desc":"Ulo\u017ei\u0165","cancel_desc":"Zru\u0161i\u0165 v\u0161etky zmeny"},nonbreaking:{"nonbreaking_desc":"Vlo\u017ei\u0165 nerozdelite\u013en\u00fa medzeru"},iespell:{download:"Pr\u00edtomnos\u0165 slovn\u00edkaieSpell nebola zisten\u00e1. Chcete slovn\u00edk nain\u0161talova\u0165?","iespell_desc":"Spusti\u0165 kontrolu pravopisu"},advhr:{"advhr_desc":"Vodorovn\u00fd odde\u013eova\u010d","delta_height":"","delta_width":""},emotions:{"emotions_desc":"Emotikony","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"H\u013eada\u0165 a nahradi\u0165","search_desc":"H\u013eada\u0165","delta_width":"","delta_height":""},advimage:{"delta_width":"40","image_desc":"Vlo\u017ei\u0165/upravi\u0165 obr\u00e1zok","delta_height":""},advlink:{"link_desc":"Vlo\u017ei\u0165/upravi\u0165 odkaz","delta_height":"","delta_width":""},xhtmlxtras:{"attribs_desc":"Vlo\u017ei\u0165/upravi\u0165 atrib\u00faty","ins_desc":"Pridan\u00fd text","del_desc":"Odstr\u00e1nen\u00fd text","acronym_desc":"Akronym","abbr_desc":"Skratka","cite_desc":"Cit\u00e1cia","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{"delta_width":"35",desc:"Upravi\u0165 CSS \u0161t\u00fdl","delta_height":""},paste:{"plaintext_mode":"Funkcia vlo\u017ei\u0165 je teraz v re\u017eime prost\u00fd text. Op\u00e4tovn\u00e9 kliknutie prepne t\u00fato funkciu nasp\u00e4\u0165 do norm\u00e1lneho re\u017eimu.","plaintext_mode_sticky":"Funkcia vlo\u017ei\u0165 je teraz v re\u017eime prost\u00fd text. Op\u00e4tovn\u00e9 kliknutie prepne t\u00fato funkciu nasp\u00e4\u0165 do norm\u00e1lneho re\u017eimu. Po vlo\u017een\u00ed \u010dohoko\u013evek bude t\u00e1to funkcia navr\u00e1ten\u00e1 sp\u00e4\u0165 do norm\u00e1lneho re\u017eimu.","selectall_desc":"Ozna\u010di\u0165 v\u0161etko","paste_word_desc":"Vlo\u017ei\u0165 z MS Word","paste_text_desc":"Vlo\u017ei\u0165 ako prost\u00fd text"},"paste_dlg":{"word_title":"Pou\u017eite CTRL+V pre vlo\u017eenie textu do okna.","text_linebreaks":"Zachova\u0165 zalamovanie riadkov","text_title":"Pou\u017eite CTRL+V pre vlo\u017eenie textu do okna."},table:{"table_delta_width":"50","cellprops_delta_width":"105",cell:"Bunka",col:"St\u013apec",row:"Riadok",del:"Odstr\u00e1ni\u0165 tabu\u013eku","copy_row_desc":"Kop\u00edrova\u0165 riadok tabu\u013eky","cut_row_desc":"Vystrihn\u00fa\u0165 riadok tabu\u013eky","paste_row_after_desc":"Vlo\u017ei\u0165 riadok za","paste_row_before_desc":"Vlo\u017ei\u0165 riadok pred","props_desc":"Vlastnosti tabu\u013eky","cell_desc":"Vlastnosti bunky","row_desc":"Vlastnosti riadky tabu\u013eky","merge_cells_desc":"Zl\u00fa\u010di\u0165 bunky","split_cells_desc":"Rozdeli\u0165 bunky","delete_col_desc":"Odstr\u00e1ni\u0165 st\u013apec tabu\u013eky","col_after_desc":"Vlo\u017ei\u0165 st\u013apec za","col_before_desc":"Vlo\u017ei\u0165 st\u013apec pred","delete_row_desc":"Odstr\u00e1ni\u0165 riadok tabu\u013eky","row_after_desc":"Vlo\u017ei\u0165 riadok za","row_before_desc":"Vlo\u017ei\u0165 riadok pred",desc:"Vlo\u017ei\u0165 nov\u00fa tabu\u013eku","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","cellprops_delta_height":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"Pokia\u013e obnov\u00edte ulo\u017een\u00fd obsah, strat\u00edte t\u00fdm v\u0161etok obsah, ktor\u00fd je pr\u00e1ve v okne editora.\n\nSkuto\u010dne chcete obnovi\u0165 ulo\u017een\u00fd obsah?","restore_content":"Obnovi\u0165 automaticky ulo\u017een\u00fd obsah.","unload_msg":"Preveden\u00e9 zmeny m\u00f4\u017eu by\u0165 straten\u00e9, ak opust\u00edte t\u00fato str\u00e1nku."},fullscreen:{desc:"Prepn\u00fa\u0165 na celostr\u00e1nkov\u00e9 zobrazenie"},media:{"delta_width":"180",edit:"Upravi\u0165 pripojen\u00e9 m\u00e9di\u00e1",desc:"Vlo\u017ei\u0165/upravi\u0165 m\u00e9di\u00e1","delta_height":""},fullpage:{desc:"Vlastnosti dokumentu","delta_width":"","delta_height":""},template:{desc:"Vlo\u017ei\u0165 preddefinovan\u00fd obsah zo \u0161abl\u00f3ny"},visualchars:{desc:"Zobrazenie skryt\u00fdch znakov zap/vyp"},spellchecker:{desc:"Prepn\u00fa\u0165 kontrolu pravopisu",menu:"Nastavenie kontroly pravopisu","ignore_word":"Vynecha\u0165 slovo","ignore_words":"Vynecha\u0165 v\u0161etky",langs:"Jazyky",wait:"\u010cakajte pros\u00edm...",sug:"Ponuky","no_sug":"\u017diadne ponuky","no_mpell":"Bez pravopisn\u00fdch ch\u00fdb.","learn_word":"Nau\u010di\u0165 slovo"},pagebreak:{desc:"Vlo\u017ei\u0165 zalomenie str\u00e1nky."},advlist:{types:"Typ",def:"Predvolen\u00fd","lower_alpha":"Mal\u00e9 p\u00edsmen\u00e1","lower_greek":"Mal\u00e9 gr\u00e9cke p\u00edsmen\u00e1","lower_roman":"Mal\u00e9 r\u00edmske \u010d\u00edslice","upper_alpha":"Ve\u013ek\u00e9 p\u00edsmen\u00e1","upper_roman":"Ve\u013ek\u00e9 r\u00edmske \u010d\u00edslice",circle:"Kr\u00fa\u017eok",disc:"Pln\u00e9 koliesko",square:"\u0160tvor\u010dek"},colors:{"333300":"Tmavo olivov\u00e1","993300":"Tmavo oran\u017eov\u00e1","000000":"\u010cierna","003300":"Tmavo zelen\u00e1","003366":"Tmavo az\u00farov\u00e1","000080":"N\u00e1morn\u00edcka modr\u00e1","333399":"Indigo modr\u00e1","333333":"Tmavo siv\u00e1","800000":"Tmavo \u010derven\u00e1",FF6600:"Oran\u017eov\u00e1","808000":"Olivov\u00e1","008000":"Zelen\u00e1","008080":"Modrozelen\u00e1","0000FF":"Modr\u00e1","666699":"\u0160edomodr\u00e1","808080":"Siv\u00e1",FF0000:"\u010cerven\u00e1",FF9900:"Jant\u00e1rov\u00e1","99CC00":"\u017dltozelen\u00e1","339966":"Morsky zelen\u00e1","33CCCC":"Tyrkysov\u00e1","3366FF":"Kr\u00e1\u013eovsk\u00e1 modr\u00e1","800080":"Nachov\u00e1","999999":"Svetlo siv\u00e1",FF00FF:"Purpurov\u00e1",FFCC00:"Zlat\u00e1",FFFF00:"\u017dlt\u00e1","00FF00":"Limetkov\u00e1","00FFFF":"Vodov\u00e1","00CCFF":"Nebesk\u00e1 modr\u00e1","993366":"Hned\u00e1",C0C0C0:"Strieborn\u00e1",FF99CC:"Ru\u017eov\u00e1",FFCC99:"Brosky\u0148ov\u00e1",FFFF99:"Svetlo\u017elt\u00e1",CCFFCC:"Svetlo zelen\u00e1",CCFFFF:"Svetlo az\u00farov\u00e1","99CCFF":"Svetl\u00e1 nebesk\u00e1 modr\u00e1",CC99FF:"Slivkov\u00e1",FFFFFF:"Biela"},aria:{"rich_text_area":"Oblas\u0165 s form\u00e1tovan\u00fdm textom"},wordcount:{words:"Po\u010det slov: "}}}); \ No newline at end of file
diff --git a/program/js/tiny_mce/langs/uk.js b/program/js/tiny_mce/langs/uk.js
index be34868f6..514b66be9 100644
--- a/program/js/tiny_mce/langs/uk.js
+++ b/program/js/tiny_mce/langs/uk.js
@@ -1 +1 @@
-tinyMCE.addI18n({uk:{common:{"more_colors":"\u0411\u0456\u043b\u044c\u0448\u0435 \u043a\u043e\u043b\u044c\u043e\u0440\u0456\u0432","invalid_data":"\u041f\u043e\u043c\u0438\u043b\u043a\u0430: \u0412\u0432\u0435\u0434\u0435\u043d\u043e \u043f\u043e\u043c\u0438\u043b\u043a\u043e\u0432\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f, \u0432\u0456\u0434\u043c\u0456\u0447\u0435\u043d\u0435 \u0447\u0435\u0440\u0432\u043e\u043d\u0438\u043c.","popup_blocked":"\u0414\u0443\u0436\u0435 \u043f\u0440\u0438\u043a\u0440\u043e, \u0430\u043b\u0435 \u0432\u0430\u0448 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0437\u0430\u0431\u043b\u043e\u043a\u0443\u0432\u0430\u0432 \u0432\u0438\u0440\u0438\u043d\u0430\u044e\u0447\u0435 \u0432\u0456\u043a\u043d\u043e. \u0411\u0443\u0434\u044c \u043b\u0430\u0441\u043a\u0430, \u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0439\u0442\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0442\u0430\u043a, \u0449\u043e\u0431 \u0432\u0456\u043d \u0434\u043e\u0437\u0432\u043e\u043b\u044f\u0432 \u0432\u0438\u0440\u0438\u043d\u0430\u044e\u0447\u0456 \u0432\u0456\u043a\u043d\u0430 \u0437 \u0446\u044c\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0443.","clipboard_no_support":"\u041d\u0430\u0440\u0430\u0437\u0456 \u0446\u044f \u0444\u0443\u043d\u043a\u0446\u0456\u044f \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0432 \u0432\u0430\u0448\u043e\u043c\u0443 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0456, \u0430\u043b\u0435 \u0432\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u043a\u043b\u0430\u0432\u0456\u0430\u0442\u0443\u0440\u0443 \u0437\u0430\u043c\u0456\u0441\u0442\u044c \u0446\u044c\u043e\u0433\u043e.","clipboard_msg":"\u041a\u043e\u043f\u0456\u044e\u0432\u0430\u0442\u0438/\u0412\u0438\u0440\u0456\u0437\u0430\u0442\u0438/\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0432 Mozilla \u0442\u0430 Firefox.\n\u0412\u0430\u043c \u0446\u0456\u043a\u0430\u0432\u0430 \u0456\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0456\u044f \u043f\u0440\u043e \u0446\u0435?","not_set":"-- \u043d\u0435 \u0432\u0438\u0431\u0440\u0430\u043d\u043e --","class_name":"\u041a\u043b\u0430\u0441",browse:"\u041f\u0435\u0440\u0435\u0433\u043b\u044f\u0434",close:"\u0417\u0430\u043a\u0440\u0438\u0442\u0438",cancel:"\u0412\u0456\u0434\u043c\u0456\u043d\u0438\u0442\u0438",update:"\u041e\u043d\u043e\u0432\u0438\u0442\u0438",insert:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438",apply:"\u0417\u0430\u0441\u0442\u043e\u0441\u0443\u0432\u0430\u0442\u0438","edit_confirm":"\u0412\u0438 \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 WYSIWYG \u0440\u0435\u0436\u0438\u043c \u0434\u043b\u044f \u0446\u044c\u043e\u0433\u043e \u043f\u043e\u043b\u044f?","invalid_data_number":"{#field} \u043f\u043e\u0432\u0438\u043d\u043d\u0435 \u0431\u0443\u0442\u0438 \u0447\u0438\u0441\u043b\u043e\u043c","invalid_data_min":"{#field} \u0447\u0438\u0441\u043b\u043e \u043f\u043e\u0432\u0438\u043d\u043d\u0435 \u0431\u0443\u0442\u0438 \u0431\u0456\u043b\u044c\u0448\u0435 \u043d\u0456\u0436 {#min}","invalid_data_size":"{#field} \u043f\u043e\u0432\u0438\u043d\u043d\u0435 \u0431\u0443\u0442\u0438 \u0447\u0438\u0441\u043b\u043e\u043c \u0430\u0431\u043e \u0432\u0456\u0434\u0441\u043e\u0442\u043a\u043e\u043c",value:"(value)"},contextmenu:{full:"\u041f\u043e \u0448\u0438\u0440\u0438\u043d\u0456",right:"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e",center:"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443",left:"\u041f\u043e \u043b\u0456\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e",align:"\u0412\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f"},insertdatetime:{"day_short":"\u041d\u0434,\u041f\u043d,\u0412\u0442,\u0421\u0440,\u0427\u0442,\u041f\u0442,\u0421\u0431,\u041d\u0434","day_long":"\u041d\u0435\u0434\u0456\u043b\u044f,\u041f\u043e\u043d\u0435\u0434\u0456\u043b\u043e\u043a,\u0412\u0456\u0432\u0442\u043e\u0440\u043e\u043a,\u0421\u0435\u0440\u0435\u0434\u0430,\u0427\u0435\u0442\u0432\u0435\u0440,\u041f\'\u044f\u0442\u043d\u0438\u0446\u044f,\u0421\u0443\u0431\u043e\u0442\u0430,\u041d\u0435\u0434\u0456\u043b\u044f","months_short":"\u0421\u0456\u0447,\u041b\u044e\u0442,\u0411\u0435\u0440,\u041a\u0432\u0456,\u0422\u0440\u0430,\u0427\u0435\u0440,\u041b\u0438\u043f,\u0421\u0435\u0440,\u0412\u0435\u0440,\u0416\u043e\u0432,\u041b\u0438\u0441,\u0413\u0440\u0443","months_long":"\u0421\u0456\u0447\u0435\u043d\u044c,\u041b\u044e\u0442\u0438\u0439,\u0411\u0435\u0440\u0435\u0437\u0435\u043d\u044c,\u041a\u0432\u0456\u0442\u0435\u043d\u044c,\u0422\u0440\u0430\u0432\u0435\u043d\u044c,\u0427\u0435\u0440\u0432\u0435\u043d\u044c,\u041b\u0438\u043f\u0435\u043d\u044c,\u0421\u0435\u0440\u043f\u0435\u043d\u044c,\u0412\u0435\u0440\u0435\u0441\u0435\u043d\u044c,\u0416\u043e\u0432\u0442\u0435\u043d\u044c,\u041b\u0438\u0441\u0442\u043e\u043f\u0430\u0434,\u0413\u0440\u0443\u0434\u0435\u043d\u044c","inserttime_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0447\u0430\u0441","insertdate_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0434\u0430\u0442\u0443","time_fmt":"%H:%M:%S","date_fmt":"%d.%m.%Y"},print:{"print_desc":"\u0414\u0440\u0443\u043a\u0443\u0432\u0430\u0442\u0438"},preview:{"preview_desc":"\u041f\u0435\u0440\u0435\u0433\u043b\u044f\u0434"},directionality:{"rtl_desc":"\u041d\u0430\u043f\u0440\u044f\u043c \u0441\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0456\u0432\u043e","ltr_desc":"\u041d\u0430\u043f\u0440\u044f\u043c \u0437\u043b\u0456\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e"},layer:{content:"\u041d\u043e\u0432\u0438\u0439 \u043f\u0440\u043e\u0448\u0430\u0440\u043e\u043a...","absolute_desc":"\u041f\u0435\u0440\u0435\u043c\u0438\u043a\u043d\u0443\u0442\u0438 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0435 \u043f\u043e\u0437\u0438\u0446\u0456\u044e\u0432\u0430\u043d\u043d\u044f","backward_desc":"\u041f\u0435\u0440\u0435\u043c\u0456\u0441\u0442\u0438\u0442\u0438 \u043d\u0430\u0437\u0430\u0434","forward_desc":"\u041f\u0435\u0440\u0435\u043c\u0456\u0441\u0442\u0438\u0442\u0438 \u0432\u043f\u0435\u0440\u0435\u0434","insertlayer_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043d\u043e\u0432\u0438\u0439 \u043f\u0440\u043e\u0448\u0430\u0440\u043e\u043a"},save:{"save_desc":"\u0417\u0431\u0435\u0440\u0435\u0433\u0442\u0438","cancel_desc":"\u0412\u0456\u0434\u043c\u0456\u043d\u0438\u0442\u0438 \u0432\u0441\u0456 \u0437\u043c\u0456\u043d\u0438"},nonbreaking:{"nonbreaking_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043d\u0435\u0440\u043e\u0437\u0440\u0438\u0432\u043d\u0438\u0439 \u043f\u0440\u043e\u043c\u0456\u0436\u043e\u043a"},iespell:{download:"\u0414\u043e\u0434\u0430\u0442\u043e\u043a ieSpell \u043d\u0435 \u0437\u043d\u0430\u0439\u0434\u0435\u043d\u043e. \u0411\u0430\u0436\u0430\u0454\u0442\u0435 \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0438?","iespell_desc":"\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0438 \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u043a\u0443 \u043e\u0440\u0444\u043e\u0433\u0440\u0430\u0444\u0456\u0457"},advhr:{"advhr_desc":"\u0413\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0438\u0439 \u0440\u043e\u0437\u0434\u0456\u043b\u044c\u043d\u0438\u043a","delta_height":"","delta_width":""},emotions:{"emotions_desc":"\u0421\u043c\u0430\u0439\u043b\u0438","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"\u0428\u0443\u043a\u0430\u0442\u0438/\u0417\u0430\u043c\u0456\u043d\u0438\u0442\u0438","search_desc":"\u0428\u0443\u043a\u0430\u0442\u0438","delta_width":"","delta_height":""},advimage:{"delta_width":"200","image_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","delta_height":""},advlink:{"delta_width":"200","link_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f","delta_height":""},xhtmlxtras:{"attribs_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0438","ins_desc":"\u0412\u0441\u0442\u0430\u0432\u043a\u0430","del_desc":"\u0412\u0438\u0434\u0430\u043b\u0435\u043d\u043d\u044f","acronym_desc":"\u0410\u043a\u0440\u043e\u043d\u0456\u043c","abbr_desc":"\u0410\u0431\u0440\u0435\u0432\u0456\u0430\u0442\u0443\u0440\u0430","cite_desc":"\u0426\u0438\u0442\u0430\u0442\u0430","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 CSS \u0441\u0442\u0438\u043b\u044c","delta_height":"","delta_width":""},paste:{"plaintext_mode":"\u0412 \u0434\u0430\u043d\u0438\u0439 \u0447\u0430\u0441 \u0412\u0441\u0442\u0430\u0432\u043a\u0430 \u0432 \u0440\u0435\u0436\u0438\u043c\u0456 \u0437\u0432\u0438\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0443. \u041d\u0430\u0442\u0438\u0441\u043d\u0456\u0442\u044c \u0437\u043d\u043e\u0432\u0443 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0438\u043a\u0430\u043d\u043d\u044f \u043d\u0430\u0437\u0430\u0434 \u0432 \u0437\u0432\u0438\u0447\u0430\u0439\u043d\u0438\u0439 \u0440\u0435\u0436\u0438\u043c \u0412\u0441\u0442\u0430\u0432\u043a\u0438.","plaintext_mode_sticky":"\u0412 \u0434\u0430\u043d\u0438\u0439 \u0447\u0430\u0441 \u0412\u0441\u0442\u0430\u0432\u043a\u0430 \u0432 \u0440\u0435\u0436\u0438\u043c\u0456 \u0437\u0432\u0438\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0443. \u041d\u0430\u0442\u0438\u0441\u043d\u0456\u0442\u044c \u0437\u043d\u043e\u0432\u0443 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0438\u043a\u0430\u043d\u043d\u044f \u043d\u0430\u0437\u0430\u0434 \u0432 \u0437\u0432\u0438\u0447\u0430\u0439\u043d\u0438\u0439 \u0440\u0435\u0436\u0438\u043c \u0412\u0441\u0442\u0430\u0432\u043a\u0438.. \u041f\u0456\u0441\u043b\u044f \u0442\u043e\u0433\u043e, \u044f\u043a \u0412\u0438 \u0449\u043e-\u043d\u0435\u0431\u0443\u0434\u044c \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u0435, \u0412\u0438 \u043f\u043e\u0432\u0435\u0440\u043d\u0435\u0442\u0435\u0441\u044c \u0432 \u0437\u0432\u0438\u0447\u0430\u0439\u043d\u043c\u0439 \u0440\u0435\u0436\u0438\u043c \u0412\u0441\u0442\u0430\u0432\u043a\u0438.","selectall_desc":"\u0412\u0438\u0434\u0456\u043b\u0438\u0442\u0438 \u0432\u0441\u0435","paste_word_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0437 Word","paste_text_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u044f\u043a \u0442\u0435\u043a\u0441\u0442"},"paste_dlg":{"word_title":"\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0439\u0442\u0435 CTRL+V \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u0443 \u0443 \u0432\u0456\u043a\u043d\u043e.","text_linebreaks":"\u0417\u0431\u0435\u0440\u0456\u0433\u0430\u0442\u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438 \u0440\u044f\u0434\u043a\u0456\u0432","text_title":"\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0439\u0442\u0435 CTRL+V \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u0443 \u0443 \u0432\u0456\u043a\u043d\u043e."},table:{"cellprops_delta_width":"30",cell:"\u041a\u043e\u043c\u0456\u0440\u043a\u0430",col:"\u0421\u0442\u043e\u0432\u043f\u0435\u0446\u044c",row:"\u0420\u044f\u0434\u043e\u043a",del:"\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044e","copy_row_desc":"\u041a\u043e\u043f\u0456\u044e\u0432\u0430\u0442\u0438 \u0440\u044f\u0434\u043e\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0456","cut_row_desc":"\u0412\u0438\u0440\u0456\u0437\u0430\u0442\u0438 \u0440\u044f\u0434\u043e\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0456","paste_row_after_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0440\u044f\u0434\u043e\u043a \u043f\u0456\u0441\u043b\u044f","paste_row_before_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0440\u044f\u0434\u043e\u043a \u0434\u043e","props_desc":"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u0442\u0430\u0431\u043b\u0438\u0446\u0456","cell_desc":"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u043a\u043e\u043c\u0456\u0440\u043a\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u0456","row_desc":"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u0440\u044f\u0434\u043a\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u0456","merge_cells_desc":"\u041e\u0431\'\u0454\u0434\u043d\u0430\u0442\u0438 \u043a\u043e\u043c\u0456\u0440\u043a\u0438","split_cells_desc":"\u0420\u043e\u0437\u0434\u0456\u043b\u0438\u0442\u0438 \u043a\u043e\u043c\u0456\u0440\u043a\u0438","delete_col_desc":"\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u0441\u0442\u043e\u0432\u043f\u0435\u0446\u044c","col_after_desc":"\u0414\u043e\u0434\u0430\u0442\u0438 \u0441\u0442\u043e\u0432\u043f\u0435\u0446\u044c \u043f\u0456\u0441\u043b\u044f","col_before_desc":"\u0414\u043e\u0434\u0430\u0442\u0438 \u0441\u0442\u043e\u0432\u043f\u0435\u0446\u044c \u0434\u043e","delete_row_desc":"\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u0440\u044f\u0434\u043e\u043a","row_after_desc":"\u0414\u043e\u0434\u0430\u0442\u0438 \u0440\u044f\u0434\u043e\u043a \u043f\u0456\u0441\u043b\u044f","row_before_desc":"\u0414\u043e\u0434\u0430\u0442\u0438 \u0440\u044f\u0434\u043e\u043a \u0434\u043e",desc:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043d\u043e\u0432\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u044e","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"\u042f\u043a\u0449\u043e \u0432\u0456\u0434\u043d\u043e\u0432\u0438\u0442\u0438 \u0437\u0431\u0435\u0440\u0435\u0436\u0435\u043d\u0438\u0439 \u0432\u043c\u0456\u0441\u0442, \u0442\u043e \u0432\u0438 \u0432\u0442\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u0435\u0441\u044c \u0432\u043c\u0456\u0441\u0442, \u044f\u043a\u0438\u0439 \u0432 \u0434\u0430\u043d\u0438\u0439 \u0447\u0430\u0441 \u0437\u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0456. \n\n\u0412\u0438 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u0456, \u0449\u043e \u0445\u043e\u0447\u0435\u0442\u0435 \u0432\u0456\u0434\u043d\u043e\u0432\u0438\u0442\u0438 \u0437\u0431\u0435\u0440\u0435\u0436\u0435\u043d\u0438\u0439 \u0437\u043c\u0456\u0441\u0442?.","restore_content":"\u0412\u0456\u0434\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u0437\u0431\u0435\u0440\u0435\u0436\u0435\u043d\u043e\u0433\u043e \u0432\u043c\u0456\u0441\u0442\u0443.","unload_msg":"\u0417\u043c\u0456\u043d\u0438, \u044f\u043a\u0456 \u0432\u0438 \u0437\u0440\u043e\u0431\u0438\u043b\u0438, \u0431\u0443\u0434\u0443\u0442\u044c \u0432\u0442\u0440\u0430\u0447\u0435\u043d\u0456, \u044f\u043a\u0449\u043e \u0432\u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u0442\u0435 \u0437 \u0446\u0456\u0454\u0457 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0438."},fullscreen:{desc:"\u041f\u0435\u0440\u0435\u043c\u043a\u043d\u0443\u0442\u0438 \u043d\u0430 \u0432\u0435\u0441\u044c \u0435\u043a\u0440\u0430\u043d"},media:{edit:"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u0432\u0431\u0443\u0434\u043e\u0432\u0430\u043d\u0456 \u043c\u0435\u0434\u0456\u0430",desc:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 / \u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u0432\u0431\u0443\u0434\u043e\u0432\u0430\u043d\u0456 \u043c\u0435\u0434\u0456\u0430","delta_height":"","delta_width":""},fullpage:{desc:"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430","delta_width":"","delta_height":""},template:{desc:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442"},visualchars:{desc:"\u0412\u0456\u0437\u0443\u0430\u043b\u044c\u043d\u0438\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u0456\u0432 \u0432\u0432\u0456\u043c\u043a\u043d\u0435\u043d\u043d\u044f / \u0432\u0438\u043c\u043a\u043d\u0435\u043d\u043d\u044f."},spellchecker:{desc:"\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u0438 \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u043a\u0443",menu:"\u041d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u043d\u044f \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u043a\u0438","ignore_word":"\u0406\u0433\u043d\u043e\u0440\u0443\u0432\u0430\u0442\u0438 \u0441\u043b\u043e\u0432\u043e","ignore_words":"\u0406\u0433\u043d\u043e\u0440\u0443\u0432\u0430\u0442\u0438 \u0432\u0441\u0435",langs:"\u041c\u043e\u0432\u0438",wait:"\u0411\u0443\u0434\u044c \u043b\u0430\u0441\u043a\u0430, \u0437\u0430\u0447\u0435\u043a\u0430\u0439\u0442\u0435...",sug:"\u0412\u0430\u0440\u0456\u0430\u043d\u0442\u0438","no_sug":"\u041d\u0435\u043c\u0430\u0454 \u0432\u0430\u0440\u0456\u0430\u043d\u0442\u0456\u0432","no_mpell":"\u041f\u043e\u043c\u0438\u043b\u043e\u043a \u043d\u0435 \u0437\u043d\u0430\u0439\u0434\u0435\u043d\u043e.","learn_word":"\u0417\u0430\u043f\u0430\u043c\'\u044f\u0442\u0430\u0442\u0438 \u0441\u043b\u043e\u0432\u043e"},pagebreak:{desc:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0440\u043e\u0437\u0434\u0456\u043b\u044c\u043d\u0438\u043a \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0438."},advlist:{types:"\u0422\u0438\u043f\u0438",def:"\u0417\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0430\u043d\u043d\u044f\u043c","lower_alpha":"Lower alpha","lower_greek":"Lower greek","lower_roman":"Lower roman","upper_alpha":"Upper alpha","upper_roman":"Upper roman",circle:"\u041a\u043e\u043b\u043e",disc:"\u0414\u0438\u0441\u043a",square:"\u041a\u0432\u0430\u0434\u0440\u0430\u0442"},colors:{"333300":"\u0422\u0435\u043c\u043d\u043e-\u043e\u043b\u0438\u0432\u043a\u043e\u0432\u0438\u0439","000000":"\u0427\u043e\u0440\u043d\u0438\u0439","003300":"\u0422\u0435\u043c\u043d\u043e-\u0437\u0435\u043b\u0435\u043d\u0438\u0439","808000":"\u041e\u043b\u0438\u0432\u043a\u043e\u0432\u0438\u0439","008000":"\u0417\u0435\u043b\u0435\u043d\u0438\u0439","0000FF":"\u0421\u0438\u043d\u0456\u0439","666699":"\u0421\u0456\u0440\u043e-\u0433\u043e\u043b\u0443\u0431\u0438\u0439","808080":"\u0421\u0456\u0440\u0438\u0439",FF0000:"\u0427\u0435\u0440\u0432\u043e\u043d\u0438\u0439","99CC00":"\u0416\u043e\u0432\u0442\u043e-\u0437\u0435\u043b\u0435\u043d\u0438\u0439","339966":"Sea green ",FFCC00:"\u0417\u043e\u043b\u043e\u0442\u0438\u0439",FFFF00:"\u0416\u043e\u0432\u0442\u0438\u0439",FF99CC:"\u0420\u043e\u0436\u0435\u0432\u0438\u0439",CC99FF:"\u0421\u043b\u0438\u0432\u043e\u0432\u0438\u0439",FFFFFF:"\u0411\u0456\u043b\u0438\u0439","993300":"Burnt orange","003366":"Dark azure","000080":"Navy Blue","333399":"Indigo","333333":"Very dark gray","800000":"Maroon",FF6600:"Orange","008080":"Teal",FF9900:"Amber","33CCCC":"Turquoise","3366FF":"Royal blue","800080":"Purple","999999":"Medium gray",FF00FF:"Magenta","00FF00":"Lime","00FFFF":"Aqua","00CCFF":"Sky blue","993366":"Brown",C0C0C0:"Silver",FFCC99:"Peach",FFFF99:"Light yellow",CCFFCC:"Pale green",CCFFFF:"Pale cyan","99CCFF":"Light sky blue"},aria:{"rich_text_area":"Rich Text Area"},wordcount:{words:"\u0421\u043b\u0456\u0432:"}}}); \ No newline at end of file
+tinyMCE.addI18n({uk:{common:{"more_colors":"\u0411\u0456\u043b\u044c\u0448\u0435 \u043a\u043e\u043b\u044c\u043e\u0440\u0456\u0432","invalid_data":"\u041f\u043e\u043c\u0438\u043b\u043a\u0430: \u0412\u0432\u0435\u0434\u0435\u043d\u043e \u043f\u043e\u043c\u0438\u043b\u043a\u043e\u0432\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f, \u0432\u0456\u0434\u043c\u0456\u0447\u0435\u043d\u0435 \u0447\u0435\u0440\u0432\u043e\u043d\u0438\u043c.","popup_blocked":"\u0414\u0443\u0436\u0435 \u043f\u0440\u0438\u043a\u0440\u043e, \u0430\u043b\u0435 \u0432\u0430\u0448 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0437\u0430\u0431\u043b\u043e\u043a\u0443\u0432\u0430\u0432 \u0432\u0438\u0440\u0438\u043d\u0430\u044e\u0447\u0435 \u0432\u0456\u043a\u043d\u043e. \u0411\u0443\u0434\u044c \u043b\u0430\u0441\u043a\u0430, \u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0439\u0442\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0442\u0430\u043a, \u0449\u043e\u0431 \u0432\u0456\u043d \u0434\u043e\u0437\u0432\u043e\u043b\u044f\u0432 \u0432\u0438\u0440\u0438\u043d\u0430\u044e\u0447\u0456 \u0432\u0456\u043a\u043d\u0430 \u0437 \u0446\u044c\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0443.","clipboard_no_support":"\u041d\u0430\u0440\u0430\u0437\u0456 \u0446\u044f \u0444\u0443\u043d\u043a\u0446\u0456\u044f \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0432 \u0432\u0430\u0448\u043e\u043c\u0443 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0456, \u0430\u043b\u0435 \u0432\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u043a\u043b\u0430\u0432\u0456\u0430\u0442\u0443\u0440\u0443 \u0437\u0430\u043c\u0456\u0441\u0442\u044c \u0446\u044c\u043e\u0433\u043e.","clipboard_msg":"\u041a\u043e\u043f\u0456\u044e\u0432\u0430\u0442\u0438/\u0412\u0438\u0440\u0456\u0437\u0430\u0442\u0438/\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0432 Mozilla \u0442\u0430 Firefox.\n\u0412\u0430\u043c \u0446\u0456\u043a\u0430\u0432\u0430 \u0456\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0456\u044f \u043f\u0440\u043e \u0446\u0435?","not_set":"-- \u043d\u0435 \u0432\u0438\u0431\u0440\u0430\u043d\u043e --","class_name":"\u041a\u043b\u0430\u0441",browse:"\u041f\u0435\u0440\u0435\u0433\u043b\u044f\u0434",close:"\u0417\u0430\u043a\u0440\u0438\u0442\u0438",cancel:"\u0412\u0456\u0434\u043c\u0456\u043d\u0438\u0442\u0438",update:"\u041e\u043d\u043e\u0432\u0438\u0442\u0438",insert:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438",apply:"\u0417\u0430\u0441\u0442\u043e\u0441\u0443\u0432\u0430\u0442\u0438","edit_confirm":"\u0412\u0438 \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 WYSIWYG \u0440\u0435\u0436\u0438\u043c \u0434\u043b\u044f \u0446\u044c\u043e\u0433\u043e \u043f\u043e\u043b\u044f?","invalid_data_number":"{#field} \u043f\u043e\u0432\u0438\u043d\u043d\u0435 \u0431\u0443\u0442\u0438 \u0447\u0438\u0441\u043b\u043e\u043c","invalid_data_min":"{#field} \u0447\u0438\u0441\u043b\u043e \u043f\u043e\u0432\u0438\u043d\u043d\u0435 \u0431\u0443\u0442\u0438 \u0431\u0456\u043b\u044c\u0448\u0435 \u043d\u0456\u0436 {#min}","invalid_data_size":"{#field} \u043f\u043e\u0432\u0438\u043d\u043d\u0435 \u0431\u0443\u0442\u0438 \u0447\u0438\u0441\u043b\u043e\u043c \u0430\u0431\u043e \u0432\u0456\u0434\u0441\u043e\u0442\u043a\u043e\u043c",value:"(\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f)"},contextmenu:{full:"\u041f\u043e \u0448\u0438\u0440\u0438\u043d\u0456",right:"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e",center:"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443",left:"\u041f\u043e \u043b\u0456\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e",align:"\u0412\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f"},insertdatetime:{"day_short":"\u041d\u0434,\u041f\u043d,\u0412\u0442,\u0421\u0440,\u0427\u0442,\u041f\u0442,\u0421\u0431,\u041d\u0434","day_long":"\u041d\u0435\u0434\u0456\u043b\u044f,\u041f\u043e\u043d\u0435\u0434\u0456\u043b\u043e\u043a,\u0412\u0456\u0432\u0442\u043e\u0440\u043e\u043a,\u0421\u0435\u0440\u0435\u0434\u0430,\u0427\u0435\u0442\u0432\u0435\u0440,\u041f\'\u044f\u0442\u043d\u0438\u0446\u044f,\u0421\u0443\u0431\u043e\u0442\u0430,\u041d\u0435\u0434\u0456\u043b\u044f","months_short":"\u0421\u0456\u0447,\u041b\u044e\u0442,\u0411\u0435\u0440,\u041a\u0432\u0456,\u0422\u0440\u0430,\u0427\u0435\u0440,\u041b\u0438\u043f,\u0421\u0435\u0440,\u0412\u0435\u0440,\u0416\u043e\u0432,\u041b\u0438\u0441,\u0413\u0440\u0443","months_long":"\u0421\u0456\u0447\u0435\u043d\u044c,\u041b\u044e\u0442\u0438\u0439,\u0411\u0435\u0440\u0435\u0437\u0435\u043d\u044c,\u041a\u0432\u0456\u0442\u0435\u043d\u044c,\u0422\u0440\u0430\u0432\u0435\u043d\u044c,\u0427\u0435\u0440\u0432\u0435\u043d\u044c,\u041b\u0438\u043f\u0435\u043d\u044c,\u0421\u0435\u0440\u043f\u0435\u043d\u044c,\u0412\u0435\u0440\u0435\u0441\u0435\u043d\u044c,\u0416\u043e\u0432\u0442\u0435\u043d\u044c,\u041b\u0438\u0441\u0442\u043e\u043f\u0430\u0434,\u0413\u0440\u0443\u0434\u0435\u043d\u044c","inserttime_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0447\u0430\u0441","insertdate_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0434\u0430\u0442\u0443","time_fmt":"%H:%M:%S","date_fmt":"%d.%m.%Y"},print:{"print_desc":"\u0414\u0440\u0443\u043a\u0443\u0432\u0430\u0442\u0438"},preview:{"preview_desc":"\u041f\u0435\u0440\u0435\u0433\u043b\u044f\u0434"},directionality:{"rtl_desc":"\u041d\u0430\u043f\u0440\u044f\u043c \u0441\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0456\u0432\u043e","ltr_desc":"\u041d\u0430\u043f\u0440\u044f\u043c \u0437\u043b\u0456\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e"},layer:{content:"\u041d\u043e\u0432\u0438\u0439 \u043f\u0440\u043e\u0448\u0430\u0440\u043e\u043a...","absolute_desc":"\u041f\u0435\u0440\u0435\u043c\u0438\u043a\u043d\u0443\u0442\u0438 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0435 \u043f\u043e\u0437\u0438\u0446\u0456\u044e\u0432\u0430\u043d\u043d\u044f","backward_desc":"\u041f\u0435\u0440\u0435\u043c\u0456\u0441\u0442\u0438\u0442\u0438 \u043d\u0430\u0437\u0430\u0434","forward_desc":"\u041f\u0435\u0440\u0435\u043c\u0456\u0441\u0442\u0438\u0442\u0438 \u0432\u043f\u0435\u0440\u0435\u0434","insertlayer_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043d\u043e\u0432\u0438\u0439 \u043f\u0440\u043e\u0448\u0430\u0440\u043e\u043a"},save:{"save_desc":"\u0417\u0431\u0435\u0440\u0435\u0433\u0442\u0438","cancel_desc":"\u0412\u0456\u0434\u043c\u0456\u043d\u0438\u0442\u0438 \u0432\u0441\u0456 \u0437\u043c\u0456\u043d\u0438"},nonbreaking:{"nonbreaking_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043d\u0435\u0440\u043e\u0437\u0440\u0438\u0432\u043d\u0438\u0439 \u043f\u0440\u043e\u043c\u0456\u0436\u043e\u043a"},iespell:{download:"\u0414\u043e\u0434\u0430\u0442\u043e\u043a ieSpell \u043d\u0435 \u0437\u043d\u0430\u0439\u0434\u0435\u043d\u043e. \u0411\u0430\u0436\u0430\u0454\u0442\u0435 \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0438?","iespell_desc":"\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0438 \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u043a\u0443 \u043e\u0440\u0444\u043e\u0433\u0440\u0430\u0444\u0456\u0457"},advhr:{"advhr_desc":"\u0413\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0438\u0439 \u0440\u043e\u0437\u0434\u0456\u043b\u044c\u043d\u0438\u043a","delta_height":"","delta_width":""},emotions:{"emotions_desc":"\u0421\u043c\u0430\u0439\u043b\u0438","delta_height":"","delta_width":""},searchreplace:{"replace_desc":"\u0428\u0443\u043a\u0430\u0442\u0438/\u0417\u0430\u043c\u0456\u043d\u0438\u0442\u0438","search_desc":"\u0428\u0443\u043a\u0430\u0442\u0438","delta_width":"","delta_height":""},advimage:{"delta_width":"200","image_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","delta_height":""},advlink:{"delta_width":"200","link_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f","delta_height":""},xhtmlxtras:{"attribs_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0438","ins_desc":"\u0412\u0441\u0442\u0430\u0432\u043a\u0430","del_desc":"\u0412\u0438\u0434\u0430\u043b\u0435\u043d\u043d\u044f","acronym_desc":"\u0410\u043a\u0440\u043e\u043d\u0456\u043c","abbr_desc":"\u0410\u0431\u0440\u0435\u0432\u0456\u0430\u0442\u0443\u0440\u0430","cite_desc":"\u0426\u0438\u0442\u0430\u0442\u0430","attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":""},style:{desc:"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 CSS \u0441\u0442\u0438\u043b\u044c","delta_height":"","delta_width":""},paste:{"plaintext_mode":"\u0412 \u0434\u0430\u043d\u0438\u0439 \u0447\u0430\u0441 \u0412\u0441\u0442\u0430\u0432\u043a\u0430 \u0432 \u0440\u0435\u0436\u0438\u043c\u0456 \u0437\u0432\u0438\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0443. \u041d\u0430\u0442\u0438\u0441\u043d\u0456\u0442\u044c \u0437\u043d\u043e\u0432\u0443 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0438\u043a\u0430\u043d\u043d\u044f \u043d\u0430\u0437\u0430\u0434 \u0432 \u0437\u0432\u0438\u0447\u0430\u0439\u043d\u0438\u0439 \u0440\u0435\u0436\u0438\u043c \u0412\u0441\u0442\u0430\u0432\u043a\u0438.","plaintext_mode_sticky":"\u0412 \u0434\u0430\u043d\u0438\u0439 \u0447\u0430\u0441 \u0412\u0441\u0442\u0430\u0432\u043a\u0430 \u0432 \u0440\u0435\u0436\u0438\u043c\u0456 \u0437\u0432\u0438\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0443. \u041d\u0430\u0442\u0438\u0441\u043d\u0456\u0442\u044c \u0437\u043d\u043e\u0432\u0443 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0438\u043a\u0430\u043d\u043d\u044f \u043d\u0430\u0437\u0430\u0434 \u0432 \u0437\u0432\u0438\u0447\u0430\u0439\u043d\u0438\u0439 \u0440\u0435\u0436\u0438\u043c \u0412\u0441\u0442\u0430\u0432\u043a\u0438.. \u041f\u0456\u0441\u043b\u044f \u0442\u043e\u0433\u043e, \u044f\u043a \u0412\u0438 \u0449\u043e-\u043d\u0435\u0431\u0443\u0434\u044c \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u0435, \u0412\u0438 \u043f\u043e\u0432\u0435\u0440\u043d\u0435\u0442\u0435\u0441\u044c \u0432 \u0437\u0432\u0438\u0447\u0430\u0439\u043d\u043c\u0439 \u0440\u0435\u0436\u0438\u043c \u0412\u0441\u0442\u0430\u0432\u043a\u0438.","selectall_desc":"\u0412\u0438\u0434\u0456\u043b\u0438\u0442\u0438 \u0432\u0441\u0435","paste_word_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0437 Word","paste_text_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u044f\u043a \u0442\u0435\u043a\u0441\u0442"},"paste_dlg":{"word_title":"\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0439\u0442\u0435 CTRL+V \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u0443 \u0443 \u0432\u0456\u043a\u043d\u043e.","text_linebreaks":"\u0417\u0431\u0435\u0440\u0456\u0433\u0430\u0442\u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438 \u0440\u044f\u0434\u043a\u0456\u0432","text_title":"\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0439\u0442\u0435 CTRL+V \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0442\u0435\u043a\u0441\u0442\u0443 \u0443 \u0432\u0456\u043a\u043d\u043e."},table:{"cellprops_delta_width":"30",cell:"\u041a\u043e\u043c\u0456\u0440\u043a\u0430",col:"\u0421\u0442\u043e\u0432\u043f\u0435\u0446\u044c",row:"\u0420\u044f\u0434\u043e\u043a",del:"\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044e","copy_row_desc":"\u041a\u043e\u043f\u0456\u044e\u0432\u0430\u0442\u0438 \u0440\u044f\u0434\u043e\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0456","cut_row_desc":"\u0412\u0438\u0440\u0456\u0437\u0430\u0442\u0438 \u0440\u044f\u0434\u043e\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0456","paste_row_after_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0440\u044f\u0434\u043e\u043a \u043f\u0456\u0441\u043b\u044f","paste_row_before_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0440\u044f\u0434\u043e\u043a \u0434\u043e","props_desc":"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u0442\u0430\u0431\u043b\u0438\u0446\u0456","cell_desc":"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u043a\u043e\u043c\u0456\u0440\u043a\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u0456","row_desc":"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u0440\u044f\u0434\u043a\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u0456","merge_cells_desc":"\u041e\u0431\'\u0454\u0434\u043d\u0430\u0442\u0438 \u043a\u043e\u043c\u0456\u0440\u043a\u0438","split_cells_desc":"\u0420\u043e\u0437\u0434\u0456\u043b\u0438\u0442\u0438 \u043a\u043e\u043c\u0456\u0440\u043a\u0438","delete_col_desc":"\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u0441\u0442\u043e\u0432\u043f\u0435\u0446\u044c","col_after_desc":"\u0414\u043e\u0434\u0430\u0442\u0438 \u0441\u0442\u043e\u0432\u043f\u0435\u0446\u044c \u043f\u0456\u0441\u043b\u044f","col_before_desc":"\u0414\u043e\u0434\u0430\u0442\u0438 \u0441\u0442\u043e\u0432\u043f\u0435\u0446\u044c \u0434\u043e","delete_row_desc":"\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u0440\u044f\u0434\u043e\u043a","row_after_desc":"\u0414\u043e\u0434\u0430\u0442\u0438 \u0440\u044f\u0434\u043e\u043a \u043f\u0456\u0441\u043b\u044f","row_before_desc":"\u0414\u043e\u0434\u0430\u0442\u0438 \u0440\u044f\u0434\u043e\u043a \u0434\u043e",desc:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043d\u043e\u0432\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u044e","merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","rowprops_delta_height":"","rowprops_delta_width":""},autosave:{"warning_message":"\u042f\u043a\u0449\u043e \u0432\u0456\u0434\u043d\u043e\u0432\u0438\u0442\u0438 \u0437\u0431\u0435\u0440\u0435\u0436\u0435\u043d\u0438\u0439 \u0432\u043c\u0456\u0441\u0442, \u0442\u043e \u0432\u0438 \u0432\u0442\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u0435\u0441\u044c \u0432\u043c\u0456\u0441\u0442, \u044f\u043a\u0438\u0439 \u0432 \u0434\u0430\u043d\u0438\u0439 \u0447\u0430\u0441 \u0437\u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0456. \n\n\u0412\u0438 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u0456, \u0449\u043e \u0445\u043e\u0447\u0435\u0442\u0435 \u0432\u0456\u0434\u043d\u043e\u0432\u0438\u0442\u0438 \u0437\u0431\u0435\u0440\u0435\u0436\u0435\u043d\u0438\u0439 \u0437\u043c\u0456\u0441\u0442?.","restore_content":"\u0412\u0456\u0434\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u0437\u0431\u0435\u0440\u0435\u0436\u0435\u043d\u043e\u0433\u043e \u0432\u043c\u0456\u0441\u0442\u0443.","unload_msg":"\u0417\u043c\u0456\u043d\u0438, \u044f\u043a\u0456 \u0432\u0438 \u0437\u0440\u043e\u0431\u0438\u043b\u0438, \u0431\u0443\u0434\u0443\u0442\u044c \u0432\u0442\u0440\u0430\u0447\u0435\u043d\u0456, \u044f\u043a\u0449\u043e \u0432\u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u0442\u0435 \u0437 \u0446\u0456\u0454\u0457 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0438."},fullscreen:{desc:"\u041f\u0435\u0440\u0435\u043c\u043a\u043d\u0443\u0442\u0438 \u043d\u0430 \u0432\u0435\u0441\u044c \u0435\u043a\u0440\u0430\u043d"},media:{edit:"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u0432\u0431\u0443\u0434\u043e\u0432\u0430\u043d\u0456 \u043c\u0435\u0434\u0456\u0430",desc:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 / \u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u0432\u0431\u0443\u0434\u043e\u0432\u0430\u043d\u0456 \u043c\u0435\u0434\u0456\u0430","delta_height":"","delta_width":""},fullpage:{desc:"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430","delta_width":"","delta_height":""},template:{desc:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442"},visualchars:{desc:"\u0412\u0456\u0437\u0443\u0430\u043b\u044c\u043d\u0438\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0441\u0438\u043c\u0432\u043e\u043b\u0456\u0432 \u0432\u0432\u0456\u043c\u043a\u043d\u0435\u043d\u043d\u044f / \u0432\u0438\u043c\u043a\u043d\u0435\u043d\u043d\u044f."},spellchecker:{desc:"\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u0438 \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u043a\u0443",menu:"\u041d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u043d\u044f \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u043a\u0438","ignore_word":"\u0406\u0433\u043d\u043e\u0440\u0443\u0432\u0430\u0442\u0438 \u0441\u043b\u043e\u0432\u043e","ignore_words":"\u0406\u0433\u043d\u043e\u0440\u0443\u0432\u0430\u0442\u0438 \u0432\u0441\u0435",langs:"\u041c\u043e\u0432\u0438",wait:"\u0411\u0443\u0434\u044c \u043b\u0430\u0441\u043a\u0430, \u0437\u0430\u0447\u0435\u043a\u0430\u0439\u0442\u0435...",sug:"\u0412\u0430\u0440\u0456\u0430\u043d\u0442\u0438","no_sug":"\u041d\u0435\u043c\u0430\u0454 \u0432\u0430\u0440\u0456\u0430\u043d\u0442\u0456\u0432","no_mpell":"\u041f\u043e\u043c\u0438\u043b\u043e\u043a \u043d\u0435 \u0437\u043d\u0430\u0439\u0434\u0435\u043d\u043e.","learn_word":"\u0417\u0430\u043f\u0430\u043c\'\u044f\u0442\u0430\u0442\u0438 \u0441\u043b\u043e\u0432\u043e"},pagebreak:{desc:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0440\u043e\u0437\u0434\u0456\u043b\u044c\u043d\u0438\u043a \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0438."},advlist:{types:"\u0422\u0438\u043f\u0438",def:"\u0417\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0430\u043d\u043d\u044f\u043c","lower_alpha":"Lower alpha","lower_greek":"Lower greek","lower_roman":"Lower roman","upper_alpha":"Upper alpha","upper_roman":"Upper roman",circle:"\u041a\u043e\u043b\u043e",disc:"\u0414\u0438\u0441\u043a",square:"\u041a\u0432\u0430\u0434\u0440\u0430\u0442"},colors:{"333300":"\u0422\u0435\u043c\u043d\u043e-\u043e\u043b\u0438\u0432\u043a\u043e\u0432\u0438\u0439","993300":"\u041f\u043e\u043c\u0430\u0440\u0430\u043d\u0447\u0435\u0432\u0438\u0439","000000":"\u0427\u043e\u0440\u043d\u0438\u0439","003300":"\u0422\u0435\u043c\u043d\u043e-\u0437\u0435\u043b\u0435\u043d\u0438\u0439",FF6600:"\u041e\u0440\u0430\u043d\u0436\u0435\u0432\u0438\u0439","808000":"\u041e\u043b\u0438\u0432\u043a\u043e\u0432\u0438\u0439","008000":"\u0417\u0435\u043b\u0435\u043d\u0438\u0439","0000FF":"\u0421\u0438\u043d\u0456\u0439","666699":"\u0421\u0456\u0440\u043e-\u0433\u043e\u043b\u0443\u0431\u0438\u0439","808080":"\u0421\u0456\u0440\u0438\u0439",FF0000:"\u0427\u0435\u0440\u0432\u043e\u043d\u0438\u0439","99CC00":"\u0416\u043e\u0432\u0442\u043e-\u0437\u0435\u043b\u0435\u043d\u0438\u0439","339966":"Sea green ",FFCC00:"\u0417\u043e\u043b\u043e\u0442\u0438\u0439",FFFF00:"\u0416\u043e\u0432\u0442\u0438\u0439","993366":"\u041a\u043e\u0440\u0438\u0447\u043d\u0435\u0432\u0438\u0439",C0C0C0:"\u0421\u0440\u0456\u0431\u043b\u044f\u0441\u0442\u0438\u0439",FF99CC:"\u0420\u043e\u0436\u0435\u0432\u0438\u0439",FFFF99:"\u0421\u0432\u0456\u0442\u043b\u043e \u0436\u043e\u0432\u0442\u0438\u0439",CC99FF:"\u0421\u043b\u0438\u0432\u043e\u0432\u0438\u0439",FFFFFF:"\u0411\u0456\u043b\u0438\u0439","003366":"Dark azure","000080":"Navy Blue","333399":"Indigo","333333":"Very dark gray","800000":"Maroon","008080":"Teal",FF9900:"Amber","33CCCC":"Turquoise","3366FF":"Royal blue","800080":"Purple","999999":"Medium gray",FF00FF:"Magenta","00FF00":"Lime","00FFFF":"Aqua","00CCFF":"Sky blue",FFCC99:"Peach",CCFFCC:"Pale green",CCFFFF:"Pale cyan","99CCFF":"Light sky blue"},aria:{"rich_text_area":"\u0412\u0456\u0437\u0443\u0430\u043b\u044c\u043d\u0438\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440"},wordcount:{words:"\u0421\u043b\u0456\u0432:"}}}); \ No newline at end of file
diff --git a/program/js/tiny_mce/plugins/advimage/langs/nl_dlg.js b/program/js/tiny_mce/plugins/advimage/langs/nl_dlg.js
index 35538d374..ea7272812 100644
--- a/program/js/tiny_mce/plugins/advimage/langs/nl_dlg.js
+++ b/program/js/tiny_mce/plugins/advimage/langs/nl_dlg.js
@@ -1 +1 @@
-tinyMCE.addI18n('nl.advimage_dlg',{"image_list":"Lijst","align_right":"Rechts","align_left":"Links","align_textbottom":"Onderkant tekst","align_texttop":"Bovenkant tekst","align_bottom":"Onder","align_middle":"Midden","align_top":"Boven","align_baseline":"Basislijn",align:"Uitlijning",hspace:"Horizontale ruimte",vspace:"Verticale ruimte",dimensions:"Afmetingen",border:"Rand",list:"Lijst",alt:"Beschrijving",src:"Bestand/URL","dialog_title":"Afbeelding invoegen/bewerken","missing_alt":"Wilt u de afbeelding zonder beschrijving invoegen? De afbeelding wordt dan mogelijk niet opgemerkt door mensen met een visuele handicap, of welke zonder afbeeldingen browsen.","example_img":"Voorbeeldweergave",misc:"Diversen",mouseout:"Bij muis uit",mouseover:"Bij muis over","alt_image":"Alternatieve afbeeldingen","swap_image":"Afbeelding wisselen",map:"Afbeeldingsplattegrond",id:"Id",rtl:"Van rechts naar links",ltr:"Van links naar rechts",classes:"Klasses",style:"Stijl","long_desc":"Uitgebreide beschrijving",langcode:"Taalcode",langdir:"Taalrichting","constrain_proportions":"Verhouding behouden",preview:"Voorbeeld",title:"Titel",general:"Algemeen","tab_advanced":"Geavanceerd","tab_appearance":"Weergave","tab_general":"Algemeen",width:"Breedte",height:"Hoogte"}); \ No newline at end of file
+tinyMCE.addI18n('nl.advimage_dlg',{"image_list":"Lijst","align_right":"Rechts","align_left":"Links","align_textbottom":"Onderkant tekst","align_texttop":"Bovenkant tekst","align_bottom":"Onder","align_middle":"Midden","align_top":"Boven","align_baseline":"Basislijn",align:"Uitlijning",hspace:"Horizontale ruimte",vspace:"Verticale ruimte",dimensions:"Afmetingen",border:"Rand",list:"Lijst",alt:"Beschrijving",src:"Bestand/URL","dialog_title":"Afbeelding invoegen/bewerken","missing_alt":"Wilt u de afbeelding zonder beschrijving invoegen? De afbeelding wordt dan mogelijk niet opgemerkt door mensen met een visuele handicap, of mensen die zonder afbeeldingen browsen.","example_img":"Voorbeeldweergave",misc:"Diversen",mouseout:"Bij muis uit",mouseover:"Bij muis over","alt_image":"Alternatieve afbeeldingen","swap_image":"Afbeelding wisselen",map:"Afbeeldingsplattegrond",id:"Id",rtl:"Van rechts naar links",ltr:"Van links naar rechts",classes:"Klasses",style:"Stijl","long_desc":"Uitgebreide beschrijving",langcode:"Taalcode",langdir:"Taalrichting","constrain_proportions":"Verhouding behouden",preview:"Voorbeeld",title:"Titel",general:"Algemeen","tab_advanced":"Geavanceerd","tab_appearance":"Weergave","tab_general":"Algemeen",width:"Breedte",height:"Hoogte"}); \ No newline at end of file
diff --git a/program/js/tiny_mce/plugins/advimage/langs/uk_dlg.js b/program/js/tiny_mce/plugins/advimage/langs/uk_dlg.js
index 5692313c3..d083a13bb 100644
--- a/program/js/tiny_mce/plugins/advimage/langs/uk_dlg.js
+++ b/program/js/tiny_mce/plugins/advimage/langs/uk_dlg.js
@@ -1 +1 @@
-tinyMCE.addI18n('uk.advimage_dlg',{"image_list":"\u0421\u043f\u0438\u0441\u043e\u043a \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u044c","align_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_left":"\u041f\u043e \u043b\u0456\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_textbottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0443","align_texttop":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0443","align_bottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_middle":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","align_top":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_baseline":"\u041f\u043e \u0431\u0430\u0437\u043e\u0432\u0456\u0439 \u043b\u0456\u043d\u0456\u0457",align:"\u0412\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f",hspace:"\u0413\u043e\u0440\u0438\u0437. \u0432\u0456\u0434\u0441\u0442\u0443\u043f",vspace:"\u0412\u0435\u0440\u0442. \u0432\u0456\u0434\u0441\u0442\u0443\u043f",dimensions:"\u0420\u043e\u0437\u043c\u0456\u0440\u0438",border:"\u0420\u0430\u043c\u043a\u0430",list:"\u0421\u043f\u0438\u0441\u043e\u043a \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u044c",alt:"\u041e\u043f\u0438\u0441",src:"\u041f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u043d\u0430 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","dialog_title":"\u0414\u043e\u0434\u0430\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","missing_alt":"\u0412\u0438 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u043d\u0456, \u0449\u043e \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u043f\u0440\u043e\u0434\u043e\u0432\u0436\u0438\u0442\u0438 \u0431\u0435\u0437 \u043e\u043f\u0438\u0441\u0443 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f? \u0411\u0435\u0437 \u0446\u044c\u043e\u0433\u043e, \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f \u043d\u0435 \u0431\u0443\u0434\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0438\u043c \u0434\u0435\u044f\u043a\u0438\u043c \u043a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447\u0430\u043c \u0437 \u0432\u0430\u0434\u0430\u043c\u0438, \u0430\u0431\u043e \u0442\u0438\u043c, \u0445\u0442\u043e \u043a\u043e\u0440\u0438\u0442\u0443\u0454\u0442\u044c\u0441\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0438\u043c\u0438 \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0430\u0447\u0430\u043c\u0438, \u0430\u0431\u043e \u043f\u0440\u043e\u0433\u043b\u044f\u0434\u0430\u0454 \u0456\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0438 \u0437 \u0432\u0438\u043c\u043a\u043d\u0435\u043d\u0438\u043c\u0438 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f\u043c\u0438.","example_img":"\u0412\u0438\u0433\u043b\u044f\u0434 \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0443 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f",misc:"\u0406\u043d\u0448\u0435",mouseout:"\u043f\u0440\u0438 \u0432\u0456\u0434\u0432\u0435\u0434\u0435\u043d\u043d\u0456",mouseover:"\u043f\u0440\u0438 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u043d\u0456","alt_image":"\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u0435 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","swap_image":"\u0417\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f \u0437\u0430\u043c\u0456\u043d\u043d\u0438\u043a",map:"\u041c\u0430\u043f\u0430 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f",id:"\u0406\u0434\u0435\u043d\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u043e\u0440",rtl:"\u0421\u043f\u0440\u0430\u0432\u0430 \u043b\u0456\u0432\u043e\u0440\u0443\u0447",ltr:"\u0417\u043b\u0456\u0432\u0430 \u043f\u0440\u0430\u0432\u043e\u0440\u0443\u0447",classes:"\u041a\u043b\u0430\u0441\u0438",style:"\u0421\u0442\u0438\u043b\u044c","long_desc":"\u041f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u043d\u0430 \u043f\u043e\u0432\u043d\u0438\u0439 \u043e\u043f\u0438\u0441",langcode:"\u041a\u043e\u0434 \u043c\u043e\u0432\u0438",langdir:"\u041d\u0430\u043f\u0440\u044f\u043c\u043e\u043a \u043c\u043e\u0432\u0438","constrain_proportions":"\u0417\u0431\u0435\u0440\u0456\u0433\u0430\u0442\u0438 \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0456\u0457",preview:"\u041f\u0435\u0440\u0435\u0433\u043b\u044f\u0434",title:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",general:"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435","tab_advanced":"\u0414\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u043e","tab_appearance":"\u0412\u0438\u0433\u043b\u044f\u0434","tab_general":"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435",width:"Width",height:"Height"}); \ No newline at end of file
+tinyMCE.addI18n('uk.advimage_dlg',{"image_list":"\u0421\u043f\u0438\u0441\u043e\u043a \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u044c","align_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_left":"\u041f\u043e \u043b\u0456\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_textbottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0443","align_texttop":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0443","align_bottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_middle":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","align_top":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","align_baseline":"\u041f\u043e \u0431\u0430\u0437\u043e\u0432\u0456\u0439 \u043b\u0456\u043d\u0456\u0457",align:"\u0412\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f",hspace:"\u0413\u043e\u0440\u0438\u0437. \u0432\u0456\u0434\u0441\u0442\u0443\u043f",vspace:"\u0412\u0435\u0440\u0442. \u0432\u0456\u0434\u0441\u0442\u0443\u043f",dimensions:"\u0420\u043e\u0437\u043c\u0456\u0440\u0438",border:"\u0420\u0430\u043c\u043a\u0430",list:"\u0421\u043f\u0438\u0441\u043e\u043a \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u044c",alt:"\u041e\u043f\u0438\u0441",src:"\u041f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u043d\u0430 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","dialog_title":"\u0414\u043e\u0434\u0430\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","missing_alt":"\u0412\u0438 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u043d\u0456, \u0449\u043e \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u043f\u0440\u043e\u0434\u043e\u0432\u0436\u0438\u0442\u0438 \u0431\u0435\u0437 \u043e\u043f\u0438\u0441\u0443 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f? \u0411\u0435\u0437 \u0446\u044c\u043e\u0433\u043e, \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f \u043d\u0435 \u0431\u0443\u0434\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0438\u043c \u0434\u0435\u044f\u043a\u0438\u043c \u043a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447\u0430\u043c \u0437 \u0432\u0430\u0434\u0430\u043c\u0438, \u0430\u0431\u043e \u0442\u0438\u043c, \u0445\u0442\u043e \u043a\u043e\u0440\u0438\u0442\u0443\u0454\u0442\u044c\u0441\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0438\u043c\u0438 \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0430\u0447\u0430\u043c\u0438, \u0430\u0431\u043e \u043f\u0440\u043e\u0433\u043b\u044f\u0434\u0430\u0454 \u0456\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0438 \u0437 \u0432\u0438\u043c\u043a\u043d\u0435\u043d\u0438\u043c\u0438 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f\u043c\u0438.","example_img":"\u0412\u0438\u0433\u043b\u044f\u0434 \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0443 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f",misc:"\u0406\u043d\u0448\u0435",mouseout:"\u043f\u0440\u0438 \u0432\u0456\u0434\u0432\u0435\u0434\u0435\u043d\u043d\u0456",mouseover:"\u043f\u0440\u0438 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u043d\u0456","alt_image":"\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u0435 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","swap_image":"\u0417\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f \u0437\u0430\u043c\u0456\u043d\u043d\u0438\u043a",map:"\u041c\u0430\u043f\u0430 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f",id:"\u0406\u0434\u0435\u043d\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u043e\u0440",rtl:"\u0421\u043f\u0440\u0430\u0432\u0430 \u043b\u0456\u0432\u043e\u0440\u0443\u0447",ltr:"\u0417\u043b\u0456\u0432\u0430 \u043f\u0440\u0430\u0432\u043e\u0440\u0443\u0447",classes:"\u041a\u043b\u0430\u0441\u0438",style:"\u0421\u0442\u0438\u043b\u044c","long_desc":"\u041f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u043d\u0430 \u043f\u043e\u0432\u043d\u0438\u0439 \u043e\u043f\u0438\u0441",langcode:"\u041a\u043e\u0434 \u043c\u043e\u0432\u0438",langdir:"\u041d\u0430\u043f\u0440\u044f\u043c\u043e\u043a \u043c\u043e\u0432\u0438","constrain_proportions":"\u0417\u0431\u0435\u0440\u0456\u0433\u0430\u0442\u0438 \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0456\u0457",preview:"\u041f\u0435\u0440\u0435\u0433\u043b\u044f\u0434",title:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",general:"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435","tab_advanced":"\u0414\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u043e","tab_appearance":"\u0412\u0438\u0433\u043b\u044f\u0434","tab_general":"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435",width:"\u0428\u0438\u0440\u0438\u043d\u0430",height:"\u0412\u0438\u0441\u043e\u0442\u0430"}); \ No newline at end of file
diff --git a/program/js/tiny_mce/plugins/advlink/langs/nl_dlg.js b/program/js/tiny_mce/plugins/advlink/langs/nl_dlg.js
index 0e147d81c..b2924758b 100644
--- a/program/js/tiny_mce/plugins/advlink/langs/nl_dlg.js
+++ b/program/js/tiny_mce/plugins/advlink/langs/nl_dlg.js
@@ -1 +1 @@
-tinyMCE.addI18n('nl.advlink_dlg',{"target_name":"Doel",classes:"Klassen",style:"Stijl",id:"Id","popup_position":"Positie (X/Y)",langdir:"Taalrichting","popup_size":"Grootte","popup_dependent":"Afhankelijk (Alleen Mozilla/Firefox)","popup_resizable":"Aanpasbaar venster","popup_location":"Lokatiebalk weergeven","popup_menubar":"Menubalk weergeven","popup_toolbar":"Werkbalk weergeven","popup_statusbar":"Statusbalk weergeven","popup_scrollbars":"Scrollbalken weergeven","popup_return":"\'return false\' invoegen","popup_name":"Vensternaam","popup_url":"Popup URL",popup:"Javascript popup","target_blank":"In nieuw venster openen","target_top":"In bovenste frame openen (vervangt gehele pagina)","target_parent":"In bovenliggend venster / frame openen","target_same":"In dit venster / frame openen","anchor_names":"Ankers","popup_opts":"Opties","advanced_props":"Geavanceerde eigenschappen","event_props":"Gebeurtenissen","popup_props":"Popup eigenschappen","general_props":"Algemene eigenschappen","advanced_tab":"Geavanceerd","events_tab":"Gebeurtenissen","popup_tab":"Popup","general_tab":"Algemeen",list:"Lijst","is_external":"De ingevoerde URL lijkt op een externe link. Wilt u de vereiste http:// tekst voorvoegen?","is_email":"De ingevoerde URL lijkt op een e-mailadres. Wilt u de vereiste mailto: tekst voorvoegen?",titlefield:"Titel",target:"Doel",url:"URL",title:"Link invoegen/bewerken","link_list":"Lijst",rtl:"Van rechts naar links",ltr:"Van links naar rechts",accesskey:"Toegangstoets",tabindex:"Tabvolgorde",rev:"Relatie van doel tot pagina",rel:"Relatie van pagina tot doel",mime:"MIME type",encoding:"Taalcodering",langcode:"Taalcode","target_langcode":"Taal",width:"Breedte",height:"Hoogte"}); \ No newline at end of file
+tinyMCE.addI18n('nl.advlink_dlg',{"target_name":"Doel",classes:"Klasses",style:"Stijl",id:"Id","popup_position":"Positie (X/Y)",langdir:"Taalrichting","popup_size":"Grootte","popup_dependent":"Afhankelijk (Alleen Mozilla/Firefox)","popup_resizable":"Aanpasbaar venster","popup_location":"Lokatiebalk weergeven","popup_menubar":"Menubalk weergeven","popup_toolbar":"Werkbalk weergeven","popup_statusbar":"Statusbalk weergeven","popup_scrollbars":"Scrollbalken weergeven","popup_return":"\'return false\' invoegen","popup_name":"Vensternaam","popup_url":"Popup URL",popup:"Javascript popup","target_blank":"In nieuw venster openen","target_top":"In bovenste frame openen (vervangt gehele pagina)","target_parent":"In bovenliggend venster / frame openen","target_same":"In dit venster / frame openen","anchor_names":"Ankers","popup_opts":"Opties","advanced_props":"Geavanceerde eigenschappen","event_props":"Gebeurtenissen","popup_props":"Popup eigenschappen","general_props":"Algemene eigenschappen","advanced_tab":"Geavanceerd","events_tab":"Gebeurtenissen","popup_tab":"Popup","general_tab":"Algemeen",list:"Lijst","is_external":"De ingevoerde URL lijkt op een externe link. Wilt u de vereiste http:// tekst voorvoegen?","is_email":"De ingevoerde URL lijkt op een e-mailadres. Wilt u de vereiste mailto: tekst voorvoegen?",titlefield:"Titel",target:"Doel",url:"URL",title:"Link invoegen/bewerken","link_list":"Lijst",rtl:"Van rechts naar links",ltr:"Van links naar rechts",accesskey:"Toegangstoets",tabindex:"Tabvolgorde",rev:"Relatie van doel tot pagina",rel:"Relatie van pagina tot doel",mime:"MIME type",encoding:"Taalcodering",langcode:"Taalcode","target_langcode":"Taal",width:"Breedte",height:"Hoogte"}); \ No newline at end of file
diff --git a/program/js/tiny_mce/plugins/advlink/langs/uk_dlg.js b/program/js/tiny_mce/plugins/advlink/langs/uk_dlg.js
index d069797c5..91d935ea8 100644
--- a/program/js/tiny_mce/plugins/advlink/langs/uk_dlg.js
+++ b/program/js/tiny_mce/plugins/advlink/langs/uk_dlg.js
@@ -1 +1 @@
-tinyMCE.addI18n('uk.advlink_dlg',{"target_name":"\u041d\u0430\u0437\u0432\u0430 \u0446\u0456\u043b\u0456",classes:"\u041a\u043b\u0430\u0441\u0438",style:"\u0421\u0442\u0438\u043b\u044c",id:"\u0406\u0434\u0435\u043d\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u043e\u0440","popup_position":"\u041f\u043e\u0437\u0438\u0446\u0456\u044f (X/Y)",langdir:"\u041d\u0430\u043f\u0440\u044f\u043c \u043c\u043e\u0432\u0438","popup_size":"\u0420\u043e\u0437\u043c\u0456\u0440","popup_dependent":"\u0417\u0430\u043b\u0435\u0436\u043d\u0438\u0439 (\u043b\u0438\u0448\u0435 \u0434\u043b\u044f Mozilla/Firefox)","popup_resizable":"\u0414\u043e\u0437\u0432\u043e\u043b\u044f\u0442\u0438 \u0437\u043c\u0456\u043d\u044e\u0432\u0430\u0442\u0438 \u0440\u043e\u0437\u043c\u0456\u0440","popup_location":"\u041f\u043e\u043a\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u043f\u0430\u043d\u0435\u043b\u044c location","popup_menubar":"\u041f\u043e\u043a\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u043c\u0435\u043d\u044e","popup_toolbar":"\u041f\u043e\u043a\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u043f\u0430\u043d\u0435\u043b\u0456 \u0456\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0456\u0432","popup_statusbar":"\u041f\u043e\u043a\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u0441\u0442\u0430\u0442\u0443\u0441","popup_scrollbars":"\u041f\u043e\u043a\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u0441\u043a\u0440\u043e\u043b\u0435\u0440\u0438","popup_return":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \'return false\'","popup_name":"\u041d\u0430\u0437\u0432\u0430 \u0432\u0456\u043a\u043d\u0430","popup_url":"\u041f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u043d\u0430 \u0432\u0438\u0440\u0438\u043d\u0430\u044e\u0447\u0435 \u0432\u0456\u043a\u043d\u043e",popup:"\u0412\u0438\u0440\u0438\u043d\u0430\u044e\u0447\u0435 \u0432\u0456\u043a\u043d\u043e Javascript","target_blank":"\u0412\u0456\u0434\u043a\u0440\u0438\u0442\u0438 \u0432 \u043d\u043e\u0432\u043e\u043c\u0443 \u0432\u0456\u043a\u043d\u0456","target_top":"\u0412\u0456\u0434\u043a\u0440\u0438\u0442\u0438 \u0443 \u0432\u0435\u0440\u0445\u043d\u044c\u043e\u043c\u0443 \u0444\u0440\u0435\u0439\u043c\u0456 (\u0437\u0430\u043c\u0456\u043d\u0438\u0442\u0438 \u0432\u0441\u0456 \u0444\u0440\u0435\u0439\u043c\u0438)","target_parent":"\u0412\u0456\u0434\u043a\u0440\u0438\u0442\u0438 \u0432 \u0431\u0430\u0442\u044c\u043a\u0456\u0432\u0441\u044c\u043a\u043e\u043c\u0443 \u0432\u0456\u043a\u043d\u0456 / \u0444\u0440\u0435\u0439\u043c\u0456","target_same":"\u0412\u0456\u0434\u043a\u0440\u0438\u0442\u0438 \u0432 \u0446\u044c\u043e\u043c\u0443 \u0436 \u0432\u0456\u043a\u043d\u0456 / \u0444\u0440\u0435\u0439\u043c\u0456","anchor_names":"\u042f\u043a\u043e\u0440\u0456","popup_opts":"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456","advanced_props":"\u0420\u043e\u0437\u0448\u0438\u0440\u0435\u043d\u0456 \u0432\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456","event_props":"\u041f\u043e\u0434\u0456\u0457","popup_props":"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u0432\u0438\u0440\u0438\u043d\u0430\u044e\u0447\u043e\u0433\u043e \u0432\u0456\u043a\u043d\u0430","general_props":"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0456 \u0432\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456","advanced_tab":"\u0414\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u043e","events_tab":"\u041f\u043e\u0434\u0456\u0457","popup_tab":"\u0412\u0438\u0440\u0438\u043d\u0430\u044e\u0447\u0435 \u0432\u0456\u043a\u043d\u043e","general_tab":"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435",list:"\u0421\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u044c","is_external":"\u0412\u0432\u0435\u0434\u0435\u043d\u0435 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u0441\u0445\u043e\u0436\u0435 \u043d\u0430 \u0437\u043e\u0432\u043d\u0456\u0448\u043d\u0454 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f, \u0432\u0438 \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0434\u043e\u0434\u0430\u0442\u0438 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u0438\u0439 \u043f\u0440\u0435\u0444\u0456\u043a\u0441 http://?","is_email":"\u0412\u0432\u0435\u0434\u0435\u043d\u0435 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u0441\u0445\u043e\u0436\u0435 \u043d\u0430 \u0430\u0434\u0440\u0435\u0441\u0443 \u0435\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0457 \u043f\u043e\u0448\u0442\u0438, \u0432\u0438 \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0434\u043e\u0434\u0430\u0442\u0438 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u0438\u0439 \u043f\u0440\u0435\u0444\u0456\u043a\u0441 mailto:?",titlefield:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",target:"\u0412\u0456\u0434\u043a\u0440\u0438\u0442\u0438 \u0432...",url:"\u0410\u0434\u0440\u0435\u0441\u0430",title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f","link_list":"\u0421\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u044c",rtl:"\u0421\u043f\u0440\u0430\u0432\u0430 \u043b\u0456\u0432\u043e\u0440\u0443\u0447",ltr:"\u0417\u043b\u0456\u0432\u0430 \u043f\u0440\u0430\u0432\u043e\u0440\u0443\u0447",accesskey:"\u041a\u043b\u0430\u0432\u0456\u0448\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0443",tabindex:"\u0422\u0430\u0431\u0456\u043d\u0434\u0435\u043a\u0441",rev:"\u0417\u0432\'\u044f\u0437\u043e\u043a \u043c\u0456\u0436 \u0446\u0456\u043b\u043b\u044e \u0442\u0430 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u043e\u044e",rel:"\u0417\u0432\'\u044f\u0437\u043e\u043a \u043c\u0456\u0436 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u043e\u044e \u0442\u0430 \u0446\u0456\u043b\u043b\u044e",mime:"MIME \u0442\u0438\u043f \u0446\u0456\u043b\u0456",encoding:"\u041a\u043e\u0434\u0443\u0432\u0430\u043d\u043d\u044f \u0446\u0456\u043b\u0456",langcode:"\u041a\u043e\u0434 \u043c\u043e\u0432\u0438","target_langcode":"\u041c\u043e\u0432\u0430 \u0446\u0456\u043b\u0456",width:"Width",height:"Height"}); \ No newline at end of file
+tinyMCE.addI18n('uk.advlink_dlg',{"target_name":"\u041d\u0430\u0437\u0432\u0430 \u0446\u0456\u043b\u0456",classes:"\u041a\u043b\u0430\u0441\u0438",style:"\u0421\u0442\u0438\u043b\u044c",id:"\u0406\u0434\u0435\u043d\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u043e\u0440","popup_position":"\u041f\u043e\u0437\u0438\u0446\u0456\u044f (X/Y)",langdir:"\u041d\u0430\u043f\u0440\u044f\u043c \u043c\u043e\u0432\u0438","popup_size":"\u0420\u043e\u0437\u043c\u0456\u0440","popup_dependent":"\u0417\u0430\u043b\u0435\u0436\u043d\u0438\u0439 (\u043b\u0438\u0448\u0435 \u0434\u043b\u044f Mozilla/Firefox)","popup_resizable":"\u0414\u043e\u0437\u0432\u043e\u043b\u044f\u0442\u0438 \u0437\u043c\u0456\u043d\u044e\u0432\u0430\u0442\u0438 \u0440\u043e\u0437\u043c\u0456\u0440","popup_location":"\u041f\u043e\u043a\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u043f\u0430\u043d\u0435\u043b\u044c location","popup_menubar":"\u041f\u043e\u043a\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u043c\u0435\u043d\u044e","popup_toolbar":"\u041f\u043e\u043a\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u043f\u0430\u043d\u0435\u043b\u0456 \u0456\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0456\u0432","popup_statusbar":"\u041f\u043e\u043a\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u0441\u0442\u0430\u0442\u0443\u0441","popup_scrollbars":"\u041f\u043e\u043a\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u0441\u043a\u0440\u043e\u043b\u0435\u0440\u0438","popup_return":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \'return false\'","popup_name":"\u041d\u0430\u0437\u0432\u0430 \u0432\u0456\u043a\u043d\u0430","popup_url":"\u041f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u043d\u0430 \u0432\u0438\u0440\u0438\u043d\u0430\u044e\u0447\u0435 \u0432\u0456\u043a\u043d\u043e",popup:"\u0412\u0438\u0440\u0438\u043d\u0430\u044e\u0447\u0435 \u0432\u0456\u043a\u043d\u043e Javascript","target_blank":"\u0412\u0456\u0434\u043a\u0440\u0438\u0442\u0438 \u0432 \u043d\u043e\u0432\u043e\u043c\u0443 \u0432\u0456\u043a\u043d\u0456","target_top":"\u0412\u0456\u0434\u043a\u0440\u0438\u0442\u0438 \u0443 \u0432\u0435\u0440\u0445\u043d\u044c\u043e\u043c\u0443 \u0444\u0440\u0435\u0439\u043c\u0456 (\u0437\u0430\u043c\u0456\u043d\u0438\u0442\u0438 \u0432\u0441\u0456 \u0444\u0440\u0435\u0439\u043c\u0438)","target_parent":"\u0412\u0456\u0434\u043a\u0440\u0438\u0442\u0438 \u0432 \u0431\u0430\u0442\u044c\u043a\u0456\u0432\u0441\u044c\u043a\u043e\u043c\u0443 \u0432\u0456\u043a\u043d\u0456 / \u0444\u0440\u0435\u0439\u043c\u0456","target_same":"\u0412\u0456\u0434\u043a\u0440\u0438\u0442\u0438 \u0432 \u0446\u044c\u043e\u043c\u0443 \u0436 \u0432\u0456\u043a\u043d\u0456 / \u0444\u0440\u0435\u0439\u043c\u0456","anchor_names":"\u042f\u043a\u043e\u0440\u0456","popup_opts":"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456","advanced_props":"\u0420\u043e\u0437\u0448\u0438\u0440\u0435\u043d\u0456 \u0432\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456","event_props":"\u041f\u043e\u0434\u0456\u0457","popup_props":"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u0432\u0438\u0440\u0438\u043d\u0430\u044e\u0447\u043e\u0433\u043e \u0432\u0456\u043a\u043d\u0430","general_props":"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0456 \u0432\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456","advanced_tab":"\u0414\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u043e","events_tab":"\u041f\u043e\u0434\u0456\u0457","popup_tab":"\u0412\u0438\u0440\u0438\u043d\u0430\u044e\u0447\u0435 \u0432\u0456\u043a\u043d\u043e","general_tab":"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435",list:"\u0421\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u044c","is_external":"\u0412\u0432\u0435\u0434\u0435\u043d\u0435 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u0441\u0445\u043e\u0436\u0435 \u043d\u0430 \u0437\u043e\u0432\u043d\u0456\u0448\u043d\u0454 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f, \u0432\u0438 \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0434\u043e\u0434\u0430\u0442\u0438 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u0438\u0439 \u043f\u0440\u0435\u0444\u0456\u043a\u0441 http://?","is_email":"\u0412\u0432\u0435\u0434\u0435\u043d\u0435 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u0441\u0445\u043e\u0436\u0435 \u043d\u0430 \u0430\u0434\u0440\u0435\u0441\u0443 \u0435\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0457 \u043f\u043e\u0448\u0442\u0438, \u0432\u0438 \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0434\u043e\u0434\u0430\u0442\u0438 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u0438\u0439 \u043f\u0440\u0435\u0444\u0456\u043a\u0441 mailto:?",titlefield:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a",target:"\u0412\u0456\u0434\u043a\u0440\u0438\u0442\u0438 \u0432...",url:"\u0410\u0434\u0440\u0435\u0441\u0430",title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f","link_list":"\u0421\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u044c",rtl:"\u0421\u043f\u0440\u0430\u0432\u0430 \u043b\u0456\u0432\u043e\u0440\u0443\u0447",ltr:"\u0417\u043b\u0456\u0432\u0430 \u043f\u0440\u0430\u0432\u043e\u0440\u0443\u0447",accesskey:"\u041a\u043b\u0430\u0432\u0456\u0448\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0443",tabindex:"\u0422\u0430\u0431\u0456\u043d\u0434\u0435\u043a\u0441",rev:"\u0417\u0432\'\u044f\u0437\u043e\u043a \u043c\u0456\u0436 \u0446\u0456\u043b\u043b\u044e \u0442\u0430 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u043e\u044e",rel:"\u0417\u0432\'\u044f\u0437\u043e\u043a \u043c\u0456\u0436 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u043e\u044e \u0442\u0430 \u0446\u0456\u043b\u043b\u044e",mime:"MIME \u0442\u0438\u043f \u0446\u0456\u043b\u0456",encoding:"\u041a\u043e\u0434\u0443\u0432\u0430\u043d\u043d\u044f \u0446\u0456\u043b\u0456",langcode:"\u041a\u043e\u0434 \u043c\u043e\u0432\u0438","target_langcode":"\u041c\u043e\u0432\u0430 \u0446\u0456\u043b\u0456",width:"\u0428\u0438\u0440\u0438\u043d\u0430",height:"\u0412\u0438\u0441\u043e\u0442\u0430"}); \ No newline at end of file
diff --git a/program/js/tiny_mce/plugins/autolink/editor_plugin_src.js b/program/js/tiny_mce/plugins/autolink/editor_plugin_src.js
index 8c1cd6881..0c5ea1c82 100644
--- a/program/js/tiny_mce/plugins/autolink/editor_plugin_src.js
+++ b/program/js/tiny_mce/plugins/autolink/editor_plugin_src.js
@@ -1,181 +1,181 @@
-/**
- * editor_plugin_src.js
- *
- * Copyright 2011, Moxiecode Systems AB
- * Released under LGPL License.
- *
- * License: http://tinymce.moxiecode.com/license
- * Contributing: http://tinymce.moxiecode.com/contributing
- */
-
-(function() {
- tinymce.create('tinymce.plugins.AutolinkPlugin', {
- /**
- * Initializes the plugin, this will be executed after the plugin has been created.
- * This call is done before the editor instance has finished it's initialization so use the onInit event
- * of the editor instance to intercept that event.
- *
- * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
- * @param {string} url Absolute URL to where the plugin is located.
- */
-
- init : function(ed, url) {
- var t = this;
-
- // Add a key down handler
- ed.onKeyDown.addToTop(function(ed, e) {
- if (e.keyCode == 13)
- return t.handleEnter(ed);
- });
-
- // Internet Explorer has built-in automatic linking for most cases
- if (tinyMCE.isIE)
- return;
-
- ed.onKeyPress.add(function(ed, e) {
- if (e.which == 41)
- return t.handleEclipse(ed);
- });
-
- // Add a key up handler
- ed.onKeyUp.add(function(ed, e) {
- if (e.keyCode == 32)
- return t.handleSpacebar(ed);
- });
- },
-
- handleEclipse : function(ed) {
- this.parseCurrentLine(ed, -1, '(', true);
- },
-
- handleSpacebar : function(ed) {
- this.parseCurrentLine(ed, 0, '', true);
- },
-
- handleEnter : function(ed) {
- this.parseCurrentLine(ed, -1, '', false);
- },
-
- parseCurrentLine : function(ed, end_offset, delimiter, goback) {
- var r, end, start, endContainer, bookmark, text, matches, prev, len;
-
- // We need at least five characters to form a URL,
- // hence, at minimum, five characters from the beginning of the line.
- r = ed.selection.getRng(true).cloneRange();
- if (r.startOffset < 5) {
- // During testing, the caret is placed inbetween two text nodes.
- // The previous text node contains the URL.
- prev = r.endContainer.previousSibling;
- if (prev == null) {
- if (r.endContainer.firstChild == null || r.endContainer.firstChild.nextSibling == null)
- return;
-
- prev = r.endContainer.firstChild.nextSibling;
- }
- len = prev.length;
- r.setStart(prev, len);
- r.setEnd(prev, len);
-
- if (r.endOffset < 5)
- return;
-
- end = r.endOffset;
- endContainer = prev;
- } else {
- endContainer = r.endContainer;
-
- // Get a text node
- if (endContainer.nodeType != 3 && endContainer.firstChild) {
- while (endContainer.nodeType != 3 && endContainer.firstChild)
- endContainer = endContainer.firstChild;
-
- r.setStart(endContainer, 0);
- r.setEnd(endContainer, endContainer.nodeValue.length);
- }
-
- if (r.endOffset == 1)
- end = 2;
- else
- end = r.endOffset - 1 - end_offset;
- }
-
- start = end;
-
- do
- {
- // Move the selection one character backwards.
- r.setStart(endContainer, end - 2);
- r.setEnd(endContainer, end - 1);
- end -= 1;
-
- // Loop until one of the following is found: a blank space, &nbsp;, delimeter, (end-2) >= 0
- } while (r.toString() != ' ' && r.toString() != '' && r.toString().charCodeAt(0) != 160 && (end -2) >= 0 && r.toString() != delimiter);
-
- if (r.toString() == delimiter || r.toString().charCodeAt(0) == 160) {
- r.setStart(endContainer, end);
- r.setEnd(endContainer, start);
- end += 1;
- } else if (r.startOffset == 0) {
- r.setStart(endContainer, 0);
- r.setEnd(endContainer, start);
- }
- else {
- r.setStart(endContainer, end);
- r.setEnd(endContainer, start);
- }
-
- // Exclude last . from word like "www.site.com."
- var text = r.toString();
- if (text.charAt(text.length - 1) == '.') {
- r.setEnd(endContainer, start - 1);
- }
-
- text = r.toString();
- matches = text.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+-]+@)(.+)$/i);
-
- if (matches) {
- if (matches[1] == 'www.') {
- matches[1] = 'http://www.';
- } else if (/@$/.test(matches[1]) && !/^mailto:/.test(matches[1])) {
- matches[1] = 'mailto:' + matches[1];
- }
-
- bookmark = ed.selection.getBookmark();
-
- ed.selection.setRng(r);
- tinyMCE.execCommand('createlink',false, matches[1] + matches[2]);
- ed.selection.moveToBookmark(bookmark);
- ed.nodeChanged();
-
- // TODO: Determine if this is still needed.
- if (tinyMCE.isWebKit) {
- // move the caret to its original position
- ed.selection.collapse(false);
- var max = Math.min(endContainer.length, start + 1);
- r.setStart(endContainer, max);
- r.setEnd(endContainer, max);
- ed.selection.setRng(r);
- }
- }
- },
-
- /**
- * Returns information about the plugin as a name/value array.
- * The current keys are longname, author, authorurl, infourl and version.
- *
- * @return {Object} Name/value array containing information about the plugin.
- */
- getInfo : function() {
- return {
- longname : 'Autolink',
- author : 'Moxiecode Systems AB',
- authorurl : 'http://tinymce.moxiecode.com',
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autolink',
- version : tinymce.majorVersion + "." + tinymce.minorVersion
- };
- }
- });
-
- // Register plugin
- tinymce.PluginManager.add('autolink', tinymce.plugins.AutolinkPlugin);
-})();
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2011, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ tinymce.create('tinymce.plugins.AutolinkPlugin', {
+ /**
+ * Initializes the plugin, this will be executed after the plugin has been created.
+ * This call is done before the editor instance has finished it's initialization so use the onInit event
+ * of the editor instance to intercept that event.
+ *
+ * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
+ * @param {string} url Absolute URL to where the plugin is located.
+ */
+
+ init : function(ed, url) {
+ var t = this;
+
+ // Add a key down handler
+ ed.onKeyDown.addToTop(function(ed, e) {
+ if (e.keyCode == 13)
+ return t.handleEnter(ed);
+ });
+
+ // Internet Explorer has built-in automatic linking for most cases
+ if (tinyMCE.isIE)
+ return;
+
+ ed.onKeyPress.add(function(ed, e) {
+ if (e.which == 41)
+ return t.handleEclipse(ed);
+ });
+
+ // Add a key up handler
+ ed.onKeyUp.add(function(ed, e) {
+ if (e.keyCode == 32)
+ return t.handleSpacebar(ed);
+ });
+ },
+
+ handleEclipse : function(ed) {
+ this.parseCurrentLine(ed, -1, '(', true);
+ },
+
+ handleSpacebar : function(ed) {
+ this.parseCurrentLine(ed, 0, '', true);
+ },
+
+ handleEnter : function(ed) {
+ this.parseCurrentLine(ed, -1, '', false);
+ },
+
+ parseCurrentLine : function(ed, end_offset, delimiter, goback) {
+ var r, end, start, endContainer, bookmark, text, matches, prev, len;
+
+ // We need at least five characters to form a URL,
+ // hence, at minimum, five characters from the beginning of the line.
+ r = ed.selection.getRng(true).cloneRange();
+ if (r.startOffset < 5) {
+ // During testing, the caret is placed inbetween two text nodes.
+ // The previous text node contains the URL.
+ prev = r.endContainer.previousSibling;
+ if (prev == null) {
+ if (r.endContainer.firstChild == null || r.endContainer.firstChild.nextSibling == null)
+ return;
+
+ prev = r.endContainer.firstChild.nextSibling;
+ }
+ len = prev.length;
+ r.setStart(prev, len);
+ r.setEnd(prev, len);
+
+ if (r.endOffset < 5)
+ return;
+
+ end = r.endOffset;
+ endContainer = prev;
+ } else {
+ endContainer = r.endContainer;
+
+ // Get a text node
+ if (endContainer.nodeType != 3 && endContainer.firstChild) {
+ while (endContainer.nodeType != 3 && endContainer.firstChild)
+ endContainer = endContainer.firstChild;
+
+ r.setStart(endContainer, 0);
+ r.setEnd(endContainer, endContainer.nodeValue.length);
+ }
+
+ if (r.endOffset == 1)
+ end = 2;
+ else
+ end = r.endOffset - 1 - end_offset;
+ }
+
+ start = end;
+
+ do
+ {
+ // Move the selection one character backwards.
+ r.setStart(endContainer, end - 2);
+ r.setEnd(endContainer, end - 1);
+ end -= 1;
+
+ // Loop until one of the following is found: a blank space, &nbsp;, delimeter, (end-2) >= 0
+ } while (r.toString() != ' ' && r.toString() != '' && r.toString().charCodeAt(0) != 160 && (end -2) >= 0 && r.toString() != delimiter);
+
+ if (r.toString() == delimiter || r.toString().charCodeAt(0) == 160) {
+ r.setStart(endContainer, end);
+ r.setEnd(endContainer, start);
+ end += 1;
+ } else if (r.startOffset == 0) {
+ r.setStart(endContainer, 0);
+ r.setEnd(endContainer, start);
+ }
+ else {
+ r.setStart(endContainer, end);
+ r.setEnd(endContainer, start);
+ }
+
+ // Exclude last . from word like "www.site.com."
+ var text = r.toString();
+ if (text.charAt(text.length - 1) == '.') {
+ r.setEnd(endContainer, start - 1);
+ }
+
+ text = r.toString();
+ matches = text.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+-]+@)(.+)$/i);
+
+ if (matches) {
+ if (matches[1] == 'www.') {
+ matches[1] = 'http://www.';
+ } else if (/@$/.test(matches[1]) && !/^mailto:/.test(matches[1])) {
+ matches[1] = 'mailto:' + matches[1];
+ }
+
+ bookmark = ed.selection.getBookmark();
+
+ ed.selection.setRng(r);
+ tinyMCE.execCommand('createlink',false, matches[1] + matches[2]);
+ ed.selection.moveToBookmark(bookmark);
+ ed.nodeChanged();
+
+ // TODO: Determine if this is still needed.
+ if (tinyMCE.isWebKit) {
+ // move the caret to its original position
+ ed.selection.collapse(false);
+ var max = Math.min(endContainer.length, start + 1);
+ r.setStart(endContainer, max);
+ r.setEnd(endContainer, max);
+ ed.selection.setRng(r);
+ }
+ }
+ },
+
+ /**
+ * Returns information about the plugin as a name/value array.
+ * The current keys are longname, author, authorurl, infourl and version.
+ *
+ * @return {Object} Name/value array containing information about the plugin.
+ */
+ getInfo : function() {
+ return {
+ longname : 'Autolink',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autolink',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('autolink', tinymce.plugins.AutolinkPlugin);
+})();
diff --git a/program/js/tiny_mce/plugins/autoresize/editor_plugin_src.js b/program/js/tiny_mce/plugins/autoresize/editor_plugin_src.js
index 7673bcff8..998c147eb 100644
--- a/program/js/tiny_mce/plugins/autoresize/editor_plugin_src.js
+++ b/program/js/tiny_mce/plugins/autoresize/editor_plugin_src.js
@@ -1,119 +1,119 @@
-/**
- * editor_plugin_src.js
- *
- * Copyright 2009, Moxiecode Systems AB
- * Released under LGPL License.
- *
- * License: http://tinymce.moxiecode.com/license
- * Contributing: http://tinymce.moxiecode.com/contributing
- */
-
-(function() {
- /**
- * Auto Resize
- *
- * This plugin automatically resizes the content area to fit its content height.
- * It will retain a minimum height, which is the height of the content area when
- * it's initialized.
- */
- tinymce.create('tinymce.plugins.AutoResizePlugin', {
- /**
- * Initializes the plugin, this will be executed after the plugin has been created.
- * This call is done before the editor instance has finished it's initialization so use the onInit event
- * of the editor instance to intercept that event.
- *
- * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
- * @param {string} url Absolute URL to where the plugin is located.
- */
- init : function(ed, url) {
- var t = this, oldSize = 0;
-
- if (ed.getParam('fullscreen_is_enabled'))
- return;
-
- /**
- * This method gets executed each time the editor needs to resize.
- */
- function resize() {
- var deltaSize, d = ed.getDoc(), body = d.body, de = d.documentElement, DOM = tinymce.DOM, resizeHeight = t.autoresize_min_height, myHeight;
-
- // Get height differently depending on the browser used
- myHeight = tinymce.isIE ? body.scrollHeight : (tinymce.isWebKit && body.clientHeight == 0 ? 0 : body.offsetHeight);
-
- // Don't make it smaller than the minimum height
- if (myHeight > t.autoresize_min_height)
- resizeHeight = myHeight;
-
- // If a maximum height has been defined don't exceed this height
- if (t.autoresize_max_height && myHeight > t.autoresize_max_height) {
- resizeHeight = t.autoresize_max_height;
- body.style.overflowY = "auto";
- de.style.overflowY = "auto"; // Old IE
- } else {
- body.style.overflowY = "hidden";
- de.style.overflowY = "hidden"; // Old IE
- body.scrollTop = 0;
- }
-
- // Resize content element
- if (resizeHeight !== oldSize) {
- deltaSize = resizeHeight - oldSize;
- DOM.setStyle(DOM.get(ed.id + '_ifr'), 'height', resizeHeight + 'px');
- oldSize = resizeHeight;
-
- // WebKit doesn't decrease the size of the body element until the iframe gets resized
- // So we need to continue to resize the iframe down until the size gets fixed
- if (tinymce.isWebKit && deltaSize < 0)
- resize();
- }
- };
-
- t.editor = ed;
-
- // Define minimum height
- t.autoresize_min_height = parseInt(ed.getParam('autoresize_min_height', ed.getElement().offsetHeight));
-
- // Define maximum height
- t.autoresize_max_height = parseInt(ed.getParam('autoresize_max_height', 0));
-
- // Add padding at the bottom for better UX
- ed.onInit.add(function(ed){
- ed.dom.setStyle(ed.getBody(), 'paddingBottom', ed.getParam('autoresize_bottom_margin', 50) + 'px');
- });
-
- // Add appropriate listeners for resizing content area
- ed.onChange.add(resize);
- ed.onSetContent.add(resize);
- ed.onPaste.add(resize);
- ed.onKeyUp.add(resize);
- ed.onPostRender.add(resize);
-
- if (ed.getParam('autoresize_on_init', true)) {
- ed.onLoad.add(resize);
- ed.onLoadContent.add(resize);
- }
-
- // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
- ed.addCommand('mceAutoResize', resize);
- },
-
- /**
- * Returns information about the plugin as a name/value array.
- * The current keys are longname, author, authorurl, infourl and version.
- *
- * @return {Object} Name/value array containing information about the plugin.
- */
- getInfo : function() {
- return {
- longname : 'Auto Resize',
- author : 'Moxiecode Systems AB',
- authorurl : 'http://tinymce.moxiecode.com',
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize',
- version : tinymce.majorVersion + "." + tinymce.minorVersion
- };
- }
- });
-
- // Register plugin
- tinymce.PluginManager.add('autoresize', tinymce.plugins.AutoResizePlugin);
-})();
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ /**
+ * Auto Resize
+ *
+ * This plugin automatically resizes the content area to fit its content height.
+ * It will retain a minimum height, which is the height of the content area when
+ * it's initialized.
+ */
+ tinymce.create('tinymce.plugins.AutoResizePlugin', {
+ /**
+ * Initializes the plugin, this will be executed after the plugin has been created.
+ * This call is done before the editor instance has finished it's initialization so use the onInit event
+ * of the editor instance to intercept that event.
+ *
+ * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
+ * @param {string} url Absolute URL to where the plugin is located.
+ */
+ init : function(ed, url) {
+ var t = this, oldSize = 0;
+
+ if (ed.getParam('fullscreen_is_enabled'))
+ return;
+
+ /**
+ * This method gets executed each time the editor needs to resize.
+ */
+ function resize() {
+ var deltaSize, d = ed.getDoc(), body = d.body, de = d.documentElement, DOM = tinymce.DOM, resizeHeight = t.autoresize_min_height, myHeight;
+
+ // Get height differently depending on the browser used
+ myHeight = tinymce.isIE ? body.scrollHeight : (tinymce.isWebKit && body.clientHeight == 0 ? 0 : body.offsetHeight);
+
+ // Don't make it smaller than the minimum height
+ if (myHeight > t.autoresize_min_height)
+ resizeHeight = myHeight;
+
+ // If a maximum height has been defined don't exceed this height
+ if (t.autoresize_max_height && myHeight > t.autoresize_max_height) {
+ resizeHeight = t.autoresize_max_height;
+ body.style.overflowY = "auto";
+ de.style.overflowY = "auto"; // Old IE
+ } else {
+ body.style.overflowY = "hidden";
+ de.style.overflowY = "hidden"; // Old IE
+ body.scrollTop = 0;
+ }
+
+ // Resize content element
+ if (resizeHeight !== oldSize) {
+ deltaSize = resizeHeight - oldSize;
+ DOM.setStyle(DOM.get(ed.id + '_ifr'), 'height', resizeHeight + 'px');
+ oldSize = resizeHeight;
+
+ // WebKit doesn't decrease the size of the body element until the iframe gets resized
+ // So we need to continue to resize the iframe down until the size gets fixed
+ if (tinymce.isWebKit && deltaSize < 0)
+ resize();
+ }
+ };
+
+ t.editor = ed;
+
+ // Define minimum height
+ t.autoresize_min_height = parseInt(ed.getParam('autoresize_min_height', ed.getElement().offsetHeight));
+
+ // Define maximum height
+ t.autoresize_max_height = parseInt(ed.getParam('autoresize_max_height', 0));
+
+ // Add padding at the bottom for better UX
+ ed.onInit.add(function(ed){
+ ed.dom.setStyle(ed.getBody(), 'paddingBottom', ed.getParam('autoresize_bottom_margin', 50) + 'px');
+ });
+
+ // Add appropriate listeners for resizing content area
+ ed.onChange.add(resize);
+ ed.onSetContent.add(resize);
+ ed.onPaste.add(resize);
+ ed.onKeyUp.add(resize);
+ ed.onPostRender.add(resize);
+
+ if (ed.getParam('autoresize_on_init', true)) {
+ ed.onLoad.add(resize);
+ ed.onLoadContent.add(resize);
+ }
+
+ // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
+ ed.addCommand('mceAutoResize', resize);
+ },
+
+ /**
+ * Returns information about the plugin as a name/value array.
+ * The current keys are longname, author, authorurl, infourl and version.
+ *
+ * @return {Object} Name/value array containing information about the plugin.
+ */
+ getInfo : function() {
+ return {
+ longname : 'Auto Resize',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('autoresize', tinymce.plugins.AutoResizePlugin);
+})();
diff --git a/program/js/tiny_mce/plugins/autosave/editor_plugin.js b/program/js/tiny_mce/plugins/autosave/editor_plugin.js
index f7d057600..6da98ff33 100644
--- a/program/js/tiny_mce/plugins/autosave/editor_plugin.js
+++ b/program/js/tiny_mce/plugins/autosave/editor_plugin.js
@@ -1 +1 @@
-(function(e){var c="autosave",g="restoredraft",b=true,f,d,a=e.util.Dispatcher;e.create("tinymce.plugins.AutoSave",{init:function(i,j){var h=this,l=i.settings;h.editor=i;function k(n){var m={s:1000,m:60000};n=/^(\d+)([ms]?)$/.exec(""+n);return(n[2]?m[n[2]]:1)*parseInt(n)}e.each({ask_before_unload:b,interval:"30s",retention:"20m",minlength:50},function(n,m){m=c+"_"+m;if(l[m]===f){l[m]=n}});l.autosave_interval=k(l.autosave_interval);l.autosave_retention=k(l.autosave_retention);i.addButton(g,{title:c+".restore_content",onclick:function(){if(i.getContent({draft:true}).replace(/\s|&nbsp;|<\/?p[^>]*>|<br[^>]*>/gi,"").length>0){i.windowManager.confirm(c+".warning_message",function(m){if(m){h.restoreDraft()}})}else{h.restoreDraft()}}});i.onNodeChange.add(function(){var m=i.controlManager;if(m.get(g)){m.setDisabled(g,!h.hasDraft())}});i.onInit.add(function(){if(i.controlManager.get(g)){h.setupStorage(i);setInterval(function(){h.storeDraft();i.nodeChanged()},l.autosave_interval)}});h.onStoreDraft=new a(h);h.onRestoreDraft=new a(h);h.onRemoveDraft=new a(h);if(!d){window.onbeforeunload=e.plugins.AutoSave._beforeUnloadHandler;d=b}},getInfo:function(){return{longname:"Auto save",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave",version:e.majorVersion+"."+e.minorVersion}},getExpDate:function(){return new Date(new Date().getTime()+this.editor.settings.autosave_retention).toUTCString()},setupStorage:function(i){var h=this,k=c+"_test",j="OK";h.key=c+i.id;e.each([function(){if(localStorage){localStorage.setItem(k,j);if(localStorage.getItem(k)===j){localStorage.removeItem(k);return localStorage}}},function(){if(sessionStorage){sessionStorage.setItem(k,j);if(sessionStorage.getItem(k)===j){sessionStorage.removeItem(k);return sessionStorage}}},function(){if(e.isIE){i.getElement().style.behavior="url('#default#userData')";return{autoExpires:b,setItem:function(l,n){var m=i.getElement();m.setAttribute(l,n);m.expires=h.getExpDate();try{m.save("TinyMCE")}catch(o){}},getItem:function(l){var m=i.getElement();try{m.load("TinyMCE");return m.getAttribute(l)}catch(n){return null}},removeItem:function(l){i.getElement().removeAttribute(l)}}}},],function(l){try{h.storage=l();if(h.storage){return false}}catch(m){}})},storeDraft:function(){var i=this,l=i.storage,j=i.editor,h,k;if(l){if(!l.getItem(i.key)&&!j.isDirty()){return}k=j.getContent({draft:true});if(k.length>j.settings.autosave_minlength){h=i.getExpDate();if(!i.storage.autoExpires){i.storage.setItem(i.key+"_expires",h)}i.storage.setItem(i.key,k);i.onStoreDraft.dispatch(i,{expires:h,content:k})}}},restoreDraft:function(){var h=this,j=h.storage,i;if(j){i=j.getItem(h.key);if(i){h.editor.setContent(i);h.onRestoreDraft.dispatch(h,{content:i})}}},hasDraft:function(){var h=this,k=h.storage,i,j;if(k){j=!!k.getItem(h.key);if(j){if(!h.storage.autoExpires){i=new Date(k.getItem(h.key+"_expires"));if(new Date().getTime()<i.getTime()){return b}h.removeDraft()}else{return b}}}return false},removeDraft:function(){var h=this,k=h.storage,i=h.key,j;if(k){j=k.getItem(i);k.removeItem(i);k.removeItem(i+"_expires");if(j){h.onRemoveDraft.dispatch(h,{content:j})}}},"static":{_beforeUnloadHandler:function(h){var i;e.each(tinyMCE.editors,function(j){if(j.plugins.autosave){j.plugins.autosave.storeDraft()}if(j.getParam("fullscreen_is_enabled")){return}if(!i&&j.isDirty()&&j.getParam("autosave_ask_before_unload")){i=j.getLang("autosave.unload_msg")}});return i}}});e.PluginManager.add("autosave",e.plugins.AutoSave)})(tinymce); \ No newline at end of file
+(function(e){var c="autosave",g="restoredraft",b=true,f,d,a=e.util.Dispatcher;e.create("tinymce.plugins.AutoSave",{init:function(i,j){var h=this,l=i.settings;h.editor=i;function k(n){var m={s:1000,m:60000};n=/^(\d+)([ms]?)$/.exec(""+n);return(n[2]?m[n[2]]:1)*parseInt(n)}e.each({ask_before_unload:b,interval:"30s",retention:"20m",minlength:50},function(n,m){m=c+"_"+m;if(l[m]===f){l[m]=n}});l.autosave_interval=k(l.autosave_interval);l.autosave_retention=k(l.autosave_retention);i.addButton(g,{title:c+".restore_content",onclick:function(){if(i.getContent({draft:true}).replace(/\s|&nbsp;|<\/?p[^>]*>|<br[^>]*>/gi,"").length>0){i.windowManager.confirm(c+".warning_message",function(m){if(m){h.restoreDraft()}})}else{h.restoreDraft()}}});i.onNodeChange.add(function(){var m=i.controlManager;if(m.get(g)){m.setDisabled(g,!h.hasDraft())}});i.onInit.add(function(){if(i.controlManager.get(g)){h.setupStorage(i);setInterval(function(){if(!i.removed){h.storeDraft();i.nodeChanged()}},l.autosave_interval)}});h.onStoreDraft=new a(h);h.onRestoreDraft=new a(h);h.onRemoveDraft=new a(h);if(!d){window.onbeforeunload=e.plugins.AutoSave._beforeUnloadHandler;d=b}},getInfo:function(){return{longname:"Auto save",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave",version:e.majorVersion+"."+e.minorVersion}},getExpDate:function(){return new Date(new Date().getTime()+this.editor.settings.autosave_retention).toUTCString()},setupStorage:function(i){var h=this,k=c+"_test",j="OK";h.key=c+i.id;e.each([function(){if(localStorage){localStorage.setItem(k,j);if(localStorage.getItem(k)===j){localStorage.removeItem(k);return localStorage}}},function(){if(sessionStorage){sessionStorage.setItem(k,j);if(sessionStorage.getItem(k)===j){sessionStorage.removeItem(k);return sessionStorage}}},function(){if(e.isIE){i.getElement().style.behavior="url('#default#userData')";return{autoExpires:b,setItem:function(l,n){var m=i.getElement();m.setAttribute(l,n);m.expires=h.getExpDate();try{m.save("TinyMCE")}catch(o){}},getItem:function(l){var m=i.getElement();try{m.load("TinyMCE");return m.getAttribute(l)}catch(n){return null}},removeItem:function(l){i.getElement().removeAttribute(l)}}}},],function(l){try{h.storage=l();if(h.storage){return false}}catch(m){}})},storeDraft:function(){var i=this,l=i.storage,j=i.editor,h,k;if(l){if(!l.getItem(i.key)&&!j.isDirty()){return}k=j.getContent({draft:true});if(k.length>j.settings.autosave_minlength){h=i.getExpDate();if(!i.storage.autoExpires){i.storage.setItem(i.key+"_expires",h)}i.storage.setItem(i.key,k);i.onStoreDraft.dispatch(i,{expires:h,content:k})}}},restoreDraft:function(){var h=this,j=h.storage,i;if(j){i=j.getItem(h.key);if(i){h.editor.setContent(i);h.onRestoreDraft.dispatch(h,{content:i})}}},hasDraft:function(){var h=this,k=h.storage,i,j;if(k){j=!!k.getItem(h.key);if(j){if(!h.storage.autoExpires){i=new Date(k.getItem(h.key+"_expires"));if(new Date().getTime()<i.getTime()){return b}h.removeDraft()}else{return b}}}return false},removeDraft:function(){var h=this,k=h.storage,i=h.key,j;if(k){j=k.getItem(i);k.removeItem(i);k.removeItem(i+"_expires");if(j){h.onRemoveDraft.dispatch(h,{content:j})}}},"static":{_beforeUnloadHandler:function(h){var i;e.each(tinyMCE.editors,function(j){if(j.plugins.autosave){j.plugins.autosave.storeDraft()}if(j.getParam("fullscreen_is_enabled")){return}if(!i&&j.isDirty()&&j.getParam("autosave_ask_before_unload")){i=j.getLang("autosave.unload_msg")}});return i}}});e.PluginManager.add("autosave",e.plugins.AutoSave)})(tinymce); \ No newline at end of file
diff --git a/program/js/tiny_mce/plugins/autosave/editor_plugin_src.js b/program/js/tiny_mce/plugins/autosave/editor_plugin_src.js
index 8311483f9..8b308f5aa 100644
--- a/program/js/tiny_mce/plugins/autosave/editor_plugin_src.js
+++ b/program/js/tiny_mce/plugins/autosave/editor_plugin_src.js
@@ -136,8 +136,10 @@
// Auto save contents each interval time
setInterval(function() {
- self.storeDraft();
- ed.nodeChanged();
+ if (!ed.removed) {
+ self.storeDraft();
+ ed.nodeChanged();
+ }
}, settings.autosave_interval);
}
});
diff --git a/program/js/tiny_mce/plugins/contextmenu/editor_plugin.js b/program/js/tiny_mce/plugins/contextmenu/editor_plugin.js
index 4f99010e8..2ed042c3a 100644
--- a/program/js/tiny_mce/plugins/contextmenu/editor_plugin.js
+++ b/program/js/tiny_mce/plugins/contextmenu/editor_plugin.js
@@ -1 +1 @@
-(function(){var a=tinymce.dom.Event,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.ContextMenu",{init:function(e){var h=this,f,d,i;h.editor=e;d=e.settings.contextmenu_never_use_native;h.onContextMenu=new tinymce.util.Dispatcher(this);f=e.onContextMenu.add(function(j,k){if((i!==0?i:k.ctrlKey)&&!d){return}a.cancel(k);if(k.target.nodeName=="IMG"){j.selection.select(k.target)}h._getMenu(j).showMenu(k.clientX||k.pageX,k.clientY||k.pageY);a.add(j.getDoc(),"click",function(l){g(j,l)});j.nodeChanged()});e.onRemove.add(function(){if(h._menu){h._menu.removeAll()}});function g(j,k){i=0;if(k&&k.button==2){i=k.ctrlKey;return}if(h._menu){h._menu.removeAll();h._menu.destroy();a.remove(j.getDoc(),"click",g);h._menu=null}}e.onMouseDown.add(g);e.onKeyDown.add(g);e.onKeyDown.add(function(j,k){if(k.shiftKey&&!k.ctrlKey&&!k.altKey&&k.keyCode===121){a.cancel(k);f(j,k)}})},getInfo:function(){return{longname:"Contextmenu",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getMenu:function(e){var g=this,d=g._menu,j=e.selection,f=j.isCollapsed(),h=j.getNode()||e.getBody(),i,k;if(d){d.removeAll();d.destroy()}k=b.getPos(e.getContentAreaContainer());d=e.controlManager.createDropMenu("contextmenu",{offset_x:k.x+e.getParam("contextmenu_offset_x",0),offset_y:k.y+e.getParam("contextmenu_offset_y",0),constrain:1,keyboard_focus:true});g._menu=d;d.add({title:"advanced.cut_desc",icon:"cut",cmd:"Cut"}).setDisabled(f);d.add({title:"advanced.copy_desc",icon:"copy",cmd:"Copy"}).setDisabled(f);d.add({title:"advanced.paste_desc",icon:"paste",cmd:"Paste"});if((h.nodeName=="A"&&!e.dom.getAttrib(h,"name"))||!f){d.addSeparator();d.add({title:"advanced.link_desc",icon:"link",cmd:e.plugins.advlink?"mceAdvLink":"mceLink",ui:true});d.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"})}d.addSeparator();d.add({title:"advanced.image_desc",icon:"image",cmd:e.plugins.advimage?"mceAdvImage":"mceImage",ui:true});d.addSeparator();i=d.addMenu({title:"contextmenu.align"});i.add({title:"contextmenu.left",icon:"justifyleft",cmd:"JustifyLeft"});i.add({title:"contextmenu.center",icon:"justifycenter",cmd:"JustifyCenter"});i.add({title:"contextmenu.right",icon:"justifyright",cmd:"JustifyRight"});i.add({title:"contextmenu.full",icon:"justifyfull",cmd:"JustifyFull"});g.onContextMenu.dispatch(g,d,h,f);return d}});tinymce.PluginManager.add("contextmenu",tinymce.plugins.ContextMenu)})(); \ No newline at end of file
+(function(){var a=tinymce.dom.Event,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.ContextMenu",{init:function(f){var i=this,g,d,j,e;i.editor=f;d=f.settings.contextmenu_never_use_native;i.onContextMenu=new tinymce.util.Dispatcher(this);e=function(k){h(f,k)};g=f.onContextMenu.add(function(k,l){if((j!==0?j:l.ctrlKey)&&!d){return}a.cancel(l);if(l.target.nodeName=="IMG"){k.selection.select(l.target)}i._getMenu(k).showMenu(l.clientX||l.pageX,l.clientY||l.pageY);a.add(k.getDoc(),"click",e);k.nodeChanged()});f.onRemove.add(function(){if(i._menu){i._menu.removeAll()}});function h(k,l){j=0;if(l&&l.button==2){j=l.ctrlKey;return}if(i._menu){i._menu.removeAll();i._menu.destroy();a.remove(k.getDoc(),"click",e);i._menu=null}}f.onMouseDown.add(h);f.onKeyDown.add(h);f.onKeyDown.add(function(k,l){if(l.shiftKey&&!l.ctrlKey&&!l.altKey&&l.keyCode===121){a.cancel(l);g(k,l)}})},getInfo:function(){return{longname:"Contextmenu",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getMenu:function(e){var g=this,d=g._menu,j=e.selection,f=j.isCollapsed(),h=j.getNode()||e.getBody(),i,k;if(d){d.removeAll();d.destroy()}k=b.getPos(e.getContentAreaContainer());d=e.controlManager.createDropMenu("contextmenu",{offset_x:k.x+e.getParam("contextmenu_offset_x",0),offset_y:k.y+e.getParam("contextmenu_offset_y",0),constrain:1,keyboard_focus:true});g._menu=d;d.add({title:"advanced.cut_desc",icon:"cut",cmd:"Cut"}).setDisabled(f);d.add({title:"advanced.copy_desc",icon:"copy",cmd:"Copy"}).setDisabled(f);d.add({title:"advanced.paste_desc",icon:"paste",cmd:"Paste"});if((h.nodeName=="A"&&!e.dom.getAttrib(h,"name"))||!f){d.addSeparator();d.add({title:"advanced.link_desc",icon:"link",cmd:e.plugins.advlink?"mceAdvLink":"mceLink",ui:true});d.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"})}d.addSeparator();d.add({title:"advanced.image_desc",icon:"image",cmd:e.plugins.advimage?"mceAdvImage":"mceImage",ui:true});d.addSeparator();i=d.addMenu({title:"contextmenu.align"});i.add({title:"contextmenu.left",icon:"justifyleft",cmd:"JustifyLeft"});i.add({title:"contextmenu.center",icon:"justifycenter",cmd:"JustifyCenter"});i.add({title:"contextmenu.right",icon:"justifyright",cmd:"JustifyRight"});i.add({title:"contextmenu.full",icon:"justifyfull",cmd:"JustifyFull"});g.onContextMenu.dispatch(g,d,h,f);return d}});tinymce.PluginManager.add("contextmenu",tinymce.plugins.ContextMenu)})(); \ No newline at end of file
diff --git a/program/js/tiny_mce/plugins/contextmenu/editor_plugin_src.js b/program/js/tiny_mce/plugins/contextmenu/editor_plugin_src.js
index 004d011d0..48b0fff99 100644
--- a/program/js/tiny_mce/plugins/contextmenu/editor_plugin_src.js
+++ b/program/js/tiny_mce/plugins/contextmenu/editor_plugin_src.js
@@ -27,7 +27,7 @@
* @param {string} url Absolute URL to where the plugin is located.
*/
init : function(ed) {
- var t = this, showMenu, contextmenuNeverUseNative, realCtrlKey;
+ var t = this, showMenu, contextmenuNeverUseNative, realCtrlKey, hideMenu;
t.editor = ed;
@@ -42,6 +42,10 @@
*/
t.onContextMenu = new tinymce.util.Dispatcher(this);
+ hideMenu = function(e) {
+ hide(ed, e);
+ };
+
showMenu = ed.onContextMenu.add(function(ed, e) {
// Block TinyMCE menu on ctrlKey and work around Safari issue
if ((realCtrlKey !== 0 ? realCtrlKey : e.ctrlKey) && !contextmenuNeverUseNative)
@@ -54,13 +58,11 @@
ed.selection.select(e.target);
t._getMenu(ed).showMenu(e.clientX || e.pageX, e.clientY || e.pageY);
- Event.add(ed.getDoc(), 'click', function(e) {
- hide(ed, e);
- });
+ Event.add(ed.getDoc(), 'click', hideMenu);
ed.nodeChanged();
});
-
+
ed.onRemove.add(function() {
if (t._menu)
t._menu.removeAll();
@@ -78,8 +80,8 @@
if (t._menu) {
t._menu.removeAll();
- t._menu.destroy();
- Event.remove(ed.getDoc(), 'click', hide);
+ t._menu.destroy();
+ Event.remove(ed.getDoc(), 'click', hideMenu);
t._menu = null;
}
};
diff --git a/program/js/tiny_mce/plugins/emotions/langs/uk_dlg.js b/program/js/tiny_mce/plugins/emotions/langs/uk_dlg.js
index ec10c33c9..8798e9eca 100644
--- a/program/js/tiny_mce/plugins/emotions/langs/uk_dlg.js
+++ b/program/js/tiny_mce/plugins/emotions/langs/uk_dlg.js
@@ -1 +1 @@
-tinyMCE.addI18n('uk.emotions_dlg',{cry:"\u041f\u043b\u0430\u0447",cool:"Cool",desc:"\u041f\u043e\u0441\u043c\u0456\u0448\u043a\u0438",title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043f\u043e\u0441\u043c\u0456\u0448\u043a\u0443",yell:"\u0417\u043e\u0439\u043a",wink:"\u041f\u0456\u0434\u043c\u043e\u0440\u0433\u0443\u0454",undecided:"\u041d\u0435\u0440\u0456\u0448\u0443\u0447\u0456\u0441\u0442\u044c","tongue_out":"\u041f\u043e\u043a\u0430\u0437\u0443\u0454 \u044f\u0437\u0438\u043a\u0430",surprised:"\u0417\u0434\u0438\u0432\u043e\u0432\u0430\u043d\u0456\u0441\u0442\u044c",smile:"\u041f\u043e\u0441\u043c\u0456\u0448\u043a\u0430",sealed:"Sealed","money_mouth":"\u0413\u0440\u043e\u0449\u0456 \u0432 \u0440\u043e\u0442\u0456",laughing:"\u0421\u043c\u0456\u0445",kiss:"\u041f\u043e\u0446\u0456\u043b\u0443\u043d\u043e\u043a",innocent:"\u041d\u0435\u0432\u0438\u043d\u043d\u0456\u0441\u0442\u044c",frown:"\u041d\u0430\u0441\u0443\u043f\u043b\u0435\u043d\u043d\u0456\u0441\u0442\u044c","foot_in_mouth":"\u041d\u043e\u0433\u0430 \u0432 \u0440\u043e\u0442\u0456",embarassed:"\u0417\u0431\u0435\u043d\u0442\u0435\u0436\u0435\u043d\u043d\u044f",usage:"Use left and right arrows to navigate."}); \ No newline at end of file
+tinyMCE.addI18n('uk.emotions_dlg',{cry:"\u041f\u043b\u0430\u0447",cool:"Cool",desc:"\u041f\u043e\u0441\u043c\u0456\u0448\u043a\u0438",title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043f\u043e\u0441\u043c\u0456\u0448\u043a\u0443",yell:"\u0417\u043e\u0439\u043a",wink:"\u041f\u0456\u0434\u043c\u043e\u0440\u0433\u0443\u0454",undecided:"\u041d\u0435\u0440\u0456\u0448\u0443\u0447\u0456\u0441\u0442\u044c","tongue_out":"\u041f\u043e\u043a\u0430\u0437\u0443\u0454 \u044f\u0437\u0438\u043a\u0430",surprised:"\u0417\u0434\u0438\u0432\u043e\u0432\u0430\u043d\u0456\u0441\u0442\u044c",smile:"\u041f\u043e\u0441\u043c\u0456\u0448\u043a\u0430",sealed:"Sealed","money_mouth":"\u0413\u0440\u043e\u0449\u0456 \u0432 \u0440\u043e\u0442\u0456",laughing:"\u0421\u043c\u0456\u0445",kiss:"\u041f\u043e\u0446\u0456\u043b\u0443\u043d\u043e\u043a",innocent:"\u041d\u0435\u0432\u0438\u043d\u043d\u0456\u0441\u0442\u044c",frown:"\u041d\u0430\u0441\u0443\u043f\u043b\u0435\u043d\u043d\u0456\u0441\u0442\u044c","foot_in_mouth":"\u041d\u043e\u0433\u0430 \u0432 \u0440\u043e\u0442\u0456",embarassed:"\u0417\u0431\u0435\u043d\u0442\u0435\u0436\u0435\u043d\u043d\u044f",usage:"\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0439\u0442\u0435 \u0441\u0442\u0440\u0456\u043b\u043a\u0438 \u0432\u043b\u0456\u0432\u043e \u0442\u0430 \u0432\u043f\u0440\u0430\u0432\u043e \u0434\u043b\u044f \u043d\u0430\u0432\u0456\u0433\u0430\u0446\u0456\u0457"}); \ No newline at end of file
diff --git a/program/js/tiny_mce/plugins/example_dependency/editor_plugin_src.js b/program/js/tiny_mce/plugins/example_dependency/editor_plugin_src.js
index e1c55e41b..f761441ea 100644
--- a/program/js/tiny_mce/plugins/example_dependency/editor_plugin_src.js
+++ b/program/js/tiny_mce/plugins/example_dependency/editor_plugin_src.js
@@ -1,50 +1,50 @@
-/**
- * editor_plugin_src.js
- *
- * Copyright 2009, Moxiecode Systems AB
- * Released under LGPL License.
- *
- * License: http://tinymce.moxiecode.com/license
- * Contributing: http://tinymce.moxiecode.com/contributing
- */
-
-(function() {
-
- tinymce.create('tinymce.plugins.ExampleDependencyPlugin', {
- /**
- * Initializes the plugin, this will be executed after the plugin has been created.
- * This call is done before the editor instance has finished it's initialization so use the onInit event
- * of the editor instance to intercept that event.
- *
- * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
- * @param {string} url Absolute URL to where the plugin is located.
- */
- init : function(ed, url) {
- },
-
-
- /**
- * Returns information about the plugin as a name/value array.
- * The current keys are longname, author, authorurl, infourl and version.
- *
- * @return {Object} Name/value array containing information about the plugin.
- */
- getInfo : function() {
- return {
- longname : 'Example Dependency plugin',
- author : 'Some author',
- authorurl : 'http://tinymce.moxiecode.com',
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example_dependency',
- version : "1.0"
- };
- }
- });
-
- /**
- * Register the plugin, specifying the list of the plugins that this plugin depends on. They are specified in a list, with the list loaded in order.
- * plugins in this list will be initialised when this plugin is initialized. (before the init method is called).
- * plugins in a depends list should typically be specified using the short name). If neccesary this can be done
- * with an object which has the url to the plugin and the shortname.
- */
- tinymce.PluginManager.add('example_dependency', tinymce.plugins.ExampleDependencyPlugin, ['example']);
-})();
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+
+ tinymce.create('tinymce.plugins.ExampleDependencyPlugin', {
+ /**
+ * Initializes the plugin, this will be executed after the plugin has been created.
+ * This call is done before the editor instance has finished it's initialization so use the onInit event
+ * of the editor instance to intercept that event.
+ *
+ * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
+ * @param {string} url Absolute URL to where the plugin is located.
+ */
+ init : function(ed, url) {
+ },
+
+
+ /**
+ * Returns information about the plugin as a name/value array.
+ * The current keys are longname, author, authorurl, infourl and version.
+ *
+ * @return {Object} Name/value array containing information about the plugin.
+ */
+ getInfo : function() {
+ return {
+ longname : 'Example Dependency plugin',
+ author : 'Some author',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example_dependency',
+ version : "1.0"
+ };
+ }
+ });
+
+ /**
+ * Register the plugin, specifying the list of the plugins that this plugin depends on. They are specified in a list, with the list loaded in order.
+ * plugins in this list will be initialised when this plugin is initialized. (before the init method is called).
+ * plugins in a depends list should typically be specified using the short name). If neccesary this can be done
+ * with an object which has the url to the plugin and the shortname.
+ */
+ tinymce.PluginManager.add('example_dependency', tinymce.plugins.ExampleDependencyPlugin, ['example']);
+})();
diff --git a/program/js/tiny_mce/plugins/fullpage/langs/nl_dlg.js b/program/js/tiny_mce/plugins/fullpage/langs/nl_dlg.js
index 3fca75086..9124146ce 100644
--- a/program/js/tiny_mce/plugins/fullpage/langs/nl_dlg.js
+++ b/program/js/tiny_mce/plugins/fullpage/langs/nl_dlg.js
@@ -1 +1 @@
-tinyMCE.addI18n('nl.fullpage_dlg',{title:"Documenteigenschappen","meta_tab":"Algemeen","appearance_tab":"Weergave","advanced_tab":"Geavanceerd","meta_props":"Meta informatie",langprops:"Taal en codering","meta_title":"Titel","meta_keywords":"Sleutelwoorden","meta_description":"Beschrijving","meta_robots":"Robots",doctypes:"Doctype",langcode:"Taalcode",langdir:"Taalrichting",ltr:"Van links naar rechts",rtl:"Van rechts naar links","xml_pi":"XML toewijzing",encoding:"Karaktercodering","appearance_bgprops":"Achtergrondeigenschappen","appearance_marginprops":"Bodymarge","appearance_linkprops":"Linkkleuren","appearance_textprops":"Teksteigenschappen",bgcolor:"Achtergrondkleur",bgimage:"Achtergrondafbeelding","left_margin":"Linkermarge","right_margin":"Rechtermarge","top_margin":"Bovenmarge","bottom_margin":"Ondermarge","text_color":"Tekstkleur","font_size":"Tekengrootte","font_face":"Lettertype","link_color":"Linkkleur","hover_color":"Hoverkleur","visited_color":"Bezocht kleur","active_color":"Actieve kleur",textcolor:"Kleur",fontsize:"Tekengrootte",fontface:"Lettertype","meta_index_follow":"Links indexeren en volgen","meta_index_nofollow":"Links indexeren maar niet volgen","meta_noindex_follow":"Links volgen maar niet indexeren","meta_noindex_nofollow":"Links niet indexeren en niet volgen","appearance_style":"Stijlblad en stijleigenschappen",stylesheet:"Stijlblad",style:"Stijl",author:"Auteur",copyright:"Copyright",add:"Nieuw element toevoegen",remove:"Geselecteerde elementen verwijderen",moveup:"Geselecteerde elementen omhoog verplaatsen",movedown:"Geselecteerde elementen omlaag verplaatsen","head_elements":"Kopelementen",info:"Informatie","add_title":"Titelelement","add_meta":"Meta-element","add_script":"Scriptelement","add_style":"Stijlelement","add_link":"Linkelement","add_base":"Basiselement","add_comment":"Opmerkingknooppunt","title_element":"Titelelement","script_element":"Scriptelement","style_element":"Stijlelement","base_element":"Basiselement","link_element":"Linkelement","meta_element":"Meta-element","comment_element":"Opmerking",src:"Bron",language:"Taal",href:"Href",target:"Doel",type:"Type",charset:"Karakterset",defer:"Uitstellen",media:"Media",properties:"Eigenschappen",name:"Naam",value:"Waarde",content:"Inhoud",rel:"Rel",rev:"Rev",hreflang:"Href taal","general_props":"Algemeen","advanced_props":"Geavanceerd"}); \ No newline at end of file
+tinyMCE.addI18n('nl.fullpage_dlg',{title:"Documenteigenschappen","meta_tab":"Algemeen","appearance_tab":"Weergave","advanced_tab":"Geavanceerd","meta_props":"Meta informatie",langprops:"Taal en codering","meta_title":"Titel","meta_keywords":"Sleutelwoorden","meta_description":"Beschrijving","meta_robots":"Robots",doctypes:"Doctype",langcode:"Taalcode",langdir:"Taalrichting",ltr:"Van links naar rechts",rtl:"Van rechts naar links","xml_pi":"XML toewijzing",encoding:"Karaktercodering","appearance_bgprops":"Achtergrondeigenschappen","appearance_marginprops":"Bodymarge","appearance_linkprops":"Linkkleuren","appearance_textprops":"Teksteigenschappen",bgcolor:"Achtergrondkleur",bgimage:"Achtergrondafbeelding","left_margin":"Linkermarge","right_margin":"Rechtermarge","top_margin":"Bovenmarge","bottom_margin":"Ondermarge","text_color":"Tekstkleur","font_size":"Tekengrootte","font_face":"Lettertype","link_color":"Linkkleur","hover_color":"Hoverkleur","visited_color":"Bezocht kleur","active_color":"Actieve kleur",textcolor:"Kleur",fontsize:"Tekengrootte",fontface:"Lettertype","meta_index_follow":"Links indexeren en volgen","meta_index_nofollow":"Links indexeren maar niet volgen","meta_noindex_follow":"Links volgen maar niet indexeren","meta_noindex_nofollow":"Links niet indexeren en niet volgen","appearance_style":"Stijlblad en stijleigenschappen",stylesheet:"Stijlblad",style:"Stijl",author:"Auteur",copyright:"Copyright",add:"Nieuw element toevoegen",remove:"Geselecteerde elementen verwijderen",moveup:"Geselecteerde elementen omhoog verplaatsen",movedown:"Geselecteerde elementen omlaag verplaatsen","head_elements":"Kopelementen",info:"Informatie","add_title":"Titelelement","add_meta":"Meta-element","add_script":"Scriptelement","add_style":"Stijlelement","add_link":"Linkelement","add_base":"Basiselement","add_comment":"Opmerkingknooppunt","title_element":"Titelelement","script_element":"Scriptelement","style_element":"Stijlelement","base_element":"Basiselement","link_element":"Linkelement","meta_element":"Meta-element","comment_element":"Opmerking",src:"Bron",language:"Taal",href:"HREF",target:"Doel",type:"Type",charset:"Karakterset",defer:"Uitstellen",media:"Media",properties:"Eigenschappen",name:"Naam",value:"Waarde",content:"Inhoud",rel:"Rel",rev:"Rev",hreflang:"HREF taal","general_props":"Algemeen","advanced_props":"Geavanceerd"}); \ No newline at end of file
diff --git a/program/js/tiny_mce/plugins/lists/editor_plugin.js b/program/js/tiny_mce/plugins/lists/editor_plugin.js
index f07e37250..507331fbf 100644
--- a/program/js/tiny_mce/plugins/lists/editor_plugin.js
+++ b/program/js/tiny_mce/plugins/lists/editor_plugin.js
@@ -1 +1 @@
-(function(){var e=tinymce.each,r=tinymce.dom.Event,g;function p(t,s){while(t&&(t.nodeType===8||(t.nodeType===3&&/^[ \t\n\r]*$/.test(t.nodeValue)))){t=s(t)}return t}function b(s){return p(s,function(t){return t.previousSibling})}function i(s){return p(s,function(t){return t.nextSibling})}function d(s,u,t){return s.dom.getParent(u,function(v){return tinymce.inArray(t,v)!==-1})}function n(s){return s&&(s.tagName==="OL"||s.tagName==="UL")}function c(u,v){var t,w,s;t=b(u.lastChild);while(n(t)){w=t;t=b(w.previousSibling)}if(w){s=v.create("li",{style:"list-style-type: none;"});v.split(u,w);v.insertAfter(s,w);s.appendChild(w);s.appendChild(w);u=s.previousSibling}return u}function m(t,s,u){t=a(t,s,u);return o(t,s,u)}function a(u,s,v){var t=b(u.previousSibling);if(t){return h(t,u,s?t:false,v)}else{return u}}function o(u,t,v){var s=i(u.nextSibling);if(s){return h(u,s,t?s:false,v)}else{return u}}function h(u,s,t,v){if(l(u,s,!!t,v)){return f(u,s,t)}else{if(u&&u.tagName==="LI"&&n(s)){u.appendChild(s)}}return s}function l(u,t,s,v){if(!u||!t){return false}else{if(u.tagName==="LI"&&t.tagName==="LI"){return t.style.listStyleType==="none"||j(t)}else{if(n(u)){return(u.tagName===t.tagName&&(s||u.style.listStyleType===t.style.listStyleType))||q(t)}else{return v&&u.tagName==="P"&&t.tagName==="P"}}}}function q(t){var s=i(t.firstChild),u=b(t.lastChild);return s&&u&&n(t)&&s===u&&(n(s)||s.style.listStyleType==="none"||j(s))}function j(u){var t=i(u.firstChild),s=b(u.lastChild);return t&&s&&t===s&&n(t)}function f(w,v,s){var u=b(w.lastChild),t=i(v.firstChild);if(w.tagName==="P"){w.appendChild(w.ownerDocument.createElement("br"))}while(v.firstChild){w.appendChild(v.firstChild)}if(s){w.style.listStyleType=s.style.listStyleType}v.parentNode.removeChild(v);h(u,t,false);return w}function k(t,u){var s;if(!u.is(t,"li,ol,ul")){s=u.getParent(t,"li");if(s){t=s}}return t}tinymce.create("tinymce.plugins.Lists",{init:function(y){var v="TABBING";var s="EMPTY";var J="ESCAPE";var z="PARAGRAPH";var N="UNKNOWN";var x=N;function E(U){return U.keyCode===tinymce.VK.TAB&&!(U.altKey||U.ctrlKey)&&(y.queryCommandState("InsertUnorderedList")||y.queryCommandState("InsertOrderedList"))}function w(){var U=B();var W=U.parentNode.parentNode;var V=U.parentNode.lastChild===U;return V&&!t(W)&&P(U)}function t(U){if(n(U)){return U.parentNode&&U.parentNode.tagName==="LI"}else{return U.tagName==="LI"}}function F(){return y.selection.isCollapsed()&&P(B())}function B(){var U=y.selection.getStart();return((U.tagName=="BR"||U.tagName=="")&&U.parentNode.tagName=="LI")?U.parentNode:U}function P(U){var V=U.childNodes.length;if(U.tagName==="LI"){return V==0?true:V==1&&(U.firstChild.tagName==""||U.firstChild.tagName=="BR"||H(U))}return false}function H(U){var V=tinymce.grep(U.parentNode.childNodes,function(Y){return Y.tagName=="LI"});var W=U==V[V.length-1];var X=U.firstChild;return tinymce.isIE9&&W&&(X.nodeValue==String.fromCharCode(160)||X.nodeValue==String.fromCharCode(32))}function T(U){return U.keyCode===tinymce.VK.ENTER}function A(U){return T(U)&&!U.shiftKey}function M(U){if(E(U)){return v}else{if(A(U)&&w()){return N}else{if(A(U)&&F()){return s}else{return N}}}}function D(U,V){if(x==v||x==s||tinymce.isGecko&&x==J){r.cancel(V)}}function C(){var U=y.selection.getRng(true);var V=U.startContainer;if(V.nodeType==3){var W=V.nodeValue;if(tinymce.isIE9&&W.length>1&&W.charCodeAt(W.length-1)==32){return(U.endOffset==W.length-1)}else{return(U.endOffset==W.length)}}else{if(V.nodeType==1){return U.endOffset==V.childNodes.length}}return false}function I(){var W=y.selection.getNode();var V="h1,h2,h3,h4,h5,h6,p,div";var U=y.dom.is(W,V)&&W.parentNode.tagName==="LI"&&W.parentNode.lastChild===W;return y.selection.isCollapsed()&&U&&C()}function K(W,Y){if(A(Y)&&I()){var X=W.selection.getNode();var V=W.dom.create("li");var U=W.dom.getParent(X,"li");W.dom.insertAfter(V,U);if(tinymce.isIE6||tinymce.isIE7||tinyMCE.isIE8){W.selection.setCursorLocation(V,1)}else{W.selection.setCursorLocation(V,0)}Y.preventDefault()}}function u(X,Z){var ac;if(!tinymce.isGecko){return}var V=X.selection.getStart();if(Z.keyCode!=tinymce.VK.BACKSPACE||V.tagName!=="IMG"){return}function W(ag){var ah=ag.firstChild;var af=null;do{if(!ah){break}if(ah.tagName==="LI"){af=ah}}while(ah=ah.nextSibling);return af}function ae(ag,af){while(ag.childNodes.length>0){af.appendChild(ag.childNodes[0])}}ac=V.parentNode.previousSibling;if(!ac){return}var aa;if(ac.tagName==="UL"||ac.tagName==="OL"){aa=ac}else{if(ac.previousSibling&&(ac.previousSibling.tagName==="UL"||ac.previousSibling.tagName==="OL")){aa=ac.previousSibling}else{return}}var ad=W(aa);var U=X.dom.createRng();U.setStart(ad,1);U.setEnd(ad,1);X.selection.setRng(U);X.selection.collapse(true);var Y=X.selection.getBookmark();var ab=V.parentNode.cloneNode(true);if(ab.tagName==="P"||ab.tagName==="DIV"){ae(ab,ad)}else{ad.appendChild(ab)}V.parentNode.parentNode.removeChild(V.parentNode);X.selection.moveToBookmark(Y)}function G(U){var V=y.dom.getParent(U,"ol,ul");if(V!=null){var W=V.lastChild;y.selection.setCursorLocation(W,0)}}this.ed=y;y.addCommand("Indent",this.indent,this);y.addCommand("Outdent",this.outdent,this);y.addCommand("InsertUnorderedList",function(){this.applyList("UL","OL")},this);y.addCommand("InsertOrderedList",function(){this.applyList("OL","UL")},this);y.onInit.add(function(){y.editorCommands.addCommands({outdent:function(){var V=y.selection,W=y.dom;function U(X){X=W.getParent(X,W.isBlock);return X&&(parseInt(y.dom.getStyle(X,"margin-left")||0,10)+parseInt(y.dom.getStyle(X,"padding-left")||0,10))>0}return U(V.getStart())||U(V.getEnd())||y.queryCommandState("InsertOrderedList")||y.queryCommandState("InsertUnorderedList")}},"state")});y.onKeyUp.add(function(V,W){if(x==v){V.execCommand(W.shiftKey?"Outdent":"Indent",true,null);x=N;return r.cancel(W)}else{if(x==s){var U=B();var Y=V.settings.list_outdent_on_enter===true||W.shiftKey;V.execCommand(Y?"Outdent":"Indent",true,null);if(tinymce.isIE){G(U)}return r.cancel(W)}else{if(x==J){if(tinymce.isIE6||tinymce.isIE7||tinymce.isIE8){var X=V.getDoc().createTextNode("\uFEFF");V.selection.getNode().appendChild(X)}else{if(tinymce.isIE9||tinymce.isGecko){V.execCommand("Outdent");return r.cancel(W)}}}}}});function L(V,U){var W=y.getDoc().createTextNode("\uFEFF");V.insertBefore(W,U);y.selection.setCursorLocation(W,0);y.execCommand("mceRepaint")}function R(V,X){if(T(X)){var U=B();if(U){var W=U.parentNode;var Y=W&&W.parentNode;if(Y&&Y.nodeName=="LI"&&Y.firstChild==W&&U==W.firstChild){L(Y,W)}}}}function S(V,X){if(T(X)){var U=B();if(V.dom.select("ul li",U).length===1){var W=U.firstChild;L(U,W)}}}function Q(V,Z){function W(ad,aa){var ac=[];var ae=new tinymce.dom.TreeWalker(aa,ad);for(var ab=ae.current();ab;ab=ae.next()){if(V.dom.is(ab,"ol,ul,li")){ac.push(ab)}}return ac}if(Z.keyCode==tinymce.VK.BACKSPACE){var U=B();if(U){var Y=V.dom.getParent(U,"ol,ul");if(Y&&Y.firstChild===U){var X=W(Y,U);V.execCommand("Outdent",false,X);V.undoManager.add();return r.cancel(Z)}}}}function O(V,X){var U=B();if(X.keyCode===tinymce.VK.BACKSPACE&&V.dom.is(U,"li")&&U.parentNode.firstChild!==U){if(V.dom.select("ul,ol",U).length===1){var Z=U.previousSibling;V.dom.remove(V.dom.select("br",U));V.dom.remove(U,true);var W=tinymce.grep(Z.childNodes,function(aa){return aa.nodeType===3});if(W.length===1){var Y=W[0];V.selection.setCursorLocation(Y,Y.length)}V.undoManager.add();return r.cancel(X)}}}y.onKeyDown.add(function(U,V){x=M(V)});y.onKeyDown.add(D);y.onKeyDown.add(u);y.onKeyDown.add(K);if(tinymce.isGecko){y.onKeyUp.add(R)}if(tinymce.isIE8){y.onKeyUp.add(S)}if(tinymce.isGecko||tinymce.isWebKit){y.onKeyDown.add(Q)}if(tinymce.isWebKit){y.onKeyDown.add(O)}},applyList:function(y,v){var C=this,z=C.ed,I=z.dom,s=[],H=false,u=false,w=false,B,G=z.selection.getSelectedBlocks();function E(t){if(t&&t.tagName==="BR"){I.remove(t)}}function F(M){var N=I.create(y),t;function L(O){if(O.style.marginLeft||O.style.paddingLeft){C.adjustPaddingFunction(false)(O)}}if(M.tagName==="LI"){}else{if(M.tagName==="P"||M.tagName==="DIV"||M.tagName==="BODY"){K(M,function(P,O){J(P,O,M.tagName==="BODY"?null:P.parentNode);t=P.parentNode;L(t);E(O)});if(t){if(t.tagName==="LI"&&(M.tagName==="P"||G.length>1)){I.split(t.parentNode.parentNode,t.parentNode)}m(t.parentNode,true)}return}else{t=I.create("li");I.insertAfter(t,M);t.appendChild(M);L(M);M=t}}I.insertAfter(N,M);N.appendChild(M);m(N,true);s.push(M)}function J(P,L,N){var t,O=P,M;while(!I.isBlock(P.parentNode)&&P.parentNode!==I.getRoot()){P=I.split(P.parentNode,P.previousSibling);P=P.nextSibling;O=P}if(N){t=N.cloneNode(true);P.parentNode.insertBefore(t,P);while(t.firstChild){I.remove(t.firstChild)}t=I.rename(t,"li")}else{t=I.create("li");P.parentNode.insertBefore(t,P)}while(O&&O!=L){M=O.nextSibling;t.appendChild(O);O=M}if(t.childNodes.length===0){t.innerHTML='<br _mce_bogus="1" />'}F(t)}function K(Q,T){var N,R,O=3,L=1,t="br,ul,ol,p,div,h1,h2,h3,h4,h5,h6,table,blockquote,address,pre,form,center,dl";function P(X,U){var V=I.createRng(),W;g.keep=true;z.selection.moveToBookmark(g);g.keep=false;W=z.selection.getRng(true);if(!U){U=X.parentNode.lastChild}V.setStartBefore(X);V.setEndAfter(U);return !(V.compareBoundaryPoints(O,W)>0||V.compareBoundaryPoints(L,W)<=0)}function S(U){if(U.nextSibling){return U.nextSibling}if(!I.isBlock(U.parentNode)&&U.parentNode!==I.getRoot()){return S(U.parentNode)}}N=Q.firstChild;var M=false;e(I.select(t,Q),function(U){if(U.hasAttribute&&U.hasAttribute("_mce_bogus")){return true}if(P(N,U)){I.addClass(U,"_mce_tagged_br");N=S(U)}});M=(N&&P(N,undefined));N=Q.firstChild;e(I.select(t,Q),function(V){var U=S(V);if(V.hasAttribute&&V.hasAttribute("_mce_bogus")){return true}if(I.hasClass(V,"_mce_tagged_br")){T(N,V,R);R=null}else{R=V}N=U});if(M){T(N,undefined,R)}}function D(t){K(t,function(M,L,N){J(M,L);E(L);E(N)})}function A(t){if(tinymce.inArray(s,t)!==-1){return}if(t.parentNode.tagName===v){I.split(t.parentNode,t);F(t);o(t.parentNode,false)}s.push(t)}function x(M){var O,N,L,t;if(tinymce.inArray(s,M)!==-1){return}M=c(M,I);while(I.is(M.parentNode,"ol,ul,li")){I.split(M.parentNode,M)}s.push(M);M=I.rename(M,"p");L=m(M,false,z.settings.force_br_newlines);if(L===M){O=M.firstChild;while(O){if(I.isBlock(O)){O=I.split(O.parentNode,O);t=true;N=O.nextSibling&&O.nextSibling.firstChild}else{N=O.nextSibling;if(t&&O.tagName==="BR"){I.remove(O)}t=false}O=N}}}e(G,function(t){t=k(t,I);if(t.tagName===v||(t.tagName==="LI"&&t.parentNode.tagName===v)){u=true}else{if(t.tagName===y||(t.tagName==="LI"&&t.parentNode.tagName===y)){H=true}else{w=true}}});if(w&&!H||u||G.length===0){B={LI:A,H1:F,H2:F,H3:F,H4:F,H5:F,H6:F,P:F,BODY:F,DIV:G.length>1?F:D,defaultAction:D,elements:this.selectedBlocks()}}else{B={defaultAction:x,elements:this.selectedBlocks()}}this.process(B)},indent:function(){var u=this.ed,w=u.dom,x=[];function s(z){var y=w.create("li",{style:"list-style-type: none;"});w.insertAfter(y,z);return y}function t(B){var y=s(B),D=w.getParent(B,"ol,ul"),C=D.tagName,E=w.getStyle(D,"list-style-type"),A={},z;if(E!==""){A.style="list-style-type: "+E+";"}z=w.create(C,A);y.appendChild(z);return z}function v(z){if(!d(u,z,x)){z=c(z,w);var y=t(z);y.appendChild(z);m(y.parentNode,false);m(y,false);x.push(z)}}this.process({LI:v,defaultAction:this.adjustPaddingFunction(true),elements:this.selectedBlocks()})},outdent:function(y,x){var w=this,u=w.ed,z=u.dom,s=[];function A(t){var C,B,D;if(!d(u,t,s)){if(z.getStyle(t,"margin-left")!==""||z.getStyle(t,"padding-left")!==""){return w.adjustPaddingFunction(false)(t)}D=z.getStyle(t,"text-align",true);if(D==="center"||D==="right"){z.setStyle(t,"text-align","left");return}t=c(t,z);C=t.parentNode;B=t.parentNode.parentNode;if(B.tagName==="P"){z.split(B,t.parentNode)}else{z.split(C,t);if(B.tagName==="LI"){z.split(B,t)}else{if(!z.is(B,"ol,ul")){z.rename(t,"p")}}}s.push(t)}}var v=x&&tinymce.is(x,"array")?x:this.selectedBlocks();this.process({LI:A,defaultAction:this.adjustPaddingFunction(false),elements:v});e(s,m)},process:function(y){var F=this,w=F.ed.selection,z=F.ed.dom,E,u;function B(t){var s=tinymce.grep(t.childNodes,function(H){return !(H.nodeName==="BR"||H.nodeName==="SPAN"&&z.getAttrib(H,"data-mce-type")=="bookmark"||H.nodeType==3&&(H.nodeValue==String.fromCharCode(160)||H.nodeValue==""))});return s.length===0}function x(s){z.removeClass(s,"_mce_act_on");if(!s||s.nodeType!==1||E.length>1&&B(s)){return}s=k(s,z);var t=y[s.tagName];if(!t){t=y.defaultAction}t(s)}function v(s){F.splitSafeEach(s.childNodes,x)}function C(s,t){return t>=0&&s.hasChildNodes()&&t<s.childNodes.length&&s.childNodes[t].tagName==="BR"}function D(){var t=w.getNode();var s=z.getParent(t,"td");return s!==null}E=y.elements;u=w.getRng(true);if(!u.collapsed){if(C(u.endContainer,u.endOffset-1)){u.setEnd(u.endContainer,u.endOffset-1);w.setRng(u)}if(C(u.startContainer,u.startOffset)){u.setStart(u.startContainer,u.startOffset+1);w.setRng(u)}}if(tinymce.isIE8){var G=F.ed.selection.getNode();if(G.tagName==="LI"&&!(G.parentNode.lastChild===G)){var A=F.ed.getDoc().createTextNode("\uFEFF");G.appendChild(A)}}g=w.getBookmark();y.OL=y.UL=v;F.splitSafeEach(E,x);w.moveToBookmark(g);g=null;if(!D()){F.ed.execCommand("mceRepaint")}},splitSafeEach:function(t,s){if(tinymce.isGecko&&(/Firefox\/[12]\.[0-9]/.test(navigator.userAgent)||/Firefox\/3\.[0-4]/.test(navigator.userAgent))){this.classBasedEach(t,s)}else{e(t,s)}},classBasedEach:function(v,u){var w=this.ed.dom,s,t;e(v,function(x){w.addClass(x,"_mce_act_on")});s=w.select("._mce_act_on");while(s.length>0){t=s.shift();w.removeClass(t,"_mce_act_on");u(t);s=w.select("._mce_act_on")}},adjustPaddingFunction:function(u){var s,v,t=this.ed;s=t.settings.indentation;v=/[a-z%]+/i.exec(s);s=parseInt(s,10);return function(w){var y,x;y=parseInt(t.dom.getStyle(w,"margin-left")||0,10)+parseInt(t.dom.getStyle(w,"padding-left")||0,10);if(u){x=y+s}else{x=y-s}t.dom.setStyle(w,"padding-left","");t.dom.setStyle(w,"margin-left",x>0?x+v:"")}},selectedBlocks:function(){var s=this.ed;var t=s.selection.getSelectedBlocks();return t.length==0?[s.dom.getRoot()]:t},getInfo:function(){return{longname:"Lists",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/lists",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("lists",tinymce.plugins.Lists)}()); \ No newline at end of file
+(function(){var e=tinymce.each,r=tinymce.dom.Event,g;function p(t,s){while(t&&(t.nodeType===8||(t.nodeType===3&&/^[ \t\n\r]*$/.test(t.nodeValue)))){t=s(t)}return t}function b(s){return p(s,function(t){return t.previousSibling})}function i(s){return p(s,function(t){return t.nextSibling})}function d(s,u,t){return s.dom.getParent(u,function(v){return tinymce.inArray(t,v)!==-1})}function n(s){return s&&(s.tagName==="OL"||s.tagName==="UL")}function c(u,v){var t,w,s;t=b(u.lastChild);while(n(t)){w=t;t=b(w.previousSibling)}if(w){s=v.create("li",{style:"list-style-type: none;"});v.split(u,w);v.insertAfter(s,w);s.appendChild(w);s.appendChild(w);u=s.previousSibling}return u}function m(t,s,u){t=a(t,s,u);return o(t,s,u)}function a(u,s,v){var t=b(u.previousSibling);if(t){return h(t,u,s?t:false,v)}else{return u}}function o(u,t,v){var s=i(u.nextSibling);if(s){return h(u,s,t?s:false,v)}else{return u}}function h(u,s,t,v){if(l(u,s,!!t,v)){return f(u,s,t)}else{if(u&&u.tagName==="LI"&&n(s)){u.appendChild(s)}}return s}function l(u,t,s,v){if(!u||!t){return false}else{if(u.tagName==="LI"&&t.tagName==="LI"){return t.style.listStyleType==="none"||j(t)}else{if(n(u)){return(u.tagName===t.tagName&&(s||u.style.listStyleType===t.style.listStyleType))||q(t)}else{return v&&u.tagName==="P"&&t.tagName==="P"}}}}function q(t){var s=i(t.firstChild),u=b(t.lastChild);return s&&u&&n(t)&&s===u&&(n(s)||s.style.listStyleType==="none"||j(s))}function j(u){var t=i(u.firstChild),s=b(u.lastChild);return t&&s&&t===s&&n(t)}function f(w,v,s){var u=b(w.lastChild),t=i(v.firstChild);if(w.tagName==="P"){w.appendChild(w.ownerDocument.createElement("br"))}while(v.firstChild){w.appendChild(v.firstChild)}if(s){w.style.listStyleType=s.style.listStyleType}v.parentNode.removeChild(v);h(u,t,false);return w}function k(t,u){var s;if(!u.is(t,"li,ol,ul")){s=u.getParent(t,"li");if(s){t=s}}return t}tinymce.create("tinymce.plugins.Lists",{init:function(y){var v="TABBING";var s="EMPTY";var J="ESCAPE";var z="PARAGRAPH";var N="UNKNOWN";var x=N;function E(U){return U.keyCode===tinymce.VK.TAB&&!(U.altKey||U.ctrlKey)&&(y.queryCommandState("InsertUnorderedList")||y.queryCommandState("InsertOrderedList"))}function w(){var U=B();var W=U.parentNode.parentNode;var V=U.parentNode.lastChild===U;return V&&!t(W)&&P(U)}function t(U){if(n(U)){return U.parentNode&&U.parentNode.tagName==="LI"}else{return U.tagName==="LI"}}function F(){return y.selection.isCollapsed()&&P(B())}function B(){var U=y.selection.getStart();return((U.tagName=="BR"||U.tagName=="")&&U.parentNode.tagName=="LI")?U.parentNode:U}function P(U){var V=U.childNodes.length;if(U.tagName==="LI"){return V==0?true:V==1&&(U.firstChild.tagName==""||U.firstChild.tagName=="BR"||H(U))}return false}function H(U){var V=tinymce.grep(U.parentNode.childNodes,function(Y){return Y.tagName=="LI"});var W=U==V[V.length-1];var X=U.firstChild;return tinymce.isIE9&&W&&(X.nodeValue==String.fromCharCode(160)||X.nodeValue==String.fromCharCode(32))}function T(U){return U.keyCode===tinymce.VK.ENTER}function A(U){return T(U)&&!U.shiftKey}function M(U){if(E(U)){return v}else{if(A(U)&&w()){return N}else{if(A(U)&&F()){return s}else{return N}}}}function D(U,V){if(x==v||x==s||tinymce.isGecko&&x==J){r.cancel(V)}}function C(){var U=y.selection.getRng(true);var V=U.startContainer;if(V.nodeType==3){var W=V.nodeValue;if(tinymce.isIE9&&W.length>1&&W.charCodeAt(W.length-1)==32){return(U.endOffset==W.length-1)}else{return(U.endOffset==W.length)}}else{if(V.nodeType==1){return U.endOffset==V.childNodes.length}}return false}function I(){var W=y.selection.getNode();var V="h1,h2,h3,h4,h5,h6,p,div";var U=y.dom.is(W,V)&&W.parentNode.tagName==="LI"&&W.parentNode.lastChild===W;return y.selection.isCollapsed()&&U&&C()}function K(W,Y){if(A(Y)&&I()){var X=W.selection.getNode();var V=W.dom.create("li");var U=W.dom.getParent(X,"li");W.dom.insertAfter(V,U);if(tinymce.isIE6||tinymce.isIE7||tinyMCE.isIE8){W.selection.setCursorLocation(V,1)}else{W.selection.setCursorLocation(V,0)}Y.preventDefault()}}function u(X,Z){var ac;if(!tinymce.isGecko){return}var V=X.selection.getStart();if(Z.keyCode!=tinymce.VK.BACKSPACE||V.tagName!=="IMG"){return}function W(ag){var ah=ag.firstChild;var af=null;do{if(!ah){break}if(ah.tagName==="LI"){af=ah}}while(ah=ah.nextSibling);return af}function ae(ag,af){while(ag.childNodes.length>0){af.appendChild(ag.childNodes[0])}}ac=V.parentNode.previousSibling;if(!ac){return}var aa;if(ac.tagName==="UL"||ac.tagName==="OL"){aa=ac}else{if(ac.previousSibling&&(ac.previousSibling.tagName==="UL"||ac.previousSibling.tagName==="OL")){aa=ac.previousSibling}else{return}}var ad=W(aa);var U=X.dom.createRng();U.setStart(ad,1);U.setEnd(ad,1);X.selection.setRng(U);X.selection.collapse(true);var Y=X.selection.getBookmark();var ab=V.parentNode.cloneNode(true);if(ab.tagName==="P"||ab.tagName==="DIV"){ae(ab,ad)}else{ad.appendChild(ab)}V.parentNode.parentNode.removeChild(V.parentNode);X.selection.moveToBookmark(Y)}function G(U){var V=y.dom.getParent(U,"ol,ul");if(V!=null){var W=V.lastChild;y.selection.setCursorLocation(W,0)}}this.ed=y;y.addCommand("Indent",this.indent,this);y.addCommand("Outdent",this.outdent,this);y.addCommand("InsertUnorderedList",function(){this.applyList("UL","OL")},this);y.addCommand("InsertOrderedList",function(){this.applyList("OL","UL")},this);y.onInit.add(function(){y.editorCommands.addCommands({outdent:function(){var V=y.selection,W=y.dom;function U(X){X=W.getParent(X,W.isBlock);return X&&(parseInt(y.dom.getStyle(X,"margin-left")||0,10)+parseInt(y.dom.getStyle(X,"padding-left")||0,10))>0}return U(V.getStart())||U(V.getEnd())||y.queryCommandState("InsertOrderedList")||y.queryCommandState("InsertUnorderedList")}},"state")});y.onKeyUp.add(function(V,W){if(x==v){V.execCommand(W.shiftKey?"Outdent":"Indent",true,null);x=N;return r.cancel(W)}else{if(x==s){var U=B();var Y=V.settings.list_outdent_on_enter===true||W.shiftKey;V.execCommand(Y?"Outdent":"Indent",true,null);if(tinymce.isIE){G(U)}return r.cancel(W)}else{if(x==J){if(tinymce.isIE6||tinymce.isIE7||tinymce.isIE8){var X=V.getDoc().createTextNode("\uFEFF");V.selection.getNode().appendChild(X)}else{if(tinymce.isIE9||tinymce.isGecko){V.execCommand("Outdent");return r.cancel(W)}}}}}});function L(V,U){var W=y.getDoc().createTextNode("\uFEFF");V.insertBefore(W,U);y.selection.setCursorLocation(W,0);y.execCommand("mceRepaint")}function R(V,X){if(T(X)){var U=B();if(U){var W=U.parentNode;var Y=W&&W.parentNode;if(Y&&Y.nodeName=="LI"&&Y.firstChild==W&&U==W.firstChild){L(Y,W)}}}}function S(V,X){if(T(X)){var U=B();if(V.dom.select("ul li",U).length===1){var W=U.firstChild;L(U,W)}}}function Q(V,Z){function W(ad,aa){var ac=[];var ae=new tinymce.dom.TreeWalker(aa,ad);for(var ab=ae.current();ab;ab=ae.next()){if(V.dom.is(ab,"ol,ul,li")){ac.push(ab)}}return ac}if(Z.keyCode==tinymce.VK.BACKSPACE){var U=B();if(U){var Y=V.dom.getParent(U,"ol,ul");if(Y&&Y.firstChild===U){var X=W(Y,U);V.execCommand("Outdent",false,X);V.undoManager.add();return r.cancel(Z)}}}}function O(V,X){var U=B();if(X.keyCode===tinymce.VK.BACKSPACE&&V.dom.is(U,"li")&&U.parentNode.firstChild!==U){if(V.dom.select("ul,ol",U).length===1){var Z=U.previousSibling;V.dom.remove(V.dom.select("br",U));V.dom.remove(U,true);var W=tinymce.grep(Z.childNodes,function(aa){return aa.nodeType===3});if(W.length===1){var Y=W[0];V.selection.setCursorLocation(Y,Y.length)}V.undoManager.add();return r.cancel(X)}}}y.onKeyDown.add(function(U,V){x=M(V)});y.onKeyDown.add(D);y.onKeyDown.add(u);y.onKeyDown.add(K);if(tinymce.isGecko){y.onKeyUp.add(R)}if(tinymce.isIE8){y.onKeyUp.add(S)}if(tinymce.isGecko||tinymce.isWebKit){y.onKeyDown.add(Q)}if(tinymce.isWebKit){y.onKeyDown.add(O)}},applyList:function(y,v){var C=this,z=C.ed,I=z.dom,s=[],H=false,u=false,w=false,B,G=z.selection.getSelectedBlocks();function E(t){if(t&&t.tagName==="BR"){I.remove(t)}}function F(M){var N=I.create(y),t;function L(O){if(O.style.marginLeft||O.style.paddingLeft){C.adjustPaddingFunction(false)(O)}}if(M.tagName==="LI"){}else{if(M.tagName==="P"||M.tagName==="DIV"||M.tagName==="BODY"){K(M,function(P,O){J(P,O,M.tagName==="BODY"?null:P.parentNode);t=P.parentNode;L(t);E(O)});if(t){if(t.tagName==="LI"&&(M.tagName==="P"||G.length>1)){I.split(t.parentNode.parentNode,t.parentNode)}m(t.parentNode,true)}return}else{t=I.create("li");I.insertAfter(t,M);t.appendChild(M);L(M);M=t}}I.insertAfter(N,M);N.appendChild(M);m(N,true);s.push(M)}function J(P,L,N){var t,O=P,M;while(!I.isBlock(P.parentNode)&&P.parentNode!==I.getRoot()){P=I.split(P.parentNode,P.previousSibling);P=P.nextSibling;O=P}if(N){t=N.cloneNode(true);P.parentNode.insertBefore(t,P);while(t.firstChild){I.remove(t.firstChild)}t=I.rename(t,"li")}else{t=I.create("li");P.parentNode.insertBefore(t,P)}while(O&&O!=L){M=O.nextSibling;t.appendChild(O);O=M}if(t.childNodes.length===0){t.innerHTML='<br _mce_bogus="1" />'}F(t)}function K(Q,T){var N,R,O=3,L=1,t="br,ul,ol,p,div,h1,h2,h3,h4,h5,h6,table,blockquote,address,pre,form,center,dl";function P(X,U){var V=I.createRng(),W;g.keep=true;z.selection.moveToBookmark(g);g.keep=false;W=z.selection.getRng(true);if(!U){U=X.parentNode.lastChild}V.setStartBefore(X);V.setEndAfter(U);return !(V.compareBoundaryPoints(O,W)>0||V.compareBoundaryPoints(L,W)<=0)}function S(U){if(U.nextSibling){return U.nextSibling}if(!I.isBlock(U.parentNode)&&U.parentNode!==I.getRoot()){return S(U.parentNode)}}N=Q.firstChild;var M=false;e(I.select(t,Q),function(U){if(U.hasAttribute&&U.hasAttribute("_mce_bogus")){return true}if(P(N,U)){I.addClass(U,"_mce_tagged_br");N=S(U)}});M=(N&&P(N,undefined));N=Q.firstChild;e(I.select(t,Q),function(V){var U=S(V);if(V.hasAttribute&&V.hasAttribute("_mce_bogus")){return true}if(I.hasClass(V,"_mce_tagged_br")){T(N,V,R);R=null}else{R=V}N=U});if(M){T(N,undefined,R)}}function D(t){K(t,function(M,L,N){J(M,L);E(L);E(N)})}function A(t){if(tinymce.inArray(s,t)!==-1){return}if(t.parentNode.tagName===v){I.split(t.parentNode,t);F(t);o(t.parentNode,false)}s.push(t)}function x(M){var O,N,L,t;if(tinymce.inArray(s,M)!==-1){return}M=c(M,I);while(I.is(M.parentNode,"ol,ul,li")){I.split(M.parentNode,M)}s.push(M);M=I.rename(M,"p");L=m(M,false,z.settings.force_br_newlines);if(L===M){O=M.firstChild;while(O){if(I.isBlock(O)){O=I.split(O.parentNode,O);t=true;N=O.nextSibling&&O.nextSibling.firstChild}else{N=O.nextSibling;if(t&&O.tagName==="BR"){I.remove(O)}t=false}O=N}}}e(G,function(t){t=k(t,I);if(t.tagName===v||(t.tagName==="LI"&&t.parentNode.tagName===v)){u=true}else{if(t.tagName===y||(t.tagName==="LI"&&t.parentNode.tagName===y)){H=true}else{w=true}}});if(w&&!H||u||G.length===0){B={LI:A,H1:F,H2:F,H3:F,H4:F,H5:F,H6:F,P:F,BODY:F,DIV:G.length>1?F:D,defaultAction:D,elements:this.selectedBlocks()}}else{B={defaultAction:x,elements:this.selectedBlocks(),processEvenIfEmpty:true}}this.process(B)},indent:function(){var u=this.ed,w=u.dom,x=[];function s(z){var y=w.create("li",{style:"list-style-type: none;"});w.insertAfter(y,z);return y}function t(B){var y=s(B),D=w.getParent(B,"ol,ul"),C=D.tagName,E=w.getStyle(D,"list-style-type"),A={},z;if(E!==""){A.style="list-style-type: "+E+";"}z=w.create(C,A);y.appendChild(z);return z}function v(z){if(!d(u,z,x)){z=c(z,w);var y=t(z);y.appendChild(z);m(y.parentNode,false);m(y,false);x.push(z)}}this.process({LI:v,defaultAction:this.adjustPaddingFunction(true),elements:this.selectedBlocks()})},outdent:function(y,x){var w=this,u=w.ed,z=u.dom,s=[];function A(t){var C,B,D;if(!d(u,t,s)){if(z.getStyle(t,"margin-left")!==""||z.getStyle(t,"padding-left")!==""){return w.adjustPaddingFunction(false)(t)}D=z.getStyle(t,"text-align",true);if(D==="center"||D==="right"){z.setStyle(t,"text-align","left");return}t=c(t,z);C=t.parentNode;B=t.parentNode.parentNode;if(B.tagName==="P"){z.split(B,t.parentNode)}else{z.split(C,t);if(B.tagName==="LI"){z.split(B,t)}else{if(!z.is(B,"ol,ul")){z.rename(t,"p")}}}s.push(t)}}var v=x&&tinymce.is(x,"array")?x:this.selectedBlocks();this.process({LI:A,defaultAction:this.adjustPaddingFunction(false),elements:v});e(s,m)},process:function(y){var F=this,w=F.ed.selection,z=F.ed.dom,E,u;function B(t){var s=tinymce.grep(t.childNodes,function(H){return !(H.nodeName==="BR"||H.nodeName==="SPAN"&&z.getAttrib(H,"data-mce-type")=="bookmark"||H.nodeType==3&&(H.nodeValue==String.fromCharCode(160)||H.nodeValue==""))});return s.length===0}function x(s){z.removeClass(s,"_mce_act_on");if(!s||s.nodeType!==1||!y.processEvenIfEmpty&&E.length>1&&B(s)){return}s=k(s,z);var t=y[s.tagName];if(!t){t=y.defaultAction}t(s)}function v(s){F.splitSafeEach(s.childNodes,x)}function C(s,t){return t>=0&&s.hasChildNodes()&&t<s.childNodes.length&&s.childNodes[t].tagName==="BR"}function D(){var t=w.getNode();var s=z.getParent(t,"td");return s!==null}E=y.elements;u=w.getRng(true);if(!u.collapsed){if(C(u.endContainer,u.endOffset-1)){u.setEnd(u.endContainer,u.endOffset-1);w.setRng(u)}if(C(u.startContainer,u.startOffset)){u.setStart(u.startContainer,u.startOffset+1);w.setRng(u)}}if(tinymce.isIE8){var G=F.ed.selection.getNode();if(G.tagName==="LI"&&!(G.parentNode.lastChild===G)){var A=F.ed.getDoc().createTextNode("\uFEFF");G.appendChild(A)}}g=w.getBookmark();y.OL=y.UL=v;F.splitSafeEach(E,x);w.moveToBookmark(g);g=null;if(!D()){F.ed.execCommand("mceRepaint")}},splitSafeEach:function(t,s){if(tinymce.isGecko&&(/Firefox\/[12]\.[0-9]/.test(navigator.userAgent)||/Firefox\/3\.[0-4]/.test(navigator.userAgent))){this.classBasedEach(t,s)}else{e(t,s)}},classBasedEach:function(v,u){var w=this.ed.dom,s,t;e(v,function(x){w.addClass(x,"_mce_act_on")});s=w.select("._mce_act_on");while(s.length>0){t=s.shift();w.removeClass(t,"_mce_act_on");u(t);s=w.select("._mce_act_on")}},adjustPaddingFunction:function(u){var s,v,t=this.ed;s=t.settings.indentation;v=/[a-z%]+/i.exec(s);s=parseInt(s,10);return function(w){var y,x;y=parseInt(t.dom.getStyle(w,"margin-left")||0,10)+parseInt(t.dom.getStyle(w,"padding-left")||0,10);if(u){x=y+s}else{x=y-s}t.dom.setStyle(w,"padding-left","");t.dom.setStyle(w,"margin-left",x>0?x+v:"")}},selectedBlocks:function(){var s=this.ed;var t=s.selection.getSelectedBlocks();return t.length==0?[s.dom.getRoot()]:t},getInfo:function(){return{longname:"Lists",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/lists",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("lists",tinymce.plugins.Lists)}()); \ No newline at end of file
diff --git a/program/js/tiny_mce/plugins/lists/editor_plugin_src.js b/program/js/tiny_mce/plugins/lists/editor_plugin_src.js
index e711d5301..c5712dced 100644
--- a/program/js/tiny_mce/plugins/lists/editor_plugin_src.js
+++ b/program/js/tiny_mce/plugins/lists/editor_plugin_src.js
@@ -1,951 +1,952 @@
-/**
- * editor_plugin_src.js
- *
- * Copyright 2011, Moxiecode Systems AB
- * Released under LGPL License.
- *
- * License: http://tinymce.moxiecode.com/license
- * Contributing: http://tinymce.moxiecode.com/contributing
- */
-
-(function() {
- var each = tinymce.each, Event = tinymce.dom.Event, bookmark;
-
- // Skips text nodes that only contain whitespace since they aren't semantically important.
- function skipWhitespaceNodes(e, next) {
- while (e && (e.nodeType === 8 || (e.nodeType === 3 && /^[ \t\n\r]*$/.test(e.nodeValue)))) {
- e = next(e);
- }
- return e;
- }
-
- function skipWhitespaceNodesBackwards(e) {
- return skipWhitespaceNodes(e, function(e) {
- return e.previousSibling;
- });
- }
-
- function skipWhitespaceNodesForwards(e) {
- return skipWhitespaceNodes(e, function(e) {
- return e.nextSibling;
- });
- }
-
- function hasParentInList(ed, e, list) {
- return ed.dom.getParent(e, function(p) {
- return tinymce.inArray(list, p) !== -1;
- });
- }
-
- function isList(e) {
- return e && (e.tagName === 'OL' || e.tagName === 'UL');
- }
-
- function splitNestedLists(element, dom) {
- var tmp, nested, wrapItem;
- tmp = skipWhitespaceNodesBackwards(element.lastChild);
- while (isList(tmp)) {
- nested = tmp;
- tmp = skipWhitespaceNodesBackwards(nested.previousSibling);
- }
- if (nested) {
- wrapItem = dom.create('li', { style: 'list-style-type: none;'});
- dom.split(element, nested);
- dom.insertAfter(wrapItem, nested);
- wrapItem.appendChild(nested);
- wrapItem.appendChild(nested);
- element = wrapItem.previousSibling;
- }
- return element;
- }
-
- function attemptMergeWithAdjacent(e, allowDifferentListStyles, mergeParagraphs) {
- e = attemptMergeWithPrevious(e, allowDifferentListStyles, mergeParagraphs);
- return attemptMergeWithNext(e, allowDifferentListStyles, mergeParagraphs);
- }
-
- function attemptMergeWithPrevious(e, allowDifferentListStyles, mergeParagraphs) {
- var prev = skipWhitespaceNodesBackwards(e.previousSibling);
- if (prev) {
- return attemptMerge(prev, e, allowDifferentListStyles ? prev : false, mergeParagraphs);
- } else {
- return e;
- }
- }
-
- function attemptMergeWithNext(e, allowDifferentListStyles, mergeParagraphs) {
- var next = skipWhitespaceNodesForwards(e.nextSibling);
- if (next) {
- return attemptMerge(e, next, allowDifferentListStyles ? next : false, mergeParagraphs);
- } else {
- return e;
- }
- }
-
- function attemptMerge(e1, e2, differentStylesMasterElement, mergeParagraphs) {
- if (canMerge(e1, e2, !!differentStylesMasterElement, mergeParagraphs)) {
- return merge(e1, e2, differentStylesMasterElement);
- } else if (e1 && e1.tagName === 'LI' && isList(e2)) {
- // Fix invalidly nested lists.
- e1.appendChild(e2);
- }
- return e2;
- }
-
- function canMerge(e1, e2, allowDifferentListStyles, mergeParagraphs) {
- if (!e1 || !e2) {
- return false;
- } else if (e1.tagName === 'LI' && e2.tagName === 'LI') {
- return e2.style.listStyleType === 'none' || containsOnlyAList(e2);
- } else if (isList(e1)) {
- return (e1.tagName === e2.tagName && (allowDifferentListStyles || e1.style.listStyleType === e2.style.listStyleType)) || isListForIndent(e2);
- } else return mergeParagraphs && e1.tagName === 'P' && e2.tagName === 'P';
- }
-
- function isListForIndent(e) {
- var firstLI = skipWhitespaceNodesForwards(e.firstChild), lastLI = skipWhitespaceNodesBackwards(e.lastChild);
- return firstLI && lastLI && isList(e) && firstLI === lastLI && (isList(firstLI) || firstLI.style.listStyleType === 'none' || containsOnlyAList(firstLI));
- }
-
- function containsOnlyAList(e) {
- var firstChild = skipWhitespaceNodesForwards(e.firstChild), lastChild = skipWhitespaceNodesBackwards(e.lastChild);
- return firstChild && lastChild && firstChild === lastChild && isList(firstChild);
- }
-
- function merge(e1, e2, masterElement) {
- var lastOriginal = skipWhitespaceNodesBackwards(e1.lastChild), firstNew = skipWhitespaceNodesForwards(e2.firstChild);
- if (e1.tagName === 'P') {
- e1.appendChild(e1.ownerDocument.createElement('br'));
- }
- while (e2.firstChild) {
- e1.appendChild(e2.firstChild);
- }
- if (masterElement) {
- e1.style.listStyleType = masterElement.style.listStyleType;
- }
- e2.parentNode.removeChild(e2);
- attemptMerge(lastOriginal, firstNew, false);
- return e1;
- }
-
- function findItemToOperateOn(e, dom) {
- var item;
- if (!dom.is(e, 'li,ol,ul')) {
- item = dom.getParent(e, 'li');
- if (item) {
- e = item;
- }
- }
- return e;
- }
-
- tinymce.create('tinymce.plugins.Lists', {
- init: function(ed) {
- var LIST_TABBING = 'TABBING';
- var LIST_EMPTY_ITEM = 'EMPTY';
- var LIST_ESCAPE = 'ESCAPE';
- var LIST_PARAGRAPH = 'PARAGRAPH';
- var LIST_UNKNOWN = 'UNKNOWN';
- var state = LIST_UNKNOWN;
-
- function isTabInList(e) {
- // Don't indent on Ctrl+Tab or Alt+Tab
- return e.keyCode === tinymce.VK.TAB && !(e.altKey || e.ctrlKey) &&
- (ed.queryCommandState('InsertUnorderedList') || ed.queryCommandState('InsertOrderedList'));
- }
-
- function isOnLastListItem() {
- var li = getLi();
- var grandParent = li.parentNode.parentNode;
- var isLastItem = li.parentNode.lastChild === li;
- return isLastItem && !isNestedList(grandParent) && isEmptyListItem(li);
- }
-
- function isNestedList(grandParent) {
- if (isList(grandParent)) {
- return grandParent.parentNode && grandParent.parentNode.tagName === 'LI';
- } else {
- return grandParent.tagName === 'LI';
- }
- }
-
- function isInEmptyListItem() {
- return ed.selection.isCollapsed() && isEmptyListItem(getLi());
- }
-
- function getLi() {
- var n = ed.selection.getStart();
- // Get start will return BR if the LI only contains a BR or an empty element as we use these to fix caret position
- return ((n.tagName == 'BR' || n.tagName == '') && n.parentNode.tagName == 'LI') ? n.parentNode : n;
- }
-
- function isEmptyListItem(li) {
- var numChildren = li.childNodes.length;
- if (li.tagName === 'LI') {
- return numChildren == 0 ? true : numChildren == 1 && (li.firstChild.tagName == '' || li.firstChild.tagName == 'BR' || isEmptyIE9Li(li));
- }
- return false;
- }
-
- function isEmptyIE9Li(li) {
- // only consider this to be last item if there is no list item content or that content is nbsp or space since IE9 creates these
- var lis = tinymce.grep(li.parentNode.childNodes, function(n) {return n.tagName == 'LI'});
- var isLastLi = li == lis[lis.length - 1];
- var child = li.firstChild;
- return tinymce.isIE9 && isLastLi && (child.nodeValue == String.fromCharCode(160) || child.nodeValue == String.fromCharCode(32));
- }
-
- function isEnter(e) {
- return e.keyCode === tinymce.VK.ENTER;
- }
-
- function isEnterWithoutShift(e) {
- return isEnter(e) && !e.shiftKey;
- }
-
- function getListKeyState(e) {
- if (isTabInList(e)) {
- return LIST_TABBING;
- } else if (isEnterWithoutShift(e) && isOnLastListItem()) {
- // Returns LIST_UNKNOWN since breaking out of lists is handled by the EnterKey.js logic now
- //return LIST_ESCAPE;
- return LIST_UNKNOWN;
- } else if (isEnterWithoutShift(e) && isInEmptyListItem()) {
- return LIST_EMPTY_ITEM;
- } else {
- return LIST_UNKNOWN;
- }
- }
-
- function cancelDefaultEvents(ed, e) {
- // list escape is done manually using outdent as it does not create paragraphs correctly in td's
- if (state == LIST_TABBING || state == LIST_EMPTY_ITEM || tinymce.isGecko && state == LIST_ESCAPE) {
- Event.cancel(e);
- }
- }
-
- function isCursorAtEndOfContainer() {
- var range = ed.selection.getRng(true);
- var startContainer = range.startContainer;
- if (startContainer.nodeType == 3) {
- var value = startContainer.nodeValue;
- if (tinymce.isIE9 && value.length > 1 && value.charCodeAt(value.length-1) == 32) {
- // IE9 places a space on the end of the text in some cases so ignore last char
- return (range.endOffset == value.length-1);
- } else {
- return (range.endOffset == value.length);
- }
- } else if (startContainer.nodeType == 1) {
- return range.endOffset == startContainer.childNodes.length;
- }
- return false;
- }
-
- /*
- If we are at the end of a list item surrounded with an element, pressing enter should create a
- new list item instead without splitting the element e.g. don't want to create new P or H1 tag
- */
- function isEndOfListItem() {
- var node = ed.selection.getNode();
- var validElements = 'h1,h2,h3,h4,h5,h6,p,div';
- var isLastParagraphOfLi = ed.dom.is(node, validElements) && node.parentNode.tagName === 'LI' && node.parentNode.lastChild === node;
- return ed.selection.isCollapsed() && isLastParagraphOfLi && isCursorAtEndOfContainer();
- }
-
- // Creates a new list item after the current selection's list item parent
- function createNewLi(ed, e) {
- if (isEnterWithoutShift(e) && isEndOfListItem()) {
- var node = ed.selection.getNode();
- var li = ed.dom.create("li");
- var parentLi = ed.dom.getParent(node, 'li');
- ed.dom.insertAfter(li, parentLi);
-
- // Move caret to new list element.
- if (tinymce.isIE6 || tinymce.isIE7 || tinyMCE.isIE8) {
- // Removed this line since it would create an odd <&nbsp;> tag and placing the caret inside an empty LI is handled and should be handled by the selection logic
- //li.appendChild(ed.dom.create("&nbsp;")); // IE needs an element within the bullet point
- ed.selection.setCursorLocation(li, 1);
- } else {
- ed.selection.setCursorLocation(li, 0);
- }
- e.preventDefault();
- }
- }
-
- function imageJoiningListItem(ed, e) {
- var prevSibling;
-
- if (!tinymce.isGecko)
- return;
-
- var n = ed.selection.getStart();
- if (e.keyCode != tinymce.VK.BACKSPACE || n.tagName !== 'IMG')
- return;
-
- function lastLI(node) {
- var child = node.firstChild;
- var li = null;
- do {
- if (!child)
- break;
-
- if (child.tagName === 'LI')
- li = child;
- } while (child = child.nextSibling);
-
- return li;
- }
-
- function addChildren(parentNode, destination) {
- while (parentNode.childNodes.length > 0)
- destination.appendChild(parentNode.childNodes[0]);
- }
-
- // Check if there is a previous sibling
- prevSibling = n.parentNode.previousSibling;
- if (!prevSibling)
- return;
-
- var ul;
- if (prevSibling.tagName === 'UL' || prevSibling.tagName === 'OL')
- ul = prevSibling;
- else if (prevSibling.previousSibling && (prevSibling.previousSibling.tagName === 'UL' || prevSibling.previousSibling.tagName === 'OL'))
- ul = prevSibling.previousSibling;
- else
- return;
-
- var li = lastLI(ul);
-
- // move the caret to the end of the list item
- var rng = ed.dom.createRng();
- rng.setStart(li, 1);
- rng.setEnd(li, 1);
- ed.selection.setRng(rng);
- ed.selection.collapse(true);
-
- // save a bookmark at the end of the list item
- var bookmark = ed.selection.getBookmark();
-
- // copy the image an its text to the list item
- var clone = n.parentNode.cloneNode(true);
- if (clone.tagName === 'P' || clone.tagName === 'DIV')
- addChildren(clone, li);
- else
- li.appendChild(clone);
-
- // remove the old copy of the image
- n.parentNode.parentNode.removeChild(n.parentNode);
-
- // move the caret where we saved the bookmark
- ed.selection.moveToBookmark(bookmark);
- }
-
- // fix the cursor position to ensure it is correct in IE
- function setCursorPositionToOriginalLi(li) {
- var list = ed.dom.getParent(li, 'ol,ul');
- if (list != null) {
- var lastLi = list.lastChild;
- // Removed this line since IE9 would report an DOM character error and placing the caret inside an empty LI is handled and should be handled by the selection logic
- //lastLi.appendChild(ed.getDoc().createElement(''));
- ed.selection.setCursorLocation(lastLi, 0);
- }
- }
-
- this.ed = ed;
- ed.addCommand('Indent', this.indent, this);
- ed.addCommand('Outdent', this.outdent, this);
- ed.addCommand('InsertUnorderedList', function() {
- this.applyList('UL', 'OL');
- }, this);
- ed.addCommand('InsertOrderedList', function() {
- this.applyList('OL', 'UL');
- }, this);
-
- ed.onInit.add(function() {
- ed.editorCommands.addCommands({
- 'outdent': function() {
- var sel = ed.selection, dom = ed.dom;
-
- function hasStyleIndent(n) {
- n = dom.getParent(n, dom.isBlock);
- return n && (parseInt(ed.dom.getStyle(n, 'margin-left') || 0, 10) + parseInt(ed.dom.getStyle(n, 'padding-left') || 0, 10)) > 0;
- }
-
- return hasStyleIndent(sel.getStart()) || hasStyleIndent(sel.getEnd()) || ed.queryCommandState('InsertOrderedList') || ed.queryCommandState('InsertUnorderedList');
- }
- }, 'state');
- });
-
- ed.onKeyUp.add(function(ed, e) {
- if (state == LIST_TABBING) {
- ed.execCommand(e.shiftKey ? 'Outdent' : 'Indent', true, null);
- state = LIST_UNKNOWN;
- return Event.cancel(e);
- } else if (state == LIST_EMPTY_ITEM) {
- var li = getLi();
- var shouldOutdent = ed.settings.list_outdent_on_enter === true || e.shiftKey;
- ed.execCommand(shouldOutdent ? 'Outdent' : 'Indent', true, null);
- if (tinymce.isIE) {
- setCursorPositionToOriginalLi(li);
- }
-
- return Event.cancel(e);
- } else if (state == LIST_ESCAPE) {
- if (tinymce.isIE6 || tinymce.isIE7 || tinymce.isIE8) {
- // append a zero sized nbsp so that caret is positioned correctly in IE after escaping and applying formatting.
- // if there is no text then applying formatting for e.g a H1 to the P tag immediately following list after
- // escaping from it will cause the caret to be positioned on the last li instead of staying the in P tag.
- var n = ed.getDoc().createTextNode('\uFEFF');
- ed.selection.getNode().appendChild(n);
- } else if (tinymce.isIE9 || tinymce.isGecko) {
- // IE9 does not escape the list so we use outdent to do this and cancel the default behaviour
- // Gecko does not create a paragraph outdenting inside a TD so default behaviour is cancelled and we outdent ourselves
- ed.execCommand('Outdent');
- return Event.cancel(e);
- }
- }
- });
-
- function fixListItem(parent, reference) {
- // a zero-sized non-breaking space is placed in the empty list item so that the nested list is
- // displayed on the below line instead of next to it
- var n = ed.getDoc().createTextNode('\uFEFF');
- parent.insertBefore(n, reference);
- ed.selection.setCursorLocation(n, 0);
- // repaint to remove rendering artifact. only visible when creating new list
- ed.execCommand('mceRepaint');
- }
-
- function fixIndentedListItemForGecko(ed, e) {
- if (isEnter(e)) {
- var li = getLi();
- if (li) {
- var parent = li.parentNode;
- var grandParent = parent && parent.parentNode;
- if (grandParent && grandParent.nodeName == 'LI' && grandParent.firstChild == parent && li == parent.firstChild) {
- fixListItem(grandParent, parent);
- }
- }
- }
- }
-
- function fixIndentedListItemForIE8(ed, e) {
- if (isEnter(e)) {
- var li = getLi();
- if (ed.dom.select('ul li', li).length === 1) {
- var list = li.firstChild;
- fixListItem(li, list);
- }
- }
- }
-
- function fixDeletingFirstCharOfList(ed, e) {
- function listElements(list, li) {
- var elements = [];
- var walker = new tinymce.dom.TreeWalker(li, list);
- for (var node = walker.current(); node; node = walker.next()) {
- if (ed.dom.is(node, 'ol,ul,li')) {
- elements.push(node);
- }
- }
- return elements;
- }
-
- if (e.keyCode == tinymce.VK.BACKSPACE) {
- var li = getLi();
- if (li) {
- var list = ed.dom.getParent(li, 'ol,ul');
- if (list && list.firstChild === li) {
- var elements = listElements(list, li);
- ed.execCommand("Outdent", false, elements);
- ed.undoManager.add();
- return Event.cancel(e);
- }
- }
- }
- }
-
- function fixDeletingEmptyLiInWebkit(ed, e) {
- var li = getLi();
- if (e.keyCode === tinymce.VK.BACKSPACE && ed.dom.is(li, 'li') && li.parentNode.firstChild!==li) {
- if (ed.dom.select('ul,ol', li).length === 1) {
- var prevLi = li.previousSibling;
- ed.dom.remove(ed.dom.select('br', li));
- ed.dom.remove(li, true);
- var textNodes = tinymce.grep(prevLi.childNodes, function(n){ return n.nodeType === 3 });
- if (textNodes.length === 1) {
- var textNode = textNodes[0]
- ed.selection.setCursorLocation(textNode, textNode.length);
- }
- ed.undoManager.add();
- return Event.cancel(e);
- }
- }
- }
-
- ed.onKeyDown.add(function(_, e) { state = getListKeyState(e); });
- ed.onKeyDown.add(cancelDefaultEvents);
- ed.onKeyDown.add(imageJoiningListItem);
- ed.onKeyDown.add(createNewLi);
-
- if (tinymce.isGecko) {
- ed.onKeyUp.add(fixIndentedListItemForGecko);
- }
- if (tinymce.isIE8) {
- ed.onKeyUp.add(fixIndentedListItemForIE8);
- }
- if (tinymce.isGecko || tinymce.isWebKit) {
- ed.onKeyDown.add(fixDeletingFirstCharOfList);
- }
- if (tinymce.isWebKit) {
- ed.onKeyDown.add(fixDeletingEmptyLiInWebkit);
- }
- },
-
- applyList: function(targetListType, oppositeListType) {
- var t = this, ed = t.ed, dom = ed.dom, applied = [], hasSameType = false, hasOppositeType = false, hasNonList = false, actions,
- selectedBlocks = ed.selection.getSelectedBlocks();
-
- function cleanupBr(e) {
- if (e && e.tagName === 'BR') {
- dom.remove(e);
- }
- }
-
- function makeList(element) {
- var list = dom.create(targetListType), li;
-
- function adjustIndentForNewList(element) {
- // If there's a margin-left, outdent one level to account for the extra list margin.
- if (element.style.marginLeft || element.style.paddingLeft) {
- t.adjustPaddingFunction(false)(element);
- }
- }
-
- if (element.tagName === 'LI') {
- // No change required.
- } else if (element.tagName === 'P' || element.tagName === 'DIV' || element.tagName === 'BODY') {
- processBrs(element, function(startSection, br) {
- doWrapList(startSection, br, element.tagName === 'BODY' ? null : startSection.parentNode);
- li = startSection.parentNode;
- adjustIndentForNewList(li);
- cleanupBr(br);
- });
- if (li) {
- if (li.tagName === 'LI' && (element.tagName === 'P' || selectedBlocks.length > 1)) {
- dom.split(li.parentNode.parentNode, li.parentNode);
- }
- attemptMergeWithAdjacent(li.parentNode, true);
- }
- return;
- } else {
- // Put the list around the element.
- li = dom.create('li');
- dom.insertAfter(li, element);
- li.appendChild(element);
- adjustIndentForNewList(element);
- element = li;
- }
- dom.insertAfter(list, element);
- list.appendChild(element);
- attemptMergeWithAdjacent(list, true);
- applied.push(element);
- }
-
- function doWrapList(start, end, template) {
- var li, n = start, tmp;
- while (!dom.isBlock(start.parentNode) && start.parentNode !== dom.getRoot()) {
- start = dom.split(start.parentNode, start.previousSibling);
- start = start.nextSibling;
- n = start;
- }
- if (template) {
- li = template.cloneNode(true);
- start.parentNode.insertBefore(li, start);
- while (li.firstChild) dom.remove(li.firstChild);
- li = dom.rename(li, 'li');
- } else {
- li = dom.create('li');
- start.parentNode.insertBefore(li, start);
- }
- while (n && n != end) {
- tmp = n.nextSibling;
- li.appendChild(n);
- n = tmp;
- }
- if (li.childNodes.length === 0) {
- li.innerHTML = '<br _mce_bogus="1" />';
- }
- makeList(li);
- }
-
- function processBrs(element, callback) {
- var startSection, previousBR, END_TO_START = 3, START_TO_END = 1,
- breakElements = 'br,ul,ol,p,div,h1,h2,h3,h4,h5,h6,table,blockquote,address,pre,form,center,dl';
-
- function isAnyPartSelected(start, end) {
- var r = dom.createRng(), sel;
- bookmark.keep = true;
- ed.selection.moveToBookmark(bookmark);
- bookmark.keep = false;
- sel = ed.selection.getRng(true);
- if (!end) {
- end = start.parentNode.lastChild;
- }
- r.setStartBefore(start);
- r.setEndAfter(end);
- return !(r.compareBoundaryPoints(END_TO_START, sel) > 0 || r.compareBoundaryPoints(START_TO_END, sel) <= 0);
- }
-
- function nextLeaf(br) {
- if (br.nextSibling)
- return br.nextSibling;
- if (!dom.isBlock(br.parentNode) && br.parentNode !== dom.getRoot())
- return nextLeaf(br.parentNode);
- }
-
- // Split on BRs within the range and process those.
- startSection = element.firstChild;
- // First mark the BRs that have any part of the previous section selected.
- var trailingContentSelected = false;
- each(dom.select(breakElements, element), function(br) {
- if (br.hasAttribute && br.hasAttribute('_mce_bogus')) {
- return true; // Skip the bogus Brs that are put in to appease Firefox and Safari.
- }
- if (isAnyPartSelected(startSection, br)) {
- dom.addClass(br, '_mce_tagged_br');
- startSection = nextLeaf(br);
- }
- });
- trailingContentSelected = (startSection && isAnyPartSelected(startSection, undefined));
- startSection = element.firstChild;
- each(dom.select(breakElements, element), function(br) {
- // Got a section from start to br.
- var tmp = nextLeaf(br);
- if (br.hasAttribute && br.hasAttribute('_mce_bogus')) {
- return true; // Skip the bogus Brs that are put in to appease Firefox and Safari.
- }
- if (dom.hasClass(br, '_mce_tagged_br')) {
- callback(startSection, br, previousBR);
- previousBR = null;
- } else {
- previousBR = br;
- }
- startSection = tmp;
- });
- if (trailingContentSelected) {
- callback(startSection, undefined, previousBR);
- }
- }
-
- function wrapList(element) {
- processBrs(element, function(startSection, br, previousBR) {
- // Need to indent this part
- doWrapList(startSection, br);
- cleanupBr(br);
- cleanupBr(previousBR);
- });
- }
-
- function changeList(element) {
- if (tinymce.inArray(applied, element) !== -1) {
- return;
- }
- if (element.parentNode.tagName === oppositeListType) {
- dom.split(element.parentNode, element);
- makeList(element);
- attemptMergeWithNext(element.parentNode, false);
- }
- applied.push(element);
- }
-
- function convertListItemToParagraph(element) {
- var child, nextChild, mergedElement, splitLast;
- if (tinymce.inArray(applied, element) !== -1) {
- return;
- }
- element = splitNestedLists(element, dom);
- while (dom.is(element.parentNode, 'ol,ul,li')) {
- dom.split(element.parentNode, element);
- }
- // Push the original element we have from the selection, not the renamed one.
- applied.push(element);
- element = dom.rename(element, 'p');
- mergedElement = attemptMergeWithAdjacent(element, false, ed.settings.force_br_newlines);
- if (mergedElement === element) {
- // Now split out any block elements that can't be contained within a P.
- // Manually iterate to ensure we handle modifications correctly (doesn't work with tinymce.each)
- child = element.firstChild;
- while (child) {
- if (dom.isBlock(child)) {
- child = dom.split(child.parentNode, child);
- splitLast = true;
- nextChild = child.nextSibling && child.nextSibling.firstChild;
- } else {
- nextChild = child.nextSibling;
- if (splitLast && child.tagName === 'BR') {
- dom.remove(child);
- }
- splitLast = false;
- }
- child = nextChild;
- }
- }
- }
-
- each(selectedBlocks, function(e) {
- e = findItemToOperateOn(e, dom);
- if (e.tagName === oppositeListType || (e.tagName === 'LI' && e.parentNode.tagName === oppositeListType)) {
- hasOppositeType = true;
- } else if (e.tagName === targetListType || (e.tagName === 'LI' && e.parentNode.tagName === targetListType)) {
- hasSameType = true;
- } else {
- hasNonList = true;
- }
- });
-
- if (hasNonList &&!hasSameType || hasOppositeType || selectedBlocks.length === 0) {
- actions = {
- 'LI': changeList,
- 'H1': makeList,
- 'H2': makeList,
- 'H3': makeList,
- 'H4': makeList,
- 'H5': makeList,
- 'H6': makeList,
- 'P': makeList,
- 'BODY': makeList,
- 'DIV': selectedBlocks.length > 1 ? makeList : wrapList,
- defaultAction: wrapList,
- elements: this.selectedBlocks()
- };
- } else {
- actions = {
- defaultAction: convertListItemToParagraph,
- elements: this.selectedBlocks()
- };
- }
- this.process(actions);
- },
-
- indent: function() {
- var ed = this.ed, dom = ed.dom, indented = [];
-
- function createWrapItem(element) {
- var wrapItem = dom.create('li', { style: 'list-style-type: none;'});
- dom.insertAfter(wrapItem, element);
- return wrapItem;
- }
-
- function createWrapList(element) {
- var wrapItem = createWrapItem(element),
- list = dom.getParent(element, 'ol,ul'),
- listType = list.tagName,
- listStyle = dom.getStyle(list, 'list-style-type'),
- attrs = {},
- wrapList;
- if (listStyle !== '') {
- attrs.style = 'list-style-type: ' + listStyle + ';';
- }
- wrapList = dom.create(listType, attrs);
- wrapItem.appendChild(wrapList);
- return wrapList;
- }
-
- function indentLI(element) {
- if (!hasParentInList(ed, element, indented)) {
- element = splitNestedLists(element, dom);
- var wrapList = createWrapList(element);
- wrapList.appendChild(element);
- attemptMergeWithAdjacent(wrapList.parentNode, false);
- attemptMergeWithAdjacent(wrapList, false);
- indented.push(element);
- }
- }
-
- this.process({
- 'LI': indentLI,
- defaultAction: this.adjustPaddingFunction(true),
- elements: this.selectedBlocks()
- });
-
- },
-
- outdent: function(ui, elements) {
- var t = this, ed = t.ed, dom = ed.dom, outdented = [];
-
- function outdentLI(element) {
- var listElement, targetParent, align;
- if (!hasParentInList(ed, element, outdented)) {
- if (dom.getStyle(element, 'margin-left') !== '' || dom.getStyle(element, 'padding-left') !== '') {
- return t.adjustPaddingFunction(false)(element);
- }
- align = dom.getStyle(element, 'text-align', true);
- if (align === 'center' || align === 'right') {
- dom.setStyle(element, 'text-align', 'left');
- return;
- }
- element = splitNestedLists(element, dom);
- listElement = element.parentNode;
- targetParent = element.parentNode.parentNode;
- if (targetParent.tagName === 'P') {
- dom.split(targetParent, element.parentNode);
- } else {
- dom.split(listElement, element);
- if (targetParent.tagName === 'LI') {
- // Nested list, need to split the LI and go back out to the OL/UL element.
- dom.split(targetParent, element);
- } else if (!dom.is(targetParent, 'ol,ul')) {
- dom.rename(element, 'p');
- }
- }
- outdented.push(element);
- }
- }
-
- var listElements = elements && tinymce.is(elements, 'array') ? elements : this.selectedBlocks();
- this.process({
- 'LI': outdentLI,
- defaultAction: this.adjustPaddingFunction(false),
- elements: listElements
- });
-
- each(outdented, attemptMergeWithAdjacent);
- },
-
- process: function(actions) {
- var t = this, sel = t.ed.selection, dom = t.ed.dom, selectedBlocks, r;
-
- function isEmptyElement(element) {
- var excludeBrsAndBookmarks = tinymce.grep(element.childNodes, function(n) {
- return !(n.nodeName === 'BR' || n.nodeName === 'SPAN' && dom.getAttrib(n, 'data-mce-type') == 'bookmark'
- || n.nodeType == 3 && (n.nodeValue == String.fromCharCode(160) || n.nodeValue == ''));
- });
- return excludeBrsAndBookmarks.length === 0;
- }
-
- function processElement(element) {
- dom.removeClass(element, '_mce_act_on');
- if (!element || element.nodeType !== 1 || selectedBlocks.length > 1 && isEmptyElement(element)) {
- return;
- }
- element = findItemToOperateOn(element, dom);
- var action = actions[element.tagName];
- if (!action) {
- action = actions.defaultAction;
- }
- action(element);
- }
-
- function recurse(element) {
- t.splitSafeEach(element.childNodes, processElement);
- }
-
- function brAtEdgeOfSelection(container, offset) {
- return offset >= 0 && container.hasChildNodes() && offset < container.childNodes.length &&
- container.childNodes[offset].tagName === 'BR';
- }
-
- function isInTable() {
- var n = sel.getNode();
- var p = dom.getParent(n, 'td');
- return p !== null;
- }
-
- selectedBlocks = actions.elements;
-
- r = sel.getRng(true);
- if (!r.collapsed) {
- if (brAtEdgeOfSelection(r.endContainer, r.endOffset - 1)) {
- r.setEnd(r.endContainer, r.endOffset - 1);
- sel.setRng(r);
- }
- if (brAtEdgeOfSelection(r.startContainer, r.startOffset)) {
- r.setStart(r.startContainer, r.startOffset + 1);
- sel.setRng(r);
- }
- }
-
-
- if (tinymce.isIE8) {
- // append a zero sized nbsp so that caret is restored correctly using bookmark
- var s = t.ed.selection.getNode();
- if (s.tagName === 'LI' && !(s.parentNode.lastChild === s)) {
- var i = t.ed.getDoc().createTextNode('\uFEFF');
- s.appendChild(i);
- }
- }
-
- bookmark = sel.getBookmark();
- actions.OL = actions.UL = recurse;
- t.splitSafeEach(selectedBlocks, processElement);
- sel.moveToBookmark(bookmark);
- bookmark = null;
-
- // we avoid doing repaint in a table as this will move the caret out of the table in Firefox 3.6
- if (!isInTable()) {
- // Avoids table or image handles being left behind in Firefox.
- t.ed.execCommand('mceRepaint');
- }
- },
-
- splitSafeEach: function(elements, f) {
- if (tinymce.isGecko && (/Firefox\/[12]\.[0-9]/.test(navigator.userAgent) ||
- /Firefox\/3\.[0-4]/.test(navigator.userAgent))) {
- this.classBasedEach(elements, f);
- } else {
- each(elements, f);
- }
- },
-
- classBasedEach: function(elements, f) {
- var dom = this.ed.dom, nodes, element;
- // Mark nodes
- each(elements, function(element) {
- dom.addClass(element, '_mce_act_on');
- });
- nodes = dom.select('._mce_act_on');
- while (nodes.length > 0) {
- element = nodes.shift();
- dom.removeClass(element, '_mce_act_on');
- f(element);
- nodes = dom.select('._mce_act_on');
- }
- },
-
- adjustPaddingFunction: function(isIndent) {
- var indentAmount, indentUnits, ed = this.ed;
- indentAmount = ed.settings.indentation;
- indentUnits = /[a-z%]+/i.exec(indentAmount);
- indentAmount = parseInt(indentAmount, 10);
- return function(element) {
- var currentIndent, newIndentAmount;
- currentIndent = parseInt(ed.dom.getStyle(element, 'margin-left') || 0, 10) + parseInt(ed.dom.getStyle(element, 'padding-left') || 0, 10);
- if (isIndent) {
- newIndentAmount = currentIndent + indentAmount;
- } else {
- newIndentAmount = currentIndent - indentAmount;
- }
- ed.dom.setStyle(element, 'padding-left', '');
- ed.dom.setStyle(element, 'margin-left', newIndentAmount > 0 ? newIndentAmount + indentUnits : '');
- };
- },
-
- selectedBlocks: function() {
- var ed = this.ed
- var selectedBlocks = ed.selection.getSelectedBlocks();
- return selectedBlocks.length == 0 ? [ ed.dom.getRoot() ] : selectedBlocks;
- },
-
- getInfo: function() {
- return {
- longname : 'Lists',
- author : 'Moxiecode Systems AB',
- authorurl : 'http://tinymce.moxiecode.com',
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/lists',
- version : tinymce.majorVersion + "." + tinymce.minorVersion
- };
- }
- });
- tinymce.PluginManager.add("lists", tinymce.plugins.Lists);
-}());
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2011, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ var each = tinymce.each, Event = tinymce.dom.Event, bookmark;
+
+ // Skips text nodes that only contain whitespace since they aren't semantically important.
+ function skipWhitespaceNodes(e, next) {
+ while (e && (e.nodeType === 8 || (e.nodeType === 3 && /^[ \t\n\r]*$/.test(e.nodeValue)))) {
+ e = next(e);
+ }
+ return e;
+ }
+
+ function skipWhitespaceNodesBackwards(e) {
+ return skipWhitespaceNodes(e, function(e) {
+ return e.previousSibling;
+ });
+ }
+
+ function skipWhitespaceNodesForwards(e) {
+ return skipWhitespaceNodes(e, function(e) {
+ return e.nextSibling;
+ });
+ }
+
+ function hasParentInList(ed, e, list) {
+ return ed.dom.getParent(e, function(p) {
+ return tinymce.inArray(list, p) !== -1;
+ });
+ }
+
+ function isList(e) {
+ return e && (e.tagName === 'OL' || e.tagName === 'UL');
+ }
+
+ function splitNestedLists(element, dom) {
+ var tmp, nested, wrapItem;
+ tmp = skipWhitespaceNodesBackwards(element.lastChild);
+ while (isList(tmp)) {
+ nested = tmp;
+ tmp = skipWhitespaceNodesBackwards(nested.previousSibling);
+ }
+ if (nested) {
+ wrapItem = dom.create('li', { style: 'list-style-type: none;'});
+ dom.split(element, nested);
+ dom.insertAfter(wrapItem, nested);
+ wrapItem.appendChild(nested);
+ wrapItem.appendChild(nested);
+ element = wrapItem.previousSibling;
+ }
+ return element;
+ }
+
+ function attemptMergeWithAdjacent(e, allowDifferentListStyles, mergeParagraphs) {
+ e = attemptMergeWithPrevious(e, allowDifferentListStyles, mergeParagraphs);
+ return attemptMergeWithNext(e, allowDifferentListStyles, mergeParagraphs);
+ }
+
+ function attemptMergeWithPrevious(e, allowDifferentListStyles, mergeParagraphs) {
+ var prev = skipWhitespaceNodesBackwards(e.previousSibling);
+ if (prev) {
+ return attemptMerge(prev, e, allowDifferentListStyles ? prev : false, mergeParagraphs);
+ } else {
+ return e;
+ }
+ }
+
+ function attemptMergeWithNext(e, allowDifferentListStyles, mergeParagraphs) {
+ var next = skipWhitespaceNodesForwards(e.nextSibling);
+ if (next) {
+ return attemptMerge(e, next, allowDifferentListStyles ? next : false, mergeParagraphs);
+ } else {
+ return e;
+ }
+ }
+
+ function attemptMerge(e1, e2, differentStylesMasterElement, mergeParagraphs) {
+ if (canMerge(e1, e2, !!differentStylesMasterElement, mergeParagraphs)) {
+ return merge(e1, e2, differentStylesMasterElement);
+ } else if (e1 && e1.tagName === 'LI' && isList(e2)) {
+ // Fix invalidly nested lists.
+ e1.appendChild(e2);
+ }
+ return e2;
+ }
+
+ function canMerge(e1, e2, allowDifferentListStyles, mergeParagraphs) {
+ if (!e1 || !e2) {
+ return false;
+ } else if (e1.tagName === 'LI' && e2.tagName === 'LI') {
+ return e2.style.listStyleType === 'none' || containsOnlyAList(e2);
+ } else if (isList(e1)) {
+ return (e1.tagName === e2.tagName && (allowDifferentListStyles || e1.style.listStyleType === e2.style.listStyleType)) || isListForIndent(e2);
+ } else return mergeParagraphs && e1.tagName === 'P' && e2.tagName === 'P';
+ }
+
+ function isListForIndent(e) {
+ var firstLI = skipWhitespaceNodesForwards(e.firstChild), lastLI = skipWhitespaceNodesBackwards(e.lastChild);
+ return firstLI && lastLI && isList(e) && firstLI === lastLI && (isList(firstLI) || firstLI.style.listStyleType === 'none' || containsOnlyAList(firstLI));
+ }
+
+ function containsOnlyAList(e) {
+ var firstChild = skipWhitespaceNodesForwards(e.firstChild), lastChild = skipWhitespaceNodesBackwards(e.lastChild);
+ return firstChild && lastChild && firstChild === lastChild && isList(firstChild);
+ }
+
+ function merge(e1, e2, masterElement) {
+ var lastOriginal = skipWhitespaceNodesBackwards(e1.lastChild), firstNew = skipWhitespaceNodesForwards(e2.firstChild);
+ if (e1.tagName === 'P') {
+ e1.appendChild(e1.ownerDocument.createElement('br'));
+ }
+ while (e2.firstChild) {
+ e1.appendChild(e2.firstChild);
+ }
+ if (masterElement) {
+ e1.style.listStyleType = masterElement.style.listStyleType;
+ }
+ e2.parentNode.removeChild(e2);
+ attemptMerge(lastOriginal, firstNew, false);
+ return e1;
+ }
+
+ function findItemToOperateOn(e, dom) {
+ var item;
+ if (!dom.is(e, 'li,ol,ul')) {
+ item = dom.getParent(e, 'li');
+ if (item) {
+ e = item;
+ }
+ }
+ return e;
+ }
+
+ tinymce.create('tinymce.plugins.Lists', {
+ init: function(ed) {
+ var LIST_TABBING = 'TABBING';
+ var LIST_EMPTY_ITEM = 'EMPTY';
+ var LIST_ESCAPE = 'ESCAPE';
+ var LIST_PARAGRAPH = 'PARAGRAPH';
+ var LIST_UNKNOWN = 'UNKNOWN';
+ var state = LIST_UNKNOWN;
+
+ function isTabInList(e) {
+ // Don't indent on Ctrl+Tab or Alt+Tab
+ return e.keyCode === tinymce.VK.TAB && !(e.altKey || e.ctrlKey) &&
+ (ed.queryCommandState('InsertUnorderedList') || ed.queryCommandState('InsertOrderedList'));
+ }
+
+ function isOnLastListItem() {
+ var li = getLi();
+ var grandParent = li.parentNode.parentNode;
+ var isLastItem = li.parentNode.lastChild === li;
+ return isLastItem && !isNestedList(grandParent) && isEmptyListItem(li);
+ }
+
+ function isNestedList(grandParent) {
+ if (isList(grandParent)) {
+ return grandParent.parentNode && grandParent.parentNode.tagName === 'LI';
+ } else {
+ return grandParent.tagName === 'LI';
+ }
+ }
+
+ function isInEmptyListItem() {
+ return ed.selection.isCollapsed() && isEmptyListItem(getLi());
+ }
+
+ function getLi() {
+ var n = ed.selection.getStart();
+ // Get start will return BR if the LI only contains a BR or an empty element as we use these to fix caret position
+ return ((n.tagName == 'BR' || n.tagName == '') && n.parentNode.tagName == 'LI') ? n.parentNode : n;
+ }
+
+ function isEmptyListItem(li) {
+ var numChildren = li.childNodes.length;
+ if (li.tagName === 'LI') {
+ return numChildren == 0 ? true : numChildren == 1 && (li.firstChild.tagName == '' || li.firstChild.tagName == 'BR' || isEmptyIE9Li(li));
+ }
+ return false;
+ }
+
+ function isEmptyIE9Li(li) {
+ // only consider this to be last item if there is no list item content or that content is nbsp or space since IE9 creates these
+ var lis = tinymce.grep(li.parentNode.childNodes, function(n) {return n.tagName == 'LI'});
+ var isLastLi = li == lis[lis.length - 1];
+ var child = li.firstChild;
+ return tinymce.isIE9 && isLastLi && (child.nodeValue == String.fromCharCode(160) || child.nodeValue == String.fromCharCode(32));
+ }
+
+ function isEnter(e) {
+ return e.keyCode === tinymce.VK.ENTER;
+ }
+
+ function isEnterWithoutShift(e) {
+ return isEnter(e) && !e.shiftKey;
+ }
+
+ function getListKeyState(e) {
+ if (isTabInList(e)) {
+ return LIST_TABBING;
+ } else if (isEnterWithoutShift(e) && isOnLastListItem()) {
+ // Returns LIST_UNKNOWN since breaking out of lists is handled by the EnterKey.js logic now
+ //return LIST_ESCAPE;
+ return LIST_UNKNOWN;
+ } else if (isEnterWithoutShift(e) && isInEmptyListItem()) {
+ return LIST_EMPTY_ITEM;
+ } else {
+ return LIST_UNKNOWN;
+ }
+ }
+
+ function cancelDefaultEvents(ed, e) {
+ // list escape is done manually using outdent as it does not create paragraphs correctly in td's
+ if (state == LIST_TABBING || state == LIST_EMPTY_ITEM || tinymce.isGecko && state == LIST_ESCAPE) {
+ Event.cancel(e);
+ }
+ }
+
+ function isCursorAtEndOfContainer() {
+ var range = ed.selection.getRng(true);
+ var startContainer = range.startContainer;
+ if (startContainer.nodeType == 3) {
+ var value = startContainer.nodeValue;
+ if (tinymce.isIE9 && value.length > 1 && value.charCodeAt(value.length-1) == 32) {
+ // IE9 places a space on the end of the text in some cases so ignore last char
+ return (range.endOffset == value.length-1);
+ } else {
+ return (range.endOffset == value.length);
+ }
+ } else if (startContainer.nodeType == 1) {
+ return range.endOffset == startContainer.childNodes.length;
+ }
+ return false;
+ }
+
+ /*
+ If we are at the end of a list item surrounded with an element, pressing enter should create a
+ new list item instead without splitting the element e.g. don't want to create new P or H1 tag
+ */
+ function isEndOfListItem() {
+ var node = ed.selection.getNode();
+ var validElements = 'h1,h2,h3,h4,h5,h6,p,div';
+ var isLastParagraphOfLi = ed.dom.is(node, validElements) && node.parentNode.tagName === 'LI' && node.parentNode.lastChild === node;
+ return ed.selection.isCollapsed() && isLastParagraphOfLi && isCursorAtEndOfContainer();
+ }
+
+ // Creates a new list item after the current selection's list item parent
+ function createNewLi(ed, e) {
+ if (isEnterWithoutShift(e) && isEndOfListItem()) {
+ var node = ed.selection.getNode();
+ var li = ed.dom.create("li");
+ var parentLi = ed.dom.getParent(node, 'li');
+ ed.dom.insertAfter(li, parentLi);
+
+ // Move caret to new list element.
+ if (tinymce.isIE6 || tinymce.isIE7 || tinyMCE.isIE8) {
+ // Removed this line since it would create an odd <&nbsp;> tag and placing the caret inside an empty LI is handled and should be handled by the selection logic
+ //li.appendChild(ed.dom.create("&nbsp;")); // IE needs an element within the bullet point
+ ed.selection.setCursorLocation(li, 1);
+ } else {
+ ed.selection.setCursorLocation(li, 0);
+ }
+ e.preventDefault();
+ }
+ }
+
+ function imageJoiningListItem(ed, e) {
+ var prevSibling;
+
+ if (!tinymce.isGecko)
+ return;
+
+ var n = ed.selection.getStart();
+ if (e.keyCode != tinymce.VK.BACKSPACE || n.tagName !== 'IMG')
+ return;
+
+ function lastLI(node) {
+ var child = node.firstChild;
+ var li = null;
+ do {
+ if (!child)
+ break;
+
+ if (child.tagName === 'LI')
+ li = child;
+ } while (child = child.nextSibling);
+
+ return li;
+ }
+
+ function addChildren(parentNode, destination) {
+ while (parentNode.childNodes.length > 0)
+ destination.appendChild(parentNode.childNodes[0]);
+ }
+
+ // Check if there is a previous sibling
+ prevSibling = n.parentNode.previousSibling;
+ if (!prevSibling)
+ return;
+
+ var ul;
+ if (prevSibling.tagName === 'UL' || prevSibling.tagName === 'OL')
+ ul = prevSibling;
+ else if (prevSibling.previousSibling && (prevSibling.previousSibling.tagName === 'UL' || prevSibling.previousSibling.tagName === 'OL'))
+ ul = prevSibling.previousSibling;
+ else
+ return;
+
+ var li = lastLI(ul);
+
+ // move the caret to the end of the list item
+ var rng = ed.dom.createRng();
+ rng.setStart(li, 1);
+ rng.setEnd(li, 1);
+ ed.selection.setRng(rng);
+ ed.selection.collapse(true);
+
+ // save a bookmark at the end of the list item
+ var bookmark = ed.selection.getBookmark();
+
+ // copy the image an its text to the list item
+ var clone = n.parentNode.cloneNode(true);
+ if (clone.tagName === 'P' || clone.tagName === 'DIV')
+ addChildren(clone, li);
+ else
+ li.appendChild(clone);
+
+ // remove the old copy of the image
+ n.parentNode.parentNode.removeChild(n.parentNode);
+
+ // move the caret where we saved the bookmark
+ ed.selection.moveToBookmark(bookmark);
+ }
+
+ // fix the cursor position to ensure it is correct in IE
+ function setCursorPositionToOriginalLi(li) {
+ var list = ed.dom.getParent(li, 'ol,ul');
+ if (list != null) {
+ var lastLi = list.lastChild;
+ // Removed this line since IE9 would report an DOM character error and placing the caret inside an empty LI is handled and should be handled by the selection logic
+ //lastLi.appendChild(ed.getDoc().createElement(''));
+ ed.selection.setCursorLocation(lastLi, 0);
+ }
+ }
+
+ this.ed = ed;
+ ed.addCommand('Indent', this.indent, this);
+ ed.addCommand('Outdent', this.outdent, this);
+ ed.addCommand('InsertUnorderedList', function() {
+ this.applyList('UL', 'OL');
+ }, this);
+ ed.addCommand('InsertOrderedList', function() {
+ this.applyList('OL', 'UL');
+ }, this);
+
+ ed.onInit.add(function() {
+ ed.editorCommands.addCommands({
+ 'outdent': function() {
+ var sel = ed.selection, dom = ed.dom;
+
+ function hasStyleIndent(n) {
+ n = dom.getParent(n, dom.isBlock);
+ return n && (parseInt(ed.dom.getStyle(n, 'margin-left') || 0, 10) + parseInt(ed.dom.getStyle(n, 'padding-left') || 0, 10)) > 0;
+ }
+
+ return hasStyleIndent(sel.getStart()) || hasStyleIndent(sel.getEnd()) || ed.queryCommandState('InsertOrderedList') || ed.queryCommandState('InsertUnorderedList');
+ }
+ }, 'state');
+ });
+
+ ed.onKeyUp.add(function(ed, e) {
+ if (state == LIST_TABBING) {
+ ed.execCommand(e.shiftKey ? 'Outdent' : 'Indent', true, null);
+ state = LIST_UNKNOWN;
+ return Event.cancel(e);
+ } else if (state == LIST_EMPTY_ITEM) {
+ var li = getLi();
+ var shouldOutdent = ed.settings.list_outdent_on_enter === true || e.shiftKey;
+ ed.execCommand(shouldOutdent ? 'Outdent' : 'Indent', true, null);
+ if (tinymce.isIE) {
+ setCursorPositionToOriginalLi(li);
+ }
+
+ return Event.cancel(e);
+ } else if (state == LIST_ESCAPE) {
+ if (tinymce.isIE6 || tinymce.isIE7 || tinymce.isIE8) {
+ // append a zero sized nbsp so that caret is positioned correctly in IE after escaping and applying formatting.
+ // if there is no text then applying formatting for e.g a H1 to the P tag immediately following list after
+ // escaping from it will cause the caret to be positioned on the last li instead of staying the in P tag.
+ var n = ed.getDoc().createTextNode('\uFEFF');
+ ed.selection.getNode().appendChild(n);
+ } else if (tinymce.isIE9 || tinymce.isGecko) {
+ // IE9 does not escape the list so we use outdent to do this and cancel the default behaviour
+ // Gecko does not create a paragraph outdenting inside a TD so default behaviour is cancelled and we outdent ourselves
+ ed.execCommand('Outdent');
+ return Event.cancel(e);
+ }
+ }
+ });
+
+ function fixListItem(parent, reference) {
+ // a zero-sized non-breaking space is placed in the empty list item so that the nested list is
+ // displayed on the below line instead of next to it
+ var n = ed.getDoc().createTextNode('\uFEFF');
+ parent.insertBefore(n, reference);
+ ed.selection.setCursorLocation(n, 0);
+ // repaint to remove rendering artifact. only visible when creating new list
+ ed.execCommand('mceRepaint');
+ }
+
+ function fixIndentedListItemForGecko(ed, e) {
+ if (isEnter(e)) {
+ var li = getLi();
+ if (li) {
+ var parent = li.parentNode;
+ var grandParent = parent && parent.parentNode;
+ if (grandParent && grandParent.nodeName == 'LI' && grandParent.firstChild == parent && li == parent.firstChild) {
+ fixListItem(grandParent, parent);
+ }
+ }
+ }
+ }
+
+ function fixIndentedListItemForIE8(ed, e) {
+ if (isEnter(e)) {
+ var li = getLi();
+ if (ed.dom.select('ul li', li).length === 1) {
+ var list = li.firstChild;
+ fixListItem(li, list);
+ }
+ }
+ }
+
+ function fixDeletingFirstCharOfList(ed, e) {
+ function listElements(list, li) {
+ var elements = [];
+ var walker = new tinymce.dom.TreeWalker(li, list);
+ for (var node = walker.current(); node; node = walker.next()) {
+ if (ed.dom.is(node, 'ol,ul,li')) {
+ elements.push(node);
+ }
+ }
+ return elements;
+ }
+
+ if (e.keyCode == tinymce.VK.BACKSPACE) {
+ var li = getLi();
+ if (li) {
+ var list = ed.dom.getParent(li, 'ol,ul');
+ if (list && list.firstChild === li) {
+ var elements = listElements(list, li);
+ ed.execCommand("Outdent", false, elements);
+ ed.undoManager.add();
+ return Event.cancel(e);
+ }
+ }
+ }
+ }
+
+ function fixDeletingEmptyLiInWebkit(ed, e) {
+ var li = getLi();
+ if (e.keyCode === tinymce.VK.BACKSPACE && ed.dom.is(li, 'li') && li.parentNode.firstChild!==li) {
+ if (ed.dom.select('ul,ol', li).length === 1) {
+ var prevLi = li.previousSibling;
+ ed.dom.remove(ed.dom.select('br', li));
+ ed.dom.remove(li, true);
+ var textNodes = tinymce.grep(prevLi.childNodes, function(n){ return n.nodeType === 3 });
+ if (textNodes.length === 1) {
+ var textNode = textNodes[0]
+ ed.selection.setCursorLocation(textNode, textNode.length);
+ }
+ ed.undoManager.add();
+ return Event.cancel(e);
+ }
+ }
+ }
+
+ ed.onKeyDown.add(function(_, e) { state = getListKeyState(e); });
+ ed.onKeyDown.add(cancelDefaultEvents);
+ ed.onKeyDown.add(imageJoiningListItem);
+ ed.onKeyDown.add(createNewLi);
+
+ if (tinymce.isGecko) {
+ ed.onKeyUp.add(fixIndentedListItemForGecko);
+ }
+ if (tinymce.isIE8) {
+ ed.onKeyUp.add(fixIndentedListItemForIE8);
+ }
+ if (tinymce.isGecko || tinymce.isWebKit) {
+ ed.onKeyDown.add(fixDeletingFirstCharOfList);
+ }
+ if (tinymce.isWebKit) {
+ ed.onKeyDown.add(fixDeletingEmptyLiInWebkit);
+ }
+ },
+
+ applyList: function(targetListType, oppositeListType) {
+ var t = this, ed = t.ed, dom = ed.dom, applied = [], hasSameType = false, hasOppositeType = false, hasNonList = false, actions,
+ selectedBlocks = ed.selection.getSelectedBlocks();
+
+ function cleanupBr(e) {
+ if (e && e.tagName === 'BR') {
+ dom.remove(e);
+ }
+ }
+
+ function makeList(element) {
+ var list = dom.create(targetListType), li;
+
+ function adjustIndentForNewList(element) {
+ // If there's a margin-left, outdent one level to account for the extra list margin.
+ if (element.style.marginLeft || element.style.paddingLeft) {
+ t.adjustPaddingFunction(false)(element);
+ }
+ }
+
+ if (element.tagName === 'LI') {
+ // No change required.
+ } else if (element.tagName === 'P' || element.tagName === 'DIV' || element.tagName === 'BODY') {
+ processBrs(element, function(startSection, br) {
+ doWrapList(startSection, br, element.tagName === 'BODY' ? null : startSection.parentNode);
+ li = startSection.parentNode;
+ adjustIndentForNewList(li);
+ cleanupBr(br);
+ });
+ if (li) {
+ if (li.tagName === 'LI' && (element.tagName === 'P' || selectedBlocks.length > 1)) {
+ dom.split(li.parentNode.parentNode, li.parentNode);
+ }
+ attemptMergeWithAdjacent(li.parentNode, true);
+ }
+ return;
+ } else {
+ // Put the list around the element.
+ li = dom.create('li');
+ dom.insertAfter(li, element);
+ li.appendChild(element);
+ adjustIndentForNewList(element);
+ element = li;
+ }
+ dom.insertAfter(list, element);
+ list.appendChild(element);
+ attemptMergeWithAdjacent(list, true);
+ applied.push(element);
+ }
+
+ function doWrapList(start, end, template) {
+ var li, n = start, tmp;
+ while (!dom.isBlock(start.parentNode) && start.parentNode !== dom.getRoot()) {
+ start = dom.split(start.parentNode, start.previousSibling);
+ start = start.nextSibling;
+ n = start;
+ }
+ if (template) {
+ li = template.cloneNode(true);
+ start.parentNode.insertBefore(li, start);
+ while (li.firstChild) dom.remove(li.firstChild);
+ li = dom.rename(li, 'li');
+ } else {
+ li = dom.create('li');
+ start.parentNode.insertBefore(li, start);
+ }
+ while (n && n != end) {
+ tmp = n.nextSibling;
+ li.appendChild(n);
+ n = tmp;
+ }
+ if (li.childNodes.length === 0) {
+ li.innerHTML = '<br _mce_bogus="1" />';
+ }
+ makeList(li);
+ }
+
+ function processBrs(element, callback) {
+ var startSection, previousBR, END_TO_START = 3, START_TO_END = 1,
+ breakElements = 'br,ul,ol,p,div,h1,h2,h3,h4,h5,h6,table,blockquote,address,pre,form,center,dl';
+
+ function isAnyPartSelected(start, end) {
+ var r = dom.createRng(), sel;
+ bookmark.keep = true;
+ ed.selection.moveToBookmark(bookmark);
+ bookmark.keep = false;
+ sel = ed.selection.getRng(true);
+ if (!end) {
+ end = start.parentNode.lastChild;
+ }
+ r.setStartBefore(start);
+ r.setEndAfter(end);
+ return !(r.compareBoundaryPoints(END_TO_START, sel) > 0 || r.compareBoundaryPoints(START_TO_END, sel) <= 0);
+ }
+
+ function nextLeaf(br) {
+ if (br.nextSibling)
+ return br.nextSibling;
+ if (!dom.isBlock(br.parentNode) && br.parentNode !== dom.getRoot())
+ return nextLeaf(br.parentNode);
+ }
+
+ // Split on BRs within the range and process those.
+ startSection = element.firstChild;
+ // First mark the BRs that have any part of the previous section selected.
+ var trailingContentSelected = false;
+ each(dom.select(breakElements, element), function(br) {
+ if (br.hasAttribute && br.hasAttribute('_mce_bogus')) {
+ return true; // Skip the bogus Brs that are put in to appease Firefox and Safari.
+ }
+ if (isAnyPartSelected(startSection, br)) {
+ dom.addClass(br, '_mce_tagged_br');
+ startSection = nextLeaf(br);
+ }
+ });
+ trailingContentSelected = (startSection && isAnyPartSelected(startSection, undefined));
+ startSection = element.firstChild;
+ each(dom.select(breakElements, element), function(br) {
+ // Got a section from start to br.
+ var tmp = nextLeaf(br);
+ if (br.hasAttribute && br.hasAttribute('_mce_bogus')) {
+ return true; // Skip the bogus Brs that are put in to appease Firefox and Safari.
+ }
+ if (dom.hasClass(br, '_mce_tagged_br')) {
+ callback(startSection, br, previousBR);
+ previousBR = null;
+ } else {
+ previousBR = br;
+ }
+ startSection = tmp;
+ });
+ if (trailingContentSelected) {
+ callback(startSection, undefined, previousBR);
+ }
+ }
+
+ function wrapList(element) {
+ processBrs(element, function(startSection, br, previousBR) {
+ // Need to indent this part
+ doWrapList(startSection, br);
+ cleanupBr(br);
+ cleanupBr(previousBR);
+ });
+ }
+
+ function changeList(element) {
+ if (tinymce.inArray(applied, element) !== -1) {
+ return;
+ }
+ if (element.parentNode.tagName === oppositeListType) {
+ dom.split(element.parentNode, element);
+ makeList(element);
+ attemptMergeWithNext(element.parentNode, false);
+ }
+ applied.push(element);
+ }
+
+ function convertListItemToParagraph(element) {
+ var child, nextChild, mergedElement, splitLast;
+ if (tinymce.inArray(applied, element) !== -1) {
+ return;
+ }
+ element = splitNestedLists(element, dom);
+ while (dom.is(element.parentNode, 'ol,ul,li')) {
+ dom.split(element.parentNode, element);
+ }
+ // Push the original element we have from the selection, not the renamed one.
+ applied.push(element);
+ element = dom.rename(element, 'p');
+ mergedElement = attemptMergeWithAdjacent(element, false, ed.settings.force_br_newlines);
+ if (mergedElement === element) {
+ // Now split out any block elements that can't be contained within a P.
+ // Manually iterate to ensure we handle modifications correctly (doesn't work with tinymce.each)
+ child = element.firstChild;
+ while (child) {
+ if (dom.isBlock(child)) {
+ child = dom.split(child.parentNode, child);
+ splitLast = true;
+ nextChild = child.nextSibling && child.nextSibling.firstChild;
+ } else {
+ nextChild = child.nextSibling;
+ if (splitLast && child.tagName === 'BR') {
+ dom.remove(child);
+ }
+ splitLast = false;
+ }
+ child = nextChild;
+ }
+ }
+ }
+
+ each(selectedBlocks, function(e) {
+ e = findItemToOperateOn(e, dom);
+ if (e.tagName === oppositeListType || (e.tagName === 'LI' && e.parentNode.tagName === oppositeListType)) {
+ hasOppositeType = true;
+ } else if (e.tagName === targetListType || (e.tagName === 'LI' && e.parentNode.tagName === targetListType)) {
+ hasSameType = true;
+ } else {
+ hasNonList = true;
+ }
+ });
+
+ if (hasNonList &&!hasSameType || hasOppositeType || selectedBlocks.length === 0) {
+ actions = {
+ 'LI': changeList,
+ 'H1': makeList,
+ 'H2': makeList,
+ 'H3': makeList,
+ 'H4': makeList,
+ 'H5': makeList,
+ 'H6': makeList,
+ 'P': makeList,
+ 'BODY': makeList,
+ 'DIV': selectedBlocks.length > 1 ? makeList : wrapList,
+ defaultAction: wrapList,
+ elements: this.selectedBlocks()
+ };
+ } else {
+ actions = {
+ defaultAction: convertListItemToParagraph,
+ elements: this.selectedBlocks(),
+ processEvenIfEmpty: true
+ };
+ }
+ this.process(actions);
+ },
+
+ indent: function() {
+ var ed = this.ed, dom = ed.dom, indented = [];
+
+ function createWrapItem(element) {
+ var wrapItem = dom.create('li', { style: 'list-style-type: none;'});
+ dom.insertAfter(wrapItem, element);
+ return wrapItem;
+ }
+
+ function createWrapList(element) {
+ var wrapItem = createWrapItem(element),
+ list = dom.getParent(element, 'ol,ul'),
+ listType = list.tagName,
+ listStyle = dom.getStyle(list, 'list-style-type'),
+ attrs = {},
+ wrapList;
+ if (listStyle !== '') {
+ attrs.style = 'list-style-type: ' + listStyle + ';';
+ }
+ wrapList = dom.create(listType, attrs);
+ wrapItem.appendChild(wrapList);
+ return wrapList;
+ }
+
+ function indentLI(element) {
+ if (!hasParentInList(ed, element, indented)) {
+ element = splitNestedLists(element, dom);
+ var wrapList = createWrapList(element);
+ wrapList.appendChild(element);
+ attemptMergeWithAdjacent(wrapList.parentNode, false);
+ attemptMergeWithAdjacent(wrapList, false);
+ indented.push(element);
+ }
+ }
+
+ this.process({
+ 'LI': indentLI,
+ defaultAction: this.adjustPaddingFunction(true),
+ elements: this.selectedBlocks()
+ });
+
+ },
+
+ outdent: function(ui, elements) {
+ var t = this, ed = t.ed, dom = ed.dom, outdented = [];
+
+ function outdentLI(element) {
+ var listElement, targetParent, align;
+ if (!hasParentInList(ed, element, outdented)) {
+ if (dom.getStyle(element, 'margin-left') !== '' || dom.getStyle(element, 'padding-left') !== '') {
+ return t.adjustPaddingFunction(false)(element);
+ }
+ align = dom.getStyle(element, 'text-align', true);
+ if (align === 'center' || align === 'right') {
+ dom.setStyle(element, 'text-align', 'left');
+ return;
+ }
+ element = splitNestedLists(element, dom);
+ listElement = element.parentNode;
+ targetParent = element.parentNode.parentNode;
+ if (targetParent.tagName === 'P') {
+ dom.split(targetParent, element.parentNode);
+ } else {
+ dom.split(listElement, element);
+ if (targetParent.tagName === 'LI') {
+ // Nested list, need to split the LI and go back out to the OL/UL element.
+ dom.split(targetParent, element);
+ } else if (!dom.is(targetParent, 'ol,ul')) {
+ dom.rename(element, 'p');
+ }
+ }
+ outdented.push(element);
+ }
+ }
+
+ var listElements = elements && tinymce.is(elements, 'array') ? elements : this.selectedBlocks();
+ this.process({
+ 'LI': outdentLI,
+ defaultAction: this.adjustPaddingFunction(false),
+ elements: listElements
+ });
+
+ each(outdented, attemptMergeWithAdjacent);
+ },
+
+ process: function(actions) {
+ var t = this, sel = t.ed.selection, dom = t.ed.dom, selectedBlocks, r;
+
+ function isEmptyElement(element) {
+ var excludeBrsAndBookmarks = tinymce.grep(element.childNodes, function(n) {
+ return !(n.nodeName === 'BR' || n.nodeName === 'SPAN' && dom.getAttrib(n, 'data-mce-type') == 'bookmark'
+ || n.nodeType == 3 && (n.nodeValue == String.fromCharCode(160) || n.nodeValue == ''));
+ });
+ return excludeBrsAndBookmarks.length === 0;
+ }
+
+ function processElement(element) {
+ dom.removeClass(element, '_mce_act_on');
+ if (!element || element.nodeType !== 1 || ! actions.processEvenIfEmpty && selectedBlocks.length > 1 && isEmptyElement(element)) {
+ return;
+ }
+ element = findItemToOperateOn(element, dom);
+ var action = actions[element.tagName];
+ if (!action) {
+ action = actions.defaultAction;
+ }
+ action(element);
+ }
+
+ function recurse(element) {
+ t.splitSafeEach(element.childNodes, processElement);
+ }
+
+ function brAtEdgeOfSelection(container, offset) {
+ return offset >= 0 && container.hasChildNodes() && offset < container.childNodes.length &&
+ container.childNodes[offset].tagName === 'BR';
+ }
+
+ function isInTable() {
+ var n = sel.getNode();
+ var p = dom.getParent(n, 'td');
+ return p !== null;
+ }
+
+ selectedBlocks = actions.elements;
+
+ r = sel.getRng(true);
+ if (!r.collapsed) {
+ if (brAtEdgeOfSelection(r.endContainer, r.endOffset - 1)) {
+ r.setEnd(r.endContainer, r.endOffset - 1);
+ sel.setRng(r);
+ }
+ if (brAtEdgeOfSelection(r.startContainer, r.startOffset)) {
+ r.setStart(r.startContainer, r.startOffset + 1);
+ sel.setRng(r);
+ }
+ }
+
+
+ if (tinymce.isIE8) {
+ // append a zero sized nbsp so that caret is restored correctly using bookmark
+ var s = t.ed.selection.getNode();
+ if (s.tagName === 'LI' && !(s.parentNode.lastChild === s)) {
+ var i = t.ed.getDoc().createTextNode('\uFEFF');
+ s.appendChild(i);
+ }
+ }
+
+ bookmark = sel.getBookmark();
+ actions.OL = actions.UL = recurse;
+ t.splitSafeEach(selectedBlocks, processElement);
+ sel.moveToBookmark(bookmark);
+ bookmark = null;
+
+ // we avoid doing repaint in a table as this will move the caret out of the table in Firefox 3.6
+ if (!isInTable()) {
+ // Avoids table or image handles being left behind in Firefox.
+ t.ed.execCommand('mceRepaint');
+ }
+ },
+
+ splitSafeEach: function(elements, f) {
+ if (tinymce.isGecko && (/Firefox\/[12]\.[0-9]/.test(navigator.userAgent) ||
+ /Firefox\/3\.[0-4]/.test(navigator.userAgent))) {
+ this.classBasedEach(elements, f);
+ } else {
+ each(elements, f);
+ }
+ },
+
+ classBasedEach: function(elements, f) {
+ var dom = this.ed.dom, nodes, element;
+ // Mark nodes
+ each(elements, function(element) {
+ dom.addClass(element, '_mce_act_on');
+ });
+ nodes = dom.select('._mce_act_on');
+ while (nodes.length > 0) {
+ element = nodes.shift();
+ dom.removeClass(element, '_mce_act_on');
+ f(element);
+ nodes = dom.select('._mce_act_on');
+ }
+ },
+
+ adjustPaddingFunction: function(isIndent) {
+ var indentAmount, indentUnits, ed = this.ed;
+ indentAmount = ed.settings.indentation;
+ indentUnits = /[a-z%]+/i.exec(indentAmount);
+ indentAmount = parseInt(indentAmount, 10);
+ return function(element) {
+ var currentIndent, newIndentAmount;
+ currentIndent = parseInt(ed.dom.getStyle(element, 'margin-left') || 0, 10) + parseInt(ed.dom.getStyle(element, 'padding-left') || 0, 10);
+ if (isIndent) {
+ newIndentAmount = currentIndent + indentAmount;
+ } else {
+ newIndentAmount = currentIndent - indentAmount;
+ }
+ ed.dom.setStyle(element, 'padding-left', '');
+ ed.dom.setStyle(element, 'margin-left', newIndentAmount > 0 ? newIndentAmount + indentUnits : '');
+ };
+ },
+
+ selectedBlocks: function() {
+ var ed = this.ed
+ var selectedBlocks = ed.selection.getSelectedBlocks();
+ return selectedBlocks.length == 0 ? [ ed.dom.getRoot() ] : selectedBlocks;
+ },
+
+ getInfo: function() {
+ return {
+ longname : 'Lists',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/lists',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ }
+ });
+ tinymce.PluginManager.add("lists", tinymce.plugins.Lists);
+}());
diff --git a/program/js/tiny_mce/plugins/media/editor_plugin.js b/program/js/tiny_mce/plugins/media/editor_plugin.js
index 37b4320bd..9ac42e0d2 100644
--- a/program/js/tiny_mce/plugins/media/editor_plugin.js
+++ b/program/js/tiny_mce/plugins/media/editor_plugin.js
@@ -1 +1 @@
-(function(){var d=tinymce.explode("id,name,width,height,style,align,class,hspace,vspace,bgcolor,type"),h=tinymce.makeMap(d.join(",")),b=tinymce.html.Node,f,a,g=tinymce.util.JSON,e;f=[["Flash","d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],["ShockWave","166b1bca-3f9c-11cf-8075-444553540000","application/x-director","http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"],["WindowsMedia","6bf52a52-394a-11d3-b153-00c04f79faa6,22d6f312-b0f6-11d0-94ab-0080c74c7e95,05589fa1-c356-11ce-bf01-00aa0055595a","application/x-mplayer2","http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"],["QuickTime","02bf25d5-8c17-4b23-bc80-d3488abddc6b","video/quicktime","http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"],["RealMedia","cfcdaa03-8be4-11cf-b84b-0020afbbccfa","audio/x-pn-realaudio-plugin","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],["Java","8ad9c840-044e-11d1-b3e9-00805f499d93","application/x-java-applet","http://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0"],["Silverlight","dfeaf541-f3e1-4c24-acac-99c30715084a","application/x-silverlight-2"],["Iframe"],["Video"],["EmbeddedAudio"],["Audio"]];function c(m){var l,j,k;if(m&&!m.splice){j=[];for(k=0;true;k++){if(m[k]){j[k]=m[k]}else{break}}return j}return m}tinymce.create("tinymce.plugins.MediaPlugin",{init:function(n,j){var r=this,l={},m,p,q,k;function o(i){return i&&i.nodeName==="IMG"&&n.dom.hasClass(i,"mceItemMedia")}r.editor=n;r.url=j;a="";for(m=0;m<f.length;m++){k=f[m][0];q={name:k,clsids:tinymce.explode(f[m][1]||""),mimes:tinymce.explode(f[m][2]||""),codebase:f[m][3]};for(p=0;p<q.clsids.length;p++){l["clsid:"+q.clsids[p]]=q}for(p=0;p<q.mimes.length;p++){l[q.mimes[p]]=q}l["mceItem"+k]=q;l[k.toLowerCase()]=q;a+=(a?"|":"")+k}tinymce.each(n.getParam("media_types","video=mp4,m4v,ogv,webm;silverlight=xap;flash=swf,flv;shockwave=dcr;quicktime=mov,qt,mpg,mpeg;shockwave=dcr;windowsmedia=avi,wmv,wm,asf,asx,wmx,wvx;realmedia=rm,ra,ram;java=jar;audio=mp3,ogg").split(";"),function(v){var s,u,t;v=v.split(/=/);u=tinymce.explode(v[1].toLowerCase());for(s=0;s<u.length;s++){t=l[v[0].toLowerCase()];if(t){l[u[s]]=t}}});a=new RegExp("write("+a+")\\(([^)]+)\\)");r.lookup=l;n.onPreInit.add(function(){n.schema.addValidElements("object[id|style|width|height|classid|codebase|*],param[name|value],embed[id|style|width|height|type|src|*],video[*],audio[*],source[*]");n.parser.addNodeFilter("object,embed,video,audio,script,iframe",function(s){var t=s.length;while(t--){r.objectToImg(s[t])}});n.serializer.addNodeFilter("img",function(s,u,t){var v=s.length,w;while(v--){w=s[v];if((w.attr("class")||"").indexOf("mceItemMedia")!==-1){r.imgToObject(w,t)}}})});n.onInit.add(function(){if(n.theme&&n.theme.onResolveName){n.theme.onResolveName.add(function(i,s){if(s.name==="img"&&n.dom.hasClass(s.node,"mceItemMedia")){s.name="media"}})}if(n&&n.plugins.contextmenu){n.plugins.contextmenu.onContextMenu.add(function(s,t,i){if(i.nodeName==="IMG"&&i.className.indexOf("mceItemMedia")!==-1){t.add({title:"media.edit",icon:"media",cmd:"mceMedia"})}})}});n.addCommand("mceMedia",function(){var s,i;i=n.selection.getNode();if(o(i)){s=n.dom.getAttrib(i,"data-mce-json");if(s){s=g.parse(s);tinymce.each(d,function(t){var u=n.dom.getAttrib(i,t);if(u){s[t]=u}});s.type=r.getType(i.className).name.toLowerCase()}}if(!s){s={type:"flash",video:{sources:[]},params:{}}}n.windowManager.open({file:j+"/media.htm",width:430+parseInt(n.getLang("media.delta_width",0)),height:500+parseInt(n.getLang("media.delta_height",0)),inline:1},{plugin_url:j,data:s})});n.addButton("media",{title:"media.desc",cmd:"mceMedia"});n.onNodeChange.add(function(s,i,t){i.setActive("media",o(t))})},convertUrl:function(k,n){var j=this,m=j.editor,l=m.settings,o=l.url_converter,i=l.url_converter_scope||j;if(!k){return k}if(n){return m.documentBaseURI.toAbsolute(k)}return o.call(i,k,"src","object")},getInfo:function(){return{longname:"Media",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media",version:tinymce.majorVersion+"."+tinymce.minorVersion}},dataToImg:function(m,k){var r=this,o=r.editor,p=o.documentBaseURI,j,q,n,l;m.params.src=r.convertUrl(m.params.src,k);q=m.video.attrs;if(q){q.src=r.convertUrl(q.src,k)}if(q){q.poster=r.convertUrl(q.poster,k)}j=c(m.video.sources);if(j){for(l=0;l<j.length;l++){j[l].src=r.convertUrl(j[l].src,k)}}n=r.editor.dom.create("img",{id:m.id,style:m.style,align:m.align,hspace:m.hspace,vspace:m.vspace,src:r.editor.theme.url+"/img/trans.gif","class":"mceItemMedia mceItem"+r.getType(m.type).name,"data-mce-json":g.serialize(m,"'")});n.width=m.width||(m.type=="audio"?"300":"320");n.height=m.height||(m.type=="audio"?"32":"240");return n},dataToHtml:function(i,j){return this.editor.serializer.serialize(this.dataToImg(i,j),{forced_root_block:"",force_absolute:j})},htmlToData:function(k){var j,i,l;l={type:"flash",video:{sources:[]},params:{}};j=this.editor.parser.parse(k);i=j.getAll("img")[0];if(i){l=g.parse(i.attr("data-mce-json"));l.type=this.getType(i.attr("class")).name.toLowerCase();tinymce.each(d,function(m){var n=i.attr(m);if(n){l[m]=n}})}return l},getType:function(m){var k,j,l;j=tinymce.explode(m," ");for(k=0;k<j.length;k++){l=this.lookup[j[k]];if(l){return l}}},imgToObject:function(z,o){var u=this,p=u.editor,C,H,j,t,I,y,G,w,k,E,s,q,A,D,m,x,l,B,F;function r(i,n){var M,L,N,K,J;J=p.getParam("flash_video_player_url",u.convertUrl(u.url+"/moxieplayer.swf"));if(J){M=p.documentBaseURI;G.params.src=J;if(p.getParam("flash_video_player_absvideourl",true)){i=M.toAbsolute(i||"",true);n=M.toAbsolute(n||"",true)}N="";L=p.getParam("flash_video_player_flashvars",{url:"$url",poster:"$poster"});tinymce.each(L,function(P,O){P=P.replace(/\$url/,i||"");P=P.replace(/\$poster/,n||"");if(P.length>0){N+=(N?"&":"")+O+"="+escape(P)}});if(N.length){G.params.flashvars=N}K=p.getParam("flash_video_player_params",{allowfullscreen:true,allowscriptaccess:true});tinymce.each(K,function(P,O){G.params[O]=""+P})}}G=z.attr("data-mce-json");if(!G){return}G=g.parse(G);q=this.getType(z.attr("class"));B=z.attr("data-mce-style");if(!B){B=z.attr("style");if(B){B=p.dom.serializeStyle(p.dom.parseStyle(B,"img"))}}if(q.name==="Iframe"){x=new b("iframe",1);tinymce.each(d,function(i){var n=z.attr(i);if(i=="class"&&n){n=n.replace(/mceItem.+ ?/g,"")}if(n&&n.length>0){x.attr(i,n)}});for(I in G.params){x.attr(I,G.params[I])}x.attr({style:B,src:G.params.src});z.replace(x);return}if(this.editor.settings.media_use_script){x=new b("script",1).attr("type","text/javascript");y=new b("#text",3);y.value="write"+q.name+"("+g.serialize(tinymce.extend(G.params,{width:z.attr("width"),height:z.attr("height")}))+");";x.append(y);z.replace(x);return}if(q.name==="Video"&&G.video.sources[0]){C=new b("video",1).attr(tinymce.extend({id:z.attr("id"),width:z.attr("width"),height:z.attr("height"),style:B},G.video.attrs));if(G.video.attrs){l=G.video.attrs.poster}k=G.video.sources=c(G.video.sources);for(A=0;A<k.length;A++){if(/\.mp4$/.test(k[A].src)){m=k[A].src}}if(!k[0].type){C.attr("src",k[0].src);k.splice(0,1)}for(A=0;A<k.length;A++){w=new b("source",1).attr(k[A]);w.shortEnded=true;C.append(w)}if(m){r(m,l);q=u.getType("flash")}else{G.params.src=""}}if(q.name==="Audio"&&G.video.sources[0]){F=new b("audio",1).attr(tinymce.extend({id:z.attr("id"),width:z.attr("width"),height:z.attr("height"),style:B},G.video.attrs));if(G.video.attrs){l=G.video.attrs.poster}k=G.video.sources=c(G.video.sources);if(!k[0].type){F.attr("src",k[0].src);k.splice(0,1)}for(A=0;A<k.length;A++){w=new b("source",1).attr(k[A]);w.shortEnded=true;F.append(w)}G.params.src=""}if(q.name==="EmbeddedAudio"){j=new b("embed",1);j.shortEnded=true;j.attr({id:z.attr("id"),width:z.attr("width"),height:z.attr("height"),style:B,type:z.attr("type")});for(I in G.params){j.attr(I,G.params[I])}tinymce.each(d,function(i){if(G[i]&&i!="type"){j.attr(i,G[i])}});G.params.src=""}if(G.params.src){if(/\.flv$/i.test(G.params.src)){r(G.params.src,"")}if(o&&o.force_absolute){G.params.src=p.documentBaseURI.toAbsolute(G.params.src)}H=new b("object",1).attr({id:z.attr("id"),width:z.attr("width"),height:z.attr("height"),style:B});tinymce.each(d,function(i){var n=G[i];if(i=="class"&&n){n=n.replace(/mceItem.+ ?/g,"")}if(n&&i!="type"){H.attr(i,n)}});for(I in G.params){s=new b("param",1);s.shortEnded=true;y=G.params[I];if(I==="src"&&q.name==="WindowsMedia"){I="url"}s.attr({name:I,value:y});H.append(s)}if(this.editor.getParam("media_strict",true)){H.attr({data:G.params.src,type:q.mimes[0]})}else{H.attr({classid:"clsid:"+q.clsids[0],codebase:q.codebase});j=new b("embed",1);j.shortEnded=true;j.attr({id:z.attr("id"),width:z.attr("width"),height:z.attr("height"),style:B,type:q.mimes[0]});for(I in G.params){j.attr(I,G.params[I])}tinymce.each(d,function(i){if(G[i]&&i!="type"){j.attr(i,G[i])}});H.append(j)}if(G.object_html){y=new b("#text",3);y.raw=true;y.value=G.object_html;H.append(y)}if(C){C.append(H)}}if(C){if(G.video_html){y=new b("#text",3);y.raw=true;y.value=G.video_html;C.append(y)}}if(F){if(G.video_html){y=new b("#text",3);y.raw=true;y.value=G.video_html;F.append(y)}}var v=C||F||H||j;if(v){z.replace(v)}else{z.remove()}},objectToImg:function(C){var L,k,F,s,M,N,y,A,x,G,E,t,q,I,B,l,K,o,H=this.lookup,m,z,v=this.editor.settings.url_converter,n=this.editor.settings.url_converter_scope,w,r,D,j;function u(i){return new tinymce.html.Serializer({inner:true,validate:false}).serialize(i)}function J(O,i){return H[(O.attr(i)||"").toLowerCase()]}function p(O){var i=O.replace(/^.*\.([^.]+)$/,"$1");return H[i.toLowerCase()||""]}if(!C.parent){return}if(C.name==="script"){if(C.firstChild){m=a.exec(C.firstChild.value)}if(!m){return}o=m[1];K={video:{},params:g.parse(m[2])};A=K.params.width;x=K.params.height}K=K||{video:{},params:{}};M=new b("img",1);M.attr({src:this.editor.theme.url+"/img/trans.gif"});N=C.name;if(N==="video"||N=="audio"){F=C;L=C.getAll("object")[0];k=C.getAll("embed")[0];A=F.attr("width");x=F.attr("height");y=F.attr("id");K.video={attrs:{},sources:[]};z=K.video.attrs;for(N in F.attributes.map){z[N]=F.attributes.map[N]}B=C.attr("src");if(B){K.video.sources.push({src:v.call(n,B,"src",C.name)})}l=F.getAll("source");for(E=0;E<l.length;E++){B=l[E].remove();K.video.sources.push({src:v.call(n,B.attr("src"),"src","source"),type:B.attr("type"),media:B.attr("media")})}if(z.poster){z.poster=v.call(n,z.poster,"poster",C.name)}}if(C.name==="object"){L=C;k=C.getAll("embed")[0]}if(C.name==="embed"){k=C}if(C.name==="iframe"){s=C;o="Iframe"}if(L){A=A||L.attr("width");x=x||L.attr("height");G=G||L.attr("style");y=y||L.attr("id");w=w||L.attr("hspace");r=r||L.attr("vspace");D=D||L.attr("align");j=j||L.attr("bgcolor");K.name=L.attr("name");I=L.getAll("param");for(E=0;E<I.length;E++){q=I[E];N=q.remove().attr("name");if(!h[N]){K.params[N]=q.attr("value")}}K.params.src=K.params.src||L.attr("data")}if(k){A=A||k.attr("width");x=x||k.attr("height");G=G||k.attr("style");y=y||k.attr("id");w=w||k.attr("hspace");r=r||k.attr("vspace");D=D||k.attr("align");j=j||k.attr("bgcolor");for(N in k.attributes.map){if(!h[N]&&!K.params[N]){K.params[N]=k.attributes.map[N]}}}if(s){A=s.attr("width");x=s.attr("height");G=G||s.attr("style");y=s.attr("id");w=s.attr("hspace");r=s.attr("vspace");D=s.attr("align");j=s.attr("bgcolor");tinymce.each(d,function(i){M.attr(i,s.attr(i))});for(N in s.attributes.map){if(!h[N]&&!K.params[N]){K.params[N]=s.attributes.map[N]}}}if(K.params.movie){K.params.src=K.params.src||K.params.movie;delete K.params.movie}if(K.params.src){K.params.src=v.call(n,K.params.src,"src","object")}if(F){if(C.name==="video"){o=H.video.name}else{if(C.name==="audio"){o=H.audio.name}}}if(L&&!o){o=(J(L,"clsid")||J(L,"classid")||J(L,"type")||{}).name}if(k&&!o){o=(J(k,"type")||p(K.params.src)||{}).name}if(k&&o=="EmbeddedAudio"){K.params.type=k.attr("type")}C.replace(M);if(k){k.remove()}if(L){t=u(L.remove());if(t){K.object_html=t}}if(F){t=u(F.remove());if(t){K.video_html=t}}K.hspace=w;K.vspace=r;K.align=D;K.bgcolor=j;M.attr({id:y,"class":"mceItemMedia mceItem"+(o||"Flash"),style:G,width:A||(C.name=="audio"?"300":"320"),height:x||(C.name=="audio"?"32":"240"),hspace:w,vspace:r,align:D,bgcolor:j,"data-mce-json":g.serialize(K,"'")})}});tinymce.PluginManager.add("media",tinymce.plugins.MediaPlugin)})(); \ No newline at end of file
+(function(){var b=tinymce.explode("id,name,width,height,style,align,class,hspace,vspace,bgcolor,type"),a=tinymce.makeMap(b.join(",")),f=tinymce.html.Node,d,i,h=tinymce.util.JSON,g;d=[["Flash","d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],["ShockWave","166b1bca-3f9c-11cf-8075-444553540000","application/x-director","http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"],["WindowsMedia","6bf52a52-394a-11d3-b153-00c04f79faa6,22d6f312-b0f6-11d0-94ab-0080c74c7e95,05589fa1-c356-11ce-bf01-00aa0055595a","application/x-mplayer2","http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"],["QuickTime","02bf25d5-8c17-4b23-bc80-d3488abddc6b","video/quicktime","http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"],["RealMedia","cfcdaa03-8be4-11cf-b84b-0020afbbccfa","audio/x-pn-realaudio-plugin","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],["Java","8ad9c840-044e-11d1-b3e9-00805f499d93","application/x-java-applet","http://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0"],["Silverlight","dfeaf541-f3e1-4c24-acac-99c30715084a","application/x-silverlight-2"],["Iframe"],["Video"],["EmbeddedAudio"],["Audio"]];function e(j){return typeof(j)=="string"?j.replace(/[^0-9%]/g,""):j}function c(m){var l,j,k;if(m&&!m.splice){j=[];for(k=0;true;k++){if(m[k]){j[k]=m[k]}else{break}}return j}return m}tinymce.create("tinymce.plugins.MediaPlugin",{init:function(n,j){var r=this,l={},m,p,q,k;function o(s){return s&&s.nodeName==="IMG"&&n.dom.hasClass(s,"mceItemMedia")}r.editor=n;r.url=j;i="";for(m=0;m<d.length;m++){k=d[m][0];q={name:k,clsids:tinymce.explode(d[m][1]||""),mimes:tinymce.explode(d[m][2]||""),codebase:d[m][3]};for(p=0;p<q.clsids.length;p++){l["clsid:"+q.clsids[p]]=q}for(p=0;p<q.mimes.length;p++){l[q.mimes[p]]=q}l["mceItem"+k]=q;l[k.toLowerCase()]=q;i+=(i?"|":"")+k}tinymce.each(n.getParam("media_types","video=mp4,m4v,ogv,webm;silverlight=xap;flash=swf,flv;shockwave=dcr;quicktime=mov,qt,mpg,mpeg;shockwave=dcr;windowsmedia=avi,wmv,wm,asf,asx,wmx,wvx;realmedia=rm,ra,ram;java=jar;audio=mp3,ogg").split(";"),function(v){var s,u,t;v=v.split(/=/);u=tinymce.explode(v[1].toLowerCase());for(s=0;s<u.length;s++){t=l[v[0].toLowerCase()];if(t){l[u[s]]=t}}});i=new RegExp("write("+i+")\\(([^)]+)\\)");r.lookup=l;n.onPreInit.add(function(){n.schema.addValidElements("object[id|style|width|height|classid|codebase|*],param[name|value],embed[id|style|width|height|type|src|*],video[*],audio[*],source[*]");n.parser.addNodeFilter("object,embed,video,audio,script,iframe",function(s){var t=s.length;while(t--){r.objectToImg(s[t])}});n.serializer.addNodeFilter("img",function(s,u,t){var v=s.length,w;while(v--){w=s[v];if((w.attr("class")||"").indexOf("mceItemMedia")!==-1){r.imgToObject(w,t)}}})});n.onInit.add(function(){if(n.theme&&n.theme.onResolveName){n.theme.onResolveName.add(function(s,t){if(t.name==="img"&&n.dom.hasClass(t.node,"mceItemMedia")){t.name="media"}})}if(n&&n.plugins.contextmenu){n.plugins.contextmenu.onContextMenu.add(function(t,u,s){if(s.nodeName==="IMG"&&s.className.indexOf("mceItemMedia")!==-1){u.add({title:"media.edit",icon:"media",cmd:"mceMedia"})}})}});n.addCommand("mceMedia",function(){var t,s;s=n.selection.getNode();if(o(s)){t=n.dom.getAttrib(s,"data-mce-json");if(t){t=h.parse(t);tinymce.each(b,function(u){var v=n.dom.getAttrib(s,u);if(v){t[u]=v}});t.type=r.getType(s.className).name.toLowerCase()}}if(!t){t={type:"flash",video:{sources:[]},params:{}}}n.windowManager.open({file:j+"/media.htm",width:430+parseInt(n.getLang("media.delta_width",0)),height:500+parseInt(n.getLang("media.delta_height",0)),inline:1},{plugin_url:j,data:t})});n.addButton("media",{title:"media.desc",cmd:"mceMedia"});n.onNodeChange.add(function(t,s,u){s.setActive("media",o(u))})},convertUrl:function(l,o){var k=this,n=k.editor,m=n.settings,p=m.url_converter,j=m.url_converter_scope||k;if(!l){return l}if(o){return n.documentBaseURI.toAbsolute(l)}return p.call(j,l,"src","object")},getInfo:function(){return{longname:"Media",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media",version:tinymce.majorVersion+"."+tinymce.minorVersion}},dataToImg:function(m,k){var r=this,o=r.editor,p=o.documentBaseURI,j,q,n,l;m.params.src=r.convertUrl(m.params.src,k);q=m.video.attrs;if(q){q.src=r.convertUrl(q.src,k)}if(q){q.poster=r.convertUrl(q.poster,k)}j=c(m.video.sources);if(j){for(l=0;l<j.length;l++){j[l].src=r.convertUrl(j[l].src,k)}}n=r.editor.dom.create("img",{id:m.id,style:m.style,align:m.align,hspace:m.hspace,vspace:m.vspace,src:r.editor.theme.url+"/img/trans.gif","class":"mceItemMedia mceItem"+r.getType(m.type).name,"data-mce-json":h.serialize(m,"'")});n.width=m.width=e(m.width||(m.type=="audio"?"300":"320"));n.height=m.height=e(m.height||(m.type=="audio"?"32":"240"));return n},dataToHtml:function(j,k){return this.editor.serializer.serialize(this.dataToImg(j,k),{forced_root_block:"",force_absolute:k})},htmlToData:function(l){var k,j,m;m={type:"flash",video:{sources:[]},params:{}};k=this.editor.parser.parse(l);j=k.getAll("img")[0];if(j){m=h.parse(j.attr("data-mce-json"));m.type=this.getType(j.attr("class")).name.toLowerCase();tinymce.each(b,function(n){var o=j.attr(n);if(o){m[n]=o}})}return m},getType:function(m){var k,j,l;j=tinymce.explode(m," ");for(k=0;k<j.length;k++){l=this.lookup[j[k]];if(l){return l}}},imgToObject:function(z,o){var u=this,p=u.editor,C,H,j,t,I,y,G,w,k,E,s,q,A,D,m,x,l,B,F;function r(n,J){var N,M,O,L,K;K=p.getParam("flash_video_player_url",u.convertUrl(u.url+"/moxieplayer.swf"));if(K){N=p.documentBaseURI;G.params.src=K;if(p.getParam("flash_video_player_absvideourl",true)){n=N.toAbsolute(n||"",true);J=N.toAbsolute(J||"",true)}O="";M=p.getParam("flash_video_player_flashvars",{url:"$url",poster:"$poster"});tinymce.each(M,function(Q,P){Q=Q.replace(/\$url/,n||"");Q=Q.replace(/\$poster/,J||"");if(Q.length>0){O+=(O?"&":"")+P+"="+escape(Q)}});if(O.length){G.params.flashvars=O}L=p.getParam("flash_video_player_params",{allowfullscreen:true,allowscriptaccess:true});tinymce.each(L,function(Q,P){G.params[P]=""+Q})}}G=z.attr("data-mce-json");if(!G){return}G=h.parse(G);q=this.getType(z.attr("class"));B=z.attr("data-mce-style");if(!B){B=z.attr("style");if(B){B=p.dom.serializeStyle(p.dom.parseStyle(B,"img"))}}G.width=z.attr("width")||G.width;G.height=z.attr("height")||G.height;if(q.name==="Iframe"){x=new f("iframe",1);tinymce.each(b,function(n){var J=z.attr(n);if(n=="class"&&J){J=J.replace(/mceItem.+ ?/g,"")}if(J&&J.length>0){x.attr(n,J)}});for(I in G.params){x.attr(I,G.params[I])}x.attr({style:B,src:G.params.src});z.replace(x);return}if(this.editor.settings.media_use_script){x=new f("script",1).attr("type","text/javascript");y=new f("#text",3);y.value="write"+q.name+"("+h.serialize(tinymce.extend(G.params,{width:z.attr("width"),height:z.attr("height")}))+");";x.append(y);z.replace(x);return}if(q.name==="Video"&&G.video.sources[0]){C=new f("video",1).attr(tinymce.extend({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B},G.video.attrs));if(G.video.attrs){l=G.video.attrs.poster}k=G.video.sources=c(G.video.sources);for(A=0;A<k.length;A++){if(/\.mp4$/.test(k[A].src)){m=k[A].src}}if(!k[0].type){C.attr("src",k[0].src);k.splice(0,1)}for(A=0;A<k.length;A++){w=new f("source",1).attr(k[A]);w.shortEnded=true;C.append(w)}if(m){r(m,l);q=u.getType("flash")}else{G.params.src=""}}if(q.name==="Audio"&&G.video.sources[0]){F=new f("audio",1).attr(tinymce.extend({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B},G.video.attrs));if(G.video.attrs){l=G.video.attrs.poster}k=G.video.sources=c(G.video.sources);if(!k[0].type){F.attr("src",k[0].src);k.splice(0,1)}for(A=0;A<k.length;A++){w=new f("source",1).attr(k[A]);w.shortEnded=true;F.append(w)}G.params.src=""}if(q.name==="EmbeddedAudio"){j=new f("embed",1);j.shortEnded=true;j.attr({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B,type:z.attr("type")});for(I in G.params){j.attr(I,G.params[I])}tinymce.each(b,function(n){if(G[n]&&n!="type"){j.attr(n,G[n])}});G.params.src=""}if(G.params.src){if(/\.flv$/i.test(G.params.src)){r(G.params.src,"")}if(o&&o.force_absolute){G.params.src=p.documentBaseURI.toAbsolute(G.params.src)}H=new f("object",1).attr({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B});tinymce.each(b,function(n){var J=G[n];if(n=="class"&&J){J=J.replace(/mceItem.+ ?/g,"")}if(J&&n!="type"){H.attr(n,J)}});for(I in G.params){s=new f("param",1);s.shortEnded=true;y=G.params[I];if(I==="src"&&q.name==="WindowsMedia"){I="url"}s.attr({name:I,value:y});H.append(s)}if(this.editor.getParam("media_strict",true)){H.attr({data:G.params.src,type:q.mimes[0]})}else{H.attr({classid:"clsid:"+q.clsids[0],codebase:q.codebase});j=new f("embed",1);j.shortEnded=true;j.attr({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B,type:q.mimes[0]});for(I in G.params){j.attr(I,G.params[I])}tinymce.each(b,function(n){if(G[n]&&n!="type"){j.attr(n,G[n])}});H.append(j)}if(G.object_html){y=new f("#text",3);y.raw=true;y.value=G.object_html;H.append(y)}if(C){C.append(H)}}if(C){if(G.video_html){y=new f("#text",3);y.raw=true;y.value=G.video_html;C.append(y)}}if(F){if(G.video_html){y=new f("#text",3);y.raw=true;y.value=G.video_html;F.append(y)}}var v=C||F||H||j;if(v){z.replace(v)}else{z.remove()}},objectToImg:function(C){var L,k,F,s,M,N,y,A,x,G,E,t,q,I,B,l,K,o,H=this.lookup,m,z,v=this.editor.settings.url_converter,n=this.editor.settings.url_converter_scope,w,r,D,j;function u(O){return new tinymce.html.Serializer({inner:true,validate:false}).serialize(O)}function J(P,O){return H[(P.attr(O)||"").toLowerCase()]}function p(P){var O=P.replace(/^.*\.([^.]+)$/,"$1");return H[O.toLowerCase()||""]}if(!C.parent){return}if(C.name==="script"){if(C.firstChild){m=i.exec(C.firstChild.value)}if(!m){return}o=m[1];K={video:{},params:h.parse(m[2])};A=K.params.width;x=K.params.height}K=K||{video:{},params:{}};M=new f("img",1);M.attr({src:this.editor.theme.url+"/img/trans.gif"});N=C.name;if(N==="video"||N=="audio"){F=C;L=C.getAll("object")[0];k=C.getAll("embed")[0];A=F.attr("width");x=F.attr("height");y=F.attr("id");K.video={attrs:{},sources:[]};z=K.video.attrs;for(N in F.attributes.map){z[N]=F.attributes.map[N]}B=C.attr("src");if(B){K.video.sources.push({src:v.call(n,B,"src",C.name)})}l=F.getAll("source");for(E=0;E<l.length;E++){B=l[E].remove();K.video.sources.push({src:v.call(n,B.attr("src"),"src","source"),type:B.attr("type"),media:B.attr("media")})}if(z.poster){z.poster=v.call(n,z.poster,"poster",C.name)}}if(C.name==="object"){L=C;k=C.getAll("embed")[0]}if(C.name==="embed"){k=C}if(C.name==="iframe"){s=C;o="Iframe"}if(L){A=A||L.attr("width");x=x||L.attr("height");G=G||L.attr("style");y=y||L.attr("id");w=w||L.attr("hspace");r=r||L.attr("vspace");D=D||L.attr("align");j=j||L.attr("bgcolor");K.name=L.attr("name");I=L.getAll("param");for(E=0;E<I.length;E++){q=I[E];N=q.remove().attr("name");if(!a[N]){K.params[N]=q.attr("value")}}K.params.src=K.params.src||L.attr("data")}if(k){A=A||k.attr("width");x=x||k.attr("height");G=G||k.attr("style");y=y||k.attr("id");w=w||k.attr("hspace");r=r||k.attr("vspace");D=D||k.attr("align");j=j||k.attr("bgcolor");for(N in k.attributes.map){if(!a[N]&&!K.params[N]){K.params[N]=k.attributes.map[N]}}}if(s){A=e(s.attr("width"));x=e(s.attr("height"));G=G||s.attr("style");y=s.attr("id");w=s.attr("hspace");r=s.attr("vspace");D=s.attr("align");j=s.attr("bgcolor");tinymce.each(b,function(O){M.attr(O,s.attr(O))});for(N in s.attributes.map){if(!a[N]&&!K.params[N]){K.params[N]=s.attributes.map[N]}}}if(K.params.movie){K.params.src=K.params.src||K.params.movie;delete K.params.movie}if(K.params.src){K.params.src=v.call(n,K.params.src,"src","object")}if(F){if(C.name==="video"){o=H.video.name}else{if(C.name==="audio"){o=H.audio.name}}}if(L&&!o){o=(J(L,"clsid")||J(L,"classid")||J(L,"type")||{}).name}if(k&&!o){o=(J(k,"type")||p(K.params.src)||{}).name}if(k&&o=="EmbeddedAudio"){K.params.type=k.attr("type")}C.replace(M);if(k){k.remove()}if(L){t=u(L.remove());if(t){K.object_html=t}}if(F){t=u(F.remove());if(t){K.video_html=t}}K.hspace=w;K.vspace=r;K.align=D;K.bgcolor=j;M.attr({id:y,"class":"mceItemMedia mceItem"+(o||"Flash"),style:G,width:A||(C.name=="audio"?"300":"320"),height:x||(C.name=="audio"?"32":"240"),hspace:w,vspace:r,align:D,bgcolor:j,"data-mce-json":h.serialize(K,"'")})}});tinymce.PluginManager.add("media",tinymce.plugins.MediaPlugin)})(); \ No newline at end of file
diff --git a/program/js/tiny_mce/plugins/media/editor_plugin_src.js b/program/js/tiny_mce/plugins/media/editor_plugin_src.js
index ea79db18a..aee92360b 100644
--- a/program/js/tiny_mce/plugins/media/editor_plugin_src.js
+++ b/program/js/tiny_mce/plugins/media/editor_plugin_src.js
@@ -28,6 +28,10 @@
["Audio"]
];
+ function normalizeSize(size) {
+ return typeof(size) == "string" ? size.replace(/[^0-9%]/g, '') : size;
+ }
+
function toArray(obj) {
var undef, out, i;
@@ -258,8 +262,8 @@
'data-mce-json' : JSON.serialize(data, "'")
});
- img.width = data.width || (data.type == 'audio' ? "300" : "320");
- img.height = data.height || (data.type == 'audio' ? "32" : "240");
+ img.width = data.width = normalizeSize(data.width || (data.type == 'audio' ? "300" : "320"));
+ img.height = data.height = normalizeSize(data.height || (data.type == 'audio' ? "32" : "240"));
return img;
},
@@ -386,6 +390,10 @@
style = editor.dom.serializeStyle(editor.dom.parseStyle(style, 'img'));
}
+ // Use node width/height to override the data width/height when the placeholder is resized
+ data.width = node.attr('width') || data.width;
+ data.height = node.attr('height') || data.height;
+
// Handle iframe
if (typeItem.name === 'Iframe') {
replacement = new Node('iframe', 1);
@@ -434,8 +442,8 @@
// Create new object element
video = new Node('video', 1).attr(tinymce.extend({
id : node.attr('id'),
- width: node.attr('width'),
- height: node.attr('height'),
+ width: normalizeSize(node.attr('width')),
+ height: normalizeSize(node.attr('height')),
style : style
}, data.video.attrs));
@@ -473,8 +481,8 @@
// Create new object element
audio = new Node('audio', 1).attr(tinymce.extend({
id : node.attr('id'),
- width: node.attr('width'),
- height: node.attr('height'),
+ width: normalizeSize(node.attr('width')),
+ height: normalizeSize(node.attr('height')),
style : style
}, data.video.attrs));
@@ -502,8 +510,8 @@
embed.shortEnded = true;
embed.attr({
id: node.attr('id'),
- width: node.attr('width'),
- height: node.attr('height'),
+ width: normalizeSize(node.attr('width')),
+ height: normalizeSize(node.attr('height')),
style : style,
type: node.attr('type')
});
@@ -531,8 +539,8 @@
// Create new object element
object = new Node('object', 1).attr({
id : node.attr('id'),
- width: node.attr('width'),
- height: node.attr('height'),
+ width: normalizeSize(node.attr('width')),
+ height: normalizeSize(node.attr('height')),
style : style
});
@@ -576,8 +584,8 @@
embed.shortEnded = true;
embed.attr({
id: node.attr('id'),
- width: node.attr('width'),
- height: node.attr('height'),
+ width: normalizeSize(node.attr('width')),
+ height: normalizeSize(node.attr('height')),
style : style,
type: typeItem.mimes[0]
});
@@ -793,8 +801,8 @@
if (iframe) {
// Get width/height
- width = iframe.attr('width');
- height = iframe.attr('height');
+ width = normalizeSize(iframe.attr('width'));
+ height = normalizeSize(iframe.attr('height'));
style = style || iframe.attr('style');
id = iframe.attr('id');
hspace = iframe.attr('hspace');
diff --git a/program/js/tiny_mce/plugins/media/langs/en_dlg.js b/program/js/tiny_mce/plugins/media/langs/en_dlg.js
index d0aaa1396..b247f85cd 100644
--- a/program/js/tiny_mce/plugins/media/langs/en_dlg.js
+++ b/program/js/tiny_mce/plugins/media/langs/en_dlg.js
@@ -1 +1 @@
-tinyMCE.addI18n('en.media_dlg',{list:"List",file:"File/URL",advanced:"Advanced",general:"General",title:"Insert/Edit Embedded Media","align_top_left":"Top Left","align_center":"Center","align_left":"Left","align_bottom":"Bottom","align_right":"Right","align_top":"Top","qt_stream_warn":"Streamed RTSP resources should be added to the QT Source field under the Advanced tab.\nYou should also add a non-streamed version to the Source field.",qtsrc:"QT Source",progress:"Progress",sound:"Sound",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch Style",scriptcallbacks:"Script Callbacks","align_top_right":"Top Right",uimode:"UI Mode",rate:"Rate",playcount:"Play Count",defaultframe:"Default Frame",currentposition:"Current Position",currentmarker:"Current Marker",captioningid:"Captioning ID",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless Video",stretchtofit:"Stretch to Fit",mute:"Mute",invokeurls:"Invoke URLs",fullscreen:"Full Screen",enabled:"Enabled",autostart:"Auto Start",volume:"Volume",target:"Target",qtsrcchokespeed:"Choke Speed",href:"HREF",endtime:"End Time",starttime:"Start Time",enablejavascript:"Enable JavaScript",correction:"No Correction",targetcache:"Target Cache",playeveryframe:"Play Every Frame",kioskmode:"Kiosk Mode",controller:"Controller",menu:"Show Menu",loop:"Loop",play:"Auto Play",hspace:"H-Space",vspace:"V-Space","class_name":"Class",name:"Name",id:"ID",type:"Type",size:"Dimensions",preview:"Preview","constrain_proportions":"Constrain Proportions",controls:"Controls",numloop:"Num Loops",console:"Console",cache:"Cache",autohref:"Auto HREF",liveconnect:"SWLiveConnect",flashvars:"Flash Vars",base:"Base",bgcolor:"Background",wmode:"WMode",salign:"SAlign",align:"Align",scale:"Scale",quality:"Quality",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No Java",maintainaspect:"Maintain Aspect",imagestatus:"Image Status",center:"Center",autogotourl:"Auto Goto URL","shockwave_options":"Shockwave Options","rmp_options":"Real Media Player Options","wmp_options":"Windows Media Player Options","qt_options":"QuickTime Options","flash_options":"Flash Options",hidden:"Hidden","align_bottom_left":"Bottom Left","align_bottom_right":"Bottom Right","embedded_audio_options":"Embedded Audio Options","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide",flash:"",quicktime:"",windowsmedia:"",realmedia:"",shockwave:"",audio:"",video:"",iframe:"",embeddedaudio:""}); \ No newline at end of file
+tinyMCE.addI18n('en.media_dlg',{list:"List",file:"File/URL",advanced:"Advanced",general:"General",title:"Insert/Edit Embedded Media","align_top_left":"Top Left","align_center":"Center","align_left":"Left","align_bottom":"Bottom","align_right":"Right","align_top":"Top","qt_stream_warn":"Streamed RTSP resources should be added to the QT Source field under the Advanced tab.\nYou should also add a non-streamed version to the Source field.",qtsrc:"QT Source",progress:"Progress",sound:"Sound",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch Style",scriptcallbacks:"Script Callbacks","align_top_right":"Top Right",uimode:"UI Mode",rate:"Rate",playcount:"Play Count",defaultframe:"Default Frame",currentposition:"Current Position",currentmarker:"Current Marker",captioningid:"Captioning ID",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless Video",stretchtofit:"Stretch to Fit",mute:"Mute",invokeurls:"Invoke URLs",fullscreen:"Full Screen",enabled:"Enabled",autostart:"Auto Start",volume:"Volume",target:"Target",qtsrcchokespeed:"Choke Speed",href:"HREF",endtime:"End Time",starttime:"Start Time",enablejavascript:"Enable JavaScript",correction:"No Correction",targetcache:"Target Cache",playeveryframe:"Play Every Frame",kioskmode:"Kiosk Mode",controller:"Controller",menu:"Show Menu",loop:"Loop",play:"Auto Play",hspace:"H-Space",vspace:"V-Space","class_name":"Class",name:"Name",id:"ID",type:"Type",size:"Dimensions",preview:"Preview","constrain_proportions":"Constrain Proportions",controls:"Controls",numloop:"Num Loops",console:"Console",cache:"Cache",autohref:"Auto HREF",liveconnect:"SWLiveConnect",flashvars:"Flash Vars",base:"Base",bgcolor:"Background",wmode:"WMode",salign:"SAlign",align:"Align",scale:"Scale",quality:"Quality",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No Java",maintainaspect:"Maintain Aspect",imagestatus:"Image Status",center:"Center",autogotourl:"Auto Goto URL","shockwave_options":"Shockwave Options","rmp_options":"Real Media Player Options","wmp_options":"Windows Media Player Options","qt_options":"QuickTime Options","flash_options":"Flash Options",hidden:"Hidden","align_bottom_left":"Bottom Left","align_bottom_right":"Bottom Right",flash:"",quicktime:"","embedded_audio_options":"Embedded Audio Options",windowsmedia:"",realmedia:"",shockwave:"",audio:"",video:"","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide",iframe:"",embeddedaudio:""}); \ No newline at end of file
diff --git a/program/js/tiny_mce/plugins/media/langs/uk_dlg.js b/program/js/tiny_mce/plugins/media/langs/uk_dlg.js
index 6c3b60c01..6f7a4b43f 100644
--- a/program/js/tiny_mce/plugins/media/langs/uk_dlg.js
+++ b/program/js/tiny_mce/plugins/media/langs/uk_dlg.js
@@ -1 +1 @@
-tinyMCE.addI18n('uk.media_dlg',{list:"\u0421\u043f\u0438\u0441\u043e\u043a",file:"\u0424\u0430\u0439\u043b/URL",advanced:"\u0414\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u043e",general:"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435",title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 / \u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u0432\u0431\u0443\u0434\u043e\u0432\u0430\u043d\u0456 \u043c\u0435\u0434\u0456\u0430","align_top_left":"\u0417\u0432\u0435\u0440\u0445\u0443 \u0437\u043b\u0456\u0432\u0430","align_center":"\u0426\u0435\u043d\u0442\u0440","align_left":"\u041b\u0456\u0432\u043e","align_bottom":"\u041d\u0438\u0437","align_right":"\u041f\u0440\u0430\u0432\u043e","align_top":"\u0412\u0435\u0440\u0445","qt_stream_warn":"Streamed rtsp resources should be added to the QT Src field under the advanced tab.\nYou should also add a non streamed version to the Src field..",qtsrc:"\u0414\u0436\u0435\u0440\u0435\u043b\u043e QT",progress:"\u0425\u0456\u0434",sound:"\u0417\u0432\u0443\u043a",swstretchvalign:"\u0420\u043e\u0437\u0442\u044f\u0433\u043d\u0443\u0442\u0438 \u0432\u0435\u0440\u0442. \u0432\u0438\u0440\u0456\u0432\u043d\u044e\u0430\u043d\u043d\u044f",swstretchhalign:"\u0420\u043e\u0437\u0442\u044f\u0433\u043d\u0443\u0442\u0438 \u0433\u043e\u0440\u0438\u0437. \u0432\u0438\u0440\u0456\u0432\u043d\u044e\u0430\u043d\u043d\u044f",swstretchstyle:"\u0420\u043e\u0437\u0442\u044f\u0433\u043d\u0443\u0442\u0438\u0439 \u0441\u0442\u0438\u043b\u044c",scriptcallbacks:"\u0417\u0432\u043e\u0440\u043e\u0442\u043d\u0456\u0439 \u0432\u0438\u043a\u043b\u0438\u043a \u0441\u0446\u0435\u043d\u0430\u0440\u0456\u044e","align_top_right":"\u0417\u0432\u0435\u0440\u0445\u0443 \u0437\u043f\u0440\u0430\u0432\u0430",uimode:"\u0420\u0435\u0436\u0438\u043c \u0456\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443",rate:"\u0428\u0432\u0438\u0434\u043a\u0456\u0441\u0442\u044c",playcount:"\u041a\u0456\u043b\u044c\u043a\u0456\u0441\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u0432\u0430\u043d\u044c",defaultframe:"\u041a\u0430\u0434\u0440 \u0437\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0430\u043d\u043d\u044f\u043c",currentposition:"\u041f\u043e\u0442\u043e\u0447\u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0456\u044f",currentmarker:"\u041f\u043e\u0442\u043e\u0447\u043d\u0438\u0439 \u043c\u0430\u0440\u043a\u0435\u0440",captioningid:"\u0406\u0434\u0435\u043d\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u043e\u0440 \u043d\u0430\u0434\u043f\u0438\u0441\u0443",baseurl:"\u041e\u0441\u043d\u043e\u0432\u043d\u0435 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f",balance:"\u0411\u0430\u043b\u0430\u043d\u0441",windowlessvideo:"Windowless video",stretchtofit:"\u0417\u043c\u0435\u043d\u0448\u0438\u0442\u0438, \u0449\u043e\u0431 \u0432\u043c\u0456\u0441\u0442\u0438\u043b\u043e\u0441\u044c",mute:"\u0417\u0430\u0433\u043b\u0443\u0448\u0438\u0442\u0438",invokeurls:"\u0412\u0438\u043a\u043b\u0438\u043a\u0430\u0442\u0438 URLs",fullscreen:"\u041f\u043e\u0432\u043d\u0438\u0439 \u0435\u043a\u0440\u0430\u043d",enabled:"\u0414\u043e\u0437\u0432\u043e\u043b\u0435\u043d\u0438\u0439",autostart:"\u0410\u0432\u0442\u043e\u0441\u0442\u0430\u0440\u0442",volume:"\u0413\u0443\u0447\u043d\u0456\u0441\u0442\u044c",target:"\u0426\u0456\u043b\u044c",qtsrcchokespeed:"\u0428\u0432\u0438\u0434\u043a\u0456\u0441\u0442\u044c \u0437\u0430\u0433\u0430\u0441\u0430\u043d\u043d\u044f",href:"\u041f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f",endtime:"\u0427\u0430\u0441 \u043a\u0456\u043d\u0446\u044f",starttime:"\u0427\u0430\u0441 \u043f\u043e\u0447\u0430\u0442\u043a\u0443",enablejavascript:"\u0414\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u0438 JavaScript",correction:"\u0411\u0435\u0437 \u043a\u043e\u0440\u0435\u043a\u0446\u0456\u0457",targetcache:"\u0426\u0456\u043b\u044c\u043e\u0432\u0438\u0439 \u043a\u0435\u0448",playeveryframe:"\u041f\u0440\u043e\u0433\u0440\u0430\u0432\u0430\u0442\u0438 \u043a\u043e\u0436\u0435\u043d \u043a\u0430\u0434\u0440",kioskmode:"\u041f\u043e\u0432\u043d\u043e\u0435\u043a\u0440\u0430\u043d\u043d\u0438\u0439 \u0440\u0435\u0436\u0438\u043c",controller:"\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440",menu:"\u041f\u043e\u043a\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u043c\u0435\u043d\u044e",loop:"\u041f\u043e\u0432\u0442\u043e\u0440\u044e\u0432\u0430\u0442\u0438",play:"\u0410\u0432\u0442\u043e\u043f\u0440\u043e\u0433\u0440\u0430\u0432\u043d\u043d\u044f",hspace:"\u0433\u043e\u0440.\u0432\u0456\u0434\u0441\u0442\u0443\u043f",vspace:"\u0432\u0435\u0440\u0442.\u0432\u0456\u0434\u0441\u0442\u0443\u043f","class_name":"\u041a\u043b\u0430\u0441",name:"\u041d\u0430\u0437\u0432\u0430",id:"\u0406\u0434\u0435\u043d\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u043e\u0440",type:"\u0422\u0438\u043f",size:"\u0420\u043e\u0437\u043c\u0456\u0440\u0438",preview:"\u041f\u0435\u0440\u0435\u0433\u043b\u044f\u0434","constrain_proportions":"\u0417\u0431\u0435\u0440\u0456\u0433\u0430\u0442\u0438 \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0456\u0457",controls:"\u041a\u0435\u0440\u0443\u0432\u0430\u043d\u043d\u044f",numloop:"\u041a\u0456\u043b\u044c\u043a\u0456\u0441\u0442\u044c \u0446\u0438\u043a\u043b\u0456\u0432",console:"\u041a\u043e\u043d\u0441\u043e\u043b\u044c",cache:"\u041a\u0435\u0448",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flash-\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438",base:"\u0411\u0430\u0437\u0430",bgcolor:"\u0424\u043e\u043d",wmode:"W-\u0440\u0435\u0436\u0438\u043c",salign:"S-\u0412\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f",align:"\u0412\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f",scale:"\u041c\u0430\u0441\u0448\u0442\u0430\u0431\u0443\u0432\u0430\u043d\u043d\u044f",quality:"\u042f\u043a\u0456\u0441\u0442\u044c",shuffle:"\u041f\u0435\u0440\u0435\u0442\u0430\u0441\u0443\u0432\u0430\u0442\u0438",prefetch:"\u041f\u043e\u043f\u0435\u0440\u0435\u0434\u043d\u0454 \u0432\u0438\u043b\u0443\u0447\u0435\u043d\u043d\u044f",nojava:"\u0411\u0435\u0437 Java",maintainaspect:"\u0412\u0434\u0435\u0440\u0436\u0443\u0432\u0430\u0442\u0438 \u0440\u0430\u043a\u0443\u0440\u0441",imagestatus:"\u0421\u0442\u0430\u0442\u0443\u0441 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f",center:"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443",autogotourl:"\u041f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u0430\u0432\u0442\u043e\u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0443","shockwave_options":"\u041e\u043f\u0446\u0456\u0457 Shockwave","rmp_options":"\u041e\u043f\u0446\u0456\u0457 Real media player","wmp_options":"\u041e\u043f\u0446\u0456\u0457 Windows media player","qt_options":"\u041e\u043f\u0446\u0456\u0457 Quicktime","flash_options":"\u041e\u043f\u0446\u0456\u0457 Flash",hidden:"\u041f\u0440\u0438\u0445\u043e\u0432\u0430\u043d\u0438\u0439","align_bottom_left":"\u0417\u043d\u0438\u0437\u0443 \u0437\u043b\u0456\u0432\u0430","align_bottom_right":"\u0417\u043d\u0438\u0437\u0443 \u0437\u043f\u0440\u0430\u0432\u0430",flash:"flash",quicktime:"quicktime",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"\u0412\u0456\u0434\u0435\u043e \u043e\u043f\u0446\u0456\u0457 HTML5",altsource1:"\u0410\u043b\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u0435 \u0434\u0436\u0435\u0440\u0435\u043b\u043e 1",altsource2:"\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u0435 \u0434\u0436\u0435\u0440\u0435\u043b\u043e 2",preload:"\u041f\u043e\u043f\u0435\u0440\u0435\u0434\u043d\u0454 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043d\u044f",source:"\u0414\u0436\u0435\u0440\u0435\u043b\u043e","html5_audio_options":"\u0410\u0443\u0434\u0456\u043e \u043e\u043f\u0446\u0456\u0457",iframe:"iframe",embeddedaudio:"embeddedaudio","embedded_audio_options":"Embedded Audio Options",poster:"Poster","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide"}); \ No newline at end of file
+tinyMCE.addI18n('uk.media_dlg',{list:"\u0421\u043f\u0438\u0441\u043e\u043a",file:"\u0424\u0430\u0439\u043b/URL",advanced:"\u0414\u043e\u0434\u0430\u0442\u043a\u043e\u0432\u043e",general:"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435",title:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 / \u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u0432\u0431\u0443\u0434\u043e\u0432\u0430\u043d\u0456 \u043c\u0435\u0434\u0456\u0430","align_top_left":"\u0417\u0432\u0435\u0440\u0445\u0443 \u0437\u043b\u0456\u0432\u0430","align_center":"\u0426\u0435\u043d\u0442\u0440","align_left":"\u041b\u0456\u0432\u043e","align_bottom":"\u041d\u0438\u0437","align_right":"\u041f\u0440\u0430\u0432\u043e","align_top":"\u0412\u0435\u0440\u0445","qt_stream_warn":"Streamed rtsp resources should be added to the QT Src field under the advanced tab.\nYou should also add a non streamed version to the Src field..",qtsrc:"\u0414\u0436\u0435\u0440\u0435\u043b\u043e QT",progress:"\u0425\u0456\u0434",sound:"\u0417\u0432\u0443\u043a",swstretchvalign:"\u0420\u043e\u0437\u0442\u044f\u0433\u043d\u0443\u0442\u0438 \u0432\u0435\u0440\u0442. \u0432\u0438\u0440\u0456\u0432\u043d\u044e\u0430\u043d\u043d\u044f",swstretchhalign:"\u0420\u043e\u0437\u0442\u044f\u0433\u043d\u0443\u0442\u0438 \u0433\u043e\u0440\u0438\u0437. \u0432\u0438\u0440\u0456\u0432\u043d\u044e\u0430\u043d\u043d\u044f",swstretchstyle:"\u0420\u043e\u0437\u0442\u044f\u0433\u043d\u0443\u0442\u0438\u0439 \u0441\u0442\u0438\u043b\u044c",scriptcallbacks:"\u0417\u0432\u043e\u0440\u043e\u0442\u043d\u0456\u0439 \u0432\u0438\u043a\u043b\u0438\u043a \u0441\u0446\u0435\u043d\u0430\u0440\u0456\u044e","align_top_right":"\u0417\u0432\u0435\u0440\u0445\u0443 \u0437\u043f\u0440\u0430\u0432\u0430",uimode:"\u0420\u0435\u0436\u0438\u043c \u0456\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443",rate:"\u0428\u0432\u0438\u0434\u043a\u0456\u0441\u0442\u044c",playcount:"\u041a\u0456\u043b\u044c\u043a\u0456\u0441\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u0432\u0430\u043d\u044c",defaultframe:"\u041a\u0430\u0434\u0440 \u0437\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0430\u043d\u043d\u044f\u043c",currentposition:"\u041f\u043e\u0442\u043e\u0447\u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0456\u044f",currentmarker:"\u041f\u043e\u0442\u043e\u0447\u043d\u0438\u0439 \u043c\u0430\u0440\u043a\u0435\u0440",captioningid:"\u0406\u0434\u0435\u043d\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u043e\u0440 \u043d\u0430\u0434\u043f\u0438\u0441\u0443",baseurl:"\u041e\u0441\u043d\u043e\u0432\u043d\u0435 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f",balance:"\u0411\u0430\u043b\u0430\u043d\u0441",windowlessvideo:"Windowless video",stretchtofit:"\u0417\u043c\u0435\u043d\u0448\u0438\u0442\u0438, \u0449\u043e\u0431 \u0432\u043c\u0456\u0441\u0442\u0438\u043b\u043e\u0441\u044c",mute:"\u0417\u0430\u0433\u043b\u0443\u0448\u0438\u0442\u0438",invokeurls:"\u0412\u0438\u043a\u043b\u0438\u043a\u0430\u0442\u0438 URLs",fullscreen:"\u041f\u043e\u0432\u043d\u0438\u0439 \u0435\u043a\u0440\u0430\u043d",enabled:"\u0414\u043e\u0437\u0432\u043e\u043b\u0435\u043d\u0438\u0439",autostart:"\u0410\u0432\u0442\u043e\u0441\u0442\u0430\u0440\u0442",volume:"\u0413\u0443\u0447\u043d\u0456\u0441\u0442\u044c",target:"\u0426\u0456\u043b\u044c",qtsrcchokespeed:"\u0428\u0432\u0438\u0434\u043a\u0456\u0441\u0442\u044c \u0437\u0430\u0433\u0430\u0441\u0430\u043d\u043d\u044f",href:"\u041f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f",endtime:"\u0427\u0430\u0441 \u043a\u0456\u043d\u0446\u044f",starttime:"\u0427\u0430\u0441 \u043f\u043e\u0447\u0430\u0442\u043a\u0443",enablejavascript:"\u0414\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u0438 JavaScript",correction:"\u0411\u0435\u0437 \u043a\u043e\u0440\u0435\u043a\u0446\u0456\u0457",targetcache:"\u0426\u0456\u043b\u044c\u043e\u0432\u0438\u0439 \u043a\u0435\u0448",playeveryframe:"\u041f\u0440\u043e\u0433\u0440\u0430\u0432\u0430\u0442\u0438 \u043a\u043e\u0436\u0435\u043d \u043a\u0430\u0434\u0440",kioskmode:"\u041f\u043e\u0432\u043d\u043e\u0435\u043a\u0440\u0430\u043d\u043d\u0438\u0439 \u0440\u0435\u0436\u0438\u043c",controller:"\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440",menu:"\u041f\u043e\u043a\u0430\u0437\u0443\u0432\u0430\u0442\u0438 \u043c\u0435\u043d\u044e",loop:"\u041f\u043e\u0432\u0442\u043e\u0440\u044e\u0432\u0430\u0442\u0438",play:"\u0410\u0432\u0442\u043e\u043f\u0440\u043e\u0433\u0440\u0430\u0432\u043d\u043d\u044f",hspace:"\u0433\u043e\u0440.\u0432\u0456\u0434\u0441\u0442\u0443\u043f",vspace:"\u0432\u0435\u0440\u0442.\u0432\u0456\u0434\u0441\u0442\u0443\u043f","class_name":"\u041a\u043b\u0430\u0441",name:"\u041d\u0430\u0437\u0432\u0430",id:"\u0406\u0434\u0435\u043d\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u043e\u0440",type:"\u0422\u0438\u043f",size:"\u0420\u043e\u0437\u043c\u0456\u0440\u0438",preview:"\u041f\u0435\u0440\u0435\u0433\u043b\u044f\u0434","constrain_proportions":"\u0417\u0431\u0435\u0440\u0456\u0433\u0430\u0442\u0438 \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0456\u0457",controls:"\u041a\u0435\u0440\u0443\u0432\u0430\u043d\u043d\u044f",numloop:"\u041a\u0456\u043b\u044c\u043a\u0456\u0441\u0442\u044c \u0446\u0438\u043a\u043b\u0456\u0432",console:"\u041a\u043e\u043d\u0441\u043e\u043b\u044c",cache:"\u041a\u0435\u0448",autohref:"AutoHREF",liveconnect:"SWLiveConnect",flashvars:"Flash-\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438",base:"\u0411\u0430\u0437\u0430",bgcolor:"\u0424\u043e\u043d",wmode:"W-\u0440\u0435\u0436\u0438\u043c",salign:"S-\u0412\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f",align:"\u0412\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f",scale:"\u041c\u0430\u0441\u0448\u0442\u0430\u0431\u0443\u0432\u0430\u043d\u043d\u044f",quality:"\u042f\u043a\u0456\u0441\u0442\u044c",shuffle:"\u041f\u0435\u0440\u0435\u0442\u0430\u0441\u0443\u0432\u0430\u0442\u0438",prefetch:"\u041f\u043e\u043f\u0435\u0440\u0435\u0434\u043d\u0454 \u0432\u0438\u043b\u0443\u0447\u0435\u043d\u043d\u044f",nojava:"\u0411\u0435\u0437 Java",maintainaspect:"\u0412\u0434\u0435\u0440\u0436\u0443\u0432\u0430\u0442\u0438 \u0440\u0430\u043a\u0443\u0440\u0441",imagestatus:"\u0421\u0442\u0430\u0442\u0443\u0441 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f",center:"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443",autogotourl:"\u041f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u0430\u0432\u0442\u043e\u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0443","shockwave_options":"\u041e\u043f\u0446\u0456\u0457 Shockwave","rmp_options":"\u041e\u043f\u0446\u0456\u0457 Real media player","wmp_options":"\u041e\u043f\u0446\u0456\u0457 Windows media player","qt_options":"\u041e\u043f\u0446\u0456\u0457 Quicktime","flash_options":"\u041e\u043f\u0446\u0456\u0457 Flash",hidden:"\u041f\u0440\u0438\u0445\u043e\u0432\u0430\u043d\u0438\u0439","align_bottom_left":"\u0417\u043d\u0438\u0437\u0443 \u0437\u043b\u0456\u0432\u0430","align_bottom_right":"\u0417\u043d\u0438\u0437\u0443 \u0437\u043f\u0440\u0430\u0432\u0430",flash:"flash",quicktime:"quicktime","embedded_audio_options":"\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438 \u0432\u0431\u0443\u0434\u043e\u0432\u0430\u043d\u043e\u0433\u043e \u0437\u0432\u0443\u043a\u0443",windowsmedia:"windowsmedia",realmedia:"realmedia",shockwave:"shockwave",audio:"audio",video:"video","html5_video_options":"\u0412\u0456\u0434\u0435\u043e \u043e\u043f\u0446\u0456\u0457 HTML5",altsource1:"\u0410\u043b\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u0435 \u0434\u0436\u0435\u0440\u0435\u043b\u043e 1",altsource2:"\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u0435 \u0434\u0436\u0435\u0440\u0435\u043b\u043e 2",preload:"\u041f\u043e\u043f\u0435\u0440\u0435\u0434\u043d\u0454 \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043d\u044f",poster:"\u041f\u043e\u0441\u0442\u0435\u0440",source:"\u0414\u0436\u0435\u0440\u0435\u043b\u043e","html5_audio_options":"\u0410\u0443\u0434\u0456\u043e \u043e\u043f\u0446\u0456\u0457","preload_none":"\u0411\u0435\u0437 \u043f\u043e\u043f\u0435\u0440\u0435\u0434\u043d\u044c\u043e\u0457 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438","preload_metadata":"\u041f\u043e\u043f\u0435\u0440\u0435\u0434\u043d\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u0438\u0445 \u0432\u0456\u0434\u0435\u043e","preload_auto":"\u041d\u0430 \u0440\u043e\u0437\u0441\u0443\u0434 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430",iframe:"iframe",embeddedaudio:"embeddedaudio"}); \ No newline at end of file
diff --git a/program/js/tiny_mce/plugins/style/langs/uk_dlg.js b/program/js/tiny_mce/plugins/style/langs/uk_dlg.js
index 152118f58..4c07a44c7 100644
--- a/program/js/tiny_mce/plugins/style/langs/uk_dlg.js
+++ b/program/js/tiny_mce/plugins/style/langs/uk_dlg.js
@@ -1 +1 @@
-tinyMCE.addI18n('uk.style_dlg',{"text_lineheight":"\u0412\u0438\u0441\u043e\u0442\u0430 \u0440\u044f\u0434\u043a\u0443","text_variant":"\u0412\u0430\u0440\u0456\u0430\u043d\u0442","text_style":"\u0421\u0442\u0438\u043b\u044c","text_weight":"\u0422\u043e\u0432\u0449\u0438\u043d\u0430","text_size":"\u0420\u043e\u0437\u043c\u0456\u0440","text_font":"\u0428\u0440\u0438\u0444\u0442","text_props":"\u0422\u0435\u043a\u0441\u0442","positioning_tab":"\u041f\u043e\u0437\u0438\u0446\u0456\u043e\u043d\u0443\u0432\u0430\u043d\u043d\u044f","list_tab":"\u0421\u043f\u0438\u0441\u043e\u043a","border_tab":"\u0420\u0430\u043c\u043a\u0430","box_tab":"\u042f\u0449\u0438\u043a(box)","block_tab":"\u0411\u043b\u043e\u043a","background_tab":"\u0424\u043e\u043d","text_tab":"\u0422\u0435\u043a\u0441\u0442",apply:"\u0417\u0430\u0441\u0442\u043e\u0441\u0443\u0432\u0430\u0442\u0438",title:"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u043d\u043d\u044f CSS \u0441\u0442\u0438\u043b\u044e",clip:"\u0421\u043a\u0440\u0456\u043f\u043b\u0435\u043d\u043d\u044f",placement:"\u0420\u043e\u0437\u043c\u0456\u0449\u0435\u043d\u043d\u044f",overflow:"\u041f\u0435\u0440\u0435\u043f\u043e\u0432\u043d\u0435\u043d\u043d\u044f",zindex:"Z-\u0456\u043d\u0434\u0435\u043a\u0441",visibility:"\u0412\u0438\u0434\u0438\u043c\u0456\u0441\u0442\u044c","positioning_type":"\u0422\u0438\u043f",position:"\u041f\u043e\u0437\u0438\u0446\u0456\u044f","bullet_image":"\u0417\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f \u0437\u043d\u0430\u0447\u043a\u0430 \u0432 \u0441\u043f\u0438\u0441\u043a\u0443","list_type":"\u0422\u0438\u043f",color:"\u041a\u043e\u043b\u0456\u0440",height:"\u0412\u0438\u0441\u043e\u0442\u0430",width:"\u0428\u0438\u0440\u0438\u043d\u0430",style:"\u0421\u0442\u0438\u043b\u044c",margin:"Margin",left:"\u041b\u0456\u0432\u043e\u0440\u0443\u0447",bottom:"\u0417\u043d\u0438\u0437\u0443",right:"\u041f\u0440\u0430\u0432\u043e\u0440\u0443\u0447",top:"\u0412\u0433\u043e\u0440\u0443",same:"\u041e\u0434\u043d\u0430\u043a\u043e\u0435 \u0434\u043b\u044f \u0432\u0441\u0456\u0445",padding:"\u0412\u043d\u0443\u0442\u0440\u0456\u0448\u043d\u0456\u0439 \u0432\u0456\u0434\u0441\u0442\u0443\u043f","box_clear":"\u041e\u0447\u0438\u0441\u0442\u043a\u0430","box_float":"\u041f\u043b\u0430\u0432\u0430\u043d\u043d\u044f","box_height":"\u0412\u0438\u0441\u043e\u0442\u0430","box_width":"\u0428\u0438\u0440\u0438\u043d\u0430","block_display":"\u0412\u0456\u0434\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u0438","block_whitespace":"\u041f\u0440\u043e\u0431\u0456\u043b","block_text_indent":"\u0412\u0456\u0434\u0441\u0442\u0443\u043f","block_text_align":"\u0412\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f \u0442\u0435\u043a\u0441\u0442\u0443","block_vertical_alignment":"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0435 \u0432\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f","block_letterspacing":"\u0412\u0456\u0434\u0441\u0442\u0443\u043f\u0438 \u043c\u0456\u0436 \u043b\u0456\u0442\u0435\u0440\u0430\u043c\u0438","block_wordspacing":"\u0412\u0456\u0434\u0441\u0442\u0443\u043f\u0438 \u043c\u0456\u0436 \u0441\u043b\u043e\u0432\u0430\u043c\u0438","background_vpos":"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0456\u044f","background_hpos":"\u0413\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0456\u044f","background_attachment":"\u0412\u043a\u043b\u0430\u0434\u0435\u043d\u043d\u044f","background_repeat":"\u041f\u043e\u0432\u0442\u043e\u0440","background_image":"\u0424\u043e\u043d\u043e\u0432\u0435 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","background_color":"\u041a\u043e\u043b\u0456\u0440 \u0444\u043e\u043d\u0443","text_none":"\u041d\u0456\u0447\u043e\u0433\u043e","text_blink":"\u041c\u0435\u0440\u0435\u0445\u0442\u0456\u043d\u043d\u044f","text_case":"\u0420\u0435\u0433\u0456\u0441\u0442\u0440","text_striketrough":"\u0417\u0430\u043a\u0440\u0435\u0441\u043b\u0435\u043d\u0438\u0439","text_underline":"\u041f\u0456\u0434\u043a\u0440\u0435\u0441\u043b\u0435\u043d\u0438\u0439","text_overline":"\u041d\u0430\u0434\u043a\u0440\u0435\u0441\u043b\u0435\u043d\u0438\u0439","text_decoration":"\u041e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u043d\u044f","text_color":"\u041a\u043e\u043b\u0456\u0440",text:"\u0422\u0435\u043a\u0441\u0442",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"}); \ No newline at end of file
+tinyMCE.addI18n('uk.style_dlg',{"text_lineheight":"\u0412\u0438\u0441\u043e\u0442\u0430 \u0440\u044f\u0434\u043a\u0443","text_variant":"\u0412\u0430\u0440\u0456\u0430\u043d\u0442","text_style":"\u0421\u0442\u0438\u043b\u044c","text_weight":"\u0422\u043e\u0432\u0449\u0438\u043d\u0430","text_size":"\u0420\u043e\u0437\u043c\u0456\u0440","text_font":"\u0428\u0440\u0438\u0444\u0442","text_props":"\u0422\u0435\u043a\u0441\u0442","positioning_tab":"\u041f\u043e\u0437\u0438\u0446\u0456\u043e\u043d\u0443\u0432\u0430\u043d\u043d\u044f","list_tab":"\u0421\u043f\u0438\u0441\u043e\u043a","border_tab":"\u0420\u0430\u043c\u043a\u0430","box_tab":"\u042f\u0449\u0438\u043a(box)","block_tab":"\u0411\u043b\u043e\u043a","background_tab":"\u0424\u043e\u043d","text_tab":"\u0422\u0435\u043a\u0441\u0442",apply:"\u0417\u0430\u0441\u0442\u043e\u0441\u0443\u0432\u0430\u0442\u0438",title:"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u043d\u043d\u044f CSS \u0441\u0442\u0438\u043b\u044e",clip:"\u0421\u043a\u0440\u0456\u043f\u043b\u0435\u043d\u043d\u044f",placement:"\u0420\u043e\u0437\u043c\u0456\u0449\u0435\u043d\u043d\u044f",overflow:"\u041f\u0435\u0440\u0435\u043f\u043e\u0432\u043d\u0435\u043d\u043d\u044f",zindex:"Z-\u0456\u043d\u0434\u0435\u043a\u0441",visibility:"\u0412\u0438\u0434\u0438\u043c\u0456\u0441\u0442\u044c","positioning_type":"\u0422\u0438\u043f",position:"\u041f\u043e\u0437\u0438\u0446\u0456\u044f","bullet_image":"\u0417\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f \u0437\u043d\u0430\u0447\u043a\u0430 \u0432 \u0441\u043f\u0438\u0441\u043a\u0443","list_type":"\u0422\u0438\u043f",color:"\u041a\u043e\u043b\u0456\u0440",height:"\u0412\u0438\u0441\u043e\u0442\u0430",width:"\u0428\u0438\u0440\u0438\u043d\u0430",style:"\u0421\u0442\u0438\u043b\u044c",margin:"Margin",left:"\u041b\u0456\u0432\u043e\u0440\u0443\u0447",bottom:"\u0417\u043d\u0438\u0437\u0443",right:"\u041f\u0440\u0430\u0432\u043e\u0440\u0443\u0447",top:"\u0412\u0433\u043e\u0440\u0443",same:"\u041e\u0434\u043d\u0430\u043a\u043e\u0435 \u0434\u043b\u044f \u0432\u0441\u0456\u0445",padding:"\u0412\u043d\u0443\u0442\u0440\u0456\u0448\u043d\u0456\u0439 \u0432\u0456\u0434\u0441\u0442\u0443\u043f","box_clear":"\u041e\u0447\u0438\u0441\u0442\u043a\u0430","box_float":"\u041f\u043b\u0430\u0432\u0430\u043d\u043d\u044f","box_height":"\u0412\u0438\u0441\u043e\u0442\u0430","box_width":"\u0428\u0438\u0440\u0438\u043d\u0430","block_display":"\u0412\u0456\u0434\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u0438","block_whitespace":"\u041f\u0440\u043e\u0431\u0456\u043b","block_text_indent":"\u0412\u0456\u0434\u0441\u0442\u0443\u043f","block_text_align":"\u0412\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f \u0442\u0435\u043a\u0441\u0442\u0443","block_vertical_alignment":"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0435 \u0432\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f","block_letterspacing":"\u0412\u0456\u0434\u0441\u0442\u0443\u043f\u0438 \u043c\u0456\u0436 \u043b\u0456\u0442\u0435\u0440\u0430\u043c\u0438","block_wordspacing":"\u0412\u0456\u0434\u0441\u0442\u0443\u043f\u0438 \u043c\u0456\u0436 \u0441\u043b\u043e\u0432\u0430\u043c\u0438","background_vpos":"\u0412\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0456\u044f","background_hpos":"\u0413\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0430 \u043f\u043e\u0437\u0438\u0446\u0456\u044f","background_attachment":"\u0412\u043a\u043b\u0430\u0434\u0435\u043d\u043d\u044f","background_repeat":"\u041f\u043e\u0432\u0442\u043e\u0440","background_image":"\u0424\u043e\u043d\u043e\u0432\u0435 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","background_color":"\u041a\u043e\u043b\u0456\u0440 \u0444\u043e\u043d\u0443","text_none":"\u041d\u0456\u0447\u043e\u0433\u043e","text_blink":"\u041c\u0435\u0440\u0435\u0445\u0442\u0456\u043d\u043d\u044f","text_case":"\u0420\u0435\u0433\u0456\u0441\u0442\u0440","text_striketrough":"\u0417\u0430\u043a\u0440\u0435\u0441\u043b\u0435\u043d\u0438\u0439","text_underline":"\u041f\u0456\u0434\u043a\u0440\u0435\u0441\u043b\u0435\u043d\u0438\u0439","text_overline":"\u041d\u0430\u0434\u043a\u0440\u0435\u0441\u043b\u0435\u043d\u0438\u0439","text_decoration":"\u041e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u043d\u044f","text_color":"\u041a\u043e\u043b\u0456\u0440",text:"\u0422\u0435\u043a\u0441\u0442",background:"\u0424\u043e\u043d",block:"\u0411\u043b\u043e\u043a",box:"\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440",border:"\u0413\u0440\u0430\u043d\u0438\u0446\u0456",list:"\u0421\u043f\u0438\u0441\u043e\u043a"}); \ No newline at end of file
diff --git a/program/js/tiny_mce/plugins/style/props.htm b/program/js/tiny_mce/plugins/style/props.htm
index 7dc087a30..33d424cb9 100644
--- a/program/js/tiny_mce/plugins/style/props.htm
+++ b/program/js/tiny_mce/plugins/style/props.htm
@@ -1,845 +1,845 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <title>{#style_dlg.title}</title>
- <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
- <script type="text/javascript" src="../../utils/mctabs.js"></script>
- <script type="text/javascript" src="../../utils/editable_selects.js"></script>
- <script type="text/javascript" src="../../utils/form_utils.js"></script>
- <script type="text/javascript" src="js/props.js"></script>
- <link href="css/props.css" rel="stylesheet" type="text/css" />
-</head>
-
-<body id="styleprops" style="display: none" role="application" aria-labelledby="app_title">
-<span id="app_title" style="display:none">{#style_dlg.title}</span>
-<form onsubmit="updateAction();return false;" action="#">
-<div class="tabs">
- <ul>
- <li id="text_tab" class="current" aria-controls="text_panel"><span><a href="javascript:mcTabs.displayTab('text_tab','text_panel');" onMouseDown="return false;">{#style_dlg.text_tab}</a></span></li>
- <li id="background_tab" aria-controls="background_panel"><span><a href="javascript:mcTabs.displayTab('background_tab','background_panel');" onMouseDown="return false;">{#style_dlg.background_tab}</a></span></li>
- <li id="block_tab" aria-controls="block_panel"><span><a href="javascript:mcTabs.displayTab('block_tab','block_panel');" onMouseDown="return false;">{#style_dlg.block_tab}</a></span></li>
- <li id="box_tab" aria-controls="box_panel"><span><a href="javascript:mcTabs.displayTab('box_tab','box_panel');" onMouseDown="return false;">{#style_dlg.box_tab}</a></span></li>
- <li id="border_tab" aria-controls="border_panel"><span><a href="javascript:mcTabs.displayTab('border_tab','border_panel');" onMouseDown="return false;">{#style_dlg.border_tab}</a></span></li>
- <li id="list_tab" aria-controls="list_panel"><span><a href="javascript:mcTabs.displayTab('list_tab','list_panel');" onMouseDown="return false;">{#style_dlg.list_tab}</a></span></li>
- <li id="positioning_tab" aria-controls="positioning_panel"><span><a href="javascript:mcTabs.displayTab('positioning_tab','positioning_panel');" onMouseDown="return false;">{#style_dlg.positioning_tab}</a></span></li>
- </ul>
-</div>
-
-<div class="panel_wrapper">
-<div id="text_panel" class="panel current">
- <fieldset>
- <legend>{#style_dlg.text}</legend>
- <table role="presentation" border="0" width="100%">
- <tr>
- <td><label for="text_font">{#style_dlg.text_font}</label></td>
- <td colspan="3">
- <select id="text_font" name="text_font" class="mceEditableSelect mceFocus"></select>
- </td>
- </tr>
- <tr>
- <td><label for="text_size">{#style_dlg.text_size}</label></td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><select id="text_size" name="text_size" class="mceEditableSelect"></select></td>
- <td>&nbsp;</td>
- <td>
- <label id="text_size_measurement_label" for="text_size_measurement" style="display: none; visibility: hidden;">Text Size Measurement Unit</label>
- <select id="text_size_measurement" name="text_size_measurement" aria-labelledby="text_size_measurement_label"></select>
- </td>
- </tr>
- </table>
- </td>
- <td><label for="text_weight">{#style_dlg.text_weight}</label></td>
- <td>
- <select id="text_weight" name="text_weight"></select>
- </td>
- </tr>
- <tr>
- <td><label for="text_style">{#style_dlg.text_style}</label></td>
- <td>
- <select id="text_style" name="text_style" class="mceEditableSelect"></select>
- </td>
- <td><label for="text_variant">{#style_dlg.text_variant}</label></td>
- <td>
- <select id="text_variant" name="text_variant"></select>
- </td>
- </tr>
- <tr>
- <td><label for="text_lineheight">{#style_dlg.text_lineheight}</label></td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td>
- <select id="text_lineheight" name="text_lineheight" class="mceEditableSelect"></select>
- </td>
- <td>&nbsp;</td>
- <td>
- <label id="text_lineheight_measurement_label" for="text_lineheight_measurement" style="display: none; visibility: hidden;">Line Height Measurement Unit</label>
- <select id="text_lineheight_measurement" name="text_lineheight_measurement" aria-labelledby="text_lineheight_measurement_label"></select>
- </td>
- </tr>
- </table>
- </td>
- <td><label for="text_case">{#style_dlg.text_case}</label></td>
- <td>
- <select id="text_case" name="text_case"></select>
- </td>
- </tr>
- <tr>
- <td><label for="text_color">{#style_dlg.text_color}</label></td>
- <td colspan="2">
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input id="text_color" name="text_color" type="text" value="" size="9" onChange="updateColor('text_color_pick','text_color');" /></td>
- <td id="text_color_pickcontainer">&nbsp;</td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td valign="top" style="vertical-align: top; padding-top: 3px;">{#style_dlg.text_decoration}</td>
- <td colspan="2">
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input id="text_underline" name="text_underline" class="checkbox" type="checkbox" /></td>
- <td><label for="text_underline">{#style_dlg.text_underline}</label></td>
- </tr>
- <tr>
- <td><input id="text_overline" name="text_overline" class="checkbox" type="checkbox" /></td>
- <td><label for="text_overline">{#style_dlg.text_overline}</label></td>
- </tr>
- <tr>
- <td><input id="text_linethrough" name="text_linethrough" class="checkbox" type="checkbox" /></td>
- <td><label for="text_linethrough">{#style_dlg.text_striketrough}</label></td>
- </tr>
- <tr>
- <td><input id="text_blink" name="text_blink" class="checkbox" type="checkbox" /></td>
- <td><label for="text_blink">{#style_dlg.text_blink}</label></td>
- </tr>
- <tr>
- <td><input id="text_none" name="text_none" class="checkbox" type="checkbox" onclick="updateTextDecorations();"/></td>
- <td><label for="text_none">{#style_dlg.text_none}</label></td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </fieldset>
-</div>
-
-<div id="background_panel" class="panel">
- <fieldset>
- <legend>{#style_dlg.background}</legend>
- <table role="presentation" border="0">
- <tr>
- <td><label for="background_color">{#style_dlg.background_color}</label></td>
- <td>
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input id="background_color" name="background_color" type="text" value="" size="9" onChange="updateColor('background_color_pick','background_color');" /></td>
- <td id="background_color_pickcontainer">&nbsp;</td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td><label for="background_image">{#style_dlg.background_image}</label></td>
- <td><table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input id="background_image" name="background_image" type="text" /></td>
- <td id="background_image_browser">&nbsp;</td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td><label for="background_repeat">{#style_dlg.background_repeat}</label></td>
- <td><select id="background_repeat" name="background_repeat" class="mceEditableSelect"></select></td>
- </tr>
-
- <tr>
- <td><label for="background_attachment">{#style_dlg.background_attachment}</label></td>
- <td><select id="background_attachment" name="background_attachment" class="mceEditableSelect"></select></td>
- </tr>
-
- <tr>
- <td><label for="background_hpos">{#style_dlg.background_hpos}</label></td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><select id="background_hpos" name="background_hpos" class="mceEditableSelect"></select></td>
- <td>&nbsp;</td>
- <td>
- <label id="background_hpos_measurement_label" for="background_hpos_measurement" style="display: none; visibility: hidden;">Horizontal position measurement unit</label>
- <select id="background_hpos_measurement" name="background_hpos_measurement" aria-labelledby="background_hpos_measurement_label"></select>
- </td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td><label for="background_vpos">{#style_dlg.background_vpos}</label></td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><select id="background_vpos" name="background_vpos" class="mceEditableSelect"></select></td>
- <td>&nbsp;</td>
- <td>
-
- <label id="background_vpos_measurement_label" for="background_vpos_measurement" style="display: none; visibility: hidden;">Vertical position measurement unit</label>
- <select id="background_vpos_measurement" name="background_vpos_measurement" aria-labelledby="background_vpos_measurement_label">></select></td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </fieldset>
-</div>
-
-<div id="block_panel" class="panel">
- <fieldset>
- <legend>{#style_dlg.block}</legend>
- <table role="presentation" border="0">
- <tr>
- <td><label for="block_wordspacing">{#style_dlg.block_wordspacing}</label></td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><select id="block_wordspacing" name="block_wordspacing" class="mceEditableSelect"></select></td>
- <td>&nbsp;</td>
- <td>
- <label id="block_wordspacing_measurement_label" for="block_wordspacing_measurement" style="display: none; visibility: hidden;">Word spacing measurement unit</label>
- <select id="block_wordspacing_measurement" name="block_wordspacing_measurement" aria-labelledby="block_wordspacing_measurement_label"></select>
- </td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td><label for="block_letterspacing">{#style_dlg.block_letterspacing}</label></td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><select id="block_letterspacing" name="block_letterspacing" class="mceEditableSelect"></select></td>
- <td>&nbsp;</td>
- <td>
- <label id="block_letterspacing_measurement_label" for="block_letterspacing_measurement" style="display: none; visibility: hidden;">Letter spacing measurement unit</label>
- <select id="block_letterspacing_measurement" name="block_letterspacing_measurement" aria-labelledby="block_letterspacing_measurement_label"></select>
- </td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td><label for="block_vertical_alignment">{#style_dlg.block_vertical_alignment}</label></td>
- <td><select id="block_vertical_alignment" name="block_vertical_alignment" class="mceEditableSelect"></select></td>
- </tr>
-
- <tr>
- <td><label for="block_text_align">{#style_dlg.block_text_align}</label></td>
- <td><select id="block_text_align" name="block_text_align" class="mceEditableSelect"></select></td>
- </tr>
-
- <tr>
- <td><label for="block_text_indent">{#style_dlg.block_text_indent}</label></td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input type="text" id="block_text_indent" name="block_text_indent" /></td>
- <td>&nbsp;</td>
- <td>
- <label id="block_text_indent_measurement_label" for="block_text_indent_measurement" style="display: none; visibility: hidden;">Text Indent Measurement Unit</label>
-
- <select id="block_text_indent_measurement" name="block_text_indent_measurement" aria-labelledby="block_text_indent_measurement_label"></select>
- </td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td><label for="block_whitespace">{#style_dlg.block_whitespace}</label></td>
- <td><select id="block_whitespace" name="block_whitespace" class="mceEditableSelect"></select></td>
- </tr>
-
- <tr>
- <td><label for="block_display">{#style_dlg.block_display}</label></td>
- <td><select id="block_display" name="block_display" class="mceEditableSelect"></select></td>
- </tr>
- </table>
- </fieldset>
-</div>
-
-<div id="box_panel" class="panel">
- <fieldset>
- <legend>{#style_dlg.box}</legend>
- <table role="presentation" border="0">
- <tr>
- <td><label for="box_width">{#style_dlg.box_width}</label></td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input type="text" id="box_width" name="box_width" class="mceEditableSelect" onChange="synch('box_width','positioning_width');" /></td>
- <td>&nbsp;</td>
- <td>
- <label id="box_width_measurement_label" for="box_width_measurement" style="display: none; visibility: hidden;">Box Width Measurement Unit</label>
- <select id="box_width_measurement" name="box_width_measurement" aria-labelledby="box_width_measurement_label"></select>
- </td>
- </tr>
- </table>
- </td>
- <td>&nbsp;&nbsp;&nbsp;<label for="box_float">{#style_dlg.box_float}</label></td>
- <td><select id="box_float" name="box_float" class="mceEditableSelect"></select></td>
- </tr>
-
- <tr>
- <td><label for="box_height">{#style_dlg.box_height}</label></td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input type="text" id="box_height" name="box_height" class="mceEditableSelect" onChange="synch('box_height','positioning_height');" /></td>
- <td>&nbsp;</td>
- <td>
- <label id="box_height_measurement_label" for="box_height_measurement" style="display: none; visibility: hidden;">Box Height Measurement Unit</label>
- <select id="box_height_measurement" name="box_height_measurement" aria-labelledby="box_height_measurement_label"></select>
- </td>
- </tr>
- </table>
- </td>
- <td>&nbsp;&nbsp;&nbsp;<label for="box_clear">{#style_dlg.box_clear}</label></td>
- <td><select id="box_clear" name="box_clear" class="mceEditableSelect"></select></td>
- </tr>
- </table>
- </fieldset>
-
-<div style="float: left; width: 49%">
- <fieldset>
- <legend>{#style_dlg.padding}</legend>
-
- <table role="presentation" border="0">
- <tr>
- <td>&nbsp;</td>
- <td><input type="checkbox" id="box_padding_same" name="box_padding_same" class="checkbox" checked="checked" onClick="toggleSame(this,'box_padding');" /> <label for="box_padding_same">{#style_dlg.same}</label></td>
- </tr>
- <tr>
- <td><label for="box_padding_top">{#style_dlg.top}</label></td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input type="text" id="box_padding_top" name="box_padding_top" class="mceEditableSelect" /></td>
- <td>&nbsp;</td>
- <td>
- <label id="box_padding_top_measurement_label" for="box_padding_top_measurement" style="display: none; visibility: hidden;">Padding Top Measurement Unit</label>
- <select id="box_padding_top_measurement" name="box_padding_top_measurement" aria-labelledby="box_padding_top_measurement_label"></select>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td><label for="box_padding_right">{#style_dlg.right}</label></td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input type="text" id="box_padding_right" name="box_padding_right" class="mceEditableSelect" disabled="disabled" /></td>
- <td>&nbsp;</td>
- <td>
- <label id="box_padding_right_measurement_label" for="box_padding_right_measurement" style="display: none; visibility: hidden;">Padding Right Measurement Unit</label>
- <select id="box_padding_right_measurement" name="box_padding_right_measurement" disabled="disabled" aria-labelledby="box_padding_right_measurement_label"></select>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td><label for="box_padding_bottom">{#style_dlg.bottom}</label></td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input type="text" id="box_padding_bottom" name="box_padding_bottom" class="mceEditableSelect" disabled="disabled" /></td>
- <td>&nbsp;</td>
- <td>
- <label id="box_padding_bottom_measurement_label" for="box_padding_bottom_measurement" style="display: none; visibility: hidden;">Padding Bottom Measurement Unit</label>
- <select id="box_padding_bottom_measurement" name="box_padding_bottom_measurement" disabled="disabled" aria-labelledby="box_padding_bottom_measurement_label"></select>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td><label for="box_padding_left">{#style_dlg.left}</label></td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input type="text" id="box_padding_left" name="box_padding_left" class="mceEditableSelect" disabled="disabled" /></td>
- <td>&nbsp;</td>
- <td>
- <label id="box_padding_left_measurement_label" for="box_padding_left_measurement" style="display: none; visibility: hidden;">Padding Left Measurement Unit</label>
- <select id="box_padding_left_measurement" name="box_padding_left_measurement" disabled="disabled" aria-labelledby="box_padding_left_measurement_label"></select>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </fieldset>
-</div>
-
-<div style="float: right; width: 49%">
- <fieldset>
- <legend>{#style_dlg.margin}</legend>
-
- <table role="presentation" border="0">
- <tr>
- <td>&nbsp;</td>
- <td><input type="checkbox" id="box_margin_same" name="box_margin_same" class="checkbox" checked="checked" onClick="toggleSame(this,'box_margin');" /> <label for="box_margin_same">{#style_dlg.same}</label></td>
- </tr>
- <tr>
- <td><label for="box_margin_top">{#style_dlg.top}</label></td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input type="text" id="box_margin_top" name="box_margin_top" class="mceEditableSelect" /></td>
- <td>&nbsp;</td>
- <td>
- <label id="box_margin_top_measurement_label" for="box_margin_top_measurement" style="display: none; visibility: hidden;">Margin Top Measurement Unit</label>
- <select id="box_margin_top_measurement" name="box_margin_top_measurement" aria-labelledby="box_margin_top_measurement_label"></select>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td><label for="box_margin_right">{#style_dlg.right}</label></td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input type="text" id="box_margin_right" name="box_margin_right" class="mceEditableSelect" disabled="disabled" /></td>
- <td>&nbsp;</td>
- <td>
- <label id="box_margin_right_measurement_label" for="box_margin_right_measurement" style="display: none; visibility: hidden;">Margin Right Measurement Unit</label>
- <select id="box_margin_right_measurement" name="box_margin_right_measurement" disabled="disabled" aria-labelledby="box_margin_right_measurement_label"></select>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td><label for="box_margin_bottom">{#style_dlg.bottom}</label></td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input type="text" id="box_margin_bottom" name="box_margin_bottom" class="mceEditableSelect" disabled="disabled" /></td>
- <td>&nbsp;</td>
- <td>
- <label id="box_margin_bottom_measurement_label" for="box_margin_bottom_measurement" style="display: none; visibility: hidden;">Margin Bottom Measurement Unit</label>
- <select id="box_margin_bottom_measurement" name="box_margin_bottom_measurement" disabled="disabled" aria-labelledby="box_margin_bottom_measurement_label"></select>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td><label for="box_margin_left">{#style_dlg.left}</label></td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input type="text" id="box_margin_left" name="box_margin_left" class="mceEditableSelect" disabled="disabled" /></td>
- <td>&nbsp;</td>
- <td>
- <label id="box_margin_left_measurement_label" for="box_margin_left_measurement" style="display: none; visibility: hidden;">Margin Left Measurement Unit</label>
- <select id="box_margin_left_measurement" name="box_margin_left_measurement" disabled="disabled" aria-labelledby="box_margin_left_measurement_label"></select>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </fieldset>
-</div>
-<br style="clear: both" />
-</div>
-
-<div id="border_panel" class="panel">
- <fieldset>
- <legend>{#style_dlg.border}</legend>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0" width="100%">
- <tr>
- <td class="tdelim">&nbsp;</td>
- <td class="tdelim delim">&nbsp;</td>
- <td class="tdelim">{#style_dlg.style}</td>
- <td class="tdelim delim">&nbsp;</td>
- <td class="tdelim">{#style_dlg.width}</td>
- <td class="tdelim delim">&nbsp;</td>
- <td class="tdelim">{#style_dlg.color}</td>
- </tr>
-
- <tr>
- <td>&nbsp;</td>
- <td class="delim">&nbsp;</td>
- <td><input type="checkbox" id="border_style_same" name="border_style_same" class="checkbox" checked="checked" onClick="toggleSame(this,'border_style');" /> <label for="border_style_same">{#style_dlg.same}</label></td>
- <td class="delim">&nbsp;</td>
- <td><input type="checkbox" id="border_width_same" name="border_width_same" class="checkbox" checked="checked" onClick="toggleSame(this,'border_width');" /> <label for="border_width_same">{#style_dlg.same}</label></td>
- <td class="delim">&nbsp;</td>
- <td><input type="checkbox" id="border_color_same" name="border_color_same" class="checkbox" checked="checked" onClick="toggleSame(this,'border_color');" /> <label for="border_color_same">{#style_dlg.same}</label></td>
- </tr>
-
- <tr>
- <td>{#style_dlg.top}</td>
- <td class="delim">&nbsp;</td>
- <td><select id="border_style_top" name="border_style_top" class="mceEditableSelect"></select></td>
- <td class="delim">&nbsp;</td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><select id="border_width_top" name="border_width_top" class="mceEditableSelect"></select></td>
- <td>&nbsp;</td>
- <td>
- <label id="border_width_top_measurement_label" for="border_width_top_measurement" style="display: none; visibility: hidden;">Width top Measurement Unit</label>
- <select id="border_width_top_measurement" name="border_width_top_measurement" aria-labelledby="border_width_top_measurement_label"></select>
- </td>
- </tr>
- </table>
- </td>
- <td class="delim">&nbsp;</td>
- <td>
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input id="border_color_top" name="border_color_top" type="text" value="" size="9" onChange="updateColor('border_color_top_pick','border_color_top');" /></td>
- <td id="border_color_top_pickcontainer">&nbsp;</td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td>{#style_dlg.right}</td>
- <td class="delim">&nbsp;</td>
- <td><select id="border_style_right" name="border_style_right" class="mceEditableSelect" disabled="disabled"></select></td>
- <td class="delim">&nbsp;</td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><select id="border_width_right" name="border_width_right" class="mceEditableSelect" disabled="disabled"></select></td>
- <td>&nbsp;</td>
- <td>
- <label id="border_width_right_measurement_label" for="border_width_right_measurement" style="display: none; visibility: hidden;">Width Right Measurement Unit</label>
- <select id="border_width_right_measurement" name="border_width_right_measurement" disabled="disabled" aria-labelledby="border_width_right_measurement_label"></select>
- </td>
- </tr>
- </table>
- </td>
- <td class="delim">&nbsp;</td>
- <td>
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input id="border_color_right" name="border_color_right" type="text" value="" size="9" onChange="updateColor('border_color_right_pick','border_color_right');" disabled="disabled" /></td>
- <td id="border_color_right_pickcontainer">&nbsp;</td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td>{#style_dlg.bottom}</td>
- <td class="delim">&nbsp;</td>
- <td><select id="border_style_bottom" name="border_style_bottom" class="mceEditableSelect" disabled="disabled"></select></td>
- <td class="delim">&nbsp;</td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><select id="border_width_bottom" name="border_width_bottom" class="mceEditableSelect" disabled="disabled"></select></td>
- <td>&nbsp;</td>
- <td>
- <label id="border_width_bottom_measurement_label" for="border_width_bottom_measurement" style="display: none; visibility: hidden;">Width Bottom Measurement Unit</label>
- <select id="border_width_bottom_measurement" name="border_width_bottom_measurement" disabled="disabled" aria-labelledby="border_width_bottom_measurement_label"></select>
- </td>
- </tr>
- </table>
- </td>
- <td class="delim">&nbsp;</td>
- <td>
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input id="border_color_bottom" name="border_color_bottom" type="text" value="" size="9" onChange="updateColor('border_color_bottom_pick','border_color_bottom');" disabled="disabled" /></td>
- <td id="border_color_bottom_pickcontainer">&nbsp;</td>
- </tr>
- </table>
- </td>
- </tr>
-
- <tr>
- <td>{#style_dlg.left}</td>
- <td class="delim">&nbsp;</td>
- <td><select id="border_style_left" name="border_style_left" class="mceEditableSelect" disabled="disabled"></select></td>
- <td class="delim">&nbsp;</td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><select id="border_width_left" name="border_width_left" class="mceEditableSelect" disabled="disabled"></select></td>
- <td>&nbsp;</td>
- <td>
- <label id="border_width_left_measurement_label" for="border_width_left_measurement" style="display: none; visibility: hidden;">Width Left Measurement Unit</label>
- <select id="border_width_left_measurement" name="border_width_left_measurement" disabled="disabled" aria-labelledby="border_width_left_measurement_label"></select>
- </td>
- </tr>
- </table>
- </td>
- <td class="delim">&nbsp;</td>
- <td>
- <table role="presentation" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td><input id="border_color_left" name="border_color_left" type="text" value="" size="9" onChange="updateColor('border_color_left_pick','border_color_left');" disabled="disabled" /></td>
- <td id="border_color_left_pickcontainer">&nbsp;</td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </fieldset>
-</div>
-
-<div id="list_panel" class="panel">
-<fieldset>
- <legend>{#style_dlg.list}</legend>
- <table role="presentation" border="0">
- <tr>
- <td><label for="list_type">{#style_dlg.list_type}</label></td>
- <td><select id="list_type" name="list_type" class="mceEditableSelect"></select></td>
- </tr>
-
- <tr>
- <td><label for="list_bullet_image">{#style_dlg.bullet_image}</label></td>
- <td><input id="list_bullet_image" name="list_bullet_image" type="text" /></td>
- </tr>
-
- <tr>
- <td><label for="list_position">{#style_dlg.position}</label></td>
- <td><select id="list_position" name="list_position" class="mceEditableSelect"></select></td>
- </tr>
- </table>
-</fieldset>
-</div>
-
-<div id="positioning_panel" class="panel">
-<fieldset>
- <legend>{#style_dlg.position}</legend>
-<table role="presentation" border="0">
- <tr>
- <td><label for="positioning_type">{#style_dlg.positioning_type}</label></td>
- <td><select id="positioning_type" name="positioning_type" class="mceEditableSelect"></select></td>
- <td>&nbsp;&nbsp;&nbsp;<label for="positioning_visibility">{#style_dlg.visibility}</label></td>
- <td><select id="positioning_visibility" name="positioning_visibility" class="mceEditableSelect"></select></td>
- </tr>
-
- <tr>
- <td><label for="positioning_width">{#style_dlg.width}</label></td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input type="text" id="positioning_width" name="positioning_width" onChange="synch('positioning_width','box_width');" /></td>
- <td>&nbsp;</td>
- <td>
- <label id="positioning_width_measurement_label" for="positioning_width_measurement" style="display: none; visibility: hidden;">Positioning width Measurement Unit</label>
- <select id="positioning_width_measurement" name="positioning_width_measurement" aria-labelledby="positioning_width_measurement_label"></select>
- </td>
- </tr>
- </table>
- </td>
- <td>&nbsp;&nbsp;&nbsp;<label for="positioning_zindex">{#style_dlg.zindex}</label></td>
- <td><input type="text" id="positioning_zindex" name="positioning_zindex" /></td>
- </tr>
-
- <tr>
- <td><label for="positioning_height">{#style_dlg.height}</label></td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input type="text" id="positioning_height" name="positioning_height" onChange="synch('positioning_height','box_height');" /></td>
- <td>&nbsp;</td>
- <td>
- <label id="positioning_height_measurement_label" for="positioning_height_measurement" style="display: none; visibility: hidden;">Positioning Height Measurement Unit</label>
- <select id="positioning_height_measurement" name="positioning_height_measurement" aria-labelledby="positioning_height_measurement_label"></select>
- </td>
- </tr>
- </table>
- </td>
- <td>&nbsp;&nbsp;&nbsp;<label for="positioning_overflow">{#style_dlg.overflow}</label></td>
- <td><select id="positioning_overflow" name="positioning_overflow" class="mceEditableSelect"></select></td>
- </tr>
-</table>
-</fieldset>
-
-<div style="float: left; width: 49%">
- <fieldset>
- <legend>{#style_dlg.placement}</legend>
-
- <table role="presentation" border="0">
- <tr>
- <td>&nbsp;</td>
- <td><input type="checkbox" id="positioning_placement_same" name="positioning_placement_same" class="checkbox" checked="checked" onClick="toggleSame(this,'positioning_placement');" /> <label for="positioning_placement_same">{#style_dlg.same}</label></td>
- </tr>
- <tr>
- <td>{#style_dlg.top}</td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input type="text" id="positioning_placement_top" name="positioning_placement_top" /></td>
- <td>&nbsp;</td>
- <td>
- <label id="positioning_placement_top_measurement_label" for="positioning_placement_top_measurement" style="display: none; visibility: hidden;">Placement Top Measurement Unit</label>
- <select id="positioning_placement_top_measurement" name="positioning_placement_top_measurement" aria-labelledby="positioning_placement_top_measurement_label"></select>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td>{#style_dlg.right}</td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input type="text" id="positioning_placement_right" name="positioning_placement_right" disabled="disabled" /></td>
- <td>&nbsp;</td>
- <td>
- <label id="positioning_placement_right_measurement_label" for="positioning_placement_right_measurement" style="display: none; visibility: hidden;">Placement Right Measurement Unit</label>
- <select id="positioning_placement_right_measurement" name="positioning_placement_right_measurement" disabled="disabled" aria-labelledby="positioning_placement_right_measurement_label"></select>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td>{#style_dlg.bottom}</td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input type="text" id="positioning_placement_bottom" name="positioning_placement_bottom" disabled="disabled" /></td>
- <td>&nbsp;</td>
- <td>
- <label id="positioning_placement_bottom_measurement_label" for="positioning_placement_bottom_measurement" style="display: none; visibility: hidden;">Placement Bottom Measurement Unit</label>
- <select id="positioning_placement_bottom_measurement" name="positioning_placement_bottom_measurement" disabled="disabled" aria-labelledby="positioning_placement_bottom_measurement_label"></select>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td>{#style_dlg.left}</td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input type="text" id="positioning_placement_left" name="positioning_placement_left" disabled="disabled" /></td>
- <td>&nbsp;</td>
- <td>
- <label id="positioning_placement_left_measurement_label" for="positioning_placement_left_measurement" style="display: none; visibility: hidden;">Placement Left Measurement Unit</label>
- <select id="positioning_placement_left_measurement" name="positioning_placement_left_measurement" disabled="disabled" aria-labelledby="positioning_placement_left_measurement_label"></select>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </fieldset>
-</div>
-
-<div style="float: right; width: 49%">
- <fieldset>
- <legend>{#style_dlg.clip}</legend>
-
- <table role="presentation" border="0">
- <tr>
- <td>&nbsp;</td>
- <td><input type="checkbox" id="positioning_clip_same" name="positioning_clip_same" class="checkbox" checked="checked" onClick="toggleSame(this,'positioning_clip');" /> <label for="positioning_clip_same">{#style_dlg.same}</label></td>
- </tr>
- <tr>
- <td>{#style_dlg.top}</td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input type="text" id="positioning_clip_top" name="positioning_clip_top" /></td>
- <td>&nbsp;</td>
- <td>
- <label id="positioning_clip_top_measurement_label" for="positioning_clip_top_measurement" style="display: none; visibility: hidden;">Clip Top Measurement Unit</label>
- <select id="positioning_clip_top_measurement" name="positioning_clip_top_measurement" aria-labelledby="positioning_clip_top_measurement_label"></select>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td>{#style_dlg.right}</td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input type="text" id="positioning_clip_right" name="positioning_clip_right" disabled="disabled" /></td>
- <td>&nbsp;</td>
- <td>
- <label id="positioning_clip_right_measurement_label" for="positioning_clip_right_measurement" style="display: none; visibility: hidden;">Clip Right Measurement Unit</label>
- <select id="positioning_clip_right_measurement" name="positioning_clip_right_measurement" disabled="disabled" aria-labelledby="positioning_clip_right_measurement_label"></select>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td>{#style_dlg.bottom}</td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input type="text" id="positioning_clip_bottom" name="positioning_clip_bottom" disabled="disabled" /></td>
- <td>&nbsp;</td>
- <td>
- <label id="positioning_clip_bottom_measurement_label" for="positioning_clip_bottom_measurement" style="display: none; visibility: hidden;">Clip Bottom Measurement Unit</label>
- <select id="positioning_clip_bottom_measurement" name="positioning_clip_bottom_measurement" disabled="disabled" aria-labelledby="positioning_clip_bottom_measurement_label"></select>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td>{#style_dlg.left}</td>
- <td>
- <table role="presentation" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td><input type="text" id="positioning_clip_left" name="positioning_clip_left" disabled="disabled" /></td>
- <td>&nbsp;</td>
- <td>
- <label id="positioning_clip_left_measurement_label" for="positioning_clip_left_measurement" style="display: none; visibility: hidden;">Clip Left Measurement Unit</label>
- <select id="positioning_clip_left_measurement" name="positioning_clip_left_measurement" disabled="disabled" aria-labelledby="positioning_clip_left_measurement_label"></select>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </fieldset>
-</div>
-<br style="clear: both" />
-</div>
-</div>
-
-<div class="panel_toggle_insert_span">
- <input type="checkbox" class="checkbox" id="toggle_insert_span" name="toggle_insert_span" onClick="toggleApplyAction();" />
- <label for="toggle_insert_span">{#style_dlg.toggle_insert_span}</label>
-</div>
-
-<div class="mceActionPanel">
- <input type="submit" id="insert" name="insert" value="{#update}" />
- <input type="button" class="button" id="apply" name="apply" value="{#style_dlg.apply}" onClick="applyAction();" />
- <input type="button" id="cancel" name="cancel" value="{#cancel}" onClick="tinyMCEPopup.close();" />
-</div>
-</form>
-
-<div style="display: none">
- <div id="container"></div>
-</div>
-
-</body>
-</html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>{#style_dlg.title}</title>
+ <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script type="text/javascript" src="../../utils/mctabs.js"></script>
+ <script type="text/javascript" src="../../utils/editable_selects.js"></script>
+ <script type="text/javascript" src="../../utils/form_utils.js"></script>
+ <script type="text/javascript" src="js/props.js"></script>
+ <link href="css/props.css" rel="stylesheet" type="text/css" />
+</head>
+
+<body id="styleprops" style="display: none" role="application" aria-labelledby="app_title">
+<span id="app_title" style="display:none">{#style_dlg.title}</span>
+<form onsubmit="updateAction();return false;" action="#">
+<div class="tabs">
+ <ul>
+ <li id="text_tab" class="current" aria-controls="text_panel"><span><a href="javascript:mcTabs.displayTab('text_tab','text_panel');" onMouseDown="return false;">{#style_dlg.text_tab}</a></span></li>
+ <li id="background_tab" aria-controls="background_panel"><span><a href="javascript:mcTabs.displayTab('background_tab','background_panel');" onMouseDown="return false;">{#style_dlg.background_tab}</a></span></li>
+ <li id="block_tab" aria-controls="block_panel"><span><a href="javascript:mcTabs.displayTab('block_tab','block_panel');" onMouseDown="return false;">{#style_dlg.block_tab}</a></span></li>
+ <li id="box_tab" aria-controls="box_panel"><span><a href="javascript:mcTabs.displayTab('box_tab','box_panel');" onMouseDown="return false;">{#style_dlg.box_tab}</a></span></li>
+ <li id="border_tab" aria-controls="border_panel"><span><a href="javascript:mcTabs.displayTab('border_tab','border_panel');" onMouseDown="return false;">{#style_dlg.border_tab}</a></span></li>
+ <li id="list_tab" aria-controls="list_panel"><span><a href="javascript:mcTabs.displayTab('list_tab','list_panel');" onMouseDown="return false;">{#style_dlg.list_tab}</a></span></li>
+ <li id="positioning_tab" aria-controls="positioning_panel"><span><a href="javascript:mcTabs.displayTab('positioning_tab','positioning_panel');" onMouseDown="return false;">{#style_dlg.positioning_tab}</a></span></li>
+ </ul>
+</div>
+
+<div class="panel_wrapper">
+<div id="text_panel" class="panel current">
+ <fieldset>
+ <legend>{#style_dlg.text}</legend>
+ <table role="presentation" border="0" width="100%">
+ <tr>
+ <td><label for="text_font">{#style_dlg.text_font}</label></td>
+ <td colspan="3">
+ <select id="text_font" name="text_font" class="mceEditableSelect mceFocus"></select>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="text_size">{#style_dlg.text_size}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><select id="text_size" name="text_size" class="mceEditableSelect"></select></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="text_size_measurement_label" for="text_size_measurement" style="display: none; visibility: hidden;">Text Size Measurement Unit</label>
+ <select id="text_size_measurement" name="text_size_measurement" aria-labelledby="text_size_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td><label for="text_weight">{#style_dlg.text_weight}</label></td>
+ <td>
+ <select id="text_weight" name="text_weight"></select>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="text_style">{#style_dlg.text_style}</label></td>
+ <td>
+ <select id="text_style" name="text_style" class="mceEditableSelect"></select>
+ </td>
+ <td><label for="text_variant">{#style_dlg.text_variant}</label></td>
+ <td>
+ <select id="text_variant" name="text_variant"></select>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="text_lineheight">{#style_dlg.text_lineheight}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td>
+ <select id="text_lineheight" name="text_lineheight" class="mceEditableSelect"></select>
+ </td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="text_lineheight_measurement_label" for="text_lineheight_measurement" style="display: none; visibility: hidden;">Line Height Measurement Unit</label>
+ <select id="text_lineheight_measurement" name="text_lineheight_measurement" aria-labelledby="text_lineheight_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td><label for="text_case">{#style_dlg.text_case}</label></td>
+ <td>
+ <select id="text_case" name="text_case"></select>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="text_color">{#style_dlg.text_color}</label></td>
+ <td colspan="2">
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input id="text_color" name="text_color" type="text" value="" size="9" onChange="updateColor('text_color_pick','text_color');" /></td>
+ <td id="text_color_pickcontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" style="vertical-align: top; padding-top: 3px;">{#style_dlg.text_decoration}</td>
+ <td colspan="2">
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input id="text_underline" name="text_underline" class="checkbox" type="checkbox" /></td>
+ <td><label for="text_underline">{#style_dlg.text_underline}</label></td>
+ </tr>
+ <tr>
+ <td><input id="text_overline" name="text_overline" class="checkbox" type="checkbox" /></td>
+ <td><label for="text_overline">{#style_dlg.text_overline}</label></td>
+ </tr>
+ <tr>
+ <td><input id="text_linethrough" name="text_linethrough" class="checkbox" type="checkbox" /></td>
+ <td><label for="text_linethrough">{#style_dlg.text_striketrough}</label></td>
+ </tr>
+ <tr>
+ <td><input id="text_blink" name="text_blink" class="checkbox" type="checkbox" /></td>
+ <td><label for="text_blink">{#style_dlg.text_blink}</label></td>
+ </tr>
+ <tr>
+ <td><input id="text_none" name="text_none" class="checkbox" type="checkbox" onclick="updateTextDecorations();"/></td>
+ <td><label for="text_none">{#style_dlg.text_none}</label></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+</div>
+
+<div id="background_panel" class="panel">
+ <fieldset>
+ <legend>{#style_dlg.background}</legend>
+ <table role="presentation" border="0">
+ <tr>
+ <td><label for="background_color">{#style_dlg.background_color}</label></td>
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input id="background_color" name="background_color" type="text" value="" size="9" onChange="updateColor('background_color_pick','background_color');" /></td>
+ <td id="background_color_pickcontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="background_image">{#style_dlg.background_image}</label></td>
+ <td><table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input id="background_image" name="background_image" type="text" /></td>
+ <td id="background_image_browser">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="background_repeat">{#style_dlg.background_repeat}</label></td>
+ <td><select id="background_repeat" name="background_repeat" class="mceEditableSelect"></select></td>
+ </tr>
+
+ <tr>
+ <td><label for="background_attachment">{#style_dlg.background_attachment}</label></td>
+ <td><select id="background_attachment" name="background_attachment" class="mceEditableSelect"></select></td>
+ </tr>
+
+ <tr>
+ <td><label for="background_hpos">{#style_dlg.background_hpos}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><select id="background_hpos" name="background_hpos" class="mceEditableSelect"></select></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="background_hpos_measurement_label" for="background_hpos_measurement" style="display: none; visibility: hidden;">Horizontal position measurement unit</label>
+ <select id="background_hpos_measurement" name="background_hpos_measurement" aria-labelledby="background_hpos_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="background_vpos">{#style_dlg.background_vpos}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><select id="background_vpos" name="background_vpos" class="mceEditableSelect"></select></td>
+ <td>&nbsp;</td>
+ <td>
+
+ <label id="background_vpos_measurement_label" for="background_vpos_measurement" style="display: none; visibility: hidden;">Vertical position measurement unit</label>
+ <select id="background_vpos_measurement" name="background_vpos_measurement" aria-labelledby="background_vpos_measurement_label">></select></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+</div>
+
+<div id="block_panel" class="panel">
+ <fieldset>
+ <legend>{#style_dlg.block}</legend>
+ <table role="presentation" border="0">
+ <tr>
+ <td><label for="block_wordspacing">{#style_dlg.block_wordspacing}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><select id="block_wordspacing" name="block_wordspacing" class="mceEditableSelect"></select></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="block_wordspacing_measurement_label" for="block_wordspacing_measurement" style="display: none; visibility: hidden;">Word spacing measurement unit</label>
+ <select id="block_wordspacing_measurement" name="block_wordspacing_measurement" aria-labelledby="block_wordspacing_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="block_letterspacing">{#style_dlg.block_letterspacing}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><select id="block_letterspacing" name="block_letterspacing" class="mceEditableSelect"></select></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="block_letterspacing_measurement_label" for="block_letterspacing_measurement" style="display: none; visibility: hidden;">Letter spacing measurement unit</label>
+ <select id="block_letterspacing_measurement" name="block_letterspacing_measurement" aria-labelledby="block_letterspacing_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="block_vertical_alignment">{#style_dlg.block_vertical_alignment}</label></td>
+ <td><select id="block_vertical_alignment" name="block_vertical_alignment" class="mceEditableSelect"></select></td>
+ </tr>
+
+ <tr>
+ <td><label for="block_text_align">{#style_dlg.block_text_align}</label></td>
+ <td><select id="block_text_align" name="block_text_align" class="mceEditableSelect"></select></td>
+ </tr>
+
+ <tr>
+ <td><label for="block_text_indent">{#style_dlg.block_text_indent}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="block_text_indent" name="block_text_indent" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="block_text_indent_measurement_label" for="block_text_indent_measurement" style="display: none; visibility: hidden;">Text Indent Measurement Unit</label>
+
+ <select id="block_text_indent_measurement" name="block_text_indent_measurement" aria-labelledby="block_text_indent_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td><label for="block_whitespace">{#style_dlg.block_whitespace}</label></td>
+ <td><select id="block_whitespace" name="block_whitespace" class="mceEditableSelect"></select></td>
+ </tr>
+
+ <tr>
+ <td><label for="block_display">{#style_dlg.block_display}</label></td>
+ <td><select id="block_display" name="block_display" class="mceEditableSelect"></select></td>
+ </tr>
+ </table>
+ </fieldset>
+</div>
+
+<div id="box_panel" class="panel">
+ <fieldset>
+ <legend>{#style_dlg.box}</legend>
+ <table role="presentation" border="0">
+ <tr>
+ <td><label for="box_width">{#style_dlg.box_width}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="box_width" name="box_width" class="mceEditableSelect" onChange="synch('box_width','positioning_width');" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="box_width_measurement_label" for="box_width_measurement" style="display: none; visibility: hidden;">Box Width Measurement Unit</label>
+ <select id="box_width_measurement" name="box_width_measurement" aria-labelledby="box_width_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td>&nbsp;&nbsp;&nbsp;<label for="box_float">{#style_dlg.box_float}</label></td>
+ <td><select id="box_float" name="box_float" class="mceEditableSelect"></select></td>
+ </tr>
+
+ <tr>
+ <td><label for="box_height">{#style_dlg.box_height}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="box_height" name="box_height" class="mceEditableSelect" onChange="synch('box_height','positioning_height');" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="box_height_measurement_label" for="box_height_measurement" style="display: none; visibility: hidden;">Box Height Measurement Unit</label>
+ <select id="box_height_measurement" name="box_height_measurement" aria-labelledby="box_height_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td>&nbsp;&nbsp;&nbsp;<label for="box_clear">{#style_dlg.box_clear}</label></td>
+ <td><select id="box_clear" name="box_clear" class="mceEditableSelect"></select></td>
+ </tr>
+ </table>
+ </fieldset>
+
+<div style="float: left; width: 49%">
+ <fieldset>
+ <legend>{#style_dlg.padding}</legend>
+
+ <table role="presentation" border="0">
+ <tr>
+ <td>&nbsp;</td>
+ <td><input type="checkbox" id="box_padding_same" name="box_padding_same" class="checkbox" checked="checked" onClick="toggleSame(this,'box_padding');" /> <label for="box_padding_same">{#style_dlg.same}</label></td>
+ </tr>
+ <tr>
+ <td><label for="box_padding_top">{#style_dlg.top}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="box_padding_top" name="box_padding_top" class="mceEditableSelect" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="box_padding_top_measurement_label" for="box_padding_top_measurement" style="display: none; visibility: hidden;">Padding Top Measurement Unit</label>
+ <select id="box_padding_top_measurement" name="box_padding_top_measurement" aria-labelledby="box_padding_top_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="box_padding_right">{#style_dlg.right}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="box_padding_right" name="box_padding_right" class="mceEditableSelect" disabled="disabled" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="box_padding_right_measurement_label" for="box_padding_right_measurement" style="display: none; visibility: hidden;">Padding Right Measurement Unit</label>
+ <select id="box_padding_right_measurement" name="box_padding_right_measurement" disabled="disabled" aria-labelledby="box_padding_right_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="box_padding_bottom">{#style_dlg.bottom}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="box_padding_bottom" name="box_padding_bottom" class="mceEditableSelect" disabled="disabled" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="box_padding_bottom_measurement_label" for="box_padding_bottom_measurement" style="display: none; visibility: hidden;">Padding Bottom Measurement Unit</label>
+ <select id="box_padding_bottom_measurement" name="box_padding_bottom_measurement" disabled="disabled" aria-labelledby="box_padding_bottom_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="box_padding_left">{#style_dlg.left}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="box_padding_left" name="box_padding_left" class="mceEditableSelect" disabled="disabled" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="box_padding_left_measurement_label" for="box_padding_left_measurement" style="display: none; visibility: hidden;">Padding Left Measurement Unit</label>
+ <select id="box_padding_left_measurement" name="box_padding_left_measurement" disabled="disabled" aria-labelledby="box_padding_left_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+</div>
+
+<div style="float: right; width: 49%">
+ <fieldset>
+ <legend>{#style_dlg.margin}</legend>
+
+ <table role="presentation" border="0">
+ <tr>
+ <td>&nbsp;</td>
+ <td><input type="checkbox" id="box_margin_same" name="box_margin_same" class="checkbox" checked="checked" onClick="toggleSame(this,'box_margin');" /> <label for="box_margin_same">{#style_dlg.same}</label></td>
+ </tr>
+ <tr>
+ <td><label for="box_margin_top">{#style_dlg.top}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="box_margin_top" name="box_margin_top" class="mceEditableSelect" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="box_margin_top_measurement_label" for="box_margin_top_measurement" style="display: none; visibility: hidden;">Margin Top Measurement Unit</label>
+ <select id="box_margin_top_measurement" name="box_margin_top_measurement" aria-labelledby="box_margin_top_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="box_margin_right">{#style_dlg.right}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="box_margin_right" name="box_margin_right" class="mceEditableSelect" disabled="disabled" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="box_margin_right_measurement_label" for="box_margin_right_measurement" style="display: none; visibility: hidden;">Margin Right Measurement Unit</label>
+ <select id="box_margin_right_measurement" name="box_margin_right_measurement" disabled="disabled" aria-labelledby="box_margin_right_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="box_margin_bottom">{#style_dlg.bottom}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="box_margin_bottom" name="box_margin_bottom" class="mceEditableSelect" disabled="disabled" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="box_margin_bottom_measurement_label" for="box_margin_bottom_measurement" style="display: none; visibility: hidden;">Margin Bottom Measurement Unit</label>
+ <select id="box_margin_bottom_measurement" name="box_margin_bottom_measurement" disabled="disabled" aria-labelledby="box_margin_bottom_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="box_margin_left">{#style_dlg.left}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="box_margin_left" name="box_margin_left" class="mceEditableSelect" disabled="disabled" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="box_margin_left_measurement_label" for="box_margin_left_measurement" style="display: none; visibility: hidden;">Margin Left Measurement Unit</label>
+ <select id="box_margin_left_measurement" name="box_margin_left_measurement" disabled="disabled" aria-labelledby="box_margin_left_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+</div>
+<br style="clear: both" />
+</div>
+
+<div id="border_panel" class="panel">
+ <fieldset>
+ <legend>{#style_dlg.border}</legend>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0" width="100%">
+ <tr>
+ <td class="tdelim">&nbsp;</td>
+ <td class="tdelim delim">&nbsp;</td>
+ <td class="tdelim">{#style_dlg.style}</td>
+ <td class="tdelim delim">&nbsp;</td>
+ <td class="tdelim">{#style_dlg.width}</td>
+ <td class="tdelim delim">&nbsp;</td>
+ <td class="tdelim">{#style_dlg.color}</td>
+ </tr>
+
+ <tr>
+ <td>&nbsp;</td>
+ <td class="delim">&nbsp;</td>
+ <td><input type="checkbox" id="border_style_same" name="border_style_same" class="checkbox" checked="checked" onClick="toggleSame(this,'border_style');" /> <label for="border_style_same">{#style_dlg.same}</label></td>
+ <td class="delim">&nbsp;</td>
+ <td><input type="checkbox" id="border_width_same" name="border_width_same" class="checkbox" checked="checked" onClick="toggleSame(this,'border_width');" /> <label for="border_width_same">{#style_dlg.same}</label></td>
+ <td class="delim">&nbsp;</td>
+ <td><input type="checkbox" id="border_color_same" name="border_color_same" class="checkbox" checked="checked" onClick="toggleSame(this,'border_color');" /> <label for="border_color_same">{#style_dlg.same}</label></td>
+ </tr>
+
+ <tr>
+ <td>{#style_dlg.top}</td>
+ <td class="delim">&nbsp;</td>
+ <td><select id="border_style_top" name="border_style_top" class="mceEditableSelect"></select></td>
+ <td class="delim">&nbsp;</td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><select id="border_width_top" name="border_width_top" class="mceEditableSelect"></select></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="border_width_top_measurement_label" for="border_width_top_measurement" style="display: none; visibility: hidden;">Width top Measurement Unit</label>
+ <select id="border_width_top_measurement" name="border_width_top_measurement" aria-labelledby="border_width_top_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td class="delim">&nbsp;</td>
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input id="border_color_top" name="border_color_top" type="text" value="" size="9" onChange="updateColor('border_color_top_pick','border_color_top');" /></td>
+ <td id="border_color_top_pickcontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>{#style_dlg.right}</td>
+ <td class="delim">&nbsp;</td>
+ <td><select id="border_style_right" name="border_style_right" class="mceEditableSelect" disabled="disabled"></select></td>
+ <td class="delim">&nbsp;</td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><select id="border_width_right" name="border_width_right" class="mceEditableSelect" disabled="disabled"></select></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="border_width_right_measurement_label" for="border_width_right_measurement" style="display: none; visibility: hidden;">Width Right Measurement Unit</label>
+ <select id="border_width_right_measurement" name="border_width_right_measurement" disabled="disabled" aria-labelledby="border_width_right_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td class="delim">&nbsp;</td>
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input id="border_color_right" name="border_color_right" type="text" value="" size="9" onChange="updateColor('border_color_right_pick','border_color_right');" disabled="disabled" /></td>
+ <td id="border_color_right_pickcontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>{#style_dlg.bottom}</td>
+ <td class="delim">&nbsp;</td>
+ <td><select id="border_style_bottom" name="border_style_bottom" class="mceEditableSelect" disabled="disabled"></select></td>
+ <td class="delim">&nbsp;</td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><select id="border_width_bottom" name="border_width_bottom" class="mceEditableSelect" disabled="disabled"></select></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="border_width_bottom_measurement_label" for="border_width_bottom_measurement" style="display: none; visibility: hidden;">Width Bottom Measurement Unit</label>
+ <select id="border_width_bottom_measurement" name="border_width_bottom_measurement" disabled="disabled" aria-labelledby="border_width_bottom_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td class="delim">&nbsp;</td>
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input id="border_color_bottom" name="border_color_bottom" type="text" value="" size="9" onChange="updateColor('border_color_bottom_pick','border_color_bottom');" disabled="disabled" /></td>
+ <td id="border_color_bottom_pickcontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td>{#style_dlg.left}</td>
+ <td class="delim">&nbsp;</td>
+ <td><select id="border_style_left" name="border_style_left" class="mceEditableSelect" disabled="disabled"></select></td>
+ <td class="delim">&nbsp;</td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><select id="border_width_left" name="border_width_left" class="mceEditableSelect" disabled="disabled"></select></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="border_width_left_measurement_label" for="border_width_left_measurement" style="display: none; visibility: hidden;">Width Left Measurement Unit</label>
+ <select id="border_width_left_measurement" name="border_width_left_measurement" disabled="disabled" aria-labelledby="border_width_left_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td class="delim">&nbsp;</td>
+ <td>
+ <table role="presentation" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td><input id="border_color_left" name="border_color_left" type="text" value="" size="9" onChange="updateColor('border_color_left_pick','border_color_left');" disabled="disabled" /></td>
+ <td id="border_color_left_pickcontainer">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+</div>
+
+<div id="list_panel" class="panel">
+<fieldset>
+ <legend>{#style_dlg.list}</legend>
+ <table role="presentation" border="0">
+ <tr>
+ <td><label for="list_type">{#style_dlg.list_type}</label></td>
+ <td><select id="list_type" name="list_type" class="mceEditableSelect"></select></td>
+ </tr>
+
+ <tr>
+ <td><label for="list_bullet_image">{#style_dlg.bullet_image}</label></td>
+ <td><input id="list_bullet_image" name="list_bullet_image" type="text" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="list_position">{#style_dlg.position}</label></td>
+ <td><select id="list_position" name="list_position" class="mceEditableSelect"></select></td>
+ </tr>
+ </table>
+</fieldset>
+</div>
+
+<div id="positioning_panel" class="panel">
+<fieldset>
+ <legend>{#style_dlg.position}</legend>
+<table role="presentation" border="0">
+ <tr>
+ <td><label for="positioning_type">{#style_dlg.positioning_type}</label></td>
+ <td><select id="positioning_type" name="positioning_type" class="mceEditableSelect"></select></td>
+ <td>&nbsp;&nbsp;&nbsp;<label for="positioning_visibility">{#style_dlg.visibility}</label></td>
+ <td><select id="positioning_visibility" name="positioning_visibility" class="mceEditableSelect"></select></td>
+ </tr>
+
+ <tr>
+ <td><label for="positioning_width">{#style_dlg.width}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="positioning_width" name="positioning_width" onChange="synch('positioning_width','box_width');" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="positioning_width_measurement_label" for="positioning_width_measurement" style="display: none; visibility: hidden;">Positioning width Measurement Unit</label>
+ <select id="positioning_width_measurement" name="positioning_width_measurement" aria-labelledby="positioning_width_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td>&nbsp;&nbsp;&nbsp;<label for="positioning_zindex">{#style_dlg.zindex}</label></td>
+ <td><input type="text" id="positioning_zindex" name="positioning_zindex" /></td>
+ </tr>
+
+ <tr>
+ <td><label for="positioning_height">{#style_dlg.height}</label></td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="positioning_height" name="positioning_height" onChange="synch('positioning_height','box_height');" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="positioning_height_measurement_label" for="positioning_height_measurement" style="display: none; visibility: hidden;">Positioning Height Measurement Unit</label>
+ <select id="positioning_height_measurement" name="positioning_height_measurement" aria-labelledby="positioning_height_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td>&nbsp;&nbsp;&nbsp;<label for="positioning_overflow">{#style_dlg.overflow}</label></td>
+ <td><select id="positioning_overflow" name="positioning_overflow" class="mceEditableSelect"></select></td>
+ </tr>
+</table>
+</fieldset>
+
+<div style="float: left; width: 49%">
+ <fieldset>
+ <legend>{#style_dlg.placement}</legend>
+
+ <table role="presentation" border="0">
+ <tr>
+ <td>&nbsp;</td>
+ <td><input type="checkbox" id="positioning_placement_same" name="positioning_placement_same" class="checkbox" checked="checked" onClick="toggleSame(this,'positioning_placement');" /> <label for="positioning_placement_same">{#style_dlg.same}</label></td>
+ </tr>
+ <tr>
+ <td>{#style_dlg.top}</td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="positioning_placement_top" name="positioning_placement_top" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="positioning_placement_top_measurement_label" for="positioning_placement_top_measurement" style="display: none; visibility: hidden;">Placement Top Measurement Unit</label>
+ <select id="positioning_placement_top_measurement" name="positioning_placement_top_measurement" aria-labelledby="positioning_placement_top_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>{#style_dlg.right}</td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="positioning_placement_right" name="positioning_placement_right" disabled="disabled" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="positioning_placement_right_measurement_label" for="positioning_placement_right_measurement" style="display: none; visibility: hidden;">Placement Right Measurement Unit</label>
+ <select id="positioning_placement_right_measurement" name="positioning_placement_right_measurement" disabled="disabled" aria-labelledby="positioning_placement_right_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>{#style_dlg.bottom}</td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="positioning_placement_bottom" name="positioning_placement_bottom" disabled="disabled" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="positioning_placement_bottom_measurement_label" for="positioning_placement_bottom_measurement" style="display: none; visibility: hidden;">Placement Bottom Measurement Unit</label>
+ <select id="positioning_placement_bottom_measurement" name="positioning_placement_bottom_measurement" disabled="disabled" aria-labelledby="positioning_placement_bottom_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>{#style_dlg.left}</td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="positioning_placement_left" name="positioning_placement_left" disabled="disabled" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="positioning_placement_left_measurement_label" for="positioning_placement_left_measurement" style="display: none; visibility: hidden;">Placement Left Measurement Unit</label>
+ <select id="positioning_placement_left_measurement" name="positioning_placement_left_measurement" disabled="disabled" aria-labelledby="positioning_placement_left_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+</div>
+
+<div style="float: right; width: 49%">
+ <fieldset>
+ <legend>{#style_dlg.clip}</legend>
+
+ <table role="presentation" border="0">
+ <tr>
+ <td>&nbsp;</td>
+ <td><input type="checkbox" id="positioning_clip_same" name="positioning_clip_same" class="checkbox" checked="checked" onClick="toggleSame(this,'positioning_clip');" /> <label for="positioning_clip_same">{#style_dlg.same}</label></td>
+ </tr>
+ <tr>
+ <td>{#style_dlg.top}</td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="positioning_clip_top" name="positioning_clip_top" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="positioning_clip_top_measurement_label" for="positioning_clip_top_measurement" style="display: none; visibility: hidden;">Clip Top Measurement Unit</label>
+ <select id="positioning_clip_top_measurement" name="positioning_clip_top_measurement" aria-labelledby="positioning_clip_top_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>{#style_dlg.right}</td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="positioning_clip_right" name="positioning_clip_right" disabled="disabled" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="positioning_clip_right_measurement_label" for="positioning_clip_right_measurement" style="display: none; visibility: hidden;">Clip Right Measurement Unit</label>
+ <select id="positioning_clip_right_measurement" name="positioning_clip_right_measurement" disabled="disabled" aria-labelledby="positioning_clip_right_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>{#style_dlg.bottom}</td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="positioning_clip_bottom" name="positioning_clip_bottom" disabled="disabled" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="positioning_clip_bottom_measurement_label" for="positioning_clip_bottom_measurement" style="display: none; visibility: hidden;">Clip Bottom Measurement Unit</label>
+ <select id="positioning_clip_bottom_measurement" name="positioning_clip_bottom_measurement" disabled="disabled" aria-labelledby="positioning_clip_bottom_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>{#style_dlg.left}</td>
+ <td>
+ <table role="presentation" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td><input type="text" id="positioning_clip_left" name="positioning_clip_left" disabled="disabled" /></td>
+ <td>&nbsp;</td>
+ <td>
+ <label id="positioning_clip_left_measurement_label" for="positioning_clip_left_measurement" style="display: none; visibility: hidden;">Clip Left Measurement Unit</label>
+ <select id="positioning_clip_left_measurement" name="positioning_clip_left_measurement" disabled="disabled" aria-labelledby="positioning_clip_left_measurement_label"></select>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </fieldset>
+</div>
+<br style="clear: both" />
+</div>
+</div>
+
+<div class="panel_toggle_insert_span">
+ <input type="checkbox" class="checkbox" id="toggle_insert_span" name="toggle_insert_span" onClick="toggleApplyAction();" />
+ <label for="toggle_insert_span">{#style_dlg.toggle_insert_span}</label>
+</div>
+
+<div class="mceActionPanel">
+ <input type="submit" id="insert" name="insert" value="{#update}" />
+ <input type="button" class="button" id="apply" name="apply" value="{#style_dlg.apply}" onClick="applyAction();" />
+ <input type="button" id="cancel" name="cancel" value="{#cancel}" onClick="tinyMCEPopup.close();" />
+</div>
+</form>
+
+<div style="display: none">
+ <div id="container"></div>
+</div>
+
+</body>
+</html>
diff --git a/program/js/tiny_mce/plugins/style/readme.txt b/program/js/tiny_mce/plugins/style/readme.txt
index 5bac30202..e8f84d7fb 100644
--- a/program/js/tiny_mce/plugins/style/readme.txt
+++ b/program/js/tiny_mce/plugins/style/readme.txt
@@ -1,19 +1,19 @@
-Edit CSS Style plug-in notes
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Unlike WYSIWYG editor functionality that operates only on the selected text,
-typically by inserting new HTML elements with the specified styles.
-This plug-in operates on the HTML blocks surrounding the selected text.
-No new HTML elements are created.
-
-This plug-in only operates on the surrounding blocks and not the nearest
-parent node. This means that if a block encapsulates a node,
-e.g <p><span>text</span></p>, then only the styles in the block are
-recognized, not those in the span.
-
-When selecting text that includes multiple blocks at the same level (peers),
-this plug-in accumulates the specified styles in all of the surrounding blocks
-and populates the dialogue checkboxes accordingly. There is no differentiation
-between styles set in all the blocks versus styles set in some of the blocks.
-
-When the [Update] or [Apply] buttons are pressed, the styles selected in the
-checkboxes are applied to all blocks that surround the selected text.
+Edit CSS Style plug-in notes
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Unlike WYSIWYG editor functionality that operates only on the selected text,
+typically by inserting new HTML elements with the specified styles.
+This plug-in operates on the HTML blocks surrounding the selected text.
+No new HTML elements are created.
+
+This plug-in only operates on the surrounding blocks and not the nearest
+parent node. This means that if a block encapsulates a node,
+e.g <p><span>text</span></p>, then only the styles in the block are
+recognized, not those in the span.
+
+When selecting text that includes multiple blocks at the same level (peers),
+this plug-in accumulates the specified styles in all of the surrounding blocks
+and populates the dialogue checkboxes accordingly. There is no differentiation
+between styles set in all the blocks versus styles set in some of the blocks.
+
+When the [Update] or [Apply] buttons are pressed, the styles selected in the
+checkboxes are applied to all blocks that surround the selected text.
diff --git a/program/js/tiny_mce/plugins/tabfocus/editor_plugin_src.js b/program/js/tiny_mce/plugins/tabfocus/editor_plugin_src.js
index 94f45320d..f9df7de7f 100644
--- a/program/js/tiny_mce/plugins/tabfocus/editor_plugin_src.js
+++ b/program/js/tiny_mce/plugins/tabfocus/editor_plugin_src.js
@@ -1,122 +1,122 @@
-/**
- * editor_plugin_src.js
- *
- * Copyright 2009, Moxiecode Systems AB
- * Released under LGPL License.
- *
- * License: http://tinymce.moxiecode.com/license
- * Contributing: http://tinymce.moxiecode.com/contributing
- */
-
-(function() {
- var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, explode = tinymce.explode;
-
- tinymce.create('tinymce.plugins.TabFocusPlugin', {
- init : function(ed, url) {
- function tabCancel(ed, e) {
- if (e.keyCode === 9)
- return Event.cancel(e);
- }
-
- function tabHandler(ed, e) {
- var x, i, f, el, v;
-
- function find(d) {
- el = DOM.select(':input:enabled,*[tabindex]:not(iframe)');
-
- function canSelectRecursive(e) {
- return e.nodeName==="BODY" || (e.type != 'hidden' &&
- !(e.style.display == "none") &&
- !(e.style.visibility == "hidden") && canSelectRecursive(e.parentNode));
- }
- function canSelectInOldIe(el) {
- return el.attributes["tabIndex"].specified || el.nodeName == "INPUT" || el.nodeName == "TEXTAREA";
- }
- function isOldIe() {
- return tinymce.isIE6 || tinymce.isIE7;
- }
- function canSelect(el) {
- return ((!isOldIe() || canSelectInOldIe(el))) && el.getAttribute("tabindex") != '-1' && canSelectRecursive(el);
- }
-
- each(el, function(e, i) {
- if (e.id == ed.id) {
- x = i;
- return false;
- }
- });
- if (d > 0) {
- for (i = x + 1; i < el.length; i++) {
- if (canSelect(el[i]))
- return el[i];
- }
- } else {
- for (i = x - 1; i >= 0; i--) {
- if (canSelect(el[i]))
- return el[i];
- }
- }
-
- return null;
- }
-
- if (e.keyCode === 9) {
- v = explode(ed.getParam('tab_focus', ed.getParam('tabfocus_elements', ':prev,:next')));
-
- if (v.length == 1) {
- v[1] = v[0];
- v[0] = ':prev';
- }
-
- // Find element to focus
- if (e.shiftKey) {
- if (v[0] == ':prev')
- el = find(-1);
- else
- el = DOM.get(v[0]);
- } else {
- if (v[1] == ':next')
- el = find(1);
- else
- el = DOM.get(v[1]);
- }
-
- if (el) {
- if (el.id && (ed = tinymce.get(el.id || el.name)))
- ed.focus();
- else
- window.setTimeout(function() {
- if (!tinymce.isWebKit)
- window.focus();
- el.focus();
- }, 10);
-
- return Event.cancel(e);
- }
- }
- }
-
- ed.onKeyUp.add(tabCancel);
-
- if (tinymce.isGecko) {
- ed.onKeyPress.add(tabHandler);
- ed.onKeyDown.add(tabCancel);
- } else
- ed.onKeyDown.add(tabHandler);
-
- },
-
- getInfo : function() {
- return {
- longname : 'Tabfocus',
- author : 'Moxiecode Systems AB',
- authorurl : 'http://tinymce.moxiecode.com',
- infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus',
- version : tinymce.majorVersion + "." + tinymce.minorVersion
- };
- }
- });
-
- // Register plugin
- tinymce.PluginManager.add('tabfocus', tinymce.plugins.TabFocusPlugin);
-})();
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+ var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, explode = tinymce.explode;
+
+ tinymce.create('tinymce.plugins.TabFocusPlugin', {
+ init : function(ed, url) {
+ function tabCancel(ed, e) {
+ if (e.keyCode === 9)
+ return Event.cancel(e);
+ }
+
+ function tabHandler(ed, e) {
+ var x, i, f, el, v;
+
+ function find(d) {
+ el = DOM.select(':input:enabled,*[tabindex]:not(iframe)');
+
+ function canSelectRecursive(e) {
+ return e.nodeName==="BODY" || (e.type != 'hidden' &&
+ !(e.style.display == "none") &&
+ !(e.style.visibility == "hidden") && canSelectRecursive(e.parentNode));
+ }
+ function canSelectInOldIe(el) {
+ return el.attributes["tabIndex"].specified || el.nodeName == "INPUT" || el.nodeName == "TEXTAREA";
+ }
+ function isOldIe() {
+ return tinymce.isIE6 || tinymce.isIE7;
+ }
+ function canSelect(el) {
+ return ((!isOldIe() || canSelectInOldIe(el))) && el.getAttribute("tabindex") != '-1' && canSelectRecursive(el);
+ }
+
+ each(el, function(e, i) {
+ if (e.id == ed.id) {
+ x = i;
+ return false;
+ }
+ });
+ if (d > 0) {
+ for (i = x + 1; i < el.length; i++) {
+ if (canSelect(el[i]))
+ return el[i];
+ }
+ } else {
+ for (i = x - 1; i >= 0; i--) {
+ if (canSelect(el[i]))
+ return el[i];
+ }
+ }
+
+ return null;
+ }
+
+ if (e.keyCode === 9) {
+ v = explode(ed.getParam('tab_focus', ed.getParam('tabfocus_elements', ':prev,:next')));
+
+ if (v.length == 1) {
+ v[1] = v[0];
+ v[0] = ':prev';
+ }
+
+ // Find element to focus
+ if (e.shiftKey) {
+ if (v[0] == ':prev')
+ el = find(-1);
+ else
+ el = DOM.get(v[0]);
+ } else {
+ if (v[1] == ':next')
+ el = find(1);
+ else
+ el = DOM.get(v[1]);
+ }
+
+ if (el) {
+ if (el.id && (ed = tinymce.get(el.id || el.name)))
+ ed.focus();
+ else
+ window.setTimeout(function() {
+ if (!tinymce.isWebKit)
+ window.focus();
+ el.focus();
+ }, 10);
+
+ return Event.cancel(e);
+ }
+ }
+ }
+
+ ed.onKeyUp.add(tabCancel);
+
+ if (tinymce.isGecko) {
+ ed.onKeyPress.add(tabHandler);
+ ed.onKeyDown.add(tabCancel);
+ } else
+ ed.onKeyDown.add(tabHandler);
+
+ },
+
+ getInfo : function() {
+ return {
+ longname : 'Tabfocus',
+ author : 'Moxiecode Systems AB',
+ authorurl : 'http://tinymce.moxiecode.com',
+ infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus',
+ version : tinymce.majorVersion + "." + tinymce.minorVersion
+ };
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('tabfocus', tinymce.plugins.TabFocusPlugin);
+})();
diff --git a/program/js/tiny_mce/plugins/table/editor_plugin.js b/program/js/tiny_mce/plugins/table/editor_plugin.js
index d6ad7d64d..23c1a83f3 100644
--- a/program/js/tiny_mce/plugins/table/editor_plugin.js
+++ b/program/js/tiny_mce/plugins/table/editor_plugin.js
@@ -1 +1 @@
-(function(d){var e=d.each;function c(g,h){var j=h.ownerDocument,f=j.createRange(),k;f.setStartBefore(h);f.setEnd(g.endContainer,g.endOffset);k=j.createElement("body");k.appendChild(f.cloneContents());return k.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length==0}function a(g,f){return parseInt(g.getAttribute(f)||1)}function b(H,G,K){var g,L,D,o;t();o=G.getParent(K.getStart(),"th,td");if(o){L=F(o);D=I();o=z(L.x,L.y)}function A(N,M){N=N.cloneNode(M);N.removeAttribute("id");return N}function t(){var M=0;g=[];e(["thead","tbody","tfoot"],function(N){var O=G.select("> "+N+" tr",H);e(O,function(P,Q){Q+=M;e(G.select("> td, > th",P),function(W,R){var S,T,U,V;if(g[Q]){while(g[Q][R]){R++}}U=a(W,"rowspan");V=a(W,"colspan");for(T=Q;T<Q+U;T++){if(!g[T]){g[T]=[]}for(S=R;S<R+V;S++){g[T][S]={part:N,real:T==Q&&S==R,elm:W,rowspan:U,colspan:V}}}})});M+=O.length})}function z(M,O){var N;N=g[O];if(N){return N[M]}}function s(O,M,N){if(O){N=parseInt(N);if(N===1){O.removeAttribute(M,1)}else{O.setAttribute(M,N,1)}}}function j(M){return M&&(G.hasClass(M.elm,"mceSelected")||M==o)}function k(){var M=[];e(H.rows,function(N){e(N.cells,function(O){if(G.hasClass(O,"mceSelected")||O==o.elm){M.push(N);return false}})});return M}function r(){var M=G.createRng();M.setStartAfter(H);M.setEndAfter(H);K.setRng(M);G.remove(H)}function f(M){var N;d.walk(M,function(P){var O;if(P.nodeType==3){e(G.getParents(P.parentNode,null,M).reverse(),function(Q){Q=A(Q,false);if(!N){N=O=Q}else{if(O){O.appendChild(Q)}}O=Q});if(O){O.innerHTML=d.isIE?"&nbsp;":'<br data-mce-bogus="1" />'}return false}},"childNodes");M=A(M,false);s(M,"rowSpan",1);s(M,"colSpan",1);if(N){M.appendChild(N)}else{if(!d.isIE){M.innerHTML='<br data-mce-bogus="1" />'}}return M}function q(){var M=G.createRng();e(G.select("tr",H),function(N){if(N.cells.length==0){G.remove(N)}});if(G.select("tr",H).length==0){M.setStartAfter(H);M.setEndAfter(H);K.setRng(M);G.remove(H);return}e(G.select("thead,tbody,tfoot",H),function(N){if(N.rows.length==0){G.remove(N)}});t();row=g[Math.min(g.length-1,L.y)];if(row){K.select(row[Math.min(row.length-1,L.x)].elm,true);K.collapse(true)}}function u(S,Q,U,R){var P,N,M,O,T;P=g[Q][S].elm.parentNode;for(M=1;M<=U;M++){P=G.getNext(P,"tr");if(P){for(N=S;N>=0;N--){T=g[Q+M][N].elm;if(T.parentNode==P){for(O=1;O<=R;O++){G.insertAfter(f(T),T)}break}}if(N==-1){for(O=1;O<=R;O++){P.insertBefore(f(P.cells[0]),P.cells[0])}}}}}function C(){e(g,function(M,N){e(M,function(P,O){var S,R,T,Q;if(j(P)){P=P.elm;S=a(P,"colspan");R=a(P,"rowspan");if(S>1||R>1){s(P,"rowSpan",1);s(P,"colSpan",1);for(Q=0;Q<S-1;Q++){G.insertAfter(f(P),P)}u(O,N,R-1,S)}}})})}function p(V,S,Y){var P,O,X,W,U,R,T,M,V,N,Q;if(V){pos=F(V);P=pos.x;O=pos.y;X=P+(S-1);W=O+(Y-1)}else{L=D=null;e(g,function(Z,aa){e(Z,function(ac,ab){if(j(ac)){if(!L){L={x:ab,y:aa}}D={x:ab,y:aa}}})});P=L.x;O=L.y;X=D.x;W=D.y}T=z(P,O);M=z(X,W);if(T&&M&&T.part==M.part){C();t();T=z(P,O).elm;s(T,"colSpan",(X-P)+1);s(T,"rowSpan",(W-O)+1);for(R=O;R<=W;R++){for(U=P;U<=X;U++){if(!g[R]||!g[R][U]){continue}V=g[R][U].elm;if(V!=T){N=d.grep(V.childNodes);e(N,function(Z){T.appendChild(Z)});if(N.length){N=d.grep(T.childNodes);Q=0;e(N,function(Z){if(Z.nodeName=="BR"&&G.getAttrib(Z,"data-mce-bogus")&&Q++<N.length-1){T.removeChild(Z)}})}G.remove(V)}}}q()}}function l(Q){var M,S,P,R,T,U,N,V,O;e(g,function(W,X){e(W,function(Z,Y){if(j(Z)){Z=Z.elm;T=Z.parentNode;U=A(T,false);M=X;if(Q){return false}}});if(Q){return !M}});for(R=0;R<g[0].length;R++){if(!g[M][R]){continue}S=g[M][R].elm;if(S!=P){if(!Q){O=a(S,"rowspan");if(O>1){s(S,"rowSpan",O+1);continue}}else{if(M>0&&g[M-1][R]){V=g[M-1][R].elm;O=a(V,"rowSpan");if(O>1){s(V,"rowSpan",O+1);continue}}}N=f(S);s(N,"colSpan",S.colSpan);U.appendChild(N);P=S}}if(U.hasChildNodes()){if(!Q){G.insertAfter(U,T)}else{T.parentNode.insertBefore(U,T)}}}function h(N){var O,M;e(g,function(P,Q){e(P,function(S,R){if(j(S)){O=R;if(N){return false}}});if(N){return !O}});e(g,function(S,T){var P,Q,R;if(!S[O]){return}P=S[O].elm;if(P!=M){R=a(P,"colspan");Q=a(P,"rowspan");if(R==1){if(!N){G.insertAfter(f(P),P);u(O,T,Q-1,R)}else{P.parentNode.insertBefore(f(P),P);u(O,T,Q-1,R)}}else{s(P,"colSpan",P.colSpan+1)}M=P}})}function n(){var M=[];e(g,function(N,O){e(N,function(Q,P){if(j(Q)&&d.inArray(M,P)===-1){e(g,function(T){var R=T[P].elm,S;S=a(R,"colSpan");if(S>1){s(R,"colSpan",S-1)}else{G.remove(R)}});M.push(P)}})});q()}function m(){var N;function M(Q){var P,R,O;P=G.getNext(Q,"tr");e(Q.cells,function(S){var T=a(S,"rowSpan");if(T>1){s(S,"rowSpan",T-1);R=F(S);u(R.x,R.y,1,1)}});R=F(Q.cells[0]);e(g[R.y],function(S){var T;S=S.elm;if(S!=O){T=a(S,"rowSpan");if(T<=1){G.remove(S)}else{s(S,"rowSpan",T-1)}O=S}})}N=k();e(N.reverse(),function(O){M(O)});q()}function E(){var M=k();G.remove(M);q();return M}function J(){var M=k();e(M,function(O,N){M[N]=A(O,true)});return M}function B(O,N){var P=k(),M=P[N?0:P.length-1],Q=M.cells.length;e(g,function(S){var R;Q=0;e(S,function(U,T){if(U.real){Q+=U.colspan}if(U.elm.parentNode==M){R=1}});if(R){return false}});if(!N){O.reverse()}e(O,function(T){var S=T.cells.length,R;for(i=0;i<S;i++){R=T.cells[i];s(R,"colSpan",1);s(R,"rowSpan",1)}for(i=S;i<Q;i++){T.appendChild(f(T.cells[S-1]))}for(i=Q;i<S;i++){G.remove(T.cells[i])}if(N){M.parentNode.insertBefore(T,M)}else{G.insertAfter(T,M)}});G.removeClass(G.select("td.mceSelected,th.mceSelected"),"mceSelected")}function F(M){var N;e(g,function(O,P){e(O,function(R,Q){if(R.elm==M){N={x:Q,y:P};return false}});return !N});return N}function w(M){L=F(M)}function I(){var O,N,M;N=M=0;e(g,function(P,Q){e(P,function(S,R){var U,T;if(j(S)){S=g[Q][R];if(R>N){N=R}if(Q>M){M=Q}if(S.real){U=S.colspan-1;T=S.rowspan-1;if(U){if(R+U>N){N=R+U}}if(T){if(Q+T>M){M=Q+T}}}}})});return{x:N,y:M}}function v(S){var P,O,U,T,N,M,Q,R;D=F(S);if(L&&D){P=Math.min(L.x,D.x);O=Math.min(L.y,D.y);U=Math.max(L.x,D.x);T=Math.max(L.y,D.y);N=U;M=T;for(y=O;y<=M;y++){S=g[y][P];if(!S.real){if(P-(S.colspan-1)<P){P-=S.colspan-1}}}for(x=P;x<=N;x++){S=g[O][x];if(!S.real){if(O-(S.rowspan-1)<O){O-=S.rowspan-1}}}for(y=O;y<=T;y++){for(x=P;x<=U;x++){S=g[y][x];if(S.real){Q=S.colspan-1;R=S.rowspan-1;if(Q){if(x+Q>N){N=x+Q}}if(R){if(y+R>M){M=y+R}}}}}G.removeClass(G.select("td.mceSelected,th.mceSelected"),"mceSelected");for(y=O;y<=M;y++){for(x=P;x<=N;x++){if(g[y][x]){G.addClass(g[y][x].elm,"mceSelected")}}}}}d.extend(this,{deleteTable:r,split:C,merge:p,insertRow:l,insertCol:h,deleteCols:n,deleteRows:m,cutRows:E,copyRows:J,pasteRows:B,getPos:F,setStartCell:w,setEndCell:v})}d.create("tinymce.plugins.TablePlugin",{init:function(g,h){var f,m,j=true;function l(p){var o=g.selection,n=g.dom.getParent(p||o.getNode(),"table");if(n){return new b(n,g.dom,o)}}function k(){g.getBody().style.webkitUserSelect="";if(j){g.dom.removeClass(g.dom.select("td.mceSelected,th.mceSelected"),"mceSelected");j=false}}e([["table","table.desc","mceInsertTable",true],["delete_table","table.del","mceTableDelete"],["delete_col","table.delete_col_desc","mceTableDeleteCol"],["delete_row","table.delete_row_desc","mceTableDeleteRow"],["col_after","table.col_after_desc","mceTableInsertColAfter"],["col_before","table.col_before_desc","mceTableInsertColBefore"],["row_after","table.row_after_desc","mceTableInsertRowAfter"],["row_before","table.row_before_desc","mceTableInsertRowBefore"],["row_props","table.row_desc","mceTableRowProps",true],["cell_props","table.cell_desc","mceTableCellProps",true],["split_cells","table.split_cells_desc","mceTableSplitCells",true],["merge_cells","table.merge_cells_desc","mceTableMergeCells",true]],function(n){g.addButton(n[0],{title:n[1],cmd:n[2],ui:n[3]})});if(!d.isIE){g.onClick.add(function(n,o){o=o.target;if(o.nodeName==="TABLE"){n.selection.select(o);n.nodeChanged()}})}g.onPreProcess.add(function(o,p){var n,q,r,t=o.dom,s;n=t.select("table",p.node);q=n.length;while(q--){r=n[q];t.setAttrib(r,"data-mce-style","");if((s=t.getAttrib(r,"width"))){t.setStyle(r,"width",s);t.setAttrib(r,"width","")}if((s=t.getAttrib(r,"height"))){t.setStyle(r,"height",s);t.setAttrib(r,"height","")}}});g.onNodeChange.add(function(q,o,s){var r;s=q.selection.getStart();r=q.dom.getParent(s,"td,th,caption");o.setActive("table",s.nodeName==="TABLE"||!!r);if(r&&r.nodeName==="CAPTION"){r=0}o.setDisabled("delete_table",!r);o.setDisabled("delete_col",!r);o.setDisabled("delete_table",!r);o.setDisabled("delete_row",!r);o.setDisabled("col_after",!r);o.setDisabled("col_before",!r);o.setDisabled("row_after",!r);o.setDisabled("row_before",!r);o.setDisabled("row_props",!r);o.setDisabled("cell_props",!r);o.setDisabled("split_cells",!r);o.setDisabled("merge_cells",!r)});g.onInit.add(function(r){var p,t,q=r.dom,u;f=r.windowManager;r.onMouseDown.add(function(w,z){if(z.button!=2){k();t=q.getParent(z.target,"td,th");p=q.getParent(t,"table")}});q.bind(r.getDoc(),"mouseover",function(C){var A,z,B=C.target;if(t&&(u||B!=t)&&(B.nodeName=="TD"||B.nodeName=="TH")){z=q.getParent(B,"table");if(z==p){if(!u){u=l(z);u.setStartCell(t);r.getBody().style.webkitUserSelect="none"}u.setEndCell(B);j=true}A=r.selection.getSel();try{if(A.removeAllRanges){A.removeAllRanges()}else{A.empty()}}catch(w){}C.preventDefault()}});r.onMouseUp.add(function(F,G){var z,B=F.selection,H,I=B.getSel(),w,C,A,E;if(t){if(u){F.getBody().style.webkitUserSelect=""}function D(J,L){var K=new d.dom.TreeWalker(J,J);do{if(J.nodeType==3&&d.trim(J.nodeValue).length!=0){if(L){z.setStart(J,0)}else{z.setEnd(J,J.nodeValue.length)}return}if(J.nodeName=="BR"){if(L){z.setStartBefore(J)}else{z.setEndBefore(J)}return}}while(J=(L?K.next():K.prev()))}H=q.select("td.mceSelected,th.mceSelected");if(H.length>0){z=q.createRng();C=H[0];E=H[H.length-1];z.setStartBefore(C);z.setEndAfter(C);D(C,1);w=new d.dom.TreeWalker(C,q.getParent(H[0],"table"));do{if(C.nodeName=="TD"||C.nodeName=="TH"){if(!q.hasClass(C,"mceSelected")){break}A=C}}while(C=w.next());D(A);B.setRng(z)}F.nodeChanged();t=u=p=null}});r.onKeyUp.add(function(w,z){k()});r.onKeyDown.add(function(w,z){n(w)});r.onMouseDown.add(function(w,z){if(z.button!=2){n(w)}});function o(D,z,A,F){var B=3,G=D.dom.getParent(z.startContainer,"TABLE"),C,w,E;if(G){C=G.parentNode}w=z.startContainer.nodeType==B&&z.startOffset==0&&z.endOffset==0&&F&&(A.nodeName=="TR"||A==C);E=(A.nodeName=="TD"||A.nodeName=="TH")&&!F;return w||E}function n(A){if(!d.isWebKit){return}var z=A.selection.getRng();var C=A.selection.getNode();var B=A.dom.getParent(z.startContainer,"TD,TH");if(!o(A,z,C,B)){return}if(!B){B=C}var w=B.lastChild;while(w.lastChild){w=w.lastChild}z.setEnd(w,w.nodeValue.length);A.selection.setRng(z)}r.plugins.table.fixTableCellSelection=n;if(r&&r.plugins.contextmenu){r.plugins.contextmenu.onContextMenu.add(function(A,w,C){var D,B=r.selection,z=B.getNode()||r.getBody();if(r.dom.getParent(C,"td")||r.dom.getParent(C,"th")||r.dom.select("td.mceSelected,th.mceSelected").length){w.removeAll();if(z.nodeName=="A"&&!r.dom.getAttrib(z,"name")){w.add({title:"advanced.link_desc",icon:"link",cmd:r.plugins.advlink?"mceAdvLink":"mceLink",ui:true});w.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});w.addSeparator()}if(z.nodeName=="IMG"&&z.className.indexOf("mceItem")==-1){w.add({title:"advanced.image_desc",icon:"image",cmd:r.plugins.advimage?"mceAdvImage":"mceImage",ui:true});w.addSeparator()}w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",value:{action:"insert"}});w.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable"});w.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete"});w.addSeparator();D=w.addMenu({title:"table.cell"});D.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps"});D.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells"});D.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells"});D=w.addMenu({title:"table.row"});D.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps"});D.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});D.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});D.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});D.addSeparator();D.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});D.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});D.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"}).setDisabled(!m);D.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"}).setDisabled(!m);D=w.addMenu({title:"table.col"});D.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});D.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});D.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable"})}})}if(d.isWebKit){function v(C,N){var L=d.VK;var Q=N.keyCode;function O(Y,U,S){var T=Y?"previousSibling":"nextSibling";var Z=C.dom.getParent(U,"tr");var X=Z[T];if(X){z(C,U,X,Y);d.dom.Event.cancel(S);return true}else{var aa=C.dom.getParent(Z,"table");var W=Z.parentNode;var R=W.nodeName.toLowerCase();if(R==="tbody"||R===(Y?"tfoot":"thead")){var V=w(Y,aa,W,"tbody");if(V!==null){return K(Y,V,U,S)}}return M(Y,Z,T,aa,S)}}function w(V,T,U,X){var S=C.dom.select(">"+X,T);var R=S.indexOf(U);if(V&&R===0||!V&&R===S.length-1){return B(V,T)}else{if(R===-1){var W=U.tagName.toLowerCase()==="thead"?0:S.length-1;return S[W]}else{return S[R+(V?-1:1)]}}}function B(U,T){var S=U?"thead":"tfoot";var R=C.dom.select(">"+S,T);return R.length!==0?R[0]:null}function K(V,T,S,U){var R=J(T,V);R&&z(C,S,R,V);d.dom.Event.cancel(U);return true}function M(Y,U,R,X,W){var S=X[R];if(S){F(S);return true}else{var V=C.dom.getParent(X,"td,th");if(V){return O(Y,V,W)}else{var T=J(U,!Y);F(T);return d.dom.Event.cancel(W)}}}function J(S,R){var T=S&&S[R?"lastChild":"firstChild"];return T&&T.nodeName==="BR"?C.dom.getParent(T,"td,th"):T}function F(R){C.selection.setCursorLocation(R,0)}function A(){return Q==L.UP||Q==L.DOWN}function D(R){var T=R.selection.getNode();var S=R.dom.getParent(T,"tr");return S!==null}function P(S){var R=0;var T=S;while(T.previousSibling){T=T.previousSibling;R=R+a(T,"colspan")}return R}function E(T,R){var U=0;var S=0;e(T.children,function(V,W){U=U+a(V,"colspan");S=W;if(U>R){return false}});return S}function z(T,W,Y,V){var X=P(T.dom.getParent(W,"td,th"));var S=E(Y,X);var R=Y.childNodes[S];var U=J(R,V);F(U||R)}function H(R){var T=C.selection.getNode();var U=C.dom.getParent(T,"td,th");var S=C.dom.getParent(R,"td,th");return U&&U!==S&&I(U,S)}function I(S,R){return C.dom.getParent(S,"TABLE")===C.dom.getParent(R,"TABLE")}if(A()&&D(C)){var G=C.selection.getNode();setTimeout(function(){if(H(G)){O(!N.shiftKey&&Q===L.UP,G,N)}},0)}}r.onKeyDown.add(v)}if(!d.isIE){function s(){var w;for(w=r.getBody().lastChild;w&&w.nodeType==3&&!w.nodeValue.length;w=w.previousSibling){}if(w&&w.nodeName=="TABLE"){r.dom.add(r.getBody(),"p",null,'<br data-mce-bogus="1" />')}}if(d.isGecko){r.onKeyDown.add(function(z,B){var w,A,C=z.dom;if(B.keyCode==37||B.keyCode==38){w=z.selection.getRng();A=C.getParent(w.startContainer,"table");if(A&&z.getBody().firstChild==A){if(c(w,A)){w=C.createRng();w.setStartBefore(A);w.setEndBefore(A);z.selection.setRng(w);B.preventDefault()}}}})}r.onKeyUp.add(s);r.onSetContent.add(s);r.onVisualAid.add(s);r.onPreProcess.add(function(w,A){var z=A.node.lastChild;if(z&&z.childNodes.length==1&&z.firstChild.nodeName=="BR"&&z.previousSibling&&z.previousSibling.nodeName=="TABLE"){w.dom.remove(z)}});if(d.isGecko){r.onKeyDown.add(function(z,B){if(B.keyCode===d.VK.ENTER&&B.shiftKey){var A=z.selection.getRng().startContainer;var C=q.getParent(A,"td,th");if(C){var w=z.getDoc().createTextNode("\uFEFF");q.insertAfter(w,A)}}})}s();r.startContent=r.getContent({format:"raw"})}});e({mceTableSplitCells:function(n){n.split()},mceTableMergeCells:function(o){var p,q,n;n=g.dom.getParent(g.selection.getNode(),"th,td");if(n){p=n.rowSpan;q=n.colSpan}if(!g.dom.select("td.mceSelected,th.mceSelected").length){f.open({url:h+"/merge_cells.htm",width:240+parseInt(g.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(g.getLang("table.merge_cells_delta_height",0)),inline:1},{rows:p,cols:q,onaction:function(r){o.merge(n,r.cols,r.rows)},plugin_url:h})}else{o.merge()}},mceTableInsertRowBefore:function(n){n.insertRow(true)},mceTableInsertRowAfter:function(n){n.insertRow()},mceTableInsertColBefore:function(n){n.insertCol(true)},mceTableInsertColAfter:function(n){n.insertCol()},mceTableDeleteCol:function(n){n.deleteCols()},mceTableDeleteRow:function(n){n.deleteRows()},mceTableCutRow:function(n){m=n.cutRows()},mceTableCopyRow:function(n){m=n.copyRows()},mceTablePasteRowBefore:function(n){n.pasteRows(m,true)},mceTablePasteRowAfter:function(n){n.pasteRows(m)},mceTableDelete:function(n){n.deleteTable()}},function(o,n){g.addCommand(n,function(){var p=l();if(p){o(p);g.execCommand("mceRepaint");k()}})});e({mceInsertTable:function(n){f.open({url:h+"/table.htm",width:400+parseInt(g.getLang("table.table_delta_width",0)),height:320+parseInt(g.getLang("table.table_delta_height",0)),inline:1},{plugin_url:h,action:n?n.action:0})},mceTableRowProps:function(){f.open({url:h+"/row.htm",width:400+parseInt(g.getLang("table.rowprops_delta_width",0)),height:295+parseInt(g.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:h})},mceTableCellProps:function(){f.open({url:h+"/cell.htm",width:400+parseInt(g.getLang("table.cellprops_delta_width",0)),height:295+parseInt(g.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:h})}},function(o,n){g.addCommand(n,function(p,q){o(q)})})}});d.PluginManager.add("table",d.plugins.TablePlugin)})(tinymce); \ No newline at end of file
+(function(d){var e=d.each;function c(g,h){var j=h.ownerDocument,f=j.createRange(),k;f.setStartBefore(h);f.setEnd(g.endContainer,g.endOffset);k=j.createElement("body");k.appendChild(f.cloneContents());return k.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length==0}function a(g,f){return parseInt(g.getAttribute(f)||1)}function b(H,G,K){var g,L,D,o;t();o=G.getParent(K.getStart(),"th,td");if(o){L=F(o);D=I();o=z(L.x,L.y)}function A(N,M){N=N.cloneNode(M);N.removeAttribute("id");return N}function t(){var M=0;g=[];e(["thead","tbody","tfoot"],function(N){var O=G.select("> "+N+" tr",H);e(O,function(P,Q){Q+=M;e(G.select("> td, > th",P),function(W,R){var S,T,U,V;if(g[Q]){while(g[Q][R]){R++}}U=a(W,"rowspan");V=a(W,"colspan");for(T=Q;T<Q+U;T++){if(!g[T]){g[T]=[]}for(S=R;S<R+V;S++){g[T][S]={part:N,real:T==Q&&S==R,elm:W,rowspan:U,colspan:V}}}})});M+=O.length})}function z(M,O){var N;N=g[O];if(N){return N[M]}}function s(O,M,N){if(O){N=parseInt(N);if(N===1){O.removeAttribute(M,1)}else{O.setAttribute(M,N,1)}}}function j(M){return M&&(G.hasClass(M.elm,"mceSelected")||M==o)}function k(){var M=[];e(H.rows,function(N){e(N.cells,function(O){if(G.hasClass(O,"mceSelected")||O==o.elm){M.push(N);return false}})});return M}function r(){var M=G.createRng();M.setStartAfter(H);M.setEndAfter(H);K.setRng(M);G.remove(H)}function f(M){var N;d.walk(M,function(P){var O;if(P.nodeType==3){e(G.getParents(P.parentNode,null,M).reverse(),function(Q){Q=A(Q,false);if(!N){N=O=Q}else{if(O){O.appendChild(Q)}}O=Q});if(O){O.innerHTML=d.isIE?"&nbsp;":'<br data-mce-bogus="1" />'}return false}},"childNodes");M=A(M,false);s(M,"rowSpan",1);s(M,"colSpan",1);if(N){M.appendChild(N)}else{if(!d.isIE){M.innerHTML='<br data-mce-bogus="1" />'}}return M}function q(){var M=G.createRng();e(G.select("tr",H),function(N){if(N.cells.length==0){G.remove(N)}});if(G.select("tr",H).length==0){M.setStartAfter(H);M.setEndAfter(H);K.setRng(M);G.remove(H);return}e(G.select("thead,tbody,tfoot",H),function(N){if(N.rows.length==0){G.remove(N)}});t();row=g[Math.min(g.length-1,L.y)];if(row){K.select(row[Math.min(row.length-1,L.x)].elm,true);K.collapse(true)}}function u(S,Q,U,R){var P,N,M,O,T;P=g[Q][S].elm.parentNode;for(M=1;M<=U;M++){P=G.getNext(P,"tr");if(P){for(N=S;N>=0;N--){T=g[Q+M][N].elm;if(T.parentNode==P){for(O=1;O<=R;O++){G.insertAfter(f(T),T)}break}}if(N==-1){for(O=1;O<=R;O++){P.insertBefore(f(P.cells[0]),P.cells[0])}}}}}function C(){e(g,function(M,N){e(M,function(P,O){var S,R,T,Q;if(j(P)){P=P.elm;S=a(P,"colspan");R=a(P,"rowspan");if(S>1||R>1){s(P,"rowSpan",1);s(P,"colSpan",1);for(Q=0;Q<S-1;Q++){G.insertAfter(f(P),P)}u(O,N,R-1,S)}}})})}function p(V,S,Y){var P,O,X,W,U,R,T,M,V,N,Q;if(V){pos=F(V);P=pos.x;O=pos.y;X=P+(S-1);W=O+(Y-1)}else{L=D=null;e(g,function(Z,aa){e(Z,function(ac,ab){if(j(ac)){if(!L){L={x:ab,y:aa}}D={x:ab,y:aa}}})});P=L.x;O=L.y;X=D.x;W=D.y}T=z(P,O);M=z(X,W);if(T&&M&&T.part==M.part){C();t();T=z(P,O).elm;s(T,"colSpan",(X-P)+1);s(T,"rowSpan",(W-O)+1);for(R=O;R<=W;R++){for(U=P;U<=X;U++){if(!g[R]||!g[R][U]){continue}V=g[R][U].elm;if(V!=T){N=d.grep(V.childNodes);e(N,function(Z){T.appendChild(Z)});if(N.length){N=d.grep(T.childNodes);Q=0;e(N,function(Z){if(Z.nodeName=="BR"&&G.getAttrib(Z,"data-mce-bogus")&&Q++<N.length-1){T.removeChild(Z)}})}G.remove(V)}}}q()}}function l(Q){var M,S,P,R,T,U,N,V,O;e(g,function(W,X){e(W,function(Z,Y){if(j(Z)){Z=Z.elm;T=Z.parentNode;U=A(T,false);M=X;if(Q){return false}}});if(Q){return !M}});for(R=0;R<g[0].length;R++){if(!g[M][R]){continue}S=g[M][R].elm;if(S!=P){if(!Q){O=a(S,"rowspan");if(O>1){s(S,"rowSpan",O+1);continue}}else{if(M>0&&g[M-1][R]){V=g[M-1][R].elm;O=a(V,"rowSpan");if(O>1){s(V,"rowSpan",O+1);continue}}}N=f(S);s(N,"colSpan",S.colSpan);U.appendChild(N);P=S}}if(U.hasChildNodes()){if(!Q){G.insertAfter(U,T)}else{T.parentNode.insertBefore(U,T)}}}function h(N){var O,M;e(g,function(P,Q){e(P,function(S,R){if(j(S)){O=R;if(N){return false}}});if(N){return !O}});e(g,function(S,T){var P,Q,R;if(!S[O]){return}P=S[O].elm;if(P!=M){R=a(P,"colspan");Q=a(P,"rowspan");if(R==1){if(!N){G.insertAfter(f(P),P);u(O,T,Q-1,R)}else{P.parentNode.insertBefore(f(P),P);u(O,T,Q-1,R)}}else{s(P,"colSpan",P.colSpan+1)}M=P}})}function n(){var M=[];e(g,function(N,O){e(N,function(Q,P){if(j(Q)&&d.inArray(M,P)===-1){e(g,function(T){var R=T[P].elm,S;S=a(R,"colSpan");if(S>1){s(R,"colSpan",S-1)}else{G.remove(R)}});M.push(P)}})});q()}function m(){var N;function M(Q){var P,R,O;P=G.getNext(Q,"tr");e(Q.cells,function(S){var T=a(S,"rowSpan");if(T>1){s(S,"rowSpan",T-1);R=F(S);u(R.x,R.y,1,1)}});R=F(Q.cells[0]);e(g[R.y],function(S){var T;S=S.elm;if(S!=O){T=a(S,"rowSpan");if(T<=1){G.remove(S)}else{s(S,"rowSpan",T-1)}O=S}})}N=k();e(N.reverse(),function(O){M(O)});q()}function E(){var M=k();G.remove(M);q();return M}function J(){var M=k();e(M,function(O,N){M[N]=A(O,true)});return M}function B(O,N){var P=k(),M=P[N?0:P.length-1],Q=M.cells.length;e(g,function(S){var R;Q=0;e(S,function(U,T){if(U.real){Q+=U.colspan}if(U.elm.parentNode==M){R=1}});if(R){return false}});if(!N){O.reverse()}e(O,function(T){var S=T.cells.length,R;for(i=0;i<S;i++){R=T.cells[i];s(R,"colSpan",1);s(R,"rowSpan",1)}for(i=S;i<Q;i++){T.appendChild(f(T.cells[S-1]))}for(i=Q;i<S;i++){G.remove(T.cells[i])}if(N){M.parentNode.insertBefore(T,M)}else{G.insertAfter(T,M)}});G.removeClass(G.select("td.mceSelected,th.mceSelected"),"mceSelected")}function F(M){var N;e(g,function(O,P){e(O,function(R,Q){if(R.elm==M){N={x:Q,y:P};return false}});return !N});return N}function w(M){L=F(M)}function I(){var O,N,M;N=M=0;e(g,function(P,Q){e(P,function(S,R){var U,T;if(j(S)){S=g[Q][R];if(R>N){N=R}if(Q>M){M=Q}if(S.real){U=S.colspan-1;T=S.rowspan-1;if(U){if(R+U>N){N=R+U}}if(T){if(Q+T>M){M=Q+T}}}}})});return{x:N,y:M}}function v(S){var P,O,U,T,N,M,Q,R;D=F(S);if(L&&D){P=Math.min(L.x,D.x);O=Math.min(L.y,D.y);U=Math.max(L.x,D.x);T=Math.max(L.y,D.y);N=U;M=T;for(y=O;y<=M;y++){S=g[y][P];if(!S.real){if(P-(S.colspan-1)<P){P-=S.colspan-1}}}for(x=P;x<=N;x++){S=g[O][x];if(!S.real){if(O-(S.rowspan-1)<O){O-=S.rowspan-1}}}for(y=O;y<=T;y++){for(x=P;x<=U;x++){S=g[y][x];if(S.real){Q=S.colspan-1;R=S.rowspan-1;if(Q){if(x+Q>N){N=x+Q}}if(R){if(y+R>M){M=y+R}}}}}G.removeClass(G.select("td.mceSelected,th.mceSelected"),"mceSelected");for(y=O;y<=M;y++){for(x=P;x<=N;x++){if(g[y][x]){G.addClass(g[y][x].elm,"mceSelected")}}}}}d.extend(this,{deleteTable:r,split:C,merge:p,insertRow:l,insertCol:h,deleteCols:n,deleteRows:m,cutRows:E,copyRows:J,pasteRows:B,getPos:F,setStartCell:w,setEndCell:v})}d.create("tinymce.plugins.TablePlugin",{init:function(g,h){var f,m,j=true;function l(p){var o=g.selection,n=g.dom.getParent(p||o.getNode(),"table");if(n){return new b(n,g.dom,o)}}function k(){g.getBody().style.webkitUserSelect="";if(j){g.dom.removeClass(g.dom.select("td.mceSelected,th.mceSelected"),"mceSelected");j=false}}e([["table","table.desc","mceInsertTable",true],["delete_table","table.del","mceTableDelete"],["delete_col","table.delete_col_desc","mceTableDeleteCol"],["delete_row","table.delete_row_desc","mceTableDeleteRow"],["col_after","table.col_after_desc","mceTableInsertColAfter"],["col_before","table.col_before_desc","mceTableInsertColBefore"],["row_after","table.row_after_desc","mceTableInsertRowAfter"],["row_before","table.row_before_desc","mceTableInsertRowBefore"],["row_props","table.row_desc","mceTableRowProps",true],["cell_props","table.cell_desc","mceTableCellProps",true],["split_cells","table.split_cells_desc","mceTableSplitCells",true],["merge_cells","table.merge_cells_desc","mceTableMergeCells",true]],function(n){g.addButton(n[0],{title:n[1],cmd:n[2],ui:n[3]})});if(!d.isIE){g.onClick.add(function(n,o){o=o.target;if(o.nodeName==="TABLE"){n.selection.select(o);n.nodeChanged()}})}g.onPreProcess.add(function(o,p){var n,q,r,t=o.dom,s;n=t.select("table",p.node);q=n.length;while(q--){r=n[q];t.setAttrib(r,"data-mce-style","");if((s=t.getAttrib(r,"width"))){t.setStyle(r,"width",s);t.setAttrib(r,"width","")}if((s=t.getAttrib(r,"height"))){t.setStyle(r,"height",s);t.setAttrib(r,"height","")}}});g.onNodeChange.add(function(q,o,s){var r;s=q.selection.getStart();r=q.dom.getParent(s,"td,th,caption");o.setActive("table",s.nodeName==="TABLE"||!!r);if(r&&r.nodeName==="CAPTION"){r=0}o.setDisabled("delete_table",!r);o.setDisabled("delete_col",!r);o.setDisabled("delete_table",!r);o.setDisabled("delete_row",!r);o.setDisabled("col_after",!r);o.setDisabled("col_before",!r);o.setDisabled("row_after",!r);o.setDisabled("row_before",!r);o.setDisabled("row_props",!r);o.setDisabled("cell_props",!r);o.setDisabled("split_cells",!r);o.setDisabled("merge_cells",!r)});g.onInit.add(function(r){var p,t,q=r.dom,u;f=r.windowManager;r.onMouseDown.add(function(w,z){if(z.button!=2){k();t=q.getParent(z.target,"td,th");p=q.getParent(t,"table")}});q.bind(r.getDoc(),"mouseover",function(C){var A,z,B=C.target;if(t&&(u||B!=t)&&(B.nodeName=="TD"||B.nodeName=="TH")){z=q.getParent(B,"table");if(z==p){if(!u){u=l(z);u.setStartCell(t);r.getBody().style.webkitUserSelect="none"}u.setEndCell(B);j=true}A=r.selection.getSel();try{if(A.removeAllRanges){A.removeAllRanges()}else{A.empty()}}catch(w){}C.preventDefault()}});r.onMouseUp.add(function(F,G){var z,B=F.selection,H,I=B.getSel(),w,C,A,E;if(t){if(u){F.getBody().style.webkitUserSelect=""}function D(J,L){var K=new d.dom.TreeWalker(J,J);do{if(J.nodeType==3&&d.trim(J.nodeValue).length!=0){if(L){z.setStart(J,0)}else{z.setEnd(J,J.nodeValue.length)}return}if(J.nodeName=="BR"){if(L){z.setStartBefore(J)}else{z.setEndBefore(J)}return}}while(J=(L?K.next():K.prev()))}H=q.select("td.mceSelected,th.mceSelected");if(H.length>0){z=q.createRng();C=H[0];E=H[H.length-1];z.setStartBefore(C);z.setEndAfter(C);D(C,1);w=new d.dom.TreeWalker(C,q.getParent(H[0],"table"));do{if(C.nodeName=="TD"||C.nodeName=="TH"){if(!q.hasClass(C,"mceSelected")){break}A=C}}while(C=w.next());D(A);B.setRng(z)}F.nodeChanged();t=u=p=null}});r.onKeyUp.add(function(w,z){k()});r.onKeyDown.add(function(w,z){n(w)});r.onMouseDown.add(function(w,z){if(z.button!=2){n(w)}});function o(D,z,A,F){var B=3,G=D.dom.getParent(z.startContainer,"TABLE"),C,w,E;if(G){C=G.parentNode}w=z.startContainer.nodeType==B&&z.startOffset==0&&z.endOffset==0&&F&&(A.nodeName=="TR"||A==C);E=(A.nodeName=="TD"||A.nodeName=="TH")&&!F;return w||E}function n(A){if(!d.isWebKit){return}var z=A.selection.getRng();var C=A.selection.getNode();var B=A.dom.getParent(z.startContainer,"TD,TH");if(!o(A,z,C,B)){return}if(!B){B=C}var w=B.lastChild;while(w.lastChild){w=w.lastChild}z.setEnd(w,w.nodeValue.length);A.selection.setRng(z)}r.plugins.table.fixTableCellSelection=n;if(r&&r.plugins.contextmenu){r.plugins.contextmenu.onContextMenu.add(function(A,w,C){var D,B=r.selection,z=B.getNode()||r.getBody();if(r.dom.getParent(C,"td")||r.dom.getParent(C,"th")||r.dom.select("td.mceSelected,th.mceSelected").length){w.removeAll();if(z.nodeName=="A"&&!r.dom.getAttrib(z,"name")){w.add({title:"advanced.link_desc",icon:"link",cmd:r.plugins.advlink?"mceAdvLink":"mceLink",ui:true});w.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});w.addSeparator()}if(z.nodeName=="IMG"&&z.className.indexOf("mceItem")==-1){w.add({title:"advanced.image_desc",icon:"image",cmd:r.plugins.advimage?"mceAdvImage":"mceImage",ui:true});w.addSeparator()}w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",value:{action:"insert"}});w.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable"});w.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete"});w.addSeparator();D=w.addMenu({title:"table.cell"});D.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps"});D.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells"});D.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells"});D=w.addMenu({title:"table.row"});D.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps"});D.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});D.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});D.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});D.addSeparator();D.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});D.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});D.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"}).setDisabled(!m);D.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"}).setDisabled(!m);D=w.addMenu({title:"table.col"});D.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});D.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});D.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable"})}})}if(d.isWebKit){function v(C,N){var L=d.VK;var Q=N.keyCode;function O(Y,U,S){var T=Y?"previousSibling":"nextSibling";var Z=C.dom.getParent(U,"tr");var X=Z[T];if(X){z(C,U,X,Y);d.dom.Event.cancel(S);return true}else{var aa=C.dom.getParent(Z,"table");var W=Z.parentNode;var R=W.nodeName.toLowerCase();if(R==="tbody"||R===(Y?"tfoot":"thead")){var V=w(Y,aa,W,"tbody");if(V!==null){return K(Y,V,U,S)}}return M(Y,Z,T,aa,S)}}function w(V,T,U,X){var S=C.dom.select(">"+X,T);var R=S.indexOf(U);if(V&&R===0||!V&&R===S.length-1){return B(V,T)}else{if(R===-1){var W=U.tagName.toLowerCase()==="thead"?0:S.length-1;return S[W]}else{return S[R+(V?-1:1)]}}}function B(U,T){var S=U?"thead":"tfoot";var R=C.dom.select(">"+S,T);return R.length!==0?R[0]:null}function K(V,T,S,U){var R=J(T,V);R&&z(C,S,R,V);d.dom.Event.cancel(U);return true}function M(Y,U,R,X,W){var S=X[R];if(S){F(S);return true}else{var V=C.dom.getParent(X,"td,th");if(V){return O(Y,V,W)}else{var T=J(U,!Y);F(T);return d.dom.Event.cancel(W)}}}function J(S,R){var T=S&&S[R?"lastChild":"firstChild"];return T&&T.nodeName==="BR"?C.dom.getParent(T,"td,th"):T}function F(R){C.selection.setCursorLocation(R,0)}function A(){return Q==L.UP||Q==L.DOWN}function D(R){var T=R.selection.getNode();var S=R.dom.getParent(T,"tr");return S!==null}function P(S){var R=0;var T=S;while(T.previousSibling){T=T.previousSibling;R=R+a(T,"colspan")}return R}function E(T,R){var U=0;var S=0;e(T.children,function(V,W){U=U+a(V,"colspan");S=W;if(U>R){return false}});return S}function z(T,W,Y,V){var X=P(T.dom.getParent(W,"td,th"));var S=E(Y,X);var R=Y.childNodes[S];var U=J(R,V);F(U||R)}function H(R){var T=C.selection.getNode();var U=C.dom.getParent(T,"td,th");var S=C.dom.getParent(R,"td,th");return U&&U!==S&&I(U,S)}function I(S,R){return C.dom.getParent(S,"TABLE")===C.dom.getParent(R,"TABLE")}if(A()&&D(C)){var G=C.selection.getNode();setTimeout(function(){if(H(G)){O(!N.shiftKey&&Q===L.UP,G,N)}},0)}}r.onKeyDown.add(v)}function s(){var w;for(w=r.getBody().lastChild;w&&w.nodeType==3&&!w.nodeValue.length;w=w.previousSibling){}if(w&&w.nodeName=="TABLE"){if(r.settings.forced_root_block){r.dom.add(r.getBody(),r.settings.forced_root_block,null,d.isIE?"&nbsp;":'<br data-mce-bogus="1" />')}else{r.dom.add(r.getBody(),"br",{"data-mce-bogus":"1"})}}}if(d.isGecko){r.onKeyDown.add(function(z,B){var w,A,C=z.dom;if(B.keyCode==37||B.keyCode==38){w=z.selection.getRng();A=C.getParent(w.startContainer,"table");if(A&&z.getBody().firstChild==A){if(c(w,A)){w=C.createRng();w.setStartBefore(A);w.setEndBefore(A);z.selection.setRng(w);B.preventDefault()}}}})}r.onKeyUp.add(s);r.onSetContent.add(s);r.onVisualAid.add(s);r.onPreProcess.add(function(w,A){var z=A.node.lastChild;if(z&&(z.nodeName=="BR"||(z.childNodes.length==1&&(z.firstChild.nodeName=="BR"||z.firstChild.nodeValue=="\u00a0")))&&z.previousSibling&&z.previousSibling.nodeName=="TABLE"){w.dom.remove(z)}});if(d.isGecko){r.onKeyDown.add(function(z,B){if(B.keyCode===d.VK.ENTER&&B.shiftKey){var A=z.selection.getRng().startContainer;var C=q.getParent(A,"td,th");if(C){var w=z.getDoc().createTextNode("\uFEFF");q.insertAfter(w,A)}}})}s();r.startContent=r.getContent({format:"raw"})});e({mceTableSplitCells:function(n){n.split()},mceTableMergeCells:function(o){var p,q,n;n=g.dom.getParent(g.selection.getNode(),"th,td");if(n){p=n.rowSpan;q=n.colSpan}if(!g.dom.select("td.mceSelected,th.mceSelected").length){f.open({url:h+"/merge_cells.htm",width:240+parseInt(g.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(g.getLang("table.merge_cells_delta_height",0)),inline:1},{rows:p,cols:q,onaction:function(r){o.merge(n,r.cols,r.rows)},plugin_url:h})}else{o.merge()}},mceTableInsertRowBefore:function(n){n.insertRow(true)},mceTableInsertRowAfter:function(n){n.insertRow()},mceTableInsertColBefore:function(n){n.insertCol(true)},mceTableInsertColAfter:function(n){n.insertCol()},mceTableDeleteCol:function(n){n.deleteCols()},mceTableDeleteRow:function(n){n.deleteRows()},mceTableCutRow:function(n){m=n.cutRows()},mceTableCopyRow:function(n){m=n.copyRows()},mceTablePasteRowBefore:function(n){n.pasteRows(m,true)},mceTablePasteRowAfter:function(n){n.pasteRows(m)},mceTableDelete:function(n){n.deleteTable()}},function(o,n){g.addCommand(n,function(){var p=l();if(p){o(p);g.execCommand("mceRepaint");k()}})});e({mceInsertTable:function(n){f.open({url:h+"/table.htm",width:400+parseInt(g.getLang("table.table_delta_width",0)),height:320+parseInt(g.getLang("table.table_delta_height",0)),inline:1},{plugin_url:h,action:n?n.action:0})},mceTableRowProps:function(){f.open({url:h+"/row.htm",width:400+parseInt(g.getLang("table.rowprops_delta_width",0)),height:295+parseInt(g.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:h})},mceTableCellProps:function(){f.open({url:h+"/cell.htm",width:400+parseInt(g.getLang("table.cellprops_delta_width",0)),height:295+parseInt(g.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:h})}},function(o,n){g.addCommand(n,function(p,q){o(q)})})}});d.PluginManager.add("table",d.plugins.TablePlugin)})(tinymce); \ No newline at end of file
diff --git a/program/js/tiny_mce/plugins/table/editor_plugin_src.js b/program/js/tiny_mce/plugins/table/editor_plugin_src.js
index ff095c8bf..6a3630962 100644
--- a/program/js/tiny_mce/plugins/table/editor_plugin_src.js
+++ b/program/js/tiny_mce/plugins/table/editor_plugin_src.js
@@ -1,1446 +1,1449 @@
-/**
- * editor_plugin_src.js
- *
- * Copyright 2009, Moxiecode Systems AB
- * Released under LGPL License.
- *
- * License: http://tinymce.moxiecode.com/license
- * Contributing: http://tinymce.moxiecode.com/contributing
- */
-
-(function(tinymce) {
- var each = tinymce.each;
-
- // Checks if the selection/caret is at the start of the specified block element
- function isAtStart(rng, par) {
- var doc = par.ownerDocument, rng2 = doc.createRange(), elm;
-
- rng2.setStartBefore(par);
- rng2.setEnd(rng.endContainer, rng.endOffset);
-
- elm = doc.createElement('body');
- elm.appendChild(rng2.cloneContents());
-
- // Check for text characters of other elements that should be treated as content
- return elm.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi, '-').replace(/<[^>]+>/g, '').length == 0;
- };
-
- function getSpanVal(td, name) {
- return parseInt(td.getAttribute(name) || 1);
- }
-
- /**
- * Table Grid class.
- */
- function TableGrid(table, dom, selection) {
- var grid, startPos, endPos, selectedCell;
-
- buildGrid();
- selectedCell = dom.getParent(selection.getStart(), 'th,td');
- if (selectedCell) {
- startPos = getPos(selectedCell);
- endPos = findEndPos();
- selectedCell = getCell(startPos.x, startPos.y);
- }
-
- function cloneNode(node, children) {
- node = node.cloneNode(children);
- node.removeAttribute('id');
-
- return node;
- }
-
- function buildGrid() {
- var startY = 0;
-
- grid = [];
-
- each(['thead', 'tbody', 'tfoot'], function(part) {
- var rows = dom.select('> ' + part + ' tr', table);
-
- each(rows, function(tr, y) {
- y += startY;
-
- each(dom.select('> td, > th', tr), function(td, x) {
- var x2, y2, rowspan, colspan;
-
- // Skip over existing cells produced by rowspan
- if (grid[y]) {
- while (grid[y][x])
- x++;
- }
-
- // Get col/rowspan from cell
- rowspan = getSpanVal(td, 'rowspan');
- colspan = getSpanVal(td, 'colspan');
-
- // Fill out rowspan/colspan right and down
- for (y2 = y; y2 < y + rowspan; y2++) {
- if (!grid[y2])
- grid[y2] = [];
-
- for (x2 = x; x2 < x + colspan; x2++) {
- grid[y2][x2] = {
- part : part,
- real : y2 == y && x2 == x,
- elm : td,
- rowspan : rowspan,
- colspan : colspan
- };
- }
- }
- });
- });
-
- startY += rows.length;
- });
- };
-
- function getCell(x, y) {
- var row;
-
- row = grid[y];
- if (row)
- return row[x];
- };
-
- function setSpanVal(td, name, val) {
- if (td) {
- val = parseInt(val);
-
- if (val === 1)
- td.removeAttribute(name, 1);
- else
- td.setAttribute(name, val, 1);
- }
- }
-
- function isCellSelected(cell) {
- return cell && (dom.hasClass(cell.elm, 'mceSelected') || cell == selectedCell);
- };
-
- function getSelectedRows() {
- var rows = [];
-
- each(table.rows, function(row) {
- each(row.cells, function(cell) {
- if (dom.hasClass(cell, 'mceSelected') || cell == selectedCell.elm) {
- rows.push(row);
- return false;
- }
- });
- });
-
- return rows;
- };
-
- function deleteTable() {
- var rng = dom.createRng();
-
- rng.setStartAfter(table);
- rng.setEndAfter(table);
-
- selection.setRng(rng);
-
- dom.remove(table);
- };
-
- function cloneCell(cell) {
- var formatNode;
-
- // Clone formats
- tinymce.walk(cell, function(node) {
- var curNode;
-
- if (node.nodeType == 3) {
- each(dom.getParents(node.parentNode, null, cell).reverse(), function(node) {
- node = cloneNode(node, false);
-
- if (!formatNode)
- formatNode = curNode = node;
- else if (curNode)
- curNode.appendChild(node);
-
- curNode = node;
- });
-
- // Add something to the inner node
- if (curNode)
- curNode.innerHTML = tinymce.isIE ? '&nbsp;' : '<br data-mce-bogus="1" />';
-
- return false;
- }
- }, 'childNodes');
-
- cell = cloneNode(cell, false);
- setSpanVal(cell, 'rowSpan', 1);
- setSpanVal(cell, 'colSpan', 1);
-
- if (formatNode) {
- cell.appendChild(formatNode);
- } else {
- if (!tinymce.isIE)
- cell.innerHTML = '<br data-mce-bogus="1" />';
- }
-
- return cell;
- };
-
- function cleanup() {
- var rng = dom.createRng();
-
- // Empty rows
- each(dom.select('tr', table), function(tr) {
- if (tr.cells.length == 0)
- dom.remove(tr);
- });
-
- // Empty table
- if (dom.select('tr', table).length == 0) {
- rng.setStartAfter(table);
- rng.setEndAfter(table);
- selection.setRng(rng);
- dom.remove(table);
- return;
- }
-
- // Empty header/body/footer
- each(dom.select('thead,tbody,tfoot', table), function(part) {
- if (part.rows.length == 0)
- dom.remove(part);
- });
-
- // Restore selection to start position if it still exists
- buildGrid();
-
- // Restore the selection to the closest table position
- row = grid[Math.min(grid.length - 1, startPos.y)];
- if (row) {
- selection.select(row[Math.min(row.length - 1, startPos.x)].elm, true);
- selection.collapse(true);
- }
- };
-
- function fillLeftDown(x, y, rows, cols) {
- var tr, x2, r, c, cell;
-
- tr = grid[y][x].elm.parentNode;
- for (r = 1; r <= rows; r++) {
- tr = dom.getNext(tr, 'tr');
-
- if (tr) {
- // Loop left to find real cell
- for (x2 = x; x2 >= 0; x2--) {
- cell = grid[y + r][x2].elm;
-
- if (cell.parentNode == tr) {
- // Append clones after
- for (c = 1; c <= cols; c++)
- dom.insertAfter(cloneCell(cell), cell);
-
- break;
- }
- }
-
- if (x2 == -1) {
- // Insert nodes before first cell
- for (c = 1; c <= cols; c++)
- tr.insertBefore(cloneCell(tr.cells[0]), tr.cells[0]);
- }
- }
- }
- };
-
- function split() {
- each(grid, function(row, y) {
- each(row, function(cell, x) {
- var colSpan, rowSpan, newCell, i;
-
- if (isCellSelected(cell)) {
- cell = cell.elm;
- colSpan = getSpanVal(cell, 'colspan');
- rowSpan = getSpanVal(cell, 'rowspan');
-
- if (colSpan > 1 || rowSpan > 1) {
- setSpanVal(cell, 'rowSpan', 1);
- setSpanVal(cell, 'colSpan', 1);
-
- // Insert cells right
- for (i = 0; i < colSpan - 1; i++)
- dom.insertAfter(cloneCell(cell), cell);
-
- fillLeftDown(x, y, rowSpan - 1, colSpan);
- }
- }
- });
- });
- };
-
- function merge(cell, cols, rows) {
- var startX, startY, endX, endY, x, y, startCell, endCell, cell, children, count;
-
- // Use specified cell and cols/rows
- if (cell) {
- pos = getPos(cell);
- startX = pos.x;
- startY = pos.y;
- endX = startX + (cols - 1);
- endY = startY + (rows - 1);
- } else {
- startPos = endPos = null;
-
- // Calculate start/end pos by checking for selected cells in grid works better with context menu
- each(grid, function(row, y) {
- each(row, function(cell, x) {
- if (isCellSelected(cell)) {
- if (!startPos) {
- startPos = {x: x, y: y};
- }
-
- endPos = {x: x, y: y};
- }
- });
- });
-
- // Use selection
- startX = startPos.x;
- startY = startPos.y;
- endX = endPos.x;
- endY = endPos.y;
- }
-
- // Find start/end cells
- startCell = getCell(startX, startY);
- endCell = getCell(endX, endY);
-
- // Check if the cells exists and if they are of the same part for example tbody = tbody
- if (startCell && endCell && startCell.part == endCell.part) {
- // Split and rebuild grid
- split();
- buildGrid();
-
- // Set row/col span to start cell
- startCell = getCell(startX, startY).elm;
- setSpanVal(startCell, 'colSpan', (endX - startX) + 1);
- setSpanVal(startCell, 'rowSpan', (endY - startY) + 1);
-
- // Remove other cells and add it's contents to the start cell
- for (y = startY; y <= endY; y++) {
- for (x = startX; x <= endX; x++) {
- if (!grid[y] || !grid[y][x])
- continue;
-
- cell = grid[y][x].elm;
-
- if (cell != startCell) {
- // Move children to startCell
- children = tinymce.grep(cell.childNodes);
- each(children, function(node) {
- startCell.appendChild(node);
- });
-
- // Remove bogus nodes if there is children in the target cell
- if (children.length) {
- children = tinymce.grep(startCell.childNodes);
- count = 0;
- each(children, function(node) {
- if (node.nodeName == 'BR' && dom.getAttrib(node, 'data-mce-bogus') && count++ < children.length - 1)
- startCell.removeChild(node);
- });
- }
-
- // Remove cell
- dom.remove(cell);
- }
- }
- }
-
- // Remove empty rows etc and restore caret location
- cleanup();
- }
- };
-
- function insertRow(before) {
- var posY, cell, lastCell, x, rowElm, newRow, newCell, otherCell, rowSpan;
-
- // Find first/last row
- each(grid, function(row, y) {
- each(row, function(cell, x) {
- if (isCellSelected(cell)) {
- cell = cell.elm;
- rowElm = cell.parentNode;
- newRow = cloneNode(rowElm, false);
- posY = y;
-
- if (before)
- return false;
- }
- });
-
- if (before)
- return !posY;
- });
-
- for (x = 0; x < grid[0].length; x++) {
- // Cell not found could be because of an invalid table structure
- if (!grid[posY][x])
- continue;
-
- cell = grid[posY][x].elm;
-
- if (cell != lastCell) {
- if (!before) {
- rowSpan = getSpanVal(cell, 'rowspan');
- if (rowSpan > 1) {
- setSpanVal(cell, 'rowSpan', rowSpan + 1);
- continue;
- }
- } else {
- // Check if cell above can be expanded
- if (posY > 0 && grid[posY - 1][x]) {
- otherCell = grid[posY - 1][x].elm;
- rowSpan = getSpanVal(otherCell, 'rowSpan');
- if (rowSpan > 1) {
- setSpanVal(otherCell, 'rowSpan', rowSpan + 1);
- continue;
- }
- }
- }
-
- // Insert new cell into new row
- newCell = cloneCell(cell);
- setSpanVal(newCell, 'colSpan', cell.colSpan);
-
- newRow.appendChild(newCell);
-
- lastCell = cell;
- }
- }
-
- if (newRow.hasChildNodes()) {
- if (!before)
- dom.insertAfter(newRow, rowElm);
- else
- rowElm.parentNode.insertBefore(newRow, rowElm);
- }
- };
-
- function insertCol(before) {
- var posX, lastCell;
-
- // Find first/last column
- each(grid, function(row, y) {
- each(row, function(cell, x) {
- if (isCellSelected(cell)) {
- posX = x;
-
- if (before)
- return false;
- }
- });
-
- if (before)
- return !posX;
- });
-
- each(grid, function(row, y) {
- var cell, rowSpan, colSpan;
-
- if (!row[posX])
- return;
-
- cell = row[posX].elm;
- if (cell != lastCell) {
- colSpan = getSpanVal(cell, 'colspan');
- rowSpan = getSpanVal(cell, 'rowspan');
-
- if (colSpan == 1) {
- if (!before) {
- dom.insertAfter(cloneCell(cell), cell);
- fillLeftDown(posX, y, rowSpan - 1, colSpan);
- } else {
- cell.parentNode.insertBefore(cloneCell(cell), cell);
- fillLeftDown(posX, y, rowSpan - 1, colSpan);
- }
- } else
- setSpanVal(cell, 'colSpan', cell.colSpan + 1);
-
- lastCell = cell;
- }
- });
- };
-
- function deleteCols() {
- var cols = [];
-
- // Get selected column indexes
- each(grid, function(row, y) {
- each(row, function(cell, x) {
- if (isCellSelected(cell) && tinymce.inArray(cols, x) === -1) {
- each(grid, function(row) {
- var cell = row[x].elm, colSpan;
-
- colSpan = getSpanVal(cell, 'colSpan');
-
- if (colSpan > 1)
- setSpanVal(cell, 'colSpan', colSpan - 1);
- else
- dom.remove(cell);
- });
-
- cols.push(x);
- }
- });
- });
-
- cleanup();
- };
-
- function deleteRows() {
- var rows;
-
- function deleteRow(tr) {
- var nextTr, pos, lastCell;
-
- nextTr = dom.getNext(tr, 'tr');
-
- // Move down row spanned cells
- each(tr.cells, function(cell) {
- var rowSpan = getSpanVal(cell, 'rowSpan');
-
- if (rowSpan > 1) {
- setSpanVal(cell, 'rowSpan', rowSpan - 1);
- pos = getPos(cell);
- fillLeftDown(pos.x, pos.y, 1, 1);
- }
- });
-
- // Delete cells
- pos = getPos(tr.cells[0]);
- each(grid[pos.y], function(cell) {
- var rowSpan;
-
- cell = cell.elm;
-
- if (cell != lastCell) {
- rowSpan = getSpanVal(cell, 'rowSpan');
-
- if (rowSpan <= 1)
- dom.remove(cell);
- else
- setSpanVal(cell, 'rowSpan', rowSpan - 1);
-
- lastCell = cell;
- }
- });
- };
-
- // Get selected rows and move selection out of scope
- rows = getSelectedRows();
-
- // Delete all selected rows
- each(rows.reverse(), function(tr) {
- deleteRow(tr);
- });
-
- cleanup();
- };
-
- function cutRows() {
- var rows = getSelectedRows();
-
- dom.remove(rows);
- cleanup();
-
- return rows;
- };
-
- function copyRows() {
- var rows = getSelectedRows();
-
- each(rows, function(row, i) {
- rows[i] = cloneNode(row, true);
- });
-
- return rows;
- };
-
- function pasteRows(rows, before) {
- var selectedRows = getSelectedRows(),
- targetRow = selectedRows[before ? 0 : selectedRows.length - 1],
- targetCellCount = targetRow.cells.length;
-
- // Calc target cell count
- each(grid, function(row) {
- var match;
-
- targetCellCount = 0;
- each(row, function(cell, x) {
- if (cell.real)
- targetCellCount += cell.colspan;
-
- if (cell.elm.parentNode == targetRow)
- match = 1;
- });
-
- if (match)
- return false;
- });
-
- if (!before)
- rows.reverse();
-
- each(rows, function(row) {
- var cellCount = row.cells.length, cell;
-
- // Remove col/rowspans
- for (i = 0; i < cellCount; i++) {
- cell = row.cells[i];
- setSpanVal(cell, 'colSpan', 1);
- setSpanVal(cell, 'rowSpan', 1);
- }
-
- // Needs more cells
- for (i = cellCount; i < targetCellCount; i++)
- row.appendChild(cloneCell(row.cells[cellCount - 1]));
-
- // Needs less cells
- for (i = targetCellCount; i < cellCount; i++)
- dom.remove(row.cells[i]);
-
- // Add before/after
- if (before)
- targetRow.parentNode.insertBefore(row, targetRow);
- else
- dom.insertAfter(row, targetRow);
- });
-
- // Remove current selection
- dom.removeClass(dom.select('td.mceSelected,th.mceSelected'), 'mceSelected');
- };
-
- function getPos(target) {
- var pos;
-
- each(grid, function(row, y) {
- each(row, function(cell, x) {
- if (cell.elm == target) {
- pos = {x : x, y : y};
- return false;
- }
- });
-
- return !pos;
- });
-
- return pos;
- };
-
- function setStartCell(cell) {
- startPos = getPos(cell);
- };
-
- function findEndPos() {
- var pos, maxX, maxY;
-
- maxX = maxY = 0;
-
- each(grid, function(row, y) {
- each(row, function(cell, x) {
- var colSpan, rowSpan;
-
- if (isCellSelected(cell)) {
- cell = grid[y][x];
-
- if (x > maxX)
- maxX = x;
-
- if (y > maxY)
- maxY = y;
-
- if (cell.real) {
- colSpan = cell.colspan - 1;
- rowSpan = cell.rowspan - 1;
-
- if (colSpan) {
- if (x + colSpan > maxX)
- maxX = x + colSpan;
- }
-
- if (rowSpan) {
- if (y + rowSpan > maxY)
- maxY = y + rowSpan;
- }
- }
- }
- });
- });
-
- return {x : maxX, y : maxY};
- };
-
- function setEndCell(cell) {
- var startX, startY, endX, endY, maxX, maxY, colSpan, rowSpan;
-
- endPos = getPos(cell);
-
- if (startPos && endPos) {
- // Get start/end positions
- startX = Math.min(startPos.x, endPos.x);
- startY = Math.min(startPos.y, endPos.y);
- endX = Math.max(startPos.x, endPos.x);
- endY = Math.max(startPos.y, endPos.y);
-
- // Expand end positon to include spans
- maxX = endX;
- maxY = endY;
-
- // Expand startX
- for (y = startY; y <= maxY; y++) {
- cell = grid[y][startX];
-
- if (!cell.real) {
- if (startX - (cell.colspan - 1) < startX)
- startX -= cell.colspan - 1;
- }
- }
-
- // Expand startY
- for (x = startX; x <= maxX; x++) {
- cell = grid[startY][x];
-
- if (!cell.real) {
- if (startY - (cell.rowspan - 1) < startY)
- startY -= cell.rowspan - 1;
- }
- }
-
- // Find max X, Y
- for (y = startY; y <= endY; y++) {
- for (x = startX; x <= endX; x++) {
- cell = grid[y][x];
-
- if (cell.real) {
- colSpan = cell.colspan - 1;
- rowSpan = cell.rowspan - 1;
-
- if (colSpan) {
- if (x + colSpan > maxX)
- maxX = x + colSpan;
- }
-
- if (rowSpan) {
- if (y + rowSpan > maxY)
- maxY = y + rowSpan;
- }
- }
- }
- }
-
- // Remove current selection
- dom.removeClass(dom.select('td.mceSelected,th.mceSelected'), 'mceSelected');
-
- // Add new selection
- for (y = startY; y <= maxY; y++) {
- for (x = startX; x <= maxX; x++) {
- if (grid[y][x])
- dom.addClass(grid[y][x].elm, 'mceSelected');
- }
- }
- }
- };
-
- // Expose to public
- tinymce.extend(this, {
- deleteTable : deleteTable,
- split : split,
- merge : merge,
- insertRow : insertRow,
- insertCol : insertCol,
- deleteCols : deleteCols,
- deleteRows : deleteRows,
- cutRows : cutRows,
- copyRows : copyRows,
- pasteRows : pasteRows,
- getPos : getPos,
- setStartCell : setStartCell,
- setEndCell : setEndCell
- });
- };
-
- tinymce.create('tinymce.plugins.TablePlugin', {
- init : function(ed, url) {
- var winMan, clipboardRows, hasCellSelection = true; // Might be selected cells on reload
-
- function createTableGrid(node) {
- var selection = ed.selection, tblElm = ed.dom.getParent(node || selection.getNode(), 'table');
-
- if (tblElm)
- return new TableGrid(tblElm, ed.dom, selection);
- };
-
- function cleanup() {
- // Restore selection possibilities
- ed.getBody().style.webkitUserSelect = '';
-
- if (hasCellSelection) {
- ed.dom.removeClass(ed.dom.select('td.mceSelected,th.mceSelected'), 'mceSelected');
- hasCellSelection = false;
- }
- };
-
- // Register buttons
- each([
- ['table', 'table.desc', 'mceInsertTable', true],
- ['delete_table', 'table.del', 'mceTableDelete'],
- ['delete_col', 'table.delete_col_desc', 'mceTableDeleteCol'],
- ['delete_row', 'table.delete_row_desc', 'mceTableDeleteRow'],
- ['col_after', 'table.col_after_desc', 'mceTableInsertColAfter'],
- ['col_before', 'table.col_before_desc', 'mceTableInsertColBefore'],
- ['row_after', 'table.row_after_desc', 'mceTableInsertRowAfter'],
- ['row_before', 'table.row_before_desc', 'mceTableInsertRowBefore'],
- ['row_props', 'table.row_desc', 'mceTableRowProps', true],
- ['cell_props', 'table.cell_desc', 'mceTableCellProps', true],
- ['split_cells', 'table.split_cells_desc', 'mceTableSplitCells', true],
- ['merge_cells', 'table.merge_cells_desc', 'mceTableMergeCells', true]
- ], function(c) {
- ed.addButton(c[0], {title : c[1], cmd : c[2], ui : c[3]});
- });
-
- // Select whole table is a table border is clicked
- if (!tinymce.isIE) {
- ed.onClick.add(function(ed, e) {
- e = e.target;
-
- if (e.nodeName === 'TABLE') {
- ed.selection.select(e);
- ed.nodeChanged();
- }
- });
- }
-
- ed.onPreProcess.add(function(ed, args) {
- var nodes, i, node, dom = ed.dom, value;
-
- nodes = dom.select('table', args.node);
- i = nodes.length;
- while (i--) {
- node = nodes[i];
- dom.setAttrib(node, 'data-mce-style', '');
-
- if ((value = dom.getAttrib(node, 'width'))) {
- dom.setStyle(node, 'width', value);
- dom.setAttrib(node, 'width', '');
- }
-
- if ((value = dom.getAttrib(node, 'height'))) {
- dom.setStyle(node, 'height', value);
- dom.setAttrib(node, 'height', '');
- }
- }
- });
-
- // Handle node change updates
- ed.onNodeChange.add(function(ed, cm, n) {
- var p;
-
- n = ed.selection.getStart();
- p = ed.dom.getParent(n, 'td,th,caption');
- cm.setActive('table', n.nodeName === 'TABLE' || !!p);
-
- // Disable table tools if we are in caption
- if (p && p.nodeName === 'CAPTION')
- p = 0;
-
- cm.setDisabled('delete_table', !p);
- cm.setDisabled('delete_col', !p);
- cm.setDisabled('delete_table', !p);
- cm.setDisabled('delete_row', !p);
- cm.setDisabled('col_after', !p);
- cm.setDisabled('col_before', !p);
- cm.setDisabled('row_after', !p);
- cm.setDisabled('row_before', !p);
- cm.setDisabled('row_props', !p);
- cm.setDisabled('cell_props', !p);
- cm.setDisabled('split_cells', !p);
- cm.setDisabled('merge_cells', !p);
- });
-
- ed.onInit.add(function(ed) {
- var startTable, startCell, dom = ed.dom, tableGrid;
-
- winMan = ed.windowManager;
-
- // Add cell selection logic
- ed.onMouseDown.add(function(ed, e) {
- if (e.button != 2) {
- cleanup();
-
- startCell = dom.getParent(e.target, 'td,th');
- startTable = dom.getParent(startCell, 'table');
- }
- });
-
- dom.bind(ed.getDoc(), 'mouseover', function(e) {
- var sel, table, target = e.target;
-
- if (startCell && (tableGrid || target != startCell) && (target.nodeName == 'TD' || target.nodeName == 'TH')) {
- table = dom.getParent(target, 'table');
- if (table == startTable) {
- if (!tableGrid) {
- tableGrid = createTableGrid(table);
- tableGrid.setStartCell(startCell);
-
- ed.getBody().style.webkitUserSelect = 'none';
- }
-
- tableGrid.setEndCell(target);
- hasCellSelection = true;
- }
-
- // Remove current selection
- sel = ed.selection.getSel();
-
- try {
- if (sel.removeAllRanges)
- sel.removeAllRanges();
- else
- sel.empty();
- } catch (ex) {
- // IE9 might throw errors here
- }
-
- e.preventDefault();
- }
- });
-
- ed.onMouseUp.add(function(ed, e) {
- var rng, sel = ed.selection, selectedCells, nativeSel = sel.getSel(), walker, node, lastNode, endNode;
-
- // Move selection to startCell
- if (startCell) {
- if (tableGrid)
- ed.getBody().style.webkitUserSelect = '';
-
- function setPoint(node, start) {
- var walker = new tinymce.dom.TreeWalker(node, node);
-
- do {
- // Text node
- if (node.nodeType == 3 && tinymce.trim(node.nodeValue).length != 0) {
- if (start)
- rng.setStart(node, 0);
- else
- rng.setEnd(node, node.nodeValue.length);
-
- return;
- }
-
- // BR element
- if (node.nodeName == 'BR') {
- if (start)
- rng.setStartBefore(node);
- else
- rng.setEndBefore(node);
-
- return;
- }
- } while (node = (start ? walker.next() : walker.prev()));
- }
-
- // Try to expand text selection as much as we can only Gecko supports cell selection
- selectedCells = dom.select('td.mceSelected,th.mceSelected');
- if (selectedCells.length > 0) {
- rng = dom.createRng();
- node = selectedCells[0];
- endNode = selectedCells[selectedCells.length - 1];
- rng.setStartBefore(node);
- rng.setEndAfter(node);
-
- setPoint(node, 1);
- walker = new tinymce.dom.TreeWalker(node, dom.getParent(selectedCells[0], 'table'));
-
- do {
- if (node.nodeName == 'TD' || node.nodeName == 'TH') {
- if (!dom.hasClass(node, 'mceSelected'))
- break;
-
- lastNode = node;
- }
- } while (node = walker.next());
-
- setPoint(lastNode);
-
- sel.setRng(rng);
- }
-
- ed.nodeChanged();
- startCell = tableGrid = startTable = null;
- }
- });
-
- ed.onKeyUp.add(function(ed, e) {
- cleanup();
- });
-
- ed.onKeyDown.add(function (ed, e) {
- fixTableCellSelection(ed);
- });
-
- ed.onMouseDown.add(function (ed, e) {
- if (e.button != 2) {
- fixTableCellSelection(ed);
- }
- });
- function tableCellSelected(ed, rng, n, currentCell) {
- // The decision of when a table cell is selected is somewhat involved. The fact that this code is
- // required is actually a pointer to the root cause of this bug. A cell is selected when the start
- // and end offsets are 0, the start container is a text, and the selection node is either a TR (most cases)
- // or the parent of the table (in the case of the selection containing the last cell of a table).
- var TEXT_NODE = 3, table = ed.dom.getParent(rng.startContainer, 'TABLE'),
- tableParent, allOfCellSelected, tableCellSelection;
- if (table)
- tableParent = table.parentNode;
- allOfCellSelected =rng.startContainer.nodeType == TEXT_NODE &&
- rng.startOffset == 0 &&
- rng.endOffset == 0 &&
- currentCell &&
- (n.nodeName=="TR" || n==tableParent);
- tableCellSelection = (n.nodeName=="TD"||n.nodeName=="TH")&& !currentCell;
- return allOfCellSelected || tableCellSelection;
- // return false;
- }
-
- // this nasty hack is here to work around some WebKit selection bugs.
- function fixTableCellSelection(ed) {
- if (!tinymce.isWebKit)
- return;
-
- var rng = ed.selection.getRng();
- var n = ed.selection.getNode();
- var currentCell = ed.dom.getParent(rng.startContainer, 'TD,TH');
-
- if (!tableCellSelected(ed, rng, n, currentCell))
- return;
- if (!currentCell) {
- currentCell=n;
- }
-
- // Get the very last node inside the table cell
- var end = currentCell.lastChild;
- while (end.lastChild)
- end = end.lastChild;
-
- // Select the entire table cell. Nothing outside of the table cell should be selected.
- rng.setEnd(end, end.nodeValue.length);
- ed.selection.setRng(rng);
- }
- ed.plugins.table.fixTableCellSelection=fixTableCellSelection;
-
- // Add context menu
- if (ed && ed.plugins.contextmenu) {
- ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) {
- var sm, se = ed.selection, el = se.getNode() || ed.getBody();
-
- if (ed.dom.getParent(e, 'td') || ed.dom.getParent(e, 'th') || ed.dom.select('td.mceSelected,th.mceSelected').length) {
- m.removeAll();
-
- if (el.nodeName == 'A' && !ed.dom.getAttrib(el, 'name')) {
- m.add({title : 'advanced.link_desc', icon : 'link', cmd : ed.plugins.advlink ? 'mceAdvLink' : 'mceLink', ui : true});
- m.add({title : 'advanced.unlink_desc', icon : 'unlink', cmd : 'UnLink'});
- m.addSeparator();
- }
-
- if (el.nodeName == 'IMG' && el.className.indexOf('mceItem') == -1) {
- m.add({title : 'advanced.image_desc', icon : 'image', cmd : ed.plugins.advimage ? 'mceAdvImage' : 'mceImage', ui : true});
- m.addSeparator();
- }
-
- m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable', value : {action : 'insert'}});
- m.add({title : 'table.props_desc', icon : 'table_props', cmd : 'mceInsertTable'});
- m.add({title : 'table.del', icon : 'delete_table', cmd : 'mceTableDelete'});
- m.addSeparator();
-
- // Cell menu
- sm = m.addMenu({title : 'table.cell'});
- sm.add({title : 'table.cell_desc', icon : 'cell_props', cmd : 'mceTableCellProps'});
- sm.add({title : 'table.split_cells_desc', icon : 'split_cells', cmd : 'mceTableSplitCells'});
- sm.add({title : 'table.merge_cells_desc', icon : 'merge_cells', cmd : 'mceTableMergeCells'});
-
- // Row menu
- sm = m.addMenu({title : 'table.row'});
- sm.add({title : 'table.row_desc', icon : 'row_props', cmd : 'mceTableRowProps'});
- sm.add({title : 'table.row_before_desc', icon : 'row_before', cmd : 'mceTableInsertRowBefore'});
- sm.add({title : 'table.row_after_desc', icon : 'row_after', cmd : 'mceTableInsertRowAfter'});
- sm.add({title : 'table.delete_row_desc', icon : 'delete_row', cmd : 'mceTableDeleteRow'});
- sm.addSeparator();
- sm.add({title : 'table.cut_row_desc', icon : 'cut', cmd : 'mceTableCutRow'});
- sm.add({title : 'table.copy_row_desc', icon : 'copy', cmd : 'mceTableCopyRow'});
- sm.add({title : 'table.paste_row_before_desc', icon : 'paste', cmd : 'mceTablePasteRowBefore'}).setDisabled(!clipboardRows);
- sm.add({title : 'table.paste_row_after_desc', icon : 'paste', cmd : 'mceTablePasteRowAfter'}).setDisabled(!clipboardRows);
-
- // Column menu
- sm = m.addMenu({title : 'table.col'});
- sm.add({title : 'table.col_before_desc', icon : 'col_before', cmd : 'mceTableInsertColBefore'});
- sm.add({title : 'table.col_after_desc', icon : 'col_after', cmd : 'mceTableInsertColAfter'});
- sm.add({title : 'table.delete_col_desc', icon : 'delete_col', cmd : 'mceTableDeleteCol'});
- } else
- m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable'});
- });
- }
-
- // Fix to allow navigating up and down in a table in WebKit browsers.
- if (tinymce.isWebKit) {
- function moveSelection(ed, e) {
- var VK = tinymce.VK;
- var key = e.keyCode;
-
- function handle(upBool, sourceNode, event) {
- var siblingDirection = upBool ? 'previousSibling' : 'nextSibling';
- var currentRow = ed.dom.getParent(sourceNode, 'tr');
- var siblingRow = currentRow[siblingDirection];
-
- if (siblingRow) {
- moveCursorToRow(ed, sourceNode, siblingRow, upBool);
- tinymce.dom.Event.cancel(event);
- return true;
- } else {
- var tableNode = ed.dom.getParent(currentRow, 'table');
- var middleNode = currentRow.parentNode;
- var parentNodeName = middleNode.nodeName.toLowerCase();
- if (parentNodeName === 'tbody' || parentNodeName === (upBool ? 'tfoot' : 'thead')) {
- var targetParent = getTargetParent(upBool, tableNode, middleNode, 'tbody');
- if (targetParent !== null) {
- return moveToRowInTarget(upBool, targetParent, sourceNode, event);
- }
- }
- return escapeTable(upBool, currentRow, siblingDirection, tableNode, event);
- }
- }
-
- function getTargetParent(upBool, topNode, secondNode, nodeName) {
- var tbodies = ed.dom.select('>' + nodeName, topNode);
- var position = tbodies.indexOf(secondNode);
- if (upBool && position === 0 || !upBool && position === tbodies.length - 1) {
- return getFirstHeadOrFoot(upBool, topNode);
- } else if (position === -1) {
- var topOrBottom = secondNode.tagName.toLowerCase() === 'thead' ? 0 : tbodies.length - 1;
- return tbodies[topOrBottom];
- } else {
- return tbodies[position + (upBool ? -1 : 1)];
- }
- }
-
- function getFirstHeadOrFoot(upBool, parent) {
- var tagName = upBool ? 'thead' : 'tfoot';
- var headOrFoot = ed.dom.select('>' + tagName, parent);
- return headOrFoot.length !== 0 ? headOrFoot[0] : null;
- }
-
- function moveToRowInTarget(upBool, targetParent, sourceNode, event) {
- var targetRow = getChildForDirection(targetParent, upBool);
- targetRow && moveCursorToRow(ed, sourceNode, targetRow, upBool);
- tinymce.dom.Event.cancel(event);
- return true;
- }
-
- function escapeTable(upBool, currentRow, siblingDirection, table, event) {
- var tableSibling = table[siblingDirection];
- if (tableSibling) {
- moveCursorToStartOfElement(tableSibling);
- return true;
- } else {
- var parentCell = ed.dom.getParent(table, 'td,th');
- if (parentCell) {
- return handle(upBool, parentCell, event);
- } else {
- var backUpSibling = getChildForDirection(currentRow, !upBool);
- moveCursorToStartOfElement(backUpSibling);
- return tinymce.dom.Event.cancel(event);
- }
- }
- }
-
- function getChildForDirection(parent, up) {
- var child = parent && parent[up ? 'lastChild' : 'firstChild'];
- // BR is not a valid table child to return in this case we return the table cell
- return child && child.nodeName === 'BR' ? ed.dom.getParent(child, 'td,th') : child;
- }
-
- function moveCursorToStartOfElement(n) {
- ed.selection.setCursorLocation(n, 0);
- }
-
- function isVerticalMovement() {
- return key == VK.UP || key == VK.DOWN;
- }
-
- function isInTable(ed) {
- var node = ed.selection.getNode();
- var currentRow = ed.dom.getParent(node, 'tr');
- return currentRow !== null;
- }
-
- function columnIndex(column) {
- var colIndex = 0;
- var c = column;
- while (c.previousSibling) {
- c = c.previousSibling;
- colIndex = colIndex + getSpanVal(c, "colspan");
- }
- return colIndex;
- }
-
- function findColumn(rowElement, columnIndex) {
- var c = 0;
- var r = 0;
- each(rowElement.children, function(cell, i) {
- c = c + getSpanVal(cell, "colspan");
- r = i;
- if (c > columnIndex)
- return false;
- });
- return r;
- }
-
- function moveCursorToRow(ed, node, row, upBool) {
- var srcColumnIndex = columnIndex(ed.dom.getParent(node, 'td,th'));
- var tgtColumnIndex = findColumn(row, srcColumnIndex);
- var tgtNode = row.childNodes[tgtColumnIndex];
- var rowCellTarget = getChildForDirection(tgtNode, upBool);
- moveCursorToStartOfElement(rowCellTarget || tgtNode);
- }
-
- function shouldFixCaret(preBrowserNode) {
- var newNode = ed.selection.getNode();
- var newParent = ed.dom.getParent(newNode, 'td,th');
- var oldParent = ed.dom.getParent(preBrowserNode, 'td,th');
- return newParent && newParent !== oldParent && checkSameParentTable(newParent, oldParent)
- }
-
- function checkSameParentTable(nodeOne, NodeTwo) {
- return ed.dom.getParent(nodeOne, 'TABLE') === ed.dom.getParent(NodeTwo, 'TABLE');
- }
-
- if (isVerticalMovement() && isInTable(ed)) {
- var preBrowserNode = ed.selection.getNode();
- setTimeout(function() {
- if (shouldFixCaret(preBrowserNode)) {
- handle(!e.shiftKey && key === VK.UP, preBrowserNode, e);
- }
- }, 0);
- }
- }
-
- ed.onKeyDown.add(moveSelection);
- }
-
- // Fixes an issue on Gecko where it's impossible to place the caret behind a table
- // This fix will force a paragraph element after the table but only when the forced_root_block setting is enabled
- if (!tinymce.isIE) {
- function fixTableCaretPos() {
- var last;
-
- // Skip empty text nodes form the end
- for (last = ed.getBody().lastChild; last && last.nodeType == 3 && !last.nodeValue.length; last = last.previousSibling) ;
-
- if (last && last.nodeName == 'TABLE')
- ed.dom.add(ed.getBody(), 'p', null, '<br data-mce-bogus="1" />');
- };
-
- // Fixes an bug where it's impossible to place the caret before a table in Gecko
- // this fix solves it by detecting when the caret is at the beginning of such a table
- // and then manually moves the caret infront of the table
- if (tinymce.isGecko) {
- ed.onKeyDown.add(function(ed, e) {
- var rng, table, dom = ed.dom;
-
- // On gecko it's not possible to place the caret before a table
- if (e.keyCode == 37 || e.keyCode == 38) {
- rng = ed.selection.getRng();
- table = dom.getParent(rng.startContainer, 'table');
-
- if (table && ed.getBody().firstChild == table) {
- if (isAtStart(rng, table)) {
- rng = dom.createRng();
-
- rng.setStartBefore(table);
- rng.setEndBefore(table);
-
- ed.selection.setRng(rng);
-
- e.preventDefault();
- }
- }
- }
- });
- }
-
- ed.onKeyUp.add(fixTableCaretPos);
- ed.onSetContent.add(fixTableCaretPos);
- ed.onVisualAid.add(fixTableCaretPos);
-
- ed.onPreProcess.add(function(ed, o) {
- var last = o.node.lastChild;
-
- if (last && last.childNodes.length == 1 && last.firstChild.nodeName == 'BR' && last.previousSibling && last.previousSibling.nodeName == "TABLE")
- ed.dom.remove(last);
- });
-
-
- /**
- * Fixes bug in Gecko where shift-enter in table cell does not place caret on new line
- */
- if (tinymce.isGecko) {
- ed.onKeyDown.add(function(ed, e) {
- if (e.keyCode === tinymce.VK.ENTER && e.shiftKey) {
- var node = ed.selection.getRng().startContainer;
- var tableCell = dom.getParent(node, 'td,th');
- if (tableCell) {
- var zeroSizedNbsp = ed.getDoc().createTextNode("\uFEFF");
- dom.insertAfter(zeroSizedNbsp, node);
- }
- }
- });
- }
-
-
- fixTableCaretPos();
- ed.startContent = ed.getContent({format : 'raw'});
- }
- });
-
- // Register action commands
- each({
- mceTableSplitCells : function(grid) {
- grid.split();
- },
-
- mceTableMergeCells : function(grid) {
- var rowSpan, colSpan, cell;
-
- cell = ed.dom.getParent(ed.selection.getNode(), 'th,td');
- if (cell) {
- rowSpan = cell.rowSpan;
- colSpan = cell.colSpan;
- }
-
- if (!ed.dom.select('td.mceSelected,th.mceSelected').length) {
- winMan.open({
- url : url + '/merge_cells.htm',
- width : 240 + parseInt(ed.getLang('table.merge_cells_delta_width', 0)),
- height : 110 + parseInt(ed.getLang('table.merge_cells_delta_height', 0)),
- inline : 1
- }, {
- rows : rowSpan,
- cols : colSpan,
- onaction : function(data) {
- grid.merge(cell, data.cols, data.rows);
- },
- plugin_url : url
- });
- } else
- grid.merge();
- },
-
- mceTableInsertRowBefore : function(grid) {
- grid.insertRow(true);
- },
-
- mceTableInsertRowAfter : function(grid) {
- grid.insertRow();
- },
-
- mceTableInsertColBefore : function(grid) {
- grid.insertCol(true);
- },
-
- mceTableInsertColAfter : function(grid) {
- grid.insertCol();
- },
-
- mceTableDeleteCol : function(grid) {
- grid.deleteCols();
- },
-
- mceTableDeleteRow : function(grid) {
- grid.deleteRows();
- },
-
- mceTableCutRow : function(grid) {
- clipboardRows = grid.cutRows();
- },
-
- mceTableCopyRow : function(grid) {
- clipboardRows = grid.copyRows();
- },
-
- mceTablePasteRowBefore : function(grid) {
- grid.pasteRows(clipboardRows, true);
- },
-
- mceTablePasteRowAfter : function(grid) {
- grid.pasteRows(clipboardRows);
- },
-
- mceTableDelete : function(grid) {
- grid.deleteTable();
- }
- }, function(func, name) {
- ed.addCommand(name, function() {
- var grid = createTableGrid();
-
- if (grid) {
- func(grid);
- ed.execCommand('mceRepaint');
- cleanup();
- }
- });
- });
-
- // Register dialog commands
- each({
- mceInsertTable : function(val) {
- winMan.open({
- url : url + '/table.htm',
- width : 400 + parseInt(ed.getLang('table.table_delta_width', 0)),
- height : 320 + parseInt(ed.getLang('table.table_delta_height', 0)),
- inline : 1
- }, {
- plugin_url : url,
- action : val ? val.action : 0
- });
- },
-
- mceTableRowProps : function() {
- winMan.open({
- url : url + '/row.htm',
- width : 400 + parseInt(ed.getLang('table.rowprops_delta_width', 0)),
- height : 295 + parseInt(ed.getLang('table.rowprops_delta_height', 0)),
- inline : 1
- }, {
- plugin_url : url
- });
- },
-
- mceTableCellProps : function() {
- winMan.open({
- url : url + '/cell.htm',
- width : 400 + parseInt(ed.getLang('table.cellprops_delta_width', 0)),
- height : 295 + parseInt(ed.getLang('table.cellprops_delta_height', 0)),
- inline : 1
- }, {
- plugin_url : url
- });
- }
- }, function(func, name) {
- ed.addCommand(name, function(ui, val) {
- func(val);
- });
- });
- }
- });
-
- // Register plugin
- tinymce.PluginManager.add('table', tinymce.plugins.TablePlugin);
-})(tinymce);
+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function(tinymce) {
+ var each = tinymce.each;
+
+ // Checks if the selection/caret is at the start of the specified block element
+ function isAtStart(rng, par) {
+ var doc = par.ownerDocument, rng2 = doc.createRange(), elm;
+
+ rng2.setStartBefore(par);
+ rng2.setEnd(rng.endContainer, rng.endOffset);
+
+ elm = doc.createElement('body');
+ elm.appendChild(rng2.cloneContents());
+
+ // Check for text characters of other elements that should be treated as content
+ return elm.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi, '-').replace(/<[^>]+>/g, '').length == 0;
+ };
+
+ function getSpanVal(td, name) {
+ return parseInt(td.getAttribute(name) || 1);
+ }
+
+ /**
+ * Table Grid class.
+ */
+ function TableGrid(table, dom, selection) {
+ var grid, startPos, endPos, selectedCell;
+
+ buildGrid();
+ selectedCell = dom.getParent(selection.getStart(), 'th,td');
+ if (selectedCell) {
+ startPos = getPos(selectedCell);
+ endPos = findEndPos();
+ selectedCell = getCell(startPos.x, startPos.y);
+ }
+
+ function cloneNode(node, children) {
+ node = node.cloneNode(children);
+ node.removeAttribute('id');
+
+ return node;
+ }
+
+ function buildGrid() {
+ var startY = 0;
+
+ grid = [];
+
+ each(['thead', 'tbody', 'tfoot'], function(part) {
+ var rows = dom.select('> ' + part + ' tr', table);
+
+ each(rows, function(tr, y) {
+ y += startY;
+
+ each(dom.select('> td, > th', tr), function(td, x) {
+ var x2, y2, rowspan, colspan;
+
+ // Skip over existing cells produced by rowspan
+ if (grid[y]) {
+ while (grid[y][x])
+ x++;
+ }
+
+ // Get col/rowspan from cell
+ rowspan = getSpanVal(td, 'rowspan');
+ colspan = getSpanVal(td, 'colspan');
+
+ // Fill out rowspan/colspan right and down
+ for (y2 = y; y2 < y + rowspan; y2++) {
+ if (!grid[y2])
+ grid[y2] = [];
+
+ for (x2 = x; x2 < x + colspan; x2++) {
+ grid[y2][x2] = {
+ part : part,
+ real : y2 == y && x2 == x,
+ elm : td,
+ rowspan : rowspan,
+ colspan : colspan
+ };
+ }
+ }
+ });
+ });
+
+ startY += rows.length;
+ });
+ };
+
+ function getCell(x, y) {
+ var row;
+
+ row = grid[y];
+ if (row)
+ return row[x];
+ };
+
+ function setSpanVal(td, name, val) {
+ if (td) {
+ val = parseInt(val);
+
+ if (val === 1)
+ td.removeAttribute(name, 1);
+ else
+ td.setAttribute(name, val, 1);
+ }
+ }
+
+ function isCellSelected(cell) {
+ return cell && (dom.hasClass(cell.elm, 'mceSelected') || cell == selectedCell);
+ };
+
+ function getSelectedRows() {
+ var rows = [];
+
+ each(table.rows, function(row) {
+ each(row.cells, function(cell) {
+ if (dom.hasClass(cell, 'mceSelected') || cell == selectedCell.elm) {
+ rows.push(row);
+ return false;
+ }
+ });
+ });
+
+ return rows;
+ };
+
+ function deleteTable() {
+ var rng = dom.createRng();
+
+ rng.setStartAfter(table);
+ rng.setEndAfter(table);
+
+ selection.setRng(rng);
+
+ dom.remove(table);
+ };
+
+ function cloneCell(cell) {
+ var formatNode;
+
+ // Clone formats
+ tinymce.walk(cell, function(node) {
+ var curNode;
+
+ if (node.nodeType == 3) {
+ each(dom.getParents(node.parentNode, null, cell).reverse(), function(node) {
+ node = cloneNode(node, false);
+
+ if (!formatNode)
+ formatNode = curNode = node;
+ else if (curNode)
+ curNode.appendChild(node);
+
+ curNode = node;
+ });
+
+ // Add something to the inner node
+ if (curNode)
+ curNode.innerHTML = tinymce.isIE ? '&nbsp;' : '<br data-mce-bogus="1" />';
+
+ return false;
+ }
+ }, 'childNodes');
+
+ cell = cloneNode(cell, false);
+ setSpanVal(cell, 'rowSpan', 1);
+ setSpanVal(cell, 'colSpan', 1);
+
+ if (formatNode) {
+ cell.appendChild(formatNode);
+ } else {
+ if (!tinymce.isIE)
+ cell.innerHTML = '<br data-mce-bogus="1" />';
+ }
+
+ return cell;
+ };
+
+ function cleanup() {
+ var rng = dom.createRng();
+
+ // Empty rows
+ each(dom.select('tr', table), function(tr) {
+ if (tr.cells.length == 0)
+ dom.remove(tr);
+ });
+
+ // Empty table
+ if (dom.select('tr', table).length == 0) {
+ rng.setStartAfter(table);
+ rng.setEndAfter(table);
+ selection.setRng(rng);
+ dom.remove(table);
+ return;
+ }
+
+ // Empty header/body/footer
+ each(dom.select('thead,tbody,tfoot', table), function(part) {
+ if (part.rows.length == 0)
+ dom.remove(part);
+ });
+
+ // Restore selection to start position if it still exists
+ buildGrid();
+
+ // Restore the selection to the closest table position
+ row = grid[Math.min(grid.length - 1, startPos.y)];
+ if (row) {
+ selection.select(row[Math.min(row.length - 1, startPos.x)].elm, true);
+ selection.collapse(true);
+ }
+ };
+
+ function fillLeftDown(x, y, rows, cols) {
+ var tr, x2, r, c, cell;
+
+ tr = grid[y][x].elm.parentNode;
+ for (r = 1; r <= rows; r++) {
+ tr = dom.getNext(tr, 'tr');
+
+ if (tr) {
+ // Loop left to find real cell
+ for (x2 = x; x2 >= 0; x2--) {
+ cell = grid[y + r][x2].elm;
+
+ if (cell.parentNode == tr) {
+ // Append clones after
+ for (c = 1; c <= cols; c++)
+ dom.insertAfter(cloneCell(cell), cell);
+
+ break;
+ }
+ }
+
+ if (x2 == -1) {
+ // Insert nodes before first cell
+ for (c = 1; c <= cols; c++)
+ tr.insertBefore(cloneCell(tr.cells[0]), tr.cells[0]);
+ }
+ }
+ }
+ };
+
+ function split() {
+ each(grid, function(row, y) {
+ each(row, function(cell, x) {
+ var colSpan, rowSpan, newCell, i;
+
+ if (isCellSelected(cell)) {
+ cell = cell.elm;
+ colSpan = getSpanVal(cell, 'colspan');
+ rowSpan = getSpanVal(cell, 'rowspan');
+
+ if (colSpan > 1 || rowSpan > 1) {
+ setSpanVal(cell, 'rowSpan', 1);
+ setSpanVal(cell, 'colSpan', 1);
+
+ // Insert cells right
+ for (i = 0; i < colSpan - 1; i++)
+ dom.insertAfter(cloneCell(cell), cell);
+
+ fillLeftDown(x, y, rowSpan - 1, colSpan);
+ }
+ }
+ });
+ });
+ };
+
+ function merge(cell, cols, rows) {
+ var startX, startY, endX, endY, x, y, startCell, endCell, cell, children, count;
+
+ // Use specified cell and cols/rows
+ if (cell) {
+ pos = getPos(cell);
+ startX = pos.x;
+ startY = pos.y;
+ endX = startX + (cols - 1);
+ endY = startY + (rows - 1);
+ } else {
+ startPos = endPos = null;
+
+ // Calculate start/end pos by checking for selected cells in grid works better with context menu
+ each(grid, function(row, y) {
+ each(row, function(cell, x) {
+ if (isCellSelected(cell)) {
+ if (!startPos) {
+ startPos = {x: x, y: y};
+ }
+
+ endPos = {x: x, y: y};
+ }
+ });
+ });
+
+ // Use selection
+ startX = startPos.x;
+ startY = startPos.y;
+ endX = endPos.x;
+ endY = endPos.y;
+ }
+
+ // Find start/end cells
+ startCell = getCell(startX, startY);
+ endCell = getCell(endX, endY);
+
+ // Check if the cells exists and if they are of the same part for example tbody = tbody
+ if (startCell && endCell && startCell.part == endCell.part) {
+ // Split and rebuild grid
+ split();
+ buildGrid();
+
+ // Set row/col span to start cell
+ startCell = getCell(startX, startY).elm;
+ setSpanVal(startCell, 'colSpan', (endX - startX) + 1);
+ setSpanVal(startCell, 'rowSpan', (endY - startY) + 1);
+
+ // Remove other cells and add it's contents to the start cell
+ for (y = startY; y <= endY; y++) {
+ for (x = startX; x <= endX; x++) {
+ if (!grid[y] || !grid[y][x])
+ continue;
+
+ cell = grid[y][x].elm;
+
+ if (cell != startCell) {
+ // Move children to startCell
+ children = tinymce.grep(cell.childNodes);
+ each(children, function(node) {
+ startCell.appendChild(node);
+ });
+
+ // Remove bogus nodes if there is children in the target cell
+ if (children.length) {
+ children = tinymce.grep(startCell.childNodes);
+ count = 0;
+ each(children, function(node) {
+ if (node.nodeName == 'BR' && dom.getAttrib(node, 'data-mce-bogus') && count++ < children.length - 1)
+ startCell.removeChild(node);
+ });
+ }
+
+ // Remove cell
+ dom.remove(cell);
+ }
+ }
+ }
+
+ // Remove empty rows etc and restore caret location
+ cleanup();
+ }
+ };
+
+ function insertRow(before) {
+ var posY, cell, lastCell, x, rowElm, newRow, newCell, otherCell, rowSpan;
+
+ // Find first/last row
+ each(grid, function(row, y) {
+ each(row, function(cell, x) {
+ if (isCellSelected(cell)) {
+ cell = cell.elm;
+ rowElm = cell.parentNode;
+ newRow = cloneNode(rowElm, false);
+ posY = y;
+
+ if (before)
+ return false;
+ }
+ });
+
+ if (before)
+ return !posY;
+ });
+
+ for (x = 0; x < grid[0].length; x++) {
+ // Cell not found could be because of an invalid table structure
+ if (!grid[posY][x])
+ continue;
+
+ cell = grid[posY][x].elm;
+
+ if (cell != lastCell) {
+ if (!before) {
+ rowSpan = getSpanVal(cell, 'rowspan');
+ if (rowSpan > 1) {
+ setSpanVal(cell, 'rowSpan', rowSpan + 1);
+ continue;
+ }
+ } else {
+ // Check if cell above can be expanded
+ if (posY > 0 && grid[posY - 1][x]) {
+ otherCell = grid[posY - 1][x].elm;
+ rowSpan = getSpanVal(otherCell, 'rowSpan');
+ if (rowSpan > 1) {
+ setSpanVal(otherCell, 'rowSpan', rowSpan + 1);
+ continue;
+ }
+ }
+ }
+
+ // Insert new cell into new row
+ newCell = cloneCell(cell);
+ setSpanVal(newCell, 'colSpan', cell.colSpan);
+
+ newRow.appendChild(newCell);
+
+ lastCell = cell;
+ }
+ }
+
+ if (newRow.hasChildNodes()) {
+ if (!before)
+ dom.insertAfter(newRow, rowElm);
+ else
+ rowElm.parentNode.insertBefore(newRow, rowElm);
+ }
+ };
+
+ function insertCol(before) {
+ var posX, lastCell;
+
+ // Find first/last column
+ each(grid, function(row, y) {
+ each(row, function(cell, x) {
+ if (isCellSelected(cell)) {
+ posX = x;
+
+ if (before)
+ return false;
+ }
+ });
+
+ if (before)
+ return !posX;
+ });
+
+ each(grid, function(row, y) {
+ var cell, rowSpan, colSpan;
+
+ if (!row[posX])
+ return;
+
+ cell = row[posX].elm;
+ if (cell != lastCell) {
+ colSpan = getSpanVal(cell, 'colspan');
+ rowSpan = getSpanVal(cell, 'rowspan');
+
+ if (colSpan == 1) {
+ if (!before) {
+ dom.insertAfter(cloneCell(cell), cell);
+ fillLeftDown(posX, y, rowSpan - 1, colSpan);
+ } else {
+ cell.parentNode.insertBefore(cloneCell(cell), cell);
+ fillLeftDown(posX, y, rowSpan - 1, colSpan);
+ }
+ } else
+ setSpanVal(cell, 'colSpan', cell.colSpan + 1);
+
+ lastCell = cell;
+ }
+ });
+ };
+
+ function deleteCols() {
+ var cols = [];
+
+ // Get selected column indexes
+ each(grid, function(row, y) {
+ each(row, function(cell, x) {
+ if (isCellSelected(cell) && tinymce.inArray(cols, x) === -1) {
+ each(grid, function(row) {
+ var cell = row[x].elm, colSpan;
+
+ colSpan = getSpanVal(cell, 'colSpan');
+
+ if (colSpan > 1)
+ setSpanVal(cell, 'colSpan', colSpan - 1);
+ else
+ dom.remove(cell);
+ });
+
+ cols.push(x);
+ }
+ });
+ });
+
+ cleanup();
+ };
+
+ function deleteRows() {
+ var rows;
+
+ function deleteRow(tr) {
+ var nextTr, pos, lastCell;
+
+ nextTr = dom.getNext(tr, 'tr');
+
+ // Move down row spanned cells
+ each(tr.cells, function(cell) {
+ var rowSpan = getSpanVal(cell, 'rowSpan');
+
+ if (rowSpan > 1) {
+ setSpanVal(cell, 'rowSpan', rowSpan - 1);
+ pos = getPos(cell);
+ fillLeftDown(pos.x, pos.y, 1, 1);
+ }
+ });
+
+ // Delete cells
+ pos = getPos(tr.cells[0]);
+ each(grid[pos.y], function(cell) {
+ var rowSpan;
+
+ cell = cell.elm;
+
+ if (cell != lastCell) {
+ rowSpan = getSpanVal(cell, 'rowSpan');
+
+ if (rowSpan <= 1)
+ dom.remove(cell);
+ else
+ setSpanVal(cell, 'rowSpan', rowSpan - 1);
+
+ lastCell = cell;
+ }
+ });
+ };
+
+ // Get selected rows and move selection out of scope
+ rows = getSelectedRows();
+
+ // Delete all selected rows
+ each(rows.reverse(), function(tr) {
+ deleteRow(tr);
+ });
+
+ cleanup();
+ };
+
+ function cutRows() {
+ var rows = getSelectedRows();
+
+ dom.remove(rows);
+ cleanup();
+
+ return rows;
+ };
+
+ function copyRows() {
+ var rows = getSelectedRows();
+
+ each(rows, function(row, i) {
+ rows[i] = cloneNode(row, true);
+ });
+
+ return rows;
+ };
+
+ function pasteRows(rows, before) {
+ var selectedRows = getSelectedRows(),
+ targetRow = selectedRows[before ? 0 : selectedRows.length - 1],
+ targetCellCount = targetRow.cells.length;
+
+ // Calc target cell count
+ each(grid, function(row) {
+ var match;
+
+ targetCellCount = 0;
+ each(row, function(cell, x) {
+ if (cell.real)
+ targetCellCount += cell.colspan;
+
+ if (cell.elm.parentNode == targetRow)
+ match = 1;
+ });
+
+ if (match)
+ return false;
+ });
+
+ if (!before)
+ rows.reverse();
+
+ each(rows, function(row) {
+ var cellCount = row.cells.length, cell;
+
+ // Remove col/rowspans
+ for (i = 0; i < cellCount; i++) {
+ cell = row.cells[i];
+ setSpanVal(cell, 'colSpan', 1);
+ setSpanVal(cell, 'rowSpan', 1);
+ }
+
+ // Needs more cells
+ for (i = cellCount; i < targetCellCount; i++)
+ row.appendChild(cloneCell(row.cells[cellCount - 1]));
+
+ // Needs less cells
+ for (i = targetCellCount; i < cellCount; i++)
+ dom.remove(row.cells[i]);
+
+ // Add before/after
+ if (before)
+ targetRow.parentNode.insertBefore(row, targetRow);
+ else
+ dom.insertAfter(row, targetRow);
+ });
+
+ // Remove current selection
+ dom.removeClass(dom.select('td.mceSelected,th.mceSelected'), 'mceSelected');
+ };
+
+ function getPos(target) {
+ var pos;
+
+ each(grid, function(row, y) {
+ each(row, function(cell, x) {
+ if (cell.elm == target) {
+ pos = {x : x, y : y};
+ return false;
+ }
+ });
+
+ return !pos;
+ });
+
+ return pos;
+ };
+
+ function setStartCell(cell) {
+ startPos = getPos(cell);
+ };
+
+ function findEndPos() {
+ var pos, maxX, maxY;
+
+ maxX = maxY = 0;
+
+ each(grid, function(row, y) {
+ each(row, function(cell, x) {
+ var colSpan, rowSpan;
+
+ if (isCellSelected(cell)) {
+ cell = grid[y][x];
+
+ if (x > maxX)
+ maxX = x;
+
+ if (y > maxY)
+ maxY = y;
+
+ if (cell.real) {
+ colSpan = cell.colspan - 1;
+ rowSpan = cell.rowspan - 1;
+
+ if (colSpan) {
+ if (x + colSpan > maxX)
+ maxX = x + colSpan;
+ }
+
+ if (rowSpan) {
+ if (y + rowSpan > maxY)
+ maxY = y + rowSpan;
+ }
+ }
+ }
+ });
+ });
+
+ return {x : maxX, y : maxY};
+ };
+
+ function setEndCell(cell) {
+ var startX, startY, endX, endY, maxX, maxY, colSpan, rowSpan;
+
+ endPos = getPos(cell);
+
+ if (startPos && endPos) {
+ // Get start/end positions
+ startX = Math.min(startPos.x, endPos.x);
+ startY = Math.min(startPos.y, endPos.y);
+ endX = Math.max(startPos.x, endPos.x);
+ endY = Math.max(startPos.y, endPos.y);
+
+ // Expand end positon to include spans
+ maxX = endX;
+ maxY = endY;
+
+ // Expand startX
+ for (y = startY; y <= maxY; y++) {
+ cell = grid[y][startX];
+
+ if (!cell.real) {
+ if (startX - (cell.colspan - 1) < startX)
+ startX -= cell.colspan - 1;
+ }
+ }
+
+ // Expand startY
+ for (x = startX; x <= maxX; x++) {
+ cell = grid[startY][x];
+
+ if (!cell.real) {
+ if (startY - (cell.rowspan - 1) < startY)
+ startY -= cell.rowspan - 1;
+ }
+ }
+
+ // Find max X, Y
+ for (y = startY; y <= endY; y++) {
+ for (x = startX; x <= endX; x++) {
+ cell = grid[y][x];
+
+ if (cell.real) {
+ colSpan = cell.colspan - 1;
+ rowSpan = cell.rowspan - 1;
+
+ if (colSpan) {
+ if (x + colSpan > maxX)
+ maxX = x + colSpan;
+ }
+
+ if (rowSpan) {
+ if (y + rowSpan > maxY)
+ maxY = y + rowSpan;
+ }
+ }
+ }
+ }
+
+ // Remove current selection
+ dom.removeClass(dom.select('td.mceSelected,th.mceSelected'), 'mceSelected');
+
+ // Add new selection
+ for (y = startY; y <= maxY; y++) {
+ for (x = startX; x <= maxX; x++) {
+ if (grid[y][x])
+ dom.addClass(grid[y][x].elm, 'mceSelected');
+ }
+ }
+ }
+ };
+
+ // Expose to public
+ tinymce.extend(this, {
+ deleteTable : deleteTable,
+ split : split,
+ merge : merge,
+ insertRow : insertRow,
+ insertCol : insertCol,
+ deleteCols : deleteCols,
+ deleteRows : deleteRows,
+ cutRows : cutRows,
+ copyRows : copyRows,
+ pasteRows : pasteRows,
+ getPos : getPos,
+ setStartCell : setStartCell,
+ setEndCell : setEndCell
+ });
+ };
+
+ tinymce.create('tinymce.plugins.TablePlugin', {
+ init : function(ed, url) {
+ var winMan, clipboardRows, hasCellSelection = true; // Might be selected cells on reload
+
+ function createTableGrid(node) {
+ var selection = ed.selection, tblElm = ed.dom.getParent(node || selection.getNode(), 'table');
+
+ if (tblElm)
+ return new TableGrid(tblElm, ed.dom, selection);
+ };
+
+ function cleanup() {
+ // Restore selection possibilities
+ ed.getBody().style.webkitUserSelect = '';
+
+ if (hasCellSelection) {
+ ed.dom.removeClass(ed.dom.select('td.mceSelected,th.mceSelected'), 'mceSelected');
+ hasCellSelection = false;
+ }
+ };
+
+ // Register buttons
+ each([
+ ['table', 'table.desc', 'mceInsertTable', true],
+ ['delete_table', 'table.del', 'mceTableDelete'],
+ ['delete_col', 'table.delete_col_desc', 'mceTableDeleteCol'],
+ ['delete_row', 'table.delete_row_desc', 'mceTableDeleteRow'],
+ ['col_after', 'table.col_after_desc', 'mceTableInsertColAfter'],
+ ['col_before', 'table.col_before_desc', 'mceTableInsertColBefore'],
+ ['row_after', 'table.row_after_desc', 'mceTableInsertRowAfter'],
+ ['row_before', 'table.row_before_desc', 'mceTableInsertRowBefore'],
+ ['row_props', 'table.row_desc', 'mceTableRowProps', true],
+ ['cell_props', 'table.cell_desc', 'mceTableCellProps', true],
+ ['split_cells', 'table.split_cells_desc', 'mceTableSplitCells', true],
+ ['merge_cells', 'table.merge_cells_desc', 'mceTableMergeCells', true]
+ ], function(c) {
+ ed.addButton(c[0], {title : c[1], cmd : c[2], ui : c[3]});
+ });
+
+ // Select whole table is a table border is clicked
+ if (!tinymce.isIE) {
+ ed.onClick.add(function(ed, e) {
+ e = e.target;
+
+ if (e.nodeName === 'TABLE') {
+ ed.selection.select(e);
+ ed.nodeChanged();
+ }
+ });
+ }
+
+ ed.onPreProcess.add(function(ed, args) {
+ var nodes, i, node, dom = ed.dom, value;
+
+ nodes = dom.select('table', args.node);
+ i = nodes.length;
+ while (i--) {
+ node = nodes[i];
+ dom.setAttrib(node, 'data-mce-style', '');
+
+ if ((value = dom.getAttrib(node, 'width'))) {
+ dom.setStyle(node, 'width', value);
+ dom.setAttrib(node, 'width', '');
+ }
+
+ if ((value = dom.getAttrib(node, 'height'))) {
+ dom.setStyle(node, 'height', value);
+ dom.setAttrib(node, 'height', '');
+ }
+ }
+ });
+
+ // Handle node change updates
+ ed.onNodeChange.add(function(ed, cm, n) {
+ var p;
+
+ n = ed.selection.getStart();
+ p = ed.dom.getParent(n, 'td,th,caption');
+ cm.setActive('table', n.nodeName === 'TABLE' || !!p);
+
+ // Disable table tools if we are in caption
+ if (p && p.nodeName === 'CAPTION')
+ p = 0;
+
+ cm.setDisabled('delete_table', !p);
+ cm.setDisabled('delete_col', !p);
+ cm.setDisabled('delete_table', !p);
+ cm.setDisabled('delete_row', !p);
+ cm.setDisabled('col_after', !p);
+ cm.setDisabled('col_before', !p);
+ cm.setDisabled('row_after', !p);
+ cm.setDisabled('row_before', !p);
+ cm.setDisabled('row_props', !p);
+ cm.setDisabled('cell_props', !p);
+ cm.setDisabled('split_cells', !p);
+ cm.setDisabled('merge_cells', !p);
+ });
+
+ ed.onInit.add(function(ed) {
+ var startTable, startCell, dom = ed.dom, tableGrid;
+
+ winMan = ed.windowManager;
+
+ // Add cell selection logic
+ ed.onMouseDown.add(function(ed, e) {
+ if (e.button != 2) {
+ cleanup();
+
+ startCell = dom.getParent(e.target, 'td,th');
+ startTable = dom.getParent(startCell, 'table');
+ }
+ });
+
+ dom.bind(ed.getDoc(), 'mouseover', function(e) {
+ var sel, table, target = e.target;
+
+ if (startCell && (tableGrid || target != startCell) && (target.nodeName == 'TD' || target.nodeName == 'TH')) {
+ table = dom.getParent(target, 'table');
+ if (table == startTable) {
+ if (!tableGrid) {
+ tableGrid = createTableGrid(table);
+ tableGrid.setStartCell(startCell);
+
+ ed.getBody().style.webkitUserSelect = 'none';
+ }
+
+ tableGrid.setEndCell(target);
+ hasCellSelection = true;
+ }
+
+ // Remove current selection
+ sel = ed.selection.getSel();
+
+ try {
+ if (sel.removeAllRanges)
+ sel.removeAllRanges();
+ else
+ sel.empty();
+ } catch (ex) {
+ // IE9 might throw errors here
+ }
+
+ e.preventDefault();
+ }
+ });
+
+ ed.onMouseUp.add(function(ed, e) {
+ var rng, sel = ed.selection, selectedCells, nativeSel = sel.getSel(), walker, node, lastNode, endNode;
+
+ // Move selection to startCell
+ if (startCell) {
+ if (tableGrid)
+ ed.getBody().style.webkitUserSelect = '';
+
+ function setPoint(node, start) {
+ var walker = new tinymce.dom.TreeWalker(node, node);
+
+ do {
+ // Text node
+ if (node.nodeType == 3 && tinymce.trim(node.nodeValue).length != 0) {
+ if (start)
+ rng.setStart(node, 0);
+ else
+ rng.setEnd(node, node.nodeValue.length);
+
+ return;
+ }
+
+ // BR element
+ if (node.nodeName == 'BR') {
+ if (start)
+ rng.setStartBefore(node);
+ else
+ rng.setEndBefore(node);
+
+ return;
+ }
+ } while (node = (start ? walker.next() : walker.prev()));
+ }
+
+ // Try to expand text selection as much as we can only Gecko supports cell selection
+ selectedCells = dom.select('td.mceSelected,th.mceSelected');
+ if (selectedCells.length > 0) {
+ rng = dom.createRng();
+ node = selectedCells[0];
+ endNode = selectedCells[selectedCells.length - 1];
+ rng.setStartBefore(node);
+ rng.setEndAfter(node);
+
+ setPoint(node, 1);
+ walker = new tinymce.dom.TreeWalker(node, dom.getParent(selectedCells[0], 'table'));
+
+ do {
+ if (node.nodeName == 'TD' || node.nodeName == 'TH') {
+ if (!dom.hasClass(node, 'mceSelected'))
+ break;
+
+ lastNode = node;
+ }
+ } while (node = walker.next());
+
+ setPoint(lastNode);
+
+ sel.setRng(rng);
+ }
+
+ ed.nodeChanged();
+ startCell = tableGrid = startTable = null;
+ }
+ });
+
+ ed.onKeyUp.add(function(ed, e) {
+ cleanup();
+ });
+
+ ed.onKeyDown.add(function (ed, e) {
+ fixTableCellSelection(ed);
+ });
+
+ ed.onMouseDown.add(function (ed, e) {
+ if (e.button != 2) {
+ fixTableCellSelection(ed);
+ }
+ });
+ function tableCellSelected(ed, rng, n, currentCell) {
+ // The decision of when a table cell is selected is somewhat involved. The fact that this code is
+ // required is actually a pointer to the root cause of this bug. A cell is selected when the start
+ // and end offsets are 0, the start container is a text, and the selection node is either a TR (most cases)
+ // or the parent of the table (in the case of the selection containing the last cell of a table).
+ var TEXT_NODE = 3, table = ed.dom.getParent(rng.startContainer, 'TABLE'),
+ tableParent, allOfCellSelected, tableCellSelection;
+ if (table)
+ tableParent = table.parentNode;
+ allOfCellSelected =rng.startContainer.nodeType == TEXT_NODE &&
+ rng.startOffset == 0 &&
+ rng.endOffset == 0 &&
+ currentCell &&
+ (n.nodeName=="TR" || n==tableParent);
+ tableCellSelection = (n.nodeName=="TD"||n.nodeName=="TH")&& !currentCell;
+ return allOfCellSelected || tableCellSelection;
+ // return false;
+ }
+
+ // this nasty hack is here to work around some WebKit selection bugs.
+ function fixTableCellSelection(ed) {
+ if (!tinymce.isWebKit)
+ return;
+
+ var rng = ed.selection.getRng();
+ var n = ed.selection.getNode();
+ var currentCell = ed.dom.getParent(rng.startContainer, 'TD,TH');
+
+ if (!tableCellSelected(ed, rng, n, currentCell))
+ return;
+ if (!currentCell) {
+ currentCell=n;
+ }
+
+ // Get the very last node inside the table cell
+ var end = currentCell.lastChild;
+ while (end.lastChild)
+ end = end.lastChild;
+
+ // Select the entire table cell. Nothing outside of the table cell should be selected.
+ rng.setEnd(end, end.nodeValue.length);
+ ed.selection.setRng(rng);
+ }
+ ed.plugins.table.fixTableCellSelection=fixTableCellSelection;
+
+ // Add context menu
+ if (ed && ed.plugins.contextmenu) {
+ ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) {
+ var sm, se = ed.selection, el = se.getNode() || ed.getBody();
+
+ if (ed.dom.getParent(e, 'td') || ed.dom.getParent(e, 'th') || ed.dom.select('td.mceSelected,th.mceSelected').length) {
+ m.removeAll();
+
+ if (el.nodeName == 'A' && !ed.dom.getAttrib(el, 'name')) {
+ m.add({title : 'advanced.link_desc', icon : 'link', cmd : ed.plugins.advlink ? 'mceAdvLink' : 'mceLink', ui : true});
+ m.add({title : 'advanced.unlink_desc', icon : 'unlink', cmd : 'UnLink'});
+ m.addSeparator();
+ }
+
+ if (el.nodeName == 'IMG' && el.className.indexOf('mceItem') == -1) {
+ m.add({title : 'advanced.image_desc', icon : 'image', cmd : ed.plugins.advimage ? 'mceAdvImage' : 'mceImage', ui : true});
+ m.addSeparator();
+ }
+
+ m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable', value : {action : 'insert'}});
+ m.add({title : 'table.props_desc', icon : 'table_props', cmd : 'mceInsertTable'});
+ m.add({title : 'table.del', icon : 'delete_table', cmd : 'mceTableDelete'});
+ m.addSeparator();
+
+ // Cell menu
+ sm = m.addMenu({title : 'table.cell'});
+ sm.add({title : 'table.cell_desc', icon : 'cell_props', cmd : 'mceTableCellProps'});
+ sm.add({title : 'table.split_cells_desc', icon : 'split_cells', cmd : 'mceTableSplitCells'});
+ sm.add({title : 'table.merge_cells_desc', icon : 'merge_cells', cmd : 'mceTableMergeCells'});
+
+ // Row menu
+ sm = m.addMenu({title : 'table.row'});
+ sm.add({title : 'table.row_desc', icon : 'row_props', cmd : 'mceTableRowProps'});
+ sm.add({title : 'table.row_before_desc', icon : 'row_before', cmd : 'mceTableInsertRowBefore'});
+ sm.add({title : 'table.row_after_desc', icon : 'row_after', cmd : 'mceTableInsertRowAfter'});
+ sm.add({title : 'table.delete_row_desc', icon : 'delete_row', cmd : 'mceTableDeleteRow'});
+ sm.addSeparator();
+ sm.add({title : 'table.cut_row_desc', icon : 'cut', cmd : 'mceTableCutRow'});
+ sm.add({title : 'table.copy_row_desc', icon : 'copy', cmd : 'mceTableCopyRow'});
+ sm.add({title : 'table.paste_row_before_desc', icon : 'paste', cmd : 'mceTablePasteRowBefore'}).setDisabled(!clipboardRows);
+ sm.add({title : 'table.paste_row_after_desc', icon : 'paste', cmd : 'mceTablePasteRowAfter'}).setDisabled(!clipboardRows);
+
+ // Column menu
+ sm = m.addMenu({title : 'table.col'});
+ sm.add({title : 'table.col_before_desc', icon : 'col_before', cmd : 'mceTableInsertColBefore'});
+ sm.add({title : 'table.col_after_desc', icon : 'col_after', cmd : 'mceTableInsertColAfter'});
+ sm.add({title : 'table.delete_col_desc', icon : 'delete_col', cmd : 'mceTableDeleteCol'});
+ } else
+ m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable'});
+ });
+ }
+
+ // Fix to allow navigating up and down in a table in WebKit browsers.
+ if (tinymce.isWebKit) {
+ function moveSelection(ed, e) {
+ var VK = tinymce.VK;
+ var key = e.keyCode;
+
+ function handle(upBool, sourceNode, event) {
+ var siblingDirection = upBool ? 'previousSibling' : 'nextSibling';
+ var currentRow = ed.dom.getParent(sourceNode, 'tr');
+ var siblingRow = currentRow[siblingDirection];
+
+ if (siblingRow) {
+ moveCursorToRow(ed, sourceNode, siblingRow, upBool);
+ tinymce.dom.Event.cancel(event);
+ return true;
+ } else {
+ var tableNode = ed.dom.getParent(currentRow, 'table');
+ var middleNode = currentRow.parentNode;
+ var parentNodeName = middleNode.nodeName.toLowerCase();
+ if (parentNodeName === 'tbody' || parentNodeName === (upBool ? 'tfoot' : 'thead')) {
+ var targetParent = getTargetParent(upBool, tableNode, middleNode, 'tbody');
+ if (targetParent !== null) {
+ return moveToRowInTarget(upBool, targetParent, sourceNode, event);
+ }
+ }
+ return escapeTable(upBool, currentRow, siblingDirection, tableNode, event);
+ }
+ }
+
+ function getTargetParent(upBool, topNode, secondNode, nodeName) {
+ var tbodies = ed.dom.select('>' + nodeName, topNode);
+ var position = tbodies.indexOf(secondNode);
+ if (upBool && position === 0 || !upBool && position === tbodies.length - 1) {
+ return getFirstHeadOrFoot(upBool, topNode);
+ } else if (position === -1) {
+ var topOrBottom = secondNode.tagName.toLowerCase() === 'thead' ? 0 : tbodies.length - 1;
+ return tbodies[topOrBottom];
+ } else {
+ return tbodies[position + (upBool ? -1 : 1)];
+ }
+ }
+
+ function getFirstHeadOrFoot(upBool, parent) {
+ var tagName = upBool ? 'thead' : 'tfoot';
+ var headOrFoot = ed.dom.select('>' + tagName, parent);
+ return headOrFoot.length !== 0 ? headOrFoot[0] : null;
+ }
+
+ function moveToRowInTarget(upBool, targetParent, sourceNode, event) {
+ var targetRow = getChildForDirection(targetParent, upBool);
+ targetRow && moveCursorToRow(ed, sourceNode, targetRow, upBool);
+ tinymce.dom.Event.cancel(event);
+ return true;
+ }
+
+ function escapeTable(upBool, currentRow, siblingDirection, table, event) {
+ var tableSibling = table[siblingDirection];
+ if (tableSibling) {
+ moveCursorToStartOfElement(tableSibling);
+ return true;
+ } else {
+ var parentCell = ed.dom.getParent(table, 'td,th');
+ if (parentCell) {
+ return handle(upBool, parentCell, event);
+ } else {
+ var backUpSibling = getChildForDirection(currentRow, !upBool);
+ moveCursorToStartOfElement(backUpSibling);
+ return tinymce.dom.Event.cancel(event);
+ }
+ }
+ }
+
+ function getChildForDirection(parent, up) {
+ var child = parent && parent[up ? 'lastChild' : 'firstChild'];
+ // BR is not a valid table child to return in this case we return the table cell
+ return child && child.nodeName === 'BR' ? ed.dom.getParent(child, 'td,th') : child;
+ }
+
+ function moveCursorToStartOfElement(n) {
+ ed.selection.setCursorLocation(n, 0);
+ }
+
+ function isVerticalMovement() {
+ return key == VK.UP || key == VK.DOWN;
+ }
+
+ function isInTable(ed) {
+ var node = ed.selection.getNode();
+ var currentRow = ed.dom.getParent(node, 'tr');
+ return currentRow !== null;
+ }
+
+ function columnIndex(column) {
+ var colIndex = 0;
+ var c = column;
+ while (c.previousSibling) {
+ c = c.previousSibling;
+ colIndex = colIndex + getSpanVal(c, "colspan");
+ }
+ return colIndex;
+ }
+
+ function findColumn(rowElement, columnIndex) {
+ var c = 0;
+ var r = 0;
+ each(rowElement.children, function(cell, i) {
+ c = c + getSpanVal(cell, "colspan");
+ r = i;
+ if (c > columnIndex)
+ return false;
+ });
+ return r;
+ }
+
+ function moveCursorToRow(ed, node, row, upBool) {
+ var srcColumnIndex = columnIndex(ed.dom.getParent(node, 'td,th'));
+ var tgtColumnIndex = findColumn(row, srcColumnIndex);
+ var tgtNode = row.childNodes[tgtColumnIndex];
+ var rowCellTarget = getChildForDirection(tgtNode, upBool);
+ moveCursorToStartOfElement(rowCellTarget || tgtNode);
+ }
+
+ function shouldFixCaret(preBrowserNode) {
+ var newNode = ed.selection.getNode();
+ var newParent = ed.dom.getParent(newNode, 'td,th');
+ var oldParent = ed.dom.getParent(preBrowserNode, 'td,th');
+ return newParent && newParent !== oldParent && checkSameParentTable(newParent, oldParent)
+ }
+
+ function checkSameParentTable(nodeOne, NodeTwo) {
+ return ed.dom.getParent(nodeOne, 'TABLE') === ed.dom.getParent(NodeTwo, 'TABLE');
+ }
+
+ if (isVerticalMovement() && isInTable(ed)) {
+ var preBrowserNode = ed.selection.getNode();
+ setTimeout(function() {
+ if (shouldFixCaret(preBrowserNode)) {
+ handle(!e.shiftKey && key === VK.UP, preBrowserNode, e);
+ }
+ }, 0);
+ }
+ }
+
+ ed.onKeyDown.add(moveSelection);
+ }
+
+ // Fixes an issue on Gecko where it's impossible to place the caret behind a table
+ // This fix will force a paragraph element after the table but only when the forced_root_block setting is enabled
+ function fixTableCaretPos() {
+ var last;
+
+ // Skip empty text nodes form the end
+ for (last = ed.getBody().lastChild; last && last.nodeType == 3 && !last.nodeValue.length; last = last.previousSibling) ;
+
+ if (last && last.nodeName == 'TABLE') {
+ if (ed.settings.forced_root_block)
+ ed.dom.add(ed.getBody(), ed.settings.forced_root_block, null, tinymce.isIE ? '&nbsp;' : '<br data-mce-bogus="1" />');
+ else
+ ed.dom.add(ed.getBody(), 'br', {'data-mce-bogus': '1'});
+ }
+ };
+
+ // Fixes an bug where it's impossible to place the caret before a table in Gecko
+ // this fix solves it by detecting when the caret is at the beginning of such a table
+ // and then manually moves the caret infront of the table
+ if (tinymce.isGecko) {
+ ed.onKeyDown.add(function(ed, e) {
+ var rng, table, dom = ed.dom;
+
+ // On gecko it's not possible to place the caret before a table
+ if (e.keyCode == 37 || e.keyCode == 38) {
+ rng = ed.selection.getRng();
+ table = dom.getParent(rng.startContainer, 'table');
+
+ if (table && ed.getBody().firstChild == table) {
+ if (isAtStart(rng, table)) {
+ rng = dom.createRng();
+
+ rng.setStartBefore(table);
+ rng.setEndBefore(table);
+
+ ed.selection.setRng(rng);
+
+ e.preventDefault();
+ }
+ }
+ }
+ });
+ }
+
+ ed.onKeyUp.add(fixTableCaretPos);
+ ed.onSetContent.add(fixTableCaretPos);
+ ed.onVisualAid.add(fixTableCaretPos);
+
+ ed.onPreProcess.add(function(ed, o) {
+ var last = o.node.lastChild;
+
+ if (last && (last.nodeName == "BR" || (last.childNodes.length == 1 && (last.firstChild.nodeName == 'BR' || last.firstChild.nodeValue == '\u00a0'))) && last.previousSibling && last.previousSibling.nodeName == "TABLE") {
+ ed.dom.remove(last);
+ }
+ });
+
+
+ /**
+ * Fixes bug in Gecko where shift-enter in table cell does not place caret on new line
+ */
+ if (tinymce.isGecko) {
+ ed.onKeyDown.add(function(ed, e) {
+ if (e.keyCode === tinymce.VK.ENTER && e.shiftKey) {
+ var node = ed.selection.getRng().startContainer;
+ var tableCell = dom.getParent(node, 'td,th');
+ if (tableCell) {
+ var zeroSizedNbsp = ed.getDoc().createTextNode("\uFEFF");
+ dom.insertAfter(zeroSizedNbsp, node);
+ }
+ }
+ });
+ }
+
+
+ fixTableCaretPos();
+ ed.startContent = ed.getContent({format : 'raw'});
+ });
+
+ // Register action commands
+ each({
+ mceTableSplitCells : function(grid) {
+ grid.split();
+ },
+
+ mceTableMergeCells : function(grid) {
+ var rowSpan, colSpan, cell;
+
+ cell = ed.dom.getParent(ed.selection.getNode(), 'th,td');
+ if (cell) {
+ rowSpan = cell.rowSpan;
+ colSpan = cell.colSpan;
+ }
+
+ if (!ed.dom.select('td.mceSelected,th.mceSelected').length) {
+ winMan.open({
+ url : url + '/merge_cells.htm',
+ width : 240 + parseInt(ed.getLang('table.merge_cells_delta_width', 0)),
+ height : 110 + parseInt(ed.getLang('table.merge_cells_delta_height', 0)),
+ inline : 1
+ }, {
+ rows : rowSpan,
+ cols : colSpan,
+ onaction : function(data) {
+ grid.merge(cell, data.cols, data.rows);
+ },
+ plugin_url : url
+ });
+ } else
+ grid.merge();
+ },
+
+ mceTableInsertRowBefore : function(grid) {
+ grid.insertRow(true);
+ },
+
+ mceTableInsertRowAfter : function(grid) {
+ grid.insertRow();
+ },
+
+ mceTableInsertColBefore : function(grid) {
+ grid.insertCol(true);
+ },
+
+ mceTableInsertColAfter : function(grid) {
+ grid.insertCol();
+ },
+
+ mceTableDeleteCol : function(grid) {
+ grid.deleteCols();
+ },
+
+ mceTableDeleteRow : function(grid) {
+ grid.deleteRows();
+ },
+
+ mceTableCutRow : function(grid) {
+ clipboardRows = grid.cutRows();
+ },
+
+ mceTableCopyRow : function(grid) {
+ clipboardRows = grid.copyRows();
+ },
+
+ mceTablePasteRowBefore : function(grid) {
+ grid.pasteRows(clipboardRows, true);
+ },
+
+ mceTablePasteRowAfter : function(grid) {
+ grid.pasteRows(clipboardRows);
+ },
+
+ mceTableDelete : function(grid) {
+ grid.deleteTable();
+ }
+ }, function(func, name) {
+ ed.addCommand(name, function() {
+ var grid = createTableGrid();
+
+ if (grid) {
+ func(grid);
+ ed.execCommand('mceRepaint');
+ cleanup();
+ }
+ });
+ });
+
+ // Register dialog commands
+ each({
+ mceInsertTable : function(val) {
+ winMan.open({
+ url : url + '/table.htm',
+ width : 400 + parseInt(ed.getLang('table.table_delta_width', 0)),
+ height : 320 + parseInt(ed.getLang('table.table_delta_height', 0)),
+ inline : 1
+ }, {
+ plugin_url : url,
+ action : val ? val.action : 0
+ });
+ },
+
+ mceTableRowProps : function() {
+ winMan.open({
+ url : url + '/row.htm',
+ width : 400 + parseInt(ed.getLang('table.rowprops_delta_width', 0)),
+ height : 295 + parseInt(ed.getLang('table.rowprops_delta_height', 0)),
+ inline : 1
+ }, {
+ plugin_url : url
+ });
+ },
+
+ mceTableCellProps : function() {
+ winMan.open({
+ url : url + '/cell.htm',
+ width : 400 + parseInt(ed.getLang('table.cellprops_delta_width', 0)),
+ height : 295 + parseInt(ed.getLang('table.cellprops_delta_height', 0)),
+ inline : 1
+ }, {
+ plugin_url : url
+ });
+ }
+ }, function(func, name) {
+ ed.addCommand(name, function(ui, val) {
+ func(val);
+ });
+ });
+ }
+ });
+
+ // Register plugin
+ tinymce.PluginManager.add('table', tinymce.plugins.TablePlugin);
+})(tinymce);
diff --git a/program/js/tiny_mce/plugins/table/js/table.js b/program/js/tiny_mce/plugins/table/js/table.js
index 50654b24d..1db243b63 100644
--- a/program/js/tiny_mce/plugins/table/js/table.js
+++ b/program/js/tiny_mce/plugins/table/js/table.js
@@ -247,7 +247,10 @@ function insertTable() {
// Fixes a bug in IE where the caret cannot be placed after the table if the table is at the end of the document
if (tinymce.isIE && node.nextSibling == null) {
- dom.insertAfter(dom.create('p'), node);
+ if (inst.settings.forced_root_block)
+ dom.insertAfter(dom.create(inst.settings.forced_root_block), node);
+ else
+ dom.insertAfter(dom.create('br', {'data-mce-bogus': '1'}), node);
}
try {
diff --git a/program/js/tiny_mce/themes/advanced/js/color_picker.js b/program/js/tiny_mce/themes/advanced/js/color_picker.js
index cc891c171..4ae53ab67 100644
--- a/program/js/tiny_mce/themes/advanced/js/color_picker.js
+++ b/program/js/tiny_mce/themes/advanced/js/color_picker.js
@@ -1,345 +1,345 @@
-tinyMCEPopup.requireLangPack();
-
-var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false;
-
-var colors = [
- "#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033",
- "#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099",
- "#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff",
- "#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033",
- "#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399",
- "#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff",
- "#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333",
- "#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399",
- "#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff",
- "#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633",
- "#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699",
- "#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff",
- "#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633",
- "#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999",
- "#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff",
- "#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933",
- "#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999",
- "#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff",
- "#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33",
- "#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99",
- "#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff",
- "#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33",
- "#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99",
- "#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff",
- "#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33",
- "#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99",
- "#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff"
-];
-
-var named = {
- '#F0F8FF':'Alice Blue','#FAEBD7':'Antique White','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige',
- '#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'Blanched Almond','#0000FF':'Blue','#8A2BE2':'Blue Violet','#A52A2A':'Brown',
- '#DEB887':'Burly Wood','#5F9EA0':'Cadet Blue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'Cornflower Blue',
- '#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'Dark Blue','#008B8B':'Dark Cyan','#B8860B':'Dark Golden Rod',
- '#A9A9A9':'Dark Gray','#A9A9A9':'Dark Grey','#006400':'Dark Green','#BDB76B':'Dark Khaki','#8B008B':'Dark Magenta','#556B2F':'Dark Olive Green',
- '#FF8C00':'Darkorange','#9932CC':'Dark Orchid','#8B0000':'Dark Red','#E9967A':'Dark Salmon','#8FBC8F':'Dark Sea Green','#483D8B':'Dark Slate Blue',
- '#2F4F4F':'Dark Slate Gray','#2F4F4F':'Dark Slate Grey','#00CED1':'Dark Turquoise','#9400D3':'Dark Violet','#FF1493':'Deep Pink','#00BFFF':'Deep Sky Blue',
- '#696969':'Dim Gray','#696969':'Dim Grey','#1E90FF':'Dodger Blue','#B22222':'Fire Brick','#FFFAF0':'Floral White','#228B22':'Forest Green',
- '#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'Ghost White','#FFD700':'Gold','#DAA520':'Golden Rod','#808080':'Gray','#808080':'Grey',
- '#008000':'Green','#ADFF2F':'Green Yellow','#F0FFF0':'Honey Dew','#FF69B4':'Hot Pink','#CD5C5C':'Indian Red','#4B0082':'Indigo','#FFFFF0':'Ivory',
- '#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'Lavender Blush','#7CFC00':'Lawn Green','#FFFACD':'Lemon Chiffon','#ADD8E6':'Light Blue',
- '#F08080':'Light Coral','#E0FFFF':'Light Cyan','#FAFAD2':'Light Golden Rod Yellow','#D3D3D3':'Light Gray','#D3D3D3':'Light Grey','#90EE90':'Light Green',
- '#FFB6C1':'Light Pink','#FFA07A':'Light Salmon','#20B2AA':'Light Sea Green','#87CEFA':'Light Sky Blue','#778899':'Light Slate Gray','#778899':'Light Slate Grey',
- '#B0C4DE':'Light Steel Blue','#FFFFE0':'Light Yellow','#00FF00':'Lime','#32CD32':'Lime Green','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon',
- '#66CDAA':'Medium Aqua Marine','#0000CD':'Medium Blue','#BA55D3':'Medium Orchid','#9370D8':'Medium Purple','#3CB371':'Medium Sea Green','#7B68EE':'Medium Slate Blue',
- '#00FA9A':'Medium Spring Green','#48D1CC':'Medium Turquoise','#C71585':'Medium Violet Red','#191970':'Midnight Blue','#F5FFFA':'Mint Cream','#FFE4E1':'Misty Rose','#FFE4B5':'Moccasin',
- '#FFDEAD':'Navajo White','#000080':'Navy','#FDF5E6':'Old Lace','#808000':'Olive','#6B8E23':'Olive Drab','#FFA500':'Orange','#FF4500':'Orange Red','#DA70D6':'Orchid',
- '#EEE8AA':'Pale Golden Rod','#98FB98':'Pale Green','#AFEEEE':'Pale Turquoise','#D87093':'Pale Violet Red','#FFEFD5':'Papaya Whip','#FFDAB9':'Peach Puff',
- '#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'Powder Blue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'Rosy Brown','#4169E1':'Royal Blue',
- '#8B4513':'Saddle Brown','#FA8072':'Salmon','#F4A460':'Sandy Brown','#2E8B57':'Sea Green','#FFF5EE':'Sea Shell','#A0522D':'Sienna','#C0C0C0':'Silver',
- '#87CEEB':'Sky Blue','#6A5ACD':'Slate Blue','#708090':'Slate Gray','#708090':'Slate Grey','#FFFAFA':'Snow','#00FF7F':'Spring Green',
- '#4682B4':'Steel Blue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet',
- '#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'White Smoke','#FFFF00':'Yellow','#9ACD32':'Yellow Green'
-};
-
-var namedLookup = {};
-
-function init() {
- var inputColor = convertRGBToHex(tinyMCEPopup.getWindowArg('input_color')), key, value;
-
- tinyMCEPopup.resizeToInnerSize();
-
- generatePicker();
- generateWebColors();
- generateNamedColors();
-
- if (inputColor) {
- changeFinalColor(inputColor);
-
- col = convertHexToRGB(inputColor);
-
- if (col)
- updateLight(col.r, col.g, col.b);
- }
-
- for (key in named) {
- value = named[key];
- namedLookup[value.replace(/\s+/, '').toLowerCase()] = key.replace(/#/, '').toLowerCase();
- }
-}
-
-function toHexColor(color) {
- var matches, red, green, blue, toInt = parseInt;
-
- function hex(value) {
- value = parseInt(value).toString(16);
-
- return value.length > 1 ? value : '0' + value; // Padd with leading zero
- };
-
- color = tinymce.trim(color);
- color = color.replace(/^[#]/, '').toLowerCase(); // remove leading '#'
- color = namedLookup[color] || color;
-
- matches = /^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/.exec(color);
-
- if (matches) {
- red = toInt(matches[1]);
- green = toInt(matches[2]);
- blue = toInt(matches[3]);
- } else {
- matches = /^([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/.exec(color);
-
- if (matches) {
- red = toInt(matches[1], 16);
- green = toInt(matches[2], 16);
- blue = toInt(matches[3], 16);
- } else {
- matches = /^([0-9a-f])([0-9a-f])([0-9a-f])$/.exec(color);
-
- if (matches) {
- red = toInt(matches[1] + matches[1], 16);
- green = toInt(matches[2] + matches[2], 16);
- blue = toInt(matches[3] + matches[3], 16);
- } else {
- return '';
- }
- }
- }
-
- return '#' + hex(red) + hex(green) + hex(blue);
-}
-
-function insertAction() {
- var color = document.getElementById("color").value, f = tinyMCEPopup.getWindowArg('func');
-
- var hexColor = toHexColor(color);
-
- if (hexColor === '') {
- var text = tinyMCEPopup.editor.getLang('advanced_dlg.invalid_color_value');
- tinyMCEPopup.alert(text + ': ' + color);
- }
- else {
- tinyMCEPopup.restoreSelection();
-
- if (f)
- f(hexColor);
-
- tinyMCEPopup.close();
- }
-}
-
-function showColor(color, name) {
- if (name)
- document.getElementById("colorname").innerHTML = name;
-
- document.getElementById("preview").style.backgroundColor = color;
- document.getElementById("color").value = color.toUpperCase();
-}
-
-function convertRGBToHex(col) {
- var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
-
- if (!col)
- return col;
-
- var rgb = col.replace(re, "$1,$2,$3").split(',');
- if (rgb.length == 3) {
- r = parseInt(rgb[0]).toString(16);
- g = parseInt(rgb[1]).toString(16);
- b = parseInt(rgb[2]).toString(16);
-
- r = r.length == 1 ? '0' + r : r;
- g = g.length == 1 ? '0' + g : g;
- b = b.length == 1 ? '0' + b : b;
-
- return "#" + r + g + b;
- }
-
- return col;
-}
-
-function convertHexToRGB(col) {
- if (col.indexOf('#') != -1) {
- col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');
-
- r = parseInt(col.substring(0, 2), 16);
- g = parseInt(col.substring(2, 4), 16);
- b = parseInt(col.substring(4, 6), 16);
-
- return {r : r, g : g, b : b};
- }
-
- return null;
-}
-
-function generatePicker() {
- var el = document.getElementById('light'), h = '', i;
-
- for (i = 0; i < detail; i++){
- h += '<div id="gs'+i+'" style="background-color:#000000; width:15px; height:3px; border-style:none; border-width:0px;"'
- + ' onclick="changeFinalColor(this.style.backgroundColor)"'
- + ' onmousedown="isMouseDown = true; return false;"'
- + ' onmouseup="isMouseDown = false;"'
- + ' onmousemove="if (isMouseDown && isMouseOver) changeFinalColor(this.style.backgroundColor); return false;"'
- + ' onmouseover="isMouseOver = true;"'
- + ' onmouseout="isMouseOver = false;"'
- + '></div>';
- }
-
- el.innerHTML = h;
-}
-
-function generateWebColors() {
- var el = document.getElementById('webcolors'), h = '', i;
-
- if (el.className == 'generated')
- return;
-
- // TODO: VoiceOver doesn't seem to support legend as a label referenced by labelledby.
- h += '<div role="listbox" aria-labelledby="webcolors_title" tabindex="0"><table role="presentation" border="0" cellspacing="1" cellpadding="0">'
- + '<tr>';
-
- for (i=0; i<colors.length; i++) {
- h += '<td bgcolor="' + colors[i] + '" width="10" height="10">'
- + '<a href="javascript:insertAction();" role="option" tabindex="-1" aria-labelledby="web_colors_' + i + '" onfocus="showColor(\'' + colors[i] + '\');" onmouseover="showColor(\'' + colors[i] + '\');" style="display:block;width:10px;height:10px;overflow:hidden;">';
- if (tinyMCEPopup.editor.forcedHighContrastMode) {
- h += '<canvas class="mceColorSwatch" height="10" width="10" data-color="' + colors[i] + '"></canvas>';
- }
- h += '<span class="mceVoiceLabel" style="display:none;" id="web_colors_' + i + '">' + colors[i].toUpperCase() + '</span>';
- h += '</a></td>';
- if ((i+1) % 18 == 0)
- h += '</tr><tr>';
- }
-
- h += '</table></div>';
-
- el.innerHTML = h;
- el.className = 'generated';
-
- paintCanvas(el);
- enableKeyboardNavigation(el.firstChild);
-}
-
-function paintCanvas(el) {
- tinyMCEPopup.getWin().tinymce.each(tinyMCEPopup.dom.select('canvas.mceColorSwatch', el), function(canvas) {
- var context;
- if (canvas.getContext && (context = canvas.getContext("2d"))) {
- context.fillStyle = canvas.getAttribute('data-color');
- context.fillRect(0, 0, 10, 10);
- }
- });
-}
-function generateNamedColors() {
- var el = document.getElementById('namedcolors'), h = '', n, v, i = 0;
-
- if (el.className == 'generated')
- return;
-
- for (n in named) {
- v = named[n];
- h += '<a href="javascript:insertAction();" role="option" tabindex="-1" aria-labelledby="named_colors_' + i + '" onfocus="showColor(\'' + n + '\',\'' + v + '\');" onmouseover="showColor(\'' + n + '\',\'' + v + '\');" style="background-color: ' + n + '">';
- if (tinyMCEPopup.editor.forcedHighContrastMode) {
- h += '<canvas class="mceColorSwatch" height="10" width="10" data-color="' + colors[i] + '"></canvas>';
- }
- h += '<span class="mceVoiceLabel" style="display:none;" id="named_colors_' + i + '">' + v + '</span>';
- h += '</a>';
- i++;
- }
-
- el.innerHTML = h;
- el.className = 'generated';
-
- paintCanvas(el);
- enableKeyboardNavigation(el);
-}
-
-function enableKeyboardNavigation(el) {
- tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', {
- root: el,
- items: tinyMCEPopup.dom.select('a', el)
- }, tinyMCEPopup.dom);
-}
-
-function dechex(n) {
- return strhex.charAt(Math.floor(n / 16)) + strhex.charAt(n % 16);
-}
-
-function computeColor(e) {
- var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB, pos = tinyMCEPopup.dom.getPos(e.target);
-
- x = e.offsetX ? e.offsetX : (e.target ? e.clientX - pos.x : 0);
- y = e.offsetY ? e.offsetY : (e.target ? e.clientY - pos.y : 0);
-
- partWidth = document.getElementById('colors').width / 6;
- partDetail = detail / 2;
- imHeight = document.getElementById('colors').height;
-
- r = (x >= 0)*(x < partWidth)*255 + (x >= partWidth)*(x < 2*partWidth)*(2*255 - x * 255 / partWidth) + (x >= 4*partWidth)*(x < 5*partWidth)*(-4*255 + x * 255 / partWidth) + (x >= 5*partWidth)*(x < 6*partWidth)*255;
- g = (x >= 0)*(x < partWidth)*(x * 255 / partWidth) + (x >= partWidth)*(x < 3*partWidth)*255 + (x >= 3*partWidth)*(x < 4*partWidth)*(4*255 - x * 255 / partWidth);
- b = (x >= 2*partWidth)*(x < 3*partWidth)*(-2*255 + x * 255 / partWidth) + (x >= 3*partWidth)*(x < 5*partWidth)*255 + (x >= 5*partWidth)*(x < 6*partWidth)*(6*255 - x * 255 / partWidth);
-
- coef = (imHeight - y) / imHeight;
- r = 128 + (r - 128) * coef;
- g = 128 + (g - 128) * coef;
- b = 128 + (b - 128) * coef;
-
- changeFinalColor('#' + dechex(r) + dechex(g) + dechex(b));
- updateLight(r, g, b);
-}
-
-function updateLight(r, g, b) {
- var i, partDetail = detail / 2, finalCoef, finalR, finalG, finalB, color;
-
- for (i=0; i<detail; i++) {
- if ((i>=0) && (i<partDetail)) {
- finalCoef = i / partDetail;
- finalR = dechex(255 - (255 - r) * finalCoef);
- finalG = dechex(255 - (255 - g) * finalCoef);
- finalB = dechex(255 - (255 - b) * finalCoef);
- } else {
- finalCoef = 2 - i / partDetail;
- finalR = dechex(r * finalCoef);
- finalG = dechex(g * finalCoef);
- finalB = dechex(b * finalCoef);
- }
-
- color = finalR + finalG + finalB;
-
- setCol('gs' + i, '#'+color);
- }
-}
-
-function changeFinalColor(color) {
- if (color.indexOf('#') == -1)
- color = convertRGBToHex(color);
-
- setCol('preview', color);
- document.getElementById('color').value = color;
-}
-
-function setCol(e, c) {
- try {
- document.getElementById(e).style.backgroundColor = c;
- } catch (ex) {
- // Ignore IE warning
- }
-}
-
-tinyMCEPopup.onInit.add(init);
+tinyMCEPopup.requireLangPack();
+
+var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false;
+
+var colors = [
+ "#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033",
+ "#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099",
+ "#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff",
+ "#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033",
+ "#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399",
+ "#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff",
+ "#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333",
+ "#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399",
+ "#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff",
+ "#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633",
+ "#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699",
+ "#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff",
+ "#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633",
+ "#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999",
+ "#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff",
+ "#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933",
+ "#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999",
+ "#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff",
+ "#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33",
+ "#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99",
+ "#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff",
+ "#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33",
+ "#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99",
+ "#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff",
+ "#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33",
+ "#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99",
+ "#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff"
+];
+
+var named = {
+ '#F0F8FF':'Alice Blue','#FAEBD7':'Antique White','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige',
+ '#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'Blanched Almond','#0000FF':'Blue','#8A2BE2':'Blue Violet','#A52A2A':'Brown',
+ '#DEB887':'Burly Wood','#5F9EA0':'Cadet Blue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'Cornflower Blue',
+ '#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'Dark Blue','#008B8B':'Dark Cyan','#B8860B':'Dark Golden Rod',
+ '#A9A9A9':'Dark Gray','#A9A9A9':'Dark Grey','#006400':'Dark Green','#BDB76B':'Dark Khaki','#8B008B':'Dark Magenta','#556B2F':'Dark Olive Green',
+ '#FF8C00':'Darkorange','#9932CC':'Dark Orchid','#8B0000':'Dark Red','#E9967A':'Dark Salmon','#8FBC8F':'Dark Sea Green','#483D8B':'Dark Slate Blue',
+ '#2F4F4F':'Dark Slate Gray','#2F4F4F':'Dark Slate Grey','#00CED1':'Dark Turquoise','#9400D3':'Dark Violet','#FF1493':'Deep Pink','#00BFFF':'Deep Sky Blue',
+ '#696969':'Dim Gray','#696969':'Dim Grey','#1E90FF':'Dodger Blue','#B22222':'Fire Brick','#FFFAF0':'Floral White','#228B22':'Forest Green',
+ '#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'Ghost White','#FFD700':'Gold','#DAA520':'Golden Rod','#808080':'Gray','#808080':'Grey',
+ '#008000':'Green','#ADFF2F':'Green Yellow','#F0FFF0':'Honey Dew','#FF69B4':'Hot Pink','#CD5C5C':'Indian Red','#4B0082':'Indigo','#FFFFF0':'Ivory',
+ '#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'Lavender Blush','#7CFC00':'Lawn Green','#FFFACD':'Lemon Chiffon','#ADD8E6':'Light Blue',
+ '#F08080':'Light Coral','#E0FFFF':'Light Cyan','#FAFAD2':'Light Golden Rod Yellow','#D3D3D3':'Light Gray','#D3D3D3':'Light Grey','#90EE90':'Light Green',
+ '#FFB6C1':'Light Pink','#FFA07A':'Light Salmon','#20B2AA':'Light Sea Green','#87CEFA':'Light Sky Blue','#778899':'Light Slate Gray','#778899':'Light Slate Grey',
+ '#B0C4DE':'Light Steel Blue','#FFFFE0':'Light Yellow','#00FF00':'Lime','#32CD32':'Lime Green','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon',
+ '#66CDAA':'Medium Aqua Marine','#0000CD':'Medium Blue','#BA55D3':'Medium Orchid','#9370D8':'Medium Purple','#3CB371':'Medium Sea Green','#7B68EE':'Medium Slate Blue',
+ '#00FA9A':'Medium Spring Green','#48D1CC':'Medium Turquoise','#C71585':'Medium Violet Red','#191970':'Midnight Blue','#F5FFFA':'Mint Cream','#FFE4E1':'Misty Rose','#FFE4B5':'Moccasin',
+ '#FFDEAD':'Navajo White','#000080':'Navy','#FDF5E6':'Old Lace','#808000':'Olive','#6B8E23':'Olive Drab','#FFA500':'Orange','#FF4500':'Orange Red','#DA70D6':'Orchid',
+ '#EEE8AA':'Pale Golden Rod','#98FB98':'Pale Green','#AFEEEE':'Pale Turquoise','#D87093':'Pale Violet Red','#FFEFD5':'Papaya Whip','#FFDAB9':'Peach Puff',
+ '#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'Powder Blue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'Rosy Brown','#4169E1':'Royal Blue',
+ '#8B4513':'Saddle Brown','#FA8072':'Salmon','#F4A460':'Sandy Brown','#2E8B57':'Sea Green','#FFF5EE':'Sea Shell','#A0522D':'Sienna','#C0C0C0':'Silver',
+ '#87CEEB':'Sky Blue','#6A5ACD':'Slate Blue','#708090':'Slate Gray','#708090':'Slate Grey','#FFFAFA':'Snow','#00FF7F':'Spring Green',
+ '#4682B4':'Steel Blue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet',
+ '#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'White Smoke','#FFFF00':'Yellow','#9ACD32':'Yellow Green'
+};
+
+var namedLookup = {};
+
+function init() {
+ var inputColor = convertRGBToHex(tinyMCEPopup.getWindowArg('input_color')), key, value;
+
+ tinyMCEPopup.resizeToInnerSize();
+
+ generatePicker();
+ generateWebColors();
+ generateNamedColors();
+
+ if (inputColor) {
+ changeFinalColor(inputColor);
+
+ col = convertHexToRGB(inputColor);
+
+ if (col)
+ updateLight(col.r, col.g, col.b);
+ }
+
+ for (key in named) {
+ value = named[key];
+ namedLookup[value.replace(/\s+/, '').toLowerCase()] = key.replace(/#/, '').toLowerCase();
+ }
+}
+
+function toHexColor(color) {
+ var matches, red, green, blue, toInt = parseInt;
+
+ function hex(value) {
+ value = parseInt(value).toString(16);
+
+ return value.length > 1 ? value : '0' + value; // Padd with leading zero
+ };
+
+ color = tinymce.trim(color);
+ color = color.replace(/^[#]/, '').toLowerCase(); // remove leading '#'
+ color = namedLookup[color] || color;
+
+ matches = /^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/.exec(color);
+
+ if (matches) {
+ red = toInt(matches[1]);
+ green = toInt(matches[2]);
+ blue = toInt(matches[3]);
+ } else {
+ matches = /^([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/.exec(color);
+
+ if (matches) {
+ red = toInt(matches[1], 16);
+ green = toInt(matches[2], 16);
+ blue = toInt(matches[3], 16);
+ } else {
+ matches = /^([0-9a-f])([0-9a-f])([0-9a-f])$/.exec(color);
+
+ if (matches) {
+ red = toInt(matches[1] + matches[1], 16);
+ green = toInt(matches[2] + matches[2], 16);
+ blue = toInt(matches[3] + matches[3], 16);
+ } else {
+ return '';
+ }
+ }
+ }
+
+ return '#' + hex(red) + hex(green) + hex(blue);
+}
+
+function insertAction() {
+ var color = document.getElementById("color").value, f = tinyMCEPopup.getWindowArg('func');
+
+ var hexColor = toHexColor(color);
+
+ if (hexColor === '') {
+ var text = tinyMCEPopup.editor.getLang('advanced_dlg.invalid_color_value');
+ tinyMCEPopup.alert(text + ': ' + color);
+ }
+ else {
+ tinyMCEPopup.restoreSelection();
+
+ if (f)
+ f(hexColor);
+
+ tinyMCEPopup.close();
+ }
+}
+
+function showColor(color, name) {
+ if (name)
+ document.getElementById("colorname").innerHTML = name;
+
+ document.getElementById("preview").style.backgroundColor = color;
+ document.getElementById("color").value = color.toUpperCase();
+}
+
+function convertRGBToHex(col) {
+ var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
+
+ if (!col)
+ return col;
+
+ var rgb = col.replace(re, "$1,$2,$3").split(',');
+ if (rgb.length == 3) {
+ r = parseInt(rgb[0]).toString(16);
+ g = parseInt(rgb[1]).toString(16);
+ b = parseInt(rgb[2]).toString(16);
+
+ r = r.length == 1 ? '0' + r : r;
+ g = g.length == 1 ? '0' + g : g;
+ b = b.length == 1 ? '0' + b : b;
+
+ return "#" + r + g + b;
+ }
+
+ return col;
+}
+
+function convertHexToRGB(col) {
+ if (col.indexOf('#') != -1) {
+ col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');
+
+ r = parseInt(col.substring(0, 2), 16);
+ g = parseInt(col.substring(2, 4), 16);
+ b = parseInt(col.substring(4, 6), 16);
+
+ return {r : r, g : g, b : b};
+ }
+
+ return null;
+}
+
+function generatePicker() {
+ var el = document.getElementById('light'), h = '', i;
+
+ for (i = 0; i < detail; i++){
+ h += '<div id="gs'+i+'" style="background-color:#000000; width:15px; height:3px; border-style:none; border-width:0px;"'
+ + ' onclick="changeFinalColor(this.style.backgroundColor)"'
+ + ' onmousedown="isMouseDown = true; return false;"'
+ + ' onmouseup="isMouseDown = false;"'
+ + ' onmousemove="if (isMouseDown && isMouseOver) changeFinalColor(this.style.backgroundColor); return false;"'
+ + ' onmouseover="isMouseOver = true;"'
+ + ' onmouseout="isMouseOver = false;"'
+ + '></div>';
+ }
+
+ el.innerHTML = h;
+}
+
+function generateWebColors() {
+ var el = document.getElementById('webcolors'), h = '', i;
+
+ if (el.className == 'generated')
+ return;
+
+ // TODO: VoiceOver doesn't seem to support legend as a label referenced by labelledby.
+ h += '<div role="listbox" aria-labelledby="webcolors_title" tabindex="0"><table role="presentation" border="0" cellspacing="1" cellpadding="0">'
+ + '<tr>';
+
+ for (i=0; i<colors.length; i++) {
+ h += '<td bgcolor="' + colors[i] + '" width="10" height="10">'
+ + '<a href="javascript:insertAction();" role="option" tabindex="-1" aria-labelledby="web_colors_' + i + '" onfocus="showColor(\'' + colors[i] + '\');" onmouseover="showColor(\'' + colors[i] + '\');" style="display:block;width:10px;height:10px;overflow:hidden;">';
+ if (tinyMCEPopup.editor.forcedHighContrastMode) {
+ h += '<canvas class="mceColorSwatch" height="10" width="10" data-color="' + colors[i] + '"></canvas>';
+ }
+ h += '<span class="mceVoiceLabel" style="display:none;" id="web_colors_' + i + '">' + colors[i].toUpperCase() + '</span>';
+ h += '</a></td>';
+ if ((i+1) % 18 == 0)
+ h += '</tr><tr>';
+ }
+
+ h += '</table></div>';
+
+ el.innerHTML = h;
+ el.className = 'generated';
+
+ paintCanvas(el);
+ enableKeyboardNavigation(el.firstChild);
+}
+
+function paintCanvas(el) {
+ tinyMCEPopup.getWin().tinymce.each(tinyMCEPopup.dom.select('canvas.mceColorSwatch', el), function(canvas) {
+ var context;
+ if (canvas.getContext && (context = canvas.getContext("2d"))) {
+ context.fillStyle = canvas.getAttribute('data-color');
+ context.fillRect(0, 0, 10, 10);
+ }
+ });
+}
+function generateNamedColors() {
+ var el = document.getElementById('namedcolors'), h = '', n, v, i = 0;
+
+ if (el.className == 'generated')
+ return;
+
+ for (n in named) {
+ v = named[n];
+ h += '<a href="javascript:insertAction();" role="option" tabindex="-1" aria-labelledby="named_colors_' + i + '" onfocus="showColor(\'' + n + '\',\'' + v + '\');" onmouseover="showColor(\'' + n + '\',\'' + v + '\');" style="background-color: ' + n + '">';
+ if (tinyMCEPopup.editor.forcedHighContrastMode) {
+ h += '<canvas class="mceColorSwatch" height="10" width="10" data-color="' + colors[i] + '"></canvas>';
+ }
+ h += '<span class="mceVoiceLabel" style="display:none;" id="named_colors_' + i + '">' + v + '</span>';
+ h += '</a>';
+ i++;
+ }
+
+ el.innerHTML = h;
+ el.className = 'generated';
+
+ paintCanvas(el);
+ enableKeyboardNavigation(el);
+}
+
+function enableKeyboardNavigation(el) {
+ tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', {
+ root: el,
+ items: tinyMCEPopup.dom.select('a', el)
+ }, tinyMCEPopup.dom);
+}
+
+function dechex(n) {
+ return strhex.charAt(Math.floor(n / 16)) + strhex.charAt(n % 16);
+}
+
+function computeColor(e) {
+ var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB, pos = tinyMCEPopup.dom.getPos(e.target);
+
+ x = e.offsetX ? e.offsetX : (e.target ? e.clientX - pos.x : 0);
+ y = e.offsetY ? e.offsetY : (e.target ? e.clientY - pos.y : 0);
+
+ partWidth = document.getElementById('colors').width / 6;
+ partDetail = detail / 2;
+ imHeight = document.getElementById('colors').height;
+
+ r = (x >= 0)*(x < partWidth)*255 + (x >= partWidth)*(x < 2*partWidth)*(2*255 - x * 255 / partWidth) + (x >= 4*partWidth)*(x < 5*partWidth)*(-4*255 + x * 255 / partWidth) + (x >= 5*partWidth)*(x < 6*partWidth)*255;
+ g = (x >= 0)*(x < partWidth)*(x * 255 / partWidth) + (x >= partWidth)*(x < 3*partWidth)*255 + (x >= 3*partWidth)*(x < 4*partWidth)*(4*255 - x * 255 / partWidth);
+ b = (x >= 2*partWidth)*(x < 3*partWidth)*(-2*255 + x * 255 / partWidth) + (x >= 3*partWidth)*(x < 5*partWidth)*255 + (x >= 5*partWidth)*(x < 6*partWidth)*(6*255 - x * 255 / partWidth);
+
+ coef = (imHeight - y) / imHeight;
+ r = 128 + (r - 128) * coef;
+ g = 128 + (g - 128) * coef;
+ b = 128 + (b - 128) * coef;
+
+ changeFinalColor('#' + dechex(r) + dechex(g) + dechex(b));
+ updateLight(r, g, b);
+}
+
+function updateLight(r, g, b) {
+ var i, partDetail = detail / 2, finalCoef, finalR, finalG, finalB, color;
+
+ for (i=0; i<detail; i++) {
+ if ((i>=0) && (i<partDetail)) {
+ finalCoef = i / partDetail;
+ finalR = dechex(255 - (255 - r) * finalCoef);
+ finalG = dechex(255 - (255 - g) * finalCoef);
+ finalB = dechex(255 - (255 - b) * finalCoef);
+ } else {
+ finalCoef = 2 - i / partDetail;
+ finalR = dechex(r * finalCoef);
+ finalG = dechex(g * finalCoef);
+ finalB = dechex(b * finalCoef);
+ }
+
+ color = finalR + finalG + finalB;
+
+ setCol('gs' + i, '#'+color);
+ }
+}
+
+function changeFinalColor(color) {
+ if (color.indexOf('#') == -1)
+ color = convertRGBToHex(color);
+
+ setCol('preview', color);
+ document.getElementById('color').value = color;
+}
+
+function setCol(e, c) {
+ try {
+ document.getElementById(e).style.backgroundColor = c;
+ } catch (ex) {
+ // Ignore IE warning
+ }
+}
+
+tinyMCEPopup.onInit.add(init);
diff --git a/program/js/tiny_mce/themes/advanced/langs/uk.js b/program/js/tiny_mce/themes/advanced/langs/uk.js
index 5998e2859..9988c60fa 100644
--- a/program/js/tiny_mce/themes/advanced/langs/uk.js
+++ b/program/js/tiny_mce/themes/advanced/langs/uk.js
@@ -1 +1 @@
-tinyMCE.addI18n('uk.advanced',{"underline_desc":"\u041f\u0456\u0434\u043a\u0440\u0435\u0441\u043b\u0435\u043d\u0438\u0439 (Ctrl+U)","italic_desc":"\u041a\u0443\u0440\u0441\u0438\u0432 (Ctrl+I)","bold_desc":"\u0416\u0438\u0440\u043d\u0438\u0439 (Ctrl+B)",dd:"\u0414\u043e\u0432\u0456\u0434\u043d\u0438\u043a, \u043e\u043f\u0438\u0441 ",dt:"\u0414\u043e\u0432\u0456\u0434\u043d\u0438\u043a, \u0442\u0435\u0440\u043c\u0456\u043d ",samp:"\u041f\u0440\u0438\u043a\u043b\u0430\u0434 \u043a\u043e\u0434\u0443",code:"\u041a\u043e\u0434",blockquote:"\u0426\u0438\u0442\u0430\u0442\u0430",h6:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 6",h5:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 5",h4:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 4",h3:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 3",h2:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 2",h1:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 1",pre:"\u041f\u043e\u043f\u0435\u0440\u0435\u0434\u043d\u044c\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432\u0430\u043d\u0438\u0439",address:"\u0421\u0442\u0438\u043b\u044c \u0430\u0434\u0440\u0435\u0441\u0438",div:"Div",paragraph:"\u0410\u0431\u0437\u0430\u0446",block:"\u0424\u043e\u0440\u043c\u0430\u0442",fontdefault:"\u0428\u0440\u0438\u0444\u0442","font_size":"\u0420\u043e\u0437\u043c\u0456\u0440 \u0448\u0440\u0438\u0444\u0442\u0443","style_select":"\u0421\u0442\u0438\u043b\u0456","more_colors":"\u0411\u0456\u043b\u044c\u0448\u0435 \u043a\u043e\u043b\u044c\u043e\u0440\u0456\u0432","toolbar_focus":"\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u044c \u043a\u043d\u043e\u043f\u043e\u043a - Alt+Q, \u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u0434\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0443 - Alt-Z, \u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u0434\u043e \u0448\u043b\u044f\u0445\u0443 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0443 - Alt-X",newdocument:"\u0412\u0438 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u0456, \u0449\u043e \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0432\u0441\u0435 \u0432\u0438\u0434\u0430\u043b\u0438\u0442\u0438?",path:"\u0428\u043b\u044f\u0445","clipboard_msg":"\u041a\u043e\u043f\u0456\u044e\u0432\u0430\u0442\u0438/\u0412\u0438\u0440\u0456\u0437\u0430\u0442\u0438/\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0456 \u0432 Mozilla \u0438 Firefox.\n\u0412\u0430\u043c \u0446\u0456\u043a\u0430\u0432\u0430 \u0456\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0456\u044f \u043f\u0440\u043e \u0446\u0435?","blockquote_desc":"\u0426\u0438\u0442\u0430\u0442\u0430","help_desc":"\u0414\u043e\u043f\u043e\u043c\u043e\u0433\u0430","newdocument_desc":"\u041d\u043e\u0432\u0438\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442","image_props_desc":"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","paste_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438","copy_desc":"\u041a\u043e\u043f\u0456\u044e\u0432\u0430\u0442\u0438","cut_desc":"\u0412\u0438\u0440\u0456\u0437\u0430\u0442\u0438","anchor_desc":"\u0414\u043e\u0434\u0430\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u044f\u043a\u0456\u0440","visualaid_desc":"\u041f\u0435\u0440\u0435\u043c\u043a\u043d\u0443\u0442\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u0456/\u043f\u0440\u0438\u0445\u043e\u0432\u0430\u043d\u0456 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0438","charmap_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0441\u0438\u043c\u0432\u043e\u043b","backcolor_desc":"\u0412\u0438\u0431\u0440\u0430\u0442\u0438 \u043a\u043e\u043b\u0456\u0440 \u0444\u043e\u043d\u0443","forecolor_desc":"\u0412\u0438\u0431\u0440\u0430\u0442\u0438 \u043a\u043e\u043b\u0456\u0440 \u0442\u0435\u043a\u0441\u0442\u0443","custom1_desc":"\u0412\u0430\u0448 \u0434\u043e\u0432\u0456\u043b\u044c\u043d\u0438\u0439 \u043e\u043f\u0438\u0441 \u0442\u0443\u0442","removeformat_desc":"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0443\u0432\u0430\u043d\u043d\u044f","hr_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0438\u0439 \u0440\u043e\u0437\u0434\u0456\u043b\u044c\u043d\u0438\u043a","sup_desc":"\u0412\u0435\u0440\u0445\u043d\u0456\u0439 \u0456\u043d\u0434\u0435\u043a\u0441","sub_desc":"\u041d\u0438\u0436\u043d\u0456\u0439 \u0456\u043d\u0434\u0435\u043a\u0441","code_desc":"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 HTML \u043a\u043e\u0434","cleanup_desc":"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u0438 \u0437\u0430\u0439\u0432\u0438\u0439 \u043a\u043e\u0434","image_desc":"\u0414\u043e\u0434\u0430\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","unlink_desc":"\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f","link_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f","redo_desc":"\u041f\u043e\u0432\u0435\u0440\u043d\u0443\u0442\u0438 (Ctrl+Y)","undo_desc":"\u0412\u0456\u0434\u043c\u0456\u043d\u0438\u0442\u0438 (Ctrl+Z)","indent_desc":"\u0417\u0431\u0456\u043b\u044c\u0448\u0438\u0442\u0438 \u0432\u0456\u0434\u0441\u0442\u0443\u043f","outdent_desc":"\u0417\u043c\u0435\u043d\u0448\u0442\u0438\u0442\u0438 \u0432\u0456\u0434\u0441\u0442\u0443\u043f","numlist_desc":"\u041d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u043d\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a","bullist_desc":"\u041d\u0435\u043d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u043d\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a","justifyfull_desc":"\u041f\u043e \u0448\u0438\u0440\u0438\u043d\u0456","justifyright_desc":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","justifycenter_desc":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","justifyleft_desc":"\u041f\u043e \u043b\u0456\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","striketrough_desc":"\u0417\u0430\u043a\u0440\u0435\u0441\u043b\u0435\u043d\u0438\u0439","help_shortcut":"\u041d\u0430\u0442\u0438\u0441\u043d\u0456\u0442\u044c ALT F10 \u0434\u043b\u044f \u0442\u0443\u043b\u0431\u0430\u0440\u0443. \u041d\u0430\u0442\u0438\u0441\u043d\u0456\u0442\u044c ALT 0 \u0434\u043b\u044f \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u0438",toolbar:"\u0422\u0443\u043b\u0431\u0430\u0440","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":"","rich_text_area":"Rich Text Area","shortcuts_desc":"Accessability Help"}); \ No newline at end of file
+tinyMCE.addI18n('uk.advanced',{"underline_desc":"\u041f\u0456\u0434\u043a\u0440\u0435\u0441\u043b\u0435\u043d\u0438\u0439 (Ctrl+U)","italic_desc":"\u041a\u0443\u0440\u0441\u0438\u0432 (Ctrl+I)","bold_desc":"\u0416\u0438\u0440\u043d\u0438\u0439 (Ctrl+B)",dd:"\u0414\u043e\u0432\u0456\u0434\u043d\u0438\u043a, \u043e\u043f\u0438\u0441 ",dt:"\u0414\u043e\u0432\u0456\u0434\u043d\u0438\u043a, \u0442\u0435\u0440\u043c\u0456\u043d ",samp:"\u041f\u0440\u0438\u043a\u043b\u0430\u0434 \u043a\u043e\u0434\u0443",code:"\u041a\u043e\u0434",blockquote:"\u0426\u0438\u0442\u0430\u0442\u0430",h6:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 6",h5:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 5",h4:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 4",h3:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 3",h2:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 2",h1:"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a 1",pre:"\u041f\u043e\u043f\u0435\u0440\u0435\u0434\u043d\u044c\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432\u0430\u043d\u0438\u0439",address:"\u0421\u0442\u0438\u043b\u044c \u0430\u0434\u0440\u0435\u0441\u0438",div:"Div",paragraph:"\u0410\u0431\u0437\u0430\u0446",block:"\u0424\u043e\u0440\u043c\u0430\u0442",fontdefault:"\u0428\u0440\u0438\u0444\u0442","font_size":"\u0420\u043e\u0437\u043c\u0456\u0440 \u0448\u0440\u0438\u0444\u0442\u0443","style_select":"\u0421\u0442\u0438\u043b\u0456","more_colors":"\u0411\u0456\u043b\u044c\u0448\u0435 \u043a\u043e\u043b\u044c\u043e\u0440\u0456\u0432","toolbar_focus":"\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u044c \u043a\u043d\u043e\u043f\u043e\u043a - Alt+Q, \u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u0434\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0443 - Alt-Z, \u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u0434\u043e \u0448\u043b\u044f\u0445\u0443 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0443 - Alt-X",newdocument:"\u0412\u0438 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u0456, \u0449\u043e \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0432\u0441\u0435 \u0432\u0438\u0434\u0430\u043b\u0438\u0442\u0438?",path:"\u0428\u043b\u044f\u0445","clipboard_msg":"\u041a\u043e\u043f\u0456\u044e\u0432\u0430\u0442\u0438/\u0412\u0438\u0440\u0456\u0437\u0430\u0442\u0438/\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0456 \u0432 Mozilla \u0438 Firefox.\n\u0412\u0430\u043c \u0446\u0456\u043a\u0430\u0432\u0430 \u0456\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0456\u044f \u043f\u0440\u043e \u0446\u0435?","blockquote_desc":"\u0426\u0438\u0442\u0430\u0442\u0430","help_desc":"\u0414\u043e\u043f\u043e\u043c\u043e\u0433\u0430","newdocument_desc":"\u041d\u043e\u0432\u0438\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442","image_props_desc":"\u0412\u043b\u0430\u0441\u0442\u0438\u0432\u043e\u0441\u0442\u0456 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","paste_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438","copy_desc":"\u041a\u043e\u043f\u0456\u044e\u0432\u0430\u0442\u0438","cut_desc":"\u0412\u0438\u0440\u0456\u0437\u0430\u0442\u0438","anchor_desc":"\u0414\u043e\u0434\u0430\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u044f\u043a\u0456\u0440","visualaid_desc":"\u041f\u0435\u0440\u0435\u043c\u043a\u043d\u0443\u0442\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u0456/\u043f\u0440\u0438\u0445\u043e\u0432\u0430\u043d\u0456 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0438","charmap_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0441\u0438\u043c\u0432\u043e\u043b","backcolor_desc":"\u0412\u0438\u0431\u0440\u0430\u0442\u0438 \u043a\u043e\u043b\u0456\u0440 \u0444\u043e\u043d\u0443","forecolor_desc":"\u0412\u0438\u0431\u0440\u0430\u0442\u0438 \u043a\u043e\u043b\u0456\u0440 \u0442\u0435\u043a\u0441\u0442\u0443","custom1_desc":"\u0412\u0430\u0448 \u0434\u043e\u0432\u0456\u043b\u044c\u043d\u0438\u0439 \u043e\u043f\u0438\u0441 \u0442\u0443\u0442","removeformat_desc":"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0443\u0432\u0430\u043d\u043d\u044f","hr_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0438\u0439 \u0440\u043e\u0437\u0434\u0456\u043b\u044c\u043d\u0438\u043a","sup_desc":"\u0412\u0435\u0440\u0445\u043d\u0456\u0439 \u0456\u043d\u0434\u0435\u043a\u0441","sub_desc":"\u041d\u0438\u0436\u043d\u0456\u0439 \u0456\u043d\u0434\u0435\u043a\u0441","code_desc":"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 HTML \u043a\u043e\u0434","cleanup_desc":"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u0438 \u0437\u0430\u0439\u0432\u0438\u0439 \u043a\u043e\u0434","image_desc":"\u0414\u043e\u0434\u0430\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","unlink_desc":"\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f","link_desc":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f","redo_desc":"\u041f\u043e\u0432\u0435\u0440\u043d\u0443\u0442\u0438 (Ctrl+Y)","undo_desc":"\u0412\u0456\u0434\u043c\u0456\u043d\u0438\u0442\u0438 (Ctrl+Z)","indent_desc":"\u0417\u0431\u0456\u043b\u044c\u0448\u0438\u0442\u0438 \u0432\u0456\u0434\u0441\u0442\u0443\u043f","outdent_desc":"\u0417\u043c\u0435\u043d\u0448\u0442\u0438\u0442\u0438 \u0432\u0456\u0434\u0441\u0442\u0443\u043f","numlist_desc":"\u041d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u043d\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a","bullist_desc":"\u041d\u0435\u043d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u043d\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a","justifyfull_desc":"\u041f\u043e \u0448\u0438\u0440\u0438\u043d\u0456","justifyright_desc":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","justifycenter_desc":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","justifyleft_desc":"\u041f\u043e \u043b\u0456\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","striketrough_desc":"\u0417\u0430\u043a\u0440\u0435\u0441\u043b\u0435\u043d\u0438\u0439","help_shortcut":"\u041d\u0430\u0442\u0438\u0441\u043d\u0456\u0442\u044c ALT F10 \u0434\u043b\u044f \u0442\u0443\u043b\u0431\u0430\u0440\u0443. \u041d\u0430\u0442\u0438\u0441\u043d\u0456\u0442\u044c ALT 0 \u0434\u043b\u044f \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u043d\u044f \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u0438","rich_text_area":"\u0412\u0456\u0437\u0443\u0430\u043b\u044c\u043d\u0438\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440","shortcuts_desc":"\u0414\u043e\u043f\u043e\u043c\u043e\u0433\u0430 \u043f\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0456",toolbar:"\u0422\u0443\u043b\u0431\u0430\u0440","anchor_delta_height":"","anchor_delta_width":"","charmap_delta_height":"","charmap_delta_width":"","colorpicker_delta_height":"","colorpicker_delta_width":"","link_delta_height":"","link_delta_width":"","image_delta_height":"","image_delta_width":""}); \ No newline at end of file
diff --git a/program/js/tiny_mce/themes/advanced/langs/uk_dlg.js b/program/js/tiny_mce/themes/advanced/langs/uk_dlg.js
index cfb143b8c..89e003142 100644
--- a/program/js/tiny_mce/themes/advanced/langs/uk_dlg.js
+++ b/program/js/tiny_mce/themes/advanced/langs/uk_dlg.js
@@ -1 +1 @@
-tinyMCE.addI18n('uk.advanced_dlg',{"link_list":"\u0421\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u044c","link_is_external":"\u0412\u0432\u0435\u0434\u0435\u043d\u0435 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u0441\u0445\u043e\u0436\u0435 \u043d\u0430 \u0437\u043e\u0432\u043d\u0456\u0448\u043d\u0454 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f, \u0432\u0438 \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0434\u043e\u0434\u0430\u0442\u0438 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u0438\u0439 \u043f\u0440\u0435\u0444\u0456\u043a\u0441 http://?","link_is_email":"\u0412\u0432\u0435\u0434\u0435\u043d\u0435 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u0441\u0445\u043e\u0436\u0435 \u043d\u0430 \u0430\u0434\u0440\u0435\u0441\u0443 \u0435\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0457 \u043f\u043e\u0448\u0442\u0438, \u0432\u0438 \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0434\u043e\u0434\u0430\u0442\u0438 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u0438\u0439 \u043f\u0440\u0435\u0444\u0456\u043a\u0441 mailto:?","link_titlefield":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a","link_target_blank":"\u043d\u043e\u0432\u043e\u043c\u0443 \u0432\u0456\u043a\u043d\u0456","link_target_same":"\u0446\u044c\u043e\u043c\u0443 \u0436 \u0432\u0456\u043a\u043d\u0456","link_target":"\u0412\u0456\u0434\u043a\u0440\u0438\u0442\u0438 \u0432","link_url":"\u0410\u0434\u0440\u0435\u0441\u0430 ","link_title":"\u0414\u043e\u0434\u0430\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f","image_align_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","image_align_left":"\u041f\u043e \u043b\u0456\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","image_align_textbottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0443","image_align_texttop":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0443","image_align_bottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","image_align_middle":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","image_align_top":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","image_align_baseline":"\u041f\u043e \u0431\u0430\u0437\u043e\u0432\u0456\u0439 \u043b\u0456\u043d\u0456\u0457","image_align":"\u0412\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f","image_hspace":"\u0413\u043e\u0440\u0438\u0437. \u0432\u0456\u0434\u0441\u0442\u0443\u043f","image_vspace":"\u0412\u0435\u0440\u0442. \u0432\u0456\u0434\u0441\u0442\u0443\u043f","image_dimensions":"\u0420\u043e\u0437\u043c\u0456\u0440\u0438","image_alt":"\u041e\u043f\u0438\u0441","image_list":"\u0421\u043f\u0438\u0441\u043e\u043a \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u044c","image_border":"\u0420\u0430\u043c\u043a\u0430","image_src":"\u0410\u0434\u0440\u0435\u0441\u0430","image_title":"\u0414\u043e\u0434\u0430\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","charmap_title":"\u0412\u0438\u0431\u0440\u0430\u0442\u0438 \u0434\u043e\u0432\u0456\u043b\u044c\u043d\u0438\u0439 \u0441\u0438\u043c\u0432\u043e\u043b","colorpicker_name":"\u041d\u0430\u0437\u0432\u0430:","colorpicker_color":"\u041a\u043e\u043b\u0456\u0440:","colorpicker_named_title":"\u0417\u0430 \u043d\u0430\u0437\u0432\u043e\u044e","colorpicker_named_tab":"\u0417\u0430 \u043d\u0430\u0437\u0432\u043e\u044e","colorpicker_palette_title":"\u041f\u0430\u043b\u0456\u0442\u0440\u0430 \u043a\u043e\u043b\u044c\u043e\u0440\u0456\u0432","colorpicker_palette_tab":"\u041f\u0430\u043b\u0456\u0442\u0440\u0430","colorpicker_picker_title":"\u041f\u0456\u043f\u0435\u0442\u043a\u0430 \u043a\u043e\u043b\u044c\u043e\u0440\u0443","colorpicker_picker_tab":"\u041f\u0456\u043f\u0435\u0442\u043a\u0430","colorpicker_title":"\u0412\u0438\u0431\u0440\u0430\u0442\u0438 \u043a\u043e\u043b\u0456\u0440","code_wordwrap":"\u041f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u0438 \u0441\u043b\u043e\u0432\u0430","code_title":"\u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440 HTML \u043a\u043e\u0434\u0443","anchor_name":"\u041d\u0430\u0437\u0432\u0430 \u044f\u043a\u043e\u0440\u044f","anchor_title":"\u0414\u043e\u0434\u0430\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u044f\u043a\u0456\u0440","about_loaded":"\u0417\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u0456 \u0434\u043e\u0434\u0430\u0442\u043a\u0438","about_version":"\u0412\u0435\u0440\u0441\u0456\u044f","about_author":"\u0410\u0432\u0442\u043e\u0440","about_plugin":"\u0414\u043e\u0434\u0430\u0442\u043e\u043a","about_plugins":"\u0414\u043e\u0434\u0430\u0442\u043a\u0438","about_license":"\u041b\u0456\u0446\u0435\u043d\u0437\u0456\u044f","about_help":"\u0414\u043e\u043f\u043e\u043c\u043e\u0433\u0430","about_general":"\u041f\u0440\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442...","about_title":"\u041f\u0440\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442 TinyMCE","anchor_invalid":"\u0412\u0432\u0435\u0434\u0456\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0435 \u0456\u043c\'\u044f \u0434\u043b\u044f \u044f\u043a\u0456\u0440\u0430.","accessibility_usage_title":"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f","charmap_usage":"Use left and right arrows to navigate.","accessibility_help":"Accessibility Help"}); \ No newline at end of file
+tinyMCE.addI18n('uk.advanced_dlg',{"link_list":"\u0421\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u044c","link_is_external":"\u0412\u0432\u0435\u0434\u0435\u043d\u0435 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u0441\u0445\u043e\u0436\u0435 \u043d\u0430 \u0437\u043e\u0432\u043d\u0456\u0448\u043d\u0454 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f, \u0432\u0438 \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0434\u043e\u0434\u0430\u0442\u0438 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u0438\u0439 \u043f\u0440\u0435\u0444\u0456\u043a\u0441 http://?","link_is_email":"\u0412\u0432\u0435\u0434\u0435\u043d\u0435 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u0441\u0445\u043e\u0436\u0435 \u043d\u0430 \u0430\u0434\u0440\u0435\u0441\u0443 \u0435\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0457 \u043f\u043e\u0448\u0442\u0438, \u0432\u0438 \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0434\u043e\u0434\u0430\u0442\u0438 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u0438\u0439 \u043f\u0440\u0435\u0444\u0456\u043a\u0441 mailto:?","link_titlefield":"\u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a","link_target_blank":"\u043d\u043e\u0432\u043e\u043c\u0443 \u0432\u0456\u043a\u043d\u0456","link_target_same":"\u0446\u044c\u043e\u043c\u0443 \u0436 \u0432\u0456\u043a\u043d\u0456","link_target":"\u0412\u0456\u0434\u043a\u0440\u0438\u0442\u0438 \u0432","link_url":"\u0410\u0434\u0440\u0435\u0441\u0430 ","link_title":"\u0414\u043e\u0434\u0430\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f","image_align_right":"\u041f\u043e \u043f\u0440\u0430\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","image_align_left":"\u041f\u043e \u043b\u0456\u0432\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","image_align_textbottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0443","image_align_texttop":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e \u0442\u0435\u043a\u0441\u0442\u0443","image_align_bottom":"\u041f\u043e \u043d\u0438\u0436\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","image_align_middle":"\u041f\u043e \u0446\u0435\u043d\u0442\u0440\u0443","image_align_top":"\u041f\u043e \u0432\u0435\u0440\u0445\u043d\u044c\u043e\u043c\u0443 \u043a\u0440\u0430\u044e","image_align_baseline":"\u041f\u043e \u0431\u0430\u0437\u043e\u0432\u0456\u0439 \u043b\u0456\u043d\u0456\u0457","image_align":"\u0412\u0438\u0440\u0456\u0432\u043d\u044e\u0432\u0430\u043d\u043d\u044f","image_hspace":"\u0413\u043e\u0440\u0438\u0437. \u0432\u0456\u0434\u0441\u0442\u0443\u043f","image_vspace":"\u0412\u0435\u0440\u0442. \u0432\u0456\u0434\u0441\u0442\u0443\u043f","image_dimensions":"\u0420\u043e\u0437\u043c\u0456\u0440\u0438","image_alt":"\u041e\u043f\u0438\u0441","image_list":"\u0421\u043f\u0438\u0441\u043e\u043a \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u044c","image_border":"\u0420\u0430\u043c\u043a\u0430","image_src":"\u0410\u0434\u0440\u0435\u0441\u0430","image_title":"\u0414\u043e\u0434\u0430\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","charmap_title":"\u0412\u0438\u0431\u0440\u0430\u0442\u0438 \u0434\u043e\u0432\u0456\u043b\u044c\u043d\u0438\u0439 \u0441\u0438\u043c\u0432\u043e\u043b","colorpicker_name":"\u041d\u0430\u0437\u0432\u0430:","colorpicker_color":"\u041a\u043e\u043b\u0456\u0440:","colorpicker_named_title":"\u0417\u0430 \u043d\u0430\u0437\u0432\u043e\u044e","colorpicker_named_tab":"\u0417\u0430 \u043d\u0430\u0437\u0432\u043e\u044e","colorpicker_palette_title":"\u041f\u0430\u043b\u0456\u0442\u0440\u0430 \u043a\u043e\u043b\u044c\u043e\u0440\u0456\u0432","colorpicker_palette_tab":"\u041f\u0430\u043b\u0456\u0442\u0440\u0430","colorpicker_picker_title":"\u041f\u0456\u043f\u0435\u0442\u043a\u0430 \u043a\u043e\u043b\u044c\u043e\u0440\u0443","colorpicker_picker_tab":"\u041f\u0456\u043f\u0435\u0442\u043a\u0430","colorpicker_title":"\u0412\u0438\u0431\u0440\u0430\u0442\u0438 \u043a\u043e\u043b\u0456\u0440","code_wordwrap":"\u041f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u0438 \u0441\u043b\u043e\u0432\u0430","code_title":"\u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440 HTML \u043a\u043e\u0434\u0443","anchor_name":"\u041d\u0430\u0437\u0432\u0430 \u044f\u043a\u043e\u0440\u044f","anchor_title":"\u0414\u043e\u0434\u0430\u0442\u0438/\u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u044f\u043a\u0456\u0440","about_loaded":"\u0417\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u0456 \u0434\u043e\u0434\u0430\u0442\u043a\u0438","about_version":"\u0412\u0435\u0440\u0441\u0456\u044f","about_author":"\u0410\u0432\u0442\u043e\u0440","about_plugin":"\u0414\u043e\u0434\u0430\u0442\u043e\u043a","about_plugins":"\u0414\u043e\u0434\u0430\u0442\u043a\u0438","about_license":"\u041b\u0456\u0446\u0435\u043d\u0437\u0456\u044f","about_help":"\u0414\u043e\u043f\u043e\u043c\u043e\u0433\u0430","about_general":"\u041f\u0440\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442...","about_title":"\u041f\u0440\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442 TinyMCE","charmap_usage":"\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0439\u0442\u0435 \u0441\u0442\u0440\u0456\u043b\u043a\u0438 \u0432\u043b\u0456\u0432\u043e \u0442\u0430 \u0432\u043f\u0440\u0430\u0432\u043e \u0434\u043b\u044f \u043d\u0430\u0432\u0456\u0433\u0430\u0446\u0456\u0457","anchor_invalid":"\u0412\u0432\u0435\u0434\u0456\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0435 \u0456\u043c\'\u044f \u0434\u043b\u044f \u044f\u043a\u0456\u0440\u0430.","accessibility_help":"\u0414\u043e\u043f\u043e\u043c\u043e\u0433\u0430 \u043f\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0456","accessibility_usage_title":"\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f","invalid_color_value":"\u041d\u0435\u043a\u043e\u0440\u0435\u043a\u0442\u043d\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f \u043a\u043e\u043b\u044c\u043e\u0440\u0443"}); \ No newline at end of file
diff --git a/program/js/tiny_mce/themes/advanced/skins/default/content.css b/program/js/tiny_mce/themes/advanced/skins/default/content.css
index 52a1d67e2..2fd94a1f9 100644
--- a/program/js/tiny_mce/themes/advanced/skins/default/content.css
+++ b/program/js/tiny_mce/themes/advanced/skins/default/content.css
@@ -48,4 +48,3 @@ font[face=mceinline] {font-family:inherit !important}
.mceItemEmbeddedAudio {background-image:url(../../img/video.gif)}
.mceItemIframe {background-image:url(../../img/iframe.gif)}
.mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;}
-.mceHideBrInPre pre br {display: none}
diff --git a/program/js/tiny_mce/themes/advanced/skins/highcontrast/content.css b/program/js/tiny_mce/themes/advanced/skins/highcontrast/content.css
index fe09e2141..cbce6c6a2 100644
--- a/program/js/tiny_mce/themes/advanced/skins/highcontrast/content.css
+++ b/program/js/tiny_mce/themes/advanced/skins/highcontrast/content.css
@@ -22,4 +22,3 @@ abbr {border-bottom:1px dashed #CCC; cursor:help}
img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px}
font[face=mceinline] {font-family:inherit !important}
*[contentEditable]:focus {outline:0}
-.mceHideBrInPre pre br {display: none}
diff --git a/program/js/tiny_mce/themes/advanced/skins/o2k7/content.css b/program/js/tiny_mce/themes/advanced/skins/o2k7/content.css
index 3537c8bc0..a1a8f9bd3 100644
--- a/program/js/tiny_mce/themes/advanced/skins/o2k7/content.css
+++ b/program/js/tiny_mce/themes/advanced/skins/o2k7/content.css
@@ -46,4 +46,3 @@ font[face=mceinline] {font-family:inherit !important}
.mceItemAudio {background-image:url(../../img/video.gif)}
.mceItemIframe {background-image:url(../../img/iframe.gif)}
.mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;}
-.mceHideBrInPre pre br {display: none}
diff --git a/program/js/tiny_mce/themes/advanced/source_editor.htm b/program/js/tiny_mce/themes/advanced/source_editor.htm
index 3c6d65808..dd973fcc0 100644
--- a/program/js/tiny_mce/themes/advanced/source_editor.htm
+++ b/program/js/tiny_mce/themes/advanced/source_editor.htm
@@ -4,7 +4,7 @@
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
<script type="text/javascript" src="js/source_editor.js"></script>
</head>
-<body onresize="resizeInputs();" style="display:none; overflow:hidden;">
+<body onresize="resizeInputs();" style="display:none; overflow:hidden;" spellcheck="false">
<form name="source" onsubmit="saveContent();return false;" action="#">
<div style="float: left" class="title"><label for="htmlSource">{#advanced_dlg.code_title}</label></div>
diff --git a/program/js/tiny_mce/tiny_mce.js b/program/js/tiny_mce/tiny_mce.js
index ddf9c9476..eb1246619 100644
--- a/program/js/tiny_mce/tiny_mce.js
+++ b/program/js/tiny_mce/tiny_mce.js
@@ -1 +1 @@
-(function(e){var a=/^\s*|\s*$/g,b,d="B".replace(/A(.)|B/,"$1")==="$1";var c={majorVersion:"3",minorVersion:"5.2",releaseDate:"2012-05-31",_init:function(){var s=this,q=document,o=navigator,g=o.userAgent,m,f,l,k,j,r;s.isOpera=e.opera&&opera.buildNumber;s.isWebKit=/WebKit/.test(g);s.isIE=!s.isWebKit&&!s.isOpera&&(/MSIE/gi).test(g)&&(/Explorer/gi).test(o.appName);s.isIE6=s.isIE&&/MSIE [56]/.test(g);s.isIE7=s.isIE&&/MSIE [7]/.test(g);s.isIE8=s.isIE&&/MSIE [8]/.test(g);s.isIE9=s.isIE&&/MSIE [9]/.test(g);s.isGecko=!s.isWebKit&&/Gecko/.test(g);s.isMac=g.indexOf("Mac")!=-1;s.isAir=/adobeair/i.test(g);s.isIDevice=/(iPad|iPhone)/.test(g);s.isIOS5=s.isIDevice&&g.match(/AppleWebKit\/(\d*)/)[1]>=534;if(e.tinyMCEPreInit){s.suffix=tinyMCEPreInit.suffix;s.baseURL=tinyMCEPreInit.base;s.query=tinyMCEPreInit.query;return}s.suffix="";f=q.getElementsByTagName("base");for(m=0;m<f.length;m++){r=f[m].href;if(r){if(/^https?:\/\/[^\/]+$/.test(r)){r+="/"}k=r?r.match(/.*\//)[0]:""}}function h(i){if(i.src&&/tiny_mce(|_gzip|_jquery|_prototype|_full)(_dev|_src)?.js/.test(i.src)){if(/_(src|dev)\.js/g.test(i.src)){s.suffix="_src"}if((j=i.src.indexOf("?"))!=-1){s.query=i.src.substring(j+1)}s.baseURL=i.src.substring(0,i.src.lastIndexOf("/"));if(k&&s.baseURL.indexOf("://")==-1&&s.baseURL.indexOf("/")!==0){s.baseURL=k+s.baseURL}return s.baseURL}return null}f=q.getElementsByTagName("script");for(m=0;m<f.length;m++){if(h(f[m])){return}}l=q.getElementsByTagName("head")[0];if(l){f=l.getElementsByTagName("script");for(m=0;m<f.length;m++){if(h(f[m])){return}}}return},is:function(g,f){if(!f){return g!==b}if(f=="array"&&(g.hasOwnProperty&&g instanceof Array)){return true}return typeof(g)==f},makeMap:function(f,j,h){var g;f=f||[];j=j||",";if(typeof(f)=="string"){f=f.split(j)}h=h||{};g=f.length;while(g--){h[f[g]]={}}return h},each:function(i,f,h){var j,g;if(!i){return 0}h=h||i;if(i.length!==b){for(j=0,g=i.length;j<g;j++){if(f.call(h,i[j],j,i)===false){return 0}}}else{for(j in i){if(i.hasOwnProperty(j)){if(f.call(h,i[j],j,i)===false){return 0}}}}return 1},map:function(g,h){var i=[];c.each(g,function(f){i.push(h(f))});return i},grep:function(g,h){var i=[];c.each(g,function(f){if(!h||h(f)){i.push(f)}});return i},inArray:function(g,h){var j,f;if(g){for(j=0,f=g.length;j<f;j++){if(g[j]===h){return j}}}return -1},extend:function(n,k){var j,f,h,g=arguments,m;for(j=1,f=g.length;j<f;j++){k=g[j];for(h in k){if(k.hasOwnProperty(h)){m=k[h];if(m!==b){n[h]=m}}}}return n},trim:function(f){return(f?""+f:"").replace(a,"")},create:function(o,f,j){var n=this,g,i,k,l,h,m=0;o=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(o);k=o[3].match(/(^|\.)(\w+)$/i)[2];i=n.createNS(o[3].replace(/\.\w+$/,""),j);if(i[k]){return}if(o[2]=="static"){i[k]=f;if(this.onCreate){this.onCreate(o[2],o[3],i[k])}return}if(!f[k]){f[k]=function(){};m=1}i[k]=f[k];n.extend(i[k].prototype,f);if(o[5]){g=n.resolve(o[5]).prototype;l=o[5].match(/\.(\w+)$/i)[1];h=i[k];if(m){i[k]=function(){return g[l].apply(this,arguments)}}else{i[k]=function(){this.parent=g[l];return h.apply(this,arguments)}}i[k].prototype[k]=i[k];n.each(g,function(p,q){i[k].prototype[q]=g[q]});n.each(f,function(p,q){if(g[q]){i[k].prototype[q]=function(){this.parent=g[q];return p.apply(this,arguments)}}else{if(q!=k){i[k].prototype[q]=p}}})}n.each(f["static"],function(p,q){i[k][q]=p});if(this.onCreate){this.onCreate(o[2],o[3],i[k].prototype)}},walk:function(i,h,j,g){g=g||this;if(i){if(j){i=i[j]}c.each(i,function(k,f){if(h.call(g,k,f,j)===false){return false}c.walk(k,h,j,g)})}},createNS:function(j,h){var g,f;h=h||e;j=j.split(".");for(g=0;g<j.length;g++){f=j[g];if(!h[f]){h[f]={}}h=h[f]}return h},resolve:function(j,h){var g,f;h=h||e;j=j.split(".");for(g=0,f=j.length;g<f;g++){h=h[j[g]];if(!h){break}}return h},addUnload:function(j,i){var h=this,g;g=function(){var f=h.unloads,l,m;if(f){for(m in f){l=f[m];if(l&&l.func){l.func.call(l.scope,1)}}if(e.detachEvent){e.detachEvent("onbeforeunload",k);e.detachEvent("onunload",g)}else{if(e.removeEventListener){e.removeEventListener("unload",g,false)}}h.unloads=l=f=w=g=0;if(e.CollectGarbage){CollectGarbage()}}};function k(){var l=document;function f(){l.detachEvent("onstop",f);if(g){g()}l=0}if(l.readyState=="interactive"){if(l){l.attachEvent("onstop",f)}e.setTimeout(function(){if(l){l.detachEvent("onstop",f)}},0)}}j={func:j,scope:i||this};if(!h.unloads){if(e.attachEvent){e.attachEvent("onunload",g);e.attachEvent("onbeforeunload",k)}else{if(e.addEventListener){e.addEventListener("unload",g,false)}}h.unloads=[j]}else{h.unloads.push(j)}return j},removeUnload:function(i){var g=this.unloads,h=null;c.each(g,function(j,f){if(j&&j.func==i){g.splice(f,1);h=i;return false}});return h},explode:function(f,g){if(!f||c.is(f,"array")){return f}return c.map(f.split(g||","),c.trim)},_addVer:function(g){var f;if(!this.query){return g}f=(g.indexOf("?")==-1?"?":"&")+this.query;if(g.indexOf("#")==-1){return g+f}return g.replace("#",f+"#")},_replace:function(h,f,g){if(d){return g.replace(h,function(){var l=f,j=arguments,k;for(k=0;k<j.length-2;k++){if(j[k]===b){l=l.replace(new RegExp("\\$"+k,"g"),"")}else{l=l.replace(new RegExp("\\$"+k,"g"),j[k])}}return l})}return g.replace(h,f)}};c._init();e.tinymce=e.tinyMCE=c})(window);tinymce.create("tinymce.util.Dispatcher",{scope:null,listeners:null,inDispatch:false,Dispatcher:function(a){this.scope=a||this;this.listeners=[]},add:function(b,a){this.listeners.push({cb:b,scope:a||this.scope});return b},addToTop:function(d,b){var a=this,c={cb:d,scope:b||a.scope};if(a.inDispatch){a.listeners=[c].concat(a.listeners)}else{a.listeners.unshift(c)}return d},remove:function(c){var b=this.listeners,a=null;tinymce.each(b,function(e,d){if(c==e.cb){a=e;b.splice(d,1);return false}});return a},dispatch:function(){var a=this,e,b=arguments,c,d=a.listeners,f;a.inDispatch=true;for(c=0;c<d.length;c++){f=d[c];e=f.cb.apply(f.scope,b.length>0?b:[f.scope]);if(e===false){break}}a.inDispatch=false;return e}});(function(){var a=tinymce.each;tinymce.create("tinymce.util.URI",{URI:function(e,g){var f=this,i,d,c,h;e=tinymce.trim(e);g=f.settings=g||{};if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e)){f.source=e;return}if(e.indexOf("/")===0&&e.indexOf("//")!==0){e=(g.base_uri?g.base_uri.protocol||"http":"http")+"://mce_host"+e}if(!/^[\w\-]*:?\/\//.test(e)){h=g.base_uri?g.base_uri.path:new tinymce.util.URI(location.href).directory;e=((g.base_uri&&g.base_uri.protocol)||"http")+"://mce_host"+f.toAbsPath(h,e)}e=e.replace(/@@/g,"(mce_at)");e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);a(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(b,j){var k=e[j];if(k){k=k.replace(/\(mce_at\)/g,"@@")}f[b]=k});c=g.base_uri;if(c){if(!f.protocol){f.protocol=c.protocol}if(!f.userInfo){f.userInfo=c.userInfo}if(!f.port&&f.host==="mce_host"){f.port=c.port}if(!f.host||f.host==="mce_host"){f.host=c.host}f.source=""}},setPath:function(c){var b=this;c=/^(.*?)\/?(\w+)?$/.exec(c);b.path=c[0];b.directory=c[1];b.file=c[2];b.source="";b.getURI()},toRelative:function(b){var d=this,f;if(b==="./"){return b}b=new tinymce.util.URI(b,{base_uri:d});if((b.host!="mce_host"&&d.host!=b.host&&b.host)||d.port!=b.port||d.protocol!=b.protocol){return b.getURI()}var c=d.getURI(),e=b.getURI();if(c==e||(c.charAt(c.length-1)=="/"&&c.substr(0,c.length-1)==e)){return c}f=d.toRelPath(d.path,b.path);if(b.query){f+="?"+b.query}if(b.anchor){f+="#"+b.anchor}return f},toAbsolute:function(b,c){b=new tinymce.util.URI(b,{base_uri:this});return b.getURI(this.host==b.host&&this.protocol==b.protocol?c:0)},toRelPath:function(g,h){var c,f=0,d="",e,b;g=g.substring(0,g.lastIndexOf("/"));g=g.split("/");c=h.split("/");if(g.length>=c.length){for(e=0,b=g.length;e<b;e++){if(e>=c.length||g[e]!=c[e]){f=e+1;break}}}if(g.length<c.length){for(e=0,b=c.length;e<b;e++){if(e>=g.length||g[e]!=c[e]){f=e+1;break}}}if(f===1){return h}for(e=0,b=g.length-(f-1);e<b;e++){d+="../"}for(e=f-1,b=c.length;e<b;e++){if(e!=f-1){d+="/"+c[e]}else{d+=c[e]}}return d},toAbsPath:function(e,f){var c,b=0,h=[],d,g;d=/\/$/.test(f)?"/":"";e=e.split("/");f=f.split("/");a(e,function(i){if(i){h.push(i)}});e=h;for(c=f.length-1,h=[];c>=0;c--){if(f[c].length===0||f[c]==="."){continue}if(f[c]===".."){b++;continue}if(b>0){b--;continue}h.push(f[c])}c=e.length-b;if(c<=0){g=h.reverse().join("/")}else{g=e.slice(0,c).join("/")+"/"+h.reverse().join("/")}if(g.indexOf("/")!==0){g="/"+g}if(d&&g.lastIndexOf("/")!==g.length-1){g+=d}return g},getURI:function(d){var c,b=this;if(!b.source||d){c="";if(!d){if(b.protocol){c+=b.protocol+"://"}if(b.userInfo){c+=b.userInfo+"@"}if(b.host){c+=b.host}if(b.port){c+=":"+b.port}}if(b.path){c+=b.path}if(b.query){c+="?"+b.query}if(b.anchor){c+="#"+b.anchor}b.source=c}return b.source}})})();(function(){var a=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(d){var b=this.get(d),c;if(b){a(b.split("&"),function(e){e=e.split("=");c=c||{};c[unescape(e[0])]=unescape(e[1])})}return c},setHash:function(j,b,g,f,i,c){var h="";a(b,function(e,d){h+=(!h?"":"&")+escape(d)+"="+escape(e)});this.set(j,h,g,f,i,c)},get:function(i){var h=document.cookie,g,f=i+"=",d;if(!h){return}d=h.indexOf("; "+f);if(d==-1){d=h.indexOf(f);if(d!==0){return null}}else{d+=2}g=h.indexOf(";",d);if(g==-1){g=h.length}return unescape(h.substring(d+f.length,g))},set:function(i,b,g,f,h,c){document.cookie=i+"="+escape(b)+((g)?"; expires="+g.toGMTString():"")+((f)?"; path="+escape(f):"")+((h)?"; domain="+h:"")+((c)?"; secure":"")},remove:function(c,e,d){var b=new Date();b.setTime(b.getTime()-1000);this.set(c,"",b,e,d)}})})();(function(){function serialize(o,quote){var i,v,t,name;quote=quote||'"';if(o==null){return"null"}t=typeof o;if(t=="string"){v="\bb\tt\nn\ff\rr\"\"''\\\\";return quote+o.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(a,b){if(quote==='"'&&a==="'"){return a}i=v.indexOf(b);if(i+1){return"\\"+v.charAt(i+1)}a=b.charCodeAt().toString(16);return"\\u"+"0000".substring(a.length)+a})+quote}if(t=="object"){if(o.hasOwnProperty&&o instanceof Array){for(i=0,v="[";i<o.length;i++){v+=(i>0?",":"")+serialize(o[i],quote)}return v+"]"}v="{";for(name in o){if(o.hasOwnProperty(name)){v+=typeof o[name]!="function"?(v.length>1?","+quote:quote)+name+quote+":"+serialize(o[name],quote):""}}return v+"}"}return""+o}tinymce.util.JSON={serialize:serialize,parse:function(s){try{return eval("("+s+")")}catch(ex){}}}})();tinymce.create("static tinymce.util.XHR",{send:function(g){var a,e,b=window,h=0;function f(){if(!g.async||a.readyState==4||h++>10000){if(g.success&&h<10000&&a.status==200){g.success.call(g.success_scope,""+a.responseText,a,g)}else{if(g.error){g.error.call(g.error_scope,h>10000?"TIMED_OUT":"GENERAL",a,g)}}a=null}else{b.setTimeout(f,10)}}g.scope=g.scope||this;g.success_scope=g.success_scope||g.scope;g.error_scope=g.error_scope||g.scope;g.async=g.async===false?false:true;g.data=g.data||"";function d(i){a=0;try{a=new ActiveXObject(i)}catch(c){}return a}a=b.XMLHttpRequest?new XMLHttpRequest():d("Microsoft.XMLHTTP")||d("Msxml2.XMLHTTP");if(a){if(a.overrideMimeType){a.overrideMimeType(g.content_type)}a.open(g.type||(g.data?"POST":"GET"),g.url,g.async);if(g.content_type){a.setRequestHeader("Content-Type",g.content_type)}a.setRequestHeader("X-Requested-With","XMLHttpRequest");a.send(g.data);if(!g.async){return f()}e=b.setTimeout(f,10)}}});(function(){var c=tinymce.extend,b=tinymce.util.JSON,a=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(d){this.settings=c({},d);this.count=0},send:function(f){var e=f.error,d=f.success;f=c(this.settings,f);f.success=function(h,g){h=b.parse(h);if(typeof(h)=="undefined"){h={error:"JSON Parse error."}}if(h.error){e.call(f.error_scope||f.scope,h.error,g)}else{d.call(f.success_scope||f.scope,h.result)}};f.error=function(h,g){if(e){e.call(f.error_scope||f.scope,h,g)}};f.data=b.serialize({id:f.id||"c"+(this.count++),method:f.method,params:f.params});f.content_type="application/json";a.send(f)},"static":{sendRPC:function(d){return new tinymce.util.JSONRequest().send(d)}}})}());(function(a){a.VK={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(b){return b.shiftKey||b.ctrlKey||b.altKey}}})(tinymce);tinymce.util.Quirks=function(d){var l=tinymce.VK,r=l.BACKSPACE,s=l.DELETE,o=d.dom,A=d.selection,q=d.settings;function c(E,D){try{d.getDoc().execCommand(E,false,D)}catch(C){}}function h(){function C(F){var D,H,E,G;D=A.getRng();H=o.getParent(D.startContainer,o.isBlock);if(F){H=o.getNext(H,o.isBlock)}if(H){E=H.firstChild;while(E&&E.nodeType==3&&E.nodeValue.length===0){E=E.nextSibling}if(E&&E.nodeName==="SPAN"){G=E.cloneNode(false)}}d.getDoc().execCommand(F?"ForwardDelete":"Delete",false,null);H=o.getParent(D.startContainer,o.isBlock);tinymce.each(o.select("span.Apple-style-span,font.Apple-style-span",H),function(I){var J=A.getBookmark();if(G){o.replace(G.cloneNode(false),I,true)}else{o.remove(I,true)}A.moveToBookmark(J)})}d.onKeyDown.add(function(D,F){var E;E=F.keyCode==s;if(!F.isDefaultPrevented()&&(E||F.keyCode==r)&&!l.modifierPressed(F)){F.preventDefault();C(E)}});d.addCommand("Delete",function(){C()})}function B(){function D(F,I){var E,H,G=I?"start":"end";E=F[G+"Container"];H=F[G+"Offset"];if(E.nodeType==1&&E.hasChildNodes()){E=E.childNodes[Math.min(I?H:(H>0?H-1:0),E.childNodes.length-1)]}return E}function C(H,L){var G,K,F,I,J=L?"start":"end",E;G=H[J+"Container"];K=H[J+"Offset"];F=o.getRoot();if(G.nodeType==1){E=K>=G.childNodes.length;G=D(H,L);if(G.nodeType==3){K=L&&!E?0:G.nodeValue.length}}if(G.nodeType==3&&((L&&K>0)||(!L&&K<G.nodeValue.length))){return false}while(G!==F){I=G.parentNode[L?"firstChild":"lastChild"];if(I.nodeName=="BR"){I=I[L?"nextSibling":"previousSibling"]||I}if(I!==G){return false}G=G.parentNode}return true}d.onKeyDown.addToTop(function(F,H){var E,G=H.keyCode;if(!H.isDefaultPrevented()&&(G==s||G==r)){E=A.getRng(true);if(C(E,true)&&C(E,false)&&(E.collapsed||o.findCommonAncestor(D(E,true),D(E))===o.getRoot())){F.setContent("");F.nodeChanged();H.preventDefault()}}})}function u(){if(!d.settings.content_editable){o.bind(d.getDoc(),"focusin",function(C){A.setRng(A.getRng())});o.bind(d.getDoc(),"mousedown",function(C){if(C.target==d.getDoc().documentElement){d.getWin().focus();A.setRng(A.getRng())}})}}function m(){d.onKeyDown.add(function(C,F){if(!F.isDefaultPrevented()&&F.keyCode===r){if(A.isCollapsed()&&A.getRng(true).startOffset===0){var E=A.getNode();var D=E.previousSibling;if(D&&D.nodeName&&D.nodeName.toLowerCase()==="hr"){o.remove(D);tinymce.dom.Event.cancel(F)}}}})}function b(){if(!Range.prototype.getClientRects){d.onMouseDown.add(function(D,E){if(E.target.nodeName==="HTML"){var C=D.getBody();C.blur();setTimeout(function(){C.focus()},0)}})}}function x(){d.onClick.add(function(C,D){D=D.target;if(/^(IMG|HR)$/.test(D.nodeName)){A.getSel().setBaseAndExtent(D,0,D,1)}if(D.nodeName=="A"&&o.hasClass(D,"mceItemAnchor")){A.select(D)}C.nodeChanged()})}function y(){function D(){var F=o.getAttribs(A.getStart().cloneNode(false));return function(){var G=A.getStart();if(G!==d.getBody()){o.setAttrib(G,"style",null);tinymce.each(F,function(H){G.setAttributeNode(H.cloneNode(true))})}}}function C(){return !A.isCollapsed()&&A.getStart()!=A.getEnd()}function E(F,G){G.preventDefault();return false}d.onKeyPress.add(function(F,H){var G;if((H.keyCode==8||H.keyCode==46)&&C()){G=D();F.getDoc().execCommand("delete",false,null);G();H.preventDefault();return false}});o.bind(d.getDoc(),"cut",function(G){var F;if(C()){F=D();d.onKeyUp.addToTop(E);setTimeout(function(){F();d.onKeyUp.remove(E)},0)}})}function i(){var D,C;o.bind(d.getDoc(),"selectionchange",function(){if(C){clearTimeout(C);C=0}C=window.setTimeout(function(){var E=A.getRng();if(!D||!tinymce.dom.RangeUtils.compareRanges(E,D)){d.nodeChanged();D=E}},50)})}function z(){document.body.setAttribute("role","application")}function v(){d.onKeyDown.add(function(C,E){if(!E.isDefaultPrevented()&&E.keyCode===r){if(A.isCollapsed()&&A.getRng(true).startOffset===0){var D=A.getNode().previousSibling;if(D&&D.nodeName&&D.nodeName.toLowerCase()==="table"){return tinymce.dom.Event.cancel(E)}}}})}function g(){var C=d.getDoc().documentMode;if(C&&C>7){return}c("RespectVisibilityInDesign",true);o.addClass(d.getBody(),"mceHideBrInPre");d.parser.addNodeFilter("pre",function(D,F){var G=D.length,I,E,J,H;while(G--){I=D[G].getAll("br");E=I.length;while(E--){J=I[E];H=J.prev;if(H&&H.type===3&&H.value.charAt(H.value-1)!="\n"){H.value+="\n"}else{J.parent.insert(new tinymce.html.Node("#text",3),J,true).value="\n"}}}});d.serializer.addNodeFilter("pre",function(D,F){var G=D.length,I,E,J,H;while(G--){I=D[G].getAll("br");E=I.length;while(E--){J=I[E];H=J.prev;if(H&&H.type==3){H.value=H.value.replace(/\r?\n$/,"")}}}})}function f(){o.bind(d.getBody(),"mouseup",function(E){var D,C=A.getNode();if(C.nodeName=="IMG"){if(D=o.getStyle(C,"width")){o.setAttrib(C,"width",D.replace(/[^0-9%]+/g,""));o.setStyle(C,"width","")}if(D=o.getStyle(C,"height")){o.setAttrib(C,"height",D.replace(/[^0-9%]+/g,""));o.setStyle(C,"height","")}}})}function p(){d.onKeyDown.add(function(I,J){var H,C,D,F,G,K,E;H=J.keyCode==s;if(!J.isDefaultPrevented()&&(H||J.keyCode==r)&&!l.modifierPressed(J)){C=A.getRng();D=C.startContainer;F=C.startOffset;E=C.collapsed;if(D.nodeType==3&&D.nodeValue.length>0&&((F===0&&!E)||(E&&F===(H?0:1)))){nonEmptyElements=I.schema.getNonEmptyElements();J.preventDefault();G=o.create("br",{id:"__tmp"});D.parentNode.insertBefore(G,D);I.getDoc().execCommand(H?"ForwardDelete":"Delete",false,null);D=A.getRng().startContainer;K=D.previousSibling;if(K&&K.nodeType==1&&!o.isBlock(K)&&o.isEmpty(K)&&!nonEmptyElements[K.nodeName.toLowerCase()]){o.remove(K)}o.remove("__tmp")}}})}function e(){d.onKeyDown.add(function(G,H){var E,D,I,C,F;if(H.isDefaultPrevented()||H.keyCode!=l.BACKSPACE){return}E=A.getRng();D=E.startContainer;I=E.startOffset;C=o.getRoot();F=D;if(!E.collapsed||I!==0){return}while(F&&F.parentNode&&F.parentNode.firstChild==F&&F.parentNode!=C){F=F.parentNode}if(F.tagName==="BLOCKQUOTE"){G.formatter.toggle("blockquote",null,F);E.setStart(D,0);E.setEnd(D,0);A.setRng(E);A.collapse(false)}})}function k(){function C(){d._refreshContentEditable();c("StyleWithCSS",false);c("enableInlineTableEditing",false);if(!q.object_resizing){c("enableObjectResizing",false)}}if(!q.readonly){d.onBeforeExecCommand.add(C);d.onMouseDown.add(C)}}function n(){function C(D,E){tinymce.each(o.select("a"),function(H){var F=H.parentNode,G=o.getRoot();if(F.lastChild===H){while(F&&!o.isBlock(F)){if(F.parentNode.lastChild!==F||F===G){return}F=F.parentNode}o.add(F,"br",{"data-mce-bogus":1})}})}d.onExecCommand.add(function(D,E){if(E==="CreateLink"){C(D)}});d.onSetContent.add(A.onSetContent.add(C))}function t(){if(q.forced_root_block){d.onInit.add(function(){c("DefaultParagraphSeparator",q.forced_root_block)})}}function a(){function C(E,D){if(!E||!D.initial){d.execCommand("mceRepaint")}}d.onUndo.add(C);d.onRedo.add(C);d.onSetContent.add(C)}function j(){d.onKeyDown.add(function(C,D){if(!D.isDefaultPrevented()&&D.keyCode==8&&A.getNode().nodeName=="IMG"){D.preventDefault();C.undoManager.beforeChange();o.remove(A.getNode());C.undoManager.add()}})}v();e();B();if(tinymce.isWebKit){p();h();u();x();t();if(tinymce.isIDevice){i()}}if(tinymce.isIE){m();z();g();f();j()}if(tinymce.isGecko){m();b();y();k();n();a()}};(function(j){var a,g,d,k=/[&<>\"\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,b=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,f=/[<>&\"\']/g,c=/&(#x|#)?([\w]+);/g,i={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"};g={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;"};d={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"};function h(l){var m;m=document.createElement("div");m.innerHTML=l;return m.textContent||m.innerText||l}function e(m,p){var n,o,l,q={};if(m){m=m.split(",");p=p||10;for(n=0;n<m.length;n+=2){o=String.fromCharCode(parseInt(m[n],p));if(!g[o]){l="&"+m[n+1]+";";q[o]=l;q[l]=o}}return q}}a=e("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);j.html=j.html||{};j.html.Entities={encodeRaw:function(m,l){return m.replace(l?k:b,function(n){return g[n]||n})},encodeAllRaw:function(l){return(""+l).replace(f,function(m){return g[m]||m})},encodeNumeric:function(m,l){return m.replace(l?k:b,function(n){if(n.length>1){return"&#"+(((n.charCodeAt(0)-55296)*1024)+(n.charCodeAt(1)-56320)+65536)+";"}return g[n]||"&#"+n.charCodeAt(0)+";"})},encodeNamed:function(n,l,m){m=m||a;return n.replace(l?k:b,function(o){return g[o]||m[o]||o})},getEncodeFunc:function(l,o){var p=j.html.Entities;o=e(o)||a;function m(r,q){return r.replace(q?k:b,function(s){return g[s]||o[s]||"&#"+s.charCodeAt(0)+";"||s})}function n(r,q){return p.encodeNamed(r,q,o)}l=j.makeMap(l.replace(/\+/g,","));if(l.named&&l.numeric){return m}if(l.named){if(o){return n}return p.encodeNamed}if(l.numeric){return p.encodeNumeric}return p.encodeRaw},decode:function(l){return l.replace(c,function(n,m,o){if(m){o=parseInt(o,m.length===2?16:10);if(o>65535){o-=65536;return String.fromCharCode(55296+(o>>10),56320+(o&1023))}else{return i[o]||String.fromCharCode(o)}}return d[n]||a[n]||h(n)})}}})(tinymce);tinymce.html.Styles=function(d,f){var k=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,h=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,b=/\s*([^:]+):\s*([^;]+);?/g,l=/\s+$/,m=/rgb/,e,g,a={},j;d=d||{};j="\\\" \\' \\; \\: ; : \uFEFF".split(" ");for(g=0;g<j.length;g++){a[j[g]]="\uFEFF"+g;a["\uFEFF"+g]=j[g]}function c(n,q,p,i){function o(r){r=parseInt(r).toString(16);return r.length>1?r:"0"+r}return"#"+o(q)+o(p)+o(i)}return{toHex:function(i){return i.replace(k,c)},parse:function(s){var z={},q,n,x,r,v=d.url_converter,y=d.url_converter_scope||this;function p(D,G){var F,C,B,E;F=z[D+"-top"+G];if(!F){return}C=z[D+"-right"+G];if(F!=C){return}B=z[D+"-bottom"+G];if(C!=B){return}E=z[D+"-left"+G];if(B!=E){return}z[D+G]=E;delete z[D+"-top"+G];delete z[D+"-right"+G];delete z[D+"-bottom"+G];delete z[D+"-left"+G]}function u(C){var D=z[C],B;if(!D||D.indexOf(" ")<0){return}D=D.split(" ");B=D.length;while(B--){if(D[B]!==D[0]){return false}}z[C]=D[0];return true}function A(D,C,B,E){if(!u(C)){return}if(!u(B)){return}if(!u(E)){return}z[D]=z[C]+" "+z[B]+" "+z[E];delete z[C];delete z[B];delete z[E]}function t(B){r=true;return a[B]}function i(C,B){if(r){C=C.replace(/\uFEFF[0-9]/g,function(D){return a[D]})}if(!B){C=C.replace(/\\([\'\";:])/g,"$1")}return C}function o(C,B,F,E,G,D){G=G||D;if(G){G=i(G);return"'"+G.replace(/\'/g,"\\'")+"'"}B=i(B||F||E);if(v){B=v.call(y,B,"style")}return"url('"+B.replace(/\'/g,"\\'")+"')"}if(s){s=s.replace(/\\[\"\';:\uFEFF]/g,t).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(B){return B.replace(/[;:]/g,t)});while(q=b.exec(s)){n=q[1].replace(l,"").toLowerCase();x=q[2].replace(l,"");if(n&&x.length>0){if(n==="font-weight"&&x==="700"){x="bold"}else{if(n==="color"||n==="background-color"){x=x.toLowerCase()}}x=x.replace(k,c);x=x.replace(h,o);z[n]=r?i(x,true):x}b.lastIndex=q.index+q[0].length}p("border","");p("border","-width");p("border","-color");p("border","-style");p("padding","");p("margin","");A("border","border-width","border-style","border-color");if(z.border==="medium none"){delete z.border}}return z},serialize:function(p,r){var o="",n,q;function i(t){var x,u,s,v;x=f.styles[t];if(x){for(u=0,s=x.length;u<s;u++){t=x[u];v=p[t];if(v!==e&&v.length>0){o+=(o.length>0?" ":"")+t+": "+v+";"}}}}if(r&&f&&f.styles){i("*");i(r)}else{for(n in p){q=p[n];if(q!==e&&q.length>0){o+=(o.length>0?" ":"")+n+": "+q+";"}}}return o}}};(function(f){var a={},e=f.makeMap,g=f.each;function d(j,i){return j.split(i||",")}function h(m,l){var j,k={};function i(n){return n.replace(/[A-Z]+/g,function(o){return i(m[o])})}for(j in m){if(m.hasOwnProperty(j)){m[j]=i(m[j])}}i(l).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g,function(q,o,n,p){n=d(n,"|");k[o]={attributes:e(n),attributesOrder:n,children:e(p,"|",{"#comment":{}})}});return k}function b(){var i=a.html5;if(!i){i=a.html5=h({A:"id|accesskey|class|dir|draggable|item|hidden|itemprop|role|spellcheck|style|subject|title",B:"#|a|abbr|area|audio|b|bdo|br|button|canvas|cite|code|command|datalist|del|dfn|em|embed|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|meta|meter|noscript|object|output|progress|q|ruby|samp|script|select|small|span|strong|sub|sup|svg|textarea|time|var|video",C:"#|a|abbr|area|address|article|aside|audio|b|bdo|blockquote|br|button|canvas|cite|code|command|datalist|del|details|dfn|dialog|div|dl|em|embed|fieldset|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|menu|meta|meter|nav|noscript|ol|object|output|p|pre|progress|q|ruby|samp|script|section|select|small|span|strong|style|sub|sup|svg|table|textarea|time|ul|var|video"},"html[A|manifest][body|head]head[A][base|command|link|meta|noscript|script|style|title]title[A][#]base[A|href|target][]link[A|href|rel|media|type|sizes][]meta[A|http-equiv|name|content|charset][]style[A|type|media|scoped][#]script[A|charset|type|src|defer|async][#]noscript[A][C]body[A][C]section[A][C]nav[A][C]article[A][C]aside[A][C]h1[A][B]h2[A][B]h3[A][B]h4[A][B]h5[A][B]h6[A][B]hgroup[A][h1|h2|h3|h4|h5|h6]header[A][C]footer[A][C]address[A][C]p[A][B]br[A][]pre[A][B]dialog[A][dd|dt]blockquote[A|cite][C]ol[A|start|reversed][li]ul[A][li]li[A|value][C]dl[A][dd|dt]dt[A][B]dd[A][C]a[A|href|target|ping|rel|media|type][B]em[A][B]strong[A][B]small[A][B]cite[A][B]q[A|cite][B]dfn[A][B]abbr[A][B]code[A][B]var[A][B]samp[A][B]kbd[A][B]sub[A][B]sup[A][B]i[A][B]b[A][B]mark[A][B]progress[A|value|max][B]meter[A|value|min|max|low|high|optimum][B]time[A|datetime][B]ruby[A][B|rt|rp]rt[A][B]rp[A][B]bdo[A][B]span[A][B]ins[A|cite|datetime][B]del[A|cite|datetime][B]figure[A][C|legend|figcaption]figcaption[A][C]img[A|alt|src|height|width|usemap|ismap][]iframe[A|name|src|height|width|sandbox|seamless][]embed[A|src|height|width|type][]object[A|data|type|height|width|usemap|name|form|classid][param]param[A|name|value][]details[A|open][C|legend]command[A|type|label|icon|disabled|checked|radiogroup][]menu[A|type|label][C|li]legend[A][C|B]div[A][C]source[A|src|type|media][]audio[A|src|autobuffer|autoplay|loop|controls][source]video[A|src|autobuffer|autoplay|loop|controls|width|height|poster][source]hr[A][]form[A|accept-charset|action|autocomplete|enctype|method|name|novalidate|target][C]fieldset[A|disabled|form|name][C|legend]label[A|form|for][B]input[A|type|accept|alt|autocomplete|checked|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|height|list|max|maxlength|min|multiple|pattern|placeholder|readonly|required|size|src|step|width|files|value|name][]button[A|autofocus|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|name|value|type][B]select[A|autofocus|disabled|form|multiple|name|size][option|optgroup]datalist[A][B|option]optgroup[A|disabled|label][option]option[A|disabled|selected|label|value][]textarea[A|autofocus|disabled|form|maxlength|name|placeholder|readonly|required|rows|cols|wrap][]keygen[A|autofocus|challenge|disabled|form|keytype|name][]output[A|for|form|name][B]canvas[A|width|height][]map[A|name][B|C]area[A|shape|coords|href|alt|target|media|rel|ping|type][]mathml[A][]svg[A][]table[A|border][caption|colgroup|thead|tfoot|tbody|tr]caption[A][C]colgroup[A|span][col]col[A|span][]thead[A][tr]tfoot[A][tr]tbody[A][tr]tr[A][th|td]th[A|headers|rowspan|colspan|scope][B]td[A|headers|rowspan|colspan][C]")}return i}function c(){var i=a.html4;if(!i){i=a.html4=h({Z:"H|K|N|O|P",Y:"X|form|R|Q",ZG:"E|span|width|align|char|charoff|valign",X:"p|T|div|U|W|isindex|fieldset|table",ZF:"E|align|char|charoff|valign",W:"pre|hr|blockquote|address|center|noframes",ZE:"abbr|axis|headers|scope|rowspan|colspan|align|char|charoff|valign|nowrap|bgcolor|width|height",ZD:"[E][S]",U:"ul|ol|dl|menu|dir",ZC:"p|Y|div|U|W|table|br|span|bdo|object|applet|img|map|K|N|Q",T:"h1|h2|h3|h4|h5|h6",ZB:"X|S|Q",S:"R|P",ZA:"a|G|J|M|O|P",R:"a|H|K|N|O",Q:"noscript|P",P:"ins|del|script",O:"input|select|textarea|label|button",N:"M|L",M:"em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acronym",L:"sub|sup",K:"J|I",J:"tt|i|b|u|s|strike",I:"big|small|font|basefont",H:"G|F",G:"br|span|bdo",F:"object|applet|img|map|iframe",E:"A|B|C",D:"accesskey|tabindex|onfocus|onblur",C:"onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"lang|xml:lang|dir",A:"id|class|style|title"},"script[id|charset|type|language|src|defer|xml:space][]style[B|id|type|media|title|xml:space][]object[E|declare|classid|codebase|data|type|codetype|archive|standby|width|height|usemap|name|tabindex|align|border|hspace|vspace][#|param|Y]param[id|name|value|valuetype|type][]p[E|align][#|S]a[E|D|charset|type|name|href|hreflang|rel|rev|shape|coords|target][#|Z]br[A|clear][]span[E][#|S]bdo[A|C|B][#|S]applet[A|codebase|archive|code|object|alt|name|width|height|align|hspace|vspace][#|param|Y]h1[E|align][#|S]img[E|src|alt|name|longdesc|width|height|usemap|ismap|align|border|hspace|vspace][]map[B|C|A|name][X|form|Q|area]h2[E|align][#|S]iframe[A|longdesc|name|src|frameborder|marginwidth|marginheight|scrolling|align|width|height][#|Y]h3[E|align][#|S]tt[E][#|S]i[E][#|S]b[E][#|S]u[E][#|S]s[E][#|S]strike[E][#|S]big[E][#|S]small[E][#|S]font[A|B|size|color|face][#|S]basefont[id|size|color|face][]em[E][#|S]strong[E][#|S]dfn[E][#|S]code[E][#|S]q[E|cite][#|S]samp[E][#|S]kbd[E][#|S]var[E][#|S]cite[E][#|S]abbr[E][#|S]acronym[E][#|S]sub[E][#|S]sup[E][#|S]input[E|D|type|name|value|checked|disabled|readonly|size|maxlength|src|alt|usemap|onselect|onchange|accept|align][]select[E|name|size|multiple|disabled|tabindex|onfocus|onblur|onchange][optgroup|option]optgroup[E|disabled|label][option]option[E|selected|disabled|label|value][]textarea[E|D|name|rows|cols|disabled|readonly|onselect|onchange][]label[E|for|accesskey|onfocus|onblur][#|S]button[E|D|name|value|type|disabled][#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]h4[E|align][#|S]ins[E|cite|datetime][#|Y]h5[E|align][#|S]del[E|cite|datetime][#|Y]h6[E|align][#|S]div[E|align][#|Y]ul[E|type|compact][li]li[E|type|value][#|Y]ol[E|type|compact|start][li]dl[E|compact][dt|dd]dt[E][#|S]dd[E][#|Y]menu[E|compact][li]dir[E|compact][li]pre[E|width|xml:space][#|ZA]hr[E|align|noshade|size|width][]blockquote[E|cite][#|Y]address[E][#|S|p]center[E][#|Y]noframes[E][#|Y]isindex[A|B|prompt][]fieldset[E][#|legend|Y]legend[E|accesskey|align][#|S]table[E|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor][caption|col|colgroup|thead|tfoot|tbody|tr]caption[E|align][#|S]col[ZG][]colgroup[ZG][col]thead[ZF][tr]tr[ZF|bgcolor][th|td]th[E|ZE][#|Y]form[E|action|method|name|enctype|onsubmit|onreset|accept|accept-charset|target][#|X|R|Q]noscript[E][#|Y]td[E|ZE][#|Y]tfoot[ZF][tr]tbody[ZF][tr]area[E|D|shape|coords|href|nohref|alt|target][]base[id|href|target][]body[E|onload|onunload|background|bgcolor|text|link|vlink|alink][#|Y]")}return i}f.html.Schema=function(A){var u=this,s={},k={},j=[],D,y;var o,q,z,r,v,n,p={};function m(F,E,H){var G=A[F];if(!G){G=a[F];if(!G){G=e(E," ",e(E.toUpperCase()," "));G=f.extend(G,H);a[F]=G}}else{G=e(G,",",e(G.toUpperCase()," "))}return G}A=A||{};y=A.schema=="html5"?b():c();if(A.verify_html===false){A.valid_elements="*[*]"}if(A.valid_styles){D={};g(A.valid_styles,function(F,E){D[E]=f.explode(F)})}o=m("whitespace_elements","pre script style textarea");q=m("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr");z=m("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source");r=m("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls");n=m("non_empty_elements","td th iframe video audio object",z);v=m("block_elements","h1 h2 h3 h4 h5 h6 hr p div address pre form table tbody thead tfoot th tr td li ol ul caption blockquote center dl dt dd dir fieldset noscript menu isindex samp header footer article section hgroup aside nav figure option datalist select optgroup");function i(E){return new RegExp("^"+E.replace(/([?+*])/g,".$1")+"$")}function C(L){var K,G,Z,V,aa,F,I,U,X,Q,Y,ac,O,J,W,E,S,H,ab,ad,P,T,N=/^([#+\-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,R=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,M=/[*?+]/;if(L){L=d(L);if(s["@"]){S=s["@"].attributes;H=s["@"].attributesOrder}for(K=0,G=L.length;K<G;K++){F=N.exec(L[K]);if(F){W=F[1];Q=F[2];E=F[3];X=F[4];O={};J=[];I={attributes:O,attributesOrder:J};if(W==="#"){I.paddEmpty=true}if(W==="-"){I.removeEmpty=true}if(S){for(ad in S){O[ad]=S[ad]}J.push.apply(J,H)}if(X){X=d(X,"|");for(Z=0,V=X.length;Z<V;Z++){F=R.exec(X[Z]);if(F){U={};ac=F[1];Y=F[2].replace(/::/g,":");W=F[3];T=F[4];if(ac==="!"){I.attributesRequired=I.attributesRequired||[];I.attributesRequired.push(Y);U.required=true}if(ac==="-"){delete O[Y];J.splice(f.inArray(J,Y),1);continue}if(W){if(W==="="){I.attributesDefault=I.attributesDefault||[];I.attributesDefault.push({name:Y,value:T});U.defaultValue=T}if(W===":"){I.attributesForced=I.attributesForced||[];I.attributesForced.push({name:Y,value:T});U.forcedValue=T}if(W==="<"){U.validValues=e(T,"?")}}if(M.test(Y)){I.attributePatterns=I.attributePatterns||[];U.pattern=i(Y);I.attributePatterns.push(U)}else{if(!O[Y]){J.push(Y)}O[Y]=U}}}}if(!S&&Q=="@"){S=O;H=J}if(E){I.outputName=Q;s[E]=I}if(M.test(Q)){I.pattern=i(Q);j.push(I)}else{s[Q]=I}}}}}function t(E){s={};j=[];C(E);g(y,function(G,F){k[F]=G.children})}function l(F){var E=/^(~)?(.+)$/;if(F){g(d(F),function(J){var H=E.exec(J),I=H[1]==="~",K=I?"span":"div",G=H[2];k[G]=k[K];p[G]=K;if(!I){v[G]={}}g(k,function(L,M){if(L[K]){L[G]=L[K]}})})}}function x(F){var E=/^([+\-]?)(\w+)\[([^\]]+)\]$/;if(F){g(d(F),function(J){var I=E.exec(J),G,H;if(I){H=I[1];if(H){G=k[I[2]]}else{G=k[I[2]]={"#comment":{}}}G=k[I[2]];g(d(I[3],"|"),function(K){if(H==="-"){delete G[K]}else{G[K]={}}})}})}}function B(E){var G=s[E],F;if(G){return G}F=j.length;while(F--){G=j[F];if(G.pattern.test(E)){return G}}}if(!A.valid_elements){g(y,function(F,E){s[E]={attributes:F.attributes,attributesOrder:F.attributesOrder};k[E]=F.children});if(A.schema!="html5"){g(d("strong/b,em/i"),function(E){E=d(E,"/");s[E[1]].outputName=E[0]})}s.img.attributesDefault=[{name:"alt",value:""}];g(d("ol,ul,sub,sup,blockquote,span,font,a,table,tbody,tr,strong,em,b,i"),function(E){if(s[E]){s[E].removeEmpty=true}});g(d("p,h1,h2,h3,h4,h5,h6,th,td,pre,div,address,caption"),function(E){s[E].paddEmpty=true})}else{t(A.valid_elements)}l(A.custom_elements);x(A.valid_children);C(A.extended_valid_elements);x("+ol[ul|ol],+ul[ul|ol]");if(A.invalid_elements){f.each(f.explode(A.invalid_elements),function(E){if(s[E]){delete s[E]}})}if(!B("span")){C("span[!data-mce-type|*]")}u.children=k;u.styles=D;u.getBoolAttrs=function(){return r};u.getBlockElements=function(){return v};u.getShortEndedElements=function(){return z};u.getSelfClosingElements=function(){return q};u.getNonEmptyElements=function(){return n};u.getWhiteSpaceElements=function(){return o};u.isValidChild=function(E,G){var F=k[E];return !!(F&&F[G])};u.isValid=function(F,E){var H,G,I=B(F);if(I){if(E){if(I.attributes[E]){return true}H=I.attributePatterns;if(H){G=H.length;while(G--){if(H[G].pattern.test(F)){return true}}}}else{return true}}return false};u.getElementRule=B;u.getCustomElements=function(){return p};u.addValidElements=C;u.setValidElements=t;u.addCustomElements=l;u.addValidChildren=x}})(tinymce);(function(a){a.html.SaxParser=function(c,e){var b=this,d=function(){};c=c||{};b.schema=e=e||new a.html.Schema();if(c.fix_self_closing!==false){c.fix_self_closing=true}a.each("comment cdata text start end pi doctype".split(" "),function(f){if(f){b[f]=c[f]||d}});b.parse=function(E){var n=this,g,G=0,I,B,A=[],N,Q,C,r,z,s,M,H,O,v,m,k,t,R,o,P,F,S,L,f,J,l,D,K,h,x=0,j=a.html.Entities.decode,y,q;function u(T){var V,U;V=A.length;while(V--){if(A[V].name===T){break}}if(V>=0){for(U=A.length-1;U>=V;U--){T=A[U];if(T.valid){n.end(T.name)}}A.length=V}}function p(U,T,Y,X,W){var Z,V;T=T.toLowerCase();Y=T in H?T:j(Y||X||W||"");if(v&&!z&&T.indexOf("data-")!==0){Z=P[T];if(!Z&&F){V=F.length;while(V--){Z=F[V];if(Z.pattern.test(T)){break}}if(V===-1){Z=null}}if(!Z){return}if(Z.validValues&&!(Y in Z.validValues)){return}}N.map[T]=Y;N.push({name:T,value:Y})}l=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-\\:]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g");D=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:\\.|[^\"])*)\")|(?:\'((?:\\.|[^\'])*)\')|([^>\s]+)))?/g;K={script:/<\/script[^>]*>/gi,style:/<\/style[^>]*>/gi,noscript:/<\/noscript[^>]*>/gi};M=e.getShortEndedElements();J=c.self_closing_elements||e.getSelfClosingElements();H=e.getBoolAttrs();v=c.validate;s=c.remove_internals;y=c.fix_self_closing;q=a.isIE;o=/^:/;while(g=l.exec(E)){if(G<g.index){n.text(j(E.substr(G,g.index-G)))}if(I=g[6]){I=I.toLowerCase();if(q&&o.test(I)){I=I.substr(1)}u(I)}else{if(I=g[7]){I=I.toLowerCase();if(q&&o.test(I)){I=I.substr(1)}O=I in M;if(y&&J[I]&&A.length>0&&A[A.length-1].name===I){u(I)}if(!v||(m=e.getElementRule(I))){k=true;if(v){P=m.attributes;F=m.attributePatterns}if(R=g[8]){z=R.indexOf("data-mce-type")!==-1;if(z&&s){k=false}N=[];N.map={};R.replace(D,p)}else{N=[];N.map={}}if(v&&!z){S=m.attributesRequired;L=m.attributesDefault;f=m.attributesForced;if(f){Q=f.length;while(Q--){t=f[Q];r=t.name;h=t.value;if(h==="{$uid}"){h="mce_"+x++}N.map[r]=h;N.push({name:r,value:h})}}if(L){Q=L.length;while(Q--){t=L[Q];r=t.name;if(!(r in N.map)){h=t.value;if(h==="{$uid}"){h="mce_"+x++}N.map[r]=h;N.push({name:r,value:h})}}}if(S){Q=S.length;while(Q--){if(S[Q] in N.map){break}}if(Q===-1){k=false}}if(N.map["data-mce-bogus"]){k=false}}if(k){n.start(I,N,O)}}else{k=false}if(B=K[I]){B.lastIndex=G=g.index+g[0].length;if(g=B.exec(E)){if(k){C=E.substr(G,g.index-G)}G=g.index+g[0].length}else{C=E.substr(G);G=E.length}if(k&&C.length>0){n.text(C,true)}if(k){n.end(I)}l.lastIndex=G;continue}if(!O){if(!R||R.indexOf("/")!=R.length-1){A.push({name:I,valid:k})}else{if(k){n.end(I)}}}}else{if(I=g[1]){n.comment(I)}else{if(I=g[2]){n.cdata(I)}else{if(I=g[3]){n.doctype(I)}else{if(I=g[4]){n.pi(I,g[5])}}}}}}G=g.index+g[0].length}if(G<E.length){n.text(j(E.substr(G)))}for(Q=A.length-1;Q>=0;Q--){I=A[Q];if(I.valid){n.end(I.name)}}}}})(tinymce);(function(d){var c=/^[ \t\r\n]*$/,e={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};function a(k,l,j){var i,h,f=j?"lastChild":"firstChild",g=j?"prev":"next";if(k[f]){return k[f]}if(k!==l){i=k[g];if(i){return i}for(h=k.parent;h&&h!==l;h=h.parent){i=h[g];if(i){return i}}}}function b(f,g){this.name=f;this.type=g;if(g===1){this.attributes=[];this.attributes.map={}}}d.extend(b.prototype,{replace:function(g){var f=this;if(g.parent){g.remove()}f.insert(g,f);f.remove();return f},attr:function(h,l){var f=this,g,j,k;if(typeof h!=="string"){for(j in h){f.attr(j,h[j])}return f}if(g=f.attributes){if(l!==k){if(l===null){if(h in g.map){delete g.map[h];j=g.length;while(j--){if(g[j].name===h){g=g.splice(j,1);return f}}}return f}if(h in g.map){j=g.length;while(j--){if(g[j].name===h){g[j].value=l;break}}}else{g.push({name:h,value:l})}g.map[h]=l;return f}else{return g.map[h]}}},clone:function(){var g=this,n=new b(g.name,g.type),h,f,m,j,k;if(m=g.attributes){k=[];k.map={};for(h=0,f=m.length;h<f;h++){j=m[h];if(j.name!=="id"){k[k.length]={name:j.name,value:j.value};k.map[j.name]=j.value}}n.attributes=k}n.value=g.value;n.shortEnded=g.shortEnded;return n},wrap:function(g){var f=this;f.parent.insert(g,f);g.append(f);return f},unwrap:function(){var f=this,h,g;for(h=f.firstChild;h;){g=h.next;f.insert(h,f,true);h=g}f.remove()},remove:function(){var f=this,h=f.parent,g=f.next,i=f.prev;if(h){if(h.firstChild===f){h.firstChild=g;if(g){g.prev=null}}else{i.next=g}if(h.lastChild===f){h.lastChild=i;if(i){i.next=null}}else{g.prev=i}f.parent=f.next=f.prev=null}return f},append:function(h){var f=this,g;if(h.parent){h.remove()}g=f.lastChild;if(g){g.next=h;h.prev=g;f.lastChild=h}else{f.lastChild=f.firstChild=h}h.parent=f;return h},insert:function(h,f,i){var g;if(h.parent){h.remove()}g=f.parent||this;if(i){if(f===g.firstChild){g.firstChild=h}else{f.prev.next=h}h.prev=f.prev;h.next=f;f.prev=h}else{if(f===g.lastChild){g.lastChild=h}else{f.next.prev=h}h.next=f.next;h.prev=f;f.next=h}h.parent=g;return h},getAll:function(g){var f=this,h,i=[];for(h=f.firstChild;h;h=a(h,f)){if(h.name===g){i.push(h)}}return i},empty:function(){var g=this,f,h,j;if(g.firstChild){f=[];for(j=g.firstChild;j;j=a(j,g)){f.push(j)}h=f.length;while(h--){j=f[h];j.parent=j.firstChild=j.lastChild=j.next=j.prev=null}}g.firstChild=g.lastChild=null;return g},isEmpty:function(k){var f=this,j=f.firstChild,h,g;if(j){do{if(j.type===1){if(j.attributes.map["data-mce-bogus"]){continue}if(k[j.name]){return false}h=j.attributes.length;while(h--){g=j.attributes[h].name;if(g==="name"||g.indexOf("data-")===0){return false}}}if(j.type===8){return false}if((j.type===3&&!c.test(j.value))){return false}}while(j=a(j,f))}return true},walk:function(f){return a(this,null,f)}});d.extend(b,{create:function(g,f){var i,h;i=new b(g,e[g]||1);if(f){for(h in f){i.attr(h,f[h])}}return i}});d.html.Node=b})(tinymce);(function(b){var a=b.html.Node;b.html.DomParser=function(g,h){var f=this,e={},d=[],i={},c={};g=g||{};g.validate="validate" in g?g.validate:true;g.root_name=g.root_name||"body";f.schema=h=h||new b.html.Schema();function j(m){var o,p,x,v,z,n,q,l,t,u,k,s,y,r;s=b.makeMap("tr,td,th,tbody,thead,tfoot,table");k=h.getNonEmptyElements();for(o=0;o<m.length;o++){p=m[o];if(!p.parent){continue}v=[p];for(x=p.parent;x&&!h.isValidChild(x.name,p.name)&&!s[x.name];x=x.parent){v.push(x)}if(x&&v.length>1){v.reverse();z=n=f.filterNode(v[0].clone());for(t=0;t<v.length-1;t++){if(h.isValidChild(n.name,v[t].name)){q=f.filterNode(v[t].clone());n.append(q)}else{q=n}for(l=v[t].firstChild;l&&l!=v[t+1];){r=l.next;q.append(l);l=r}n=q}if(!z.isEmpty(k)){x.insert(z,v[0],true);x.insert(p,z)}else{x.insert(p,v[0],true)}x=v[0];if(x.isEmpty(k)||x.firstChild===x.lastChild&&x.firstChild.name==="br"){x.empty().remove()}}else{if(p.parent){if(p.name==="li"){y=p.prev;if(y&&(y.name==="ul"||y.name==="ul")){y.append(p);continue}y=p.next;if(y&&(y.name==="ul"||y.name==="ul")){y.insert(p,y.firstChild,true);continue}p.wrap(f.filterNode(new a("ul",1)));continue}if(h.isValidChild(p.parent.name,"div")&&h.isValidChild("div",p.name)){p.wrap(f.filterNode(new a("div",1)))}else{if(p.name==="style"||p.name==="script"){p.empty().remove()}else{p.unwrap()}}}}}}f.filterNode=function(m){var l,k,n;if(k in e){n=i[k];if(n){n.push(m)}else{i[k]=[m]}}l=d.length;while(l--){k=d[l].name;if(k in m.attributes.map){n=c[k];if(n){n.push(m)}else{c[k]=[m]}}}return m};f.addNodeFilter=function(k,l){b.each(b.explode(k),function(m){var n=e[m];if(!n){e[m]=n=[]}n.push(l)})};f.addAttributeFilter=function(k,l){b.each(b.explode(k),function(m){var n;for(n=0;n<d.length;n++){if(d[n].name===m){d[n].callbacks.push(l);return}}d.push({name:m,callbacks:[l]})})};f.parse=function(v,m){var n,J,B,A,D,C,x,r,F,N,z,o,E,M=[],L,t,k,y,s,p,u,q;m=m||{};i={};c={};o=b.extend(b.makeMap("script,style,head,html,body,title,meta,param"),h.getBlockElements());u=h.getNonEmptyElements();p=h.children;z=g.validate;q="forced_root_block" in m?m.forced_root_block:g.forced_root_block;s=h.getWhiteSpaceElements();E=/^[ \t\r\n]+/;t=/[ \t\r\n]+$/;k=/[ \t\r\n]+/g;y=/^[ \t\r\n]+$/;function G(){var O=J.firstChild,l,P;while(O){l=O.next;if(O.type==3||(O.type==1&&O.name!=="p"&&!o[O.name]&&!O.attr("data-mce-type"))){if(!P){P=K(q,1);J.insert(P,O);P.append(O)}else{P.append(O)}}else{P=null}O=l}}function K(l,O){var P=new a(l,O),Q;if(l in e){Q=i[l];if(Q){Q.push(P)}else{i[l]=[P]}}return P}function I(P){var Q,l,O;for(Q=P.prev;Q&&Q.type===3;){l=Q.value.replace(t,"");if(l.length>0){Q.value=l;Q=Q.prev}else{O=Q.prev;Q.remove();Q=O}}}function H(O){var P,l={};for(P in O){if(P!=="li"&&P!="p"){l[P]=O[P]}}return l}n=new b.html.SaxParser({validate:z,self_closing_elements:H(h.getSelfClosingElements()),cdata:function(l){B.append(K("#cdata",4)).value=l},text:function(P,l){var O;if(!L){P=P.replace(k," ");if(B.lastChild&&o[B.lastChild.name]){P=P.replace(E,"")}}if(P.length!==0){O=K("#text",3);O.raw=!!l;B.append(O).value=P}},comment:function(l){B.append(K("#comment",8)).value=l},pi:function(l,O){B.append(K(l,7)).value=O;I(B)},doctype:function(O){var l;l=B.append(K("#doctype",10));l.value=O;I(B)},start:function(l,W,P){var U,R,Q,O,S,X,V,T;Q=z?h.getElementRule(l):{};if(Q){U=K(Q.outputName||l,1);U.attributes=W;U.shortEnded=P;B.append(U);T=p[B.name];if(T&&p[U.name]&&!T[U.name]){M.push(U)}R=d.length;while(R--){S=d[R].name;if(S in W.map){F=c[S];if(F){F.push(U)}else{c[S]=[U]}}}if(o[l]){I(U)}if(!P){B=U}if(!L&&s[l]){L=true}}},end:function(l){var S,P,R,O,Q;P=z?h.getElementRule(l):{};if(P){if(o[l]){if(!L){S=B.firstChild;if(S&&S.type===3){R=S.value.replace(E,"");if(R.length>0){S.value=R;S=S.next}else{O=S.next;S.remove();S=O}while(S&&S.type===3){R=S.value;O=S.next;if(R.length===0||y.test(R)){S.remove();S=O}S=O}}S=B.lastChild;if(S&&S.type===3){R=S.value.replace(t,"");if(R.length>0){S.value=R;S=S.prev}else{O=S.prev;S.remove();S=O}while(S&&S.type===3){R=S.value;O=S.prev;if(R.length===0||y.test(R)){S.remove();S=O}S=O}}}S=B.prev;if(S&&S.type===3){R=S.value.replace(E,"");if(R.length>0){S.value=R}else{S.remove()}}}if(L&&s[l]){L=false}if(P.removeEmpty||P.paddEmpty){if(B.isEmpty(u)){if(P.paddEmpty){B.empty().append(new a("#text","3")).value="\u00a0"}else{if(!B.attributes.map.name&&!B.attributes.map.id){Q=B.parent;B.empty().remove();B=Q;return}}}}B=B.parent}}},h);J=B=new a(m.context||g.root_name,11);n.parse(v);if(z&&M.length){if(!m.context){j(M)}else{m.invalid=true}}if(q&&J.name=="body"){G()}if(!m.invalid){for(N in i){F=e[N];A=i[N];x=A.length;while(x--){if(!A[x].parent){A.splice(x,1)}}for(D=0,C=F.length;D<C;D++){F[D](A,N,m)}}for(D=0,C=d.length;D<C;D++){F=d[D];if(F.name in c){A=c[F.name];x=A.length;while(x--){if(!A[x].parent){A.splice(x,1)}}for(x=0,r=F.callbacks.length;x<r;x++){F.callbacks[x](A,F.name,m)}}}}return J};if(g.remove_trailing_brs){f.addNodeFilter("br",function(n,m){var r,q=n.length,o,v=b.extend({},h.getBlockElements()),k=h.getNonEmptyElements(),t,s,p,u;v.body=1;for(r=0;r<q;r++){o=n[r];t=o.parent;if(v[o.parent.name]&&o===t.lastChild){p=o.prev;while(p){u=p.name;if(u!=="span"||p.attr("data-mce-type")!=="bookmark"){if(u!=="br"){break}if(u==="br"){o=null;break}}p=p.prev}if(o){o.remove();if(t.isEmpty(k)){elementRule=h.getElementRule(t.name);if(elementRule){if(elementRule.removeEmpty){t.remove()}else{if(elementRule.paddEmpty){t.empty().append(new b.html.Node("#text",3)).value="\u00a0"}}}}}}else{s=o;while(t.firstChild===s&&t.lastChild===s){s=t;if(v[t.name]){break}t=t.parent}if(s===t){textNode=new b.html.Node("#text",3);textNode.value="\u00a0";o.replace(textNode)}}}})}if(!g.allow_html_in_named_anchor){f.addAttributeFilter("id,name",function(k,l){var n=k.length,p,m,o,q;while(n--){q=k[n];if(q.name==="a"&&q.firstChild&&!q.attr("href")){o=q.parent;p=q.lastChild;do{m=p.prev;o.insert(p,q);p=m}while(p)}}})}}})(tinymce);tinymce.html.Writer=function(e){var c=[],a,b,d,f,g;e=e||{};a=e.indent;b=tinymce.makeMap(e.indent_before||"");d=tinymce.makeMap(e.indent_after||"");f=tinymce.html.Entities.getEncodeFunc(e.entity_encoding||"raw",e.entities);g=e.element_format=="html";return{start:function(m,k,p){var n,j,h,o;if(a&&b[m]&&c.length>0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}c.push("<",m);if(k){for(n=0,j=k.length;n<j;n++){h=k[n];c.push(" ",h.name,'="',f(h.value,true),'"')}}if(!p||g){c[c.length]=">"}else{c[c.length]=" />"}if(p&&a&&d[m]&&c.length>0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}},end:function(h){var i;c.push("</",h,">");if(a&&d[h]&&c.length>0){i=c[c.length-1];if(i.length>0&&i!=="\n"){c.push("\n")}}},text:function(i,h){if(i.length>0){c[c.length]=h?i:f(i)}},cdata:function(h){c.push("<![CDATA[",h,"]]>")},comment:function(h){c.push("<!--",h,"-->")},pi:function(h,i){if(i){c.push("<?",h," ",i,"?>")}else{c.push("<?",h,"?>")}if(a){c.push("\n")}},doctype:function(h){c.push("<!DOCTYPE",h,">",a?"\n":"")},reset:function(){c.length=0},getContent:function(){return c.join("").replace(/\n$/,"")}}};(function(a){a.html.Serializer=function(c,d){var b=this,e=new a.html.Writer(c);c=c||{};c.validate="validate" in c?c.validate:true;b.schema=d=d||new a.html.Schema();b.writer=e;b.serialize=function(h){var g,i;i=c.validate;g={3:function(k,j){e.text(k.value,k.raw)},8:function(j){e.comment(j.value)},7:function(j){e.pi(j.name,j.value)},10:function(j){e.doctype(j.value)},4:function(j){e.cdata(j.value)},11:function(j){if((j=j.firstChild)){do{f(j)}while(j=j.next)}}};e.reset();function f(k){var t=g[k.type],j,o,s,r,p,u,n,m,q;if(!t){j=k.name;o=k.shortEnded;s=k.attributes;if(i&&s&&s.length>1){u=[];u.map={};q=d.getElementRule(k.name);for(n=0,m=q.attributesOrder.length;n<m;n++){r=q.attributesOrder[n];if(r in s.map){p=s.map[r];u.map[r]=p;u.push({name:r,value:p})}}for(n=0,m=s.length;n<m;n++){r=s[n].name;if(!(r in u.map)){p=s.map[r];u.map[r]=p;u.push({name:r,value:p})}}s=u}e.start(k.name,s,o);if(!o){if((k=k.firstChild)){do{f(k)}while(k=k.next)}e.end(j)}}else{t(k)}}if(h.type==1&&!c.inner){f(h)}else{g[11](h)}return e.getContent()}}})(tinymce);tinymce.dom={};(function(b,h){var g=!!document.addEventListener;function c(k,j,l,i){if(k.addEventListener){k.addEventListener(j,l,i||false)}else{if(k.attachEvent){k.attachEvent("on"+j,l)}}}function e(k,j,l,i){if(k.removeEventListener){k.removeEventListener(j,l,i||false)}else{if(k.detachEvent){k.detachEvent("on"+j,l)}}}function a(n,l){var i,k=l||{};function j(){return false}function m(){return true}for(i in n){if(i!=="layerX"&&i!=="layerY"){k[i]=n[i]}}if(!k.target){k.target=k.srcElement||document}k.preventDefault=function(){k.isDefaultPrevented=m;if(n){if(n.preventDefault){n.preventDefault()}else{n.returnValue=false}}};k.stopPropagation=function(){k.isPropagationStopped=m;if(n){if(n.stopPropagation){n.stopPropagation()}else{n.cancelBubble=true}}};k.stopImmediatePropagation=function(){k.isImmediatePropagationStopped=m;k.stopPropagation()};if(!k.isDefaultPrevented){k.isDefaultPrevented=j;k.isPropagationStopped=j;k.isImmediatePropagationStopped=j}return k}function d(m,n,l){var k=m.document,j={type:"ready"};function i(){if(!l.domLoaded){l.domLoaded=true;n(j)}}if(g){c(m,"DOMContentLoaded",i)}else{c(k,"readystatechange",function(){if(k.readyState==="complete"){e(k,"readystatechange",arguments.callee);i()}});if(k.documentElement.doScroll&&m===m.top){(function(){try{k.documentElement.doScroll("left")}catch(o){setTimeout(arguments.callee,0);return}i()})()}}c(m,"load",i)}function f(k){var q=this,p={},i,o,n,m,l;m="onmouseenter" in document.documentElement;n="onfocusin" in document.documentElement;l={mouseenter:"mouseover",mouseleave:"mouseout"};i=1;q.domLoaded=false;q.events=p;function j(t,x){var s,u,r,v;s=p[x][t.type];if(s){for(u=0,r=s.length;u<r;u++){v=s[u];if(v&&v.func.call(v.scope,t)===false){t.preventDefault()}if(t.isImmediatePropagationStopped()){return}}}}q.bind=function(x,A,D,E){var s,t,u,r,B,z,C,v=window;function y(F){j(a(F||v.event),s)}if(!x||x.nodeType===3||x.nodeType===8){return}if(!x[h]){s=i++;x[h]=s;p[s]={}}else{s=x[h];if(!p[s]){p[s]={}}}E=E||x;A=A.split(" ");u=A.length;while(u--){r=A[u];z=y;B=C=false;if(r==="DOMContentLoaded"){r="ready"}if((q.domLoaded||x.readyState=="complete")&&r==="ready"){q.domLoaded=true;D.call(E,a({type:r}));continue}if(!m){B=l[r];if(B){z=function(F){var H,G;H=F.currentTarget;G=F.relatedTarget;if(G&&H.contains){G=H.contains(G)}else{while(G&&G!==H){G=G.parentNode}}if(!G){F=a(F||v.event);F.type=F.type==="mouseout"?"mouseleave":"mouseenter";F.target=H;j(F,s)}}}}if(!n&&(r==="focusin"||r==="focusout")){C=true;B=r==="focusin"?"focus":"blur";z=function(F){F=a(F||v.event);F.type=F.type==="focus"?"focusin":"focusout";j(F,s)}}t=p[s][r];if(!t){p[s][r]=t=[{func:D,scope:E}];t.fakeName=B;t.capture=C;t.nativeHandler=z;if(!g){t.proxyHandler=k(s)}if(r==="ready"){d(x,z,q)}else{c(x,B||r,g?z:t.proxyHandler,C)}}else{t.push({func:D,scope:E})}}x=t=0;return D};q.unbind=function(x,z,A){var s,u,v,B,r,t;if(!x||x.nodeType===3||x.nodeType===8){return q}s=x[h];if(s){t=p[s];if(z){z=z.split(" ");v=z.length;while(v--){r=z[v];u=t[r];if(u){if(A){B=u.length;while(B--){if(u[B].func===A){u.splice(B,1)}}}if(!A||u.length===0){delete t[r];e(x,u.fakeName||r,g?u.nativeHandler:u.proxyHandler,u.capture)}}}}else{for(r in t){u=t[r];e(x,u.fakeName||r,g?u.nativeHandler:u.proxyHandler,u.capture)}t={}}for(r in t){return q}delete p[s];try{delete x[h]}catch(y){x[h]=null}}return q};q.fire=function(u,s,r){var v,t;if(!u||u.nodeType===3||u.nodeType===8){return q}t=a(null,r);t.type=s;do{v=u[h];if(v){j(t,v)}u=u.parentNode||u.ownerDocument||u.defaultView||u.parentWindow}while(u&&!t.isPropagationStopped());return q};q.clean=function(u){var s,r,t=q.unbind;if(!u||u.nodeType===3||u.nodeType===8){return q}if(u[h]){t(u)}if(!u.getElementsByTagName){u=u.document}if(u&&u.getElementsByTagName){t(u);r=u.getElementsByTagName("*");s=r.length;while(s--){u=r[s];if(u[h]){t(u)}}}return q};q.callNativeHandler=function(s,r){if(p){p[s][r.type].nativeHandler(r)}};q.destory=function(){p={}};q.add=function(v,s,u,t){if(typeof(v)==="string"){v=document.getElementById(v)}if(v&&v instanceof Array){var r=v;while(r--){q.add(v[r],s,u,t)}return}if(s==="init"){s="ready"}return q.bind(v,s instanceof Array?s.join(" "):s,u,t)};q.remove=function(v,s,u,t){if(!v){return q}if(typeof(v)==="string"){v=document.getElementById(v)}if(v instanceof Array){var r=v.length;while(r--){q.remove(v[r],s,u,t)}return q}return q.unbind(v,s instanceof Array?s.join(" "):s,u)};q.clear=function(r){if(typeof(r)==="string"){r=document.getElementById(r)}return q.clean(r)};q.cancel=function(r){if(r){q.prevent(r);q.stop(r)}return false};q.prevent=function(r){if(!r.preventDefault){r=a(r)}r.preventDefault();return false};q.stop=function(r){if(!r.stopPropagation){r=a(r)}r.stopPropagation();return false}}b.EventUtils=f;b.Event=new f(function(i){return function(j){tinymce.dom.Event.callNativeHandler(i,j)}});b.Event.bind(window,"ready",function(){});b=0})(tinymce.dom,"data-mce-expando");tinymce.dom.TreeWalker=function(a,c){var b=a;function d(i,f,e,j){var h,g;if(i){if(!j&&i[f]){return i[f]}if(i!=c){h=i[e];if(h){return h}for(g=i.parentNode;g&&g!=c;g=g.parentNode){h=g[e];if(h){return h}}}}}this.current=function(){return b};this.next=function(e){return(b=d(b,"firstChild","nextSibling",e))};this.prev=function(e){return(b=d(b,"lastChild","previousSibling",e))}};(function(e){var g=e.each,d=e.is,f=e.isWebKit,b=e.isIE,h=e.html.Entities,c=/^([a-z0-9],?)+$/i,a=/^[ \t\r\n]*$/;e.create("tinymce.dom.DOMUtils",{doc:null,root:null,files:null,pixelStyles:/^(top|left|bottom|right|width|height|borderWidth)$/,props:{"for":"htmlFor","class":"className",className:"className",checked:"checked",disabled:"disabled",maxlength:"maxLength",readonly:"readOnly",selected:"selected",value:"value",id:"id",name:"name",type:"type"},DOMUtils:function(o,l){var k=this,i,j,n;k.doc=o;k.win=window;k.files={};k.cssFlicker=false;k.counter=0;k.stdMode=!e.isIE||o.documentMode>=8;k.boxModel=!e.isIE||o.compatMode=="CSS1Compat"||k.stdMode;k.hasOuterHTML="outerHTML" in o.createElement("a");k.settings=l=e.extend({keep_values:false,hex_colors:1},l);k.schema=l.schema;k.styles=new e.html.Styles({url_converter:l.url_converter,url_converter_scope:l.url_converter_scope},l.schema);if(e.isIE6){try{o.execCommand("BackgroundImageCache",false,true)}catch(m){k.cssFlicker=true}}k.fixDoc(o);k.events=l.ownEvents?new e.dom.EventUtils(l.proxy):e.dom.Event;e.addUnload(k.destroy,k);n=l.schema?l.schema.getBlockElements():{};k.isBlock=function(q){var p=q.nodeType;if(p){return !!(p===1&&n[q.nodeName])}return !!n[q]}},fixDoc:function(k){var j=this.settings,i;if(b&&j.schema){("abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video").replace(/\w+/g,function(l){k.createElement(l)});for(i in j.schema.getCustomElements()){k.createElement(i)}}},clone:function(k,i){var j=this,m,l;if(!b||k.nodeType!==1||i){return k.cloneNode(i)}l=j.doc;if(!i){m=l.createElement(k.nodeName);g(j.getAttribs(k),function(n){j.setAttrib(m,n.nodeName,j.getAttrib(k,n.nodeName))});return m}return m.firstChild},getRoot:function(){var i=this,j=i.settings;return(j&&i.get(j.root_element))||i.doc.body},getViewPort:function(j){var k,i;j=!j?this.win:j;k=j.document;i=this.boxModel?k.documentElement:k.body;return{x:j.pageXOffset||i.scrollLeft,y:j.pageYOffset||i.scrollTop,w:j.innerWidth||i.clientWidth,h:j.innerHeight||i.clientHeight}},getRect:function(l){var k,i=this,j;l=i.get(l);k=i.getPos(l);j=i.getSize(l);return{x:k.x,y:k.y,w:j.w,h:j.h}},getSize:function(l){var j=this,i,k;l=j.get(l);i=j.getStyle(l,"width");k=j.getStyle(l,"height");if(i.indexOf("px")===-1){i=0}if(k.indexOf("px")===-1){k=0}return{w:parseInt(i,10)||l.offsetWidth||l.clientWidth,h:parseInt(k,10)||l.offsetHeight||l.clientHeight}},getParent:function(k,j,i){return this.getParents(k,j,i,false)},getParents:function(s,m,k,q){var j=this,i,l=j.settings,p=[];s=j.get(s);q=q===undefined;if(l.strict_root){k=k||j.getRoot()}if(d(m,"string")){i=m;if(m==="*"){m=function(o){return o.nodeType==1}}else{m=function(o){return j.is(o,i)}}}while(s){if(s==k||!s.nodeType||s.nodeType===9){break}if(!m||m(s)){if(q){p.push(s)}else{return s}}s=s.parentNode}return q?p:null},get:function(i){var j;if(i&&this.doc&&typeof(i)=="string"){j=i;i=this.doc.getElementById(i);if(i&&i.id!==j){return this.doc.getElementsByName(j)[1]}}return i},getNext:function(j,i){return this._findSib(j,i,"nextSibling")},getPrev:function(j,i){return this._findSib(j,i,"previousSibling")},select:function(k,j){var i=this;return e.dom.Sizzle(k,i.get(j)||i.get(i.settings.root_element)||i.doc,[])},is:function(l,j){var k;if(l.length===undefined){if(j==="*"){return l.nodeType==1}if(c.test(j)){j=j.toLowerCase().split(/,/);l=l.nodeName.toLowerCase();for(k=j.length-1;k>=0;k--){if(j[k]==l){return true}}return false}}return e.dom.Sizzle.matches(j,l.nodeType?[l]:l).length>0},add:function(l,o,i,k,m){var j=this;return this.run(l,function(r){var q,n;q=d(o,"string")?j.doc.createElement(o):o;j.setAttribs(q,i);if(k){if(k.nodeType){q.appendChild(k)}else{j.setHTML(q,k)}}return !m?r.appendChild(q):q})},create:function(k,i,j){return this.add(this.doc.createElement(k),k,i,j,1)},createHTML:function(q,i,m){var p="",l=this,j;p+="<"+q;for(j in i){if(i.hasOwnProperty(j)){p+=" "+j+'="'+l.encode(i[j])+'"'}}if(typeof(m)!="undefined"){return p+">"+m+"</"+q+">"}return p+" />"},remove:function(i,j){return this.run(i,function(l){var m,k=l.parentNode;if(!k){return null}if(j){while(m=l.firstChild){if(!e.isIE||m.nodeType!==3||m.nodeValue){k.insertBefore(m,l)}else{l.removeChild(m)}}}return k.removeChild(l)})},setStyle:function(l,i,j){var k=this;return k.run(l,function(o){var n,m;n=o.style;i=i.replace(/-(\D)/g,function(q,p){return p.toUpperCase()});if(k.pixelStyles.test(i)&&(e.is(j,"number")||/^[\-0-9\.]+$/.test(j))){j+="px"}switch(i){case"opacity":if(b){n.filter=j===""?"":"alpha(opacity="+(j*100)+")";if(!l.currentStyle||!l.currentStyle.hasLayout){n.display="inline-block"}}n[i]=n["-moz-opacity"]=n["-khtml-opacity"]=j||"";break;case"float":b?n.styleFloat=j:n.cssFloat=j;break;default:n[i]=j||""}if(k.settings.update_styles){k.setAttrib(o,"data-mce-style")}})},getStyle:function(l,i,k){l=this.get(l);if(!l){return}if(this.doc.defaultView&&k){i=i.replace(/[A-Z]/g,function(m){return"-"+m});try{return this.doc.defaultView.getComputedStyle(l,null).getPropertyValue(i)}catch(j){return null}}i=i.replace(/-(\D)/g,function(n,m){return m.toUpperCase()});if(i=="float"){i=b?"styleFloat":"cssFloat"}if(l.currentStyle&&k){return l.currentStyle[i]}return l.style?l.style[i]:undefined},setStyles:function(l,m){var j=this,k=j.settings,i;i=k.update_styles;k.update_styles=0;g(m,function(o,p){j.setStyle(l,p,o)});k.update_styles=i;if(k.update_styles){j.setAttrib(l,k.cssText)}},removeAllAttribs:function(i){return this.run(i,function(l){var k,j=l.attributes;for(k=j.length-1;k>=0;k--){l.removeAttributeNode(j.item(k))}})},setAttrib:function(k,l,i){var j=this;if(!k||!l){return}if(j.settings.strict){l=l.toLowerCase()}return this.run(k,function(p){var o=j.settings;var m=p.getAttribute(l);if(i!==null){switch(l){case"style":if(!d(i,"string")){g(i,function(q,r){j.setStyle(p,r,q)});return}if(o.keep_values){if(i&&!j._isRes(i)){p.setAttribute("data-mce-style",i,2)}else{p.removeAttribute("data-mce-style",2)}}p.style.cssText=i;break;case"class":p.className=i||"";break;case"src":case"href":if(o.keep_values){if(o.url_converter){i=o.url_converter.call(o.url_converter_scope||j,i,l,p)}j.setAttrib(p,"data-mce-"+l,i,2)}break;case"shape":p.setAttribute("data-mce-style",i);break}}if(d(i)&&i!==null&&i.length!==0){p.setAttribute(l,""+i,2)}else{p.removeAttribute(l,2)}if(tinyMCE.activeEditor&&m!=i){var n=tinyMCE.activeEditor;n.onSetAttrib.dispatch(n,p,l,i)}})},setAttribs:function(j,k){var i=this;return this.run(j,function(l){g(k,function(m,o){i.setAttrib(l,o,m)})})},getAttrib:function(m,o,k){var i,j=this,l;m=j.get(m);if(!m||m.nodeType!==1){return k===l?false:k}if(!d(k)){k=""}if(/^(src|href|style|coords|shape)$/.test(o)){i=m.getAttribute("data-mce-"+o);if(i){return i}}if(b&&j.props[o]){i=m[j.props[o]];i=i&&i.nodeValue?i.nodeValue:i}if(!i){i=m.getAttribute(o,2)}if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(o)){if(m[j.props[o]]===true&&i===""){return o}return i?o:""}if(m.nodeName==="FORM"&&m.getAttributeNode(o)){return m.getAttributeNode(o).nodeValue}if(o==="style"){i=i||m.style.cssText;if(i){i=j.serializeStyle(j.parseStyle(i),m.nodeName);if(j.settings.keep_values&&!j._isRes(i)){m.setAttribute("data-mce-style",i)}}}if(f&&o==="class"&&i){i=i.replace(/(apple|webkit)\-[a-z\-]+/gi,"")}if(b){switch(o){case"rowspan":case"colspan":if(i===1){i=""}break;case"size":if(i==="+0"||i===20||i===0){i=""}break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":if(i===0){i=""}break;case"hspace":if(i===-1){i=""}break;case"maxlength":case"tabindex":if(i===32768||i===2147483647||i==="32768"){i=""}break;case"multiple":case"compact":case"noshade":case"nowrap":if(i===65535){return o}return k;case"shape":i=i.toLowerCase();break;default:if(o.indexOf("on")===0&&i){i=e._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1",""+i)}}}return(i!==l&&i!==null&&i!=="")?""+i:k},getPos:function(q,l){var j=this,i=0,p=0,m,o=j.doc,k;q=j.get(q);l=l||o.body;if(q){if(q.getBoundingClientRect){q=q.getBoundingClientRect();m=j.boxModel?o.documentElement:o.body;i=q.left+(o.documentElement.scrollLeft||o.body.scrollLeft)-m.clientTop;p=q.top+(o.documentElement.scrollTop||o.body.scrollTop)-m.clientLeft;return{x:i,y:p}}k=q;while(k&&k!=l&&k.nodeType){i+=k.offsetLeft||0;p+=k.offsetTop||0;k=k.offsetParent}k=q.parentNode;while(k&&k!=l&&k.nodeType){i-=k.scrollLeft||0;p-=k.scrollTop||0;k=k.parentNode}}return{x:i,y:p}},parseStyle:function(i){return this.styles.parse(i)},serializeStyle:function(j,i){return this.styles.serialize(j,i)},loadCSS:function(i){var k=this,l=k.doc,j;if(!i){i=""}j=l.getElementsByTagName("head")[0];g(i.split(","),function(m){var n;if(k.files[m]){return}k.files[m]=true;n=k.create("link",{rel:"stylesheet",href:e._addVer(m)});if(b&&l.documentMode&&l.recalc){n.onload=function(){if(l.recalc){l.recalc()}n.onload=null}}j.appendChild(n)})},addClass:function(i,j){return this.run(i,function(k){var l;if(!j){return 0}if(this.hasClass(k,j)){return k.className}l=this.removeClass(k,j);return k.className=(l!=""?(l+" "):"")+j})},removeClass:function(k,l){var i=this,j;return i.run(k,function(n){var m;if(i.hasClass(n,l)){if(!j){j=new RegExp("(^|\\s+)"+l+"(\\s+|$)","g")}m=n.className.replace(j," ");m=e.trim(m!=" "?m:"");n.className=m;if(!m){n.removeAttribute("class");n.removeAttribute("className")}return m}return n.className})},hasClass:function(j,i){j=this.get(j);if(!j||!i){return false}return(" "+j.className+" ").indexOf(" "+i+" ")!==-1},show:function(i){return this.setStyle(i,"display","block")},hide:function(i){return this.setStyle(i,"display","none")},isHidden:function(i){i=this.get(i);return !i||i.style.display=="none"||this.getStyle(i,"display")=="none"},uniqueId:function(i){return(!i?"mce_":i)+(this.counter++)},setHTML:function(k,j){var i=this;return i.run(k,function(m){if(b){while(m.firstChild){m.removeChild(m.firstChild)}try{m.innerHTML="<br />"+j;m.removeChild(m.firstChild)}catch(l){m=i.create("div");m.innerHTML="<br />"+j;g(m.childNodes,function(o,n){if(n){m.appendChild(o)}})}}else{m.innerHTML=j}return j})},getOuterHTML:function(k){var j,i=this;k=i.get(k);if(!k){return null}if(k.nodeType===1&&i.hasOuterHTML){return k.outerHTML}j=(k.ownerDocument||i.doc).createElement("body");j.appendChild(k.cloneNode(true));return j.innerHTML},setOuterHTML:function(l,j,m){var i=this;function k(p,o,r){var s,q;q=r.createElement("body");q.innerHTML=o;s=q.lastChild;while(s){i.insertAfter(s.cloneNode(true),p);s=s.previousSibling}i.remove(p)}return this.run(l,function(o){o=i.get(o);if(o.nodeType==1){m=m||o.ownerDocument||i.doc;if(b){try{if(b&&o.nodeType==1){o.outerHTML=j}else{k(o,j,m)}}catch(n){k(o,j,m)}}else{k(o,j,m)}}})},decode:h.decode,encode:h.encodeAllRaw,insertAfter:function(i,j){j=this.get(j);return this.run(i,function(l){var k,m;k=j.parentNode;m=j.nextSibling;if(m){k.insertBefore(l,m)}else{k.appendChild(l)}return l})},replace:function(m,l,i){var j=this;if(d(l,"array")){m=m.cloneNode(true)}return j.run(l,function(k){if(i){g(e.grep(k.childNodes),function(n){m.appendChild(n)})}return k.parentNode.replaceChild(m,k)})},rename:function(l,i){var k=this,j;if(l.nodeName!=i.toUpperCase()){j=k.create(i);g(k.getAttribs(l),function(m){k.setAttrib(j,m.nodeName,k.getAttrib(l,m.nodeName))});k.replace(j,l,1)}return j||l},findCommonAncestor:function(k,i){var l=k,j;while(l){j=i;while(j&&l!=j){j=j.parentNode}if(l==j){break}l=l.parentNode}if(!l&&k.ownerDocument){return k.ownerDocument.documentElement}return l},toHex:function(i){var k=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(i);function j(l){l=parseInt(l,10).toString(16);return l.length>1?l:"0"+l}if(k){i="#"+j(k[1])+j(k[2])+j(k[3]);return i}return i},getClasses:function(){var n=this,j=[],m,o={},p=n.settings.class_filter,l;if(n.classes){return n.classes}function q(i){g(i.imports,function(s){q(s)});g(i.cssRules||i.rules,function(s){switch(s.type||1){case 1:if(s.selectorText){g(s.selectorText.split(","),function(r){r=r.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(r)||!/\.[\w\-]+$/.test(r)){return}l=r;r=e._replace(/.*\.([a-z0-9_\-]+).*/i,"$1",r);if(p&&!(r=p(r,l))){return}if(!o[r]){j.push({"class":r});o[r]=1}})}break;case 3:q(s.styleSheet);break}})}try{g(n.doc.styleSheets,q)}catch(k){}if(j.length>0){n.classes=j}return j},run:function(l,k,j){var i=this,m;if(i.doc&&typeof(l)==="string"){l=i.get(l)}if(!l){return false}j=j||this;if(!l.nodeType&&(l.length||l.length===0)){m=[];g(l,function(o,n){if(o){if(typeof(o)=="string"){o=i.doc.getElementById(o)}m.push(k.call(j,o,n))}});return m}return k.call(j,l)},getAttribs:function(j){var i;j=this.get(j);if(!j){return[]}if(b){i=[];if(j.nodeName=="OBJECT"){return j.attributes}if(j.nodeName==="OPTION"&&this.getAttrib(j,"selected")){i.push({specified:1,nodeName:"selected"})}j.cloneNode(false).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(k){i.push({specified:1,nodeName:k})});return i}return j.attributes},isEmpty:function(m,k){var r=this,o,n,q,j,l,p=0;m=m.firstChild;if(m){j=new e.dom.TreeWalker(m,m.parentNode);k=k||r.schema?r.schema.getNonEmptyElements():null;do{q=m.nodeType;if(q===1){if(m.getAttribute("data-mce-bogus")){continue}l=m.nodeName.toLowerCase();if(k&&k[l]){if(l==="br"){p++;continue}return false}n=r.getAttribs(m);o=m.attributes.length;while(o--){l=m.attributes[o].nodeName;if(l==="name"||l==="data-mce-bookmark"){return false}}}if(q==8){return false}if((q===3&&!a.test(m.nodeValue))){return false}}while(m=j.next())}return p<=1},destroy:function(j){var i=this;i.win=i.doc=i.root=i.events=i.frag=null;if(!j){e.removeUnload(i.destroy)}},createRng:function(){var i=this.doc;return i.createRange?i.createRange():new e.dom.Range(this)},nodeIndex:function(m,n){var i=0,k,l,j;if(m){for(k=m.nodeType,m=m.previousSibling,l=m;m;m=m.previousSibling){j=m.nodeType;if(n&&j==3){if(j==k||!m.nodeValue.length){continue}}i++;k=j}}return i},split:function(m,l,p){var q=this,i=q.createRng(),n,k,o;function j(v){var t,s=v.childNodes,u=v.nodeType;function x(A){var z=A.previousSibling&&A.previousSibling.nodeName=="SPAN";var y=A.nextSibling&&A.nextSibling.nodeName=="SPAN";return z&&y}if(u==1&&v.getAttribute("data-mce-type")=="bookmark"){return}for(t=s.length-1;t>=0;t--){j(s[t])}if(u!=9){if(u==3&&v.nodeValue.length>0){var r=e.trim(v.nodeValue).length;if(!q.isBlock(v.parentNode)||r>0||r===0&&x(v)){return}}else{if(u==1){s=v.childNodes;if(s.length==1&&s[0]&&s[0].nodeType==1&&s[0].getAttribute("data-mce-type")=="bookmark"){v.parentNode.insertBefore(s[0],v)}if(s.length||/^(br|hr|input|img)$/i.test(v.nodeName)){return}}}q.remove(v)}return v}if(m&&l){i.setStart(m.parentNode,q.nodeIndex(m));i.setEnd(l.parentNode,q.nodeIndex(l));n=i.extractContents();i=q.createRng();i.setStart(l.parentNode,q.nodeIndex(l)+1);i.setEnd(m.parentNode,q.nodeIndex(m)+1);k=i.extractContents();o=m.parentNode;o.insertBefore(j(n),m);if(p){o.replaceChild(p,l)}else{o.insertBefore(l,m)}o.insertBefore(j(k),m);q.remove(m);return p||l}},bind:function(l,i,k,j){return this.events.add(l,i,k,j||this)},unbind:function(k,i,j){return this.events.remove(k,i,j)},fire:function(k,j,i){return this.events.fire(k,j,i)},getContentEditable:function(j){var i;if(j.nodeType!=1){return null}i=j.getAttribute("data-mce-contenteditable");if(i&&i!=="inherit"){return i}return j.contentEditable!=="inherit"?j.contentEditable:null},_findSib:function(l,i,j){var k=this,m=i;if(l){if(d(m,"string")){m=function(n){return k.is(n,i)}}for(l=l[j];l;l=l[j]){if(m(l)){return l}}}return null},_isRes:function(i){return/^(top|left|bottom|right|width|height)/i.test(i)||/;\s*(top|left|bottom|right|width|height)/i.test(i)}});e.DOM=new e.dom.DOMUtils(document,{process_html:0})})(tinymce);(function(a){function b(c){var O=this,e=c.doc,U=0,F=1,j=2,E=true,S=false,W="startOffset",h="startContainer",Q="endContainer",A="endOffset",k=tinymce.extend,n=c.nodeIndex;k(O,{startContainer:e,startOffset:0,endContainer:e,endOffset:0,collapsed:E,commonAncestorContainer:e,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:q,setEnd:s,setStartBefore:g,setStartAfter:J,setEndBefore:K,setEndAfter:u,collapse:B,selectNode:y,selectNodeContents:G,compareBoundaryPoints:v,deleteContents:p,extractContents:I,cloneContents:d,insertNode:D,surroundContents:N,cloneRange:L,toStringIE:T});function x(){return e.createDocumentFragment()}function q(X,t){C(E,X,t)}function s(X,t){C(S,X,t)}function g(t){q(t.parentNode,n(t))}function J(t){q(t.parentNode,n(t)+1)}function K(t){s(t.parentNode,n(t))}function u(t){s(t.parentNode,n(t)+1)}function B(t){if(t){O[Q]=O[h];O[A]=O[W]}else{O[h]=O[Q];O[W]=O[A]}O.collapsed=E}function y(t){g(t);u(t)}function G(t){q(t,0);s(t,t.nodeType===1?t.childNodes.length:t.nodeValue.length)}function v(aa,t){var ad=O[h],Y=O[W],ac=O[Q],X=O[A],ab=t.startContainer,af=t.startOffset,Z=t.endContainer,ae=t.endOffset;if(aa===0){return H(ad,Y,ab,af)}if(aa===1){return H(ac,X,ab,af)}if(aa===2){return H(ac,X,Z,ae)}if(aa===3){return H(ad,Y,Z,ae)}}function p(){l(j)}function I(){return l(U)}function d(){return l(F)}function D(aa){var X=this[h],t=this[W],Z,Y;if((X.nodeType===3||X.nodeType===4)&&X.nodeValue){if(!t){X.parentNode.insertBefore(aa,X)}else{if(t>=X.nodeValue.length){c.insertAfter(aa,X)}else{Z=X.splitText(t);X.parentNode.insertBefore(aa,Z)}}}else{if(X.childNodes.length>0){Y=X.childNodes[t]}if(Y){X.insertBefore(aa,Y)}else{X.appendChild(aa)}}}function N(X){var t=O.extractContents();O.insertNode(X);X.appendChild(t);O.selectNode(X)}function L(){return k(new b(c),{startContainer:O[h],startOffset:O[W],endContainer:O[Q],endOffset:O[A],collapsed:O.collapsed,commonAncestorContainer:O.commonAncestorContainer})}function P(t,X){var Y;if(t.nodeType==3){return t}if(X<0){return t}Y=t.firstChild;while(Y&&X>0){--X;Y=Y.nextSibling}if(Y){return Y}return t}function m(){return(O[h]==O[Q]&&O[W]==O[A])}function H(Z,ab,X,aa){var ac,Y,t,ad,af,ae;if(Z==X){if(ab==aa){return 0}if(ab<aa){return -1}return 1}ac=X;while(ac&&ac.parentNode!=Z){ac=ac.parentNode}if(ac){Y=0;t=Z.firstChild;while(t!=ac&&Y<ab){Y++;t=t.nextSibling}if(ab<=Y){return -1}return 1}ac=Z;while(ac&&ac.parentNode!=X){ac=ac.parentNode}if(ac){Y=0;t=X.firstChild;while(t!=ac&&Y<aa){Y++;t=t.nextSibling}if(Y<aa){return -1}return 1}ad=c.findCommonAncestor(Z,X);af=Z;while(af&&af.parentNode!=ad){af=af.parentNode}if(!af){af=ad}ae=X;while(ae&&ae.parentNode!=ad){ae=ae.parentNode}if(!ae){ae=ad}if(af==ae){return 0}t=ad.firstChild;while(t){if(t==af){return -1}if(t==ae){return 1}t=t.nextSibling}}function C(X,aa,Z){var t,Y;if(X){O[h]=aa;O[W]=Z}else{O[Q]=aa;O[A]=Z}t=O[Q];while(t.parentNode){t=t.parentNode}Y=O[h];while(Y.parentNode){Y=Y.parentNode}if(Y==t){if(H(O[h],O[W],O[Q],O[A])>0){O.collapse(X)}}else{O.collapse(X)}O.collapsed=m();O.commonAncestorContainer=c.findCommonAncestor(O[h],O[Q])}function l(ad){var ac,Z=0,af=0,X,ab,Y,aa,t,ae;if(O[h]==O[Q]){return f(ad)}for(ac=O[Q],X=ac.parentNode;X;ac=X,X=X.parentNode){if(X==O[h]){return r(ac,ad)}++Z}for(ac=O[h],X=ac.parentNode;X;ac=X,X=X.parentNode){if(X==O[Q]){return V(ac,ad)}++af}ab=af-Z;Y=O[h];while(ab>0){Y=Y.parentNode;ab--}aa=O[Q];while(ab<0){aa=aa.parentNode;ab++}for(t=Y.parentNode,ae=aa.parentNode;t!=ae;t=t.parentNode,ae=ae.parentNode){Y=t;aa=ae}return o(Y,aa,ad)}function f(ac){var ae,af,t,Y,Z,ad,aa,X,ab;if(ac!=j){ae=x()}if(O[W]==O[A]){return ae}if(O[h].nodeType==3){af=O[h].nodeValue;t=af.substring(O[W],O[A]);if(ac!=F){Y=O[h];X=O[W];ab=O[A]-O[W];if(X===0&&ab>=Y.nodeValue.length-1){Y.parentNode.removeChild(Y)}else{Y.deleteData(X,ab)}O.collapse(E)}if(ac==j){return}if(t.length>0){ae.appendChild(e.createTextNode(t))}return ae}Y=P(O[h],O[W]);Z=O[A]-O[W];while(Y&&Z>0){ad=Y.nextSibling;aa=z(Y,ac);if(ae){ae.appendChild(aa)}--Z;Y=ad}if(ac!=F){O.collapse(E)}return ae}function r(ad,aa){var ac,ab,X,t,Z,Y;if(aa!=j){ac=x()}ab=i(ad,aa);if(ac){ac.appendChild(ab)}X=n(ad);t=X-O[W];if(t<=0){if(aa!=F){O.setEndBefore(ad);O.collapse(S)}return ac}ab=ad.previousSibling;while(t>0){Z=ab.previousSibling;Y=z(ab,aa);if(ac){ac.insertBefore(Y,ac.firstChild)}--t;ab=Z}if(aa!=F){O.setEndBefore(ad);O.collapse(S)}return ac}function V(ab,aa){var ad,X,ac,t,Z,Y;if(aa!=j){ad=x()}ac=R(ab,aa);if(ad){ad.appendChild(ac)}X=n(ab);++X;t=O[A]-X;ac=ab.nextSibling;while(ac&&t>0){Z=ac.nextSibling;Y=z(ac,aa);if(ad){ad.appendChild(Y)}--t;ac=Z}if(aa!=F){O.setStartAfter(ab);O.collapse(E)}return ad}function o(ab,t,ae){var Y,ag,aa,ac,ad,X,af,Z;if(ae!=j){ag=x()}Y=R(ab,ae);if(ag){ag.appendChild(Y)}aa=ab.parentNode;ac=n(ab);ad=n(t);++ac;X=ad-ac;af=ab.nextSibling;while(X>0){Z=af.nextSibling;Y=z(af,ae);if(ag){ag.appendChild(Y)}af=Z;--X}Y=i(t,ae);if(ag){ag.appendChild(Y)}if(ae!=F){O.setStartAfter(ab);O.collapse(E)}return ag}function i(ac,ad){var Y=P(O[Q],O[A]-1),ae,ab,aa,t,X,Z=Y!=O[Q];if(Y==ac){return M(Y,Z,S,ad)}ae=Y.parentNode;ab=M(ae,S,S,ad);while(ae){while(Y){aa=Y.previousSibling;t=M(Y,Z,S,ad);if(ad!=j){ab.insertBefore(t,ab.firstChild)}Z=E;Y=aa}if(ae==ac){return ab}Y=ae.previousSibling;ae=ae.parentNode;X=M(ae,S,S,ad);if(ad!=j){X.appendChild(ab)}ab=X}}function R(ac,ad){var Z=P(O[h],O[W]),aa=Z!=O[h],ae,ab,Y,t,X;if(Z==ac){return M(Z,aa,E,ad)}ae=Z.parentNode;ab=M(ae,S,E,ad);while(ae){while(Z){Y=Z.nextSibling;t=M(Z,aa,E,ad);if(ad!=j){ab.appendChild(t)}aa=E;Z=Y}if(ae==ac){return ab}Z=ae.nextSibling;ae=ae.parentNode;X=M(ae,S,E,ad);if(ad!=j){X.appendChild(ab)}ab=X}}function M(t,aa,ad,ae){var Z,Y,ab,X,ac;if(aa){return z(t,ae)}if(t.nodeType==3){Z=t.nodeValue;if(ad){X=O[W];Y=Z.substring(X);ab=Z.substring(0,X)}else{X=O[A];Y=Z.substring(0,X);ab=Z.substring(X)}if(ae!=F){t.nodeValue=ab}if(ae==j){return}ac=c.clone(t,S);ac.nodeValue=Y;return ac}if(ae==j){return}return c.clone(t,S)}function z(X,t){if(t!=j){return t==F?c.clone(X,E):X}X.parentNode.removeChild(X)}function T(){return c.create("body",null,d()).outerText}return O}a.Range=b;b.prototype.toString=function(){return this.toStringIE()}})(tinymce.dom);(function(){function a(d){var b=this,h=d.dom,c=true,f=false;function e(i,j){var k,t=0,q,n,m,l,o,r,p=-1,s;k=i.duplicate();k.collapse(j);s=k.parentElement();if(s.ownerDocument!==d.dom.doc){return}while(s.contentEditable==="false"){s=s.parentNode}if(!s.hasChildNodes()){return{node:s,inside:1}}m=s.children;q=m.length-1;while(t<=q){r=Math.floor((t+q)/2);l=m[r];k.moveToElementText(l);p=k.compareEndPoints(j?"StartToStart":"EndToEnd",i);if(p>0){q=r-1}else{if(p<0){t=r+1}else{return{node:l}}}}if(p<0){if(!l){k.moveToElementText(s);k.collapse(true);l=s;n=true}else{k.collapse(false)}o=0;while(k.compareEndPoints(j?"StartToStart":"StartToEnd",i)!==0){if(k.move("character",1)===0||s!=k.parentElement()){break}o++}}else{k.collapse(true);o=0;while(k.compareEndPoints(j?"StartToStart":"StartToEnd",i)!==0){if(k.move("character",-1)===0||s!=k.parentElement()){break}o++}}return{node:l,position:p,offset:o,inside:n}}function g(){var i=d.getRng(),r=h.createRng(),l,k,p,q,m,j;l=i.item?i.item(0):i.parentElement();if(l.ownerDocument!=h.doc){return r}k=d.isCollapsed();if(i.item){r.setStart(l.parentNode,h.nodeIndex(l));r.setEnd(r.startContainer,r.startOffset+1);return r}function o(A){var u=e(i,A),s,y,z=0,x,v,t;s=u.node;y=u.offset;if(u.inside&&!s.hasChildNodes()){r[A?"setStart":"setEnd"](s,0);return}if(y===v){r[A?"setStartBefore":"setEndAfter"](s);return}if(u.position<0){x=u.inside?s.firstChild:s.nextSibling;if(!x){r[A?"setStartAfter":"setEndAfter"](s);return}if(!y){if(x.nodeType==3){r[A?"setStart":"setEnd"](x,0)}else{r[A?"setStartBefore":"setEndBefore"](x)}return}while(x){t=x.nodeValue;z+=t.length;if(z>=y){s=x;z-=y;z=t.length-z;break}x=x.nextSibling}}else{x=s.previousSibling;if(!x){return r[A?"setStartBefore":"setEndBefore"](s)}if(!y){if(s.nodeType==3){r[A?"setStart":"setEnd"](x,s.nodeValue.length)}else{r[A?"setStartAfter":"setEndAfter"](x)}return}while(x){z+=x.nodeValue.length;if(z>=y){s=x;z-=y;break}x=x.previousSibling}}r[A?"setStart":"setEnd"](s,z)}try{o(true);if(!k){o()}}catch(n){if(n.number==-2147024809){m=b.getBookmark(2);p=i.duplicate();p.collapse(true);l=p.parentElement();if(!k){p=i.duplicate();p.collapse(false);q=p.parentElement();q.innerHTML=q.innerHTML}l.innerHTML=l.innerHTML;b.moveToBookmark(m);i=d.getRng();o(true);if(!k){o()}}else{throw n}}return r}this.getBookmark=function(m){var j=d.getRng(),o,i,l={};function n(u){var t,p,s,r,q=[];t=u.parentNode;p=h.getRoot().parentNode;while(t!=p&&t.nodeType!==9){s=t.children;r=s.length;while(r--){if(u===s[r]){q.push(r);break}}u=t;t=t.parentNode}return q}function k(q){var p;p=e(j,q);if(p){return{position:p.position,offset:p.offset,indexes:n(p.node),inside:p.inside}}}if(m===2){if(!j.item){l.start=k(true);if(!d.isCollapsed()){l.end=k()}}else{l.start={ctrl:true,indexes:n(j.item(0))}}}return l};this.moveToBookmark=function(k){var j,i=h.doc.body;function m(o){var r,q,n,p;r=h.getRoot();for(q=o.length-1;q>=0;q--){p=r.children;n=o[q];if(n<=p.length-1){r=p[n]}}return r}function l(r){var n=k[r?"start":"end"],q,p,o;if(n){q=n.position>0;p=i.createTextRange();p.moveToElementText(m(n.indexes));offset=n.offset;if(offset!==o){p.collapse(n.inside||q);p.moveStart("character",q?-offset:offset)}else{p.collapse(r)}j.setEndPoint(r?"StartToStart":"EndToStart",p);if(r){j.collapse(true)}}}if(k.start){if(k.start.ctrl){j=i.createControlRange();j.addElement(m(k.start.indexes));j.select()}else{j=i.createTextRange();l(true);l();j.select()}}};this.addRange=function(i){var n,l,k,p,t,q,s,r=d.dom.doc,m=r.body;function j(A){var v,z,u,y,x;u=h.create("a");v=A?k:t;z=A?p:q;y=n.duplicate();if(v==r||v==r.documentElement){v=m;z=0}if(v.nodeType==3){v.parentNode.insertBefore(u,v);y.moveToElementText(u);y.moveStart("character",z);h.remove(u);n.setEndPoint(A?"StartToStart":"EndToEnd",y)}else{x=v.childNodes;if(x.length){if(z>=x.length){h.insertAfter(u,x[x.length-1])}else{v.insertBefore(u,x[z])}y.moveToElementText(u)}else{if(v.canHaveHTML){v.innerHTML="<span>\uFEFF</span>";u=v.firstChild;y.moveToElementText(u);y.collapse(f)}}n.setEndPoint(A?"StartToStart":"EndToEnd",y);h.remove(u)}}k=i.startContainer;p=i.startOffset;t=i.endContainer;q=i.endOffset;n=m.createTextRange();if(k==t&&k.nodeType==1){if(p==q&&!k.hasChildNodes()){if(k.canHaveHTML){s=k.previousSibling;if(s&&!s.hasChildNodes()&&h.isBlock(s)){s.innerHTML="\uFEFF"}else{s=null}k.innerHTML="<span>\uFEFF</span><span>\uFEFF</span>";n.moveToElementText(k.lastChild);n.select();h.doc.selection.clear();k.innerHTML="";if(s){s.innerHTML=""}return}else{p=h.nodeIndex(k);k=k.parentNode}}if(p==q-1){try{l=m.createControlRange();l.addElement(k.childNodes[p]);l.select();return}catch(o){}}}j(true);j();n.select()};this.getRangeAt=g}tinymce.dom.TridentSelection=a})();(function(){var n=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i="sizcache",o=0,r=Object.prototype.toString,h=false,g=true,q=/\\/g,u=/\r\n/g,x=/\W/;[0,0].sort(function(){g=false;return 0});var d=function(C,e,F,G){F=F||[];e=e||document;var I=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!C||typeof C!=="string"){return F}var z,K,N,y,J,M,L,E,B=true,A=d.isXML(e),D=[],H=C;do{n.exec("");z=n.exec(H);if(z){H=z[3];D.push(z[1]);if(z[2]){y=z[3];break}}}while(z);if(D.length>1&&j.exec(C)){if(D.length===2&&k.relative[D[0]]){K=s(D[0]+D[1],e,G)}else{K=k.relative[D[0]]?[e]:d(D.shift(),e);while(D.length){C=D.shift();if(k.relative[C]){C+=D.shift()}K=s(C,K,G)}}}else{if(!G&&D.length>1&&e.nodeType===9&&!A&&k.match.ID.test(D[0])&&!k.match.ID.test(D[D.length-1])){J=d.find(D.shift(),e,A);e=J.expr?d.filter(J.expr,J.set)[0]:J.set[0]}if(e){J=G?{expr:D.pop(),set:l(G)}:d.find(D.pop(),D.length===1&&(D[0]==="~"||D[0]==="+")&&e.parentNode?e.parentNode:e,A);K=J.expr?d.filter(J.expr,J.set):J.set;if(D.length>0){N=l(K)}else{B=false}while(D.length){M=D.pop();L=M;if(!k.relative[M]){M=""}else{L=D.pop()}if(L==null){L=e}k.relative[M](N,L,A)}}else{N=D=[]}}if(!N){N=K}if(!N){d.error(M||C)}if(r.call(N)==="[object Array]"){if(!B){F.push.apply(F,N)}else{if(e&&e.nodeType===1){for(E=0;N[E]!=null;E++){if(N[E]&&(N[E]===true||N[E].nodeType===1&&d.contains(e,N[E]))){F.push(K[E])}}}else{for(E=0;N[E]!=null;E++){if(N[E]&&N[E].nodeType===1){F.push(K[E])}}}}}else{l(N,F)}if(y){d(y,I,F,G);d.uniqueSort(F)}return F};d.uniqueSort=function(y){if(p){h=g;y.sort(p);if(h){for(var e=1;e<y.length;e++){if(y[e]===y[e-1]){y.splice(e--,1)}}}}return y};d.matches=function(e,y){return d(e,null,null,y)};d.matchesSelector=function(e,y){return d(y,null,null,[e]).length>0};d.find=function(E,e,F){var D,z,B,A,C,y;if(!E){return[]}for(z=0,B=k.order.length;z<B;z++){C=k.order[z];if((A=k.leftMatch[C].exec(E))){y=A[1];A.splice(1,1);if(y.substr(y.length-1)!=="\\"){A[1]=(A[1]||"").replace(q,"");D=k.find[C](A,e,F);if(D!=null){E=E.replace(k.match[C],"");break}}}}if(!D){D=typeof e.getElementsByTagName!=="undefined"?e.getElementsByTagName("*"):[]}return{set:D,expr:E}};d.filter=function(I,H,L,B){var D,e,G,N,K,y,A,C,J,z=I,M=[],F=H,E=H&&H[0]&&d.isXML(H[0]);while(I&&H.length){for(G in k.filter){if((D=k.leftMatch[G].exec(I))!=null&&D[2]){y=k.filter[G];A=D[1];e=false;D.splice(1,1);if(A.substr(A.length-1)==="\\"){continue}if(F===M){M=[]}if(k.preFilter[G]){D=k.preFilter[G](D,F,L,M,B,E);if(!D){e=N=true}else{if(D===true){continue}}}if(D){for(C=0;(K=F[C])!=null;C++){if(K){N=y(K,D,C,F);J=B^N;if(L&&N!=null){if(J){e=true}else{F[C]=false}}else{if(J){M.push(K);e=true}}}}}if(N!==undefined){if(!L){F=M}I=I.replace(k.match[G],"");if(!e){return[]}break}}}if(I===z){if(e==null){d.error(I)}else{break}}z=I}return F};d.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};var b=d.getText=function(B){var z,A,e=B.nodeType,y="";if(e){if(e===1||e===9||e===11){if(typeof B.textContent==="string"){return B.textContent}else{if(typeof B.innerText==="string"){return B.innerText.replace(u,"")}else{for(B=B.firstChild;B;B=B.nextSibling){y+=b(B)}}}}else{if(e===3||e===4){return B.nodeValue}}}else{for(z=0;(A=B[z]);z++){if(A.nodeType!==8){y+=b(A)}}}return y};var k=d.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")},type:function(e){return e.getAttribute("type")}},relative:{"+":function(D,y){var A=typeof y==="string",C=A&&!x.test(y),E=A&&!C;if(C){y=y.toLowerCase()}for(var z=0,e=D.length,B;z<e;z++){if((B=D[z])){while((B=B.previousSibling)&&B.nodeType!==1){}D[z]=E||B&&B.nodeName.toLowerCase()===y?B||false:B===y}}if(E){d.filter(y,D,true)}},">":function(D,y){var C,B=typeof y==="string",z=0,e=D.length;if(B&&!x.test(y)){y=y.toLowerCase();for(;z<e;z++){C=D[z];if(C){var A=C.parentNode;D[z]=A.nodeName.toLowerCase()===y?A:false}}}else{for(;z<e;z++){C=D[z];if(C){D[z]=B?C.parentNode:C.parentNode===y}}if(B){d.filter(y,D,true)}}},"":function(A,y,C){var B,z=o++,e=t;if(typeof y==="string"&&!x.test(y)){y=y.toLowerCase();B=y;e=a}e("parentNode",y,z,A,B,C)},"~":function(A,y,C){var B,z=o++,e=t;if(typeof y==="string"&&!x.test(y)){y=y.toLowerCase();B=y;e=a}e("previousSibling",y,z,A,B,C)}},find:{ID:function(y,z,A){if(typeof z.getElementById!=="undefined"&&!A){var e=z.getElementById(y[1]);return e&&e.parentNode?[e]:[]}},NAME:function(z,C){if(typeof C.getElementsByName!=="undefined"){var y=[],B=C.getElementsByName(z[1]);for(var A=0,e=B.length;A<e;A++){if(B[A].getAttribute("name")===z[1]){y.push(B[A])}}return y.length===0?null:y}},TAG:function(e,y){if(typeof y.getElementsByTagName!=="undefined"){return y.getElementsByTagName(e[1])}}},preFilter:{CLASS:function(A,y,z,e,D,E){A=" "+A[1].replace(q,"")+" ";if(E){return A}for(var B=0,C;(C=y[B])!=null;B++){if(C){if(D^(C.className&&(" "+C.className+" ").replace(/[\t\n\r]/g," ").indexOf(A)>=0)){if(!z){e.push(C)}}else{if(z){y[B]=false}}}}return false},ID:function(e){return e[1].replace(q,"")},TAG:function(y,e){return y[1].replace(q,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){d.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var y=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(y[1]+(y[2]||1))-0;e[3]=y[3]-0}else{if(e[2]){d.error(e[0])}}e[0]=o++;return e},ATTR:function(B,y,z,e,C,D){var A=B[1]=B[1].replace(q,"");if(!D&&k.attrMap[A]){B[1]=k.attrMap[A]}B[4]=(B[4]||B[5]||"").replace(q,"");if(B[2]==="~="){B[4]=" "+B[4]+" "}return B},PSEUDO:function(B,y,z,e,C){if(B[1]==="not"){if((n.exec(B[3])||"").length>1||/^\w/.test(B[3])){B[3]=d(B[3],null,null,y)}else{var A=d.filter(B[3],y,z,true^C);if(!z){e.push.apply(e,A)}return false}}else{if(k.match.POS.test(B[0])||k.match.CHILD.test(B[0])){return true}}return B},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(z,y,e){return !!d(e[3],z).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(z){var e=z.getAttribute("type"),y=z.type;return z.nodeName.toLowerCase()==="input"&&"text"===y&&(e===y||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(y){var e=y.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===y.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(y){var e=y.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===y.type},button:function(y){var e=y.nodeName.toLowerCase();return e==="input"&&"button"===y.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(y,e){return e===0},last:function(z,y,e,A){return y===A.length-1},even:function(y,e){return e%2===0},odd:function(y,e){return e%2===1},lt:function(z,y,e){return y<e[3]-0},gt:function(z,y,e){return y>e[3]-0},nth:function(z,y,e){return e[3]-0===y},eq:function(z,y,e){return e[3]-0===y}},filter:{PSEUDO:function(z,E,D,F){var e=E[1],y=k.filters[e];if(y){return y(z,D,E,F)}else{if(e==="contains"){return(z.textContent||z.innerText||b([z])||"").indexOf(E[3])>=0}else{if(e==="not"){var A=E[3];for(var C=0,B=A.length;C<B;C++){if(A[C]===z){return false}}return true}else{d.error(e)}}}},CHILD:function(z,B){var A,H,D,G,e,C,F,E=B[1],y=z;switch(E){case"only":case"first":while((y=y.previousSibling)){if(y.nodeType===1){return false}}if(E==="first"){return true}y=z;case"last":while((y=y.nextSibling)){if(y.nodeType===1){return false}}return true;case"nth":A=B[2];H=B[3];if(A===1&&H===0){return true}D=B[0];G=z.parentNode;if(G&&(G[i]!==D||!z.nodeIndex)){C=0;for(y=G.firstChild;y;y=y.nextSibling){if(y.nodeType===1){y.nodeIndex=++C}}G[i]=D}F=z.nodeIndex-H;if(A===0){return F===0}else{return(F%A===0&&F/A>=0)}}},ID:function(y,e){return y.nodeType===1&&y.getAttribute("id")===e},TAG:function(y,e){return(e==="*"&&y.nodeType===1)||!!y.nodeName&&y.nodeName.toLowerCase()===e},CLASS:function(y,e){return(" "+(y.className||y.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(C,A){var z=A[1],e=d.attr?d.attr(C,z):k.attrHandle[z]?k.attrHandle[z](C):C[z]!=null?C[z]:C.getAttribute(z),D=e+"",B=A[2],y=A[4];return e==null?B==="!=":!B&&d.attr?e!=null:B==="="?D===y:B==="*="?D.indexOf(y)>=0:B==="~="?(" "+D+" ").indexOf(y)>=0:!y?D&&e!==false:B==="!="?D!==y:B==="^="?D.indexOf(y)===0:B==="$="?D.substr(D.length-y.length)===y:B==="|="?D===y||D.substr(0,y.length+1)===y+"-":false},POS:function(B,y,z,C){var e=y[2],A=k.setFilters[e];if(A){return A(B,z,y,C)}}}};var j=k.match.POS,c=function(y,e){return"\\"+(e-0+1)};for(var f in k.match){k.match[f]=new RegExp(k.match[f].source+(/(?![^\[]*\])(?![^\(]*\))/.source));k.leftMatch[f]=new RegExp(/(^(?:.|\r|\n)*?)/.source+k.match[f].source.replace(/\\(\d+)/g,c))}k.match.globalPOS=j;var l=function(y,e){y=Array.prototype.slice.call(y,0);if(e){e.push.apply(e,y);return e}return y};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType}catch(v){l=function(B,A){var z=0,y=A||[];if(r.call(B)==="[object Array]"){Array.prototype.push.apply(y,B)}else{if(typeof B.length==="number"){for(var e=B.length;z<e;z++){y.push(B[z])}}else{for(;B[z];z++){y.push(B[z])}}}return y}}var p,m;if(document.documentElement.compareDocumentPosition){p=function(y,e){if(y===e){h=true;return 0}if(!y.compareDocumentPosition||!e.compareDocumentPosition){return y.compareDocumentPosition?-1:1}return y.compareDocumentPosition(e)&4?-1:1}}else{p=function(F,E){if(F===E){h=true;return 0}else{if(F.sourceIndex&&E.sourceIndex){return F.sourceIndex-E.sourceIndex}}var C,y,z=[],e=[],B=F.parentNode,D=E.parentNode,G=B;if(B===D){return m(F,E)}else{if(!B){return -1}else{if(!D){return 1}}}while(G){z.unshift(G);G=G.parentNode}G=D;while(G){e.unshift(G);G=G.parentNode}C=z.length;y=e.length;for(var A=0;A<C&&A<y;A++){if(z[A]!==e[A]){return m(z[A],e[A])}}return A===C?m(F,e[A],-1):m(z[A],E,1)};m=function(y,e,z){if(y===e){return z}var A=y.nextSibling;while(A){if(A===e){return -1}A=A.nextSibling}return 1}}(function(){var y=document.createElement("div"),z="script"+(new Date()).getTime(),e=document.documentElement;y.innerHTML="<a name='"+z+"'/>";e.insertBefore(y,e.firstChild);if(document.getElementById(z)){k.find.ID=function(B,C,D){if(typeof C.getElementById!=="undefined"&&!D){var A=C.getElementById(B[1]);return A?A.id===B[1]||typeof A.getAttributeNode!=="undefined"&&A.getAttributeNode("id").nodeValue===B[1]?[A]:undefined:[]}};k.filter.ID=function(C,A){var B=typeof C.getAttributeNode!=="undefined"&&C.getAttributeNode("id");return C.nodeType===1&&B&&B.nodeValue===A}}e.removeChild(y);e=y=null})();(function(){var e=document.createElement("div");e.appendChild(document.createComment(""));if(e.getElementsByTagName("*").length>0){k.find.TAG=function(y,C){var B=C.getElementsByTagName(y[1]);if(y[1]==="*"){var A=[];for(var z=0;B[z];z++){if(B[z].nodeType===1){A.push(B[z])}}B=A}return B}}e.innerHTML="<a href='#'></a>";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){k.attrHandle.href=function(y){return y.getAttribute("href",2)}}e=null})();if(document.querySelectorAll){(function(){var e=d,A=document.createElement("div"),z="__sizzle__";A.innerHTML="<p class='TEST'></p>";if(A.querySelectorAll&&A.querySelectorAll(".TEST").length===0){return}d=function(L,C,G,K){C=C||document;if(!K&&!d.isXML(C)){var J=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(L);if(J&&(C.nodeType===1||C.nodeType===9)){if(J[1]){return l(C.getElementsByTagName(L),G)}else{if(J[2]&&k.find.CLASS&&C.getElementsByClassName){return l(C.getElementsByClassName(J[2]),G)}}}if(C.nodeType===9){if(L==="body"&&C.body){return l([C.body],G)}else{if(J&&J[3]){var F=C.getElementById(J[3]);if(F&&F.parentNode){if(F.id===J[3]){return l([F],G)}}else{return l([],G)}}}try{return l(C.querySelectorAll(L),G)}catch(H){}}else{if(C.nodeType===1&&C.nodeName.toLowerCase()!=="object"){var D=C,E=C.getAttribute("id"),B=E||z,N=C.parentNode,M=/^\s*[+~]/.test(L);if(!E){C.setAttribute("id",B)}else{B=B.replace(/'/g,"\\$&")}if(M&&N){C=C.parentNode}try{if(!M||N){return l(C.querySelectorAll("[id='"+B+"'] "+L),G)}}catch(I){}finally{if(!E){D.removeAttribute("id")}}}}}return e(L,C,G,K)};for(var y in e){d[y]=e[y]}A=null})()}(function(){var e=document.documentElement,z=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(z){var B=!z.call(document.createElement("div"),"div"),y=false;try{z.call(document.documentElement,"[test!='']:sizzle")}catch(A){y=true}d.matchesSelector=function(D,F){F=F.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!d.isXML(D)){try{if(y||!k.match.PSEUDO.test(F)&&!/!=/.test(F)){var C=z.call(D,F);if(C||!B||D.document&&D.document.nodeType!==11){return C}}}catch(E){}}return d(F,null,null,[D]).length>0}}})();(function(){var e=document.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}k.order.splice(1,0,"CLASS");k.find.CLASS=function(y,z,A){if(typeof z.getElementsByClassName!=="undefined"&&!A){return z.getElementsByClassName(y[1])}};e=null})();function a(y,D,C,G,E,F){for(var A=0,z=G.length;A<z;A++){var e=G[A];if(e){var B=false;e=e[y];while(e){if(e[i]===C){B=G[e.sizset];break}if(e.nodeType===1&&!F){e[i]=C;e.sizset=A}if(e.nodeName.toLowerCase()===D){B=e;break}e=e[y]}G[A]=B}}}function t(y,D,C,G,E,F){for(var A=0,z=G.length;A<z;A++){var e=G[A];if(e){var B=false;e=e[y];while(e){if(e[i]===C){B=G[e.sizset];break}if(e.nodeType===1){if(!F){e[i]=C;e.sizset=A}if(typeof D!=="string"){if(e===D){B=true;break}}else{if(d.filter(D,[e]).length>0){B=e;break}}}e=e[y]}G[A]=B}}}if(document.documentElement.contains){d.contains=function(y,e){return y!==e&&(y.contains?y.contains(e):true)}}else{if(document.documentElement.compareDocumentPosition){d.contains=function(y,e){return !!(y.compareDocumentPosition(e)&16)}}else{d.contains=function(){return false}}}d.isXML=function(e){var y=(e?e.ownerDocument||e:0).documentElement;return y?y.nodeName!=="HTML":false};var s=function(z,e,D){var C,E=[],B="",F=e.nodeType?[e]:e;while((C=k.match.PSEUDO.exec(z))){B+=C[0];z=z.replace(k.match.PSEUDO,"")}z=k.relative[z]?z+"*":z;for(var A=0,y=F.length;A<y;A++){d(z,F[A],E,D)}return d.filter(B,E)};window.tinymce.dom.Sizzle=d})();(function(a){a.dom.Element=function(f,d){var b=this,e,c;b.settings=d=d||{};b.id=f;b.dom=e=d.dom||a.DOM;if(!a.isIE){c=e.get(b.id)}a.each(("getPos,getRect,getParent,add,setStyle,getStyle,setStyles,setAttrib,setAttribs,getAttrib,addClass,removeClass,hasClass,getOuterHTML,setOuterHTML,remove,show,hide,isHidden,setHTML,get").split(/,/),function(g){b[g]=function(){var h=[f],j;for(j=0;j<arguments.length;j++){h.push(arguments[j])}h=e[g].apply(e,h);b.update(g);return h}});a.extend(b,{on:function(i,h,g){return a.dom.Event.add(b.id,i,h,g)},getXY:function(){return{x:parseInt(b.getStyle("left")),y:parseInt(b.getStyle("top"))}},getSize:function(){var g=e.get(b.id);return{w:parseInt(b.getStyle("width")||g.clientWidth),h:parseInt(b.getStyle("height")||g.clientHeight)}},moveTo:function(g,h){b.setStyles({left:g,top:h})},moveBy:function(g,i){var h=b.getXY();b.moveTo(h.x+g,h.y+i)},resizeTo:function(g,i){b.setStyles({width:g,height:i})},resizeBy:function(g,j){var i=b.getSize();b.resizeTo(i.w+g,i.h+j)},update:function(h){var g;if(a.isIE6&&d.blocker){h=h||"";if(h.indexOf("get")===0||h.indexOf("has")===0||h.indexOf("is")===0){return}if(h=="remove"){e.remove(b.blocker);return}if(!b.blocker){b.blocker=e.uniqueId();g=e.add(d.container||e.getRoot(),"iframe",{id:b.blocker,style:"position:absolute;",frameBorder:0,src:'javascript:""'});e.setStyle(g,"opacity",0)}else{g=e.get(b.blocker)}e.setStyles(g,{left:b.getStyle("left",1),top:b.getStyle("top",1),width:b.getStyle("width",1),height:b.getStyle("height",1),display:b.getStyle("display",1),zIndex:parseInt(b.getStyle("zIndex",1)||0)-1})}}})}})(tinymce);(function(d){function f(g){return g.replace(/[\n\r]+/g,"")}var c=d.is,b=d.isIE,e=d.each,a=d.dom.TreeWalker;d.create("tinymce.dom.Selection",{Selection:function(k,j,i,h){var g=this;g.dom=k;g.win=j;g.serializer=i;g.editor=h;e(["onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent"],function(l){g[l]=new d.util.Dispatcher(g)});if(!g.win.getSelection){g.tridentSel=new d.dom.TridentSelection(g)}if(d.isIE&&k.boxModel){this._fixIESelection()}d.addUnload(g.destroy,g)},setCursorLocation:function(i,j){var g=this;var h=g.dom.createRng();h.setStart(i,j);h.setEnd(i,j);g.setRng(h);g.collapse(false)},getContent:function(h){var g=this,i=g.getRng(),m=g.dom.create("body"),k=g.getSel(),j,l,o;h=h||{};j=l="";h.get=true;h.format=h.format||"html";h.forced_root_block="";g.onBeforeGetContent.dispatch(g,h);if(h.format=="text"){return g.isCollapsed()?"":(i.text||(k.toString?k.toString():""))}if(i.cloneContents){o=i.cloneContents();if(o){m.appendChild(o)}}else{if(c(i.item)||c(i.htmlText)){m.innerHTML="<br>"+(i.item?i.item(0).outerHTML:i.htmlText);m.removeChild(m.firstChild)}else{m.innerHTML=i.toString()}}if(/^\s/.test(m.innerHTML)){j=" "}if(/\s+$/.test(m.innerHTML)){l=" "}h.getInner=true;h.content=g.isCollapsed()?"":j+g.serializer.serialize(m,h)+l;g.onGetContent.dispatch(g,h);return h.content},setContent:function(h,j){var o=this,g=o.getRng(),k,l=o.win.document,n,m;j=j||{format:"html"};j.set=true;h=j.content=h;if(!j.no_events){o.onBeforeSetContent.dispatch(o,j)}h=j.content;if(g.insertNode){h+='<span id="__caret">_</span>';if(g.startContainer==l&&g.endContainer==l){l.body.innerHTML=h}else{g.deleteContents();if(l.body.childNodes.length===0){l.body.innerHTML=h}else{if(g.createContextualFragment){g.insertNode(g.createContextualFragment(h))}else{n=l.createDocumentFragment();m=l.createElement("div");n.appendChild(m);m.outerHTML=h;g.insertNode(n)}}}k=o.dom.get("__caret");g=l.createRange();g.setStartBefore(k);g.setEndBefore(k);o.setRng(g);o.dom.remove("__caret");try{o.setRng(g)}catch(i){}}else{if(g.item){l.execCommand("Delete",false,null);g=o.getRng()}if(/^\s+/.test(h)){g.pasteHTML('<span id="__mce_tmp">_</span>'+h);o.dom.remove("__mce_tmp")}else{g.pasteHTML(h)}}if(!j.no_events){o.onSetContent.dispatch(o,j)}},getStart:function(){var h=this.getRng(),i,g,k,j;if(h.duplicate||h.item){if(h.item){return h.item(0)}k=h.duplicate();k.collapse(1);i=k.parentElement();g=j=h.parentElement();while(j=j.parentNode){if(j==i){i=g;break}}return i}else{i=h.startContainer;if(i.nodeType==1&&i.hasChildNodes()){i=i.childNodes[Math.min(i.childNodes.length-1,h.startOffset)]}if(i&&i.nodeType==3){return i.parentNode}return i}},getEnd:function(){var h=this,i=h.getRng(),j,g;if(i.duplicate||i.item){if(i.item){return i.item(0)}i=i.duplicate();i.collapse(0);j=i.parentElement();if(j&&j.nodeName=="BODY"){return j.lastChild||j}return j}else{j=i.endContainer;g=i.endOffset;if(j.nodeType==1&&j.hasChildNodes()){j=j.childNodes[g>0?g-1:g]}if(j&&j.nodeType==3){return j.parentNode}return j}},getBookmark:function(s,v){var y=this,n=y.dom,h,k,j,o,i,p,q,m="\uFEFF",x;function g(z,A){var t=0;e(n.select(z),function(C,B){if(C==A){t=B}});return t}function u(t){function z(E){var A,D,C,B=E?"start":"end";A=t[B+"Container"];D=t[B+"Offset"];if(A.nodeType==1&&A.nodeName=="TR"){C=A.childNodes;A=C[Math.min(E?D:D-1,C.length-1)];if(A){D=E?0:A.childNodes.length;t["set"+(E?"Start":"End")](A,D)}}}z(true);z();return t}function l(){var z=y.getRng(true),t=n.getRoot(),A={};function B(E,J){var D=E[J?"startContainer":"endContainer"],I=E[J?"startOffset":"endOffset"],C=[],F,H,G=0;if(D.nodeType==3){if(v){for(F=D.previousSibling;F&&F.nodeType==3;F=F.previousSibling){I+=F.nodeValue.length}}C.push(I)}else{H=D.childNodes;if(I>=H.length&&H.length){G=1;I=Math.max(0,H.length-1)}C.push(y.dom.nodeIndex(H[I],v)+G)}for(;D&&D!=t;D=D.parentNode){C.push(y.dom.nodeIndex(D,v))}return C}A.start=B(z,true);if(!y.isCollapsed()){A.end=B(z)}return A}if(s==2){if(y.tridentSel){return y.tridentSel.getBookmark(s)}return l()}if(s){return{rng:y.getRng()}}h=y.getRng();j=n.uniqueId();o=tinyMCE.activeEditor.selection.isCollapsed();x="overflow:hidden;line-height:0px";if(h.duplicate||h.item){if(!h.item){k=h.duplicate();try{h.collapse();h.pasteHTML('<span data-mce-type="bookmark" id="'+j+'_start" style="'+x+'">'+m+"</span>");if(!o){k.collapse(false);h.moveToElementText(k.parentElement());if(h.compareEndPoints("StartToEnd",k)===0){k.move("character",-1)}k.pasteHTML('<span data-mce-type="bookmark" id="'+j+'_end" style="'+x+'">'+m+"</span>")}}catch(r){return null}}else{p=h.item(0);i=p.nodeName;return{name:i,index:g(i,p)}}}else{p=y.getNode();i=p.nodeName;if(i=="IMG"){return{name:i,index:g(i,p)}}k=u(h.cloneRange());if(!o){k.collapse(false);k.insertNode(n.create("span",{"data-mce-type":"bookmark",id:j+"_end",style:x},m))}h=u(h);h.collapse(true);h.insertNode(n.create("span",{"data-mce-type":"bookmark",id:j+"_start",style:x},m))}y.moveToBookmark({id:j,keep:1});return{id:j}},moveToBookmark:function(o){var s=this,m=s.dom,j,i,g,r,k,u,p,q;function h(A){var t=o[A?"start":"end"],x,y,z,v;if(t){z=t[0];for(y=r,x=t.length-1;x>=1;x--){v=y.childNodes;if(t[x]>v.length-1){return}y=v[t[x]]}if(y.nodeType===3){z=Math.min(t[0],y.nodeValue.length)}if(y.nodeType===1){z=Math.min(t[0],y.childNodes.length)}if(A){g.setStart(y,z)}else{g.setEnd(y,z)}}return true}function l(B){var v=m.get(o.id+"_"+B),A,t,y,z,x=o.keep;if(v){A=v.parentNode;if(B=="start"){if(!x){t=m.nodeIndex(v)}else{A=v.firstChild;t=1}k=u=A;p=q=t}else{if(!x){t=m.nodeIndex(v)}else{A=v.firstChild;t=1}u=A;q=t}if(!x){z=v.previousSibling;y=v.nextSibling;e(d.grep(v.childNodes),function(C){if(C.nodeType==3){C.nodeValue=C.nodeValue.replace(/\uFEFF/g,"")}});while(v=m.get(o.id+"_"+B)){m.remove(v,1)}if(z&&y&&z.nodeType==y.nodeType&&z.nodeType==3&&!d.isOpera){t=z.nodeValue.length;z.appendData(y.nodeValue);m.remove(y);if(B=="start"){k=u=z;p=q=t}else{u=z;q=t}}}}}function n(t){if(m.isBlock(t)&&!t.innerHTML&&!b){t.innerHTML='<br data-mce-bogus="1" />'}return t}if(o){if(o.start){g=m.createRng();r=m.getRoot();if(s.tridentSel){return s.tridentSel.moveToBookmark(o)}if(h(true)&&h()){s.setRng(g)}}else{if(o.id){l("start");l("end");if(k){g=m.createRng();g.setStart(n(k),p);g.setEnd(n(u),q);s.setRng(g)}}else{if(o.name){s.select(m.select(o.name)[o.index])}else{if(o.rng){s.setRng(o.rng)}}}}}},select:function(l,k){var j=this,m=j.dom,h=m.createRng(),g;function i(n,p){var o=new a(n,n);do{if(n.nodeType==3&&d.trim(n.nodeValue).length!==0){if(p){h.setStart(n,0)}else{h.setEnd(n,n.nodeValue.length)}return}if(n.nodeName=="BR"){if(p){h.setStartBefore(n)}else{h.setEndBefore(n)}return}}while(n=(p?o.next():o.prev()))}if(l){g=m.nodeIndex(l);h.setStart(l.parentNode,g);h.setEnd(l.parentNode,g+1);if(k){i(l,1);i(l)}j.setRng(h)}return l},isCollapsed:function(){var g=this,i=g.getRng(),h=g.getSel();if(!i||i.item){return false}if(i.compareEndPoints){return i.compareEndPoints("StartToEnd",i)===0}return !h||i.collapsed},collapse:function(g){var i=this,h=i.getRng(),j;if(h.item){j=h.item(0);h=i.win.document.body.createTextRange();h.moveToElementText(j)}h.collapse(!!g);i.setRng(h)},getSel:function(){var h=this,g=this.win;return g.getSelection?g.getSelection():g.document.selection},getRng:function(m){var h=this,j,g,l,k=h.win.document;if(m&&h.tridentSel){return h.tridentSel.getRangeAt(0)}try{if(j=h.getSel()){g=j.rangeCount>0?j.getRangeAt(0):(j.createRange?j.createRange():k.createRange())}}catch(i){}if(d.isIE&&g&&g.setStart&&k.selection.createRange().item){l=k.selection.createRange().item(0);g=k.createRange();g.setStartBefore(l);g.setEndAfter(l)}if(!g){g=k.createRange?k.createRange():k.body.createTextRange()}if(g.setStart&&g.startContainer.nodeType===9&&g.collapsed){l=h.dom.getRoot();g.setStart(l,0);g.setEnd(l,0)}if(h.selectedRange&&h.explicitRange){if(g.compareBoundaryPoints(g.START_TO_START,h.selectedRange)===0&&g.compareBoundaryPoints(g.END_TO_END,h.selectedRange)===0){g=h.explicitRange}else{h.selectedRange=null;h.explicitRange=null}}return g},setRng:function(k,g){var j,i=this;if(!i.tridentSel){j=i.getSel();if(j){i.explicitRange=k;try{j.removeAllRanges()}catch(h){}j.addRange(k);if(g===false&&j.extend){j.collapse(k.endContainer,k.endOffset);j.extend(k.startContainer,k.startOffset)}i.selectedRange=j.rangeCount>0?j.getRangeAt(0):null}}else{if(k.cloneRange){try{i.tridentSel.addRange(k);return}catch(h){}}try{k.select()}catch(h){}}},setNode:function(h){var g=this;g.setContent(g.dom.getOuterHTML(h));return h},getNode:function(){var i=this,h=i.getRng(),j=i.getSel(),m,l=h.startContainer,g=h.endContainer;function k(q,o){var p=q;while(q&&q.nodeType===3&&q.length===0){q=o?q.nextSibling:q.previousSibling}return q||p}if(!h){return i.dom.getRoot()}if(h.setStart){m=h.commonAncestorContainer;if(!h.collapsed){if(h.startContainer==h.endContainer){if(h.endOffset-h.startOffset<2){if(h.startContainer.hasChildNodes()){m=h.startContainer.childNodes[h.startOffset]}}}if(l.nodeType===3&&g.nodeType===3){if(l.length===h.startOffset){l=k(l.nextSibling,true)}else{l=l.parentNode}if(h.endOffset===0){g=k(g.previousSibling,false)}else{g=g.parentNode}if(l&&l===g){return l}}}if(m&&m.nodeType==3){return m.parentNode}return m}return h.item?h.item(0):h.parentElement()},getSelectedBlocks:function(p,h){var o=this,k=o.dom,m,l,i,j=[];m=k.getParent(p||o.getStart(),k.isBlock);l=k.getParent(h||o.getEnd(),k.isBlock);if(m){j.push(m)}if(m&&l&&m!=l){i=m;var g=new a(m,k.getRoot());while((i=g.next())&&i!=l){if(k.isBlock(i)){j.push(i)}}}if(l&&m!=l){j.push(l)}return j},isForward:function(){var i=this.dom,g=this.getSel(),j,h;if(!g||g.anchorNode==null||g.focusNode==null){return true}j=i.createRng();j.setStart(g.anchorNode,g.anchorOffset);j.collapse(true);h=i.createRng();h.setStart(g.focusNode,g.focusOffset);h.collapse(true);return j.compareBoundaryPoints(j.START_TO_START,h)<=0},normalize:function(){var h=this,g,m,l,j,i;function k(p){var o,r,n,s=h.dom,u=s.getRoot(),q,t,v;function y(z,A){var B=new a(z,s.getParent(z.parentNode,s.isBlock)||u);while(z=B[A?"prev":"next"]()){if(z.nodeName==="BR"){return true}}}function x(B,z){var C,A;z=z||o;C=new a(z,s.getParent(z.parentNode,s.isBlock)||u);while(q=C[B?"prev":"next"]()){if(q.nodeType===3&&q.nodeValue.length>0){o=q;r=B?q.nodeValue.length:0;m=true;return}if(s.isBlock(q)||t[q.nodeName.toLowerCase()]){return}A=q}if(l&&A){o=A;m=true;r=0}}o=g[(p?"start":"end")+"Container"];r=g[(p?"start":"end")+"Offset"];t=s.schema.getNonEmptyElements();if(o.nodeType===9){o=s.getRoot();r=0}if(o===u){if(p){q=o.childNodes[r>0?r-1:0];if(q){v=q.nodeName.toLowerCase();if(t[q.nodeName]||q.nodeName=="TABLE"){return}}}if(o.hasChildNodes()){o=o.childNodes[Math.min(!p&&r>0?r-1:r,o.childNodes.length-1)];r=0;if(o.hasChildNodes()&&!/TABLE/.test(o.nodeName)){q=o;n=new a(o,u);do{if(q.nodeType===3&&q.nodeValue.length>0){r=p?0:q.nodeValue.length;o=q;m=true;break}if(t[q.nodeName.toLowerCase()]){r=s.nodeIndex(q);o=q.parentNode;if(q.nodeName=="IMG"&&!p){r++}m=true;break}}while(q=(p?n.next():n.prev()))}}}if(l){if(o.nodeType===3&&r===0){x(true)}if(o.nodeType===1){q=o.childNodes[r];if(q&&q.nodeName==="BR"&&!y(q)&&!y(q,true)){x(true,o.childNodes[r])}}}if(p&&!l&&o.nodeType===3&&r===o.nodeValue.length){x(false)}if(m){g["set"+(p?"Start":"End")](o,r)}}if(d.isIE){return}g=h.getRng();l=g.collapsed;k(true);if(!l){k()}if(m){if(l){g.collapse(true)}h.setRng(g,h.isForward())}},selectorChanged:function(g,j){var h=this,i;if(!h.selectorChangedData){h.selectorChangedData={};i={};h.editor.onNodeChange.addToTop(function(l,k,o){var p=h.dom,m=p.getParents(o,null,p.getRoot()),n={};e(h.selectorChangedData,function(r,q){e(m,function(s){if(p.is(s,q)){if(!i[q]){e(r,function(t){t(true,{node:s,selector:q,parents:m})});i[q]=r}n[q]=r;return false}})});e(i,function(r,q){if(!n[q]){delete i[q];e(r,function(s){s(false,{node:o,selector:q,parents:m})})}})})}if(!h.selectorChangedData[g]){h.selectorChangedData[g]=[]}h.selectorChangedData[g].push(j);return h},destroy:function(h){var g=this;g.win=null;if(!h){d.removeUnload(g.destroy)}},_fixIESelection:function(){var h=this.dom,n=h.doc,i=n.body,k,o,g;function j(p,s){var q=i.createTextRange();try{q.moveToPoint(p,s)}catch(r){q=null}return q}function m(q){var p;if(q.button){p=j(q.x,q.y);if(p){if(p.compareEndPoints("StartToStart",o)>0){p.setEndPoint("StartToStart",o)}else{p.setEndPoint("EndToEnd",o)}p.select()}}else{l()}}function l(){var p=n.selection.createRange();if(o&&!p.item&&p.compareEndPoints("StartToEnd",p)===0){o.select()}h.unbind(n,"mouseup",l);h.unbind(n,"mousemove",m);o=k=0}n.documentElement.unselectable=true;h.bind(n,["mousedown","contextmenu"],function(p){if(p.target.nodeName==="HTML"){if(k){l()}g=n.documentElement;if(g.scrollHeight>g.clientHeight){return}k=1;o=j(p.x,p.y);if(o){h.bind(n,"mouseup",l);h.bind(n,"mousemove",m);h.win.focus();o.select()}}})}})})(tinymce);(function(a){a.dom.Serializer=function(e,i,f){var h,b,d=a.isIE,g=a.each,c;if(!e.apply_source_formatting){e.indent=false}i=i||a.DOM;f=f||new a.html.Schema(e);e.entity_encoding=e.entity_encoding||"named";e.remove_trailing_brs="remove_trailing_brs" in e?e.remove_trailing_brs:true;h=new a.util.Dispatcher(self);b=new a.util.Dispatcher(self);c=new a.html.DomParser(e,f);c.addAttributeFilter("src,href,style",function(k,j){var o=k.length,l,q,n="data-mce-"+j,p=e.url_converter,r=e.url_converter_scope,m;while(o--){l=k[o];q=l.attributes.map[n];if(q!==m){l.attr(j,q.length>0?q:null);l.attr(n,null)}else{q=l.attributes.map[j];if(j==="style"){q=i.serializeStyle(i.parseStyle(q),l.name)}else{if(p){q=p.call(r,q,j,l.name)}}l.attr(j,q.length>0?q:null)}}});c.addAttributeFilter("class",function(j,k){var l=j.length,m,n;while(l--){m=j[l];n=m.attr("class").replace(/(?:^|\s)mce(Item\w+|Selected)(?!\S)/g,"");m.attr("class",n.length>0?n:null)}});c.addAttributeFilter("data-mce-type",function(j,l,k){var m=j.length,n;while(m--){n=j[m];if(n.attributes.map["data-mce-type"]==="bookmark"&&!k.cleanup){n.remove()}}});c.addAttributeFilter("data-mce-expando",function(j,l,k){var m=j.length;while(m--){j[m].attr(l,null)}});c.addNodeFilter("script,style",function(k,l){var m=k.length,n,o;function j(p){return p.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}while(m--){n=k[m];o=n.firstChild?n.firstChild.value:"";if(l==="script"){n.attr("type",(n.attr("type")||"text/javascript").replace(/^mce\-/,""));if(o.length>0){n.firstChild.value="// <![CDATA[\n"+j(o)+"\n// ]]>"}}else{if(o.length>0){n.firstChild.value="<!--\n"+j(o)+"\n-->"}}}});c.addNodeFilter("#comment",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.value.indexOf("[CDATA[")===0){m.name="#cdata";m.type=4;m.value=m.value.replace(/^\[CDATA\[|\]\]$/g,"")}else{if(m.value.indexOf("mce:protected ")===0){m.name="#text";m.type=3;m.raw=true;m.value=unescape(m.value).substr(14)}}}});c.addNodeFilter("xml:namespace,input",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.type===7){m.remove()}else{if(m.type===1){if(k==="input"&&!("type" in m.attributes.map)){m.attr("type","text")}}}}});if(e.fix_list_elements){c.addNodeFilter("ul,ol",function(k,l){var m=k.length,n,j;while(m--){n=k[m];j=n.parent;if(j.name==="ul"||j.name==="ol"){if(n.prev&&n.prev.name==="li"){n.prev.append(n)}}}})}c.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style",function(j,k){var l=j.length;while(l--){j[l].attr(k,null)}});return{schema:f,addNodeFilter:c.addNodeFilter,addAttributeFilter:c.addAttributeFilter,onPreProcess:h,onPostProcess:b,serialize:function(o,m){var l,p,k,j,n;if(d&&i.select("script,style,select,map").length>0){n=o.innerHTML;o=o.cloneNode(false);i.setHTML(o,n)}else{o=o.cloneNode(true)}l=o.ownerDocument.implementation;if(l.createHTMLDocument){p=l.createHTMLDocument("");g(o.nodeName=="BODY"?o.childNodes:[o],function(q){p.body.appendChild(p.importNode(q,true))});if(o.nodeName!="BODY"){o=p.body.firstChild}else{o=p.body}k=i.doc;i.doc=p}m=m||{};m.format=m.format||"html";if(!m.no_events){m.node=o;h.dispatch(self,m)}j=new a.html.Serializer(e,f);m.content=j.serialize(c.parse(a.trim(m.getInner?o.innerHTML:i.getOuterHTML(o)),m));if(!m.cleanup){m.content=m.content.replace(/\uFEFF|\u200B/g,"")}if(!m.no_events){b.dispatch(self,m)}if(k){i.doc=k}m.node=null;return m.content},addRules:function(j){f.addValidElements(j)},setRules:function(j){f.setValidElements(j)}}}})(tinymce);(function(a){a.dom.ScriptLoader=function(h){var c=0,k=1,i=2,l={},j=[],e={},d=[],g=0,f;function b(m,v){var x=this,q=a.DOM,s,o,r,n;function p(){q.remove(n);if(s){s.onreadystatechange=s.onload=s=null}v()}function u(){if(typeof(console)!=="undefined"&&console.log){console.log("Failed to load: "+m)}}n=q.uniqueId();if(a.isIE6){o=new a.util.URI(m);r=location;if(o.host==r.hostname&&o.port==r.port&&(o.protocol+":")==r.protocol&&o.protocol.toLowerCase()!="file"){a.util.XHR.send({url:a._addVer(o.getURI()),success:function(y){var t=q.create("script",{type:"text/javascript"});t.text=y;document.getElementsByTagName("head")[0].appendChild(t);q.remove(t);p()},error:u});return}}s=document.createElement("script");s.id=n;s.type="text/javascript";s.src=a._addVer(m);if(!a.isIE){s.onload=p}s.onerror=u;if(!a.isOpera){s.onreadystatechange=function(){var t=s.readyState;if(t=="complete"||t=="loaded"){p()}}}(document.getElementsByTagName("head")[0]||document.body).appendChild(s)}this.isDone=function(m){return l[m]==i};this.markDone=function(m){l[m]=i};this.add=this.load=function(m,q,n){var o,p=l[m];if(p==f){j.push(m);l[m]=c}if(q){if(!e[m]){e[m]=[]}e[m].push({func:q,scope:n||this})}};this.loadQueue=function(n,m){this.loadScripts(j,n,m)};this.loadScripts=function(m,q,p){var o;function n(r){a.each(e[r],function(s){s.func.call(s.scope)});e[r]=f}d.push({func:q,scope:p||this});o=function(){var r=a.grep(m);m.length=0;a.each(r,function(s){if(l[s]==i){n(s);return}if(l[s]!=k){l[s]=k;g++;b(s,function(){l[s]=i;g--;n(s);o()})}});if(!g){a.each(d,function(s){s.func.call(s.scope)});d.length=0}};o()}};a.ScriptLoader=new a.dom.ScriptLoader()})(tinymce);(function(a){a.dom.RangeUtils=function(c){var b="\uFEFF";this.walk=function(d,s){var i=d.startContainer,l=d.startOffset,t=d.endContainer,m=d.endOffset,j,g,o,h,r,q,e;e=c.select("td.mceSelected,th.mceSelected");if(e.length>0){a.each(e,function(u){s([u])});return}function f(u){var v;v=u[0];if(v.nodeType===3&&v===i&&l>=v.nodeValue.length){u.splice(0,1)}v=u[u.length-1];if(m===0&&u.length>0&&v===t&&v.nodeType===3){u.splice(u.length-1,1)}return u}function p(x,v,u){var y=[];for(;x&&x!=u;x=x[v]){y.push(x)}return y}function n(v,u){do{if(v.parentNode==u){return v}v=v.parentNode}while(v)}function k(x,v,y){var u=y?"nextSibling":"previousSibling";for(h=x,r=h.parentNode;h&&h!=v;h=r){r=h.parentNode;q=p(h==x?h:h[u],u);if(q.length){if(!y){q.reverse()}s(f(q))}}}if(i.nodeType==1&&i.hasChildNodes()){i=i.childNodes[l]}if(t.nodeType==1&&t.hasChildNodes()){t=t.childNodes[Math.min(m-1,t.childNodes.length-1)]}if(i==t){return s(f([i]))}j=c.findCommonAncestor(i,t);for(h=i;h;h=h.parentNode){if(h===t){return k(i,j,true)}if(h===j){break}}for(h=t;h;h=h.parentNode){if(h===i){return k(t,j)}if(h===j){break}}g=n(i,j)||i;o=n(t,j)||t;k(i,g,true);q=p(g==i?g:g.nextSibling,"nextSibling",o==t?o.nextSibling:o);if(q.length){s(f(q))}k(t,o)};this.split=function(e){var h=e.startContainer,d=e.startOffset,i=e.endContainer,g=e.endOffset;function f(j,k){return j.splitText(k)}if(h==i&&h.nodeType==3){if(d>0&&d<h.nodeValue.length){i=f(h,d);h=i.previousSibling;if(g>d){g=g-d;h=i=f(i,g).previousSibling;g=i.nodeValue.length;d=0}else{g=0}}}else{if(h.nodeType==3&&d>0&&d<h.nodeValue.length){h=f(h,d);d=0}if(i.nodeType==3&&g>0&&g<i.nodeValue.length){i=f(i,g).previousSibling;g=i.nodeValue.length}}return{startContainer:h,startOffset:d,endContainer:i,endOffset:g}}};a.dom.RangeUtils.compareRanges=function(c,b){if(c&&b){if(c.item||c.duplicate){if(c.item&&b.item&&c.item(0)===b.item(0)){return true}if(c.isEqual&&b.isEqual&&b.isEqual(c)){return true}}else{return c.startContainer==b.startContainer&&c.startOffset==b.startOffset}}return false}})(tinymce);(function(b){var a=b.dom.Event,c=b.each;b.create("tinymce.ui.KeyboardNavigation",{KeyboardNavigation:function(e,f){var q=this,n=e.root,m=e.items,o=e.enableUpDown,i=e.enableLeftRight||!e.enableUpDown,l=e.excludeFromTabOrder,k,h,p,d,g;f=f||b.DOM;k=function(r){g=r.target.id};h=function(r){f.setAttrib(r.target.id,"tabindex","-1")};d=function(r){var s=f.get(g);f.setAttrib(s,"tabindex","0");s.focus()};q.focus=function(){f.get(g).focus()};q.destroy=function(){c(m,function(s){var t=f.get(s.id);f.unbind(t,"focus",k);f.unbind(t,"blur",h)});var r=f.get(n);f.unbind(r,"focus",d);f.unbind(r,"keydown",p);m=f=n=q.focus=k=h=p=d=null;q.destroy=function(){}};q.moveFocus=function(v,s){var r=-1,u=q.controls,t;if(!g){return}c(m,function(y,x){if(y.id===g){r=x;return false}});r+=v;if(r<0){r=m.length-1}else{if(r>=m.length){r=0}}t=m[r];f.setAttrib(g,"tabindex","-1");f.setAttrib(t.id,"tabindex","0");f.get(t.id).focus();if(e.actOnFocus){e.onAction(t.id)}if(s){a.cancel(s)}};p=function(z){var v=37,u=39,y=38,A=40,r=27,t=14,s=13,x=32;switch(z.keyCode){case v:if(i){q.moveFocus(-1)}break;case u:if(i){q.moveFocus(1)}break;case y:if(o){q.moveFocus(-1)}break;case A:if(o){q.moveFocus(1)}break;case r:if(e.onCancel){e.onCancel();a.cancel(z)}break;case t:case s:case x:if(e.onAction){e.onAction(g);a.cancel(z)}break}};c(m,function(t,r){var s,u;if(!t.id){t.id=f.uniqueId("_mce_item_")}u=f.get(t.id);if(l){f.bind(u,"blur",h);s="-1"}else{s=(r===0?"0":"-1")}u.setAttribute("tabindex",s);f.bind(u,"focus",k)});if(m[0]){g=m[0].id}f.setAttrib(n,"tabindex","-1");var j=f.get(n);f.bind(j,"focus",d);f.bind(j,"keydown",p)}})})(tinymce);(function(c){var b=c.DOM,a=c.is;c.create("tinymce.ui.Control",{Control:function(f,e,d){this.id=f;this.settings=e=e||{};this.rendered=false;this.onRender=new c.util.Dispatcher(this);this.classPrefix="";this.scope=e.scope||this;this.disabled=0;this.active=0;this.editor=d},setAriaProperty:function(f,e){var d=b.get(this.id+"_aria")||b.get(this.id);if(d){b.setAttrib(d,"aria-"+f,!!e)}},focus:function(){b.get(this.id).focus()},setDisabled:function(d){if(d!=this.disabled){this.setAriaProperty("disabled",d);this.setState("Disabled",d);this.setState("Enabled",!d);this.disabled=d}},isDisabled:function(){return this.disabled},setActive:function(d){if(d!=this.active){this.setState("Active",d);this.active=d;this.setAriaProperty("pressed",d)}},isActive:function(){return this.active},setState:function(f,d){var e=b.get(this.id);f=this.classPrefix+f;if(d){b.addClass(e,f)}else{b.removeClass(e,f)}},isRendered:function(){return this.rendered},renderHTML:function(){},renderTo:function(d){b.setHTML(d,this.renderHTML())},postRender:function(){var e=this,d;if(a(e.disabled)){d=e.disabled;e.disabled=-1;e.setDisabled(d)}if(a(e.active)){d=e.active;e.active=-1;e.setActive(d)}},remove:function(){b.remove(this.id);this.destroy()},destroy:function(){c.dom.Event.clear(this.id)}})})(tinymce);tinymce.create("tinymce.ui.Container:tinymce.ui.Control",{Container:function(c,b,a){this.parent(c,b,a);this.controls=[];this.lookup={}},add:function(a){this.lookup[a.id]=a;this.controls.push(a);return a},get:function(a){return this.lookup[a]}});tinymce.create("tinymce.ui.Separator:tinymce.ui.Control",{Separator:function(b,a){this.parent(b,a);this.classPrefix="mceSeparator";this.setDisabled(true)},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix,role:"separator","aria-orientation":"vertical",tabindex:"-1"})}});(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.MenuItem:tinymce.ui.Control",{MenuItem:function(g,f){this.parent(g,f);this.classPrefix="mceMenuItem"},setSelected:function(f){this.setState("Selected",f);this.setAriaProperty("checked",!!f);this.selected=f},isSelected:function(){return this.selected},postRender:function(){var f=this;f.parent();if(c(f.selected)){f.setSelected(f.selected)}}})})(tinymce);(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(h,g){var f=this;f.parent(h,g);f.items={};f.collapsed=false;f.menuCount=0;f.onAddItem=new d.util.Dispatcher(this)},expand:function(g){var f=this;if(g){a(f,function(h){if(h.expand){h.expand()}},"items",f)}f.collapsed=false},collapse:function(g){var f=this;if(g){a(f,function(h){if(h.collapse){h.collapse()}},"items",f)}f.collapsed=true},isCollapsed:function(){return this.collapsed},add:function(f){if(!f.settings){f=new d.ui.MenuItem(f.id||b.uniqueId(),f)}this.onAddItem.dispatch(this,f);return this.items[f.id]=f},addSeparator:function(){return this.add({separator:true})},addMenu:function(f){if(!f.collapse){f=this.createMenu(f)}this.menuCount++;return this.add(f)},hasMenus:function(){return this.menuCount!==0},remove:function(f){delete this.items[f.id]},removeAll:function(){var f=this;a(f,function(g){if(g.removeAll){g.removeAll()}else{g.remove()}g.destroy()},"items",f);f.items={}},createMenu:function(g){var f=new d.ui.Menu(g.id||b.uniqueId(),g);f.onAddItem.add(this.onAddItem.dispatch,this.onAddItem);return f}})})(tinymce);(function(e){var d=e.is,c=e.DOM,f=e.each,a=e.dom.Event,b=e.dom.Element;e.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(h,g){g=g||{};g.container=g.container||c.doc.body;g.offset_x=g.offset_x||0;g.offset_y=g.offset_y||0;g.vp_offset_x=g.vp_offset_x||0;g.vp_offset_y=g.vp_offset_y||0;if(d(g.icons)&&!g.icons){g["class"]+=" mceNoIcons"}this.parent(h,g);this.onShowMenu=new e.util.Dispatcher(this);this.onHideMenu=new e.util.Dispatcher(this);this.classPrefix="mceMenu"},createMenu:function(j){var h=this,i=h.settings,g;j.container=j.container||i.container;j.parent=h;j.constrain=j.constrain||i.constrain;j["class"]=j["class"]||i["class"];j.vp_offset_x=j.vp_offset_x||i.vp_offset_x;j.vp_offset_y=j.vp_offset_y||i.vp_offset_y;j.keyboard_focus=i.keyboard_focus;g=new e.ui.DropMenu(j.id||c.uniqueId(),j);g.onAddItem.add(h.onAddItem.dispatch,h.onAddItem);return g},focus:function(){var g=this;if(g.keyboardNav){g.keyboardNav.focus()}},update:function(){var i=this,j=i.settings,g=c.get("menu_"+i.id+"_tbl"),l=c.get("menu_"+i.id+"_co"),h,k;h=j.max_width?Math.min(g.offsetWidth,j.max_width):g.offsetWidth;k=j.max_height?Math.min(g.offsetHeight,j.max_height):g.offsetHeight;if(!c.boxModel){i.element.setStyles({width:h+2,height:k+2})}else{i.element.setStyles({width:h,height:k})}if(j.max_width){c.setStyle(l,"width",h)}if(j.max_height){c.setStyle(l,"height",k);if(g.clientHeight<j.max_height){c.setStyle(l,"overflow","hidden")}}},showMenu:function(p,n,r){var z=this,A=z.settings,o,g=c.getViewPort(),u,l,v,q,i=2,k,j,m=z.classPrefix;z.collapse(1);if(z.isMenuVisible){return}if(!z.rendered){o=c.add(z.settings.container,z.renderNode());f(z.items,function(h){h.postRender()});z.element=new b("menu_"+z.id,{blocker:1,container:A.container})}else{o=c.get("menu_"+z.id)}if(!e.isOpera){c.setStyles(o,{left:-65535,top:-65535})}c.show(o);z.update();p+=A.offset_x||0;n+=A.offset_y||0;g.w-=4;g.h-=4;if(A.constrain){u=o.clientWidth-i;l=o.clientHeight-i;v=g.x+g.w;q=g.y+g.h;if((p+A.vp_offset_x+u)>v){p=r?r-u:Math.max(0,(v-A.vp_offset_x)-u)}if((n+A.vp_offset_y+l)>q){n=Math.max(0,(q-A.vp_offset_y)-l)}}c.setStyles(o,{left:p,top:n});z.element.update();z.isMenuVisible=1;z.mouseClickFunc=a.add(o,"click",function(s){var h;s=s.target;if(s&&(s=c.getParent(s,"tr"))&&!c.hasClass(s,m+"ItemSub")){h=z.items[s.id];if(h.isDisabled()){return}k=z;while(k){if(k.hideMenu){k.hideMenu()}k=k.settings.parent}if(h.settings.onclick){h.settings.onclick(s)}return false}});if(z.hasMenus()){z.mouseOverFunc=a.add(o,"mouseover",function(x){var h,t,s;x=x.target;if(x&&(x=c.getParent(x,"tr"))){h=z.items[x.id];if(z.lastMenu){z.lastMenu.collapse(1)}if(h.isDisabled()){return}if(x&&c.hasClass(x,m+"ItemSub")){t=c.getRect(x);h.showMenu((t.x+t.w-i),t.y-i,t.x);z.lastMenu=h;c.addClass(c.get(h.id).firstChild,m+"ItemActive")}}})}a.add(o,"keydown",z._keyHandler,z);z.onShowMenu.dispatch(z);if(A.keyboard_focus){z._setupKeyboardNav()}},hideMenu:function(j){var g=this,i=c.get("menu_"+g.id),h;if(!g.isMenuVisible){return}if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(i,"mouseover",g.mouseOverFunc);a.remove(i,"click",g.mouseClickFunc);a.remove(i,"keydown",g._keyHandler);c.hide(i);g.isMenuVisible=0;if(!j){g.collapse(1)}if(g.element){g.element.hide()}if(h=c.get(g.id)){c.removeClass(h.firstChild,g.classPrefix+"ItemActive")}g.onHideMenu.dispatch(g)},add:function(i){var g=this,h;i=g.parent(i);if(g.isRendered&&(h=c.get("menu_"+g.id))){g._add(c.select("tbody",h)[0],i)}return i},collapse:function(g){this.parent(g);this.hideMenu(1)},remove:function(g){c.remove(g.id);this.destroy();return this.parent(g)},destroy:function(){var g=this,h=c.get("menu_"+g.id);if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(h,"mouseover",g.mouseOverFunc);a.remove(c.select("a",h),"focus",g.mouseOverFunc);a.remove(h,"click",g.mouseClickFunc);a.remove(h,"keydown",g._keyHandler);if(g.element){g.element.remove()}c.remove(h)},renderNode:function(){var i=this,j=i.settings,l,h,k,g;g=c.create("div",{role:"listbox",id:"menu_"+i.id,"class":j["class"],style:"position:absolute;left:0;top:0;z-index:200000;outline:0"});if(i.settings.parent){c.setAttrib(g,"aria-parent","menu_"+i.settings.parent.id)}k=c.add(g,"div",{role:"presentation",id:"menu_"+i.id+"_co","class":i.classPrefix+(j["class"]?" "+j["class"]:"")});i.element=new b("menu_"+i.id,{blocker:1,container:j.container});if(j.menu_line){c.add(k,"span",{"class":i.classPrefix+"Line"})}l=c.add(k,"table",{role:"presentation",id:"menu_"+i.id+"_tbl",border:0,cellPadding:0,cellSpacing:0});h=c.add(l,"tbody");f(i.items,function(m){i._add(h,m)});i.rendered=true;return g},_setupKeyboardNav:function(){var i,h,g=this;i=c.get("menu_"+g.id);h=c.select("a[role=option]","menu_"+g.id);h.splice(0,0,i);g.keyboardNav=new e.ui.KeyboardNavigation({root:"menu_"+g.id,items:h,onCancel:function(){g.hideMenu()},enableUpDown:true});i.focus()},_keyHandler:function(g){var h=this,i;switch(g.keyCode){case 37:if(h.settings.parent){h.hideMenu();h.settings.parent.focus();a.cancel(g)}break;case 39:if(h.mouseOverFunc){h.mouseOverFunc(g)}break}},_add:function(j,h){var i,q=h.settings,p,l,k,m=this.classPrefix,g;if(q.separator){l=c.add(j,"tr",{id:h.id,"class":m+"ItemSeparator"});c.add(l,"td",{"class":m+"ItemSeparator"});if(i=l.previousSibling){c.addClass(i,"mceLast")}return}i=l=c.add(j,"tr",{id:h.id,"class":m+"Item "+m+"ItemEnabled"});i=k=c.add(i,q.titleItem?"th":"td");i=p=c.add(i,"a",{id:h.id+"_aria",role:q.titleItem?"presentation":"option",href:"javascript:;",onclick:"return false;",onmousedown:"return false;"});if(q.parent){c.setAttrib(p,"aria-haspopup","true");c.setAttrib(p,"aria-owns","menu_"+h.id)}c.addClass(k,q["class"]);g=c.add(i,"span",{"class":"mceIcon"+(q.icon?" mce_"+q.icon:"")});if(q.icon_src){c.add(g,"img",{src:q.icon_src})}i=c.add(i,q.element||"span",{"class":"mceText",title:h.settings.title},h.settings.title);if(h.settings.style){if(typeof h.settings.style=="function"){h.settings.style=h.settings.style()}c.setAttrib(i,"style",h.settings.style)}if(j.childNodes.length==1){c.addClass(l,"mceFirst")}if((i=l.previousSibling)&&c.hasClass(i,m+"ItemSeparator")){c.addClass(l,"mceFirst")}if(h.collapse){c.addClass(l,m+"ItemSub")}if(i=l.previousSibling){c.removeClass(i,"mceLast")}c.addClass(l,"mceLast")}})})(tinymce);(function(b){var a=b.DOM;b.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(e,d,c){this.parent(e,d,c);this.classPrefix="mceButton"},renderHTML:function(){var f=this.classPrefix,e=this.settings,d,c;c=a.encode(e.label||"");d='<a role="button" id="'+this.id+'" href="javascript:;" class="'+f+" "+f+"Enabled "+e["class"]+(c?" "+f+"Labeled":"")+'" onmousedown="return false;" onclick="return false;" aria-labelledby="'+this.id+'_voice" title="'+a.encode(e.title)+'">';if(e.image&&!(this.editor&&this.editor.forcedHighContrastMode)){d+='<img class="mceIcon" src="'+e.image+'" alt="'+a.encode(e.title)+'" />'+c}else{d+='<span class="mceIcon '+e["class"]+'"></span>'+(c?'<span class="'+f+'Label">'+c+"</span>":"")}d+='<span class="mceVoiceLabel mceIconOnly" style="display: none;" id="'+this.id+'_voice">'+e.title+"</span>";d+="</a>";return d},postRender:function(){var d=this,e=d.settings,c;if(b.isIE&&d.editor){b.dom.Event.add(d.id,"mousedown",function(f){var g=d.editor.selection.getNode().nodeName;c=g==="IMG"?d.editor.selection.getBookmark():null})}b.dom.Event.add(d.id,"click",function(f){if(!d.isDisabled()){if(b.isIE&&d.editor&&c!==null){d.editor.selection.moveToBookmark(c)}return e.onclick.call(e.scope,f)}});b.dom.Event.add(d.id,"keyup",function(f){if(!d.isDisabled()&&f.keyCode==b.VK.SPACEBAR){return e.onclick.call(e.scope,f)}})}})})(tinymce);(function(e){var d=e.DOM,b=e.dom.Event,f=e.each,a=e.util.Dispatcher,c;e.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(j,i,g){var h=this;h.parent(j,i,g);h.items=[];h.onChange=new a(h);h.onPostRender=new a(h);h.onAdd=new a(h);h.onRenderMenu=new e.util.Dispatcher(this);h.classPrefix="mceListBox";h.marked={}},select:function(h){var g=this,j,i;g.marked={};if(h==c){return g.selectByIndex(-1)}if(h&&typeof(h)=="function"){i=h}else{i=function(k){return k==h}}if(h!=g.selectedValue){f(g.items,function(l,k){if(i(l.value)){j=1;g.selectByIndex(k);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(g){var i=this,j,k,h;i.marked={};if(g!=i.selectedIndex){j=d.get(i.id+"_text");h=d.get(i.id+"_voiceDesc");k=i.items[g];if(k){i.selectedValue=k.value;i.selectedIndex=g;d.setHTML(j,d.encode(k.title));d.setHTML(h,i.settings.title+" - "+k.title);d.removeClass(j,"mceTitle");d.setAttrib(i.id,"aria-valuenow",k.title)}else{d.setHTML(j,d.encode(i.settings.title));d.setHTML(h,d.encode(i.settings.title));d.addClass(j,"mceTitle");i.selectedValue=i.selectedIndex=null;d.setAttrib(i.id,"aria-valuenow",i.settings.title)}j=0}},mark:function(g){this.marked[g]=true},add:function(j,g,i){var h=this;i=i||{};i=e.extend(i,{title:j,value:g});h.items.push(i);h.onAdd.dispatch(h,i)},getLength:function(){return this.items.length},renderHTML:function(){var j="",g=this,i=g.settings,k=g.classPrefix;j='<span role="listbox" aria-haspopup="true" aria-labelledby="'+g.id+'_voiceDesc" aria-describedby="'+g.id+'_voiceDesc"><table role="presentation" tabindex="0" id="'+g.id+'" cellpadding="0" cellspacing="0" class="'+k+" "+k+"Enabled"+(i["class"]?(" "+i["class"]):"")+'"><tbody><tr>';j+="<td>"+d.createHTML("span",{id:g.id+"_voiceDesc","class":"voiceLabel",style:"display:none;"},g.settings.title);j+=d.createHTML("a",{id:g.id+"_text",tabindex:-1,href:"javascript:;","class":"mceText",onclick:"return false;",onmousedown:"return false;"},d.encode(g.settings.title))+"</td>";j+="<td>"+d.createHTML("a",{id:g.id+"_open",tabindex:-1,href:"javascript:;","class":"mceOpen",onclick:"return false;",onmousedown:"return false;"},'<span><span style="display:none;" class="mceIconOnly" aria-hidden="true">\u25BC</span></span>')+"</td>";j+="</tr></tbody></table></span>";return j},showMenu:function(){var h=this,j,i=d.get(this.id),g;if(h.isDisabled()||h.items.length===0){return}if(h.menu&&h.menu.isMenuVisible){return h.hideMenu()}if(!h.isMenuRendered){h.renderMenu();h.isMenuRendered=true}j=d.getPos(i);g=h.menu;g.settings.offset_x=j.x;g.settings.offset_y=j.y;g.settings.keyboard_focus=!e.isOpera;f(h.items,function(k){if(g.items[k.id]){g.items[k.id].setSelected(0)}});f(h.items,function(k){if(g.items[k.id]&&h.marked[k.value]){g.items[k.id].setSelected(1)}if(k.value===h.selectedValue){g.items[k.id].setSelected(1)}});g.showMenu(0,i.clientHeight);b.add(d.doc,"mousedown",h.hideMenu,h);d.addClass(h.id,h.classPrefix+"Selected")},hideMenu:function(h){var g=this;if(g.menu&&g.menu.isMenuVisible){d.removeClass(g.id,g.classPrefix+"Selected");if(h&&h.type=="mousedown"&&(h.target.id==g.id+"_text"||h.target.id==g.id+"_open")){return}if(!h||!d.getParent(h.target,".mceMenu")){d.removeClass(g.id,g.classPrefix+"Selected");b.remove(d.doc,"mousedown",g.hideMenu,g);g.menu.hideMenu()}}},renderMenu:function(){var h=this,g;g=h.settings.control_manager.createDropMenu(h.id+"_menu",{menu_line:1,"class":h.classPrefix+"Menu mceNoIcons",max_width:250,max_height:150});g.onHideMenu.add(function(){h.hideMenu();h.focus()});g.add({title:h.settings.title,"class":"mceMenuItemTitle",onclick:function(){if(h.settings.onselect("")!==false){h.select("")}}});f(h.items,function(i){if(i.value===c){g.add({title:i.title,role:"option","class":"mceMenuItemTitle",onclick:function(){if(h.settings.onselect("")!==false){h.select("")}}})}else{i.id=d.uniqueId();i.role="option";i.onclick=function(){if(h.settings.onselect(i.value)!==false){h.select(i.value)}};g.add(i)}});h.onRenderMenu.dispatch(h,g);h.menu=g},postRender:function(){var g=this,h=g.classPrefix;b.add(g.id,"click",g.showMenu,g);b.add(g.id,"keydown",function(i){if(i.keyCode==32){g.showMenu(i);b.cancel(i)}});b.add(g.id,"focus",function(){if(!g._focused){g.keyDownHandler=b.add(g.id,"keydown",function(i){if(i.keyCode==40){g.showMenu();b.cancel(i)}});g.keyPressHandler=b.add(g.id,"keypress",function(j){var i;if(j.keyCode==13){i=g.selectedValue;g.selectedValue=null;b.cancel(j);g.settings.onselect(i)}})}g._focused=1});b.add(g.id,"blur",function(){b.remove(g.id,"keydown",g.keyDownHandler);b.remove(g.id,"keypress",g.keyPressHandler);g._focused=0});if(e.isIE6||!d.boxModel){b.add(g.id,"mouseover",function(){if(!d.hasClass(g.id,h+"Disabled")){d.addClass(g.id,h+"Hover")}});b.add(g.id,"mouseout",function(){if(!d.hasClass(g.id,h+"Disabled")){d.removeClass(g.id,h+"Hover")}})}g.onPostRender.dispatch(g,d.get(g.id))},destroy:function(){this.parent();b.clear(this.id+"_text");b.clear(this.id+"_open")}})})(tinymce);(function(e){var d=e.DOM,b=e.dom.Event,f=e.each,a=e.util.Dispatcher,c;e.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(h,g){this.parent(h,g);this.classPrefix="mceNativeListBox"},setDisabled:function(g){d.get(this.id).disabled=g;this.setAriaProperty("disabled",g)},isDisabled:function(){return d.get(this.id).disabled},select:function(h){var g=this,j,i;if(h==c){return g.selectByIndex(-1)}if(h&&typeof(h)=="function"){i=h}else{i=function(k){return k==h}}if(h!=g.selectedValue){f(g.items,function(l,k){if(i(l.value)){j=1;g.selectByIndex(k);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(g){d.get(this.id).selectedIndex=g+1;this.selectedValue=this.items[g]?this.items[g].value:null},add:function(k,h,g){var j,i=this;g=g||{};g.value=h;if(i.isRendered()){d.add(d.get(this.id),"option",g,k)}j={title:k,value:h,attribs:g};i.items.push(j);i.onAdd.dispatch(i,j)},getLength:function(){return this.items.length},renderHTML:function(){var i,g=this;i=d.createHTML("option",{value:""},"-- "+g.settings.title+" --");f(g.items,function(h){i+=d.createHTML("option",{value:h.value},h.title)});i=d.createHTML("select",{id:g.id,"class":"mceNativeListBox","aria-labelledby":g.id+"_aria"},i);i+=d.createHTML("span",{id:g.id+"_aria",style:"display: none"},g.settings.title);return i},postRender:function(){var h=this,i,j=true;h.rendered=true;function g(l){var k=h.items[l.target.selectedIndex-1];if(k&&(k=k.value)){h.onChange.dispatch(h,k);if(h.settings.onselect){h.settings.onselect(k)}}}b.add(h.id,"change",g);b.add(h.id,"keydown",function(l){var k;b.remove(h.id,"change",i);j=false;k=b.add(h.id,"blur",function(){if(j){return}j=true;b.add(h.id,"change",g);b.remove(h.id,"blur",k)});if(e.isWebKit&&(l.keyCode==37||l.keyCode==39)){return b.prevent(l)}if(l.keyCode==13||l.keyCode==32){g(l);return b.cancel(l)}});h.onPostRender.dispatch(h,d.get(h.id))}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(g,f,e){this.parent(g,f,e);this.onRenderMenu=new c.util.Dispatcher(this);f.menu_container=f.menu_container||b.doc.body},showMenu:function(){var g=this,j,i,h=b.get(g.id),f;if(g.isDisabled()){return}if(!g.isMenuRendered){g.renderMenu();g.isMenuRendered=true}if(g.isMenuVisible){return g.hideMenu()}j=b.getPos(g.settings.menu_container);i=b.getPos(h);f=g.menu;f.settings.offset_x=i.x;f.settings.offset_y=i.y;f.settings.vp_offset_x=i.x;f.settings.vp_offset_y=i.y;f.settings.keyboard_focus=g._focused;f.showMenu(0,h.firstChild.clientHeight);a.add(b.doc,"mousedown",g.hideMenu,g);g.setState("Selected",1);g.isMenuVisible=1},renderMenu:function(){var f=this,e;e=f.settings.control_manager.createDropMenu(f.id+"_menu",{menu_line:1,"class":this.classPrefix+"Menu",icons:f.settings.icons});e.onHideMenu.add(function(){f.hideMenu();f.focus()});f.onRenderMenu.dispatch(f,e);f.menu=e},hideMenu:function(g){var f=this;if(g&&g.type=="mousedown"&&b.getParent(g.target,function(h){return h.id===f.id||h.id===f.id+"_open"})){return}if(!g||!b.getParent(g.target,".mceMenu")){f.setState("Selected",0);a.remove(b.doc,"mousedown",f.hideMenu,f);if(f.menu){f.menu.hideMenu()}}f.isMenuVisible=0},postRender:function(){var e=this,f=e.settings;a.add(e.id,"click",function(){if(!e.isDisabled()){if(f.onclick){f.onclick(e.value)}e.showMenu()}})}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(g,f,e){this.parent(g,f,e);this.classPrefix="mceSplitButton"},renderHTML:function(){var i,f=this,g=f.settings,e;i="<tbody><tr>";if(g.image){e=b.createHTML("img ",{src:g.image,role:"presentation","class":"mceAction "+g["class"]})}else{e=b.createHTML("span",{"class":"mceAction "+g["class"]},"")}e+=b.createHTML("span",{"class":"mceVoiceLabel mceIconOnly",id:f.id+"_voice",style:"display:none;"},g.title);i+="<td >"+b.createHTML("a",{role:"button",id:f.id+"_action",tabindex:"-1",href:"javascript:;","class":"mceAction "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"</td>";e=b.createHTML("span",{"class":"mceOpen "+g["class"]},'<span style="display:none;" class="mceIconOnly" aria-hidden="true">\u25BC</span>');i+="<td >"+b.createHTML("a",{role:"button",id:f.id+"_open",tabindex:"-1",href:"javascript:;","class":"mceOpen "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"</td>";i+="</tr></tbody>";i=b.createHTML("table",{role:"presentation","class":"mceSplitButton mceSplitButtonEnabled "+g["class"],cellpadding:"0",cellspacing:"0",title:g.title},i);return b.createHTML("div",{id:f.id,role:"button",tabindex:"0","aria-labelledby":f.id+"_voice","aria-haspopup":"true"},i)},postRender:function(){var e=this,g=e.settings,f;if(g.onclick){f=function(h){if(!e.isDisabled()){g.onclick(e.value);a.cancel(h)}};a.add(e.id+"_action","click",f);a.add(e.id,["click","keydown"],function(h){var k=32,m=14,i=13,j=38,l=40;if((h.keyCode===32||h.keyCode===13||h.keyCode===14)&&!h.altKey&&!h.ctrlKey&&!h.metaKey){f();a.cancel(h)}else{if(h.type==="click"||h.keyCode===l){e.showMenu();a.cancel(h)}}})}a.add(e.id+"_open","click",function(h){e.showMenu();a.cancel(h)});a.add([e.id,e.id+"_open"],"focus",function(){e._focused=1});a.add([e.id,e.id+"_open"],"blur",function(){e._focused=0});if(c.isIE6||!b.boxModel){a.add(e.id,"mouseover",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.addClass(e.id,"mceSplitButtonHover")}});a.add(e.id,"mouseout",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.removeClass(e.id,"mceSplitButtonHover")}})}},destroy:function(){this.parent();a.clear(this.id+"_action");a.clear(this.id+"_open");a.clear(this.id)}})})(tinymce);(function(d){var c=d.DOM,a=d.dom.Event,b=d.is,e=d.each;d.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(i,h,f){var g=this;g.parent(i,h,f);g.settings=h=d.extend({colors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",grid_width:8,default_color:"#888888"},g.settings);g.onShowMenu=new d.util.Dispatcher(g);g.onHideMenu=new d.util.Dispatcher(g);g.value=h.default_color},showMenu:function(){var f=this,g,j,i,h;if(f.isDisabled()){return}if(!f.isMenuRendered){f.renderMenu();f.isMenuRendered=true}if(f.isMenuVisible){return f.hideMenu()}i=c.get(f.id);c.show(f.id+"_menu");c.addClass(i,"mceSplitButtonSelected");h=c.getPos(i);c.setStyles(f.id+"_menu",{left:h.x,top:h.y+i.firstChild.clientHeight,zIndex:200000});i=0;a.add(c.doc,"mousedown",f.hideMenu,f);f.onShowMenu.dispatch(f);if(f._focused){f._keyHandler=a.add(f.id+"_menu","keydown",function(k){if(k.keyCode==27){f.hideMenu()}});c.select("a",f.id+"_menu")[0].focus()}f.isMenuVisible=1},hideMenu:function(g){var f=this;if(f.isMenuVisible){if(g&&g.type=="mousedown"&&c.getParent(g.target,function(h){return h.id===f.id+"_open"})){return}if(!g||!c.getParent(g.target,".mceSplitButtonMenu")){c.removeClass(f.id,"mceSplitButtonSelected");a.remove(c.doc,"mousedown",f.hideMenu,f);a.remove(f.id+"_menu","keydown",f._keyHandler);c.hide(f.id+"_menu")}f.isMenuVisible=0;f.onHideMenu.dispatch()}},renderMenu:function(){var p=this,h,k=0,q=p.settings,g,j,l,o,f;o=c.add(q.menu_container,"div",{role:"listbox",id:p.id+"_menu","class":q.menu_class+" "+q["class"],style:"position:absolute;left:0;top:-1000px;"});h=c.add(o,"div",{"class":q["class"]+" mceSplitButtonMenu"});c.add(h,"span",{"class":"mceMenuLine"});g=c.add(h,"table",{role:"presentation","class":"mceColorSplitMenu"});j=c.add(g,"tbody");k=0;e(b(q.colors,"array")?q.colors:q.colors.split(","),function(m){m=m.replace(/^#/,"");if(!k--){l=c.add(j,"tr");k=q.grid_width-1}g=c.add(l,"td");var i={href:"javascript:;",style:{backgroundColor:"#"+m},title:p.editor.getLang("colors."+m,m),"data-mce-color":"#"+m};if(!d.isIE){i.role="option"}g=c.add(g,"a",i);if(p.editor.forcedHighContrastMode){g=c.add(g,"canvas",{width:16,height:16,"aria-hidden":"true"});if(g.getContext&&(f=g.getContext("2d"))){f.fillStyle="#"+m;f.fillRect(0,0,16,16)}else{c.remove(g)}}});if(q.more_colors_func){g=c.add(j,"tr");g=c.add(g,"td",{colspan:q.grid_width,"class":"mceMoreColors"});g=c.add(g,"a",{role:"option",id:p.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},q.more_colors_title);a.add(g,"click",function(i){q.more_colors_func.call(q.more_colors_scope||this);return a.cancel(i)})}c.addClass(h,"mceColorSplitMenu");new d.ui.KeyboardNavigation({root:p.id+"_menu",items:c.select("a",p.id+"_menu"),onCancel:function(){p.hideMenu();p.focus()}});a.add(p.id+"_menu","mousedown",function(i){return a.cancel(i)});a.add(p.id+"_menu","click",function(i){var m;i=c.getParent(i.target,"a",j);if(i&&i.nodeName.toLowerCase()=="a"&&(m=i.getAttribute("data-mce-color"))){p.setColor(m)}return false});return o},setColor:function(f){this.displayColor(f);this.hideMenu();this.settings.onselect(f)},displayColor:function(g){var f=this;c.setStyle(f.id+"_preview","backgroundColor",g);f.value=g},postRender:function(){var f=this,g=f.id;f.parent();c.add(g+"_action","div",{id:g+"_preview","class":"mceColorPreview"});c.setStyle(f.id+"_preview","backgroundColor",f.value)},destroy:function(){this.parent();a.clear(this.id+"_menu");a.clear(this.id+"_more");c.remove(this.id+"_menu")}})})(tinymce);(function(b){var d=b.DOM,c=b.each,a=b.dom.Event;b.create("tinymce.ui.ToolbarGroup:tinymce.ui.Container",{renderHTML:function(){var f=this,i=[],e=f.controls,j=b.each,g=f.settings;i.push('<div id="'+f.id+'" role="group" aria-labelledby="'+f.id+'_voice">');i.push("<span role='application'>");i.push('<span id="'+f.id+'_voice" class="mceVoiceLabel" style="display:none;">'+d.encode(g.name)+"</span>");j(e,function(h){i.push(h.renderHTML())});i.push("</span>");i.push("</div>");return i.join("")},focus:function(){var e=this;d.get(e.id).focus()},postRender:function(){var f=this,e=[];c(f.controls,function(g){c(g.controls,function(h){if(h.id){e.push(h)}})});f.keyNav=new b.ui.KeyboardNavigation({root:f.id,items:e,onCancel:function(){if(b.isWebKit){d.get(f.editor.id+"_ifr").focus()}f.editor.focus()},excludeFromTabOrder:!f.settings.tab_focus_toolbar})},destroy:function(){var e=this;e.parent();e.keyNav.destroy();a.clear(e.id)}})})(tinymce);(function(a){var c=a.DOM,b=a.each;a.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var m=this,f="",j,k,n=m.settings,e,d,g,l;l=m.controls;for(e=0;e<l.length;e++){k=l[e];d=l[e-1];g=l[e+1];if(e===0){j="mceToolbarStart";if(k.Button){j+=" mceToolbarStartButton"}else{if(k.SplitButton){j+=" mceToolbarStartSplitButton"}else{if(k.ListBox){j+=" mceToolbarStartListBox"}}}f+=c.createHTML("td",{"class":j},c.createHTML("span",null,"<!-- IE -->"))}if(d&&k.ListBox){if(d.Button||d.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarEnd"},c.createHTML("span",null,"<!-- IE -->"))}}if(c.stdMode){f+='<td style="position: relative">'+k.renderHTML()+"</td>"}else{f+="<td>"+k.renderHTML()+"</td>"}if(g&&k.ListBox){if(g.Button||g.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarStart"},c.createHTML("span",null,"<!-- IE -->"))}}}j="mceToolbarEnd";if(k.Button){j+=" mceToolbarEndButton"}else{if(k.SplitButton){j+=" mceToolbarEndSplitButton"}else{if(k.ListBox){j+=" mceToolbarEndListBox"}}}f+=c.createHTML("td",{"class":j},c.createHTML("span",null,"<!-- IE -->"));return c.createHTML("table",{id:m.id,"class":"mceToolbar"+(n["class"]?" "+n["class"]:""),cellpadding:"0",cellspacing:"0",align:m.settings.align||"",role:"presentation",tabindex:"-1"},"<tbody><tr>"+f+"</tr></tbody>")}})})(tinymce);(function(b){var a=b.util.Dispatcher,c=b.each;b.create("tinymce.AddOnManager",{AddOnManager:function(){var d=this;d.items=[];d.urls={};d.lookup={};d.onAdd=new a(d)},get:function(d){if(this.lookup[d]){return this.lookup[d].instance}else{return undefined}},dependencies:function(e){var d;if(this.lookup[e]){d=this.lookup[e].dependencies}return d||[]},requireLangPack:function(e){var d=b.settings;if(d&&d.language&&d.language_load!==false){b.ScriptLoader.add(this.urls[e]+"/langs/"+d.language+".js")}},add:function(f,e,d){this.items.push(e);this.lookup[f]={instance:e,dependencies:d};this.onAdd.dispatch(this,f,e);return e},createUrl:function(d,e){if(typeof e==="object"){return e}else{return{prefix:d.prefix,resource:e,suffix:d.suffix}}},addComponents:function(f,d){var e=this.urls[f];b.each(d,function(g){b.ScriptLoader.add(e+"/"+g)})},load:function(j,f,d,h){var g=this,e=f;function i(){var k=g.dependencies(j);b.each(k,function(m){var l=g.createUrl(f,m);g.load(l.resource,l,undefined,undefined)});if(d){if(h){d.call(h)}else{d.call(b.ScriptLoader)}}}if(g.urls[j]){return}if(typeof f==="object"){e=f.prefix+f.resource+f.suffix}if(e.indexOf("/")!==0&&e.indexOf("://")==-1){e=b.baseURL+"/"+e}g.urls[j]=e.substring(0,e.lastIndexOf("/"));if(g.lookup[j]){i()}else{b.ScriptLoader.add(e,i,h)}}});b.PluginManager=new b.AddOnManager();b.ThemeManager=new b.AddOnManager()}(tinymce));(function(j){var g=j.each,d=j.extend,k=j.DOM,i=j.dom.Event,f=j.ThemeManager,b=j.PluginManager,e=j.explode,h=j.util.Dispatcher,a,c=0;j.documentBaseURL=window.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");if(!/[\/\\]$/.test(j.documentBaseURL)){j.documentBaseURL+="/"}j.baseURL=new j.util.URI(j.documentBaseURL).toAbsolute(j.baseURL);j.baseURI=new j.util.URI(j.baseURL);j.onBeforeUnload=new h(j);i.add(window,"beforeunload",function(l){j.onBeforeUnload.dispatch(j,l)});j.onAddEditor=new h(j);j.onRemoveEditor=new h(j);j.EditorManager=d(j,{editors:[],i18n:{},activeEditor:null,init:function(x){var v=this,o,n=j.ScriptLoader,u,l=[],r;function q(t){var s=t.id;if(!s){s=t.name;if(s&&!k.get(s)){s=t.name}else{s=k.uniqueId()}t.setAttribute("id",s)}return s}function m(z,A,t){var y=z[A];if(!y){return}if(j.is(y,"string")){t=y.replace(/\.\w+$/,"");t=t?j.resolve(t):0;y=j.resolve(y)}return y.apply(t||this,Array.prototype.slice.call(arguments,2))}function p(t,s){return s.constructor===RegExp?s.test(t.className):k.hasClass(t,s)}v.settings=x;i.bind(window,"ready",function(){var s,t;m(x,"onpageload");switch(x.mode){case"exact":s=x.elements||"";if(s.length>0){g(e(s),function(y){if(k.get(y)){r=new j.Editor(y,x);l.push(r);r.render(1)}else{g(document.forms,function(z){g(z.elements,function(A){if(A.name===y){y="mce_editor_"+c++;k.setAttrib(A,"id",y);r=new j.Editor(y,x);l.push(r);r.render(1)}})})}})}break;case"textareas":case"specific_textareas":g(k.select("textarea"),function(y){if(x.editor_deselector&&p(y,x.editor_deselector)){return}if(!x.editor_selector||p(y,x.editor_selector)){r=new j.Editor(q(y),x);l.push(r);r.render(1)}});break;default:if(x.types){g(x.types,function(y){g(k.select(y.selector),function(A){var z=new j.Editor(q(A),j.extend({},x,y));l.push(z);z.render(1)})})}else{if(x.selector){g(k.select(x.selector),function(z){var y=new j.Editor(q(z),x);l.push(y);y.render(1)})}}}if(x.oninit){s=t=0;g(l,function(y){t++;if(!y.initialized){y.onInit.add(function(){s++;if(s==t){m(x,"oninit")}})}else{s++}if(s==t){m(x,"oninit")}})}})},get:function(l){if(l===a){return this.editors}return this.editors[l]},getInstanceById:function(l){return this.get(l)},add:function(m){var l=this,n=l.editors;n[m.id]=m;n.push(m);l._setActive(m);l.onAddEditor.dispatch(l,m);return m},remove:function(n){var m=this,l,o=m.editors;if(!o[n.id]){return null}delete o[n.id];for(l=0;l<o.length;l++){if(o[l]==n){o.splice(l,1);break}}if(m.activeEditor==n){m._setActive(o[0])}n.destroy();m.onRemoveEditor.dispatch(m,n);return n},execCommand:function(r,p,o){var q=this,n=q.get(o),l;function m(){n.destroy();l.detachEvent("onunload",m);l=l.tinyMCE=l.tinymce=null}switch(r){case"mceFocus":n.focus();return true;case"mceAddEditor":case"mceAddControl":if(!q.get(o)){new j.Editor(o,q.settings).render()}return true;case"mceAddFrameControl":l=o.window;l.tinyMCE=tinyMCE;l.tinymce=j;j.DOM.doc=l.document;j.DOM.win=l;n=new j.Editor(o.element_id,o);n.render();if(j.isIE){l.attachEvent("onunload",m)}o.page_window=null;return true;case"mceRemoveEditor":case"mceRemoveControl":if(n){n.remove()}return true;case"mceToggleEditor":if(!n){q.execCommand("mceAddControl",0,o);return true}if(n.isHidden()){n.show()}else{n.hide()}return true}if(q.activeEditor){return q.activeEditor.execCommand(r,p,o)}return false},execInstanceCommand:function(p,o,n,m){var l=this.get(p);if(l){return l.execCommand(o,n,m)}return false},triggerSave:function(){g(this.editors,function(l){l.save()})},addI18n:function(n,q){var l,m=this.i18n;if(!j.is(n,"string")){g(n,function(r,p){g(r,function(t,s){g(t,function(v,u){if(s==="common"){m[p+"."+u]=v}else{m[p+"."+s+"."+u]=v}})})})}else{g(q,function(r,p){m[n+"."+p]=r})}},_setActive:function(l){this.selectedInstance=this.activeEditor=l}})})(tinymce);(function(k){var l=k.DOM,j=k.dom.Event,f=k.extend,i=k.each,a=k.isGecko,b=k.isIE,e=k.isWebKit,d=k.is,h=k.ThemeManager,c=k.PluginManager,g=k.explode;k.create("tinymce.Editor",{Editor:function(p,o){var m=this,n=true;m.settings=o=f({id:p,language:"en",theme:"advanced",skin:"default",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:k.documentBaseURL,add_form_submit_trigger:n,submit_patch:n,add_unload_trigger:n,convert_urls:n,relative_urls:n,remove_script_host:n,table_inline_editing:false,object_resizing:n,accessibility_focus:n,doctype:k.isIE6?'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">':"<!DOCTYPE>",visual:n,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",apply_source_formatting:n,directionality:"ltr",forced_root_block:"p",hidden_input:n,padd_empty_editor:n,render_ui:n,indentation:"30px",fix_table_elements:n,inline_styles:n,convert_fonts_to_spans:n,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",validate:n,entity_encoding:"named",url_converter:m.convertURL,url_converter_scope:m,ie7_compat:n},o);m.id=m.editorId=p;m.isNotDirty=false;m.plugins={};m.documentBaseURI=new k.util.URI(o.document_base_url||k.documentBaseURL,{base_uri:tinyMCE.baseURI});m.baseURI=k.baseURI;m.contentCSS=[];m.setupEvents();m.execCommands={};m.queryStateCommands={};m.queryValueCommands={};m.execCallback("setup",m)},render:function(o){var p=this,q=p.settings,r=p.id,m=k.ScriptLoader;if(!j.domLoaded){j.add(window,"ready",function(){p.render()});return}tinyMCE.settings=q;if(!p.getElement()){return}if(k.isIDevice&&!k.isIOS5){return}if(!/TEXTAREA|INPUT/i.test(p.getElement().nodeName)&&q.hidden_input&&l.getParent(r,"form")){l.insertAfter(l.create("input",{type:"hidden",name:r}),r)}if(!q.content_editable){p.orgVisibility=p.getElement().style.visibility;p.getElement().style.visibility="hidden"}if(k.WindowManager){p.windowManager=new k.WindowManager(p)}if(q.encoding=="xml"){p.onGetContent.add(function(s,t){if(t.save){t.content=l.encode(t.content)}})}if(q.add_form_submit_trigger){p.onSubmit.addToTop(function(){if(p.initialized){p.save();p.isNotDirty=1}})}if(q.add_unload_trigger){p._beforeUnload=tinyMCE.onBeforeUnload.add(function(){if(p.initialized&&!p.destroyed&&!p.isHidden()){p.save({format:"raw",no_events:true})}})}k.addUnload(p.destroy,p);if(q.submit_patch){p.onBeforeRenderUI.add(function(){var s=p.getElement().form;if(!s){return}if(s._mceOldSubmit){return}if(!s.submit.nodeType&&!s.submit.length){p.formElement=s;s._mceOldSubmit=s.submit;s.submit=function(){k.triggerSave();p.isNotDirty=1;return p.formElement._mceOldSubmit(p.formElement)}}s=null})}function n(){if(q.language&&q.language_load!==false){m.add(k.baseURL+"/langs/"+q.language+".js")}if(q.theme&&typeof q.theme!="function"&&q.theme.charAt(0)!="-"&&!h.urls[q.theme]){h.load(q.theme,"themes/"+q.theme+"/editor_template"+k.suffix+".js")}i(g(q.plugins),function(t){if(t&&!c.urls[t]){if(t.charAt(0)=="-"){t=t.substr(1,t.length);var s=c.dependencies(t);i(s,function(v){var u={prefix:"plugins/",resource:v,suffix:"/editor_plugin"+k.suffix+".js"};v=c.createUrl(u,v);c.load(v.resource,v)})}else{if(t=="safari"){return}c.load(t,{prefix:"plugins/",resource:t,suffix:"/editor_plugin"+k.suffix+".js"})}}});m.loadQueue(function(){if(!p.removed){p.init()}})}n()},init:function(){var q,G=this,H=G.settings,D,y,z,C=G.getElement(),p,m,E,v,B,F,x,r=[];k.add(G);H.aria_label=H.aria_label||l.getAttrib(C,"aria-label",G.getLang("aria.rich_text_area"));if(H.theme){if(typeof H.theme!="function"){H.theme=H.theme.replace(/-/,"");p=h.get(H.theme);G.theme=new p();if(G.theme.init){G.theme.init(G,h.urls[H.theme]||k.documentBaseURL.replace(/\/$/,""))}}else{G.theme=H.theme}}function A(s){var t=c.get(s),o=c.urls[s]||k.documentBaseURL.replace(/\/$/,""),n;if(t&&k.inArray(r,s)===-1){i(c.dependencies(s),function(u){A(u)});n=new t(G,o);G.plugins[s]=n;if(n.init){n.init(G,o);r.push(s)}}}i(g(H.plugins.replace(/\-/g,"")),A);if(H.popup_css!==false){if(H.popup_css){H.popup_css=G.documentBaseURI.toAbsolute(H.popup_css)}else{H.popup_css=G.baseURI.toAbsolute("themes/"+H.theme+"/skins/"+H.skin+"/dialog.css")}}if(H.popup_css_add){H.popup_css+=","+G.documentBaseURI.toAbsolute(H.popup_css_add)}G.controlManager=new k.ControlManager(G);G.onExecCommand.add(function(n,o){if(!/^(FontName|FontSize)$/.test(o)){G.nodeChanged()}});G.onBeforeRenderUI.dispatch(G,G.controlManager);if(H.render_ui&&G.theme){G.orgDisplay=C.style.display;if(typeof H.theme!="function"){D=H.width||C.style.width||C.offsetWidth;y=H.height||C.style.height||C.offsetHeight;z=H.min_height||100;F=/^[0-9\.]+(|px)$/i;if(F.test(""+D)){D=Math.max(parseInt(D,10)+(p.deltaWidth||0),100)}if(F.test(""+y)){y=Math.max(parseInt(y,10)+(p.deltaHeight||0),z)}p=G.theme.renderUI({targetNode:C,width:D,height:y,deltaWidth:H.delta_width,deltaHeight:H.delta_height});l.setStyles(p.sizeContainer||p.editorContainer,{width:D,height:y});y=(p.iframeHeight||y)+(typeof(y)=="number"?(p.deltaHeight||0):"");if(y<z){y=z}}else{p=H.theme(G,C);if(p.editorContainer.nodeType){p.editorContainer=p.editorContainer.id=p.editorContainer.id||G.id+"_parent"}if(p.iframeContainer.nodeType){p.iframeContainer=p.iframeContainer.id=p.iframeContainer.id||G.id+"_iframecontainer"}y=p.iframeHeight||C.offsetHeight;if(b){G.onInit.add(function(n){n.dom.bind(n.getBody(),"beforedeactivate keydown",function(){n.lastIERng=n.selection.getRng()})})}}G.editorContainer=p.editorContainer}if(H.content_css){i(g(H.content_css),function(n){G.contentCSS.push(G.documentBaseURI.toAbsolute(n))})}if(H.content_editable){C=q=p=null;return G.initContentBody()}if(document.domain&&location.hostname!=document.domain){k.relaxedDomain=document.domain}G.iframeHTML=H.doctype+'<html><head xmlns="http://www.w3.org/1999/xhtml">';if(H.document_base_url!=k.documentBaseURL){G.iframeHTML+='<base href="'+G.documentBaseURI.getURI()+'" />'}if(H.ie7_compat){G.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=7" />'}else{G.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=edge" />'}G.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';for(x=0;x<G.contentCSS.length;x++){G.iframeHTML+='<link type="text/css" rel="stylesheet" href="'+G.contentCSS[x]+'" />'}G.contentCSS=[];v=H.body_id||"tinymce";if(v.indexOf("=")!=-1){v=G.getParam("body_id","","hash");v=v[G.id]||v}B=H.body_class||"";if(B.indexOf("=")!=-1){B=G.getParam("body_class","","hash");B=B[G.id]||""}G.iframeHTML+='</head><body id="'+v+'" class="mceContentBody '+B+'" onload="window.parent.tinyMCE.get(\''+G.id+"').onLoad.dispatch();\"><br></body></html>";if(k.relaxedDomain&&(b||(k.isOpera&&parseFloat(opera.version())<11))){E='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+G.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody();})()'}q=l.add(p.iframeContainer,"iframe",{id:G.id+"_ifr",src:E||'javascript:""',frameBorder:"0",allowTransparency:"true",title:H.aria_label,style:{width:"100%",height:y,display:"block"}});G.contentAreaContainer=p.iframeContainer;if(p.editorContainer){l.get(p.editorContainer).style.display=G.orgDisplay}C.style.visibility=G.orgVisibility;l.get(G.id).style.display="none";l.setAttrib(G.id,"aria-hidden",true);if(!k.relaxedDomain||!E){G.initContentBody()}C=q=p=null},initContentBody:function(){var n=this,p=n.settings,q=l.get(n.id),r=n.getDoc(),o,m;if((!b||!k.relaxedDomain)&&!p.content_editable){r.open();r.write(n.iframeHTML);r.close();if(k.relaxedDomain){r.domain=k.relaxedDomain}}if(p.content_editable){l.addClass(q,"mceContentBody");n.contentDocument=r=p.content_document||document;n.contentWindow=p.content_window||window;n.bodyElement=q;p.content_document=p.content_window=null}m=n.getBody();m.disabled=true;if(!p.readonly){m.contentEditable=n.getParam("content_editable_state",true)}m.disabled=false;n.schema=new k.html.Schema(p);n.dom=new k.dom.DOMUtils(r,{keep_values:true,url_converter:n.convertURL,url_converter_scope:n,hex_colors:p.force_hex_style_colors,class_filter:p.class_filter,update_styles:true,root_element:p.content_editable?n.id:null,schema:n.schema});n.parser=new k.html.DomParser(p,n.schema);n.parser.addAttributeFilter("src,href,style",function(s,t){var u=s.length,x,z=n.dom,y,v;while(u--){x=s[u];y=x.attr(t);v="data-mce-"+t;if(!x.attributes.map[v]){if(t==="style"){x.attr(v,z.serializeStyle(z.parseStyle(y),x.name))}else{x.attr(v,n.convertURL(y,t,x.name))}}}});n.parser.addNodeFilter("script",function(s,t){var u=s.length,v;while(u--){v=s[u];v.attr("type","mce-"+(v.attr("type")||"text/javascript"))}});n.parser.addNodeFilter("#cdata",function(s,t){var u=s.length,v;while(u--){v=s[u];v.type=8;v.name="#comment";v.value="[CDATA["+v.value+"]]"}});n.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(t,u){var v=t.length,x,s=n.schema.getNonEmptyElements();while(v--){x=t[v];if(x.isEmpty(s)){x.empty().append(new k.html.Node("br",1)).shortEnded=true}}});n.serializer=new k.dom.Serializer(p,n.dom,n.schema);n.selection=new k.dom.Selection(n.dom,n.getWin(),n.serializer,n);n.formatter=new k.Formatter(n);n.undoManager=new k.UndoManager(n);n.forceBlocks=new k.ForceBlocks(n);n.enterKey=new k.EnterKey(n);n.editorCommands=new k.EditorCommands(n);n.serializer.onPreProcess.add(function(s,t){return n.onPreProcess.dispatch(n,t,s)});n.serializer.onPostProcess.add(function(s,t){return n.onPostProcess.dispatch(n,t,s)});n.onPreInit.dispatch(n);if(!p.browser_spellcheck&&!p.gecko_spellcheck){r.body.spellcheck=false}if(!p.readonly){n.bindNativeEvents()}n.controlManager.onPostRender.dispatch(n,n.controlManager);n.onPostRender.dispatch(n);n.quirks=k.util.Quirks(n);if(p.directionality){m.dir=p.directionality}if(p.nowrap){m.style.whiteSpace="nowrap"}if(p.protect){n.onBeforeSetContent.add(function(s,t){i(p.protect,function(u){t.content=t.content.replace(u,function(v){return"<!--mce:protected "+escape(v)+"-->"})})})}n.onSetContent.add(function(){n.addVisual(n.getBody())});if(p.padd_empty_editor){n.onPostProcess.add(function(s,t){t.content=t.content.replace(/^(<p[^>]*>(&nbsp;|&#160;|\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")})}n.load({initial:true,format:"html"});n.startContent=n.getContent({format:"raw"});n.initialized=true;n.onInit.dispatch(n);n.execCallback("setupcontent_callback",n.id,m,r);n.execCallback("init_instance_callback",n);n.focus(true);n.nodeChanged({initial:true});i(n.contentCSS,function(s){n.dom.loadCSS(s)});if(p.auto_focus){setTimeout(function(){var s=k.get(p.auto_focus);s.selection.select(s.getBody(),1);s.selection.collapse(1);s.getBody().focus();s.getWin().focus()},100)}q=r=m=null},focus:function(p){var o,u=this,t=u.selection,q=u.settings.content_editable,n,r,s=u.getDoc(),m;if(!p){if(u.lastIERng){t.setRng(u.lastIERng)}n=t.getRng();if(n.item){r=n.item(0)}u._refreshContentEditable();if(!q){u.getWin().focus()}if(k.isGecko||q){m=u.getBody();if(m.setActive){m.setActive()}else{m.focus()}if(q){t.normalize()}}if(r&&r.ownerDocument==s){n=s.body.createControlRange();n.addElement(r);n.select()}}if(k.activeEditor!=u){if((o=k.activeEditor)!=null){o.onDeactivate.dispatch(o,u)}u.onActivate.dispatch(u,o)}k._setActive(u)},execCallback:function(q){var m=this,p=m.settings[q],o;if(!p){return}if(m.callbackLookup&&(o=m.callbackLookup[q])){p=o.func;o=o.scope}if(d(p,"string")){o=p.replace(/\.\w+$/,"");o=o?k.resolve(o):0;p=k.resolve(p);m.callbackLookup=m.callbackLookup||{};m.callbackLookup[q]={func:p,scope:o}}return p.apply(o||m,Array.prototype.slice.call(arguments,1))},translate:function(m){var o=this.settings.language||"en",n=k.i18n;if(!m){return""}return n[o+"."+m]||m.replace(/\{\#([^\}]+)\}/g,function(q,p){return n[o+"."+p]||"{#"+p+"}"})},getLang:function(o,m){return k.i18n[(this.settings.language||"en")+"."+o]||(d(m)?m:"{#"+o+"}")},getParam:function(t,q,m){var r=k.trim,p=d(this.settings[t])?this.settings[t]:q,s;if(m==="hash"){s={};if(d(p,"string")){i(p.indexOf("=")>0?p.split(/[;,](?![^=;,]*(?:[;,]|$))/):p.split(","),function(n){n=n.split("=");if(n.length>1){s[r(n[0])]=r(n[1])}else{s[r(n[0])]=r(n)}})}else{s=p}return s}return p},nodeChanged:function(q){var m=this,n=m.selection,p;if(m.initialized){q=q||{};p=n.getStart()||m.getBody();p=b&&p.ownerDocument!=m.getDoc()?m.getBody():p;q.parents=[];m.dom.getParent(p,function(o){if(o.nodeName=="BODY"){return true}q.parents.push(o)});m.onNodeChange.dispatch(m,q?q.controlManager||m.controlManager:m.controlManager,p,n.isCollapsed(),q)}},addButton:function(n,o){var m=this;m.buttons=m.buttons||{};m.buttons[n]=o},addCommand:function(m,o,n){this.execCommands[m]={func:o,scope:n||this}},addQueryStateHandler:function(m,o,n){this.queryStateCommands[m]={func:o,scope:n||this}},addQueryValueHandler:function(m,o,n){this.queryValueCommands[m]={func:o,scope:n||this}},addShortcut:function(o,q,m,p){var n=this,r;if(n.settings.custom_shortcuts===false){return false}n.shortcuts=n.shortcuts||{};if(d(m,"string")){r=m;m=function(){n.execCommand(r,false,null)}}if(d(m,"object")){r=m;m=function(){n.execCommand(r[0],r[1],r[2])}}i(g(o),function(s){var t={func:m,scope:p||this,desc:n.translate(q),alt:false,ctrl:false,shift:false};i(g(s,"+"),function(u){switch(u){case"alt":case"ctrl":case"shift":t[u]=true;break;default:t.charCode=u.charCodeAt(0);t.keyCode=u.toUpperCase().charCodeAt(0)}});n.shortcuts[(t.ctrl?"ctrl":"")+","+(t.alt?"alt":"")+","+(t.shift?"shift":"")+","+t.keyCode]=t});return true},execCommand:function(u,r,x,m){var p=this,q=0,v,n;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(u)&&(!m||!m.skip_focus)){p.focus()}m=f({},m);p.onBeforeExecCommand.dispatch(p,u,r,x,m);if(m.terminate){return false}if(p.execCallback("execcommand_callback",p.id,p.selection.getNode(),u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}if(v=p.execCommands[u]){n=v.func.call(v.scope,r,x);if(n!==true){p.onExecCommand.dispatch(p,u,r,x,m);return n}}i(p.plugins,function(o){if(o.execCommand&&o.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);q=1;return false}});if(q){return true}if(p.theme&&p.theme.execCommand&&p.theme.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}if(p.editorCommands.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}p.getDoc().execCommand(u,r,x);p.onExecCommand.dispatch(p,u,r,x,m)},queryCommandState:function(q){var n=this,r,p;if(n._isHidden()){return}if(r=n.queryStateCommands[q]){p=r.func.call(r.scope);if(p!==true){return p}}r=n.editorCommands.queryCommandState(q);if(r!==-1){return r}try{return this.getDoc().queryCommandState(q)}catch(m){}},queryCommandValue:function(r){var n=this,q,p;if(n._isHidden()){return}if(q=n.queryValueCommands[r]){p=q.func.call(q.scope);if(p!==true){return p}}q=n.editorCommands.queryCommandValue(r);if(d(q)){return q}try{return this.getDoc().queryCommandValue(r)}catch(m){}},show:function(){var m=this;l.show(m.getContainer());l.hide(m.id);m.load()},hide:function(){var m=this,n=m.getDoc();if(b&&n){n.execCommand("SelectAll")}m.save();l.hide(m.getContainer());l.setStyle(m.id,"display",m.orgDisplay)},isHidden:function(){return !l.isHidden(this.id)},setProgressState:function(m,n,p){this.onSetProgressState.dispatch(this,m,n,p);return m},load:function(q){var m=this,p=m.getElement(),n;if(p){q=q||{};q.load=true;n=m.setContent(d(p.value)?p.value:p.innerHTML,q);q.element=p;if(!q.no_events){m.onLoadContent.dispatch(m,q)}q.element=p=null;return n}},save:function(r){var m=this,q=m.getElement(),n,p;if(!q||!m.initialized){return}r=r||{};r.save=true;r.element=q;n=r.content=m.getContent(r);if(!r.no_events){m.onSaveContent.dispatch(m,r)}n=r.content;if(!/TEXTAREA|INPUT/i.test(q.nodeName)){q.innerHTML=n;if(p=l.getParent(m.id,"form")){i(p.elements,function(o){if(o.name==m.id){o.value=n;return false}})}}else{q.value=n}r.element=q=null;return n},setContent:function(r,p){var o=this,n,m=o.getBody(),q;p=p||{};p.format=p.format||"html";p.set=true;p.content=r;if(!p.no_events){o.onBeforeSetContent.dispatch(o,p)}r=p.content;if(!k.isIE&&(r.length===0||/^\s+$/.test(r))){q=o.settings.forced_root_block;if(q){r="<"+q+'><br data-mce-bogus="1"></'+q+">"}else{r='<br data-mce-bogus="1">'}m.innerHTML=r;o.selection.select(m,true);o.selection.collapse(true);return}if(p.format!=="raw"){r=new k.html.Serializer({},o.schema).serialize(o.parser.parse(r))}p.content=k.trim(r);o.dom.setHTML(m,p.content);if(!p.no_events){o.onSetContent.dispatch(o,p)}if(!o.settings.content_editable||document.activeElement===o.getBody()){o.selection.normalize()}return p.content},getContent:function(n){var m=this,o;n=n||{};n.format=n.format||"html";n.get=true;n.getInner=true;if(!n.no_events){m.onBeforeGetContent.dispatch(m,n)}if(n.format=="raw"){o=m.getBody().innerHTML}else{o=m.serializer.serialize(m.getBody(),n)}n.content=k.trim(o);if(!n.no_events){m.onGetContent.dispatch(m,n)}return n.content},isDirty:function(){var m=this;return k.trim(m.startContent)!=k.trim(m.getContent({format:"raw",no_events:1}))&&!m.isNotDirty},getContainer:function(){var m=this;if(!m.container){m.container=l.get(m.editorContainer||m.id+"_parent")}return m.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return l.get(this.settings.content_element||this.id)},getWin:function(){var m=this,n;if(!m.contentWindow){n=l.get(m.id+"_ifr");if(n){m.contentWindow=n.contentWindow}}return m.contentWindow},getDoc:function(){var m=this,n;if(!m.contentDocument){n=m.getWin();if(n){m.contentDocument=n.document}}return m.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(o,n,q){var m=this,p=m.settings;if(p.urlconverter_callback){return m.execCallback("urlconverter_callback",o,q,true,n)}if(!p.convert_urls||(q&&q.nodeName=="LINK")||o.indexOf("file:")===0){return o}if(p.relative_urls){return m.documentBaseURI.toRelative(o)}o=m.documentBaseURI.toAbsolute(o,p.remove_script_host);return o},addVisual:function(q){var n=this,o=n.settings,p=n.dom,m;q=q||n.getBody();if(!d(n.hasVisual)){n.hasVisual=o.visual}i(p.select("table,a",q),function(s){var r;switch(s.nodeName){case"TABLE":m=o.visual_table_class||"mceItemTable";r=p.getAttrib(s,"border");if(!r||r=="0"){if(n.hasVisual){p.addClass(s,m)}else{p.removeClass(s,m)}}return;case"A":if(!s.href){r=p.getAttrib(s,"name")||s.id;m="mceItemAnchor";if(r){if(n.hasVisual){p.addClass(s,m)}else{p.removeClass(s,m)}}}return}});n.onVisualAid.dispatch(n,q,n.hasVisual)},remove:function(){var m=this,n=m.getContainer();if(!m.removed){m.removed=1;m.hide();if(!m.settings.content_editable){j.clear(m.getWin());j.clear(m.getDoc())}j.clear(m.getBody());j.clear(m.formElement);j.unbind(n);m.execCallback("remove_instance_callback",m);m.onRemove.dispatch(m);m.onExecCommand.listeners=[];k.remove(m);l.remove(n)}},destroy:function(n){var m=this;if(m.destroyed){return}if(a){j.unbind(m.getDoc());j.unbind(m.getWin());j.unbind(m.getBody())}if(!n){k.removeUnload(m.destroy);tinyMCE.onBeforeUnload.remove(m._beforeUnload);if(m.theme&&m.theme.destroy){m.theme.destroy()}m.controlManager.destroy();m.selection.destroy();m.dom.destroy()}if(m.formElement){m.formElement.submit=m.formElement._mceOldSubmit;m.formElement._mceOldSubmit=null}m.contentAreaContainer=m.formElement=m.container=m.settings.content_element=m.bodyElement=m.contentDocument=m.contentWindow=null;if(m.selection){m.selection=m.selection.win=m.selection.dom=m.selection.dom.doc=null}m.destroyed=1},_refreshContentEditable:function(){var n=this,m,o;if(n._isHidden()){m=n.getBody();o=m.parentNode;o.removeChild(m);o.appendChild(m);m.focus()}},_isHidden:function(){var m;if(!a){return 0}m=this.selection.getSel();return(!m||!m.rangeCount||m.rangeCount===0)}})})(tinymce);(function(a){var b=a.each;a.Editor.prototype.setupEvents=function(){var c=this,d=c.settings;b(["onPreInit","onBeforeRenderUI","onPostRender","onLoad","onInit","onRemove","onActivate","onDeactivate","onClick","onEvent","onMouseUp","onMouseDown","onDblClick","onKeyDown","onKeyUp","onKeyPress","onContextMenu","onSubmit","onReset","onPaste","onPreProcess","onPostProcess","onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent","onLoadContent","onSaveContent","onNodeChange","onChange","onBeforeExecCommand","onExecCommand","onUndo","onRedo","onVisualAid","onSetProgressState","onSetAttrib"],function(e){c[e]=new a.util.Dispatcher(c)});if(d.cleanup_callback){c.onBeforeSetContent.add(function(e,f){f.content=e.execCallback("cleanup_callback","insert_to_editor",f.content,f)});c.onPreProcess.add(function(e,f){if(f.set){e.execCallback("cleanup_callback","insert_to_editor_dom",f.node,f)}if(f.get){e.execCallback("cleanup_callback","get_from_editor_dom",f.node,f)}});c.onPostProcess.add(function(e,f){if(f.set){f.content=e.execCallback("cleanup_callback","insert_to_editor",f.content,f)}if(f.get){f.content=e.execCallback("cleanup_callback","get_from_editor",f.content,f)}})}if(d.save_callback){c.onGetContent.add(function(e,f){if(f.save){f.content=e.execCallback("save_callback",e.id,f.content,e.getBody())}})}if(d.handle_event_callback){c.onEvent.add(function(f,g,h){if(c.execCallback("handle_event_callback",g,f,h)===false){Event.cancel(g)}})}if(d.handle_node_change_callback){c.onNodeChange.add(function(f,e,g){f.execCallback("handle_node_change_callback",f.id,g,-1,-1,true,f.selection.isCollapsed())})}if(d.save_callback){c.onSaveContent.add(function(e,g){var f=e.execCallback("save_callback",e.id,g.content,e.getBody());if(f){g.content=f}})}if(d.onchange_callback){c.onChange.add(function(f,e){f.execCallback("onchange_callback",f,e)})}};a.Editor.prototype.bindNativeEvents=function(){var l=this,f,d=l.settings,e=l.dom,h;h={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"};function c(i,m){var n=i.type;if(l.removed){return}if(l.onEvent.dispatch(l,i,m)!==false){l[h[i.fakeType||i.type]].dispatch(l,i,m)}}function j(i){l.focus(true)}function k(){l.selection.normalize();l.nodeChanged()}b(h,function(m,n){var i=d.content_editable?l.getBody():l.getDoc();switch(n){case"contextmenu":e.bind(i,n,c);break;case"paste":e.bind(l.getBody(),n,c);break;case"submit":case"reset":e.bind(l.getElement().form||a.DOM.getParent(l.id,"form"),n,c);break;default:e.bind(i,n,c)}});e.bind(d.content_editable?l.getBody():(a.isGecko?l.getDoc():l.getWin()),"focus",function(i){l.focus(true)});if(d.content_editable&&a.isOpera){e.bind(l.getBody(),"click",j);e.bind(l.getBody(),"keydown",j)}l.onMouseUp.add(k);l.onKeyUp.add(function(i,n){var m=n.keyCode;if((m>=33&&m<=36)||(m>=37&&m<=40)||m==13||m==45||m==46||m==8||(a.isMac&&(m==91||m==93))||n.ctrlKey){k()}});l.onReset.add(function(){l.setContent(l.startContent,{format:"raw"})});function g(m,i){if(m.altKey||m.ctrlKey||m.metaKey){b(l.shortcuts,function(n){var o=a.isMac?m.metaKey:m.ctrlKey;if(n.ctrl!=o||n.alt!=m.altKey||n.shift!=m.shiftKey){return}if(m.keyCode==n.keyCode||(m.charCode&&m.charCode==n.charCode)){m.preventDefault();if(i){n.func.call(n.scope)}return true}})}}l.onKeyUp.add(function(i,m){g(m)});l.onKeyPress.add(function(i,m){g(m)});l.onKeyDown.add(function(i,m){g(m,true)});if(a.isOpera){l.onClick.add(function(i,m){m.preventDefault()})}}})(tinymce);(function(d){var e=d.each,b,a=true,c=false;d.EditorCommands=function(n){var m=n.dom,p=n.selection,j={state:{},exec:{},value:{}},k=n.settings,q=n.formatter,o;function r(z,y,x){var v;z=z.toLowerCase();if(v=j.exec[z]){v(z,y,x);return a}return c}function l(x){var v;x=x.toLowerCase();if(v=j.state[x]){return v(x)}return -1}function h(x){var v;x=x.toLowerCase();if(v=j.value[x]){return v(x)}return c}function u(v,x){x=x||"exec";e(v,function(z,y){e(y.toLowerCase().split(","),function(A){j[x][A]=z})})}d.extend(this,{execCommand:r,queryCommandState:l,queryCommandValue:h,addCommands:u});function f(y,x,v){if(x===b){x=c}if(v===b){v=null}return n.getDoc().execCommand(y,x,v)}function t(v){return q.match(v)}function s(v,x){q.toggle(v,x?{value:x}:b)}function i(v){o=p.getBookmark(v)}function g(){p.moveToBookmark(o)}u({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){n.undoManager.add()},"Cut,Copy,Paste":function(z){var y=n.getDoc(),v;try{f(z)}catch(x){v=a}if(v||!y.queryCommandSupported(z)){if(d.isGecko){n.windowManager.confirm(n.getLang("clipboard_msg"),function(A){if(A){open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}})}else{n.windowManager.alert(n.getLang("clipboard_no_support"))}}},unlink:function(v){if(p.isCollapsed()){p.select(p.getNode())}f(v);p.collapse(c)},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(v){var x=v.substring(7);e("left,center,right,full".split(","),function(y){if(x!=y){q.remove("align"+y)}});s("align"+x);r("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(y){var v,x;f(y);v=m.getParent(p.getNode(),"ol,ul");if(v){x=v.parentNode;if(/^(H[1-6]|P|ADDRESS|PRE)$/.test(x.nodeName)){i();m.split(x,v);g()}}},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){s(v)},"ForeColor,HiliteColor,FontName":function(y,x,v){s(y,v)},FontSize:function(z,y,x){var v,A;if(x>=1&&x<=7){A=d.explode(k.font_size_style_values);v=d.explode(k.font_size_classes);if(v){x=v[x-1]||x}else{x=A[x-1]||x}}s(z,x)},RemoveFormat:function(v){q.remove(v)},mceBlockQuote:function(v){s("blockquote")},FormatBlock:function(y,x,v){return s(v||"p")},mceCleanup:function(){var v=p.getBookmark();n.setContent(n.getContent({cleanup:a}),{cleanup:a});p.moveToBookmark(v)},mceRemoveNode:function(z,y,x){var v=x||p.getNode();if(v!=n.getBody()){i();n.dom.remove(v,a);g()}},mceSelectNodeDepth:function(z,y,x){var v=0;m.getParent(p.getNode(),function(A){if(A.nodeType==1&&v++==x){p.select(A);return c}},n.getBody())},mceSelectNode:function(y,x,v){p.select(v)},mceInsertContent:function(B,I,K){var y,J,E,z,F,G,D,C,L,x,A,M,v,H;y=n.parser;J=new d.html.Serializer({},n.schema);v='<span id="mce_marker" data-mce-type="bookmark">\uFEFF</span>';G={content:K,format:"html"};p.onBeforeSetContent.dispatch(p,G);K=G.content;if(K.indexOf("{$caret}")==-1){K+="{$caret}"}K=K.replace(/\{\$caret\}/,v);if(!p.isCollapsed()){n.getDoc().execCommand("Delete",false,null)}E=p.getNode();G={context:E.nodeName.toLowerCase()};F=y.parse(K,G);A=F.lastChild;if(A.attr("id")=="mce_marker"){D=A;for(A=A.prev;A;A=A.walk(true)){if(A.type==3||!m.isBlock(A.name)){A.parent.insert(D,A,A.name==="br");break}}}if(!G.invalid){K=J.serialize(F);A=E.firstChild;M=E.lastChild;if(!A||(A===M&&A.nodeName==="BR")){m.setHTML(E,K)}else{p.setContent(K)}}else{p.setContent(v);E=n.selection.getNode();z=n.getBody();if(E.nodeType==9){E=A=z}else{A=E}while(A!==z){E=A;A=A.parentNode}K=E==z?z.innerHTML:m.getOuterHTML(E);K=J.serialize(y.parse(K.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return J.serialize(F)})));if(E==z){m.setHTML(z,K)}else{m.setOuterHTML(E,K)}}D=m.get("mce_marker");C=m.getRect(D);L=m.getViewPort(n.getWin());if((C.y+C.h>L.y+L.h||C.y<L.y)||(C.x>L.x+L.w||C.x<L.x)){H=d.isIE?n.getDoc().documentElement:n.getBody();H.scrollLeft=C.x;H.scrollTop=C.y-L.h+25}x=m.createRng();A=D.previousSibling;if(A&&A.nodeType==3){x.setStart(A,A.nodeValue.length)}else{x.setStartBefore(D);x.setEndBefore(D)}m.remove(D);p.setRng(x);p.onSetContent.dispatch(p,G);n.addVisual()},mceInsertRawHTML:function(y,x,v){p.setContent("tiny_mce_marker");n.setContent(n.getContent().replace(/tiny_mce_marker/g,function(){return v}))},mceSetContent:function(y,x,v){n.setContent(v)},"Indent,Outdent":function(z){var x,v,y;x=k.indentation;v=/[a-z%]+$/i.exec(x);x=parseInt(x);if(!l("InsertUnorderedList")&&!l("InsertOrderedList")){if(!k.forced_root_block&&!m.getParent(p.getNode(),m.isBlock)){q.apply("div")}e(p.getSelectedBlocks(),function(A){if(z=="outdent"){y=Math.max(0,parseInt(A.style.paddingLeft||0)-x);m.setStyle(A,"paddingLeft",y?y+v:"")}else{m.setStyle(A,"paddingLeft",(parseInt(A.style.paddingLeft||0)+x)+v)}})}else{f(z)}},mceRepaint:function(){var x;if(d.isGecko){try{i(a);if(p.getSel()){p.getSel().selectAllChildren(n.getBody())}p.collapse(a);g()}catch(v){}}},mceToggleFormat:function(y,x,v){q.toggle(v)},InsertHorizontalRule:function(){n.execCommand("mceInsertContent",false,"<hr />")},mceToggleVisualAid:function(){n.hasVisual=!n.hasVisual;n.addVisual()},mceReplaceContent:function(y,x,v){n.execCommand("mceInsertContent",false,v.replace(/\{\$selection\}/g,p.getContent({format:"text"})))},mceInsertLink:function(z,y,x){var v;if(typeof(x)=="string"){x={href:x}}v=m.getParent(p.getNode(),"a");x.href=x.href.replace(" ","%20");if(!v||!x.href){q.remove("link")}if(x.href){q.apply("link",x,v)}},selectAll:function(){var x=m.getRoot(),v=m.createRng();v.setStart(x,0);v.setEnd(x,x.childNodes.length);n.selection.setRng(v)}});u({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(z){var x="align"+z.substring(7);var v=p.isCollapsed()?[m.getParent(p.getNode(),m.isBlock)]:p.getSelectedBlocks();var y=d.map(v,function(A){return !!q.matchNode(A,x)});return d.inArray(y,a)!==-1},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){return t(v)},mceBlockQuote:function(){return t("blockquote")},Outdent:function(){var v;if(k.inline_styles){if((v=m.getParent(p.getStart(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}if((v=m.getParent(p.getEnd(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}}return l("InsertUnorderedList")||l("InsertOrderedList")||(!k.inline_styles&&!!m.getParent(p.getNode(),"BLOCKQUOTE"))},"InsertUnorderedList,InsertOrderedList":function(v){return m.getParent(p.getNode(),v=="insertunorderedlist"?"UL":"OL")}},"state");u({"FontSize,FontName":function(y){var x=0,v;if(v=m.getParent(p.getNode(),"span")){if(y=="fontsize"){x=v.style.fontSize}else{x=v.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()}}return x}},"value");u({Undo:function(){n.undoManager.undo()},Redo:function(){n.undoManager.redo()}})}})(tinymce);(function(b){var a=b.util.Dispatcher;b.UndoManager=function(h){var l,i=0,e=[],g,k,j,f;function c(){return b.trim(h.getContent({format:"raw",no_events:1}).replace(/<span[^>]+data-mce-bogus[^>]+>[\u200B\uFEFF]+<\/span>/g,""))}function d(){l.typing=false;l.add()}onBeforeAdd=new a(l);k=new a(l);j=new a(l);f=new a(l);k.add(function(m,n){if(m.hasUndo()){return h.onChange.dispatch(h,n,m)}});j.add(function(m,n){return h.onUndo.dispatch(h,n,m)});f.add(function(m,n){return h.onRedo.dispatch(h,n,m)});h.onInit.add(function(){l.add()});h.onBeforeExecCommand.add(function(m,p,o,q,n){if(p!="Undo"&&p!="Redo"&&p!="mceRepaint"&&(!n||!n.skip_undo)){l.beforeChange()}});h.onExecCommand.add(function(m,p,o,q,n){if(p!="Undo"&&p!="Redo"&&p!="mceRepaint"&&(!n||!n.skip_undo)){l.add()}});h.onSaveContent.add(d);h.dom.bind(h.dom.getRoot(),"dragend",d);h.dom.bind(h.getDoc(),b.isGecko?"blur":"focusout",function(m){if(!h.removed&&l.typing){d()}});h.onKeyUp.add(function(m,o){var n=o.keyCode;if((n>=33&&n<=36)||(n>=37&&n<=40)||n==45||n==13||o.ctrlKey){d()}});h.onKeyDown.add(function(m,o){var n=o.keyCode;if((n>=33&&n<=36)||(n>=37&&n<=40)||n==45){if(l.typing){d()}return}if((n<16||n>20)&&n!=224&&n!=91&&!l.typing){l.beforeChange();l.typing=true;l.add()}});h.onMouseDown.add(function(m,n){if(l.typing){d()}});h.addShortcut("ctrl+z","undo_desc","Undo");h.addShortcut("ctrl+y","redo_desc","Redo");l={data:e,typing:false,onBeforeAdd:onBeforeAdd,onAdd:k,onUndo:j,onRedo:f,beforeChange:function(){g=h.selection.getBookmark(2,true)},add:function(p){var m,n=h.settings,o;p=p||{};p.content=c();l.onBeforeAdd.dispatch(l,p);o=e[i];if(o&&o.content==p.content){return null}if(e[i]){e[i].beforeBookmark=g}if(n.custom_undo_redo_levels){if(e.length>n.custom_undo_redo_levels){for(m=0;m<e.length-1;m++){e[m]=e[m+1]}e.length--;i=e.length}}p.bookmark=h.selection.getBookmark(2,true);if(i<e.length-1){e.length=i+1}e.push(p);i=e.length-1;l.onAdd.dispatch(l,p);h.isNotDirty=0;return p},undo:function(){var n,m;if(l.typing){l.add();l.typing=false}if(i>0){n=e[--i];h.setContent(n.content,{format:"raw"});h.selection.moveToBookmark(n.beforeBookmark);l.onUndo.dispatch(l,n)}return n},redo:function(){var m;if(i<e.length-1){m=e[++i];h.setContent(m.content,{format:"raw"});h.selection.moveToBookmark(m.bookmark);l.onRedo.dispatch(l,m)}return m},clear:function(){e=[];i=0;l.typing=false},hasUndo:function(){return i>0||this.typing},hasRedo:function(){return i<e.length-1&&!this.typing}};return l}})(tinymce);tinymce.ForceBlocks=function(c){var b=c.settings,e=c.dom,a=c.selection,d=c.schema.getBlockElements();function f(){var j=a.getStart(),h=c.getBody(),g,k,o,r,q,i,l,m=-16777215,p;if(!j||j.nodeType!==1||!b.forced_root_block){return}while(j&&j!=h){if(d[j.nodeName]){return}j=j.parentNode}g=a.getRng();if(g.setStart){k=g.startContainer;o=g.startOffset;r=g.endContainer;q=g.endOffset}else{if(g.item){j=g.item(0);g=c.getDoc().body.createTextRange();g.moveToElementText(j)}tmpRng=g.duplicate();tmpRng.collapse(true);o=tmpRng.move("character",m)*-1;if(!tmpRng.collapsed){tmpRng=g.duplicate();tmpRng.collapse(false);q=(tmpRng.move("character",m)*-1)-o}}j=h.firstChild;while(j){if(j.nodeType===3||(j.nodeType==1&&!d[j.nodeName])){if(!i){i=e.create(b.forced_root_block);j.parentNode.insertBefore(i,j);p=true}l=j;j=j.nextSibling;i.appendChild(l)}else{i=null;j=j.nextSibling}}if(g.setStart){g.setStart(k,o);g.setEnd(r,q);a.setRng(g)}else{try{g=c.getDoc().body.createTextRange();g.moveToElementText(h);g.collapse(true);g.moveStart("character",o);if(q>0){g.moveEnd("character",q)}g.select()}catch(n){}}if(p){c.nodeChanged()}}if(b.forced_root_block){c.onKeyUp.add(f);c.onNodeChange.add(f)}};(function(c){var b=c.DOM,a=c.dom.Event,d=c.each,e=c.extend;c.create("tinymce.ControlManager",{ControlManager:function(f,j){var h=this,g;j=j||{};h.editor=f;h.controls={};h.onAdd=new c.util.Dispatcher(h);h.onPostRender=new c.util.Dispatcher(h);h.prefix=j.prefix||f.id+"_";h._cls={};h.onPostRender.add(function(){d(h.controls,function(i){i.postRender()})})},get:function(f){return this.controls[this.prefix+f]||this.controls[f]},setActive:function(h,f){var g=null;if(g=this.get(h)){g.setActive(f)}return g},setDisabled:function(h,f){var g=null;if(g=this.get(h)){g.setDisabled(f)}return g},add:function(g){var f=this;if(g){f.controls[g.id]=g;f.onAdd.dispatch(g,f)}return g},createControl:function(j){var o,k,g,h=this,m=h.editor,n,f;if(!h.controlFactories){h.controlFactories=[];d(m.plugins,function(i){if(i.createControl){h.controlFactories.push(i)}})}n=h.controlFactories;for(k=0,g=n.length;k<g;k++){o=n[k].createControl(j,h);if(o){return h.add(o)}}if(j==="|"||j==="separator"){return h.createSeparator()}if(m.buttons&&(o=m.buttons[j])){return h.createButton(j,o)}return h.add(o)},createDropMenu:function(f,n,h){var m=this,i=m.editor,j,g,k,l;n=e({"class":"mceDropDown",constrain:i.settings.constrain_menus},n);n["class"]=n["class"]+" "+i.getParam("skin")+"Skin";if(k=i.getParam("skin_variant")){n["class"]+=" "+i.getParam("skin")+"Skin"+k.substring(0,1).toUpperCase()+k.substring(1)}n["class"]+=i.settings.directionality=="rtl"?" mceRtl":"";f=m.prefix+f;l=h||m._cls.dropmenu||c.ui.DropMenu;j=m.controls[f]=new l(f,n);j.onAddItem.add(function(r,q){var p=q.settings;p.title=i.getLang(p.title,p.title);if(!p.onclick){p.onclick=function(o){if(p.cmd){i.execCommand(p.cmd,p.ui||false,p.value)}}}});i.onRemove.add(function(){j.destroy()});if(c.isIE){j.onShowMenu.add(function(){i.focus();g=i.selection.getBookmark(1)});j.onHideMenu.add(function(){if(g){i.selection.moveToBookmark(g);g=0}})}return m.add(j)},createListBox:function(f,n,h){var l=this,j=l.editor,i,k,m;if(l.get(f)){return null}n.title=j.translate(n.title);n.scope=n.scope||j;if(!n.onselect){n.onselect=function(o){j.execCommand(n.cmd,n.ui||false,o||n.value)}}n=e({title:n.title,"class":"mce_"+f,scope:n.scope,control_manager:l},n);f=l.prefix+f;function g(o){return o.settings.use_accessible_selects&&!c.isGecko}if(j.settings.use_native_selects||g(j)){k=new c.ui.NativeListBox(f,n)}else{m=h||l._cls.listbox||c.ui.ListBox;k=new m(f,n,j)}l.controls[f]=k;if(c.isWebKit){k.onPostRender.add(function(p,o){a.add(o,"mousedown",function(){j.bookmark=j.selection.getBookmark(1)});a.add(o,"focus",function(){j.selection.moveToBookmark(j.bookmark);j.bookmark=null})})}if(k.hideMenu){j.onMouseDown.add(k.hideMenu,k)}return l.add(k)},createButton:function(m,i,l){var h=this,g=h.editor,j,k,f;if(h.get(m)){return null}i.title=g.translate(i.title);i.label=g.translate(i.label);i.scope=i.scope||g;if(!i.onclick&&!i.menu_button){i.onclick=function(){g.execCommand(i.cmd,i.ui||false,i.value)}}i=e({title:i.title,"class":"mce_"+m,unavailable_prefix:g.getLang("unavailable",""),scope:i.scope,control_manager:h},i);m=h.prefix+m;if(i.menu_button){f=l||h._cls.menubutton||c.ui.MenuButton;k=new f(m,i,g);g.onMouseDown.add(k.hideMenu,k)}else{f=h._cls.button||c.ui.Button;k=new f(m,i,g)}return h.add(k)},createMenuButton:function(h,f,g){f=f||{};f.menu_button=1;return this.createButton(h,f,g)},createSplitButton:function(m,i,l){var h=this,g=h.editor,j,k,f;if(h.get(m)){return null}i.title=g.translate(i.title);i.scope=i.scope||g;if(!i.onclick){i.onclick=function(n){g.execCommand(i.cmd,i.ui||false,n||i.value)}}if(!i.onselect){i.onselect=function(n){g.execCommand(i.cmd,i.ui||false,n||i.value)}}i=e({title:i.title,"class":"mce_"+m,scope:i.scope,control_manager:h},i);m=h.prefix+m;f=l||h._cls.splitbutton||c.ui.SplitButton;k=h.add(new f(m,i,g));g.onMouseDown.add(k.hideMenu,k);return k},createColorSplitButton:function(f,n,h){var l=this,j=l.editor,i,k,m,g;if(l.get(f)){return null}n.title=j.translate(n.title);n.scope=n.scope||j;if(!n.onclick){n.onclick=function(o){if(c.isIE){g=j.selection.getBookmark(1)}j.execCommand(n.cmd,n.ui||false,o||n.value)}}if(!n.onselect){n.onselect=function(o){j.execCommand(n.cmd,n.ui||false,o||n.value)}}n=e({title:n.title,"class":"mce_"+f,menu_class:j.getParam("skin")+"Skin",scope:n.scope,more_colors_title:j.getLang("more_colors")},n);f=l.prefix+f;m=h||l._cls.colorsplitbutton||c.ui.ColorSplitButton;k=new m(f,n,j);j.onMouseDown.add(k.hideMenu,k);j.onRemove.add(function(){k.destroy()});if(c.isIE){k.onShowMenu.add(function(){j.focus();g=j.selection.getBookmark(1)});k.onHideMenu.add(function(){if(g){j.selection.moveToBookmark(g);g=0}})}return l.add(k)},createToolbar:function(k,h,j){var i,g=this,f;k=g.prefix+k;f=j||g._cls.toolbar||c.ui.Toolbar;i=new f(k,h,g.editor);if(g.get(k)){return null}return g.add(i)},createToolbarGroup:function(k,h,j){var i,g=this,f;k=g.prefix+k;f=j||this._cls.toolbarGroup||c.ui.ToolbarGroup;i=new f(k,h,g.editor);if(g.get(k)){return null}return g.add(i)},createSeparator:function(g){var f=g||this._cls.separator||c.ui.Separator;return new f()},setControlType:function(g,f){return this._cls[g.toLowerCase()]=f},destroy:function(){d(this.controls,function(f){f.destroy()});this.controls=null}})})(tinymce);(function(d){var a=d.util.Dispatcher,e=d.each,c=d.isIE,b=d.isOpera;d.create("tinymce.WindowManager",{WindowManager:function(f){var g=this;g.editor=f;g.onOpen=new a(g);g.onClose=new a(g);g.params={};g.features={}},open:function(z,h){var v=this,k="",n,m,i=v.editor.settings.dialog_type=="modal",q,o,j,g=d.DOM.getViewPort(),r;z=z||{};h=h||{};o=b?g.w:screen.width;j=b?g.h:screen.height;z.name=z.name||"mc_"+new Date().getTime();z.width=parseInt(z.width||320);z.height=parseInt(z.height||240);z.resizable=true;z.left=z.left||parseInt(o/2)-(z.width/2);z.top=z.top||parseInt(j/2)-(z.height/2);h.inline=false;h.mce_width=z.width;h.mce_height=z.height;h.mce_auto_focus=z.auto_focus;if(i){if(c){z.center=true;z.help=false;z.dialogWidth=z.width+"px";z.dialogHeight=z.height+"px";z.scroll=z.scrollbars||false}}e(z,function(p,f){if(d.is(p,"boolean")){p=p?"yes":"no"}if(!/^(name|url)$/.test(f)){if(c&&i){k+=(k?";":"")+f+":"+p}else{k+=(k?",":"")+f+"="+p}}});v.features=z;v.params=h;v.onOpen.dispatch(v,z,h);r=z.url||z.file;r=d._addVer(r);try{if(c&&i){q=1;window.showModalDialog(r,window,k)}else{q=window.open(r,z.name,k)}}catch(l){}if(!q){alert(v.editor.getLang("popup_blocked"))}},close:function(f){f.close();this.onClose.dispatch(this)},createInstance:function(i,h,g,m,l,k){var j=d.resolve(i);return new j(h,g,m,l,k)},confirm:function(h,f,i,g){g=g||window;f.call(i||this,g.confirm(this._decode(this.editor.getLang(h,h))))},alert:function(h,f,j,g){var i=this;g=g||window;g.alert(i._decode(i.editor.getLang(h,h)));if(f){f.call(j||i)}},resizeBy:function(f,g,h){h.resizeBy(f,g)},_decode:function(f){return d.DOM.decode(f).replace(/\\n/g,"\n")}})}(tinymce));(function(a){a.Formatter=function(aa){var Q={},T=a.each,c=aa.dom,r=aa.selection,t=a.dom.TreeWalker,N=new a.dom.RangeUtils(c),d=aa.schema.isValidChild,H=c.isBlock,m=aa.settings.forced_root_block,s=c.nodeIndex,G=a.isGecko?"\u200B":"\uFEFF",e=/^(src|href|style)$/,X=false,C=true,P,D,x=c.getContentEditable;function A(ab){return ab instanceof Array}function n(ac,ab){return c.getParents(ac,ab,c.getRoot())}function b(ab){return ab.nodeType===1&&ab.id==="_mce_caret"}function j(){l({alignleft:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"left"},defaultBlock:"div"},{selector:"img,table",collapsed:false,styles:{"float":"left"}}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"center"},defaultBlock:"div"},{selector:"img",collapsed:false,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:false,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"right"},defaultBlock:"div"},{selector:"img,table",collapsed:false,styles:{"float":"right"}}],alignfull:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"justify"},defaultBlock:"div"}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:true},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:true},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},wrap_links:false},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},wrap_links:false},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},link:{inline:"a",selector:"a",remove:"all",split:true,deep:true,onmatch:function(ab){return true},onformat:function(ad,ab,ac){T(ac,function(af,ae){c.setAttrib(ad,ae,af)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike",remove:"all",split:true,expand:false,block_expand:true,deep:true},{selector:"span",attributes:["style","class"],remove:"empty",split:true,expand:false,deep:true},{selector:"*",attributes:["style","class"],split:false,expand:false,deep:true}]});T("p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp".split(/\s/),function(ab){l(ab,{block:ab,remove:"all"})});l(aa.settings.formats)}function W(){aa.addShortcut("ctrl+b","bold_desc","Bold");aa.addShortcut("ctrl+i","italic_desc","Italic");aa.addShortcut("ctrl+u","underline_desc","Underline");for(var ab=1;ab<=6;ab++){aa.addShortcut("ctrl+"+ab,"",["FormatBlock",false,"h"+ab])}aa.addShortcut("ctrl+7","",["FormatBlock",false,"p"]);aa.addShortcut("ctrl+8","",["FormatBlock",false,"div"]);aa.addShortcut("ctrl+9","",["FormatBlock",false,"address"])}function V(ab){return ab?Q[ab]:Q}function l(ab,ac){if(ab){if(typeof(ab)!=="string"){T(ab,function(ae,ad){l(ad,ae)})}else{ac=ac.length?ac:[ac];T(ac,function(ad){if(ad.deep===D){ad.deep=!ad.selector}if(ad.split===D){ad.split=!ad.selector||ad.inline}if(ad.remove===D&&ad.selector&&!ad.inline){ad.remove="none"}if(ad.selector&&ad.inline){ad.mixed=true;ad.block_expand=true}if(typeof(ad.classes)==="string"){ad.classes=ad.classes.split(/\s+/)}});Q[ab]=ac}}}var i=function(ac){var ab;aa.dom.getParent(ac,function(ad){ab=aa.dom.getStyle(ad,"text-decoration");return ab&&ab!=="none"});return ab};var L=function(ab){var ac;if(ab.nodeType===1&&ab.parentNode&&ab.parentNode.nodeType===1){ac=i(ab.parentNode);if(aa.dom.getStyle(ab,"color")&&ac){aa.dom.setStyle(ab,"text-decoration",ac)}else{if(aa.dom.getStyle(ab,"textdecoration")===ac){aa.dom.setStyle(ab,"text-decoration",null)}}}};function Y(ae,al,ag){var ah=V(ae),am=ah[0],ak,ac,aj,ai=r.isCollapsed();function ab(aq,ap){ap=ap||am;if(aq){if(ap.onformat){ap.onformat(aq,ap,al,ag)}T(ap.styles,function(at,ar){c.setStyle(aq,ar,q(at,al))});T(ap.attributes,function(at,ar){c.setAttrib(aq,ar,q(at,al))});T(ap.classes,function(ar){ar=q(ar,al);if(!c.hasClass(aq,ar)){c.addClass(aq,ar)}})}}function af(){function ar(ay,aw){var ax=new t(aw);for(ag=ax.current();ag;ag=ax.prev()){if(ag.childNodes.length>1||ag==ay||ag.tagName=="BR"){return ag}}}var aq=aa.selection.getRng();var av=aq.startContainer;var ap=aq.endContainer;if(av!=ap&&aq.endOffset===0){var au=ar(av,ap);var at=au.nodeType==3?au.length:au.childNodes.length;aq.setEnd(au,at)}return aq}function ad(at,ay,aw,av,aq){var ap=[],ar=-1,ax,aA=-1,au=-1,az;T(at.childNodes,function(aC,aB){if(aC.nodeName==="UL"||aC.nodeName==="OL"){ar=aB;ax=aC;return false}});T(at.childNodes,function(aC,aB){if(aC.nodeName==="SPAN"&&c.getAttrib(aC,"data-mce-type")=="bookmark"){if(aC.id==ay.id+"_start"){aA=aB}else{if(aC.id==ay.id+"_end"){au=aB}}}});if(ar<=0||(aA<ar&&au>ar)){T(a.grep(at.childNodes),aq);return 0}else{az=c.clone(aw,X);T(a.grep(at.childNodes),function(aC,aB){if((aA<ar&&aB<ar)||(aA>ar&&aB>ar)){ap.push(aC);aC.parentNode.removeChild(aC)}});if(aA<ar){at.insertBefore(az,ax)}else{if(aA>ar){at.insertBefore(az,ax.nextSibling)}}av.push(az);T(ap,function(aB){az.appendChild(aB)});return az}}function an(aq,at,aw){var ap=[],av,ar,au=true;av=am.inline||am.block;ar=c.create(av);ab(ar);N.walk(aq,function(ax){var ay;function az(aA){var aF,aD,aB,aC,aE;aE=au;aF=aA.nodeName.toLowerCase();aD=aA.parentNode.nodeName.toLowerCase();if(aA.nodeType===1&&x(aA)){aE=au;au=x(aA)==="true";aC=true}if(g(aF,"br")){ay=0;if(am.block){c.remove(aA)}return}if(am.wrapper&&y(aA,ae,al)){ay=0;return}if(au&&!aC&&am.block&&!am.wrapper&&I(aF)){aA=c.rename(aA,av);ab(aA);ap.push(aA);ay=0;return}if(am.selector){T(ah,function(aG){if("collapsed" in aG&&aG.collapsed!==ai){return}if(c.is(aA,aG.selector)&&!b(aA)){ab(aA,aG);aB=true}});if(!am.inline||aB){ay=0;return}}if(au&&!aC&&d(av,aF)&&d(aD,av)&&!(!aw&&aA.nodeType===3&&aA.nodeValue.length===1&&aA.nodeValue.charCodeAt(0)===65279)&&!b(aA)){if(!ay){ay=c.clone(ar,X);aA.parentNode.insertBefore(ay,aA);ap.push(ay)}ay.appendChild(aA)}else{if(aF=="li"&&at){ay=ad(aA,at,ar,ap,az)}else{ay=0;T(a.grep(aA.childNodes),az);if(aC){au=aE}ay=0}}}T(ax,az)});if(am.wrap_links===false){T(ap,function(ax){function ay(aC){var aB,aA,az;if(aC.nodeName==="A"){aA=c.clone(ar,X);ap.push(aA);az=a.grep(aC.childNodes);for(aB=0;aB<az.length;aB++){aA.appendChild(az[aB])}aC.appendChild(aA)}T(a.grep(aC.childNodes),ay)}ay(ax)})}T(ap,function(az){var ax;function aA(aC){var aB=0;T(aC.childNodes,function(aD){if(!f(aD)&&!K(aD)){aB++}});return aB}function ay(aB){var aD,aC;T(aB.childNodes,function(aE){if(aE.nodeType==1&&!K(aE)&&!b(aE)){aD=aE;return X}});if(aD&&h(aD,am)){aC=c.clone(aD,X);ab(aC);c.replace(aC,aB,C);c.remove(aD,1)}return aC||aB}ax=aA(az);if((ap.length>1||!H(az))&&ax===0){c.remove(az,1);return}if(am.inline||am.wrapper){if(!am.exact&&ax===1){az=ay(az)}T(ah,function(aB){T(c.select(aB.inline,az),function(aD){var aC;if(aB.wrap_links===false){aC=aD.parentNode;do{if(aC.nodeName==="A"){return}}while(aC=aC.parentNode)}Z(aB,al,aD,aB.exact?aD:null)})});if(y(az.parentNode,ae,al)){c.remove(az,1);az=0;return C}if(am.merge_with_parents){c.getParent(az.parentNode,function(aB){if(y(aB,ae,al)){c.remove(az,1);az=0;return C}})}if(az&&am.merge_siblings!==false){az=u(E(az),az);az=u(az,E(az,C))}}})}if(am){if(ag){if(ag.nodeType){ac=c.createRng();ac.setStartBefore(ag);ac.setEndAfter(ag);an(p(ac,ah),null,true)}else{an(ag,null,true)}}else{if(!ai||!am.inline||c.select("td.mceSelected,th.mceSelected").length){var ao=aa.selection.getNode();if(!m&&ah[0].defaultBlock&&!c.getParent(ao,c.isBlock)){Y(ah[0].defaultBlock)}aa.selection.setRng(af());ak=r.getBookmark();an(p(r.getRng(C),ah),ak);if(am.styles&&(am.styles.color||am.styles.textDecoration)){a.walk(ao,L,"childNodes");L(ao)}r.moveToBookmark(ak);R(r.getRng(C));aa.nodeChanged()}else{U("apply",ae,al)}}}}function B(ad,am,af){var ag=V(ad),ao=ag[0],ak,aj,ac,al=true;function ae(av){var au,at,ar,aq,ax,aw;if(av.nodeType===1&&x(av)){ax=al;al=x(av)==="true";aw=true}au=a.grep(av.childNodes);if(al&&!aw){for(at=0,ar=ag.length;at<ar;at++){if(Z(ag[at],am,av,av)){break}}}if(ao.deep){if(au.length){for(at=0,ar=au.length;at<ar;at++){ae(au[at])}if(aw){al=ax}}}}function ah(aq){var ar;T(n(aq.parentNode).reverse(),function(at){var au;if(!ar&&at.id!="_start"&&at.id!="_end"){au=y(at,ad,am);if(au&&au.split!==false){ar=at}}});return ar}function ab(au,aq,aw,az){var aA,ay,ax,at,av,ar;if(au){ar=au.parentNode;for(aA=aq.parentNode;aA&&aA!=ar;aA=aA.parentNode){ay=c.clone(aA,X);for(av=0;av<ag.length;av++){if(Z(ag[av],am,ay,ay)){ay=0;break}}if(ay){if(ax){ay.appendChild(ax)}if(!at){at=ay}ax=ay}}if(az&&(!ao.mixed||!H(au))){aq=c.split(au,aq)}if(ax){aw.parentNode.insertBefore(ax,aw);at.appendChild(aw)}}return aq}function an(aq){return ab(ah(aq),aq,aq,true)}function ai(at){var ar=c.get(at?"_start":"_end"),aq=ar[at?"firstChild":"lastChild"];if(K(aq)){aq=aq[at?"firstChild":"lastChild"]}c.remove(ar,true);return aq}function ap(aq){var at,au,ar;aq=p(aq,ag,C);if(ao.split){at=M(aq,C);au=M(aq);if(at!=au){if(/^(TR|TD)$/.test(at.nodeName)&&at.firstChild){at=(at.nodeName=="TD"?at.firstChild:at.firstChild.firstChild)||at}at=S(at,"span",{id:"_start","data-mce-type":"bookmark"});au=S(au,"span",{id:"_end","data-mce-type":"bookmark"});an(at);an(au);at=ai(C);au=ai()}else{at=au=an(at)}aq.startContainer=at.parentNode;aq.startOffset=s(at);aq.endContainer=au.parentNode;aq.endOffset=s(au)+1}N.walk(aq,function(av){T(av,function(aw){ae(aw);if(aw.nodeType===1&&aa.dom.getStyle(aw,"text-decoration")==="underline"&&aw.parentNode&&i(aw.parentNode)==="underline"){Z({deep:false,exact:true,inline:"span",styles:{textDecoration:"underline"}},null,aw)}})})}if(af){if(af.nodeType){ac=c.createRng();ac.setStartBefore(af);ac.setEndAfter(af);ap(ac)}else{ap(af)}return}if(!r.isCollapsed()||!ao.inline||c.select("td.mceSelected,th.mceSelected").length){ak=r.getBookmark();ap(r.getRng(C));r.moveToBookmark(ak);if(ao.inline&&k(ad,am,r.getStart())){R(r.getRng(true))}aa.nodeChanged()}else{U("remove",ad,am)}}function F(ac,ae,ad){var ab=V(ac);if(k(ac,ae,ad)&&(!("toggle" in ab[0])||ab[0].toggle)){B(ac,ae,ad)}else{Y(ac,ae,ad)}}function y(ac,ab,ah,af){var ad=V(ab),ai,ag,ae;function aj(an,ap,aq){var am,ao,ak=ap[aq],al;if(ap.onmatch){return ap.onmatch(an,ap,aq)}if(ak){if(ak.length===D){for(am in ak){if(ak.hasOwnProperty(am)){if(aq==="attributes"){ao=c.getAttrib(an,am)}else{ao=O(an,am)}if(af&&!ao&&!ap.exact){return}if((!af||ap.exact)&&!g(ao,q(ak[am],ah))){return}}}}else{for(al=0;al<ak.length;al++){if(aq==="attributes"?c.getAttrib(an,ak[al]):O(an,ak[al])){return ap}}}}return ap}if(ad&&ac){for(ag=0;ag<ad.length;ag++){ai=ad[ag];if(h(ac,ai)&&aj(ac,ai,"attributes")&&aj(ac,ai,"styles")){if(ae=ai.classes){for(ag=0;ag<ae.length;ag++){if(!c.hasClass(ac,ae[ag])){return}}}return ai}}}}function k(ad,af,ae){var ac;function ab(ag){ag=c.getParent(ag,function(ah){return !!y(ah,ad,af,true)});return y(ag,ad,af)}if(ae){return ab(ae)}ae=r.getNode();if(ab(ae)){return C}ac=r.getStart();if(ac!=ae){if(ab(ac)){return C}}return X}function v(ai,ah){var af,ag=[],ae={},ad,ac,ab;af=r.getStart();c.getParent(af,function(al){var ak,aj;for(ak=0;ak<ai.length;ak++){aj=ai[ak];if(!ae[aj]&&y(al,aj,ah)){ae[aj]=true;ag.push(aj)}}},c.getRoot());return ag}function z(af){var ah=V(af),ae,ad,ag,ac,ab;if(ah){ae=r.getStart();ad=n(ae);for(ac=ah.length-1;ac>=0;ac--){ab=ah[ac].selector;if(!ab){return C}for(ag=ad.length-1;ag>=0;ag--){if(c.is(ad[ag],ab)){return C}}}}return X}function J(ab,ad){var ac;if(!P){P={};ac={};aa.onNodeChange.addToTop(function(af,ae,ah){var ag=n(ah),ai={};T(P,function(aj,ak){T(ag,function(al){if(y(al,ak,{},true)){if(!ac[ak]){T(aj,function(am){am(true,{node:al,format:ak,parents:ag})});ac[ak]=aj}ai[ak]=aj;return false}})});T(ac,function(aj,ak){if(!ai[ak]){delete ac[ak];T(aj,function(al){al(false,{node:ah,format:ak,parents:ag})})}})})}T(ab.split(","),function(ae){if(!P[ae]){P[ae]=[]}P[ae].push(ad)});return this}a.extend(this,{get:V,register:l,apply:Y,remove:B,toggle:F,match:k,matchAll:v,matchNode:y,canApply:z,formatChanged:J});j();W();function h(ab,ac){if(g(ab,ac.inline)){return C}if(g(ab,ac.block)){return C}if(ac.selector){return c.is(ab,ac.selector)}}function g(ac,ab){ac=ac||"";ab=ab||"";ac=""+(ac.nodeName||ac);ab=""+(ab.nodeName||ab);return ac.toLowerCase()==ab.toLowerCase()}function O(ac,ab){var ad=c.getStyle(ac,ab);if(ab=="color"||ab=="backgroundColor"){ad=c.toHex(ad)}if(ab=="fontWeight"&&ad==700){ad="bold"}return""+ad}function q(ab,ac){if(typeof(ab)!="string"){ab=ab(ac)}else{if(ac){ab=ab.replace(/%(\w+)/g,function(ae,ad){return ac[ad]||ae})}}return ab}function f(ab){return ab&&ab.nodeType===3&&/^([\t \r\n]+|)$/.test(ab.nodeValue)}function S(ad,ac,ab){var ae=c.create(ac,ab);ad.parentNode.insertBefore(ae,ad);ae.appendChild(ad);return ae}function p(ab,am,ae){var ap,an,ah,al,ad=ab.startContainer,ai=ab.startOffset,ar=ab.endContainer,ak=ab.endOffset;function ao(az){var au,ax,ay,aw,av,at;au=ax=az?ad:ar;av=az?"previousSibling":"nextSibling";at=c.getRoot();if(au.nodeType==3&&!f(au)){if(az?ai>0:ak<au.nodeValue.length){return au}}for(;;){if(!am[0].block_expand&&H(ax)){return ax}for(aw=ax[av];aw;aw=aw[av]){if(!K(aw)&&!f(aw)){return ax}}if(ax.parentNode==at){au=ax;break}ax=ax.parentNode}return au}function ag(at,au){if(au===D){au=at.nodeType===3?at.length:at.childNodes.length}while(at&&at.hasChildNodes()){at=at.childNodes[au];if(at){au=at.nodeType===3?at.length:at.childNodes.length}}return{node:at,offset:au}}if(ad.nodeType==1&&ad.hasChildNodes()){an=ad.childNodes.length-1;ad=ad.childNodes[ai>an?an:ai];if(ad.nodeType==3){ai=0}}if(ar.nodeType==1&&ar.hasChildNodes()){an=ar.childNodes.length-1;ar=ar.childNodes[ak>an?an:ak-1];if(ar.nodeType==3){ak=ar.nodeValue.length}}function aq(au){var at=au;while(at){if(at.nodeType===1&&x(at)){return x(at)==="false"?at:au}at=at.parentNode}return au}function aj(au,ay,aA){var ax,av,az,at;function aw(aC,aE){var aF,aB,aD=aC.nodeValue;if(typeof(aE)=="undefined"){aE=aA?aD.length:0}if(aA){aF=aD.lastIndexOf(" ",aE);aB=aD.lastIndexOf("\u00a0",aE);aF=aF>aB?aF:aB;if(aF!==-1&&!ae){aF++}}else{aF=aD.indexOf(" ",aE);aB=aD.indexOf("\u00a0",aE);aF=aF!==-1&&(aB===-1||aF<aB)?aF:aB}return aF}if(au.nodeType===3){az=aw(au,ay);if(az!==-1){return{container:au,offset:az}}at=au}ax=new t(au,c.getParent(au,H)||aa.getBody());while(av=ax[aA?"prev":"next"]()){if(av.nodeType===3){at=av;az=aw(av);if(az!==-1){return{container:av,offset:az}}}else{if(H(av)){break}}}if(at){if(aA){ay=0}else{ay=at.length}return{container:at,offset:ay}}}function af(au,at){var av,aw,ay,ax;if(au.nodeType==3&&au.nodeValue.length===0&&au[at]){au=au[at]}av=n(au);for(aw=0;aw<av.length;aw++){for(ay=0;ay<am.length;ay++){ax=am[ay];if("collapsed" in ax&&ax.collapsed!==ab.collapsed){continue}if(c.is(av[aw],ax.selector)){return av[aw]}}}return au}function ac(au,at,aw){var av;if(!am[0].wrapper){av=c.getParent(au,am[0].block)}if(!av){av=c.getParent(au.nodeType==3?au.parentNode:au,H)}if(av&&am[0].wrapper){av=n(av,"ul,ol").reverse()[0]||av}if(!av){av=au;while(av[at]&&!H(av[at])){av=av[at];if(g(av,"br")){break}}}return av||au}ad=aq(ad);ar=aq(ar);if(K(ad.parentNode)||K(ad)){ad=K(ad)?ad:ad.parentNode;ad=ad.nextSibling||ad;if(ad.nodeType==3){ai=0}}if(K(ar.parentNode)||K(ar)){ar=K(ar)?ar:ar.parentNode;ar=ar.previousSibling||ar;if(ar.nodeType==3){ak=ar.length}}if(am[0].inline){if(ab.collapsed){al=aj(ad,ai,true);if(al){ad=al.container;ai=al.offset}al=aj(ar,ak);if(al){ar=al.container;ak=al.offset}}ah=ag(ar,ak);if(ah.node){while(ah.node&&ah.offset===0&&ah.node.previousSibling){ah=ag(ah.node.previousSibling)}if(ah.node&&ah.offset>0&&ah.node.nodeType===3&&ah.node.nodeValue.charAt(ah.offset-1)===" "){if(ah.offset>1){ar=ah.node;ar.splitText(ah.offset-1)}}}}if(am[0].inline||am[0].block_expand){if(!am[0].inline||(ad.nodeType!=3||ai===0)){ad=ao(true)}if(!am[0].inline||(ar.nodeType!=3||ak===ar.nodeValue.length)){ar=ao()}}if(am[0].selector&&am[0].expand!==X&&!am[0].inline){ad=af(ad,"previousSibling");ar=af(ar,"nextSibling")}if(am[0].block||am[0].selector){ad=ac(ad,"previousSibling");ar=ac(ar,"nextSibling");if(am[0].block){if(!H(ad)){ad=ao(true)}if(!H(ar)){ar=ao()}}}if(ad.nodeType==1){ai=s(ad);ad=ad.parentNode}if(ar.nodeType==1){ak=s(ar)+1;ar=ar.parentNode}return{startContainer:ad,startOffset:ai,endContainer:ar,endOffset:ak}}function Z(ah,ag,ae,ab){var ad,ac,af;if(!h(ae,ah)){return X}if(ah.remove!="all"){T(ah.styles,function(aj,ai){aj=q(aj,ag);if(typeof(ai)==="number"){ai=aj;ab=0}if(!ab||g(O(ab,ai),aj)){c.setStyle(ae,ai,"")}af=1});if(af&&c.getAttrib(ae,"style")==""){ae.removeAttribute("style");ae.removeAttribute("data-mce-style")}T(ah.attributes,function(ak,ai){var aj;ak=q(ak,ag);if(typeof(ai)==="number"){ai=ak;ab=0}if(!ab||g(c.getAttrib(ab,ai),ak)){if(ai=="class"){ak=c.getAttrib(ae,ai);if(ak){aj="";T(ak.split(/\s+/),function(al){if(/mce\w+/.test(al)){aj+=(aj?" ":"")+al}});if(aj){c.setAttrib(ae,ai,aj);return}}}if(ai=="class"){ae.removeAttribute("className")}if(e.test(ai)){ae.removeAttribute("data-mce-"+ai)}ae.removeAttribute(ai)}});T(ah.classes,function(ai){ai=q(ai,ag);if(!ab||c.hasClass(ab,ai)){c.removeClass(ae,ai)}});ac=c.getAttribs(ae);for(ad=0;ad<ac.length;ad++){if(ac[ad].nodeName.indexOf("_")!==0){return X}}}if(ah.remove!="none"){o(ae,ah);return C}}function o(ad,ae){var ab=ad.parentNode,ac;function af(ah,ag,ai){ah=E(ah,ag,ai);return !ah||(ah.nodeName=="BR"||H(ah))}if(ae.block){if(!m){if(H(ad)&&!H(ab)){if(!af(ad,X)&&!af(ad.firstChild,C,1)){ad.insertBefore(c.create("br"),ad.firstChild)}if(!af(ad,C)&&!af(ad.lastChild,X,1)){ad.appendChild(c.create("br"))}}}else{if(ab==c.getRoot()){if(!ae.list_block||!g(ad,ae.list_block)){T(a.grep(ad.childNodes),function(ag){if(d(m,ag.nodeName.toLowerCase())){if(!ac){ac=S(ag,m)}else{ac.appendChild(ag)}}else{ac=0}})}}}}if(ae.selector&&ae.inline&&!g(ae.inline,ad)){return}c.remove(ad,1)}function E(ac,ab,ad){if(ac){ab=ab?"nextSibling":"previousSibling";for(ac=ad?ac:ac[ab];ac;ac=ac[ab]){if(ac.nodeType==1||!f(ac)){return ac}}}}function K(ab){return ab&&ab.nodeType==1&&ab.getAttribute("data-mce-type")=="bookmark"}function u(af,ae){var ab,ad,ac;function ah(ak,aj){if(ak.nodeName!=aj.nodeName){return X}function ai(am){var an={};T(c.getAttribs(am),function(ao){var ap=ao.nodeName.toLowerCase();if(ap.indexOf("_")!==0&&ap!=="style"){an[ap]=c.getAttrib(am,ap)}});return an}function al(ap,ao){var an,am;for(am in ap){if(ap.hasOwnProperty(am)){an=ao[am];if(an===D){return X}if(ap[am]!=an){return X}delete ao[am]}}for(am in ao){if(ao.hasOwnProperty(am)){return X}}return C}if(!al(ai(ak),ai(aj))){return X}if(!al(c.parseStyle(c.getAttrib(ak,"style")),c.parseStyle(c.getAttrib(aj,"style")))){return X}return C}function ag(aj,ai){for(ad=aj;ad;ad=ad[ai]){if(ad.nodeType==3&&ad.nodeValue.length!==0){return aj}if(ad.nodeType==1&&!K(ad)){return ad}}return aj}if(af&&ae){af=ag(af,"previousSibling");ae=ag(ae,"nextSibling");if(ah(af,ae)){for(ad=af.nextSibling;ad&&ad!=ae;){ac=ad;ad=ad.nextSibling;af.appendChild(ac)}c.remove(ae);T(a.grep(ae.childNodes),function(ai){af.appendChild(ai)});return af}}return ae}function I(ab){return/^(h[1-6]|p|div|pre|address|dl|dt|dd)$/.test(ab)}function M(ac,ag){var ab,af,ad,ae;ab=ac[ag?"startContainer":"endContainer"];af=ac[ag?"startOffset":"endOffset"];if(ab.nodeType==1){ad=ab.childNodes.length-1;if(!ag&&af){af--}ab=ab.childNodes[af>ad?ad:af]}if(ab.nodeType===3&&ag&&af>=ab.nodeValue.length){ab=new t(ab,aa.getBody()).next()||ab}if(ab.nodeType===3&&!ag&&af===0){ab=new t(ab,aa.getBody()).prev()||ab}return ab}function U(ak,ab,ai){var al="_mce_caret",ac=aa.settings.caret_debug;function ad(ap){var ao=c.create("span",{id:al,"data-mce-bogus":true,style:ac?"color:red":""});if(ap){ao.appendChild(aa.getDoc().createTextNode(G))}return ao}function aj(ap,ao){while(ap){if((ap.nodeType===3&&ap.nodeValue!==G)||ap.childNodes.length>1){return false}if(ao&&ap.nodeType===1){ao.push(ap)}ap=ap.firstChild}return true}function ag(ao){while(ao){if(ao.id===al){return ao}ao=ao.parentNode}}function af(ao){var ap;if(ao){ap=new t(ao,ao);for(ao=ap.current();ao;ao=ap.next()){if(ao.nodeType===3){return ao}}}}function ae(aq,ap){var ar,ao;if(!aq){aq=ag(r.getStart());if(!aq){while(aq=c.get(al)){ae(aq,false)}}}else{ao=r.getRng(true);if(aj(aq)){if(ap!==false){ao.setStartBefore(aq);ao.setEndBefore(aq)}c.remove(aq)}else{ar=af(aq);if(ar.nodeValue.charAt(0)===G){ar=ar.deleteData(0,1)}c.remove(aq,1)}r.setRng(ao)}}function ah(){var aq,ao,av,au,ar,ap,at;aq=r.getRng(true);au=aq.startOffset;ap=aq.startContainer;at=ap.nodeValue;ao=ag(r.getStart());if(ao){av=af(ao)}if(at&&au>0&&au<at.length&&/\w/.test(at.charAt(au))&&/\w/.test(at.charAt(au-1))){ar=r.getBookmark();aq.collapse(true);aq=p(aq,V(ab));aq=N.split(aq);Y(ab,ai,aq);r.moveToBookmark(ar)}else{if(!ao||av.nodeValue!==G){ao=ad(true);av=ao.firstChild;aq.insertNode(ao);au=1;Y(ab,ai,ao)}else{Y(ab,ai,ao)}r.setCursorLocation(av,au)}}function am(){var ao=r.getRng(true),ap,ar,av,au,aq,ay,ax=[],at,aw;ap=ao.startContainer;ar=ao.startOffset;aq=ap;if(ap.nodeType==3){if(ar!=ap.nodeValue.length||ap.nodeValue===G){au=true}aq=aq.parentNode}while(aq){if(y(aq,ab,ai)){ay=aq;break}if(aq.nextSibling){au=true}ax.push(aq);aq=aq.parentNode}if(!ay){return}if(au){av=r.getBookmark();ao.collapse(true);ao=p(ao,V(ab),true);ao=N.split(ao);B(ab,ai,ao);r.moveToBookmark(av)}else{aw=ad();aq=aw;for(at=ax.length-1;at>=0;at--){aq.appendChild(c.clone(ax[at],false));aq=aq.firstChild}aq.appendChild(c.doc.createTextNode(G));aq=aq.firstChild;c.insertAfter(aw,ay);r.setCursorLocation(aq,1)}}function an(){var ap,ao,aq;ao=ag(r.getStart());if(ao&&!c.isEmpty(ao)){a.walk(ao,function(ar){if(ar.nodeType==1&&ar.id!==al&&!c.isEmpty(ar)){c.setAttrib(ar,"data-mce-bogus",null)}},"childNodes")}}if(!self._hasCaretEvents){aa.onBeforeGetContent.addToTop(function(){var ao=[],ap;if(aj(ag(r.getStart()),ao)){ap=ao.length;while(ap--){c.setAttrib(ao[ap],"data-mce-bogus","1")}}});a.each("onMouseUp onKeyUp".split(" "),function(ao){aa[ao].addToTop(function(){ae();an()})});aa.onKeyDown.addToTop(function(ao,aq){var ap=aq.keyCode;if(ap==8||ap==37||ap==39){ae(ag(r.getStart()))}an()});r.onSetContent.add(an);self._hasCaretEvents=true}if(ak=="apply"){ah()}else{am()}}function R(ac){var ab=ac.startContainer,ai=ac.startOffset,ae,ah,ag,ad,af;if(ab.nodeType==3&&ai>=ab.nodeValue.length){ai=s(ab);ab=ab.parentNode;ae=true}if(ab.nodeType==1){ad=ab.childNodes;ab=ad[Math.min(ai,ad.length-1)];ah=new t(ab,c.getParent(ab,c.isBlock));if(ai>ad.length-1||ae){ah.next()}for(ag=ah.current();ag;ag=ah.next()){if(ag.nodeType==3&&!f(ag)){af=c.create("a",null,G);ag.parentNode.insertBefore(af,ag);ac.setStart(ag,0);r.setRng(ac);c.remove(af);return}}}}}})(tinymce);tinymce.onAddEditor.add(function(e,a){var d,h,g,c=a.settings;function b(j,i){e.each(i,function(l,k){if(l){g.setStyle(j,k,l)}});g.rename(j,"span")}function f(i,j){g=i.dom;if(c.convert_fonts_to_spans){e.each(g.select("font,u,strike",j.node),function(k){d[k.nodeName.toLowerCase()](a.dom,k)})}}if(c.inline_styles){h=e.explode(c.font_size_legacy_values);d={font:function(j,i){b(i,{backgroundColor:i.style.backgroundColor,color:i.color,fontFamily:i.face,fontSize:h[parseInt(i.size,10)-1]})},u:function(j,i){b(i,{textDecoration:"underline"})},strike:function(j,i){b(i,{textDecoration:"line-through"})}};a.onPreProcess.add(f);a.onSetContent.add(f);a.onInit.add(function(){a.selection.onSetContent.add(f)})}});(function(b){var a=b.dom.TreeWalker;b.EnterKey=function(e){var h=e.dom,d=e.selection,c=e.settings,g=e.undoManager;function f(y){var u=d.getRng(true),C,i,x,t,o,H,n,j,l,s,E,v,z;function B(I){return I&&h.isBlock(I)&&!/^(TD|TH|CAPTION)$/.test(I.nodeName)&&!/^(fixed|absolute)/i.test(I.style.position)&&h.getContentEditable(I)!=="true"}function m(J){var O,M,I,P,N,L=J,K;I=h.createRng();if(J.hasChildNodes()){O=new a(J,J);while(M=O.current()){if(M.nodeType==3){I.setStart(M,0);I.setEnd(M,0);break}if(/^(BR|IMG)$/.test(M.nodeName)){I.setStartBefore(M);I.setEndBefore(M);break}L=M;M=O.next()}if(!M){I.setStart(L,0);I.setEnd(L,0)}}else{if(J.nodeName=="BR"){if(J.nextSibling&&h.isBlock(J.nextSibling)){if(!H||H<9){K=h.create("br");J.parentNode.insertBefore(K,J)}I.setStartBefore(J);I.setEndBefore(J)}else{I.setStartAfter(J);I.setEndAfter(J)}}else{I.setStart(J,0);I.setEnd(J,0)}}d.setRng(I);h.remove(K);N=h.getViewPort(e.getWin());P=h.getPos(J).y;if(P<N.y||P+25>N.y+N.h){e.getWin().scrollTo(0,P<N.y?P:P-N.h+25)}}function q(J){var K=x,M,L,I;M=J||s=="TABLE"?h.create(J||v):o.cloneNode(false);I=M;if(c.keep_styles!==false){do{if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(K.nodeName)){L=K.cloneNode(false);h.setAttrib(L,"id","");if(M.hasChildNodes()){L.appendChild(M.firstChild);M.appendChild(L)}else{I=L;M.appendChild(L)}}}while(K=K.parentNode)}if(!b.isIE){I.innerHTML="<br>"}return M}function p(L){var K,J,I;if(x.nodeType==3&&(L?t>0:t<x.nodeValue.length)){return false}if(x.parentNode==o&&z&&!L){return true}if(x.nodeName==="TABLE"||(x.previousSibling&&x.previousSibling.nodeName=="TABLE")){return(z&&!L)||(!z&&L)}K=new a(x,o);while(J=(L?K.prev():K.next())){if(J.nodeType===1){if(J.getAttribute("data-mce-bogus")){continue}I=J.nodeName.toLowerCase();if(I==="IMG"){return false}}else{if(J.nodeType===3&&!/^[ \t\r\n]*$/.test(J.nodeValue)){return false}}}return true}function k(I,O){var P,N,K,M,L,J=v||"P";N=h.getParent(I,h.isBlock);if(!N||!B(N)){N=N||i;if(!N.hasChildNodes()){P=h.create(J);N.appendChild(P);u.setStart(P,0);u.setEnd(P,0);return P}M=I;while(M.parentNode!=N){M=M.parentNode}while(M&&!h.isBlock(M)){K=M;M=M.previousSibling}if(K){P=h.create(J);K.parentNode.insertBefore(P,K);M=K;while(M&&!h.isBlock(M)){L=M.nextSibling;P.appendChild(M);M=L}u.setStart(I,O);u.setEnd(I,O)}}return I}function D(){function I(K){var J=l[K?"firstChild":"lastChild"];while(J){if(J.nodeType==1){break}J=J[K?"nextSibling":"previousSibling"]}return J===o}n=v?q(v):h.create("BR");if(I(true)&&I()){h.replace(n,l)}else{if(I(true)){l.parentNode.insertBefore(n,l)}else{if(I()){h.insertAfter(n,l)}else{C=u.cloneRange();C.setStartAfter(o);C.setEndAfter(l);j=C.extractContents();h.insertAfter(j,l);h.insertAfter(n,l)}}}h.remove(o);m(n);g.add()}function A(){var J=new a(x,o),I;while(I=J.current()){if(I.nodeName=="BR"){return true}I=J.next()}}function G(){var J,I;if(x&&x.nodeType==3&&t>=x.nodeValue.length){if(!b.isIE&&!A()){J=h.create("br");u.insertNode(J);u.setStartAfter(J);u.setEndAfter(J);I=true}}J=h.create("br");u.insertNode(J);if(b.isIE&&s=="PRE"&&(!H||H<8)){J.parentNode.insertBefore(h.doc.createTextNode("\r"),J)}if(!I){u.setStartAfter(J);u.setEndAfter(J)}else{u.setStartBefore(J);u.setEndBefore(J)}d.setRng(u);g.add()}function r(I){do{if(I.nodeType===3){I.nodeValue=I.nodeValue.replace(/^[\r\n]+/,"")}I=I.firstChild}while(I)}function F(K){var I=h.getRoot(),J,L;J=K;while(J!==I&&h.getContentEditable(J)!=="false"){if(h.getContentEditable(J)==="true"){L=J}J=J.parentNode}return J!==I?L:I}if(!u.collapsed){e.execCommand("Delete");return}if(y.isDefaultPrevented()){return}x=u.startContainer;t=u.startOffset;v=c.forced_root_block;v=v?v.toUpperCase():"";H=h.doc.documentMode;if(x.nodeType==1&&x.hasChildNodes()){z=t>x.childNodes.length-1;x=x.childNodes[Math.min(t,x.childNodes.length-1)]||x;t=0}i=F(x);if(!i){return}g.beforeChange();if(!h.isBlock(i)&&i!=h.getRoot()){if(!v||y.shiftKey){G()}return}if((v&&!y.shiftKey)||(!v&&y.shiftKey)){x=k(x,t)}o=h.getParent(x,h.isBlock);l=o?h.getParent(o.parentNode,h.isBlock):null;s=o?o.nodeName.toUpperCase():"";E=l?l.nodeName.toUpperCase():"";if(s=="LI"&&h.isEmpty(o)){if(/^(UL|OL|LI)$/.test(l.parentNode.nodeName)){return false}D();return}if(s=="PRE"&&c.br_in_pre!==false){if(!y.shiftKey){G();return}}else{if((!v&&!y.shiftKey&&s!="LI")||(v&&y.shiftKey)){G();return}}v=v||"P";if(p()){if(/^(H[1-6]|PRE)$/.test(s)&&E!="HGROUP"){n=q(v)}else{n=q()}if(c.end_container_on_empty_block&&B(l)&&h.isEmpty(o)){n=h.split(l,o)}else{h.insertAfter(n,o)}}else{if(p(true)){n=o.parentNode.insertBefore(q(),o)}else{C=u.cloneRange();C.setEndAfter(o);j=C.extractContents();r(j);n=j.firstChild;h.insertAfter(j,o)}}h.setAttrib(n,"id","");m(n);g.add()}e.onKeyDown.add(function(j,i){if(i.keyCode==13){if(f(i)!==false){i.preventDefault()}}})}})(tinymce); \ No newline at end of file
+(function(e){var a=/^\s*|\s*$/g,b,d="B".replace(/A(.)|B/,"$1")==="$1";var c={majorVersion:"3",minorVersion:"5.4.1",releaseDate:"2012-06-24",_init:function(){var s=this,q=document,o=navigator,g=o.userAgent,m,f,l,k,j,r;s.isOpera=e.opera&&opera.buildNumber;s.isWebKit=/WebKit/.test(g);s.isIE=!s.isWebKit&&!s.isOpera&&(/MSIE/gi).test(g)&&(/Explorer/gi).test(o.appName);s.isIE6=s.isIE&&/MSIE [56]/.test(g);s.isIE7=s.isIE&&/MSIE [7]/.test(g);s.isIE8=s.isIE&&/MSIE [8]/.test(g);s.isIE9=s.isIE&&/MSIE [9]/.test(g);s.isGecko=!s.isWebKit&&/Gecko/.test(g);s.isMac=g.indexOf("Mac")!=-1;s.isAir=/adobeair/i.test(g);s.isIDevice=/(iPad|iPhone)/.test(g);s.isIOS5=s.isIDevice&&g.match(/AppleWebKit\/(\d*)/)[1]>=534;if(e.tinyMCEPreInit){s.suffix=tinyMCEPreInit.suffix;s.baseURL=tinyMCEPreInit.base;s.query=tinyMCEPreInit.query;return}s.suffix="";f=q.getElementsByTagName("base");for(m=0;m<f.length;m++){r=f[m].href;if(r){if(/^https?:\/\/[^\/]+$/.test(r)){r+="/"}k=r?r.match(/.*\//)[0]:""}}function h(i){if(i.src&&/tiny_mce(|_gzip|_jquery|_prototype|_full)(_dev|_src)?.js/.test(i.src)){if(/_(src|dev)\.js/g.test(i.src)){s.suffix="_src"}if((j=i.src.indexOf("?"))!=-1){s.query=i.src.substring(j+1)}s.baseURL=i.src.substring(0,i.src.lastIndexOf("/"));if(k&&s.baseURL.indexOf("://")==-1&&s.baseURL.indexOf("/")!==0){s.baseURL=k+s.baseURL}return s.baseURL}return null}f=q.getElementsByTagName("script");for(m=0;m<f.length;m++){if(h(f[m])){return}}l=q.getElementsByTagName("head")[0];if(l){f=l.getElementsByTagName("script");for(m=0;m<f.length;m++){if(h(f[m])){return}}}return},is:function(g,f){if(!f){return g!==b}if(f=="array"&&(g.hasOwnProperty&&g instanceof Array)){return true}return typeof(g)==f},makeMap:function(f,j,h){var g;f=f||[];j=j||",";if(typeof(f)=="string"){f=f.split(j)}h=h||{};g=f.length;while(g--){h[f[g]]={}}return h},each:function(i,f,h){var j,g;if(!i){return 0}h=h||i;if(i.length!==b){for(j=0,g=i.length;j<g;j++){if(f.call(h,i[j],j,i)===false){return 0}}}else{for(j in i){if(i.hasOwnProperty(j)){if(f.call(h,i[j],j,i)===false){return 0}}}}return 1},map:function(g,h){var i=[];c.each(g,function(f){i.push(h(f))});return i},grep:function(g,h){var i=[];c.each(g,function(f){if(!h||h(f)){i.push(f)}});return i},inArray:function(g,h){var j,f;if(g){for(j=0,f=g.length;j<f;j++){if(g[j]===h){return j}}}return -1},extend:function(n,k){var j,f,h,g=arguments,m;for(j=1,f=g.length;j<f;j++){k=g[j];for(h in k){if(k.hasOwnProperty(h)){m=k[h];if(m!==b){n[h]=m}}}}return n},trim:function(f){return(f?""+f:"").replace(a,"")},create:function(o,f,j){var n=this,g,i,k,l,h,m=0;o=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(o);k=o[3].match(/(^|\.)(\w+)$/i)[2];i=n.createNS(o[3].replace(/\.\w+$/,""),j);if(i[k]){return}if(o[2]=="static"){i[k]=f;if(this.onCreate){this.onCreate(o[2],o[3],i[k])}return}if(!f[k]){f[k]=function(){};m=1}i[k]=f[k];n.extend(i[k].prototype,f);if(o[5]){g=n.resolve(o[5]).prototype;l=o[5].match(/\.(\w+)$/i)[1];h=i[k];if(m){i[k]=function(){return g[l].apply(this,arguments)}}else{i[k]=function(){this.parent=g[l];return h.apply(this,arguments)}}i[k].prototype[k]=i[k];n.each(g,function(p,q){i[k].prototype[q]=g[q]});n.each(f,function(p,q){if(g[q]){i[k].prototype[q]=function(){this.parent=g[q];return p.apply(this,arguments)}}else{if(q!=k){i[k].prototype[q]=p}}})}n.each(f["static"],function(p,q){i[k][q]=p});if(this.onCreate){this.onCreate(o[2],o[3],i[k].prototype)}},walk:function(i,h,j,g){g=g||this;if(i){if(j){i=i[j]}c.each(i,function(k,f){if(h.call(g,k,f,j)===false){return false}c.walk(k,h,j,g)})}},createNS:function(j,h){var g,f;h=h||e;j=j.split(".");for(g=0;g<j.length;g++){f=j[g];if(!h[f]){h[f]={}}h=h[f]}return h},resolve:function(j,h){var g,f;h=h||e;j=j.split(".");for(g=0,f=j.length;g<f;g++){h=h[j[g]];if(!h){break}}return h},addUnload:function(j,i){var h=this,g;g=function(){var f=h.unloads,l,m;if(f){for(m in f){l=f[m];if(l&&l.func){l.func.call(l.scope,1)}}if(e.detachEvent){e.detachEvent("onbeforeunload",k);e.detachEvent("onunload",g)}else{if(e.removeEventListener){e.removeEventListener("unload",g,false)}}h.unloads=l=f=w=g=0;if(e.CollectGarbage){CollectGarbage()}}};function k(){var l=document;function f(){l.detachEvent("onstop",f);if(g){g()}l=0}if(l.readyState=="interactive"){if(l){l.attachEvent("onstop",f)}e.setTimeout(function(){if(l){l.detachEvent("onstop",f)}},0)}}j={func:j,scope:i||this};if(!h.unloads){if(e.attachEvent){e.attachEvent("onunload",g);e.attachEvent("onbeforeunload",k)}else{if(e.addEventListener){e.addEventListener("unload",g,false)}}h.unloads=[j]}else{h.unloads.push(j)}return j},removeUnload:function(i){var g=this.unloads,h=null;c.each(g,function(j,f){if(j&&j.func==i){g.splice(f,1);h=i;return false}});return h},explode:function(f,g){if(!f||c.is(f,"array")){return f}return c.map(f.split(g||","),c.trim)},_addVer:function(g){var f;if(!this.query){return g}f=(g.indexOf("?")==-1?"?":"&")+this.query;if(g.indexOf("#")==-1){return g+f}return g.replace("#",f+"#")},_replace:function(h,f,g){if(d){return g.replace(h,function(){var l=f,j=arguments,k;for(k=0;k<j.length-2;k++){if(j[k]===b){l=l.replace(new RegExp("\\$"+k,"g"),"")}else{l=l.replace(new RegExp("\\$"+k,"g"),j[k])}}return l})}return g.replace(h,f)}};c._init();e.tinymce=e.tinyMCE=c})(window);tinymce.create("tinymce.util.Dispatcher",{scope:null,listeners:null,inDispatch:false,Dispatcher:function(a){this.scope=a||this;this.listeners=[]},add:function(b,a){this.listeners.push({cb:b,scope:a||this.scope});return b},addToTop:function(d,b){var a=this,c={cb:d,scope:b||a.scope};if(a.inDispatch){a.listeners=[c].concat(a.listeners)}else{a.listeners.unshift(c)}return d},remove:function(c){var b=this.listeners,a=null;tinymce.each(b,function(e,d){if(c==e.cb){a=e;b.splice(d,1);return false}});return a},dispatch:function(){var a=this,e,b=arguments,c,d=a.listeners,f;a.inDispatch=true;for(c=0;c<d.length;c++){f=d[c];e=f.cb.apply(f.scope,b.length>0?b:[f.scope]);if(e===false){break}}a.inDispatch=false;return e}});(function(){var a=tinymce.each;tinymce.create("tinymce.util.URI",{URI:function(e,g){var f=this,i,d,c,h;e=tinymce.trim(e);g=f.settings=g||{};if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e)){f.source=e;return}if(e.indexOf("/")===0&&e.indexOf("//")!==0){e=(g.base_uri?g.base_uri.protocol||"http":"http")+"://mce_host"+e}if(!/^[\w\-]*:?\/\//.test(e)){h=g.base_uri?g.base_uri.path:new tinymce.util.URI(location.href).directory;e=((g.base_uri&&g.base_uri.protocol)||"http")+"://mce_host"+f.toAbsPath(h,e)}e=e.replace(/@@/g,"(mce_at)");e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);a(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(b,j){var k=e[j];if(k){k=k.replace(/\(mce_at\)/g,"@@")}f[b]=k});c=g.base_uri;if(c){if(!f.protocol){f.protocol=c.protocol}if(!f.userInfo){f.userInfo=c.userInfo}if(!f.port&&f.host==="mce_host"){f.port=c.port}if(!f.host||f.host==="mce_host"){f.host=c.host}f.source=""}},setPath:function(c){var b=this;c=/^(.*?)\/?(\w+)?$/.exec(c);b.path=c[0];b.directory=c[1];b.file=c[2];b.source="";b.getURI()},toRelative:function(b){var d=this,f;if(b==="./"){return b}b=new tinymce.util.URI(b,{base_uri:d});if((b.host!="mce_host"&&d.host!=b.host&&b.host)||d.port!=b.port||d.protocol!=b.protocol){return b.getURI()}var c=d.getURI(),e=b.getURI();if(c==e||(c.charAt(c.length-1)=="/"&&c.substr(0,c.length-1)==e)){return c}f=d.toRelPath(d.path,b.path);if(b.query){f+="?"+b.query}if(b.anchor){f+="#"+b.anchor}return f},toAbsolute:function(b,c){b=new tinymce.util.URI(b,{base_uri:this});return b.getURI(this.host==b.host&&this.protocol==b.protocol?c:0)},toRelPath:function(g,h){var c,f=0,d="",e,b;g=g.substring(0,g.lastIndexOf("/"));g=g.split("/");c=h.split("/");if(g.length>=c.length){for(e=0,b=g.length;e<b;e++){if(e>=c.length||g[e]!=c[e]){f=e+1;break}}}if(g.length<c.length){for(e=0,b=c.length;e<b;e++){if(e>=g.length||g[e]!=c[e]){f=e+1;break}}}if(f===1){return h}for(e=0,b=g.length-(f-1);e<b;e++){d+="../"}for(e=f-1,b=c.length;e<b;e++){if(e!=f-1){d+="/"+c[e]}else{d+=c[e]}}return d},toAbsPath:function(e,f){var c,b=0,h=[],d,g;d=/\/$/.test(f)?"/":"";e=e.split("/");f=f.split("/");a(e,function(i){if(i){h.push(i)}});e=h;for(c=f.length-1,h=[];c>=0;c--){if(f[c].length===0||f[c]==="."){continue}if(f[c]===".."){b++;continue}if(b>0){b--;continue}h.push(f[c])}c=e.length-b;if(c<=0){g=h.reverse().join("/")}else{g=e.slice(0,c).join("/")+"/"+h.reverse().join("/")}if(g.indexOf("/")!==0){g="/"+g}if(d&&g.lastIndexOf("/")!==g.length-1){g+=d}return g},getURI:function(d){var c,b=this;if(!b.source||d){c="";if(!d){if(b.protocol){c+=b.protocol+"://"}if(b.userInfo){c+=b.userInfo+"@"}if(b.host){c+=b.host}if(b.port){c+=":"+b.port}}if(b.path){c+=b.path}if(b.query){c+="?"+b.query}if(b.anchor){c+="#"+b.anchor}b.source=c}return b.source}})})();(function(){var a=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(d){var b=this.get(d),c;if(b){a(b.split("&"),function(e){e=e.split("=");c=c||{};c[unescape(e[0])]=unescape(e[1])})}return c},setHash:function(j,b,g,f,i,c){var h="";a(b,function(e,d){h+=(!h?"":"&")+escape(d)+"="+escape(e)});this.set(j,h,g,f,i,c)},get:function(i){var h=document.cookie,g,f=i+"=",d;if(!h){return}d=h.indexOf("; "+f);if(d==-1){d=h.indexOf(f);if(d!==0){return null}}else{d+=2}g=h.indexOf(";",d);if(g==-1){g=h.length}return unescape(h.substring(d+f.length,g))},set:function(i,b,g,f,h,c){document.cookie=i+"="+escape(b)+((g)?"; expires="+g.toGMTString():"")+((f)?"; path="+escape(f):"")+((h)?"; domain="+h:"")+((c)?"; secure":"")},remove:function(c,e,d){var b=new Date();b.setTime(b.getTime()-1000);this.set(c,"",b,e,d)}})})();(function(){function serialize(o,quote){var i,v,t,name;quote=quote||'"';if(o==null){return"null"}t=typeof o;if(t=="string"){v="\bb\tt\nn\ff\rr\"\"''\\\\";return quote+o.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(a,b){if(quote==='"'&&a==="'"){return a}i=v.indexOf(b);if(i+1){return"\\"+v.charAt(i+1)}a=b.charCodeAt().toString(16);return"\\u"+"0000".substring(a.length)+a})+quote}if(t=="object"){if(o.hasOwnProperty&&o instanceof Array){for(i=0,v="[";i<o.length;i++){v+=(i>0?",":"")+serialize(o[i],quote)}return v+"]"}v="{";for(name in o){if(o.hasOwnProperty(name)){v+=typeof o[name]!="function"?(v.length>1?","+quote:quote)+name+quote+":"+serialize(o[name],quote):""}}return v+"}"}return""+o}tinymce.util.JSON={serialize:serialize,parse:function(s){try{return eval("("+s+")")}catch(ex){}}}})();tinymce.create("static tinymce.util.XHR",{send:function(g){var a,e,b=window,h=0;function f(){if(!g.async||a.readyState==4||h++>10000){if(g.success&&h<10000&&a.status==200){g.success.call(g.success_scope,""+a.responseText,a,g)}else{if(g.error){g.error.call(g.error_scope,h>10000?"TIMED_OUT":"GENERAL",a,g)}}a=null}else{b.setTimeout(f,10)}}g.scope=g.scope||this;g.success_scope=g.success_scope||g.scope;g.error_scope=g.error_scope||g.scope;g.async=g.async===false?false:true;g.data=g.data||"";function d(i){a=0;try{a=new ActiveXObject(i)}catch(c){}return a}a=b.XMLHttpRequest?new XMLHttpRequest():d("Microsoft.XMLHTTP")||d("Msxml2.XMLHTTP");if(a){if(a.overrideMimeType){a.overrideMimeType(g.content_type)}a.open(g.type||(g.data?"POST":"GET"),g.url,g.async);if(g.content_type){a.setRequestHeader("Content-Type",g.content_type)}a.setRequestHeader("X-Requested-With","XMLHttpRequest");a.send(g.data);if(!g.async){return f()}e=b.setTimeout(f,10)}}});(function(){var c=tinymce.extend,b=tinymce.util.JSON,a=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(d){this.settings=c({},d);this.count=0},send:function(f){var e=f.error,d=f.success;f=c(this.settings,f);f.success=function(h,g){h=b.parse(h);if(typeof(h)=="undefined"){h={error:"JSON Parse error."}}if(h.error){e.call(f.error_scope||f.scope,h.error,g)}else{d.call(f.success_scope||f.scope,h.result)}};f.error=function(h,g){if(e){e.call(f.error_scope||f.scope,h,g)}};f.data=b.serialize({id:f.id||"c"+(this.count++),method:f.method,params:f.params});f.content_type="application/json";a.send(f)},"static":{sendRPC:function(d){return new tinymce.util.JSONRequest().send(d)}}})}());(function(a){a.VK={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(b){return b.shiftKey||b.ctrlKey||b.altKey},metaKeyPressed:function(b){return a.isMac?b.metaKey:b.ctrlKey}}})(tinymce);tinymce.util.Quirks=function(d){var m=tinymce.VK,t=m.BACKSPACE,u=m.DELETE,p=d.dom,E=d.selection,s=d.settings;function c(I,H){try{d.getDoc().execCommand(I,false,H)}catch(G){}}function z(){var G=d.getDoc().documentMode;return G?G:6}function j(){function G(J){var H,L,I,K;H=E.getRng();L=p.getParent(H.startContainer,p.isBlock);if(J){L=p.getNext(L,p.isBlock)}if(L){I=L.firstChild;while(I&&I.nodeType==3&&I.nodeValue.length===0){I=I.nextSibling}if(I&&I.nodeName==="SPAN"){K=I.cloneNode(false)}}d.getDoc().execCommand(J?"ForwardDelete":"Delete",false,null);L=p.getParent(H.startContainer,p.isBlock);tinymce.each(p.select("span.Apple-style-span,font.Apple-style-span",L),function(M){var N=E.getBookmark();if(K){p.replace(K.cloneNode(false),M,true)}else{p.remove(M,true)}E.moveToBookmark(N)})}d.onKeyDown.add(function(H,J){var I;I=J.keyCode==u;if(!J.isDefaultPrevented()&&(I||J.keyCode==t)&&!m.modifierPressed(J)){J.preventDefault();G(I)}});d.addCommand("Delete",function(){G()})}function F(){function G(J){var I=p.create("body");var K=J.cloneContents();I.appendChild(K);return E.serializer.serialize(I,{format:"html"})}function H(I){var K=G(I);var L=p.createRng();L.selectNode(d.getBody());var J=G(L);return K===J}d.onKeyDown.add(function(J,L){var K=L.keyCode,I;if(!L.isDefaultPrevented()&&(K==u||K==t)){I=J.selection.isCollapsed();if(I&&!p.isEmpty(J.getBody())){return}if(tinymce.isIE&&!I){return}if(!I&&!H(J.selection.getRng())){return}J.setContent("");J.selection.setCursorLocation(J.getBody(),0);J.nodeChanged()}})}function x(){d.onKeyDown.add(function(G,H){if(H.keyCode==65&&m.metaKeyPressed(H)){H.preventDefault();G.execCommand("SelectAll")}})}function y(){if(!d.settings.content_editable){p.bind(d.getDoc(),"focusin",function(G){E.setRng(E.getRng())});p.bind(d.getDoc(),"mousedown",function(G){if(G.target==d.getDoc().documentElement){d.getWin().focus();E.setRng(E.getRng())}})}}function n(){d.onKeyDown.add(function(G,J){if(!J.isDefaultPrevented()&&J.keyCode===t){if(E.isCollapsed()&&E.getRng(true).startOffset===0){var I=E.getNode();var H=I.previousSibling;if(H&&H.nodeName&&H.nodeName.toLowerCase()==="hr"){p.remove(H);tinymce.dom.Event.cancel(J)}}}})}function b(){if(!Range.prototype.getClientRects){d.onMouseDown.add(function(H,I){if(I.target.nodeName==="HTML"){var G=H.getBody();G.blur();setTimeout(function(){G.focus()},0)}})}}function B(){d.onClick.add(function(G,H){H=H.target;if(/^(IMG|HR)$/.test(H.nodeName)){E.getSel().setBaseAndExtent(H,0,H,1)}if(H.nodeName=="A"&&p.hasClass(H,"mceItemAnchor")){E.select(H)}G.nodeChanged()})}function C(){function H(){var J=p.getAttribs(E.getStart().cloneNode(false));return function(){var K=E.getStart();if(K!==d.getBody()){p.setAttrib(K,"style",null);tinymce.each(J,function(L){K.setAttributeNode(L.cloneNode(true))})}}}function G(){return !E.isCollapsed()&&E.getStart()!=E.getEnd()}function I(J,K){K.preventDefault();return false}d.onKeyPress.add(function(J,L){var K;if((L.keyCode==8||L.keyCode==46)&&G()){K=H();J.getDoc().execCommand("delete",false,null);K();L.preventDefault();return false}});p.bind(d.getDoc(),"cut",function(K){var J;if(G()){J=H();d.onKeyUp.addToTop(I);setTimeout(function(){J();d.onKeyUp.remove(I)},0)}})}function k(){var H,G;p.bind(d.getDoc(),"selectionchange",function(){if(G){clearTimeout(G);G=0}G=window.setTimeout(function(){var I=E.getRng();if(!H||!tinymce.dom.RangeUtils.compareRanges(I,H)){d.nodeChanged();H=I}},50)})}function D(){document.body.setAttribute("role","application")}function A(){d.onKeyDown.add(function(G,I){if(!I.isDefaultPrevented()&&I.keyCode===t){if(E.isCollapsed()&&E.getRng(true).startOffset===0){var H=E.getNode().previousSibling;if(H&&H.nodeName&&H.nodeName.toLowerCase()==="table"){return tinymce.dom.Event.cancel(I)}}}})}function h(){if(z()>7){return}c("RespectVisibilityInDesign",true);d.contentStyles.push(".mceHideBrInPre pre br {display: none}");p.addClass(d.getBody(),"mceHideBrInPre");d.parser.addNodeFilter("pre",function(G,I){var J=G.length,L,H,M,K;while(J--){L=G[J].getAll("br");H=L.length;while(H--){M=L[H];K=M.prev;if(K&&K.type===3&&K.value.charAt(K.value-1)!="\n"){K.value+="\n"}else{M.parent.insert(new tinymce.html.Node("#text",3),M,true).value="\n"}}}});d.serializer.addNodeFilter("pre",function(G,I){var J=G.length,L,H,M,K;while(J--){L=G[J].getAll("br");H=L.length;while(H--){M=L[H];K=M.prev;if(K&&K.type==3){K.value=K.value.replace(/\r?\n$/,"")}}}})}function f(){p.bind(d.getBody(),"mouseup",function(I){var H,G=E.getNode();if(G.nodeName=="IMG"){if(H=p.getStyle(G,"width")){p.setAttrib(G,"width",H.replace(/[^0-9%]+/g,""));p.setStyle(G,"width","")}if(H=p.getStyle(G,"height")){p.setAttrib(G,"height",H.replace(/[^0-9%]+/g,""));p.setStyle(G,"height","")}}})}function r(){d.onKeyDown.add(function(M,N){var L,G,H,J,K,O,I;L=N.keyCode==u;if(!N.isDefaultPrevented()&&(L||N.keyCode==t)&&!m.modifierPressed(N)){G=E.getRng();H=G.startContainer;J=G.startOffset;I=G.collapsed;if(H.nodeType==3&&H.nodeValue.length>0&&((J===0&&!I)||(I&&J===(L?0:1)))){nonEmptyElements=M.schema.getNonEmptyElements();N.preventDefault();K=p.create("br",{id:"__tmp"});H.parentNode.insertBefore(K,H);M.getDoc().execCommand(L?"ForwardDelete":"Delete",false,null);H=E.getRng().startContainer;O=H.previousSibling;if(O&&O.nodeType==1&&!p.isBlock(O)&&p.isEmpty(O)&&!nonEmptyElements[O.nodeName.toLowerCase()]){p.remove(O)}p.remove("__tmp")}}})}function e(){d.onKeyDown.add(function(K,L){var I,H,M,G,J;if(L.isDefaultPrevented()||L.keyCode!=m.BACKSPACE){return}I=E.getRng();H=I.startContainer;M=I.startOffset;G=p.getRoot();J=H;if(!I.collapsed||M!==0){return}while(J&&J.parentNode&&J.parentNode.firstChild==J&&J.parentNode!=G){J=J.parentNode}if(J.tagName==="BLOCKQUOTE"){K.formatter.toggle("blockquote",null,J);I.setStart(H,0);I.setEnd(H,0);E.setRng(I);E.collapse(false)}})}function l(){function G(){d._refreshContentEditable();c("StyleWithCSS",false);c("enableInlineTableEditing",false);if(!s.object_resizing){c("enableObjectResizing",false)}}if(!s.readonly){d.onBeforeExecCommand.add(G);d.onMouseDown.add(G)}}function o(){function G(H,I){tinymce.each(p.select("a"),function(L){var J=L.parentNode,K=p.getRoot();if(J.lastChild===L){while(J&&!p.isBlock(J)){if(J.parentNode.lastChild!==J||J===K){return}J=J.parentNode}p.add(J,"br",{"data-mce-bogus":1})}})}d.onExecCommand.add(function(H,I){if(I==="CreateLink"){G(H)}});d.onSetContent.add(E.onSetContent.add(G))}function v(){if(s.forced_root_block){d.onInit.add(function(){c("DefaultParagraphSeparator",s.forced_root_block)})}}function a(){function G(I,H){if(!I||!H.initial){d.execCommand("mceRepaint")}}d.onUndo.add(G);d.onRedo.add(G);d.onSetContent.add(G)}function q(){d.onKeyDown.add(function(H,I){var G;if(!I.isDefaultPrevented()&&I.keyCode==t){G=H.getDoc().selection.createRange();if(G&&G.item){I.preventDefault();H.undoManager.beforeChange();p.remove(G.item(0));H.undoManager.add()}}})}function i(){var G;if(z()>=10){G="";tinymce.each("p div h1 h2 h3 h4 h5 h6".split(" "),function(H,I){G+=(I>0?",":"")+H+":empty"});d.contentStyles.push(G+"{padding-right: 1px !important}")}}function g(){var K,H,G,I,J;if(!s.object_resizing||s.webkit_fake_resize===false){return}d.contentStyles.push(".mceResizeImages img {cursor: se-resize !important}");function L(R){var O,N,Q,P,M;if(K){O=R.screenX-H;N=R.screenY-G;Q=Math.max((I+O)/I,(J+N)/J);if(Math.abs(O)>1||Math.abs(N)>1){P=Math.round(I*Q);M=Math.round(J*Q);if(K.style.width){p.setStyle(K,"width",P)}else{p.setAttrib(K,"width",P)}if(K.style.height){p.setStyle(K,"height",M)}else{p.setAttrib(K,"height",M)}if(!p.hasClass(d.getBody(),"mceResizeImages")){p.addClass(d.getBody(),"mceResizeImages")}}}}d.onMouseDown.add(function(M,O){var N=O.target;if(N.nodeName=="IMG"){K=N;H=O.screenX;G=O.screenY;I=K.clientWidth;J=K.clientHeight;p.bind(M.getDoc(),"mousemove",L);O.preventDefault()}});d.onNodeChange.add(function(){if(K){K=null;p.unbind(d.getDoc(),"mousemove",L)}if(E.getNode().nodeName=="IMG"){p.addClass(d.getBody(),"mceResizeImages")}else{p.removeClass(d.getBody(),"mceResizeImages")}})}A();e();F();if(tinymce.isWebKit){r();j();y();B();v();if(tinymce.isIDevice){k()}else{g();x()}}if(tinymce.isIE){n();D();h();f();q();i()}if(tinymce.isGecko){n();b();C();l();o();a()}};(function(j){var a,g,d,k=/[&<>\"\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,b=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,f=/[<>&\"\']/g,c=/&(#x|#)?([\w]+);/g,i={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"};g={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;"};d={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"};function h(l){var m;m=document.createElement("div");m.innerHTML=l;return m.textContent||m.innerText||l}function e(m,p){var n,o,l,q={};if(m){m=m.split(",");p=p||10;for(n=0;n<m.length;n+=2){o=String.fromCharCode(parseInt(m[n],p));if(!g[o]){l="&"+m[n+1]+";";q[o]=l;q[l]=o}}return q}}a=e("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);j.html=j.html||{};j.html.Entities={encodeRaw:function(m,l){return m.replace(l?k:b,function(n){return g[n]||n})},encodeAllRaw:function(l){return(""+l).replace(f,function(m){return g[m]||m})},encodeNumeric:function(m,l){return m.replace(l?k:b,function(n){if(n.length>1){return"&#"+(((n.charCodeAt(0)-55296)*1024)+(n.charCodeAt(1)-56320)+65536)+";"}return g[n]||"&#"+n.charCodeAt(0)+";"})},encodeNamed:function(n,l,m){m=m||a;return n.replace(l?k:b,function(o){return g[o]||m[o]||o})},getEncodeFunc:function(l,o){var p=j.html.Entities;o=e(o)||a;function m(r,q){return r.replace(q?k:b,function(s){return g[s]||o[s]||"&#"+s.charCodeAt(0)+";"||s})}function n(r,q){return p.encodeNamed(r,q,o)}l=j.makeMap(l.replace(/\+/g,","));if(l.named&&l.numeric){return m}if(l.named){if(o){return n}return p.encodeNamed}if(l.numeric){return p.encodeNumeric}return p.encodeRaw},decode:function(l){return l.replace(c,function(n,m,o){if(m){o=parseInt(o,m.length===2?16:10);if(o>65535){o-=65536;return String.fromCharCode(55296+(o>>10),56320+(o&1023))}else{return i[o]||String.fromCharCode(o)}}return d[n]||a[n]||h(n)})}}})(tinymce);tinymce.html.Styles=function(d,f){var k=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,h=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,b=/\s*([^:]+):\s*([^;]+);?/g,l=/\s+$/,m=/rgb/,e,g,a={},j;d=d||{};j="\\\" \\' \\; \\: ; : \uFEFF".split(" ");for(g=0;g<j.length;g++){a[j[g]]="\uFEFF"+g;a["\uFEFF"+g]=j[g]}function c(n,q,p,i){function o(r){r=parseInt(r).toString(16);return r.length>1?r:"0"+r}return"#"+o(q)+o(p)+o(i)}return{toHex:function(i){return i.replace(k,c)},parse:function(s){var z={},q,n,x,r,v=d.url_converter,y=d.url_converter_scope||this;function p(D,G){var F,C,B,E;F=z[D+"-top"+G];if(!F){return}C=z[D+"-right"+G];if(F!=C){return}B=z[D+"-bottom"+G];if(C!=B){return}E=z[D+"-left"+G];if(B!=E){return}z[D+G]=E;delete z[D+"-top"+G];delete z[D+"-right"+G];delete z[D+"-bottom"+G];delete z[D+"-left"+G]}function u(C){var D=z[C],B;if(!D||D.indexOf(" ")<0){return}D=D.split(" ");B=D.length;while(B--){if(D[B]!==D[0]){return false}}z[C]=D[0];return true}function A(D,C,B,E){if(!u(C)){return}if(!u(B)){return}if(!u(E)){return}z[D]=z[C]+" "+z[B]+" "+z[E];delete z[C];delete z[B];delete z[E]}function t(B){r=true;return a[B]}function i(C,B){if(r){C=C.replace(/\uFEFF[0-9]/g,function(D){return a[D]})}if(!B){C=C.replace(/\\([\'\";:])/g,"$1")}return C}function o(C,B,F,E,G,D){G=G||D;if(G){G=i(G);return"'"+G.replace(/\'/g,"\\'")+"'"}B=i(B||F||E);if(v){B=v.call(y,B,"style")}return"url('"+B.replace(/\'/g,"\\'")+"')"}if(s){s=s.replace(/\\[\"\';:\uFEFF]/g,t).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(B){return B.replace(/[;:]/g,t)});while(q=b.exec(s)){n=q[1].replace(l,"").toLowerCase();x=q[2].replace(l,"");if(n&&x.length>0){if(n==="font-weight"&&x==="700"){x="bold"}else{if(n==="color"||n==="background-color"){x=x.toLowerCase()}}x=x.replace(k,c);x=x.replace(h,o);z[n]=r?i(x,true):x}b.lastIndex=q.index+q[0].length}p("border","");p("border","-width");p("border","-color");p("border","-style");p("padding","");p("margin","");A("border","border-width","border-style","border-color");if(z.border==="medium none"){delete z.border}}return z},serialize:function(p,r){var o="",n,q;function i(t){var x,u,s,v;x=f.styles[t];if(x){for(u=0,s=x.length;u<s;u++){t=x[u];v=p[t];if(v!==e&&v.length>0){o+=(o.length>0?" ":"")+t+": "+v+";"}}}}if(r&&f&&f.styles){i("*");i(r)}else{for(n in p){q=p[n];if(q!==e&&q.length>0){o+=(o.length>0?" ":"")+n+": "+q+";"}}}return o}}};(function(f){var a={},e=f.makeMap,g=f.each;function d(j,i){return j.split(i||",")}function h(m,l){var j,k={};function i(n){return n.replace(/[A-Z]+/g,function(o){return i(m[o])})}for(j in m){if(m.hasOwnProperty(j)){m[j]=i(m[j])}}i(l).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g,function(q,o,n,p){n=d(n,"|");k[o]={attributes:e(n),attributesOrder:n,children:e(p,"|",{"#comment":{}})}});return k}function b(){var i=a.html5;if(!i){i=a.html5=h({A:"id|accesskey|class|dir|draggable|item|hidden|itemprop|role|spellcheck|style|subject|title|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"#|a|abbr|area|audio|b|bdo|br|button|canvas|cite|code|command|datalist|del|dfn|em|embed|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|meta|meter|noscript|object|output|progress|q|ruby|samp|script|select|small|span|strong|sub|sup|svg|textarea|time|var|video|wbr",C:"#|a|abbr|area|address|article|aside|audio|b|bdo|blockquote|br|button|canvas|cite|code|command|datalist|del|details|dfn|dialog|div|dl|em|embed|fieldset|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|menu|meta|meter|nav|noscript|ol|object|output|p|pre|progress|q|ruby|samp|script|section|select|small|span|strong|style|sub|sup|svg|table|textarea|time|ul|var|video"},"html[A|manifest][body|head]head[A][base|command|link|meta|noscript|script|style|title]title[A][#]base[A|href|target][]link[A|href|rel|media|type|sizes][]meta[A|http-equiv|name|content|charset][]style[A|type|media|scoped][#]script[A|charset|type|src|defer|async][#]noscript[A][C]body[A][C]section[A][C]nav[A][C]article[A][C]aside[A][C]h1[A][B]h2[A][B]h3[A][B]h4[A][B]h5[A][B]h6[A][B]hgroup[A][h1|h2|h3|h4|h5|h6]header[A][C]footer[A][C]address[A][C]p[A][B]br[A][]pre[A][B]dialog[A][dd|dt]blockquote[A|cite][C]ol[A|start|reversed][li]ul[A][li]li[A|value][C]dl[A][dd|dt]dt[A][B]dd[A][C]a[A|href|target|ping|rel|media|type][B]em[A][B]strong[A][B]small[A][B]cite[A][B]q[A|cite][B]dfn[A][B]abbr[A][B]code[A][B]var[A][B]samp[A][B]kbd[A][B]sub[A][B]sup[A][B]i[A][B]b[A][B]mark[A][B]progress[A|value|max][B]meter[A|value|min|max|low|high|optimum][B]time[A|datetime][B]ruby[A][B|rt|rp]rt[A][B]rp[A][B]bdo[A][B]span[A][B]ins[A|cite|datetime][B]del[A|cite|datetime][B]figure[A][C|legend|figcaption]figcaption[A][C]img[A|alt|src|height|width|usemap|ismap][]iframe[A|name|src|height|width|sandbox|seamless][]embed[A|src|height|width|type][]object[A|data|type|height|width|usemap|name|form|classid][param]param[A|name|value][]details[A|open][C|legend]command[A|type|label|icon|disabled|checked|radiogroup][]menu[A|type|label][C|li]legend[A][C|B]div[A][C]source[A|src|type|media][]audio[A|src|autobuffer|autoplay|loop|controls][source]video[A|src|autobuffer|autoplay|loop|controls|width|height|poster][source]hr[A][]form[A|accept-charset|action|autocomplete|enctype|method|name|novalidate|target][C]fieldset[A|disabled|form|name][C|legend]label[A|form|for][B]input[A|type|accept|alt|autocomplete|checked|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|height|list|max|maxlength|min|multiple|pattern|placeholder|readonly|required|size|src|step|width|files|value|name][]button[A|autofocus|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|name|value|type][B]select[A|autofocus|disabled|form|multiple|name|size][option|optgroup]datalist[A][B|option]optgroup[A|disabled|label][option]option[A|disabled|selected|label|value][]textarea[A|autofocus|disabled|form|maxlength|name|placeholder|readonly|required|rows|cols|wrap][]keygen[A|autofocus|challenge|disabled|form|keytype|name][]output[A|for|form|name][B]canvas[A|width|height][]map[A|name][B|C]area[A|shape|coords|href|alt|target|media|rel|ping|type][]mathml[A][]svg[A][]table[A|border][caption|colgroup|thead|tfoot|tbody|tr]caption[A][C]colgroup[A|span][col]col[A|span][]thead[A][tr]tfoot[A][tr]tbody[A][tr]tr[A][th|td]th[A|headers|rowspan|colspan|scope][B]td[A|headers|rowspan|colspan][C]wbr[A][]")}return i}function c(){var i=a.html4;if(!i){i=a.html4=h({Z:"H|K|N|O|P",Y:"X|form|R|Q",ZG:"E|span|width|align|char|charoff|valign",X:"p|T|div|U|W|isindex|fieldset|table",ZF:"E|align|char|charoff|valign",W:"pre|hr|blockquote|address|center|noframes",ZE:"abbr|axis|headers|scope|rowspan|colspan|align|char|charoff|valign|nowrap|bgcolor|width|height",ZD:"[E][S]",U:"ul|ol|dl|menu|dir",ZC:"p|Y|div|U|W|table|br|span|bdo|object|applet|img|map|K|N|Q",T:"h1|h2|h3|h4|h5|h6",ZB:"X|S|Q",S:"R|P",ZA:"a|G|J|M|O|P",R:"a|H|K|N|O",Q:"noscript|P",P:"ins|del|script",O:"input|select|textarea|label|button",N:"M|L",M:"em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acronym",L:"sub|sup",K:"J|I",J:"tt|i|b|u|s|strike",I:"big|small|font|basefont",H:"G|F",G:"br|span|bdo",F:"object|applet|img|map|iframe",E:"A|B|C",D:"accesskey|tabindex|onfocus|onblur",C:"onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"lang|xml:lang|dir",A:"id|class|style|title"},"script[id|charset|type|language|src|defer|xml:space][]style[B|id|type|media|title|xml:space][]object[E|declare|classid|codebase|data|type|codetype|archive|standby|width|height|usemap|name|tabindex|align|border|hspace|vspace][#|param|Y]param[id|name|value|valuetype|type][]p[E|align][#|S]a[E|D|charset|type|name|href|hreflang|rel|rev|shape|coords|target][#|Z]br[A|clear][]span[E][#|S]bdo[A|C|B][#|S]applet[A|codebase|archive|code|object|alt|name|width|height|align|hspace|vspace][#|param|Y]h1[E|align][#|S]img[E|src|alt|name|longdesc|width|height|usemap|ismap|align|border|hspace|vspace][]map[B|C|A|name][X|form|Q|area]h2[E|align][#|S]iframe[A|longdesc|name|src|frameborder|marginwidth|marginheight|scrolling|align|width|height][#|Y]h3[E|align][#|S]tt[E][#|S]i[E][#|S]b[E][#|S]u[E][#|S]s[E][#|S]strike[E][#|S]big[E][#|S]small[E][#|S]font[A|B|size|color|face][#|S]basefont[id|size|color|face][]em[E][#|S]strong[E][#|S]dfn[E][#|S]code[E][#|S]q[E|cite][#|S]samp[E][#|S]kbd[E][#|S]var[E][#|S]cite[E][#|S]abbr[E][#|S]acronym[E][#|S]sub[E][#|S]sup[E][#|S]input[E|D|type|name|value|checked|disabled|readonly|size|maxlength|src|alt|usemap|onselect|onchange|accept|align][]select[E|name|size|multiple|disabled|tabindex|onfocus|onblur|onchange][optgroup|option]optgroup[E|disabled|label][option]option[E|selected|disabled|label|value][]textarea[E|D|name|rows|cols|disabled|readonly|onselect|onchange][]label[E|for|accesskey|onfocus|onblur][#|S]button[E|D|name|value|type|disabled][#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]h4[E|align][#|S]ins[E|cite|datetime][#|Y]h5[E|align][#|S]del[E|cite|datetime][#|Y]h6[E|align][#|S]div[E|align][#|Y]ul[E|type|compact][li]li[E|type|value][#|Y]ol[E|type|compact|start][li]dl[E|compact][dt|dd]dt[E][#|S]dd[E][#|Y]menu[E|compact][li]dir[E|compact][li]pre[E|width|xml:space][#|ZA]hr[E|align|noshade|size|width][]blockquote[E|cite][#|Y]address[E][#|S|p]center[E][#|Y]noframes[E][#|Y]isindex[A|B|prompt][]fieldset[E][#|legend|Y]legend[E|accesskey|align][#|S]table[E|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor][caption|col|colgroup|thead|tfoot|tbody|tr]caption[E|align][#|S]col[ZG][]colgroup[ZG][col]thead[ZF][tr]tr[ZF|bgcolor][th|td]th[E|ZE][#|Y]form[E|action|method|name|enctype|onsubmit|onreset|accept|accept-charset|target][#|X|R|Q]noscript[E][#|Y]td[E|ZE][#|Y]tfoot[ZF][tr]tbody[ZF][tr]area[E|D|shape|coords|href|nohref|alt|target][]base[id|href|target][]body[E|onload|onunload|background|bgcolor|text|link|vlink|alink][#|Y]")}return i}f.html.Schema=function(A){var u=this,s={},k={},j=[],D,y;var o,q,z,r,v,n,p={};function m(F,E,H){var G=A[F];if(!G){G=a[F];if(!G){G=e(E," ",e(E.toUpperCase()," "));G=f.extend(G,H);a[F]=G}}else{G=e(G,",",e(G.toUpperCase()," "))}return G}A=A||{};y=A.schema=="html5"?b():c();if(A.verify_html===false){A.valid_elements="*[*]"}if(A.valid_styles){D={};g(A.valid_styles,function(F,E){D[E]=f.explode(F)})}o=m("whitespace_elements","pre script style textarea");q=m("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr");z=m("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr");r=m("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls");n=m("non_empty_elements","td th iframe video audio object",z);v=m("block_elements","h1 h2 h3 h4 h5 h6 hr p div address pre form table tbody thead tfoot th tr td li ol ul caption blockquote center dl dt dd dir fieldset noscript menu isindex samp header footer article section hgroup aside nav figure option datalist select optgroup");function i(E){return new RegExp("^"+E.replace(/([?+*])/g,".$1")+"$")}function C(L){var K,G,Z,V,aa,F,I,U,X,Q,Y,ac,O,J,W,E,S,H,ab,ad,P,T,N=/^([#+\-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,R=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,M=/[*?+]/;if(L){L=d(L);if(s["@"]){S=s["@"].attributes;H=s["@"].attributesOrder}for(K=0,G=L.length;K<G;K++){F=N.exec(L[K]);if(F){W=F[1];Q=F[2];E=F[3];X=F[4];O={};J=[];I={attributes:O,attributesOrder:J};if(W==="#"){I.paddEmpty=true}if(W==="-"){I.removeEmpty=true}if(S){for(ad in S){O[ad]=S[ad]}J.push.apply(J,H)}if(X){X=d(X,"|");for(Z=0,V=X.length;Z<V;Z++){F=R.exec(X[Z]);if(F){U={};ac=F[1];Y=F[2].replace(/::/g,":");W=F[3];T=F[4];if(ac==="!"){I.attributesRequired=I.attributesRequired||[];I.attributesRequired.push(Y);U.required=true}if(ac==="-"){delete O[Y];J.splice(f.inArray(J,Y),1);continue}if(W){if(W==="="){I.attributesDefault=I.attributesDefault||[];I.attributesDefault.push({name:Y,value:T});U.defaultValue=T}if(W===":"){I.attributesForced=I.attributesForced||[];I.attributesForced.push({name:Y,value:T});U.forcedValue=T}if(W==="<"){U.validValues=e(T,"?")}}if(M.test(Y)){I.attributePatterns=I.attributePatterns||[];U.pattern=i(Y);I.attributePatterns.push(U)}else{if(!O[Y]){J.push(Y)}O[Y]=U}}}}if(!S&&Q=="@"){S=O;H=J}if(E){I.outputName=Q;s[E]=I}if(M.test(Q)){I.pattern=i(Q);j.push(I)}else{s[Q]=I}}}}}function t(E){s={};j=[];C(E);g(y,function(G,F){k[F]=G.children})}function l(F){var E=/^(~)?(.+)$/;if(F){g(d(F),function(J){var H=E.exec(J),I=H[1]==="~",K=I?"span":"div",G=H[2];k[G]=k[K];p[G]=K;if(!I){v[G]={}}g(k,function(L,M){if(L[K]){L[G]=L[K]}})})}}function x(F){var E=/^([+\-]?)(\w+)\[([^\]]+)\]$/;if(F){g(d(F),function(J){var I=E.exec(J),G,H;if(I){H=I[1];if(H){G=k[I[2]]}else{G=k[I[2]]={"#comment":{}}}G=k[I[2]];g(d(I[3],"|"),function(K){if(H==="-"){delete G[K]}else{G[K]={}}})}})}}function B(E){var G=s[E],F;if(G){return G}F=j.length;while(F--){G=j[F];if(G.pattern.test(E)){return G}}}if(!A.valid_elements){g(y,function(F,E){s[E]={attributes:F.attributes,attributesOrder:F.attributesOrder};k[E]=F.children});if(A.schema!="html5"){g(d("strong/b,em/i"),function(E){E=d(E,"/");s[E[1]].outputName=E[0]})}s.img.attributesDefault=[{name:"alt",value:""}];g(d("ol,ul,sub,sup,blockquote,span,font,a,table,tbody,tr,strong,em,b,i"),function(E){if(s[E]){s[E].removeEmpty=true}});g(d("p,h1,h2,h3,h4,h5,h6,th,td,pre,div,address,caption"),function(E){s[E].paddEmpty=true})}else{t(A.valid_elements)}l(A.custom_elements);x(A.valid_children);C(A.extended_valid_elements);x("+ol[ul|ol],+ul[ul|ol]");if(A.invalid_elements){f.each(f.explode(A.invalid_elements),function(E){if(s[E]){delete s[E]}})}if(!B("span")){C("span[!data-mce-type|*]")}u.children=k;u.styles=D;u.getBoolAttrs=function(){return r};u.getBlockElements=function(){return v};u.getShortEndedElements=function(){return z};u.getSelfClosingElements=function(){return q};u.getNonEmptyElements=function(){return n};u.getWhiteSpaceElements=function(){return o};u.isValidChild=function(E,G){var F=k[E];return !!(F&&F[G])};u.isValid=function(F,E){var H,G,I=B(F);if(I){if(E){if(I.attributes[E]){return true}H=I.attributePatterns;if(H){G=H.length;while(G--){if(H[G].pattern.test(F)){return true}}}}else{return true}}return false};u.getElementRule=B;u.getCustomElements=function(){return p};u.addValidElements=C;u.setValidElements=t;u.addCustomElements=l;u.addValidChildren=x}})(tinymce);(function(a){a.html.SaxParser=function(c,e){var b=this,d=function(){};c=c||{};b.schema=e=e||new a.html.Schema();if(c.fix_self_closing!==false){c.fix_self_closing=true}a.each("comment cdata text start end pi doctype".split(" "),function(f){if(f){b[f]=c[f]||d}});b.parse=function(E){var n=this,g,G=0,I,B,A=[],N,Q,C,r,z,s,M,H,O,v,m,k,t,R,o,P,F,S,L,f,J,l,D,K,h,x=0,j=a.html.Entities.decode,y,q;function u(T){var V,U;V=A.length;while(V--){if(A[V].name===T){break}}if(V>=0){for(U=A.length-1;U>=V;U--){T=A[U];if(T.valid){n.end(T.name)}}A.length=V}}function p(U,T,Y,X,W){var Z,V;T=T.toLowerCase();Y=T in H?T:j(Y||X||W||"");if(v&&!z&&T.indexOf("data-")!==0){Z=P[T];if(!Z&&F){V=F.length;while(V--){Z=F[V];if(Z.pattern.test(T)){break}}if(V===-1){Z=null}}if(!Z){return}if(Z.validValues&&!(Y in Z.validValues)){return}}N.map[T]=Y;N.push({name:T,value:Y})}l=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-\\:]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g");D=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:\\.|[^\"])*)\")|(?:\'((?:\\.|[^\'])*)\')|([^>\s]+)))?/g;K={script:/<\/script[^>]*>/gi,style:/<\/style[^>]*>/gi,noscript:/<\/noscript[^>]*>/gi};M=e.getShortEndedElements();J=c.self_closing_elements||e.getSelfClosingElements();H=e.getBoolAttrs();v=c.validate;s=c.remove_internals;y=c.fix_self_closing;q=a.isIE;o=/^:/;while(g=l.exec(E)){if(G<g.index){n.text(j(E.substr(G,g.index-G)))}if(I=g[6]){I=I.toLowerCase();if(q&&o.test(I)){I=I.substr(1)}u(I)}else{if(I=g[7]){I=I.toLowerCase();if(q&&o.test(I)){I=I.substr(1)}O=I in M;if(y&&J[I]&&A.length>0&&A[A.length-1].name===I){u(I)}if(!v||(m=e.getElementRule(I))){k=true;if(v){P=m.attributes;F=m.attributePatterns}if(R=g[8]){z=R.indexOf("data-mce-type")!==-1;if(z&&s){k=false}N=[];N.map={};R.replace(D,p)}else{N=[];N.map={}}if(v&&!z){S=m.attributesRequired;L=m.attributesDefault;f=m.attributesForced;if(f){Q=f.length;while(Q--){t=f[Q];r=t.name;h=t.value;if(h==="{$uid}"){h="mce_"+x++}N.map[r]=h;N.push({name:r,value:h})}}if(L){Q=L.length;while(Q--){t=L[Q];r=t.name;if(!(r in N.map)){h=t.value;if(h==="{$uid}"){h="mce_"+x++}N.map[r]=h;N.push({name:r,value:h})}}}if(S){Q=S.length;while(Q--){if(S[Q] in N.map){break}}if(Q===-1){k=false}}if(N.map["data-mce-bogus"]){k=false}}if(k){n.start(I,N,O)}}else{k=false}if(B=K[I]){B.lastIndex=G=g.index+g[0].length;if(g=B.exec(E)){if(k){C=E.substr(G,g.index-G)}G=g.index+g[0].length}else{C=E.substr(G);G=E.length}if(k&&C.length>0){n.text(C,true)}if(k){n.end(I)}l.lastIndex=G;continue}if(!O){if(!R||R.indexOf("/")!=R.length-1){A.push({name:I,valid:k})}else{if(k){n.end(I)}}}}else{if(I=g[1]){n.comment(I)}else{if(I=g[2]){n.cdata(I)}else{if(I=g[3]){n.doctype(I)}else{if(I=g[4]){n.pi(I,g[5])}}}}}}G=g.index+g[0].length}if(G<E.length){n.text(j(E.substr(G)))}for(Q=A.length-1;Q>=0;Q--){I=A[Q];if(I.valid){n.end(I.name)}}}}})(tinymce);(function(d){var c=/^[ \t\r\n]*$/,e={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};function a(k,l,j){var i,h,f=j?"lastChild":"firstChild",g=j?"prev":"next";if(k[f]){return k[f]}if(k!==l){i=k[g];if(i){return i}for(h=k.parent;h&&h!==l;h=h.parent){i=h[g];if(i){return i}}}}function b(f,g){this.name=f;this.type=g;if(g===1){this.attributes=[];this.attributes.map={}}}d.extend(b.prototype,{replace:function(g){var f=this;if(g.parent){g.remove()}f.insert(g,f);f.remove();return f},attr:function(h,l){var f=this,g,j,k;if(typeof h!=="string"){for(j in h){f.attr(j,h[j])}return f}if(g=f.attributes){if(l!==k){if(l===null){if(h in g.map){delete g.map[h];j=g.length;while(j--){if(g[j].name===h){g=g.splice(j,1);return f}}}return f}if(h in g.map){j=g.length;while(j--){if(g[j].name===h){g[j].value=l;break}}}else{g.push({name:h,value:l})}g.map[h]=l;return f}else{return g.map[h]}}},clone:function(){var g=this,n=new b(g.name,g.type),h,f,m,j,k;if(m=g.attributes){k=[];k.map={};for(h=0,f=m.length;h<f;h++){j=m[h];if(j.name!=="id"){k[k.length]={name:j.name,value:j.value};k.map[j.name]=j.value}}n.attributes=k}n.value=g.value;n.shortEnded=g.shortEnded;return n},wrap:function(g){var f=this;f.parent.insert(g,f);g.append(f);return f},unwrap:function(){var f=this,h,g;for(h=f.firstChild;h;){g=h.next;f.insert(h,f,true);h=g}f.remove()},remove:function(){var f=this,h=f.parent,g=f.next,i=f.prev;if(h){if(h.firstChild===f){h.firstChild=g;if(g){g.prev=null}}else{i.next=g}if(h.lastChild===f){h.lastChild=i;if(i){i.next=null}}else{g.prev=i}f.parent=f.next=f.prev=null}return f},append:function(h){var f=this,g;if(h.parent){h.remove()}g=f.lastChild;if(g){g.next=h;h.prev=g;f.lastChild=h}else{f.lastChild=f.firstChild=h}h.parent=f;return h},insert:function(h,f,i){var g;if(h.parent){h.remove()}g=f.parent||this;if(i){if(f===g.firstChild){g.firstChild=h}else{f.prev.next=h}h.prev=f.prev;h.next=f;f.prev=h}else{if(f===g.lastChild){g.lastChild=h}else{f.next.prev=h}h.next=f.next;h.prev=f;f.next=h}h.parent=g;return h},getAll:function(g){var f=this,h,i=[];for(h=f.firstChild;h;h=a(h,f)){if(h.name===g){i.push(h)}}return i},empty:function(){var g=this,f,h,j;if(g.firstChild){f=[];for(j=g.firstChild;j;j=a(j,g)){f.push(j)}h=f.length;while(h--){j=f[h];j.parent=j.firstChild=j.lastChild=j.next=j.prev=null}}g.firstChild=g.lastChild=null;return g},isEmpty:function(k){var f=this,j=f.firstChild,h,g;if(j){do{if(j.type===1){if(j.attributes.map["data-mce-bogus"]){continue}if(k[j.name]){return false}h=j.attributes.length;while(h--){g=j.attributes[h].name;if(g==="name"||g.indexOf("data-")===0){return false}}}if(j.type===8){return false}if((j.type===3&&!c.test(j.value))){return false}}while(j=a(j,f))}return true},walk:function(f){return a(this,null,f)}});d.extend(b,{create:function(g,f){var i,h;i=new b(g,e[g]||1);if(f){for(h in f){i.attr(h,f[h])}}return i}});d.html.Node=b})(tinymce);(function(b){var a=b.html.Node;b.html.DomParser=function(g,h){var f=this,e={},d=[],i={},c={};g=g||{};g.validate="validate" in g?g.validate:true;g.root_name=g.root_name||"body";f.schema=h=h||new b.html.Schema();function j(m){var o,p,x,v,z,n,q,l,t,u,k,s,y,r;s=b.makeMap("tr,td,th,tbody,thead,tfoot,table");k=h.getNonEmptyElements();for(o=0;o<m.length;o++){p=m[o];if(!p.parent){continue}v=[p];for(x=p.parent;x&&!h.isValidChild(x.name,p.name)&&!s[x.name];x=x.parent){v.push(x)}if(x&&v.length>1){v.reverse();z=n=f.filterNode(v[0].clone());for(t=0;t<v.length-1;t++){if(h.isValidChild(n.name,v[t].name)){q=f.filterNode(v[t].clone());n.append(q)}else{q=n}for(l=v[t].firstChild;l&&l!=v[t+1];){r=l.next;q.append(l);l=r}n=q}if(!z.isEmpty(k)){x.insert(z,v[0],true);x.insert(p,z)}else{x.insert(p,v[0],true)}x=v[0];if(x.isEmpty(k)||x.firstChild===x.lastChild&&x.firstChild.name==="br"){x.empty().remove()}}else{if(p.parent){if(p.name==="li"){y=p.prev;if(y&&(y.name==="ul"||y.name==="ul")){y.append(p);continue}y=p.next;if(y&&(y.name==="ul"||y.name==="ul")){y.insert(p,y.firstChild,true);continue}p.wrap(f.filterNode(new a("ul",1)));continue}if(h.isValidChild(p.parent.name,"div")&&h.isValidChild("div",p.name)){p.wrap(f.filterNode(new a("div",1)))}else{if(p.name==="style"||p.name==="script"){p.empty().remove()}else{p.unwrap()}}}}}}f.filterNode=function(m){var l,k,n;if(k in e){n=i[k];if(n){n.push(m)}else{i[k]=[m]}}l=d.length;while(l--){k=d[l].name;if(k in m.attributes.map){n=c[k];if(n){n.push(m)}else{c[k]=[m]}}}return m};f.addNodeFilter=function(k,l){b.each(b.explode(k),function(m){var n=e[m];if(!n){e[m]=n=[]}n.push(l)})};f.addAttributeFilter=function(k,l){b.each(b.explode(k),function(m){var n;for(n=0;n<d.length;n++){if(d[n].name===m){d[n].callbacks.push(l);return}}d.push({name:m,callbacks:[l]})})};f.parse=function(v,m){var n,J,B,A,D,C,x,r,F,N,z,o,E,M=[],L,t,k,y,s,p,u,q;m=m||{};i={};c={};o=b.extend(b.makeMap("script,style,head,html,body,title,meta,param"),h.getBlockElements());u=h.getNonEmptyElements();p=h.children;z=g.validate;q="forced_root_block" in m?m.forced_root_block:g.forced_root_block;s=h.getWhiteSpaceElements();E=/^[ \t\r\n]+/;t=/[ \t\r\n]+$/;k=/[ \t\r\n]+/g;y=/^[ \t\r\n]+$/;function G(){var O=J.firstChild,l,P;while(O){l=O.next;if(O.type==3||(O.type==1&&O.name!=="p"&&!o[O.name]&&!O.attr("data-mce-type"))){if(!P){P=K(q,1);J.insert(P,O);P.append(O)}else{P.append(O)}}else{P=null}O=l}}function K(l,O){var P=new a(l,O),Q;if(l in e){Q=i[l];if(Q){Q.push(P)}else{i[l]=[P]}}return P}function I(P){var Q,l,O;for(Q=P.prev;Q&&Q.type===3;){l=Q.value.replace(t,"");if(l.length>0){Q.value=l;Q=Q.prev}else{O=Q.prev;Q.remove();Q=O}}}function H(O){var P,l={};for(P in O){if(P!=="li"&&P!="p"){l[P]=O[P]}}return l}n=new b.html.SaxParser({validate:z,self_closing_elements:H(h.getSelfClosingElements()),cdata:function(l){B.append(K("#cdata",4)).value=l},text:function(P,l){var O;if(!L){P=P.replace(k," ");if(B.lastChild&&o[B.lastChild.name]){P=P.replace(E,"")}}if(P.length!==0){O=K("#text",3);O.raw=!!l;B.append(O).value=P}},comment:function(l){B.append(K("#comment",8)).value=l},pi:function(l,O){B.append(K(l,7)).value=O;I(B)},doctype:function(O){var l;l=B.append(K("#doctype",10));l.value=O;I(B)},start:function(l,W,P){var U,R,Q,O,S,X,V,T;Q=z?h.getElementRule(l):{};if(Q){U=K(Q.outputName||l,1);U.attributes=W;U.shortEnded=P;B.append(U);T=p[B.name];if(T&&p[U.name]&&!T[U.name]){M.push(U)}R=d.length;while(R--){S=d[R].name;if(S in W.map){F=c[S];if(F){F.push(U)}else{c[S]=[U]}}}if(o[l]){I(U)}if(!P){B=U}if(!L&&s[l]){L=true}}},end:function(l){var S,P,R,O,Q;P=z?h.getElementRule(l):{};if(P){if(o[l]){if(!L){S=B.firstChild;if(S&&S.type===3){R=S.value.replace(E,"");if(R.length>0){S.value=R;S=S.next}else{O=S.next;S.remove();S=O}while(S&&S.type===3){R=S.value;O=S.next;if(R.length===0||y.test(R)){S.remove();S=O}S=O}}S=B.lastChild;if(S&&S.type===3){R=S.value.replace(t,"");if(R.length>0){S.value=R;S=S.prev}else{O=S.prev;S.remove();S=O}while(S&&S.type===3){R=S.value;O=S.prev;if(R.length===0||y.test(R)){S.remove();S=O}S=O}}}S=B.prev;if(S&&S.type===3){R=S.value.replace(E,"");if(R.length>0){S.value=R}else{S.remove()}}}if(L&&s[l]){L=false}if(P.removeEmpty||P.paddEmpty){if(B.isEmpty(u)){if(P.paddEmpty){B.empty().append(new a("#text","3")).value="\u00a0"}else{if(!B.attributes.map.name&&!B.attributes.map.id){Q=B.parent;B.empty().remove();B=Q;return}}}}B=B.parent}}},h);J=B=new a(m.context||g.root_name,11);n.parse(v);if(z&&M.length){if(!m.context){j(M)}else{m.invalid=true}}if(q&&J.name=="body"){G()}if(!m.invalid){for(N in i){F=e[N];A=i[N];x=A.length;while(x--){if(!A[x].parent){A.splice(x,1)}}for(D=0,C=F.length;D<C;D++){F[D](A,N,m)}}for(D=0,C=d.length;D<C;D++){F=d[D];if(F.name in c){A=c[F.name];x=A.length;while(x--){if(!A[x].parent){A.splice(x,1)}}for(x=0,r=F.callbacks.length;x<r;x++){F.callbacks[x](A,F.name,m)}}}}return J};if(g.remove_trailing_brs){f.addNodeFilter("br",function(n,m){var r,q=n.length,o,v=b.extend({},h.getBlockElements()),k=h.getNonEmptyElements(),t,s,p,u;v.body=1;for(r=0;r<q;r++){o=n[r];t=o.parent;if(v[o.parent.name]&&o===t.lastChild){p=o.prev;while(p){u=p.name;if(u!=="span"||p.attr("data-mce-type")!=="bookmark"){if(u!=="br"){break}if(u==="br"){o=null;break}}p=p.prev}if(o){o.remove();if(t.isEmpty(k)){elementRule=h.getElementRule(t.name);if(elementRule){if(elementRule.removeEmpty){t.remove()}else{if(elementRule.paddEmpty){t.empty().append(new b.html.Node("#text",3)).value="\u00a0"}}}}}}else{s=o;while(t.firstChild===s&&t.lastChild===s){s=t;if(v[t.name]){break}t=t.parent}if(s===t){textNode=new b.html.Node("#text",3);textNode.value="\u00a0";o.replace(textNode)}}}})}if(!g.allow_html_in_named_anchor){f.addAttributeFilter("id,name",function(k,l){var n=k.length,p,m,o,q;while(n--){q=k[n];if(q.name==="a"&&q.firstChild&&!q.attr("href")){o=q.parent;p=q.lastChild;do{m=p.prev;o.insert(p,q);p=m}while(p)}}})}}})(tinymce);tinymce.html.Writer=function(e){var c=[],a,b,d,f,g;e=e||{};a=e.indent;b=tinymce.makeMap(e.indent_before||"");d=tinymce.makeMap(e.indent_after||"");f=tinymce.html.Entities.getEncodeFunc(e.entity_encoding||"raw",e.entities);g=e.element_format=="html";return{start:function(m,k,p){var n,j,h,o;if(a&&b[m]&&c.length>0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}c.push("<",m);if(k){for(n=0,j=k.length;n<j;n++){h=k[n];c.push(" ",h.name,'="',f(h.value,true),'"')}}if(!p||g){c[c.length]=">"}else{c[c.length]=" />"}if(p&&a&&d[m]&&c.length>0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}},end:function(h){var i;c.push("</",h,">");if(a&&d[h]&&c.length>0){i=c[c.length-1];if(i.length>0&&i!=="\n"){c.push("\n")}}},text:function(i,h){if(i.length>0){c[c.length]=h?i:f(i)}},cdata:function(h){c.push("<![CDATA[",h,"]]>")},comment:function(h){c.push("<!--",h,"-->")},pi:function(h,i){if(i){c.push("<?",h," ",i,"?>")}else{c.push("<?",h,"?>")}if(a){c.push("\n")}},doctype:function(h){c.push("<!DOCTYPE",h,">",a?"\n":"")},reset:function(){c.length=0},getContent:function(){return c.join("").replace(/\n$/,"")}}};(function(a){a.html.Serializer=function(c,d){var b=this,e=new a.html.Writer(c);c=c||{};c.validate="validate" in c?c.validate:true;b.schema=d=d||new a.html.Schema();b.writer=e;b.serialize=function(h){var g,i;i=c.validate;g={3:function(k,j){e.text(k.value,k.raw)},8:function(j){e.comment(j.value)},7:function(j){e.pi(j.name,j.value)},10:function(j){e.doctype(j.value)},4:function(j){e.cdata(j.value)},11:function(j){if((j=j.firstChild)){do{f(j)}while(j=j.next)}}};e.reset();function f(k){var t=g[k.type],j,o,s,r,p,u,n,m,q;if(!t){j=k.name;o=k.shortEnded;s=k.attributes;if(i&&s&&s.length>1){u=[];u.map={};q=d.getElementRule(k.name);for(n=0,m=q.attributesOrder.length;n<m;n++){r=q.attributesOrder[n];if(r in s.map){p=s.map[r];u.map[r]=p;u.push({name:r,value:p})}}for(n=0,m=s.length;n<m;n++){r=s[n].name;if(!(r in u.map)){p=s.map[r];u.map[r]=p;u.push({name:r,value:p})}}s=u}e.start(k.name,s,o);if(!o){if((k=k.firstChild)){do{f(k)}while(k=k.next)}e.end(j)}}else{t(k)}}if(h.type==1&&!c.inner){f(h)}else{g[11](h)}return e.getContent()}}})(tinymce);tinymce.dom={};(function(b,h){var g=!!document.addEventListener;function c(k,j,l,i){if(k.addEventListener){k.addEventListener(j,l,i||false)}else{if(k.attachEvent){k.attachEvent("on"+j,l)}}}function e(k,j,l,i){if(k.removeEventListener){k.removeEventListener(j,l,i||false)}else{if(k.detachEvent){k.detachEvent("on"+j,l)}}}function a(n,l){var i,k=l||{};function j(){return false}function m(){return true}for(i in n){if(i!=="layerX"&&i!=="layerY"){k[i]=n[i]}}if(!k.target){k.target=k.srcElement||document}k.preventDefault=function(){k.isDefaultPrevented=m;if(n){if(n.preventDefault){n.preventDefault()}else{n.returnValue=false}}};k.stopPropagation=function(){k.isPropagationStopped=m;if(n){if(n.stopPropagation){n.stopPropagation()}else{n.cancelBubble=true}}};k.stopImmediatePropagation=function(){k.isImmediatePropagationStopped=m;k.stopPropagation()};if(!k.isDefaultPrevented){k.isDefaultPrevented=j;k.isPropagationStopped=j;k.isImmediatePropagationStopped=j}return k}function d(m,n,l){var k=m.document,j={type:"ready"};function i(){if(!l.domLoaded){l.domLoaded=true;n(j)}}if(g){c(m,"DOMContentLoaded",i)}else{c(k,"readystatechange",function(){if(k.readyState==="complete"){e(k,"readystatechange",arguments.callee);i()}});if(k.documentElement.doScroll&&m===m.top){(function(){try{k.documentElement.doScroll("left")}catch(o){setTimeout(arguments.callee,0);return}i()})()}}c(m,"load",i)}function f(k){var q=this,p={},i,o,n,m,l;m="onmouseenter" in document.documentElement;n="onfocusin" in document.documentElement;l={mouseenter:"mouseover",mouseleave:"mouseout"};i=1;q.domLoaded=false;q.events=p;function j(t,x){var s,u,r,v;s=p[x][t.type];if(s){for(u=0,r=s.length;u<r;u++){v=s[u];if(v&&v.func.call(v.scope,t)===false){t.preventDefault()}if(t.isImmediatePropagationStopped()){return}}}}q.bind=function(x,A,D,E){var s,t,u,r,B,z,C,v=window;function y(F){j(a(F||v.event),s)}if(!x||x.nodeType===3||x.nodeType===8){return}if(!x[h]){s=i++;x[h]=s;p[s]={}}else{s=x[h];if(!p[s]){p[s]={}}}E=E||x;A=A.split(" ");u=A.length;while(u--){r=A[u];z=y;B=C=false;if(r==="DOMContentLoaded"){r="ready"}if((q.domLoaded||x.readyState=="complete")&&r==="ready"){q.domLoaded=true;D.call(E,a({type:r}));continue}if(!m){B=l[r];if(B){z=function(F){var H,G;H=F.currentTarget;G=F.relatedTarget;if(G&&H.contains){G=H.contains(G)}else{while(G&&G!==H){G=G.parentNode}}if(!G){F=a(F||v.event);F.type=F.type==="mouseout"?"mouseleave":"mouseenter";F.target=H;j(F,s)}}}}if(!n&&(r==="focusin"||r==="focusout")){C=true;B=r==="focusin"?"focus":"blur";z=function(F){F=a(F||v.event);F.type=F.type==="focus"?"focusin":"focusout";j(F,s)}}t=p[s][r];if(!t){p[s][r]=t=[{func:D,scope:E}];t.fakeName=B;t.capture=C;t.nativeHandler=z;if(!g){t.proxyHandler=k(s)}if(r==="ready"){d(x,z,q)}else{c(x,B||r,g?z:t.proxyHandler,C)}}else{t.push({func:D,scope:E})}}x=t=0;return D};q.unbind=function(x,z,A){var s,u,v,B,r,t;if(!x||x.nodeType===3||x.nodeType===8){return q}s=x[h];if(s){t=p[s];if(z){z=z.split(" ");v=z.length;while(v--){r=z[v];u=t[r];if(u){if(A){B=u.length;while(B--){if(u[B].func===A){u.splice(B,1)}}}if(!A||u.length===0){delete t[r];e(x,u.fakeName||r,g?u.nativeHandler:u.proxyHandler,u.capture)}}}}else{for(r in t){u=t[r];e(x,u.fakeName||r,g?u.nativeHandler:u.proxyHandler,u.capture)}t={}}for(r in t){return q}delete p[s];try{delete x[h]}catch(y){x[h]=null}}return q};q.fire=function(u,s,r){var v,t;if(!u||u.nodeType===3||u.nodeType===8){return q}t=a(null,r);t.type=s;do{v=u[h];if(v){j(t,v)}u=u.parentNode||u.ownerDocument||u.defaultView||u.parentWindow}while(u&&!t.isPropagationStopped());return q};q.clean=function(u){var s,r,t=q.unbind;if(!u||u.nodeType===3||u.nodeType===8){return q}if(u[h]){t(u)}if(!u.getElementsByTagName){u=u.document}if(u&&u.getElementsByTagName){t(u);r=u.getElementsByTagName("*");s=r.length;while(s--){u=r[s];if(u[h]){t(u)}}}return q};q.callNativeHandler=function(s,r){if(p){p[s][r.type].nativeHandler(r)}};q.destory=function(){p={}};q.add=function(v,s,u,t){if(typeof(v)==="string"){v=document.getElementById(v)}if(v&&v instanceof Array){var r=v.length;while(r--){q.add(v[r],s,u,t)}return}if(s==="init"){s="ready"}return q.bind(v,s instanceof Array?s.join(" "):s,u,t)};q.remove=function(v,s,u,t){if(!v){return q}if(typeof(v)==="string"){v=document.getElementById(v)}if(v instanceof Array){var r=v.length;while(r--){q.remove(v[r],s,u,t)}return q}return q.unbind(v,s instanceof Array?s.join(" "):s,u)};q.clear=function(r){if(typeof(r)==="string"){r=document.getElementById(r)}return q.clean(r)};q.cancel=function(r){if(r){q.prevent(r);q.stop(r)}return false};q.prevent=function(r){if(!r.preventDefault){r=a(r)}r.preventDefault();return false};q.stop=function(r){if(!r.stopPropagation){r=a(r)}r.stopPropagation();return false}}b.EventUtils=f;b.Event=new f(function(i){return function(j){tinymce.dom.Event.callNativeHandler(i,j)}});b.Event.bind(window,"ready",function(){});b=0})(tinymce.dom,"data-mce-expando");tinymce.dom.TreeWalker=function(a,c){var b=a;function d(i,f,e,j){var h,g;if(i){if(!j&&i[f]){return i[f]}if(i!=c){h=i[e];if(h){return h}for(g=i.parentNode;g&&g!=c;g=g.parentNode){h=g[e];if(h){return h}}}}}this.current=function(){return b};this.next=function(e){return(b=d(b,"firstChild","nextSibling",e))};this.prev=function(e){return(b=d(b,"lastChild","previousSibling",e))}};(function(e){var g=e.each,d=e.is,f=e.isWebKit,b=e.isIE,h=e.html.Entities,c=/^([a-z0-9],?)+$/i,a=/^[ \t\r\n]*$/;e.create("tinymce.dom.DOMUtils",{doc:null,root:null,files:null,pixelStyles:/^(top|left|bottom|right|width|height|borderWidth)$/,props:{"for":"htmlFor","class":"className",className:"className",checked:"checked",disabled:"disabled",maxlength:"maxLength",readonly:"readOnly",selected:"selected",value:"value",id:"id",name:"name",type:"type"},DOMUtils:function(o,l){var k=this,i,j,n;k.doc=o;k.win=window;k.files={};k.cssFlicker=false;k.counter=0;k.stdMode=!e.isIE||o.documentMode>=8;k.boxModel=!e.isIE||o.compatMode=="CSS1Compat"||k.stdMode;k.hasOuterHTML="outerHTML" in o.createElement("a");k.settings=l=e.extend({keep_values:false,hex_colors:1},l);k.schema=l.schema;k.styles=new e.html.Styles({url_converter:l.url_converter,url_converter_scope:l.url_converter_scope},l.schema);if(e.isIE6){try{o.execCommand("BackgroundImageCache",false,true)}catch(m){k.cssFlicker=true}}k.fixDoc(o);k.events=l.ownEvents?new e.dom.EventUtils(l.proxy):e.dom.Event;e.addUnload(k.destroy,k);n=l.schema?l.schema.getBlockElements():{};k.isBlock=function(q){var p=q.nodeType;if(p){return !!(p===1&&n[q.nodeName])}return !!n[q]}},fixDoc:function(k){var j=this.settings,i;if(b&&j.schema){("abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video").replace(/\w+/g,function(l){k.createElement(l)});for(i in j.schema.getCustomElements()){k.createElement(i)}}},clone:function(k,i){var j=this,m,l;if(!b||k.nodeType!==1||i){return k.cloneNode(i)}l=j.doc;if(!i){m=l.createElement(k.nodeName);g(j.getAttribs(k),function(n){j.setAttrib(m,n.nodeName,j.getAttrib(k,n.nodeName))});return m}return m.firstChild},getRoot:function(){var i=this,j=i.settings;return(j&&i.get(j.root_element))||i.doc.body},getViewPort:function(j){var k,i;j=!j?this.win:j;k=j.document;i=this.boxModel?k.documentElement:k.body;return{x:j.pageXOffset||i.scrollLeft,y:j.pageYOffset||i.scrollTop,w:j.innerWidth||i.clientWidth,h:j.innerHeight||i.clientHeight}},getRect:function(l){var k,i=this,j;l=i.get(l);k=i.getPos(l);j=i.getSize(l);return{x:k.x,y:k.y,w:j.w,h:j.h}},getSize:function(l){var j=this,i,k;l=j.get(l);i=j.getStyle(l,"width");k=j.getStyle(l,"height");if(i.indexOf("px")===-1){i=0}if(k.indexOf("px")===-1){k=0}return{w:parseInt(i,10)||l.offsetWidth||l.clientWidth,h:parseInt(k,10)||l.offsetHeight||l.clientHeight}},getParent:function(k,j,i){return this.getParents(k,j,i,false)},getParents:function(s,m,k,q){var j=this,i,l=j.settings,p=[];s=j.get(s);q=q===undefined;if(l.strict_root){k=k||j.getRoot()}if(d(m,"string")){i=m;if(m==="*"){m=function(o){return o.nodeType==1}}else{m=function(o){return j.is(o,i)}}}while(s){if(s==k||!s.nodeType||s.nodeType===9){break}if(!m||m(s)){if(q){p.push(s)}else{return s}}s=s.parentNode}return q?p:null},get:function(i){var j;if(i&&this.doc&&typeof(i)=="string"){j=i;i=this.doc.getElementById(i);if(i&&i.id!==j){return this.doc.getElementsByName(j)[1]}}return i},getNext:function(j,i){return this._findSib(j,i,"nextSibling")},getPrev:function(j,i){return this._findSib(j,i,"previousSibling")},select:function(k,j){var i=this;return e.dom.Sizzle(k,i.get(j)||i.get(i.settings.root_element)||i.doc,[])},is:function(l,j){var k;if(l.length===undefined){if(j==="*"){return l.nodeType==1}if(c.test(j)){j=j.toLowerCase().split(/,/);l=l.nodeName.toLowerCase();for(k=j.length-1;k>=0;k--){if(j[k]==l){return true}}return false}}return e.dom.Sizzle.matches(j,l.nodeType?[l]:l).length>0},add:function(l,o,i,k,m){var j=this;return this.run(l,function(r){var q,n;q=d(o,"string")?j.doc.createElement(o):o;j.setAttribs(q,i);if(k){if(k.nodeType){q.appendChild(k)}else{j.setHTML(q,k)}}return !m?r.appendChild(q):q})},create:function(k,i,j){return this.add(this.doc.createElement(k),k,i,j,1)},createHTML:function(q,i,m){var p="",l=this,j;p+="<"+q;for(j in i){if(i.hasOwnProperty(j)){p+=" "+j+'="'+l.encode(i[j])+'"'}}if(typeof(m)!="undefined"){return p+">"+m+"</"+q+">"}return p+" />"},remove:function(i,j){return this.run(i,function(l){var m,k=l.parentNode;if(!k){return null}if(j){while(m=l.firstChild){if(!e.isIE||m.nodeType!==3||m.nodeValue){k.insertBefore(m,l)}else{l.removeChild(m)}}}return k.removeChild(l)})},setStyle:function(l,i,j){var k=this;return k.run(l,function(o){var n,m;n=o.style;i=i.replace(/-(\D)/g,function(q,p){return p.toUpperCase()});if(k.pixelStyles.test(i)&&(e.is(j,"number")||/^[\-0-9\.]+$/.test(j))){j+="px"}switch(i){case"opacity":if(b){n.filter=j===""?"":"alpha(opacity="+(j*100)+")";if(!l.currentStyle||!l.currentStyle.hasLayout){n.display="inline-block"}}n[i]=n["-moz-opacity"]=n["-khtml-opacity"]=j||"";break;case"float":b?n.styleFloat=j:n.cssFloat=j;break;default:n[i]=j||""}if(k.settings.update_styles){k.setAttrib(o,"data-mce-style")}})},getStyle:function(l,i,k){l=this.get(l);if(!l){return}if(this.doc.defaultView&&k){i=i.replace(/[A-Z]/g,function(m){return"-"+m});try{return this.doc.defaultView.getComputedStyle(l,null).getPropertyValue(i)}catch(j){return null}}i=i.replace(/-(\D)/g,function(n,m){return m.toUpperCase()});if(i=="float"){i=b?"styleFloat":"cssFloat"}if(l.currentStyle&&k){return l.currentStyle[i]}return l.style?l.style[i]:undefined},setStyles:function(l,m){var j=this,k=j.settings,i;i=k.update_styles;k.update_styles=0;g(m,function(o,p){j.setStyle(l,p,o)});k.update_styles=i;if(k.update_styles){j.setAttrib(l,k.cssText)}},removeAllAttribs:function(i){return this.run(i,function(l){var k,j=l.attributes;for(k=j.length-1;k>=0;k--){l.removeAttributeNode(j.item(k))}})},setAttrib:function(k,l,i){var j=this;if(!k||!l){return}if(j.settings.strict){l=l.toLowerCase()}return this.run(k,function(p){var o=j.settings;var m=p.getAttribute(l);if(i!==null){switch(l){case"style":if(!d(i,"string")){g(i,function(q,r){j.setStyle(p,r,q)});return}if(o.keep_values){if(i&&!j._isRes(i)){p.setAttribute("data-mce-style",i,2)}else{p.removeAttribute("data-mce-style",2)}}p.style.cssText=i;break;case"class":p.className=i||"";break;case"src":case"href":if(o.keep_values){if(o.url_converter){i=o.url_converter.call(o.url_converter_scope||j,i,l,p)}j.setAttrib(p,"data-mce-"+l,i,2)}break;case"shape":p.setAttribute("data-mce-style",i);break}}if(d(i)&&i!==null&&i.length!==0){p.setAttribute(l,""+i,2)}else{p.removeAttribute(l,2)}if(tinyMCE.activeEditor&&m!=i){var n=tinyMCE.activeEditor;n.onSetAttrib.dispatch(n,p,l,i)}})},setAttribs:function(j,k){var i=this;return this.run(j,function(l){g(k,function(m,o){i.setAttrib(l,o,m)})})},getAttrib:function(m,o,k){var i,j=this,l;m=j.get(m);if(!m||m.nodeType!==1){return k===l?false:k}if(!d(k)){k=""}if(/^(src|href|style|coords|shape)$/.test(o)){i=m.getAttribute("data-mce-"+o);if(i){return i}}if(b&&j.props[o]){i=m[j.props[o]];i=i&&i.nodeValue?i.nodeValue:i}if(!i){i=m.getAttribute(o,2)}if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(o)){if(m[j.props[o]]===true&&i===""){return o}return i?o:""}if(m.nodeName==="FORM"&&m.getAttributeNode(o)){return m.getAttributeNode(o).nodeValue}if(o==="style"){i=i||m.style.cssText;if(i){i=j.serializeStyle(j.parseStyle(i),m.nodeName);if(j.settings.keep_values&&!j._isRes(i)){m.setAttribute("data-mce-style",i)}}}if(f&&o==="class"&&i){i=i.replace(/(apple|webkit)\-[a-z\-]+/gi,"")}if(b){switch(o){case"rowspan":case"colspan":if(i===1){i=""}break;case"size":if(i==="+0"||i===20||i===0){i=""}break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":if(i===0){i=""}break;case"hspace":if(i===-1){i=""}break;case"maxlength":case"tabindex":if(i===32768||i===2147483647||i==="32768"){i=""}break;case"multiple":case"compact":case"noshade":case"nowrap":if(i===65535){return o}return k;case"shape":i=i.toLowerCase();break;default:if(o.indexOf("on")===0&&i){i=e._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1",""+i)}}}return(i!==l&&i!==null&&i!=="")?""+i:k},getPos:function(q,l){var j=this,i=0,p=0,m,o=j.doc,k;q=j.get(q);l=l||o.body;if(q){if(q.getBoundingClientRect){q=q.getBoundingClientRect();m=j.boxModel?o.documentElement:o.body;i=q.left+(o.documentElement.scrollLeft||o.body.scrollLeft)-m.clientTop;p=q.top+(o.documentElement.scrollTop||o.body.scrollTop)-m.clientLeft;return{x:i,y:p}}k=q;while(k&&k!=l&&k.nodeType){i+=k.offsetLeft||0;p+=k.offsetTop||0;k=k.offsetParent}k=q.parentNode;while(k&&k!=l&&k.nodeType){i-=k.scrollLeft||0;p-=k.scrollTop||0;k=k.parentNode}}return{x:i,y:p}},parseStyle:function(i){return this.styles.parse(i)},serializeStyle:function(j,i){return this.styles.serialize(j,i)},addStyle:function(j){var k=this.doc,i;styleElm=k.getElementById("mceDefaultStyles");if(!styleElm){styleElm=k.createElement("style"),styleElm.id="mceDefaultStyles";styleElm.type="text/css";i=k.getElementsByTagName("head")[0];if(i.firstChild){i.insertBefore(styleElm,i.firstChild)}else{i.appendChild(styleElm)}}if(styleElm.styleSheet){styleElm.styleSheet.cssText+=j}else{styleElm.appendChild(k.createTextNode(j))}},loadCSS:function(i){var k=this,l=k.doc,j;if(!i){i=""}j=l.getElementsByTagName("head")[0];g(i.split(","),function(m){var n;if(k.files[m]){return}k.files[m]=true;n=k.create("link",{rel:"stylesheet",href:e._addVer(m)});if(b&&l.documentMode&&l.recalc){n.onload=function(){if(l.recalc){l.recalc()}n.onload=null}}j.appendChild(n)})},addClass:function(i,j){return this.run(i,function(k){var l;if(!j){return 0}if(this.hasClass(k,j)){return k.className}l=this.removeClass(k,j);return k.className=(l!=""?(l+" "):"")+j})},removeClass:function(k,l){var i=this,j;return i.run(k,function(n){var m;if(i.hasClass(n,l)){if(!j){j=new RegExp("(^|\\s+)"+l+"(\\s+|$)","g")}m=n.className.replace(j," ");m=e.trim(m!=" "?m:"");n.className=m;if(!m){n.removeAttribute("class");n.removeAttribute("className")}return m}return n.className})},hasClass:function(j,i){j=this.get(j);if(!j||!i){return false}return(" "+j.className+" ").indexOf(" "+i+" ")!==-1},show:function(i){return this.setStyle(i,"display","block")},hide:function(i){return this.setStyle(i,"display","none")},isHidden:function(i){i=this.get(i);return !i||i.style.display=="none"||this.getStyle(i,"display")=="none"},uniqueId:function(i){return(!i?"mce_":i)+(this.counter++)},setHTML:function(k,j){var i=this;return i.run(k,function(m){if(b){while(m.firstChild){m.removeChild(m.firstChild)}try{m.innerHTML="<br />"+j;m.removeChild(m.firstChild)}catch(l){var n=i.create("div");n.innerHTML="<br />"+j;g(e.grep(n.childNodes),function(p,o){if(o&&m.canHaveHTML){m.appendChild(p)}})}}else{m.innerHTML=j}return j})},getOuterHTML:function(k){var j,i=this;k=i.get(k);if(!k){return null}if(k.nodeType===1&&i.hasOuterHTML){return k.outerHTML}j=(k.ownerDocument||i.doc).createElement("body");j.appendChild(k.cloneNode(true));return j.innerHTML},setOuterHTML:function(l,j,m){var i=this;function k(p,o,r){var s,q;q=r.createElement("body");q.innerHTML=o;s=q.lastChild;while(s){i.insertAfter(s.cloneNode(true),p);s=s.previousSibling}i.remove(p)}return this.run(l,function(o){o=i.get(o);if(o.nodeType==1){m=m||o.ownerDocument||i.doc;if(b){try{if(b&&o.nodeType==1){o.outerHTML=j}else{k(o,j,m)}}catch(n){k(o,j,m)}}else{k(o,j,m)}}})},decode:h.decode,encode:h.encodeAllRaw,insertAfter:function(i,j){j=this.get(j);return this.run(i,function(l){var k,m;k=j.parentNode;m=j.nextSibling;if(m){k.insertBefore(l,m)}else{k.appendChild(l)}return l})},replace:function(m,l,i){var j=this;if(d(l,"array")){m=m.cloneNode(true)}return j.run(l,function(k){if(i){g(e.grep(k.childNodes),function(n){m.appendChild(n)})}return k.parentNode.replaceChild(m,k)})},rename:function(l,i){var k=this,j;if(l.nodeName!=i.toUpperCase()){j=k.create(i);g(k.getAttribs(l),function(m){k.setAttrib(j,m.nodeName,k.getAttrib(l,m.nodeName))});k.replace(j,l,1)}return j||l},findCommonAncestor:function(k,i){var l=k,j;while(l){j=i;while(j&&l!=j){j=j.parentNode}if(l==j){break}l=l.parentNode}if(!l&&k.ownerDocument){return k.ownerDocument.documentElement}return l},toHex:function(i){var k=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(i);function j(l){l=parseInt(l,10).toString(16);return l.length>1?l:"0"+l}if(k){i="#"+j(k[1])+j(k[2])+j(k[3]);return i}return i},getClasses:function(){var n=this,j=[],m,o={},p=n.settings.class_filter,l;if(n.classes){return n.classes}function q(i){g(i.imports,function(s){q(s)});g(i.cssRules||i.rules,function(s){switch(s.type||1){case 1:if(s.selectorText){g(s.selectorText.split(","),function(r){r=r.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(r)||!/\.[\w\-]+$/.test(r)){return}l=r;r=e._replace(/.*\.([a-z0-9_\-]+).*/i,"$1",r);if(p&&!(r=p(r,l))){return}if(!o[r]){j.push({"class":r});o[r]=1}})}break;case 3:q(s.styleSheet);break}})}try{g(n.doc.styleSheets,q)}catch(k){}if(j.length>0){n.classes=j}return j},run:function(l,k,j){var i=this,m;if(i.doc&&typeof(l)==="string"){l=i.get(l)}if(!l){return false}j=j||this;if(!l.nodeType&&(l.length||l.length===0)){m=[];g(l,function(o,n){if(o){if(typeof(o)=="string"){o=i.doc.getElementById(o)}m.push(k.call(j,o,n))}});return m}return k.call(j,l)},getAttribs:function(j){var i;j=this.get(j);if(!j){return[]}if(b){i=[];if(j.nodeName=="OBJECT"){return j.attributes}if(j.nodeName==="OPTION"&&this.getAttrib(j,"selected")){i.push({specified:1,nodeName:"selected"})}j.cloneNode(false).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(k){i.push({specified:1,nodeName:k})});return i}return j.attributes},isEmpty:function(m,k){var r=this,o,n,q,j,l,p=0;m=m.firstChild;if(m){j=new e.dom.TreeWalker(m,m.parentNode);k=k||r.schema?r.schema.getNonEmptyElements():null;do{q=m.nodeType;if(q===1){if(m.getAttribute("data-mce-bogus")){continue}l=m.nodeName.toLowerCase();if(k&&k[l]){if(l==="br"){p++;continue}return false}n=r.getAttribs(m);o=m.attributes.length;while(o--){l=m.attributes[o].nodeName;if(l==="name"||l==="data-mce-bookmark"){return false}}}if(q==8){return false}if((q===3&&!a.test(m.nodeValue))){return false}}while(m=j.next())}return p<=1},destroy:function(j){var i=this;i.win=i.doc=i.root=i.events=i.frag=null;if(!j){e.removeUnload(i.destroy)}},createRng:function(){var i=this.doc;return i.createRange?i.createRange():new e.dom.Range(this)},nodeIndex:function(m,n){var i=0,k,l,j;if(m){for(k=m.nodeType,m=m.previousSibling,l=m;m;m=m.previousSibling){j=m.nodeType;if(n&&j==3){if(j==k||!m.nodeValue.length){continue}}i++;k=j}}return i},split:function(m,l,p){var q=this,i=q.createRng(),n,k,o;function j(v){var t,s=v.childNodes,u=v.nodeType;function x(A){var z=A.previousSibling&&A.previousSibling.nodeName=="SPAN";var y=A.nextSibling&&A.nextSibling.nodeName=="SPAN";return z&&y}if(u==1&&v.getAttribute("data-mce-type")=="bookmark"){return}for(t=s.length-1;t>=0;t--){j(s[t])}if(u!=9){if(u==3&&v.nodeValue.length>0){var r=e.trim(v.nodeValue).length;if(!q.isBlock(v.parentNode)||r>0||r===0&&x(v)){return}}else{if(u==1){s=v.childNodes;if(s.length==1&&s[0]&&s[0].nodeType==1&&s[0].getAttribute("data-mce-type")=="bookmark"){v.parentNode.insertBefore(s[0],v)}if(s.length||/^(br|hr|input|img)$/i.test(v.nodeName)){return}}}q.remove(v)}return v}if(m&&l){i.setStart(m.parentNode,q.nodeIndex(m));i.setEnd(l.parentNode,q.nodeIndex(l));n=i.extractContents();i=q.createRng();i.setStart(l.parentNode,q.nodeIndex(l)+1);i.setEnd(m.parentNode,q.nodeIndex(m)+1);k=i.extractContents();o=m.parentNode;o.insertBefore(j(n),m);if(p){o.replaceChild(p,l)}else{o.insertBefore(l,m)}o.insertBefore(j(k),m);q.remove(m);return p||l}},bind:function(l,i,k,j){return this.events.add(l,i,k,j||this)},unbind:function(k,i,j){return this.events.remove(k,i,j)},fire:function(k,j,i){return this.events.fire(k,j,i)},getContentEditable:function(j){var i;if(j.nodeType!=1){return null}i=j.getAttribute("data-mce-contenteditable");if(i&&i!=="inherit"){return i}return j.contentEditable!=="inherit"?j.contentEditable:null},_findSib:function(l,i,j){var k=this,m=i;if(l){if(d(m,"string")){m=function(n){return k.is(n,i)}}for(l=l[j];l;l=l[j]){if(m(l)){return l}}}return null},_isRes:function(i){return/^(top|left|bottom|right|width|height)/i.test(i)||/;\s*(top|left|bottom|right|width|height)/i.test(i)}});e.DOM=new e.dom.DOMUtils(document,{process_html:0})})(tinymce);(function(a){function b(c){var O=this,e=c.doc,U=0,F=1,j=2,E=true,S=false,W="startOffset",h="startContainer",Q="endContainer",A="endOffset",k=tinymce.extend,n=c.nodeIndex;k(O,{startContainer:e,startOffset:0,endContainer:e,endOffset:0,collapsed:E,commonAncestorContainer:e,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:q,setEnd:s,setStartBefore:g,setStartAfter:J,setEndBefore:K,setEndAfter:u,collapse:B,selectNode:y,selectNodeContents:G,compareBoundaryPoints:v,deleteContents:p,extractContents:I,cloneContents:d,insertNode:D,surroundContents:N,cloneRange:L,toStringIE:T});function x(){return e.createDocumentFragment()}function q(X,t){C(E,X,t)}function s(X,t){C(S,X,t)}function g(t){q(t.parentNode,n(t))}function J(t){q(t.parentNode,n(t)+1)}function K(t){s(t.parentNode,n(t))}function u(t){s(t.parentNode,n(t)+1)}function B(t){if(t){O[Q]=O[h];O[A]=O[W]}else{O[h]=O[Q];O[W]=O[A]}O.collapsed=E}function y(t){g(t);u(t)}function G(t){q(t,0);s(t,t.nodeType===1?t.childNodes.length:t.nodeValue.length)}function v(aa,t){var ad=O[h],Y=O[W],ac=O[Q],X=O[A],ab=t.startContainer,af=t.startOffset,Z=t.endContainer,ae=t.endOffset;if(aa===0){return H(ad,Y,ab,af)}if(aa===1){return H(ac,X,ab,af)}if(aa===2){return H(ac,X,Z,ae)}if(aa===3){return H(ad,Y,Z,ae)}}function p(){l(j)}function I(){return l(U)}function d(){return l(F)}function D(aa){var X=this[h],t=this[W],Z,Y;if((X.nodeType===3||X.nodeType===4)&&X.nodeValue){if(!t){X.parentNode.insertBefore(aa,X)}else{if(t>=X.nodeValue.length){c.insertAfter(aa,X)}else{Z=X.splitText(t);X.parentNode.insertBefore(aa,Z)}}}else{if(X.childNodes.length>0){Y=X.childNodes[t]}if(Y){X.insertBefore(aa,Y)}else{X.appendChild(aa)}}}function N(X){var t=O.extractContents();O.insertNode(X);X.appendChild(t);O.selectNode(X)}function L(){return k(new b(c),{startContainer:O[h],startOffset:O[W],endContainer:O[Q],endOffset:O[A],collapsed:O.collapsed,commonAncestorContainer:O.commonAncestorContainer})}function P(t,X){var Y;if(t.nodeType==3){return t}if(X<0){return t}Y=t.firstChild;while(Y&&X>0){--X;Y=Y.nextSibling}if(Y){return Y}return t}function m(){return(O[h]==O[Q]&&O[W]==O[A])}function H(Z,ab,X,aa){var ac,Y,t,ad,af,ae;if(Z==X){if(ab==aa){return 0}if(ab<aa){return -1}return 1}ac=X;while(ac&&ac.parentNode!=Z){ac=ac.parentNode}if(ac){Y=0;t=Z.firstChild;while(t!=ac&&Y<ab){Y++;t=t.nextSibling}if(ab<=Y){return -1}return 1}ac=Z;while(ac&&ac.parentNode!=X){ac=ac.parentNode}if(ac){Y=0;t=X.firstChild;while(t!=ac&&Y<aa){Y++;t=t.nextSibling}if(Y<aa){return -1}return 1}ad=c.findCommonAncestor(Z,X);af=Z;while(af&&af.parentNode!=ad){af=af.parentNode}if(!af){af=ad}ae=X;while(ae&&ae.parentNode!=ad){ae=ae.parentNode}if(!ae){ae=ad}if(af==ae){return 0}t=ad.firstChild;while(t){if(t==af){return -1}if(t==ae){return 1}t=t.nextSibling}}function C(X,aa,Z){var t,Y;if(X){O[h]=aa;O[W]=Z}else{O[Q]=aa;O[A]=Z}t=O[Q];while(t.parentNode){t=t.parentNode}Y=O[h];while(Y.parentNode){Y=Y.parentNode}if(Y==t){if(H(O[h],O[W],O[Q],O[A])>0){O.collapse(X)}}else{O.collapse(X)}O.collapsed=m();O.commonAncestorContainer=c.findCommonAncestor(O[h],O[Q])}function l(ad){var ac,Z=0,af=0,X,ab,Y,aa,t,ae;if(O[h]==O[Q]){return f(ad)}for(ac=O[Q],X=ac.parentNode;X;ac=X,X=X.parentNode){if(X==O[h]){return r(ac,ad)}++Z}for(ac=O[h],X=ac.parentNode;X;ac=X,X=X.parentNode){if(X==O[Q]){return V(ac,ad)}++af}ab=af-Z;Y=O[h];while(ab>0){Y=Y.parentNode;ab--}aa=O[Q];while(ab<0){aa=aa.parentNode;ab++}for(t=Y.parentNode,ae=aa.parentNode;t!=ae;t=t.parentNode,ae=ae.parentNode){Y=t;aa=ae}return o(Y,aa,ad)}function f(ac){var ae,af,t,Y,Z,ad,aa,X,ab;if(ac!=j){ae=x()}if(O[W]==O[A]){return ae}if(O[h].nodeType==3){af=O[h].nodeValue;t=af.substring(O[W],O[A]);if(ac!=F){Y=O[h];X=O[W];ab=O[A]-O[W];if(X===0&&ab>=Y.nodeValue.length-1){Y.parentNode.removeChild(Y)}else{Y.deleteData(X,ab)}O.collapse(E)}if(ac==j){return}if(t.length>0){ae.appendChild(e.createTextNode(t))}return ae}Y=P(O[h],O[W]);Z=O[A]-O[W];while(Y&&Z>0){ad=Y.nextSibling;aa=z(Y,ac);if(ae){ae.appendChild(aa)}--Z;Y=ad}if(ac!=F){O.collapse(E)}return ae}function r(ad,aa){var ac,ab,X,t,Z,Y;if(aa!=j){ac=x()}ab=i(ad,aa);if(ac){ac.appendChild(ab)}X=n(ad);t=X-O[W];if(t<=0){if(aa!=F){O.setEndBefore(ad);O.collapse(S)}return ac}ab=ad.previousSibling;while(t>0){Z=ab.previousSibling;Y=z(ab,aa);if(ac){ac.insertBefore(Y,ac.firstChild)}--t;ab=Z}if(aa!=F){O.setEndBefore(ad);O.collapse(S)}return ac}function V(ab,aa){var ad,X,ac,t,Z,Y;if(aa!=j){ad=x()}ac=R(ab,aa);if(ad){ad.appendChild(ac)}X=n(ab);++X;t=O[A]-X;ac=ab.nextSibling;while(ac&&t>0){Z=ac.nextSibling;Y=z(ac,aa);if(ad){ad.appendChild(Y)}--t;ac=Z}if(aa!=F){O.setStartAfter(ab);O.collapse(E)}return ad}function o(ab,t,ae){var Y,ag,aa,ac,ad,X,af,Z;if(ae!=j){ag=x()}Y=R(ab,ae);if(ag){ag.appendChild(Y)}aa=ab.parentNode;ac=n(ab);ad=n(t);++ac;X=ad-ac;af=ab.nextSibling;while(X>0){Z=af.nextSibling;Y=z(af,ae);if(ag){ag.appendChild(Y)}af=Z;--X}Y=i(t,ae);if(ag){ag.appendChild(Y)}if(ae!=F){O.setStartAfter(ab);O.collapse(E)}return ag}function i(ac,ad){var Y=P(O[Q],O[A]-1),ae,ab,aa,t,X,Z=Y!=O[Q];if(Y==ac){return M(Y,Z,S,ad)}ae=Y.parentNode;ab=M(ae,S,S,ad);while(ae){while(Y){aa=Y.previousSibling;t=M(Y,Z,S,ad);if(ad!=j){ab.insertBefore(t,ab.firstChild)}Z=E;Y=aa}if(ae==ac){return ab}Y=ae.previousSibling;ae=ae.parentNode;X=M(ae,S,S,ad);if(ad!=j){X.appendChild(ab)}ab=X}}function R(ac,ad){var Z=P(O[h],O[W]),aa=Z!=O[h],ae,ab,Y,t,X;if(Z==ac){return M(Z,aa,E,ad)}ae=Z.parentNode;ab=M(ae,S,E,ad);while(ae){while(Z){Y=Z.nextSibling;t=M(Z,aa,E,ad);if(ad!=j){ab.appendChild(t)}aa=E;Z=Y}if(ae==ac){return ab}Z=ae.nextSibling;ae=ae.parentNode;X=M(ae,S,E,ad);if(ad!=j){X.appendChild(ab)}ab=X}}function M(t,aa,ad,ae){var Z,Y,ab,X,ac;if(aa){return z(t,ae)}if(t.nodeType==3){Z=t.nodeValue;if(ad){X=O[W];Y=Z.substring(X);ab=Z.substring(0,X)}else{X=O[A];Y=Z.substring(0,X);ab=Z.substring(X)}if(ae!=F){t.nodeValue=ab}if(ae==j){return}ac=c.clone(t,S);ac.nodeValue=Y;return ac}if(ae==j){return}return c.clone(t,S)}function z(X,t){if(t!=j){return t==F?c.clone(X,E):X}X.parentNode.removeChild(X)}function T(){return c.create("body",null,d()).outerText}return O}a.Range=b;b.prototype.toString=function(){return this.toStringIE()}})(tinymce.dom);(function(){function a(d){var b=this,h=d.dom,c=true,f=false;function e(i,j){var k,t=0,q,n,m,l,o,r,p=-1,s;k=i.duplicate();k.collapse(j);s=k.parentElement();if(s.ownerDocument!==d.dom.doc){return}while(s.contentEditable==="false"){s=s.parentNode}if(!s.hasChildNodes()){return{node:s,inside:1}}m=s.children;q=m.length-1;while(t<=q){r=Math.floor((t+q)/2);l=m[r];k.moveToElementText(l);p=k.compareEndPoints(j?"StartToStart":"EndToEnd",i);if(p>0){q=r-1}else{if(p<0){t=r+1}else{return{node:l}}}}if(p<0){if(!l){k.moveToElementText(s);k.collapse(true);l=s;n=true}else{k.collapse(false)}o=0;while(k.compareEndPoints(j?"StartToStart":"StartToEnd",i)!==0){if(k.move("character",1)===0||s!=k.parentElement()){break}o++}}else{k.collapse(true);o=0;while(k.compareEndPoints(j?"StartToStart":"StartToEnd",i)!==0){if(k.move("character",-1)===0||s!=k.parentElement()){break}o++}}return{node:l,position:p,offset:o,inside:n}}function g(){var i=d.getRng(),r=h.createRng(),l,k,p,q,m,j;l=i.item?i.item(0):i.parentElement();if(l.ownerDocument!=h.doc){return r}k=d.isCollapsed();if(i.item){r.setStart(l.parentNode,h.nodeIndex(l));r.setEnd(r.startContainer,r.startOffset+1);return r}function o(A){var u=e(i,A),s,y,z=0,x,v,t;s=u.node;y=u.offset;if(u.inside&&!s.hasChildNodes()){r[A?"setStart":"setEnd"](s,0);return}if(y===v){r[A?"setStartBefore":"setEndAfter"](s);return}if(u.position<0){x=u.inside?s.firstChild:s.nextSibling;if(!x){r[A?"setStartAfter":"setEndAfter"](s);return}if(!y){if(x.nodeType==3){r[A?"setStart":"setEnd"](x,0)}else{r[A?"setStartBefore":"setEndBefore"](x)}return}while(x){t=x.nodeValue;z+=t.length;if(z>=y){s=x;z-=y;z=t.length-z;break}x=x.nextSibling}}else{x=s.previousSibling;if(!x){return r[A?"setStartBefore":"setEndBefore"](s)}if(!y){if(s.nodeType==3){r[A?"setStart":"setEnd"](x,s.nodeValue.length)}else{r[A?"setStartAfter":"setEndAfter"](x)}return}while(x){z+=x.nodeValue.length;if(z>=y){s=x;z-=y;break}x=x.previousSibling}}r[A?"setStart":"setEnd"](s,z)}try{o(true);if(!k){o()}}catch(n){if(n.number==-2147024809){m=b.getBookmark(2);p=i.duplicate();p.collapse(true);l=p.parentElement();if(!k){p=i.duplicate();p.collapse(false);q=p.parentElement();q.innerHTML=q.innerHTML}l.innerHTML=l.innerHTML;b.moveToBookmark(m);i=d.getRng();o(true);if(!k){o()}}else{throw n}}return r}this.getBookmark=function(m){var j=d.getRng(),o,i,l={};function n(u){var t,p,s,r,q=[];t=u.parentNode;p=h.getRoot().parentNode;while(t!=p&&t.nodeType!==9){s=t.children;r=s.length;while(r--){if(u===s[r]){q.push(r);break}}u=t;t=t.parentNode}return q}function k(q){var p;p=e(j,q);if(p){return{position:p.position,offset:p.offset,indexes:n(p.node),inside:p.inside}}}if(m===2){if(!j.item){l.start=k(true);if(!d.isCollapsed()){l.end=k()}}else{l.start={ctrl:true,indexes:n(j.item(0))}}}return l};this.moveToBookmark=function(k){var j,i=h.doc.body;function m(o){var r,q,n,p;r=h.getRoot();for(q=o.length-1;q>=0;q--){p=r.children;n=o[q];if(n<=p.length-1){r=p[n]}}return r}function l(r){var n=k[r?"start":"end"],q,p,o;if(n){q=n.position>0;p=i.createTextRange();p.moveToElementText(m(n.indexes));offset=n.offset;if(offset!==o){p.collapse(n.inside||q);p.moveStart("character",q?-offset:offset)}else{p.collapse(r)}j.setEndPoint(r?"StartToStart":"EndToStart",p);if(r){j.collapse(true)}}}if(k.start){if(k.start.ctrl){j=i.createControlRange();j.addElement(m(k.start.indexes));j.select()}else{j=i.createTextRange();l(true);l();j.select()}}};this.addRange=function(i){var n,l,k,p,t,q,s,r=d.dom.doc,m=r.body;function j(A){var v,z,u,y,x;u=h.create("a");v=A?k:t;z=A?p:q;y=n.duplicate();if(v==r||v==r.documentElement){v=m;z=0}if(v.nodeType==3){v.parentNode.insertBefore(u,v);y.moveToElementText(u);y.moveStart("character",z);h.remove(u);n.setEndPoint(A?"StartToStart":"EndToEnd",y)}else{x=v.childNodes;if(x.length){if(z>=x.length){h.insertAfter(u,x[x.length-1])}else{v.insertBefore(u,x[z])}y.moveToElementText(u)}else{if(v.canHaveHTML){v.innerHTML="<span>\uFEFF</span>";u=v.firstChild;y.moveToElementText(u);y.collapse(f)}}n.setEndPoint(A?"StartToStart":"EndToEnd",y);h.remove(u)}}k=i.startContainer;p=i.startOffset;t=i.endContainer;q=i.endOffset;n=m.createTextRange();if(k==t&&k.nodeType==1){if(p==q&&!k.hasChildNodes()){if(k.canHaveHTML){s=k.previousSibling;if(s&&!s.hasChildNodes()&&h.isBlock(s)){s.innerHTML="\uFEFF"}else{s=null}k.innerHTML="<span>\uFEFF</span><span>\uFEFF</span>";n.moveToElementText(k.lastChild);n.select();h.doc.selection.clear();k.innerHTML="";if(s){s.innerHTML=""}return}else{p=h.nodeIndex(k);k=k.parentNode}}if(p==q-1){try{l=m.createControlRange();l.addElement(k.childNodes[p]);l.select();return}catch(o){}}}j(true);j();n.select()};this.getRangeAt=g}tinymce.dom.TridentSelection=a})();(function(){var n=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i="sizcache",o=0,r=Object.prototype.toString,h=false,g=true,q=/\\/g,u=/\r\n/g,x=/\W/;[0,0].sort(function(){g=false;return 0});var d=function(C,e,F,G){F=F||[];e=e||document;var I=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!C||typeof C!=="string"){return F}var z,K,N,y,J,M,L,E,B=true,A=d.isXML(e),D=[],H=C;do{n.exec("");z=n.exec(H);if(z){H=z[3];D.push(z[1]);if(z[2]){y=z[3];break}}}while(z);if(D.length>1&&j.exec(C)){if(D.length===2&&k.relative[D[0]]){K=s(D[0]+D[1],e,G)}else{K=k.relative[D[0]]?[e]:d(D.shift(),e);while(D.length){C=D.shift();if(k.relative[C]){C+=D.shift()}K=s(C,K,G)}}}else{if(!G&&D.length>1&&e.nodeType===9&&!A&&k.match.ID.test(D[0])&&!k.match.ID.test(D[D.length-1])){J=d.find(D.shift(),e,A);e=J.expr?d.filter(J.expr,J.set)[0]:J.set[0]}if(e){J=G?{expr:D.pop(),set:l(G)}:d.find(D.pop(),D.length===1&&(D[0]==="~"||D[0]==="+")&&e.parentNode?e.parentNode:e,A);K=J.expr?d.filter(J.expr,J.set):J.set;if(D.length>0){N=l(K)}else{B=false}while(D.length){M=D.pop();L=M;if(!k.relative[M]){M=""}else{L=D.pop()}if(L==null){L=e}k.relative[M](N,L,A)}}else{N=D=[]}}if(!N){N=K}if(!N){d.error(M||C)}if(r.call(N)==="[object Array]"){if(!B){F.push.apply(F,N)}else{if(e&&e.nodeType===1){for(E=0;N[E]!=null;E++){if(N[E]&&(N[E]===true||N[E].nodeType===1&&d.contains(e,N[E]))){F.push(K[E])}}}else{for(E=0;N[E]!=null;E++){if(N[E]&&N[E].nodeType===1){F.push(K[E])}}}}}else{l(N,F)}if(y){d(y,I,F,G);d.uniqueSort(F)}return F};d.uniqueSort=function(y){if(p){h=g;y.sort(p);if(h){for(var e=1;e<y.length;e++){if(y[e]===y[e-1]){y.splice(e--,1)}}}}return y};d.matches=function(e,y){return d(e,null,null,y)};d.matchesSelector=function(e,y){return d(y,null,null,[e]).length>0};d.find=function(E,e,F){var D,z,B,A,C,y;if(!E){return[]}for(z=0,B=k.order.length;z<B;z++){C=k.order[z];if((A=k.leftMatch[C].exec(E))){y=A[1];A.splice(1,1);if(y.substr(y.length-1)!=="\\"){A[1]=(A[1]||"").replace(q,"");D=k.find[C](A,e,F);if(D!=null){E=E.replace(k.match[C],"");break}}}}if(!D){D=typeof e.getElementsByTagName!=="undefined"?e.getElementsByTagName("*"):[]}return{set:D,expr:E}};d.filter=function(I,H,L,B){var D,e,G,N,K,y,A,C,J,z=I,M=[],F=H,E=H&&H[0]&&d.isXML(H[0]);while(I&&H.length){for(G in k.filter){if((D=k.leftMatch[G].exec(I))!=null&&D[2]){y=k.filter[G];A=D[1];e=false;D.splice(1,1);if(A.substr(A.length-1)==="\\"){continue}if(F===M){M=[]}if(k.preFilter[G]){D=k.preFilter[G](D,F,L,M,B,E);if(!D){e=N=true}else{if(D===true){continue}}}if(D){for(C=0;(K=F[C])!=null;C++){if(K){N=y(K,D,C,F);J=B^N;if(L&&N!=null){if(J){e=true}else{F[C]=false}}else{if(J){M.push(K);e=true}}}}}if(N!==undefined){if(!L){F=M}I=I.replace(k.match[G],"");if(!e){return[]}break}}}if(I===z){if(e==null){d.error(I)}else{break}}z=I}return F};d.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};var b=d.getText=function(B){var z,A,e=B.nodeType,y="";if(e){if(e===1||e===9||e===11){if(typeof B.textContent==="string"){return B.textContent}else{if(typeof B.innerText==="string"){return B.innerText.replace(u,"")}else{for(B=B.firstChild;B;B=B.nextSibling){y+=b(B)}}}}else{if(e===3||e===4){return B.nodeValue}}}else{for(z=0;(A=B[z]);z++){if(A.nodeType!==8){y+=b(A)}}}return y};var k=d.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")},type:function(e){return e.getAttribute("type")}},relative:{"+":function(D,y){var A=typeof y==="string",C=A&&!x.test(y),E=A&&!C;if(C){y=y.toLowerCase()}for(var z=0,e=D.length,B;z<e;z++){if((B=D[z])){while((B=B.previousSibling)&&B.nodeType!==1){}D[z]=E||B&&B.nodeName.toLowerCase()===y?B||false:B===y}}if(E){d.filter(y,D,true)}},">":function(D,y){var C,B=typeof y==="string",z=0,e=D.length;if(B&&!x.test(y)){y=y.toLowerCase();for(;z<e;z++){C=D[z];if(C){var A=C.parentNode;D[z]=A.nodeName.toLowerCase()===y?A:false}}}else{for(;z<e;z++){C=D[z];if(C){D[z]=B?C.parentNode:C.parentNode===y}}if(B){d.filter(y,D,true)}}},"":function(A,y,C){var B,z=o++,e=t;if(typeof y==="string"&&!x.test(y)){y=y.toLowerCase();B=y;e=a}e("parentNode",y,z,A,B,C)},"~":function(A,y,C){var B,z=o++,e=t;if(typeof y==="string"&&!x.test(y)){y=y.toLowerCase();B=y;e=a}e("previousSibling",y,z,A,B,C)}},find:{ID:function(y,z,A){if(typeof z.getElementById!=="undefined"&&!A){var e=z.getElementById(y[1]);return e&&e.parentNode?[e]:[]}},NAME:function(z,C){if(typeof C.getElementsByName!=="undefined"){var y=[],B=C.getElementsByName(z[1]);for(var A=0,e=B.length;A<e;A++){if(B[A].getAttribute("name")===z[1]){y.push(B[A])}}return y.length===0?null:y}},TAG:function(e,y){if(typeof y.getElementsByTagName!=="undefined"){return y.getElementsByTagName(e[1])}}},preFilter:{CLASS:function(A,y,z,e,D,E){A=" "+A[1].replace(q,"")+" ";if(E){return A}for(var B=0,C;(C=y[B])!=null;B++){if(C){if(D^(C.className&&(" "+C.className+" ").replace(/[\t\n\r]/g," ").indexOf(A)>=0)){if(!z){e.push(C)}}else{if(z){y[B]=false}}}}return false},ID:function(e){return e[1].replace(q,"")},TAG:function(y,e){return y[1].replace(q,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){d.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var y=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(y[1]+(y[2]||1))-0;e[3]=y[3]-0}else{if(e[2]){d.error(e[0])}}e[0]=o++;return e},ATTR:function(B,y,z,e,C,D){var A=B[1]=B[1].replace(q,"");if(!D&&k.attrMap[A]){B[1]=k.attrMap[A]}B[4]=(B[4]||B[5]||"").replace(q,"");if(B[2]==="~="){B[4]=" "+B[4]+" "}return B},PSEUDO:function(B,y,z,e,C){if(B[1]==="not"){if((n.exec(B[3])||"").length>1||/^\w/.test(B[3])){B[3]=d(B[3],null,null,y)}else{var A=d.filter(B[3],y,z,true^C);if(!z){e.push.apply(e,A)}return false}}else{if(k.match.POS.test(B[0])||k.match.CHILD.test(B[0])){return true}}return B},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(z,y,e){return !!d(e[3],z).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(z){var e=z.getAttribute("type"),y=z.type;return z.nodeName.toLowerCase()==="input"&&"text"===y&&(e===y||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(y){var e=y.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===y.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(y){var e=y.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===y.type},button:function(y){var e=y.nodeName.toLowerCase();return e==="input"&&"button"===y.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(y,e){return e===0},last:function(z,y,e,A){return y===A.length-1},even:function(y,e){return e%2===0},odd:function(y,e){return e%2===1},lt:function(z,y,e){return y<e[3]-0},gt:function(z,y,e){return y>e[3]-0},nth:function(z,y,e){return e[3]-0===y},eq:function(z,y,e){return e[3]-0===y}},filter:{PSEUDO:function(z,E,D,F){var e=E[1],y=k.filters[e];if(y){return y(z,D,E,F)}else{if(e==="contains"){return(z.textContent||z.innerText||b([z])||"").indexOf(E[3])>=0}else{if(e==="not"){var A=E[3];for(var C=0,B=A.length;C<B;C++){if(A[C]===z){return false}}return true}else{d.error(e)}}}},CHILD:function(z,B){var A,H,D,G,e,C,F,E=B[1],y=z;switch(E){case"only":case"first":while((y=y.previousSibling)){if(y.nodeType===1){return false}}if(E==="first"){return true}y=z;case"last":while((y=y.nextSibling)){if(y.nodeType===1){return false}}return true;case"nth":A=B[2];H=B[3];if(A===1&&H===0){return true}D=B[0];G=z.parentNode;if(G&&(G[i]!==D||!z.nodeIndex)){C=0;for(y=G.firstChild;y;y=y.nextSibling){if(y.nodeType===1){y.nodeIndex=++C}}G[i]=D}F=z.nodeIndex-H;if(A===0){return F===0}else{return(F%A===0&&F/A>=0)}}},ID:function(y,e){return y.nodeType===1&&y.getAttribute("id")===e},TAG:function(y,e){return(e==="*"&&y.nodeType===1)||!!y.nodeName&&y.nodeName.toLowerCase()===e},CLASS:function(y,e){return(" "+(y.className||y.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(C,A){var z=A[1],e=d.attr?d.attr(C,z):k.attrHandle[z]?k.attrHandle[z](C):C[z]!=null?C[z]:C.getAttribute(z),D=e+"",B=A[2],y=A[4];return e==null?B==="!=":!B&&d.attr?e!=null:B==="="?D===y:B==="*="?D.indexOf(y)>=0:B==="~="?(" "+D+" ").indexOf(y)>=0:!y?D&&e!==false:B==="!="?D!==y:B==="^="?D.indexOf(y)===0:B==="$="?D.substr(D.length-y.length)===y:B==="|="?D===y||D.substr(0,y.length+1)===y+"-":false},POS:function(B,y,z,C){var e=y[2],A=k.setFilters[e];if(A){return A(B,z,y,C)}}}};var j=k.match.POS,c=function(y,e){return"\\"+(e-0+1)};for(var f in k.match){k.match[f]=new RegExp(k.match[f].source+(/(?![^\[]*\])(?![^\(]*\))/.source));k.leftMatch[f]=new RegExp(/(^(?:.|\r|\n)*?)/.source+k.match[f].source.replace(/\\(\d+)/g,c))}k.match.globalPOS=j;var l=function(y,e){y=Array.prototype.slice.call(y,0);if(e){e.push.apply(e,y);return e}return y};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType}catch(v){l=function(B,A){var z=0,y=A||[];if(r.call(B)==="[object Array]"){Array.prototype.push.apply(y,B)}else{if(typeof B.length==="number"){for(var e=B.length;z<e;z++){y.push(B[z])}}else{for(;B[z];z++){y.push(B[z])}}}return y}}var p,m;if(document.documentElement.compareDocumentPosition){p=function(y,e){if(y===e){h=true;return 0}if(!y.compareDocumentPosition||!e.compareDocumentPosition){return y.compareDocumentPosition?-1:1}return y.compareDocumentPosition(e)&4?-1:1}}else{p=function(F,E){if(F===E){h=true;return 0}else{if(F.sourceIndex&&E.sourceIndex){return F.sourceIndex-E.sourceIndex}}var C,y,z=[],e=[],B=F.parentNode,D=E.parentNode,G=B;if(B===D){return m(F,E)}else{if(!B){return -1}else{if(!D){return 1}}}while(G){z.unshift(G);G=G.parentNode}G=D;while(G){e.unshift(G);G=G.parentNode}C=z.length;y=e.length;for(var A=0;A<C&&A<y;A++){if(z[A]!==e[A]){return m(z[A],e[A])}}return A===C?m(F,e[A],-1):m(z[A],E,1)};m=function(y,e,z){if(y===e){return z}var A=y.nextSibling;while(A){if(A===e){return -1}A=A.nextSibling}return 1}}(function(){var y=document.createElement("div"),z="script"+(new Date()).getTime(),e=document.documentElement;y.innerHTML="<a name='"+z+"'/>";e.insertBefore(y,e.firstChild);if(document.getElementById(z)){k.find.ID=function(B,C,D){if(typeof C.getElementById!=="undefined"&&!D){var A=C.getElementById(B[1]);return A?A.id===B[1]||typeof A.getAttributeNode!=="undefined"&&A.getAttributeNode("id").nodeValue===B[1]?[A]:undefined:[]}};k.filter.ID=function(C,A){var B=typeof C.getAttributeNode!=="undefined"&&C.getAttributeNode("id");return C.nodeType===1&&B&&B.nodeValue===A}}e.removeChild(y);e=y=null})();(function(){var e=document.createElement("div");e.appendChild(document.createComment(""));if(e.getElementsByTagName("*").length>0){k.find.TAG=function(y,C){var B=C.getElementsByTagName(y[1]);if(y[1]==="*"){var A=[];for(var z=0;B[z];z++){if(B[z].nodeType===1){A.push(B[z])}}B=A}return B}}e.innerHTML="<a href='#'></a>";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){k.attrHandle.href=function(y){return y.getAttribute("href",2)}}e=null})();if(document.querySelectorAll){(function(){var e=d,A=document.createElement("div"),z="__sizzle__";A.innerHTML="<p class='TEST'></p>";if(A.querySelectorAll&&A.querySelectorAll(".TEST").length===0){return}d=function(L,C,G,K){C=C||document;if(!K&&!d.isXML(C)){var J=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(L);if(J&&(C.nodeType===1||C.nodeType===9)){if(J[1]){return l(C.getElementsByTagName(L),G)}else{if(J[2]&&k.find.CLASS&&C.getElementsByClassName){return l(C.getElementsByClassName(J[2]),G)}}}if(C.nodeType===9){if(L==="body"&&C.body){return l([C.body],G)}else{if(J&&J[3]){var F=C.getElementById(J[3]);if(F&&F.parentNode){if(F.id===J[3]){return l([F],G)}}else{return l([],G)}}}try{return l(C.querySelectorAll(L),G)}catch(H){}}else{if(C.nodeType===1&&C.nodeName.toLowerCase()!=="object"){var D=C,E=C.getAttribute("id"),B=E||z,N=C.parentNode,M=/^\s*[+~]/.test(L);if(!E){C.setAttribute("id",B)}else{B=B.replace(/'/g,"\\$&")}if(M&&N){C=C.parentNode}try{if(!M||N){return l(C.querySelectorAll("[id='"+B+"'] "+L),G)}}catch(I){}finally{if(!E){D.removeAttribute("id")}}}}}return e(L,C,G,K)};for(var y in e){d[y]=e[y]}A=null})()}(function(){var e=document.documentElement,z=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(z){var B=!z.call(document.createElement("div"),"div"),y=false;try{z.call(document.documentElement,"[test!='']:sizzle")}catch(A){y=true}d.matchesSelector=function(D,F){F=F.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!d.isXML(D)){try{if(y||!k.match.PSEUDO.test(F)&&!/!=/.test(F)){var C=z.call(D,F);if(C||!B||D.document&&D.document.nodeType!==11){return C}}}catch(E){}}return d(F,null,null,[D]).length>0}}})();(function(){var e=document.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}k.order.splice(1,0,"CLASS");k.find.CLASS=function(y,z,A){if(typeof z.getElementsByClassName!=="undefined"&&!A){return z.getElementsByClassName(y[1])}};e=null})();function a(y,D,C,G,E,F){for(var A=0,z=G.length;A<z;A++){var e=G[A];if(e){var B=false;e=e[y];while(e){if(e[i]===C){B=G[e.sizset];break}if(e.nodeType===1&&!F){e[i]=C;e.sizset=A}if(e.nodeName.toLowerCase()===D){B=e;break}e=e[y]}G[A]=B}}}function t(y,D,C,G,E,F){for(var A=0,z=G.length;A<z;A++){var e=G[A];if(e){var B=false;e=e[y];while(e){if(e[i]===C){B=G[e.sizset];break}if(e.nodeType===1){if(!F){e[i]=C;e.sizset=A}if(typeof D!=="string"){if(e===D){B=true;break}}else{if(d.filter(D,[e]).length>0){B=e;break}}}e=e[y]}G[A]=B}}}if(document.documentElement.contains){d.contains=function(y,e){return y!==e&&(y.contains?y.contains(e):true)}}else{if(document.documentElement.compareDocumentPosition){d.contains=function(y,e){return !!(y.compareDocumentPosition(e)&16)}}else{d.contains=function(){return false}}}d.isXML=function(e){var y=(e?e.ownerDocument||e:0).documentElement;return y?y.nodeName!=="HTML":false};var s=function(z,e,D){var C,E=[],B="",F=e.nodeType?[e]:e;while((C=k.match.PSEUDO.exec(z))){B+=C[0];z=z.replace(k.match.PSEUDO,"")}z=k.relative[z]?z+"*":z;for(var A=0,y=F.length;A<y;A++){d(z,F[A],E,D)}return d.filter(B,E)};window.tinymce.dom.Sizzle=d})();(function(a){a.dom.Element=function(f,d){var b=this,e,c;b.settings=d=d||{};b.id=f;b.dom=e=d.dom||a.DOM;if(!a.isIE){c=e.get(b.id)}a.each(("getPos,getRect,getParent,add,setStyle,getStyle,setStyles,setAttrib,setAttribs,getAttrib,addClass,removeClass,hasClass,getOuterHTML,setOuterHTML,remove,show,hide,isHidden,setHTML,get").split(/,/),function(g){b[g]=function(){var h=[f],j;for(j=0;j<arguments.length;j++){h.push(arguments[j])}h=e[g].apply(e,h);b.update(g);return h}});a.extend(b,{on:function(i,h,g){return a.dom.Event.add(b.id,i,h,g)},getXY:function(){return{x:parseInt(b.getStyle("left")),y:parseInt(b.getStyle("top"))}},getSize:function(){var g=e.get(b.id);return{w:parseInt(b.getStyle("width")||g.clientWidth),h:parseInt(b.getStyle("height")||g.clientHeight)}},moveTo:function(g,h){b.setStyles({left:g,top:h})},moveBy:function(g,i){var h=b.getXY();b.moveTo(h.x+g,h.y+i)},resizeTo:function(g,i){b.setStyles({width:g,height:i})},resizeBy:function(g,j){var i=b.getSize();b.resizeTo(i.w+g,i.h+j)},update:function(h){var g;if(a.isIE6&&d.blocker){h=h||"";if(h.indexOf("get")===0||h.indexOf("has")===0||h.indexOf("is")===0){return}if(h=="remove"){e.remove(b.blocker);return}if(!b.blocker){b.blocker=e.uniqueId();g=e.add(d.container||e.getRoot(),"iframe",{id:b.blocker,style:"position:absolute;",frameBorder:0,src:'javascript:""'});e.setStyle(g,"opacity",0)}else{g=e.get(b.blocker)}e.setStyles(g,{left:b.getStyle("left",1),top:b.getStyle("top",1),width:b.getStyle("width",1),height:b.getStyle("height",1),display:b.getStyle("display",1),zIndex:parseInt(b.getStyle("zIndex",1)||0)-1})}}})}})(tinymce);(function(d){function f(g){return g.replace(/[\n\r]+/g,"")}var c=d.is,b=d.isIE,e=d.each,a=d.dom.TreeWalker;d.create("tinymce.dom.Selection",{Selection:function(k,j,i,h){var g=this;g.dom=k;g.win=j;g.serializer=i;g.editor=h;e(["onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent"],function(l){g[l]=new d.util.Dispatcher(g)});if(!g.win.getSelection){g.tridentSel=new d.dom.TridentSelection(g)}if(d.isIE&&k.boxModel){this._fixIESelection()}d.addUnload(g.destroy,g)},setCursorLocation:function(i,j){var g=this;var h=g.dom.createRng();h.setStart(i,j);h.setEnd(i,j);g.setRng(h);g.collapse(false)},getContent:function(h){var g=this,i=g.getRng(),m=g.dom.create("body"),k=g.getSel(),j,l,o;h=h||{};j=l="";h.get=true;h.format=h.format||"html";h.forced_root_block="";g.onBeforeGetContent.dispatch(g,h);if(h.format=="text"){return g.isCollapsed()?"":(i.text||(k.toString?k.toString():""))}if(i.cloneContents){o=i.cloneContents();if(o){m.appendChild(o)}}else{if(c(i.item)||c(i.htmlText)){m.innerHTML="<br>"+(i.item?i.item(0).outerHTML:i.htmlText);m.removeChild(m.firstChild)}else{m.innerHTML=i.toString()}}if(/^\s/.test(m.innerHTML)){j=" "}if(/\s+$/.test(m.innerHTML)){l=" "}h.getInner=true;h.content=g.isCollapsed()?"":j+g.serializer.serialize(m,h)+l;g.onGetContent.dispatch(g,h);return h.content},setContent:function(h,j){var o=this,g=o.getRng(),k,l=o.win.document,n,m;j=j||{format:"html"};j.set=true;h=j.content=h;if(!j.no_events){o.onBeforeSetContent.dispatch(o,j)}h=j.content;if(g.insertNode){h+='<span id="__caret">_</span>';if(g.startContainer==l&&g.endContainer==l){l.body.innerHTML=h}else{g.deleteContents();if(l.body.childNodes.length===0){l.body.innerHTML=h}else{if(g.createContextualFragment){g.insertNode(g.createContextualFragment(h))}else{n=l.createDocumentFragment();m=l.createElement("div");n.appendChild(m);m.outerHTML=h;g.insertNode(n)}}}k=o.dom.get("__caret");g=l.createRange();g.setStartBefore(k);g.setEndBefore(k);o.setRng(g);o.dom.remove("__caret");try{o.setRng(g)}catch(i){}}else{if(g.item){l.execCommand("Delete",false,null);g=o.getRng()}if(/^\s+/.test(h)){g.pasteHTML('<span id="__mce_tmp">_</span>'+h);o.dom.remove("__mce_tmp")}else{g.pasteHTML(h)}}if(!j.no_events){o.onSetContent.dispatch(o,j)}},getStart:function(){var i=this,h=i.getRng(),j,g,l,k;if(h.duplicate||h.item){if(h.item){return h.item(0)}l=h.duplicate();l.collapse(1);j=l.parentElement();if(j.ownerDocument!==i.dom.doc){j=i.dom.getRoot()}g=k=h.parentElement();while(k=k.parentNode){if(k==j){j=g;break}}return j}else{j=h.startContainer;if(j.nodeType==1&&j.hasChildNodes()){j=j.childNodes[Math.min(j.childNodes.length-1,h.startOffset)]}if(j&&j.nodeType==3){return j.parentNode}return j}},getEnd:function(){var h=this,g=h.getRng(),j,i;if(g.duplicate||g.item){if(g.item){return g.item(0)}g=g.duplicate();g.collapse(0);j=g.parentElement();if(j.ownerDocument!==h.dom.doc){j=h.dom.getRoot()}if(j&&j.nodeName=="BODY"){return j.lastChild||j}return j}else{j=g.endContainer;i=g.endOffset;if(j.nodeType==1&&j.hasChildNodes()){j=j.childNodes[i>0?i-1:i]}if(j&&j.nodeType==3){return j.parentNode}return j}},getBookmark:function(s,v){var y=this,n=y.dom,h,k,j,o,i,p,q,m="\uFEFF",x;function g(z,A){var t=0;e(n.select(z),function(C,B){if(C==A){t=B}});return t}function u(t){function z(E){var A,D,C,B=E?"start":"end";A=t[B+"Container"];D=t[B+"Offset"];if(A.nodeType==1&&A.nodeName=="TR"){C=A.childNodes;A=C[Math.min(E?D:D-1,C.length-1)];if(A){D=E?0:A.childNodes.length;t["set"+(E?"Start":"End")](A,D)}}}z(true);z();return t}function l(){var z=y.getRng(true),t=n.getRoot(),A={};function B(E,J){var D=E[J?"startContainer":"endContainer"],I=E[J?"startOffset":"endOffset"],C=[],F,H,G=0;if(D.nodeType==3){if(v){for(F=D.previousSibling;F&&F.nodeType==3;F=F.previousSibling){I+=F.nodeValue.length}}C.push(I)}else{H=D.childNodes;if(I>=H.length&&H.length){G=1;I=Math.max(0,H.length-1)}C.push(y.dom.nodeIndex(H[I],v)+G)}for(;D&&D!=t;D=D.parentNode){C.push(y.dom.nodeIndex(D,v))}return C}A.start=B(z,true);if(!y.isCollapsed()){A.end=B(z)}return A}if(s==2){if(y.tridentSel){return y.tridentSel.getBookmark(s)}return l()}if(s){return{rng:y.getRng()}}h=y.getRng();j=n.uniqueId();o=tinyMCE.activeEditor.selection.isCollapsed();x="overflow:hidden;line-height:0px";if(h.duplicate||h.item){if(!h.item){k=h.duplicate();try{h.collapse();h.pasteHTML('<span data-mce-type="bookmark" id="'+j+'_start" style="'+x+'">'+m+"</span>");if(!o){k.collapse(false);h.moveToElementText(k.parentElement());if(h.compareEndPoints("StartToEnd",k)===0){k.move("character",-1)}k.pasteHTML('<span data-mce-type="bookmark" id="'+j+'_end" style="'+x+'">'+m+"</span>")}}catch(r){return null}}else{p=h.item(0);i=p.nodeName;return{name:i,index:g(i,p)}}}else{p=y.getNode();i=p.nodeName;if(i=="IMG"){return{name:i,index:g(i,p)}}k=u(h.cloneRange());if(!o){k.collapse(false);k.insertNode(n.create("span",{"data-mce-type":"bookmark",id:j+"_end",style:x},m))}h=u(h);h.collapse(true);h.insertNode(n.create("span",{"data-mce-type":"bookmark",id:j+"_start",style:x},m))}y.moveToBookmark({id:j,keep:1});return{id:j}},moveToBookmark:function(o){var s=this,m=s.dom,j,i,g,r,k,u,p,q;function h(A){var t=o[A?"start":"end"],x,y,z,v;if(t){z=t[0];for(y=r,x=t.length-1;x>=1;x--){v=y.childNodes;if(t[x]>v.length-1){return}y=v[t[x]]}if(y.nodeType===3){z=Math.min(t[0],y.nodeValue.length)}if(y.nodeType===1){z=Math.min(t[0],y.childNodes.length)}if(A){g.setStart(y,z)}else{g.setEnd(y,z)}}return true}function l(B){var v=m.get(o.id+"_"+B),A,t,y,z,x=o.keep;if(v){A=v.parentNode;if(B=="start"){if(!x){t=m.nodeIndex(v)}else{A=v.firstChild;t=1}k=u=A;p=q=t}else{if(!x){t=m.nodeIndex(v)}else{A=v.firstChild;t=1}u=A;q=t}if(!x){z=v.previousSibling;y=v.nextSibling;e(d.grep(v.childNodes),function(C){if(C.nodeType==3){C.nodeValue=C.nodeValue.replace(/\uFEFF/g,"")}});while(v=m.get(o.id+"_"+B)){m.remove(v,1)}if(z&&y&&z.nodeType==y.nodeType&&z.nodeType==3&&!d.isOpera){t=z.nodeValue.length;z.appendData(y.nodeValue);m.remove(y);if(B=="start"){k=u=z;p=q=t}else{u=z;q=t}}}}}function n(t){if(m.isBlock(t)&&!t.innerHTML&&!b){t.innerHTML='<br data-mce-bogus="1" />'}return t}if(o){if(o.start){g=m.createRng();r=m.getRoot();if(s.tridentSel){return s.tridentSel.moveToBookmark(o)}if(h(true)&&h()){s.setRng(g)}}else{if(o.id){l("start");l("end");if(k){g=m.createRng();g.setStart(n(k),p);g.setEnd(n(u),q);s.setRng(g)}}else{if(o.name){s.select(m.select(o.name)[o.index])}else{if(o.rng){s.setRng(o.rng)}}}}}},select:function(l,k){var j=this,m=j.dom,h=m.createRng(),g;function i(n,p){var o=new a(n,n);do{if(n.nodeType==3&&d.trim(n.nodeValue).length!==0){if(p){h.setStart(n,0)}else{h.setEnd(n,n.nodeValue.length)}return}if(n.nodeName=="BR"){if(p){h.setStartBefore(n)}else{h.setEndBefore(n)}return}}while(n=(p?o.next():o.prev()))}if(l){g=m.nodeIndex(l);h.setStart(l.parentNode,g);h.setEnd(l.parentNode,g+1);if(k){i(l,1);i(l)}j.setRng(h)}return l},isCollapsed:function(){var g=this,i=g.getRng(),h=g.getSel();if(!i||i.item){return false}if(i.compareEndPoints){return i.compareEndPoints("StartToEnd",i)===0}return !h||i.collapsed},collapse:function(g){var i=this,h=i.getRng(),j;if(h.item){j=h.item(0);h=i.win.document.body.createTextRange();h.moveToElementText(j)}h.collapse(!!g);i.setRng(h)},getSel:function(){var h=this,g=this.win;return g.getSelection?g.getSelection():g.document.selection},getRng:function(m){var h=this,j,g,l,k=h.win.document;if(m&&h.tridentSel){return h.tridentSel.getRangeAt(0)}try{if(j=h.getSel()){g=j.rangeCount>0?j.getRangeAt(0):(j.createRange?j.createRange():k.createRange())}}catch(i){}if(d.isIE&&g&&g.setStart&&k.selection.createRange().item){l=k.selection.createRange().item(0);g=k.createRange();g.setStartBefore(l);g.setEndAfter(l)}if(!g){g=k.createRange?k.createRange():k.body.createTextRange()}if(g.setStart&&g.startContainer.nodeType===9&&g.collapsed){l=h.dom.getRoot();g.setStart(l,0);g.setEnd(l,0)}if(h.selectedRange&&h.explicitRange){if(g.compareBoundaryPoints(g.START_TO_START,h.selectedRange)===0&&g.compareBoundaryPoints(g.END_TO_END,h.selectedRange)===0){g=h.explicitRange}else{h.selectedRange=null;h.explicitRange=null}}return g},setRng:function(k,g){var j,i=this;if(!i.tridentSel){j=i.getSel();if(j){i.explicitRange=k;try{j.removeAllRanges()}catch(h){}j.addRange(k);if(g===false&&j.extend){j.collapse(k.endContainer,k.endOffset);j.extend(k.startContainer,k.startOffset)}i.selectedRange=j.rangeCount>0?j.getRangeAt(0):null}}else{if(k.cloneRange){try{i.tridentSel.addRange(k);return}catch(h){}}try{k.select()}catch(h){}}},setNode:function(h){var g=this;g.setContent(g.dom.getOuterHTML(h));return h},getNode:function(){var i=this,h=i.getRng(),j=i.getSel(),m,l=h.startContainer,g=h.endContainer;function k(q,o){var p=q;while(q&&q.nodeType===3&&q.length===0){q=o?q.nextSibling:q.previousSibling}return q||p}if(!h){return i.dom.getRoot()}if(h.setStart){m=h.commonAncestorContainer;if(!h.collapsed){if(h.startContainer==h.endContainer){if(h.endOffset-h.startOffset<2){if(h.startContainer.hasChildNodes()){m=h.startContainer.childNodes[h.startOffset]}}}if(l.nodeType===3&&g.nodeType===3){if(l.length===h.startOffset){l=k(l.nextSibling,true)}else{l=l.parentNode}if(h.endOffset===0){g=k(g.previousSibling,false)}else{g=g.parentNode}if(l&&l===g){return l}}}if(m&&m.nodeType==3){return m.parentNode}return m}return h.item?h.item(0):h.parentElement()},getSelectedBlocks:function(p,h){var o=this,k=o.dom,m,l,i,j=[];m=k.getParent(p||o.getStart(),k.isBlock);l=k.getParent(h||o.getEnd(),k.isBlock);if(m){j.push(m)}if(m&&l&&m!=l){i=m;var g=new a(m,k.getRoot());while((i=g.next())&&i!=l){if(k.isBlock(i)){j.push(i)}}}if(l&&m!=l){j.push(l)}return j},isForward:function(){var i=this.dom,g=this.getSel(),j,h;if(!g||g.anchorNode==null||g.focusNode==null){return true}j=i.createRng();j.setStart(g.anchorNode,g.anchorOffset);j.collapse(true);h=i.createRng();h.setStart(g.focusNode,g.focusOffset);h.collapse(true);return j.compareBoundaryPoints(j.START_TO_START,h)<=0},normalize:function(){var h=this,g,m,l,j,i;function k(p){var o,r,n,s=h.dom,u=s.getRoot(),q,t,v;function y(z,A){var B=new a(z,s.getParent(z.parentNode,s.isBlock)||u);while(z=B[A?"prev":"next"]()){if(z.nodeName==="BR"){return true}}}function x(B,z){var C,A;z=z||o;C=new a(z,s.getParent(z.parentNode,s.isBlock)||u);while(q=C[B?"prev":"next"]()){if(q.nodeType===3&&q.nodeValue.length>0){o=q;r=B?q.nodeValue.length:0;m=true;return}if(s.isBlock(q)||t[q.nodeName.toLowerCase()]){return}A=q}if(l&&A){o=A;m=true;r=0}}o=g[(p?"start":"end")+"Container"];r=g[(p?"start":"end")+"Offset"];t=s.schema.getNonEmptyElements();if(o.nodeType===9){o=s.getRoot();r=0}if(o===u){if(p){q=o.childNodes[r>0?r-1:0];if(q){v=q.nodeName.toLowerCase();if(t[q.nodeName]||q.nodeName=="TABLE"){return}}}if(o.hasChildNodes()){o=o.childNodes[Math.min(!p&&r>0?r-1:r,o.childNodes.length-1)];r=0;if(o.hasChildNodes()&&!/TABLE/.test(o.nodeName)){q=o;n=new a(o,u);do{if(q.nodeType===3&&q.nodeValue.length>0){r=p?0:q.nodeValue.length;o=q;m=true;break}if(t[q.nodeName.toLowerCase()]){r=s.nodeIndex(q);o=q.parentNode;if(q.nodeName=="IMG"&&!p){r++}m=true;break}}while(q=(p?n.next():n.prev()))}}}if(l){if(o.nodeType===3&&r===0){x(true)}if(o.nodeType===1){q=o.childNodes[r];if(q&&q.nodeName==="BR"&&!y(q)&&!y(q,true)){x(true,o.childNodes[r])}}}if(p&&!l&&o.nodeType===3&&r===o.nodeValue.length){x(false)}if(m){g["set"+(p?"Start":"End")](o,r)}}if(d.isIE){return}g=h.getRng();l=g.collapsed;k(true);if(!l){k()}if(m){if(l){g.collapse(true)}h.setRng(g,h.isForward())}},selectorChanged:function(g,j){var h=this,i;if(!h.selectorChangedData){h.selectorChangedData={};i={};h.editor.onNodeChange.addToTop(function(l,k,o){var p=h.dom,m=p.getParents(o,null,p.getRoot()),n={};e(h.selectorChangedData,function(r,q){e(m,function(s){if(p.is(s,q)){if(!i[q]){e(r,function(t){t(true,{node:s,selector:q,parents:m})});i[q]=r}n[q]=r;return false}})});e(i,function(r,q){if(!n[q]){delete i[q];e(r,function(s){s(false,{node:o,selector:q,parents:m})})}})})}if(!h.selectorChangedData[g]){h.selectorChangedData[g]=[]}h.selectorChangedData[g].push(j);return h},destroy:function(h){var g=this;g.win=null;if(!h){d.removeUnload(g.destroy)}},_fixIESelection:function(){var h=this.dom,n=h.doc,i=n.body,k,o,g;function j(p,s){var q=i.createTextRange();try{q.moveToPoint(p,s)}catch(r){q=null}return q}function m(q){var p;if(q.button){p=j(q.x,q.y);if(p){if(p.compareEndPoints("StartToStart",o)>0){p.setEndPoint("StartToStart",o)}else{p.setEndPoint("EndToEnd",o)}p.select()}}else{l()}}function l(){var p=n.selection.createRange();if(o&&!p.item&&p.compareEndPoints("StartToEnd",p)===0){o.select()}h.unbind(n,"mouseup",l);h.unbind(n,"mousemove",m);o=k=0}n.documentElement.unselectable=true;h.bind(n,["mousedown","contextmenu"],function(p){if(p.target.nodeName==="HTML"){if(k){l()}g=n.documentElement;if(g.scrollHeight>g.clientHeight){return}k=1;o=j(p.x,p.y);if(o){h.bind(n,"mouseup",l);h.bind(n,"mousemove",m);h.win.focus();o.select()}}})}})})(tinymce);(function(a){a.dom.Serializer=function(e,i,f){var h,b,d=a.isIE,g=a.each,c;if(!e.apply_source_formatting){e.indent=false}i=i||a.DOM;f=f||new a.html.Schema(e);e.entity_encoding=e.entity_encoding||"named";e.remove_trailing_brs="remove_trailing_brs" in e?e.remove_trailing_brs:true;h=new a.util.Dispatcher(self);b=new a.util.Dispatcher(self);c=new a.html.DomParser(e,f);c.addAttributeFilter("src,href,style",function(k,j){var o=k.length,l,q,n="data-mce-"+j,p=e.url_converter,r=e.url_converter_scope,m;while(o--){l=k[o];q=l.attributes.map[n];if(q!==m){l.attr(j,q.length>0?q:null);l.attr(n,null)}else{q=l.attributes.map[j];if(j==="style"){q=i.serializeStyle(i.parseStyle(q),l.name)}else{if(p){q=p.call(r,q,j,l.name)}}l.attr(j,q.length>0?q:null)}}});c.addAttributeFilter("class",function(j,k){var l=j.length,m,n;while(l--){m=j[l];n=m.attr("class").replace(/(?:^|\s)mce(Item\w+|Selected)(?!\S)/g,"");m.attr("class",n.length>0?n:null)}});c.addAttributeFilter("data-mce-type",function(j,l,k){var m=j.length,n;while(m--){n=j[m];if(n.attributes.map["data-mce-type"]==="bookmark"&&!k.cleanup){n.remove()}}});c.addAttributeFilter("data-mce-expando",function(j,l,k){var m=j.length;while(m--){j[m].attr(l,null)}});c.addNodeFilter("script,style",function(k,l){var m=k.length,n,o;function j(p){return p.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}while(m--){n=k[m];o=n.firstChild?n.firstChild.value:"";if(l==="script"){n.attr("type",(n.attr("type")||"text/javascript").replace(/^mce\-/,""));if(o.length>0){n.firstChild.value="// <![CDATA[\n"+j(o)+"\n// ]]>"}}else{if(o.length>0){n.firstChild.value="<!--\n"+j(o)+"\n-->"}}}});c.addNodeFilter("#comment",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.value.indexOf("[CDATA[")===0){m.name="#cdata";m.type=4;m.value=m.value.replace(/^\[CDATA\[|\]\]$/g,"")}else{if(m.value.indexOf("mce:protected ")===0){m.name="#text";m.type=3;m.raw=true;m.value=unescape(m.value).substr(14)}}}});c.addNodeFilter("xml:namespace,input",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.type===7){m.remove()}else{if(m.type===1){if(k==="input"&&!("type" in m.attributes.map)){m.attr("type","text")}}}}});if(e.fix_list_elements){c.addNodeFilter("ul,ol",function(k,l){var m=k.length,n,j;while(m--){n=k[m];j=n.parent;if(j.name==="ul"||j.name==="ol"){if(n.prev&&n.prev.name==="li"){n.prev.append(n)}}}})}c.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style",function(j,k){var l=j.length;while(l--){j[l].attr(k,null)}});return{schema:f,addNodeFilter:c.addNodeFilter,addAttributeFilter:c.addAttributeFilter,onPreProcess:h,onPostProcess:b,serialize:function(o,m){var l,p,k,j,n;if(d&&i.select("script,style,select,map").length>0){n=o.innerHTML;o=o.cloneNode(false);i.setHTML(o,n)}else{o=o.cloneNode(true)}l=o.ownerDocument.implementation;if(l.createHTMLDocument){p=l.createHTMLDocument("");g(o.nodeName=="BODY"?o.childNodes:[o],function(q){p.body.appendChild(p.importNode(q,true))});if(o.nodeName!="BODY"){o=p.body.firstChild}else{o=p.body}k=i.doc;i.doc=p}m=m||{};m.format=m.format||"html";if(!m.no_events){m.node=o;h.dispatch(self,m)}j=new a.html.Serializer(e,f);m.content=j.serialize(c.parse(a.trim(m.getInner?o.innerHTML:i.getOuterHTML(o)),m));if(!m.cleanup){m.content=m.content.replace(/\uFEFF|\u200B/g,"")}if(!m.no_events){b.dispatch(self,m)}if(k){i.doc=k}m.node=null;return m.content},addRules:function(j){f.addValidElements(j)},setRules:function(j){f.setValidElements(j)}}}})(tinymce);(function(a){a.dom.ScriptLoader=function(h){var c=0,k=1,i=2,l={},j=[],e={},d=[],g=0,f;function b(m,v){var x=this,q=a.DOM,s,o,r,n;function p(){q.remove(n);if(s){s.onreadystatechange=s.onload=s=null}v()}function u(){if(typeof(console)!=="undefined"&&console.log){console.log("Failed to load: "+m)}}n=q.uniqueId();if(a.isIE6){o=new a.util.URI(m);r=location;if(o.host==r.hostname&&o.port==r.port&&(o.protocol+":")==r.protocol&&o.protocol.toLowerCase()!="file"){a.util.XHR.send({url:a._addVer(o.getURI()),success:function(y){var t=q.create("script",{type:"text/javascript"});t.text=y;document.getElementsByTagName("head")[0].appendChild(t);q.remove(t);p()},error:u});return}}s=document.createElement("script");s.id=n;s.type="text/javascript";s.src=a._addVer(m);if(!a.isIE){s.onload=p}s.onerror=u;if(!a.isOpera){s.onreadystatechange=function(){var t=s.readyState;if(t=="complete"||t=="loaded"){p()}}}(document.getElementsByTagName("head")[0]||document.body).appendChild(s)}this.isDone=function(m){return l[m]==i};this.markDone=function(m){l[m]=i};this.add=this.load=function(m,q,n){var o,p=l[m];if(p==f){j.push(m);l[m]=c}if(q){if(!e[m]){e[m]=[]}e[m].push({func:q,scope:n||this})}};this.loadQueue=function(n,m){this.loadScripts(j,n,m)};this.loadScripts=function(m,q,p){var o;function n(r){a.each(e[r],function(s){s.func.call(s.scope)});e[r]=f}d.push({func:q,scope:p||this});o=function(){var r=a.grep(m);m.length=0;a.each(r,function(s){if(l[s]==i){n(s);return}if(l[s]!=k){l[s]=k;g++;b(s,function(){l[s]=i;g--;n(s);o()})}});if(!g){a.each(d,function(s){s.func.call(s.scope)});d.length=0}};o()}};a.ScriptLoader=new a.dom.ScriptLoader()})(tinymce);(function(a){a.dom.RangeUtils=function(c){var b="\uFEFF";this.walk=function(d,s){var i=d.startContainer,l=d.startOffset,t=d.endContainer,m=d.endOffset,j,g,o,h,r,q,e;e=c.select("td.mceSelected,th.mceSelected");if(e.length>0){a.each(e,function(u){s([u])});return}function f(u){var v;v=u[0];if(v.nodeType===3&&v===i&&l>=v.nodeValue.length){u.splice(0,1)}v=u[u.length-1];if(m===0&&u.length>0&&v===t&&v.nodeType===3){u.splice(u.length-1,1)}return u}function p(x,v,u){var y=[];for(;x&&x!=u;x=x[v]){y.push(x)}return y}function n(v,u){do{if(v.parentNode==u){return v}v=v.parentNode}while(v)}function k(x,v,y){var u=y?"nextSibling":"previousSibling";for(h=x,r=h.parentNode;h&&h!=v;h=r){r=h.parentNode;q=p(h==x?h:h[u],u);if(q.length){if(!y){q.reverse()}s(f(q))}}}if(i.nodeType==1&&i.hasChildNodes()){i=i.childNodes[l]}if(t.nodeType==1&&t.hasChildNodes()){t=t.childNodes[Math.min(m-1,t.childNodes.length-1)]}if(i==t){return s(f([i]))}j=c.findCommonAncestor(i,t);for(h=i;h;h=h.parentNode){if(h===t){return k(i,j,true)}if(h===j){break}}for(h=t;h;h=h.parentNode){if(h===i){return k(t,j)}if(h===j){break}}g=n(i,j)||i;o=n(t,j)||t;k(i,g,true);q=p(g==i?g:g.nextSibling,"nextSibling",o==t?o.nextSibling:o);if(q.length){s(f(q))}k(t,o)};this.split=function(e){var h=e.startContainer,d=e.startOffset,i=e.endContainer,g=e.endOffset;function f(j,k){return j.splitText(k)}if(h==i&&h.nodeType==3){if(d>0&&d<h.nodeValue.length){i=f(h,d);h=i.previousSibling;if(g>d){g=g-d;h=i=f(i,g).previousSibling;g=i.nodeValue.length;d=0}else{g=0}}}else{if(h.nodeType==3&&d>0&&d<h.nodeValue.length){h=f(h,d);d=0}if(i.nodeType==3&&g>0&&g<i.nodeValue.length){i=f(i,g).previousSibling;g=i.nodeValue.length}}return{startContainer:h,startOffset:d,endContainer:i,endOffset:g}}};a.dom.RangeUtils.compareRanges=function(c,b){if(c&&b){if(c.item||c.duplicate){if(c.item&&b.item&&c.item(0)===b.item(0)){return true}if(c.isEqual&&b.isEqual&&b.isEqual(c)){return true}}else{return c.startContainer==b.startContainer&&c.startOffset==b.startOffset}}return false}})(tinymce);(function(b){var a=b.dom.Event,c=b.each;b.create("tinymce.ui.KeyboardNavigation",{KeyboardNavigation:function(e,f){var q=this,n=e.root,m=e.items,o=e.enableUpDown,i=e.enableLeftRight||!e.enableUpDown,l=e.excludeFromTabOrder,k,h,p,d,g;f=f||b.DOM;k=function(r){g=r.target.id};h=function(r){f.setAttrib(r.target.id,"tabindex","-1")};d=function(r){var s=f.get(g);f.setAttrib(s,"tabindex","0");s.focus()};q.focus=function(){f.get(g).focus()};q.destroy=function(){c(m,function(s){var t=f.get(s.id);f.unbind(t,"focus",k);f.unbind(t,"blur",h)});var r=f.get(n);f.unbind(r,"focus",d);f.unbind(r,"keydown",p);m=f=n=q.focus=k=h=p=d=null;q.destroy=function(){}};q.moveFocus=function(v,s){var r=-1,u=q.controls,t;if(!g){return}c(m,function(y,x){if(y.id===g){r=x;return false}});r+=v;if(r<0){r=m.length-1}else{if(r>=m.length){r=0}}t=m[r];f.setAttrib(g,"tabindex","-1");f.setAttrib(t.id,"tabindex","0");f.get(t.id).focus();if(e.actOnFocus){e.onAction(t.id)}if(s){a.cancel(s)}};p=function(z){var v=37,u=39,y=38,A=40,r=27,t=14,s=13,x=32;switch(z.keyCode){case v:if(i){q.moveFocus(-1)}break;case u:if(i){q.moveFocus(1)}break;case y:if(o){q.moveFocus(-1)}break;case A:if(o){q.moveFocus(1)}break;case r:if(e.onCancel){e.onCancel();a.cancel(z)}break;case t:case s:case x:if(e.onAction){e.onAction(g);a.cancel(z)}break}};c(m,function(t,r){var s,u;if(!t.id){t.id=f.uniqueId("_mce_item_")}u=f.get(t.id);if(l){f.bind(u,"blur",h);s="-1"}else{s=(r===0?"0":"-1")}u.setAttribute("tabindex",s);f.bind(u,"focus",k)});if(m[0]){g=m[0].id}f.setAttrib(n,"tabindex","-1");var j=f.get(n);f.bind(j,"focus",d);f.bind(j,"keydown",p)}})})(tinymce);(function(c){var b=c.DOM,a=c.is;c.create("tinymce.ui.Control",{Control:function(f,e,d){this.id=f;this.settings=e=e||{};this.rendered=false;this.onRender=new c.util.Dispatcher(this);this.classPrefix="";this.scope=e.scope||this;this.disabled=0;this.active=0;this.editor=d},setAriaProperty:function(f,e){var d=b.get(this.id+"_aria")||b.get(this.id);if(d){b.setAttrib(d,"aria-"+f,!!e)}},focus:function(){b.get(this.id).focus()},setDisabled:function(d){if(d!=this.disabled){this.setAriaProperty("disabled",d);this.setState("Disabled",d);this.setState("Enabled",!d);this.disabled=d}},isDisabled:function(){return this.disabled},setActive:function(d){if(d!=this.active){this.setState("Active",d);this.active=d;this.setAriaProperty("pressed",d)}},isActive:function(){return this.active},setState:function(f,d){var e=b.get(this.id);f=this.classPrefix+f;if(d){b.addClass(e,f)}else{b.removeClass(e,f)}},isRendered:function(){return this.rendered},renderHTML:function(){},renderTo:function(d){b.setHTML(d,this.renderHTML())},postRender:function(){var e=this,d;if(a(e.disabled)){d=e.disabled;e.disabled=-1;e.setDisabled(d)}if(a(e.active)){d=e.active;e.active=-1;e.setActive(d)}},remove:function(){b.remove(this.id);this.destroy()},destroy:function(){c.dom.Event.clear(this.id)}})})(tinymce);tinymce.create("tinymce.ui.Container:tinymce.ui.Control",{Container:function(c,b,a){this.parent(c,b,a);this.controls=[];this.lookup={}},add:function(a){this.lookup[a.id]=a;this.controls.push(a);return a},get:function(a){return this.lookup[a]}});tinymce.create("tinymce.ui.Separator:tinymce.ui.Control",{Separator:function(b,a){this.parent(b,a);this.classPrefix="mceSeparator";this.setDisabled(true)},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix,role:"separator","aria-orientation":"vertical",tabindex:"-1"})}});(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.MenuItem:tinymce.ui.Control",{MenuItem:function(g,f){this.parent(g,f);this.classPrefix="mceMenuItem"},setSelected:function(f){this.setState("Selected",f);this.setAriaProperty("checked",!!f);this.selected=f},isSelected:function(){return this.selected},postRender:function(){var f=this;f.parent();if(c(f.selected)){f.setSelected(f.selected)}}})})(tinymce);(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(h,g){var f=this;f.parent(h,g);f.items={};f.collapsed=false;f.menuCount=0;f.onAddItem=new d.util.Dispatcher(this)},expand:function(g){var f=this;if(g){a(f,function(h){if(h.expand){h.expand()}},"items",f)}f.collapsed=false},collapse:function(g){var f=this;if(g){a(f,function(h){if(h.collapse){h.collapse()}},"items",f)}f.collapsed=true},isCollapsed:function(){return this.collapsed},add:function(f){if(!f.settings){f=new d.ui.MenuItem(f.id||b.uniqueId(),f)}this.onAddItem.dispatch(this,f);return this.items[f.id]=f},addSeparator:function(){return this.add({separator:true})},addMenu:function(f){if(!f.collapse){f=this.createMenu(f)}this.menuCount++;return this.add(f)},hasMenus:function(){return this.menuCount!==0},remove:function(f){delete this.items[f.id]},removeAll:function(){var f=this;a(f,function(g){if(g.removeAll){g.removeAll()}else{g.remove()}g.destroy()},"items",f);f.items={}},createMenu:function(g){var f=new d.ui.Menu(g.id||b.uniqueId(),g);f.onAddItem.add(this.onAddItem.dispatch,this.onAddItem);return f}})})(tinymce);(function(e){var d=e.is,c=e.DOM,f=e.each,a=e.dom.Event,b=e.dom.Element;e.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(h,g){g=g||{};g.container=g.container||c.doc.body;g.offset_x=g.offset_x||0;g.offset_y=g.offset_y||0;g.vp_offset_x=g.vp_offset_x||0;g.vp_offset_y=g.vp_offset_y||0;if(d(g.icons)&&!g.icons){g["class"]+=" mceNoIcons"}this.parent(h,g);this.onShowMenu=new e.util.Dispatcher(this);this.onHideMenu=new e.util.Dispatcher(this);this.classPrefix="mceMenu"},createMenu:function(j){var h=this,i=h.settings,g;j.container=j.container||i.container;j.parent=h;j.constrain=j.constrain||i.constrain;j["class"]=j["class"]||i["class"];j.vp_offset_x=j.vp_offset_x||i.vp_offset_x;j.vp_offset_y=j.vp_offset_y||i.vp_offset_y;j.keyboard_focus=i.keyboard_focus;g=new e.ui.DropMenu(j.id||c.uniqueId(),j);g.onAddItem.add(h.onAddItem.dispatch,h.onAddItem);return g},focus:function(){var g=this;if(g.keyboardNav){g.keyboardNav.focus()}},update:function(){var i=this,j=i.settings,g=c.get("menu_"+i.id+"_tbl"),l=c.get("menu_"+i.id+"_co"),h,k;h=j.max_width?Math.min(g.offsetWidth,j.max_width):g.offsetWidth;k=j.max_height?Math.min(g.offsetHeight,j.max_height):g.offsetHeight;if(!c.boxModel){i.element.setStyles({width:h+2,height:k+2})}else{i.element.setStyles({width:h,height:k})}if(j.max_width){c.setStyle(l,"width",h)}if(j.max_height){c.setStyle(l,"height",k);if(g.clientHeight<j.max_height){c.setStyle(l,"overflow","hidden")}}},showMenu:function(p,n,r){var z=this,A=z.settings,o,g=c.getViewPort(),u,l,v,q,i=2,k,j,m=z.classPrefix;z.collapse(1);if(z.isMenuVisible){return}if(!z.rendered){o=c.add(z.settings.container,z.renderNode());f(z.items,function(h){h.postRender()});z.element=new b("menu_"+z.id,{blocker:1,container:A.container})}else{o=c.get("menu_"+z.id)}if(!e.isOpera){c.setStyles(o,{left:-65535,top:-65535})}c.show(o);z.update();p+=A.offset_x||0;n+=A.offset_y||0;g.w-=4;g.h-=4;if(A.constrain){u=o.clientWidth-i;l=o.clientHeight-i;v=g.x+g.w;q=g.y+g.h;if((p+A.vp_offset_x+u)>v){p=r?r-u:Math.max(0,(v-A.vp_offset_x)-u)}if((n+A.vp_offset_y+l)>q){n=Math.max(0,(q-A.vp_offset_y)-l)}}c.setStyles(o,{left:p,top:n});z.element.update();z.isMenuVisible=1;z.mouseClickFunc=a.add(o,"click",function(s){var h;s=s.target;if(s&&(s=c.getParent(s,"tr"))&&!c.hasClass(s,m+"ItemSub")){h=z.items[s.id];if(h.isDisabled()){return}k=z;while(k){if(k.hideMenu){k.hideMenu()}k=k.settings.parent}if(h.settings.onclick){h.settings.onclick(s)}return false}});if(z.hasMenus()){z.mouseOverFunc=a.add(o,"mouseover",function(x){var h,t,s;x=x.target;if(x&&(x=c.getParent(x,"tr"))){h=z.items[x.id];if(z.lastMenu){z.lastMenu.collapse(1)}if(h.isDisabled()){return}if(x&&c.hasClass(x,m+"ItemSub")){t=c.getRect(x);h.showMenu((t.x+t.w-i),t.y-i,t.x);z.lastMenu=h;c.addClass(c.get(h.id).firstChild,m+"ItemActive")}}})}a.add(o,"keydown",z._keyHandler,z);z.onShowMenu.dispatch(z);if(A.keyboard_focus){z._setupKeyboardNav()}},hideMenu:function(j){var g=this,i=c.get("menu_"+g.id),h;if(!g.isMenuVisible){return}if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(i,"mouseover",g.mouseOverFunc);a.remove(i,"click",g.mouseClickFunc);a.remove(i,"keydown",g._keyHandler);c.hide(i);g.isMenuVisible=0;if(!j){g.collapse(1)}if(g.element){g.element.hide()}if(h=c.get(g.id)){c.removeClass(h.firstChild,g.classPrefix+"ItemActive")}g.onHideMenu.dispatch(g)},add:function(i){var g=this,h;i=g.parent(i);if(g.isRendered&&(h=c.get("menu_"+g.id))){g._add(c.select("tbody",h)[0],i)}return i},collapse:function(g){this.parent(g);this.hideMenu(1)},remove:function(g){c.remove(g.id);this.destroy();return this.parent(g)},destroy:function(){var g=this,h=c.get("menu_"+g.id);if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(h,"mouseover",g.mouseOverFunc);a.remove(c.select("a",h),"focus",g.mouseOverFunc);a.remove(h,"click",g.mouseClickFunc);a.remove(h,"keydown",g._keyHandler);if(g.element){g.element.remove()}c.remove(h)},renderNode:function(){var i=this,j=i.settings,l,h,k,g;g=c.create("div",{role:"listbox",id:"menu_"+i.id,"class":j["class"],style:"position:absolute;left:0;top:0;z-index:200000;outline:0"});if(i.settings.parent){c.setAttrib(g,"aria-parent","menu_"+i.settings.parent.id)}k=c.add(g,"div",{role:"presentation",id:"menu_"+i.id+"_co","class":i.classPrefix+(j["class"]?" "+j["class"]:"")});i.element=new b("menu_"+i.id,{blocker:1,container:j.container});if(j.menu_line){c.add(k,"span",{"class":i.classPrefix+"Line"})}l=c.add(k,"table",{role:"presentation",id:"menu_"+i.id+"_tbl",border:0,cellPadding:0,cellSpacing:0});h=c.add(l,"tbody");f(i.items,function(m){i._add(h,m)});i.rendered=true;return g},_setupKeyboardNav:function(){var i,h,g=this;i=c.get("menu_"+g.id);h=c.select("a[role=option]","menu_"+g.id);h.splice(0,0,i);g.keyboardNav=new e.ui.KeyboardNavigation({root:"menu_"+g.id,items:h,onCancel:function(){g.hideMenu()},enableUpDown:true});i.focus()},_keyHandler:function(g){var h=this,i;switch(g.keyCode){case 37:if(h.settings.parent){h.hideMenu();h.settings.parent.focus();a.cancel(g)}break;case 39:if(h.mouseOverFunc){h.mouseOverFunc(g)}break}},_add:function(j,h){var i,q=h.settings,p,l,k,m=this.classPrefix,g;if(q.separator){l=c.add(j,"tr",{id:h.id,"class":m+"ItemSeparator"});c.add(l,"td",{"class":m+"ItemSeparator"});if(i=l.previousSibling){c.addClass(i,"mceLast")}return}i=l=c.add(j,"tr",{id:h.id,"class":m+"Item "+m+"ItemEnabled"});i=k=c.add(i,q.titleItem?"th":"td");i=p=c.add(i,"a",{id:h.id+"_aria",role:q.titleItem?"presentation":"option",href:"javascript:;",onclick:"return false;",onmousedown:"return false;"});if(q.parent){c.setAttrib(p,"aria-haspopup","true");c.setAttrib(p,"aria-owns","menu_"+h.id)}c.addClass(k,q["class"]);g=c.add(i,"span",{"class":"mceIcon"+(q.icon?" mce_"+q.icon:"")});if(q.icon_src){c.add(g,"img",{src:q.icon_src})}i=c.add(i,q.element||"span",{"class":"mceText",title:h.settings.title},h.settings.title);if(h.settings.style){if(typeof h.settings.style=="function"){h.settings.style=h.settings.style()}c.setAttrib(i,"style",h.settings.style)}if(j.childNodes.length==1){c.addClass(l,"mceFirst")}if((i=l.previousSibling)&&c.hasClass(i,m+"ItemSeparator")){c.addClass(l,"mceFirst")}if(h.collapse){c.addClass(l,m+"ItemSub")}if(i=l.previousSibling){c.removeClass(i,"mceLast")}c.addClass(l,"mceLast")}})})(tinymce);(function(b){var a=b.DOM;b.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(e,d,c){this.parent(e,d,c);this.classPrefix="mceButton"},renderHTML:function(){var f=this.classPrefix,e=this.settings,d,c;c=a.encode(e.label||"");d='<a role="button" id="'+this.id+'" href="javascript:;" class="'+f+" "+f+"Enabled "+e["class"]+(c?" "+f+"Labeled":"")+'" onmousedown="return false;" onclick="return false;" aria-labelledby="'+this.id+'_voice" title="'+a.encode(e.title)+'">';if(e.image&&!(this.editor&&this.editor.forcedHighContrastMode)){d+='<span class="mceIcon '+e["class"]+'"><img class="mceIcon" src="'+e.image+'" alt="'+a.encode(e.title)+'" /></span>'+(c?'<span class="'+f+'Label">'+c+"</span>":"")}else{d+='<span class="mceIcon '+e["class"]+'"></span>'+(c?'<span class="'+f+'Label">'+c+"</span>":"")}d+='<span class="mceVoiceLabel mceIconOnly" style="display: none;" id="'+this.id+'_voice">'+e.title+"</span>";d+="</a>";return d},postRender:function(){var d=this,e=d.settings,c;if(b.isIE&&d.editor){b.dom.Event.add(d.id,"mousedown",function(f){var g=d.editor.selection.getNode().nodeName;c=g==="IMG"?d.editor.selection.getBookmark():null})}b.dom.Event.add(d.id,"click",function(f){if(!d.isDisabled()){if(b.isIE&&d.editor&&c!==null){d.editor.selection.moveToBookmark(c)}return e.onclick.call(e.scope,f)}});b.dom.Event.add(d.id,"keyup",function(f){if(!d.isDisabled()&&f.keyCode==b.VK.SPACEBAR){return e.onclick.call(e.scope,f)}})}})})(tinymce);(function(e){var d=e.DOM,b=e.dom.Event,f=e.each,a=e.util.Dispatcher,c;e.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(j,i,g){var h=this;h.parent(j,i,g);h.items=[];h.onChange=new a(h);h.onPostRender=new a(h);h.onAdd=new a(h);h.onRenderMenu=new e.util.Dispatcher(this);h.classPrefix="mceListBox";h.marked={}},select:function(h){var g=this,j,i;g.marked={};if(h==c){return g.selectByIndex(-1)}if(h&&typeof(h)=="function"){i=h}else{i=function(k){return k==h}}if(h!=g.selectedValue){f(g.items,function(l,k){if(i(l.value)){j=1;g.selectByIndex(k);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(g){var i=this,j,k,h;i.marked={};if(g!=i.selectedIndex){j=d.get(i.id+"_text");h=d.get(i.id+"_voiceDesc");k=i.items[g];if(k){i.selectedValue=k.value;i.selectedIndex=g;d.setHTML(j,d.encode(k.title));d.setHTML(h,i.settings.title+" - "+k.title);d.removeClass(j,"mceTitle");d.setAttrib(i.id,"aria-valuenow",k.title)}else{d.setHTML(j,d.encode(i.settings.title));d.setHTML(h,d.encode(i.settings.title));d.addClass(j,"mceTitle");i.selectedValue=i.selectedIndex=null;d.setAttrib(i.id,"aria-valuenow",i.settings.title)}j=0}},mark:function(g){this.marked[g]=true},add:function(j,g,i){var h=this;i=i||{};i=e.extend(i,{title:j,value:g});h.items.push(i);h.onAdd.dispatch(h,i)},getLength:function(){return this.items.length},renderHTML:function(){var j="",g=this,i=g.settings,k=g.classPrefix;j='<span role="listbox" aria-haspopup="true" aria-labelledby="'+g.id+'_voiceDesc" aria-describedby="'+g.id+'_voiceDesc"><table role="presentation" tabindex="0" id="'+g.id+'" cellpadding="0" cellspacing="0" class="'+k+" "+k+"Enabled"+(i["class"]?(" "+i["class"]):"")+'"><tbody><tr>';j+="<td>"+d.createHTML("span",{id:g.id+"_voiceDesc","class":"voiceLabel",style:"display:none;"},g.settings.title);j+=d.createHTML("a",{id:g.id+"_text",tabindex:-1,href:"javascript:;","class":"mceText",onclick:"return false;",onmousedown:"return false;"},d.encode(g.settings.title))+"</td>";j+="<td>"+d.createHTML("a",{id:g.id+"_open",tabindex:-1,href:"javascript:;","class":"mceOpen",onclick:"return false;",onmousedown:"return false;"},'<span><span style="display:none;" class="mceIconOnly" aria-hidden="true">\u25BC</span></span>')+"</td>";j+="</tr></tbody></table></span>";return j},showMenu:function(){var h=this,j,i=d.get(this.id),g;if(h.isDisabled()||h.items.length===0){return}if(h.menu&&h.menu.isMenuVisible){return h.hideMenu()}if(!h.isMenuRendered){h.renderMenu();h.isMenuRendered=true}j=d.getPos(i);g=h.menu;g.settings.offset_x=j.x;g.settings.offset_y=j.y;g.settings.keyboard_focus=!e.isOpera;f(h.items,function(k){if(g.items[k.id]){g.items[k.id].setSelected(0)}});f(h.items,function(k){if(g.items[k.id]&&h.marked[k.value]){g.items[k.id].setSelected(1)}if(k.value===h.selectedValue){g.items[k.id].setSelected(1)}});g.showMenu(0,i.clientHeight);b.add(d.doc,"mousedown",h.hideMenu,h);d.addClass(h.id,h.classPrefix+"Selected")},hideMenu:function(h){var g=this;if(g.menu&&g.menu.isMenuVisible){d.removeClass(g.id,g.classPrefix+"Selected");if(h&&h.type=="mousedown"&&(h.target.id==g.id+"_text"||h.target.id==g.id+"_open")){return}if(!h||!d.getParent(h.target,".mceMenu")){d.removeClass(g.id,g.classPrefix+"Selected");b.remove(d.doc,"mousedown",g.hideMenu,g);g.menu.hideMenu()}}},renderMenu:function(){var h=this,g;g=h.settings.control_manager.createDropMenu(h.id+"_menu",{menu_line:1,"class":h.classPrefix+"Menu mceNoIcons",max_width:250,max_height:150});g.onHideMenu.add(function(){h.hideMenu();h.focus()});g.add({title:h.settings.title,"class":"mceMenuItemTitle",onclick:function(){if(h.settings.onselect("")!==false){h.select("")}}});f(h.items,function(i){if(i.value===c){g.add({title:i.title,role:"option","class":"mceMenuItemTitle",onclick:function(){if(h.settings.onselect("")!==false){h.select("")}}})}else{i.id=d.uniqueId();i.role="option";i.onclick=function(){if(h.settings.onselect(i.value)!==false){h.select(i.value)}};g.add(i)}});h.onRenderMenu.dispatch(h,g);h.menu=g},postRender:function(){var g=this,h=g.classPrefix;b.add(g.id,"click",g.showMenu,g);b.add(g.id,"keydown",function(i){if(i.keyCode==32){g.showMenu(i);b.cancel(i)}});b.add(g.id,"focus",function(){if(!g._focused){g.keyDownHandler=b.add(g.id,"keydown",function(i){if(i.keyCode==40){g.showMenu();b.cancel(i)}});g.keyPressHandler=b.add(g.id,"keypress",function(j){var i;if(j.keyCode==13){i=g.selectedValue;g.selectedValue=null;b.cancel(j);g.settings.onselect(i)}})}g._focused=1});b.add(g.id,"blur",function(){b.remove(g.id,"keydown",g.keyDownHandler);b.remove(g.id,"keypress",g.keyPressHandler);g._focused=0});if(e.isIE6||!d.boxModel){b.add(g.id,"mouseover",function(){if(!d.hasClass(g.id,h+"Disabled")){d.addClass(g.id,h+"Hover")}});b.add(g.id,"mouseout",function(){if(!d.hasClass(g.id,h+"Disabled")){d.removeClass(g.id,h+"Hover")}})}g.onPostRender.dispatch(g,d.get(g.id))},destroy:function(){this.parent();b.clear(this.id+"_text");b.clear(this.id+"_open")}})})(tinymce);(function(e){var d=e.DOM,b=e.dom.Event,f=e.each,a=e.util.Dispatcher,c;e.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(h,g){this.parent(h,g);this.classPrefix="mceNativeListBox"},setDisabled:function(g){d.get(this.id).disabled=g;this.setAriaProperty("disabled",g)},isDisabled:function(){return d.get(this.id).disabled},select:function(h){var g=this,j,i;if(h==c){return g.selectByIndex(-1)}if(h&&typeof(h)=="function"){i=h}else{i=function(k){return k==h}}if(h!=g.selectedValue){f(g.items,function(l,k){if(i(l.value)){j=1;g.selectByIndex(k);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(g){d.get(this.id).selectedIndex=g+1;this.selectedValue=this.items[g]?this.items[g].value:null},add:function(k,h,g){var j,i=this;g=g||{};g.value=h;if(i.isRendered()){d.add(d.get(this.id),"option",g,k)}j={title:k,value:h,attribs:g};i.items.push(j);i.onAdd.dispatch(i,j)},getLength:function(){return this.items.length},renderHTML:function(){var i,g=this;i=d.createHTML("option",{value:""},"-- "+g.settings.title+" --");f(g.items,function(h){i+=d.createHTML("option",{value:h.value},h.title)});i=d.createHTML("select",{id:g.id,"class":"mceNativeListBox","aria-labelledby":g.id+"_aria"},i);i+=d.createHTML("span",{id:g.id+"_aria",style:"display: none"},g.settings.title);return i},postRender:function(){var h=this,i,j=true;h.rendered=true;function g(l){var k=h.items[l.target.selectedIndex-1];if(k&&(k=k.value)){h.onChange.dispatch(h,k);if(h.settings.onselect){h.settings.onselect(k)}}}b.add(h.id,"change",g);b.add(h.id,"keydown",function(l){var k;b.remove(h.id,"change",i);j=false;k=b.add(h.id,"blur",function(){if(j){return}j=true;b.add(h.id,"change",g);b.remove(h.id,"blur",k)});if(e.isWebKit&&(l.keyCode==37||l.keyCode==39)){return b.prevent(l)}if(l.keyCode==13||l.keyCode==32){g(l);return b.cancel(l)}});h.onPostRender.dispatch(h,d.get(h.id))}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(g,f,e){this.parent(g,f,e);this.onRenderMenu=new c.util.Dispatcher(this);f.menu_container=f.menu_container||b.doc.body},showMenu:function(){var g=this,j,i,h=b.get(g.id),f;if(g.isDisabled()){return}if(!g.isMenuRendered){g.renderMenu();g.isMenuRendered=true}if(g.isMenuVisible){return g.hideMenu()}j=b.getPos(g.settings.menu_container);i=b.getPos(h);f=g.menu;f.settings.offset_x=i.x;f.settings.offset_y=i.y;f.settings.vp_offset_x=i.x;f.settings.vp_offset_y=i.y;f.settings.keyboard_focus=g._focused;f.showMenu(0,h.firstChild.clientHeight);a.add(b.doc,"mousedown",g.hideMenu,g);g.setState("Selected",1);g.isMenuVisible=1},renderMenu:function(){var f=this,e;e=f.settings.control_manager.createDropMenu(f.id+"_menu",{menu_line:1,"class":this.classPrefix+"Menu",icons:f.settings.icons});e.onHideMenu.add(function(){f.hideMenu();f.focus()});f.onRenderMenu.dispatch(f,e);f.menu=e},hideMenu:function(g){var f=this;if(g&&g.type=="mousedown"&&b.getParent(g.target,function(h){return h.id===f.id||h.id===f.id+"_open"})){return}if(!g||!b.getParent(g.target,".mceMenu")){f.setState("Selected",0);a.remove(b.doc,"mousedown",f.hideMenu,f);if(f.menu){f.menu.hideMenu()}}f.isMenuVisible=0},postRender:function(){var e=this,f=e.settings;a.add(e.id,"click",function(){if(!e.isDisabled()){if(f.onclick){f.onclick(e.value)}e.showMenu()}})}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(g,f,e){this.parent(g,f,e);this.classPrefix="mceSplitButton"},renderHTML:function(){var i,f=this,g=f.settings,e;i="<tbody><tr>";if(g.image){e=b.createHTML("img ",{src:g.image,role:"presentation","class":"mceAction "+g["class"]})}else{e=b.createHTML("span",{"class":"mceAction "+g["class"]},"")}e+=b.createHTML("span",{"class":"mceVoiceLabel mceIconOnly",id:f.id+"_voice",style:"display:none;"},g.title);i+="<td >"+b.createHTML("a",{role:"button",id:f.id+"_action",tabindex:"-1",href:"javascript:;","class":"mceAction "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"</td>";e=b.createHTML("span",{"class":"mceOpen "+g["class"]},'<span style="display:none;" class="mceIconOnly" aria-hidden="true">\u25BC</span>');i+="<td >"+b.createHTML("a",{role:"button",id:f.id+"_open",tabindex:"-1",href:"javascript:;","class":"mceOpen "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"</td>";i+="</tr></tbody>";i=b.createHTML("table",{role:"presentation","class":"mceSplitButton mceSplitButtonEnabled "+g["class"],cellpadding:"0",cellspacing:"0",title:g.title},i);return b.createHTML("div",{id:f.id,role:"button",tabindex:"0","aria-labelledby":f.id+"_voice","aria-haspopup":"true"},i)},postRender:function(){var e=this,g=e.settings,f;if(g.onclick){f=function(h){if(!e.isDisabled()){g.onclick(e.value);a.cancel(h)}};a.add(e.id+"_action","click",f);a.add(e.id,["click","keydown"],function(h){var k=32,m=14,i=13,j=38,l=40;if((h.keyCode===32||h.keyCode===13||h.keyCode===14)&&!h.altKey&&!h.ctrlKey&&!h.metaKey){f();a.cancel(h)}else{if(h.type==="click"||h.keyCode===l){e.showMenu();a.cancel(h)}}})}a.add(e.id+"_open","click",function(h){e.showMenu();a.cancel(h)});a.add([e.id,e.id+"_open"],"focus",function(){e._focused=1});a.add([e.id,e.id+"_open"],"blur",function(){e._focused=0});if(c.isIE6||!b.boxModel){a.add(e.id,"mouseover",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.addClass(e.id,"mceSplitButtonHover")}});a.add(e.id,"mouseout",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.removeClass(e.id,"mceSplitButtonHover")}})}},destroy:function(){this.parent();a.clear(this.id+"_action");a.clear(this.id+"_open");a.clear(this.id)}})})(tinymce);(function(d){var c=d.DOM,a=d.dom.Event,b=d.is,e=d.each;d.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(i,h,f){var g=this;g.parent(i,h,f);g.settings=h=d.extend({colors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",grid_width:8,default_color:"#888888"},g.settings);g.onShowMenu=new d.util.Dispatcher(g);g.onHideMenu=new d.util.Dispatcher(g);g.value=h.default_color},showMenu:function(){var f=this,g,j,i,h;if(f.isDisabled()){return}if(!f.isMenuRendered){f.renderMenu();f.isMenuRendered=true}if(f.isMenuVisible){return f.hideMenu()}i=c.get(f.id);c.show(f.id+"_menu");c.addClass(i,"mceSplitButtonSelected");h=c.getPos(i);c.setStyles(f.id+"_menu",{left:h.x,top:h.y+i.firstChild.clientHeight,zIndex:200000});i=0;a.add(c.doc,"mousedown",f.hideMenu,f);f.onShowMenu.dispatch(f);if(f._focused){f._keyHandler=a.add(f.id+"_menu","keydown",function(k){if(k.keyCode==27){f.hideMenu()}});c.select("a",f.id+"_menu")[0].focus()}f.keyboardNav=new d.ui.KeyboardNavigation({root:f.id+"_menu",items:c.select("a",f.id+"_menu"),onCancel:function(){f.hideMenu();f.focus()}});f.keyboardNav.focus();f.isMenuVisible=1},hideMenu:function(g){var f=this;if(f.isMenuVisible){if(g&&g.type=="mousedown"&&c.getParent(g.target,function(h){return h.id===f.id+"_open"})){return}if(!g||!c.getParent(g.target,".mceSplitButtonMenu")){c.removeClass(f.id,"mceSplitButtonSelected");a.remove(c.doc,"mousedown",f.hideMenu,f);a.remove(f.id+"_menu","keydown",f._keyHandler);c.hide(f.id+"_menu")}f.isMenuVisible=0;f.onHideMenu.dispatch();f.keyboardNav.destroy()}},renderMenu:function(){var p=this,h,k=0,q=p.settings,g,j,l,o,f;o=c.add(q.menu_container,"div",{role:"listbox",id:p.id+"_menu","class":q.menu_class+" "+q["class"],style:"position:absolute;left:0;top:-1000px;"});h=c.add(o,"div",{"class":q["class"]+" mceSplitButtonMenu"});c.add(h,"span",{"class":"mceMenuLine"});g=c.add(h,"table",{role:"presentation","class":"mceColorSplitMenu"});j=c.add(g,"tbody");k=0;e(b(q.colors,"array")?q.colors:q.colors.split(","),function(m){m=m.replace(/^#/,"");if(!k--){l=c.add(j,"tr");k=q.grid_width-1}g=c.add(l,"td");var i={href:"javascript:;",style:{backgroundColor:"#"+m},title:p.editor.getLang("colors."+m,m),"data-mce-color":"#"+m};if(!d.isIE){i.role="option"}g=c.add(g,"a",i);if(p.editor.forcedHighContrastMode){g=c.add(g,"canvas",{width:16,height:16,"aria-hidden":"true"});if(g.getContext&&(f=g.getContext("2d"))){f.fillStyle="#"+m;f.fillRect(0,0,16,16)}else{c.remove(g)}}});if(q.more_colors_func){g=c.add(j,"tr");g=c.add(g,"td",{colspan:q.grid_width,"class":"mceMoreColors"});g=c.add(g,"a",{role:"option",id:p.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},q.more_colors_title);a.add(g,"click",function(i){q.more_colors_func.call(q.more_colors_scope||this);return a.cancel(i)})}c.addClass(h,"mceColorSplitMenu");a.add(p.id+"_menu","mousedown",function(i){return a.cancel(i)});a.add(p.id+"_menu","click",function(i){var m;i=c.getParent(i.target,"a",j);if(i&&i.nodeName.toLowerCase()=="a"&&(m=i.getAttribute("data-mce-color"))){p.setColor(m)}return false});return o},setColor:function(f){this.displayColor(f);this.hideMenu();this.settings.onselect(f)},displayColor:function(g){var f=this;c.setStyle(f.id+"_preview","backgroundColor",g);f.value=g},postRender:function(){var f=this,g=f.id;f.parent();c.add(g+"_action","div",{id:g+"_preview","class":"mceColorPreview"});c.setStyle(f.id+"_preview","backgroundColor",f.value)},destroy:function(){var f=this;f.parent();a.clear(f.id+"_menu");a.clear(f.id+"_more");c.remove(f.id+"_menu");if(f.keyboardNav){f.keyboardNav.destroy()}}})})(tinymce);(function(b){var d=b.DOM,c=b.each,a=b.dom.Event;b.create("tinymce.ui.ToolbarGroup:tinymce.ui.Container",{renderHTML:function(){var f=this,i=[],e=f.controls,j=b.each,g=f.settings;i.push('<div id="'+f.id+'" role="group" aria-labelledby="'+f.id+'_voice">');i.push("<span role='application'>");i.push('<span id="'+f.id+'_voice" class="mceVoiceLabel" style="display:none;">'+d.encode(g.name)+"</span>");j(e,function(h){i.push(h.renderHTML())});i.push("</span>");i.push("</div>");return i.join("")},focus:function(){var e=this;d.get(e.id).focus()},postRender:function(){var f=this,e=[];c(f.controls,function(g){c(g.controls,function(h){if(h.id){e.push(h)}})});f.keyNav=new b.ui.KeyboardNavigation({root:f.id,items:e,onCancel:function(){if(b.isWebKit){d.get(f.editor.id+"_ifr").focus()}f.editor.focus()},excludeFromTabOrder:!f.settings.tab_focus_toolbar})},destroy:function(){var e=this;e.parent();e.keyNav.destroy();a.clear(e.id)}})})(tinymce);(function(a){var c=a.DOM,b=a.each;a.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var m=this,f="",j,k,n=m.settings,e,d,g,l;l=m.controls;for(e=0;e<l.length;e++){k=l[e];d=l[e-1];g=l[e+1];if(e===0){j="mceToolbarStart";if(k.Button){j+=" mceToolbarStartButton"}else{if(k.SplitButton){j+=" mceToolbarStartSplitButton"}else{if(k.ListBox){j+=" mceToolbarStartListBox"}}}f+=c.createHTML("td",{"class":j},c.createHTML("span",null,"<!-- IE -->"))}if(d&&k.ListBox){if(d.Button||d.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarEnd"},c.createHTML("span",null,"<!-- IE -->"))}}if(c.stdMode){f+='<td style="position: relative">'+k.renderHTML()+"</td>"}else{f+="<td>"+k.renderHTML()+"</td>"}if(g&&k.ListBox){if(g.Button||g.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarStart"},c.createHTML("span",null,"<!-- IE -->"))}}}j="mceToolbarEnd";if(k.Button){j+=" mceToolbarEndButton"}else{if(k.SplitButton){j+=" mceToolbarEndSplitButton"}else{if(k.ListBox){j+=" mceToolbarEndListBox"}}}f+=c.createHTML("td",{"class":j},c.createHTML("span",null,"<!-- IE -->"));return c.createHTML("table",{id:m.id,"class":"mceToolbar"+(n["class"]?" "+n["class"]:""),cellpadding:"0",cellspacing:"0",align:m.settings.align||"",role:"presentation",tabindex:"-1"},"<tbody><tr>"+f+"</tr></tbody>")}})})(tinymce);(function(b){var a=b.util.Dispatcher,c=b.each;b.create("tinymce.AddOnManager",{AddOnManager:function(){var d=this;d.items=[];d.urls={};d.lookup={};d.onAdd=new a(d)},get:function(d){if(this.lookup[d]){return this.lookup[d].instance}else{return undefined}},dependencies:function(e){var d;if(this.lookup[e]){d=this.lookup[e].dependencies}return d||[]},requireLangPack:function(e){var d=b.settings;if(d&&d.language&&d.language_load!==false){b.ScriptLoader.add(this.urls[e]+"/langs/"+d.language+".js")}},add:function(f,e,d){this.items.push(e);this.lookup[f]={instance:e,dependencies:d};this.onAdd.dispatch(this,f,e);return e},createUrl:function(d,e){if(typeof e==="object"){return e}else{return{prefix:d.prefix,resource:e,suffix:d.suffix}}},addComponents:function(f,d){var e=this.urls[f];b.each(d,function(g){b.ScriptLoader.add(e+"/"+g)})},load:function(j,f,d,h){var g=this,e=f;function i(){var k=g.dependencies(j);b.each(k,function(m){var l=g.createUrl(f,m);g.load(l.resource,l,undefined,undefined)});if(d){if(h){d.call(h)}else{d.call(b.ScriptLoader)}}}if(g.urls[j]){return}if(typeof f==="object"){e=f.prefix+f.resource+f.suffix}if(e.indexOf("/")!==0&&e.indexOf("://")==-1){e=b.baseURL+"/"+e}g.urls[j]=e.substring(0,e.lastIndexOf("/"));if(g.lookup[j]){i()}else{b.ScriptLoader.add(e,i,h)}}});b.PluginManager=new b.AddOnManager();b.ThemeManager=new b.AddOnManager()}(tinymce));(function(j){var g=j.each,d=j.extend,k=j.DOM,i=j.dom.Event,f=j.ThemeManager,b=j.PluginManager,e=j.explode,h=j.util.Dispatcher,a,c=0;j.documentBaseURL=window.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");if(!/[\/\\]$/.test(j.documentBaseURL)){j.documentBaseURL+="/"}j.baseURL=new j.util.URI(j.documentBaseURL).toAbsolute(j.baseURL);j.baseURI=new j.util.URI(j.baseURL);j.onBeforeUnload=new h(j);i.add(window,"beforeunload",function(l){j.onBeforeUnload.dispatch(j,l)});j.onAddEditor=new h(j);j.onRemoveEditor=new h(j);j.EditorManager=d(j,{editors:[],i18n:{},activeEditor:null,init:function(x){var v=this,o,n=j.ScriptLoader,u,l=[],r;function q(t){var s=t.id;if(!s){s=t.name;if(s&&!k.get(s)){s=t.name}else{s=k.uniqueId()}t.setAttribute("id",s)}return s}function m(z,A,t){var y=z[A];if(!y){return}if(j.is(y,"string")){t=y.replace(/\.\w+$/,"");t=t?j.resolve(t):0;y=j.resolve(y)}return y.apply(t||this,Array.prototype.slice.call(arguments,2))}function p(t,s){return s.constructor===RegExp?s.test(t.className):k.hasClass(t,s)}v.settings=x;i.bind(window,"ready",function(){var s,t;m(x,"onpageload");switch(x.mode){case"exact":s=x.elements||"";if(s.length>0){g(e(s),function(y){if(k.get(y)){r=new j.Editor(y,x);l.push(r);r.render(1)}else{g(document.forms,function(z){g(z.elements,function(A){if(A.name===y){y="mce_editor_"+c++;k.setAttrib(A,"id",y);r=new j.Editor(y,x);l.push(r);r.render(1)}})})}})}break;case"textareas":case"specific_textareas":g(k.select("textarea"),function(y){if(x.editor_deselector&&p(y,x.editor_deselector)){return}if(!x.editor_selector||p(y,x.editor_selector)){r=new j.Editor(q(y),x);l.push(r);r.render(1)}});break;default:if(x.types){g(x.types,function(y){g(k.select(y.selector),function(A){var z=new j.Editor(q(A),j.extend({},x,y));l.push(z);z.render(1)})})}else{if(x.selector){g(k.select(x.selector),function(z){var y=new j.Editor(q(z),x);l.push(y);y.render(1)})}}}if(x.oninit){s=t=0;g(l,function(y){t++;if(!y.initialized){y.onInit.add(function(){s++;if(s==t){m(x,"oninit")}})}else{s++}if(s==t){m(x,"oninit")}})}})},get:function(l){if(l===a){return this.editors}return this.editors[l]},getInstanceById:function(l){return this.get(l)},add:function(m){var l=this,n=l.editors;n[m.id]=m;n.push(m);l._setActive(m);l.onAddEditor.dispatch(l,m);return m},remove:function(n){var m=this,l,o=m.editors;if(!o[n.id]){return null}delete o[n.id];for(l=0;l<o.length;l++){if(o[l]==n){o.splice(l,1);break}}if(m.activeEditor==n){m._setActive(o[0])}n.destroy();m.onRemoveEditor.dispatch(m,n);return n},execCommand:function(r,p,o){var q=this,n=q.get(o),l;function m(){n.destroy();l.detachEvent("onunload",m);l=l.tinyMCE=l.tinymce=null}switch(r){case"mceFocus":n.focus();return true;case"mceAddEditor":case"mceAddControl":if(!q.get(o)){new j.Editor(o,q.settings).render()}return true;case"mceAddFrameControl":l=o.window;l.tinyMCE=tinyMCE;l.tinymce=j;j.DOM.doc=l.document;j.DOM.win=l;n=new j.Editor(o.element_id,o);n.render();if(j.isIE){l.attachEvent("onunload",m)}o.page_window=null;return true;case"mceRemoveEditor":case"mceRemoveControl":if(n){n.remove()}return true;case"mceToggleEditor":if(!n){q.execCommand("mceAddControl",0,o);return true}if(n.isHidden()){n.show()}else{n.hide()}return true}if(q.activeEditor){return q.activeEditor.execCommand(r,p,o)}return false},execInstanceCommand:function(p,o,n,m){var l=this.get(p);if(l){return l.execCommand(o,n,m)}return false},triggerSave:function(){g(this.editors,function(l){l.save()})},addI18n:function(n,q){var l,m=this.i18n;if(!j.is(n,"string")){g(n,function(r,p){g(r,function(t,s){g(t,function(v,u){if(s==="common"){m[p+"."+u]=v}else{m[p+"."+s+"."+u]=v}})})})}else{g(q,function(r,p){m[n+"."+p]=r})}},_setActive:function(l){this.selectedInstance=this.activeEditor=l}})})(tinymce);(function(k){var l=k.DOM,j=k.dom.Event,f=k.extend,i=k.each,a=k.isGecko,b=k.isIE,e=k.isWebKit,d=k.is,h=k.ThemeManager,c=k.PluginManager,g=k.explode;k.create("tinymce.Editor",{Editor:function(p,o){var m=this,n=true;m.settings=o=f({id:p,language:"en",theme:"advanced",skin:"default",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:k.documentBaseURL,add_form_submit_trigger:n,submit_patch:n,add_unload_trigger:n,convert_urls:n,relative_urls:n,remove_script_host:n,table_inline_editing:false,object_resizing:n,accessibility_focus:n,doctype:k.isIE6?'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">':"<!DOCTYPE>",visual:n,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",apply_source_formatting:n,directionality:"ltr",forced_root_block:"p",hidden_input:n,padd_empty_editor:n,render_ui:n,indentation:"30px",fix_table_elements:n,inline_styles:n,convert_fonts_to_spans:n,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",validate:n,entity_encoding:"named",url_converter:m.convertURL,url_converter_scope:m,ie7_compat:n},o);m.id=m.editorId=p;m.isNotDirty=false;m.plugins={};m.documentBaseURI=new k.util.URI(o.document_base_url||k.documentBaseURL,{base_uri:tinyMCE.baseURI});m.baseURI=k.baseURI;m.contentCSS=[];m.contentStyles=[];m.setupEvents();m.execCommands={};m.queryStateCommands={};m.queryValueCommands={};m.execCallback("setup",m)},render:function(o){var p=this,q=p.settings,r=p.id,m=k.ScriptLoader;if(!j.domLoaded){j.add(window,"ready",function(){p.render()});return}tinyMCE.settings=q;if(!p.getElement()){return}if(k.isIDevice&&!k.isIOS5){return}if(!/TEXTAREA|INPUT/i.test(p.getElement().nodeName)&&q.hidden_input&&l.getParent(r,"form")){l.insertAfter(l.create("input",{type:"hidden",name:r}),r)}if(!q.content_editable){p.orgVisibility=p.getElement().style.visibility;p.getElement().style.visibility="hidden"}if(k.WindowManager){p.windowManager=new k.WindowManager(p)}if(q.encoding=="xml"){p.onGetContent.add(function(s,t){if(t.save){t.content=l.encode(t.content)}})}if(q.add_form_submit_trigger){p.onSubmit.addToTop(function(){if(p.initialized){p.save();p.isNotDirty=1}})}if(q.add_unload_trigger){p._beforeUnload=tinyMCE.onBeforeUnload.add(function(){if(p.initialized&&!p.destroyed&&!p.isHidden()){p.save({format:"raw",no_events:true})}})}k.addUnload(p.destroy,p);if(q.submit_patch){p.onBeforeRenderUI.add(function(){var s=p.getElement().form;if(!s){return}if(s._mceOldSubmit){return}if(!s.submit.nodeType&&!s.submit.length){p.formElement=s;s._mceOldSubmit=s.submit;s.submit=function(){k.triggerSave();p.isNotDirty=1;return p.formElement._mceOldSubmit(p.formElement)}}s=null})}function n(){if(q.language&&q.language_load!==false){m.add(k.baseURL+"/langs/"+q.language+".js")}if(q.theme&&typeof q.theme!="function"&&q.theme.charAt(0)!="-"&&!h.urls[q.theme]){h.load(q.theme,"themes/"+q.theme+"/editor_template"+k.suffix+".js")}i(g(q.plugins),function(t){if(t&&!c.urls[t]){if(t.charAt(0)=="-"){t=t.substr(1,t.length);var s=c.dependencies(t);i(s,function(v){var u={prefix:"plugins/",resource:v,suffix:"/editor_plugin"+k.suffix+".js"};v=c.createUrl(u,v);c.load(v.resource,v)})}else{if(t=="safari"){return}c.load(t,{prefix:"plugins/",resource:t,suffix:"/editor_plugin"+k.suffix+".js"})}}});m.loadQueue(function(){if(!p.removed){p.init()}})}n()},init:function(){var q,G=this,H=G.settings,D,y,z,C=G.getElement(),p,m,E,v,B,F,x,r=[];k.add(G);H.aria_label=H.aria_label||l.getAttrib(C,"aria-label",G.getLang("aria.rich_text_area"));if(H.theme){if(typeof H.theme!="function"){H.theme=H.theme.replace(/-/,"");p=h.get(H.theme);G.theme=new p();if(G.theme.init){G.theme.init(G,h.urls[H.theme]||k.documentBaseURL.replace(/\/$/,""))}}else{G.theme=H.theme}}function A(s){var t=c.get(s),o=c.urls[s]||k.documentBaseURL.replace(/\/$/,""),n;if(t&&k.inArray(r,s)===-1){i(c.dependencies(s),function(u){A(u)});n=new t(G,o);G.plugins[s]=n;if(n.init){n.init(G,o);r.push(s)}}}i(g(H.plugins.replace(/\-/g,"")),A);if(H.popup_css!==false){if(H.popup_css){H.popup_css=G.documentBaseURI.toAbsolute(H.popup_css)}else{H.popup_css=G.baseURI.toAbsolute("themes/"+H.theme+"/skins/"+H.skin+"/dialog.css")}}if(H.popup_css_add){H.popup_css+=","+G.documentBaseURI.toAbsolute(H.popup_css_add)}G.controlManager=new k.ControlManager(G);G.onBeforeRenderUI.dispatch(G,G.controlManager);if(H.render_ui&&G.theme){G.orgDisplay=C.style.display;if(typeof H.theme!="function"){D=H.width||C.style.width||C.offsetWidth;y=H.height||C.style.height||C.offsetHeight;z=H.min_height||100;F=/^[0-9\.]+(|px)$/i;if(F.test(""+D)){D=Math.max(parseInt(D,10)+(p.deltaWidth||0),100)}if(F.test(""+y)){y=Math.max(parseInt(y,10)+(p.deltaHeight||0),z)}p=G.theme.renderUI({targetNode:C,width:D,height:y,deltaWidth:H.delta_width,deltaHeight:H.delta_height});l.setStyles(p.sizeContainer||p.editorContainer,{width:D,height:y});y=(p.iframeHeight||y)+(typeof(y)=="number"?(p.deltaHeight||0):"");if(y<z){y=z}}else{p=H.theme(G,C);if(p.editorContainer.nodeType){p.editorContainer=p.editorContainer.id=p.editorContainer.id||G.id+"_parent"}if(p.iframeContainer.nodeType){p.iframeContainer=p.iframeContainer.id=p.iframeContainer.id||G.id+"_iframecontainer"}y=p.iframeHeight||C.offsetHeight;if(b){G.onInit.add(function(n){n.dom.bind(n.getBody(),"beforedeactivate keydown",function(){n.lastIERng=n.selection.getRng()})})}}G.editorContainer=p.editorContainer}if(H.content_css){i(g(H.content_css),function(n){G.contentCSS.push(G.documentBaseURI.toAbsolute(n))})}if(H.content_editable){C=q=p=null;return G.initContentBody()}if(document.domain&&location.hostname!=document.domain){k.relaxedDomain=document.domain}G.iframeHTML=H.doctype+'<html><head xmlns="http://www.w3.org/1999/xhtml">';if(H.document_base_url!=k.documentBaseURL){G.iframeHTML+='<base href="'+G.documentBaseURI.getURI()+'" />'}if(H.ie7_compat){G.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=7" />'}else{G.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=edge" />'}G.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';for(x=0;x<G.contentCSS.length;x++){G.iframeHTML+='<link type="text/css" rel="stylesheet" href="'+G.contentCSS[x]+'" />'}G.contentCSS=[];v=H.body_id||"tinymce";if(v.indexOf("=")!=-1){v=G.getParam("body_id","","hash");v=v[G.id]||v}B=H.body_class||"";if(B.indexOf("=")!=-1){B=G.getParam("body_class","","hash");B=B[G.id]||""}G.iframeHTML+='</head><body id="'+v+'" class="mceContentBody '+B+'" onload="window.parent.tinyMCE.get(\''+G.id+"').onLoad.dispatch();\"><br></body></html>";if(k.relaxedDomain&&(b||(k.isOpera&&parseFloat(opera.version())<11))){E='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+G.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody();})()'}q=l.add(p.iframeContainer,"iframe",{id:G.id+"_ifr",src:E||'javascript:""',frameBorder:"0",allowTransparency:"true",title:H.aria_label,style:{width:"100%",height:y,display:"block"}});G.contentAreaContainer=p.iframeContainer;if(p.editorContainer){l.get(p.editorContainer).style.display=G.orgDisplay}C.style.visibility=G.orgVisibility;l.get(G.id).style.display="none";l.setAttrib(G.id,"aria-hidden",true);if(!k.relaxedDomain||!E){G.initContentBody()}C=q=p=null},initContentBody:function(){var n=this,p=n.settings,q=l.get(n.id),r=n.getDoc(),o,m,s;if((!b||!k.relaxedDomain)&&!p.content_editable){r.open();r.write(n.iframeHTML);r.close();if(k.relaxedDomain){r.domain=k.relaxedDomain}}if(p.content_editable){l.addClass(q,"mceContentBody");n.contentDocument=r=p.content_document||document;n.contentWindow=p.content_window||window;n.bodyElement=q;p.content_document=p.content_window=null}m=n.getBody();m.disabled=true;if(!p.readonly){m.contentEditable=n.getParam("content_editable_state",true)}m.disabled=false;n.schema=new k.html.Schema(p);n.dom=new k.dom.DOMUtils(r,{keep_values:true,url_converter:n.convertURL,url_converter_scope:n,hex_colors:p.force_hex_style_colors,class_filter:p.class_filter,update_styles:true,root_element:p.content_editable?n.id:null,schema:n.schema});n.parser=new k.html.DomParser(p,n.schema);n.parser.addAttributeFilter("src,href,style",function(t,u){var v=t.length,y,A=n.dom,z,x;while(v--){y=t[v];z=y.attr(u);x="data-mce-"+u;if(!y.attributes.map[x]){if(u==="style"){y.attr(x,A.serializeStyle(A.parseStyle(z),y.name))}else{y.attr(x,n.convertURL(z,u,y.name))}}}});n.parser.addNodeFilter("script",function(t,u){var v=t.length,x;while(v--){x=t[v];x.attr("type","mce-"+(x.attr("type")||"text/javascript"))}});n.parser.addNodeFilter("#cdata",function(t,u){var v=t.length,x;while(v--){x=t[v];x.type=8;x.name="#comment";x.value="[CDATA["+x.value+"]]"}});n.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(u,v){var x=u.length,y,t=n.schema.getNonEmptyElements();while(x--){y=u[x];if(y.isEmpty(t)){y.empty().append(new k.html.Node("br",1)).shortEnded=true}}});n.serializer=new k.dom.Serializer(p,n.dom,n.schema);n.selection=new k.dom.Selection(n.dom,n.getWin(),n.serializer,n);n.formatter=new k.Formatter(n);n.undoManager=new k.UndoManager(n);n.forceBlocks=new k.ForceBlocks(n);n.enterKey=new k.EnterKey(n);n.editorCommands=new k.EditorCommands(n);n.onExecCommand.add(function(t,u){if(!/^(FontName|FontSize)$/.test(u)){n.nodeChanged()}});n.serializer.onPreProcess.add(function(t,u){return n.onPreProcess.dispatch(n,u,t)});n.serializer.onPostProcess.add(function(t,u){return n.onPostProcess.dispatch(n,u,t)});n.onPreInit.dispatch(n);if(!p.browser_spellcheck&&!p.gecko_spellcheck){r.body.spellcheck=false}if(!p.readonly){n.bindNativeEvents()}n.controlManager.onPostRender.dispatch(n,n.controlManager);n.onPostRender.dispatch(n);n.quirks=k.util.Quirks(n);if(p.directionality){m.dir=p.directionality}if(p.nowrap){m.style.whiteSpace="nowrap"}if(p.protect){n.onBeforeSetContent.add(function(t,u){i(p.protect,function(v){u.content=u.content.replace(v,function(x){return"<!--mce:protected "+escape(x)+"-->"})})})}n.onSetContent.add(function(){n.addVisual(n.getBody())});if(p.padd_empty_editor){n.onPostProcess.add(function(t,u){u.content=u.content.replace(/^(<p[^>]*>(&nbsp;|&#160;|\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")})}n.load({initial:true,format:"html"});n.startContent=n.getContent({format:"raw"});n.initialized=true;n.onInit.dispatch(n);n.execCallback("setupcontent_callback",n.id,m,r);n.execCallback("init_instance_callback",n);n.focus(true);n.nodeChanged({initial:true});if(n.contentStyles.length>0){s="";i(n.contentStyles,function(t){s+=t+"\r\n"});n.dom.addStyle(s)}i(n.contentCSS,function(t){n.dom.loadCSS(t)});if(p.auto_focus){setTimeout(function(){var t=k.get(p.auto_focus);t.selection.select(t.getBody(),1);t.selection.collapse(1);t.getBody().focus();t.getWin().focus()},100)}q=r=m=null},focus:function(p){var o,u=this,t=u.selection,q=u.settings.content_editable,n,r,s=u.getDoc(),m;if(!p){if(u.lastIERng){t.setRng(u.lastIERng)}n=t.getRng();if(n.item){r=n.item(0)}u._refreshContentEditable();if(!q){u.getWin().focus()}if(k.isGecko||q){m=u.getBody();if(m.setActive){m.setActive()}else{m.focus()}if(q){t.normalize()}}if(r&&r.ownerDocument==s){n=s.body.createControlRange();n.addElement(r);n.select()}}if(k.activeEditor!=u){if((o=k.activeEditor)!=null){o.onDeactivate.dispatch(o,u)}u.onActivate.dispatch(u,o)}k._setActive(u)},execCallback:function(q){var m=this,p=m.settings[q],o;if(!p){return}if(m.callbackLookup&&(o=m.callbackLookup[q])){p=o.func;o=o.scope}if(d(p,"string")){o=p.replace(/\.\w+$/,"");o=o?k.resolve(o):0;p=k.resolve(p);m.callbackLookup=m.callbackLookup||{};m.callbackLookup[q]={func:p,scope:o}}return p.apply(o||m,Array.prototype.slice.call(arguments,1))},translate:function(m){var o=this.settings.language||"en",n=k.i18n;if(!m){return""}return n[o+"."+m]||m.replace(/\{\#([^\}]+)\}/g,function(q,p){return n[o+"."+p]||"{#"+p+"}"})},getLang:function(o,m){return k.i18n[(this.settings.language||"en")+"."+o]||(d(m)?m:"{#"+o+"}")},getParam:function(t,q,m){var r=k.trim,p=d(this.settings[t])?this.settings[t]:q,s;if(m==="hash"){s={};if(d(p,"string")){i(p.indexOf("=")>0?p.split(/[;,](?![^=;,]*(?:[;,]|$))/):p.split(","),function(n){n=n.split("=");if(n.length>1){s[r(n[0])]=r(n[1])}else{s[r(n[0])]=r(n)}})}else{s=p}return s}return p},nodeChanged:function(q){var m=this,n=m.selection,p;if(m.initialized){q=q||{};p=n.getStart()||m.getBody();p=b&&p.ownerDocument!=m.getDoc()?m.getBody():p;q.parents=[];m.dom.getParent(p,function(o){if(o.nodeName=="BODY"){return true}q.parents.push(o)});m.onNodeChange.dispatch(m,q?q.controlManager||m.controlManager:m.controlManager,p,n.isCollapsed(),q)}},addButton:function(n,o){var m=this;m.buttons=m.buttons||{};m.buttons[n]=o},addCommand:function(m,o,n){this.execCommands[m]={func:o,scope:n||this}},addQueryStateHandler:function(m,o,n){this.queryStateCommands[m]={func:o,scope:n||this}},addQueryValueHandler:function(m,o,n){this.queryValueCommands[m]={func:o,scope:n||this}},addShortcut:function(o,q,m,p){var n=this,r;if(n.settings.custom_shortcuts===false){return false}n.shortcuts=n.shortcuts||{};if(d(m,"string")){r=m;m=function(){n.execCommand(r,false,null)}}if(d(m,"object")){r=m;m=function(){n.execCommand(r[0],r[1],r[2])}}i(g(o),function(s){var t={func:m,scope:p||this,desc:n.translate(q),alt:false,ctrl:false,shift:false};i(g(s,"+"),function(u){switch(u){case"alt":case"ctrl":case"shift":t[u]=true;break;default:t.charCode=u.charCodeAt(0);t.keyCode=u.toUpperCase().charCodeAt(0)}});n.shortcuts[(t.ctrl?"ctrl":"")+","+(t.alt?"alt":"")+","+(t.shift?"shift":"")+","+t.keyCode]=t});return true},execCommand:function(u,r,x,m){var p=this,q=0,v,n;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(u)&&(!m||!m.skip_focus)){p.focus()}m=f({},m);p.onBeforeExecCommand.dispatch(p,u,r,x,m);if(m.terminate){return false}if(p.execCallback("execcommand_callback",p.id,p.selection.getNode(),u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}if(v=p.execCommands[u]){n=v.func.call(v.scope,r,x);if(n!==true){p.onExecCommand.dispatch(p,u,r,x,m);return n}}i(p.plugins,function(o){if(o.execCommand&&o.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);q=1;return false}});if(q){return true}if(p.theme&&p.theme.execCommand&&p.theme.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}if(p.editorCommands.execCommand(u,r,x)){p.onExecCommand.dispatch(p,u,r,x,m);return true}p.getDoc().execCommand(u,r,x);p.onExecCommand.dispatch(p,u,r,x,m)},queryCommandState:function(q){var n=this,r,p;if(n._isHidden()){return}if(r=n.queryStateCommands[q]){p=r.func.call(r.scope);if(p!==true){return p}}r=n.editorCommands.queryCommandState(q);if(r!==-1){return r}try{return this.getDoc().queryCommandState(q)}catch(m){}},queryCommandValue:function(r){var n=this,q,p;if(n._isHidden()){return}if(q=n.queryValueCommands[r]){p=q.func.call(q.scope);if(p!==true){return p}}q=n.editorCommands.queryCommandValue(r);if(d(q)){return q}try{return this.getDoc().queryCommandValue(r)}catch(m){}},show:function(){var m=this;l.show(m.getContainer());l.hide(m.id);m.load()},hide:function(){var m=this,n=m.getDoc();if(b&&n){n.execCommand("SelectAll")}m.save();l.hide(m.getContainer());l.setStyle(m.id,"display",m.orgDisplay)},isHidden:function(){return !l.isHidden(this.id)},setProgressState:function(m,n,p){this.onSetProgressState.dispatch(this,m,n,p);return m},load:function(q){var m=this,p=m.getElement(),n;if(p){q=q||{};q.load=true;n=m.setContent(d(p.value)?p.value:p.innerHTML,q);q.element=p;if(!q.no_events){m.onLoadContent.dispatch(m,q)}q.element=p=null;return n}},save:function(r){var m=this,q=m.getElement(),n,p;if(!q||!m.initialized){return}r=r||{};r.save=true;r.element=q;n=r.content=m.getContent(r);if(!r.no_events){m.onSaveContent.dispatch(m,r)}n=r.content;if(!/TEXTAREA|INPUT/i.test(q.nodeName)){q.innerHTML=n;if(p=l.getParent(m.id,"form")){i(p.elements,function(o){if(o.name==m.id){o.value=n;return false}})}}else{q.value=n}r.element=q=null;return n},setContent:function(r,p){var o=this,n,m=o.getBody(),q;p=p||{};p.format=p.format||"html";p.set=true;p.content=r;if(!p.no_events){o.onBeforeSetContent.dispatch(o,p)}r=p.content;if(!k.isIE&&(r.length===0||/^\s+$/.test(r))){q=o.settings.forced_root_block;if(q){r="<"+q+'><br data-mce-bogus="1"></'+q+">"}else{r='<br data-mce-bogus="1">'}m.innerHTML=r;o.selection.select(m,true);o.selection.collapse(true);return}if(p.format!=="raw"){r=new k.html.Serializer({},o.schema).serialize(o.parser.parse(r))}p.content=k.trim(r);o.dom.setHTML(m,p.content);if(!p.no_events){o.onSetContent.dispatch(o,p)}if(!o.settings.content_editable||document.activeElement===o.getBody()){o.selection.normalize()}return p.content},getContent:function(n){var m=this,o;n=n||{};n.format=n.format||"html";n.get=true;n.getInner=true;if(!n.no_events){m.onBeforeGetContent.dispatch(m,n)}if(n.format=="raw"){o=m.getBody().innerHTML}else{o=m.serializer.serialize(m.getBody(),n)}n.content=k.trim(o);if(!n.no_events){m.onGetContent.dispatch(m,n)}return n.content},isDirty:function(){var m=this;return k.trim(m.startContent)!=k.trim(m.getContent({format:"raw",no_events:1}))&&!m.isNotDirty},getContainer:function(){var m=this;if(!m.container){m.container=l.get(m.editorContainer||m.id+"_parent")}return m.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return l.get(this.settings.content_element||this.id)},getWin:function(){var m=this,n;if(!m.contentWindow){n=l.get(m.id+"_ifr");if(n){m.contentWindow=n.contentWindow}}return m.contentWindow},getDoc:function(){var m=this,n;if(!m.contentDocument){n=m.getWin();if(n){m.contentDocument=n.document}}return m.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(o,n,q){var m=this,p=m.settings;if(p.urlconverter_callback){return m.execCallback("urlconverter_callback",o,q,true,n)}if(!p.convert_urls||(q&&q.nodeName=="LINK")||o.indexOf("file:")===0){return o}if(p.relative_urls){return m.documentBaseURI.toRelative(o)}o=m.documentBaseURI.toAbsolute(o,p.remove_script_host);return o},addVisual:function(q){var n=this,o=n.settings,p=n.dom,m;q=q||n.getBody();if(!d(n.hasVisual)){n.hasVisual=o.visual}i(p.select("table,a",q),function(s){var r;switch(s.nodeName){case"TABLE":m=o.visual_table_class||"mceItemTable";r=p.getAttrib(s,"border");if(!r||r=="0"){if(n.hasVisual){p.addClass(s,m)}else{p.removeClass(s,m)}}return;case"A":if(!p.getAttrib(s,"href",false)){r=p.getAttrib(s,"name")||s.id;m="mceItemAnchor";if(r){if(n.hasVisual){p.addClass(s,m)}else{p.removeClass(s,m)}}}return}});n.onVisualAid.dispatch(n,q,n.hasVisual)},remove:function(){var m=this,n=m.getContainer();if(!m.removed){m.removed=1;m.hide();if(!m.settings.content_editable){j.unbind(m.getWin());j.unbind(m.getDoc())}j.unbind(m.getBody());j.clear(n);m.execCallback("remove_instance_callback",m);m.onRemove.dispatch(m);m.onExecCommand.listeners=[];k.remove(m);l.remove(n)}},destroy:function(n){var m=this;if(m.destroyed){return}if(a){j.unbind(m.getDoc());j.unbind(m.getWin());j.unbind(m.getBody())}if(!n){k.removeUnload(m.destroy);tinyMCE.onBeforeUnload.remove(m._beforeUnload);if(m.theme&&m.theme.destroy){m.theme.destroy()}m.controlManager.destroy();m.selection.destroy();m.dom.destroy()}if(m.formElement){m.formElement.submit=m.formElement._mceOldSubmit;m.formElement._mceOldSubmit=null}m.contentAreaContainer=m.formElement=m.container=m.settings.content_element=m.bodyElement=m.contentDocument=m.contentWindow=null;if(m.selection){m.selection=m.selection.win=m.selection.dom=m.selection.dom.doc=null}m.destroyed=1},_refreshContentEditable:function(){var n=this,m,o;if(n._isHidden()){m=n.getBody();o=m.parentNode;o.removeChild(m);o.appendChild(m);m.focus()}},_isHidden:function(){var m;if(!a){return 0}m=this.selection.getSel();return(!m||!m.rangeCount||m.rangeCount===0)}})})(tinymce);(function(a){var b=a.each;a.Editor.prototype.setupEvents=function(){var c=this,d=c.settings;b(["onPreInit","onBeforeRenderUI","onPostRender","onLoad","onInit","onRemove","onActivate","onDeactivate","onClick","onEvent","onMouseUp","onMouseDown","onDblClick","onKeyDown","onKeyUp","onKeyPress","onContextMenu","onSubmit","onReset","onPaste","onPreProcess","onPostProcess","onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent","onLoadContent","onSaveContent","onNodeChange","onChange","onBeforeExecCommand","onExecCommand","onUndo","onRedo","onVisualAid","onSetProgressState","onSetAttrib"],function(e){c[e]=new a.util.Dispatcher(c)});if(d.cleanup_callback){c.onBeforeSetContent.add(function(e,f){f.content=e.execCallback("cleanup_callback","insert_to_editor",f.content,f)});c.onPreProcess.add(function(e,f){if(f.set){e.execCallback("cleanup_callback","insert_to_editor_dom",f.node,f)}if(f.get){e.execCallback("cleanup_callback","get_from_editor_dom",f.node,f)}});c.onPostProcess.add(function(e,f){if(f.set){f.content=e.execCallback("cleanup_callback","insert_to_editor",f.content,f)}if(f.get){f.content=e.execCallback("cleanup_callback","get_from_editor",f.content,f)}})}if(d.save_callback){c.onGetContent.add(function(e,f){if(f.save){f.content=e.execCallback("save_callback",e.id,f.content,e.getBody())}})}if(d.handle_event_callback){c.onEvent.add(function(f,g,h){if(c.execCallback("handle_event_callback",g,f,h)===false){g.preventDefault();g.stopPropagation()}})}if(d.handle_node_change_callback){c.onNodeChange.add(function(f,e,g){f.execCallback("handle_node_change_callback",f.id,g,-1,-1,true,f.selection.isCollapsed())})}if(d.save_callback){c.onSaveContent.add(function(e,g){var f=e.execCallback("save_callback",e.id,g.content,e.getBody());if(f){g.content=f}})}if(d.onchange_callback){c.onChange.add(function(f,e){f.execCallback("onchange_callback",f,e)})}};a.Editor.prototype.bindNativeEvents=function(){var l=this,f,d=l.settings,e=l.dom,h;h={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"};function c(i,m){var n=i.type;if(l.removed){return}if(l.onEvent.dispatch(l,i,m)!==false){l[h[i.fakeType||i.type]].dispatch(l,i,m)}}function j(i){l.focus(true)}function k(i,m){if(m.keyCode!=65||!a.VK.metaKeyPressed(m)){l.selection.normalize()}l.nodeChanged()}b(h,function(m,n){var i=d.content_editable?l.getBody():l.getDoc();switch(n){case"contextmenu":e.bind(i,n,c);break;case"paste":e.bind(l.getBody(),n,c);break;case"submit":case"reset":e.bind(l.getElement().form||a.DOM.getParent(l.id,"form"),n,c);break;default:e.bind(i,n,c)}});e.bind(d.content_editable?l.getBody():(a.isGecko?l.getDoc():l.getWin()),"focus",function(i){l.focus(true)});if(d.content_editable&&a.isOpera){e.bind(l.getBody(),"click",j);e.bind(l.getBody(),"keydown",j)}l.onMouseUp.add(k);l.onKeyUp.add(function(i,n){var m=n.keyCode;if((m>=33&&m<=36)||(m>=37&&m<=40)||m==13||m==45||m==46||m==8||(a.isMac&&(m==91||m==93))||n.ctrlKey){k(i,n)}});l.onReset.add(function(){l.setContent(l.startContent,{format:"raw"})});function g(m,i){if(m.altKey||m.ctrlKey||m.metaKey){b(l.shortcuts,function(n){var o=a.isMac?m.metaKey:m.ctrlKey;if(n.ctrl!=o||n.alt!=m.altKey||n.shift!=m.shiftKey){return}if(m.keyCode==n.keyCode||(m.charCode&&m.charCode==n.charCode)){m.preventDefault();if(i){n.func.call(n.scope)}return true}})}}l.onKeyUp.add(function(i,m){g(m)});l.onKeyPress.add(function(i,m){g(m)});l.onKeyDown.add(function(i,m){g(m,true)});if(a.isOpera){l.onClick.add(function(i,m){m.preventDefault()})}}})(tinymce);(function(d){var e=d.each,b,a=true,c=false;d.EditorCommands=function(n){var m=n.dom,p=n.selection,j={state:{},exec:{},value:{}},k=n.settings,q=n.formatter,o;function r(z,y,x){var v;z=z.toLowerCase();if(v=j.exec[z]){v(z,y,x);return a}return c}function l(x){var v;x=x.toLowerCase();if(v=j.state[x]){return v(x)}return -1}function h(x){var v;x=x.toLowerCase();if(v=j.value[x]){return v(x)}return c}function u(v,x){x=x||"exec";e(v,function(z,y){e(y.toLowerCase().split(","),function(A){j[x][A]=z})})}d.extend(this,{execCommand:r,queryCommandState:l,queryCommandValue:h,addCommands:u});function f(y,x,v){if(x===b){x=c}if(v===b){v=null}return n.getDoc().execCommand(y,x,v)}function t(v){return q.match(v)}function s(v,x){q.toggle(v,x?{value:x}:b)}function i(v){o=p.getBookmark(v)}function g(){p.moveToBookmark(o)}u({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){n.undoManager.add()},"Cut,Copy,Paste":function(z){var y=n.getDoc(),v;try{f(z)}catch(x){v=a}if(v||!y.queryCommandSupported(z)){if(d.isGecko){n.windowManager.confirm(n.getLang("clipboard_msg"),function(A){if(A){open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}})}else{n.windowManager.alert(n.getLang("clipboard_no_support"))}}},unlink:function(v){if(p.isCollapsed()){p.select(p.getNode())}f(v);p.collapse(c)},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(v){var x=v.substring(7);e("left,center,right,full".split(","),function(y){if(x!=y){q.remove("align"+y)}});s("align"+x);r("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(y){var v,x;f(y);v=m.getParent(p.getNode(),"ol,ul");if(v){x=v.parentNode;if(/^(H[1-6]|P|ADDRESS|PRE)$/.test(x.nodeName)){i();m.split(x,v);g()}}},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){s(v)},"ForeColor,HiliteColor,FontName":function(y,x,v){s(y,v)},FontSize:function(z,y,x){var v,A;if(x>=1&&x<=7){A=d.explode(k.font_size_style_values);v=d.explode(k.font_size_classes);if(v){x=v[x-1]||x}else{x=A[x-1]||x}}s(z,x)},RemoveFormat:function(v){q.remove(v)},mceBlockQuote:function(v){s("blockquote")},FormatBlock:function(y,x,v){return s(v||"p")},mceCleanup:function(){var v=p.getBookmark();n.setContent(n.getContent({cleanup:a}),{cleanup:a});p.moveToBookmark(v)},mceRemoveNode:function(z,y,x){var v=x||p.getNode();if(v!=n.getBody()){i();n.dom.remove(v,a);g()}},mceSelectNodeDepth:function(z,y,x){var v=0;m.getParent(p.getNode(),function(A){if(A.nodeType==1&&v++==x){p.select(A);return c}},n.getBody())},mceSelectNode:function(y,x,v){p.select(v)},mceInsertContent:function(B,I,K){var y,J,E,z,F,G,D,C,L,x,A,M,v,H;y=n.parser;J=new d.html.Serializer({},n.schema);v='<span id="mce_marker" data-mce-type="bookmark">\uFEFF</span>';G={content:K,format:"html"};p.onBeforeSetContent.dispatch(p,G);K=G.content;if(K.indexOf("{$caret}")==-1){K+="{$caret}"}K=K.replace(/\{\$caret\}/,v);if(!p.isCollapsed()){n.getDoc().execCommand("Delete",false,null)}E=p.getNode();G={context:E.nodeName.toLowerCase()};F=y.parse(K,G);A=F.lastChild;if(A.attr("id")=="mce_marker"){D=A;for(A=A.prev;A;A=A.walk(true)){if(A.type==3||!m.isBlock(A.name)){A.parent.insert(D,A,A.name==="br");break}}}if(!G.invalid){K=J.serialize(F);A=E.firstChild;M=E.lastChild;if(!A||(A===M&&A.nodeName==="BR")){m.setHTML(E,K)}else{p.setContent(K)}}else{p.setContent(v);E=n.selection.getNode();z=n.getBody();if(E.nodeType==9){E=A=z}else{A=E}while(A!==z){E=A;A=A.parentNode}K=E==z?z.innerHTML:m.getOuterHTML(E);K=J.serialize(y.parse(K.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return J.serialize(F)})));if(E==z){m.setHTML(z,K)}else{m.setOuterHTML(E,K)}}D=m.get("mce_marker");C=m.getRect(D);L=m.getViewPort(n.getWin());if((C.y+C.h>L.y+L.h||C.y<L.y)||(C.x>L.x+L.w||C.x<L.x)){H=d.isIE?n.getDoc().documentElement:n.getBody();H.scrollLeft=C.x;H.scrollTop=C.y-L.h+25}x=m.createRng();A=D.previousSibling;if(A&&A.nodeType==3){x.setStart(A,A.nodeValue.length)}else{x.setStartBefore(D);x.setEndBefore(D)}m.remove(D);p.setRng(x);p.onSetContent.dispatch(p,G);n.addVisual()},mceInsertRawHTML:function(y,x,v){p.setContent("tiny_mce_marker");n.setContent(n.getContent().replace(/tiny_mce_marker/g,function(){return v}))},mceToggleFormat:function(y,x,v){s(v)},mceSetContent:function(y,x,v){n.setContent(v)},"Indent,Outdent":function(z){var x,v,y;x=k.indentation;v=/[a-z%]+$/i.exec(x);x=parseInt(x);if(!l("InsertUnorderedList")&&!l("InsertOrderedList")){if(!k.forced_root_block&&!m.getParent(p.getNode(),m.isBlock)){q.apply("div")}e(p.getSelectedBlocks(),function(A){if(z=="outdent"){y=Math.max(0,parseInt(A.style.paddingLeft||0)-x);m.setStyle(A,"paddingLeft",y?y+v:"")}else{m.setStyle(A,"paddingLeft",(parseInt(A.style.paddingLeft||0)+x)+v)}})}else{f(z)}},mceRepaint:function(){var x;if(d.isGecko){try{i(a);if(p.getSel()){p.getSel().selectAllChildren(n.getBody())}p.collapse(a);g()}catch(v){}}},mceToggleFormat:function(y,x,v){q.toggle(v)},InsertHorizontalRule:function(){n.execCommand("mceInsertContent",false,"<hr />")},mceToggleVisualAid:function(){n.hasVisual=!n.hasVisual;n.addVisual()},mceReplaceContent:function(y,x,v){n.execCommand("mceInsertContent",false,v.replace(/\{\$selection\}/g,p.getContent({format:"text"})))},mceInsertLink:function(z,y,x){var v;if(typeof(x)=="string"){x={href:x}}v=m.getParent(p.getNode(),"a");x.href=x.href.replace(" ","%20");if(!v||!x.href){q.remove("link")}if(x.href){q.apply("link",x,v)}},selectAll:function(){var x=m.getRoot(),v=m.createRng();v.setStart(x,0);v.setEnd(x,x.childNodes.length);n.selection.setRng(v)}});u({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(z){var x="align"+z.substring(7);var v=p.isCollapsed()?[m.getParent(p.getNode(),m.isBlock)]:p.getSelectedBlocks();var y=d.map(v,function(A){return !!q.matchNode(A,x)});return d.inArray(y,a)!==-1},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(v){return t(v)},mceBlockQuote:function(){return t("blockquote")},Outdent:function(){var v;if(k.inline_styles){if((v=m.getParent(p.getStart(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}if((v=m.getParent(p.getEnd(),m.isBlock))&&parseInt(v.style.paddingLeft)>0){return a}}return l("InsertUnorderedList")||l("InsertOrderedList")||(!k.inline_styles&&!!m.getParent(p.getNode(),"BLOCKQUOTE"))},"InsertUnorderedList,InsertOrderedList":function(v){return m.getParent(p.getNode(),v=="insertunorderedlist"?"UL":"OL")}},"state");u({"FontSize,FontName":function(y){var x=0,v;if(v=m.getParent(p.getNode(),"span")){if(y=="fontsize"){x=v.style.fontSize}else{x=v.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()}}return x}},"value");u({Undo:function(){n.undoManager.undo()},Redo:function(){n.undoManager.redo()}})}})(tinymce);(function(b){var a=b.util.Dispatcher;b.UndoManager=function(h){var l,i=0,e=[],g,k,j,f;function c(){return b.trim(h.getContent({format:"raw",no_events:1}).replace(/<span[^>]+data-mce-bogus[^>]+>[\u200B\uFEFF]+<\/span>/g,""))}function d(){l.typing=false;l.add()}onBeforeAdd=new a(l);k=new a(l);j=new a(l);f=new a(l);k.add(function(m,n){if(m.hasUndo()){return h.onChange.dispatch(h,n,m)}});j.add(function(m,n){return h.onUndo.dispatch(h,n,m)});f.add(function(m,n){return h.onRedo.dispatch(h,n,m)});h.onInit.add(function(){l.add()});h.onBeforeExecCommand.add(function(m,p,o,q,n){if(p!="Undo"&&p!="Redo"&&p!="mceRepaint"&&(!n||!n.skip_undo)){l.beforeChange()}});h.onExecCommand.add(function(m,p,o,q,n){if(p!="Undo"&&p!="Redo"&&p!="mceRepaint"&&(!n||!n.skip_undo)){l.add()}});h.onSaveContent.add(d);h.dom.bind(h.dom.getRoot(),"dragend",d);h.dom.bind(h.getDoc(),b.isGecko?"blur":"focusout",function(m){if(!h.removed&&l.typing){d()}});h.onKeyUp.add(function(m,o){var n=o.keyCode;if((n>=33&&n<=36)||(n>=37&&n<=40)||n==45||n==13||o.ctrlKey){d()}});h.onKeyDown.add(function(m,o){var n=o.keyCode;if((n>=33&&n<=36)||(n>=37&&n<=40)||n==45){if(l.typing){d()}return}if((n<16||n>20)&&n!=224&&n!=91&&!l.typing){l.beforeChange();l.typing=true;l.add()}});h.onMouseDown.add(function(m,n){if(l.typing){d()}});h.addShortcut("ctrl+z","undo_desc","Undo");h.addShortcut("ctrl+y","redo_desc","Redo");l={data:e,typing:false,onBeforeAdd:onBeforeAdd,onAdd:k,onUndo:j,onRedo:f,beforeChange:function(){g=h.selection.getBookmark(2,true)},add:function(p){var m,n=h.settings,o;p=p||{};p.content=c();l.onBeforeAdd.dispatch(l,p);o=e[i];if(o&&o.content==p.content){return null}if(e[i]){e[i].beforeBookmark=g}if(n.custom_undo_redo_levels){if(e.length>n.custom_undo_redo_levels){for(m=0;m<e.length-1;m++){e[m]=e[m+1]}e.length--;i=e.length}}p.bookmark=h.selection.getBookmark(2,true);if(i<e.length-1){e.length=i+1}e.push(p);i=e.length-1;l.onAdd.dispatch(l,p);h.isNotDirty=0;return p},undo:function(){var n,m;if(l.typing){l.add();l.typing=false}if(i>0){n=e[--i];h.setContent(n.content,{format:"raw"});h.selection.moveToBookmark(n.beforeBookmark);l.onUndo.dispatch(l,n)}return n},redo:function(){var m;if(i<e.length-1){m=e[++i];h.setContent(m.content,{format:"raw"});h.selection.moveToBookmark(m.bookmark);l.onRedo.dispatch(l,m)}return m},clear:function(){e=[];i=0;l.typing=false},hasUndo:function(){return i>0||this.typing},hasRedo:function(){return i<e.length-1&&!this.typing}};return l}})(tinymce);tinymce.ForceBlocks=function(c){var b=c.settings,e=c.dom,a=c.selection,d=c.schema.getBlockElements();function f(){var j=a.getStart(),h=c.getBody(),g,k,o,s,q,i,l,m=-16777215,p,r;if(!j||j.nodeType!==1||!b.forced_root_block){return}while(j&&j!=h){if(d[j.nodeName]){return}j=j.parentNode}g=a.getRng();if(g.setStart){k=g.startContainer;o=g.startOffset;s=g.endContainer;q=g.endOffset}else{if(g.item){j=g.item(0);g=c.getDoc().body.createTextRange();g.moveToElementText(j)}r=g.parentElement().ownerDocument===c.getDoc();tmpRng=g.duplicate();tmpRng.collapse(true);o=tmpRng.move("character",m)*-1;if(!tmpRng.collapsed){tmpRng=g.duplicate();tmpRng.collapse(false);q=(tmpRng.move("character",m)*-1)-o}}j=h.firstChild;while(j){if(j.nodeType===3||(j.nodeType==1&&!d[j.nodeName])){if(!i){i=e.create(b.forced_root_block);j.parentNode.insertBefore(i,j);p=true}l=j;j=j.nextSibling;i.appendChild(l)}else{i=null;j=j.nextSibling}}if(p){if(g.setStart){g.setStart(k,o);g.setEnd(s,q);a.setRng(g)}else{if(r){try{g=c.getDoc().body.createTextRange();g.moveToElementText(h);g.collapse(true);g.moveStart("character",o);if(q>0){g.moveEnd("character",q)}g.select()}catch(n){}}}c.nodeChanged()}}if(b.forced_root_block){c.onKeyUp.add(f);c.onNodeChange.add(f)}};(function(c){var b=c.DOM,a=c.dom.Event,d=c.each,e=c.extend;c.create("tinymce.ControlManager",{ControlManager:function(f,j){var h=this,g;j=j||{};h.editor=f;h.controls={};h.onAdd=new c.util.Dispatcher(h);h.onPostRender=new c.util.Dispatcher(h);h.prefix=j.prefix||f.id+"_";h._cls={};h.onPostRender.add(function(){d(h.controls,function(i){i.postRender()})})},get:function(f){return this.controls[this.prefix+f]||this.controls[f]},setActive:function(h,f){var g=null;if(g=this.get(h)){g.setActive(f)}return g},setDisabled:function(h,f){var g=null;if(g=this.get(h)){g.setDisabled(f)}return g},add:function(g){var f=this;if(g){f.controls[g.id]=g;f.onAdd.dispatch(g,f)}return g},createControl:function(j){var o,k,g,h=this,m=h.editor,n,f;if(!h.controlFactories){h.controlFactories=[];d(m.plugins,function(i){if(i.createControl){h.controlFactories.push(i)}})}n=h.controlFactories;for(k=0,g=n.length;k<g;k++){o=n[k].createControl(j,h);if(o){return h.add(o)}}if(j==="|"||j==="separator"){return h.createSeparator()}if(m.buttons&&(o=m.buttons[j])){return h.createButton(j,o)}return h.add(o)},createDropMenu:function(f,n,h){var m=this,i=m.editor,j,g,k,l;n=e({"class":"mceDropDown",constrain:i.settings.constrain_menus},n);n["class"]=n["class"]+" "+i.getParam("skin")+"Skin";if(k=i.getParam("skin_variant")){n["class"]+=" "+i.getParam("skin")+"Skin"+k.substring(0,1).toUpperCase()+k.substring(1)}n["class"]+=i.settings.directionality=="rtl"?" mceRtl":"";f=m.prefix+f;l=h||m._cls.dropmenu||c.ui.DropMenu;j=m.controls[f]=new l(f,n);j.onAddItem.add(function(r,q){var p=q.settings;p.title=i.getLang(p.title,p.title);if(!p.onclick){p.onclick=function(o){if(p.cmd){i.execCommand(p.cmd,p.ui||false,p.value)}}}});i.onRemove.add(function(){j.destroy()});if(c.isIE){j.onShowMenu.add(function(){i.focus();g=i.selection.getBookmark(1)});j.onHideMenu.add(function(){if(g){i.selection.moveToBookmark(g);g=0}})}return m.add(j)},createListBox:function(f,n,h){var l=this,j=l.editor,i,k,m;if(l.get(f)){return null}n.title=j.translate(n.title);n.scope=n.scope||j;if(!n.onselect){n.onselect=function(o){j.execCommand(n.cmd,n.ui||false,o||n.value)}}n=e({title:n.title,"class":"mce_"+f,scope:n.scope,control_manager:l},n);f=l.prefix+f;function g(o){return o.settings.use_accessible_selects&&!c.isGecko}if(j.settings.use_native_selects||g(j)){k=new c.ui.NativeListBox(f,n)}else{m=h||l._cls.listbox||c.ui.ListBox;k=new m(f,n,j)}l.controls[f]=k;if(c.isWebKit){k.onPostRender.add(function(p,o){a.add(o,"mousedown",function(){j.bookmark=j.selection.getBookmark(1)});a.add(o,"focus",function(){j.selection.moveToBookmark(j.bookmark);j.bookmark=null})})}if(k.hideMenu){j.onMouseDown.add(k.hideMenu,k)}return l.add(k)},createButton:function(m,i,l){var h=this,g=h.editor,j,k,f;if(h.get(m)){return null}i.title=g.translate(i.title);i.label=g.translate(i.label);i.scope=i.scope||g;if(!i.onclick&&!i.menu_button){i.onclick=function(){g.execCommand(i.cmd,i.ui||false,i.value)}}i=e({title:i.title,"class":"mce_"+m,unavailable_prefix:g.getLang("unavailable",""),scope:i.scope,control_manager:h},i);m=h.prefix+m;if(i.menu_button){f=l||h._cls.menubutton||c.ui.MenuButton;k=new f(m,i,g);g.onMouseDown.add(k.hideMenu,k)}else{f=h._cls.button||c.ui.Button;k=new f(m,i,g)}return h.add(k)},createMenuButton:function(h,f,g){f=f||{};f.menu_button=1;return this.createButton(h,f,g)},createSplitButton:function(m,i,l){var h=this,g=h.editor,j,k,f;if(h.get(m)){return null}i.title=g.translate(i.title);i.scope=i.scope||g;if(!i.onclick){i.onclick=function(n){g.execCommand(i.cmd,i.ui||false,n||i.value)}}if(!i.onselect){i.onselect=function(n){g.execCommand(i.cmd,i.ui||false,n||i.value)}}i=e({title:i.title,"class":"mce_"+m,scope:i.scope,control_manager:h},i);m=h.prefix+m;f=l||h._cls.splitbutton||c.ui.SplitButton;k=h.add(new f(m,i,g));g.onMouseDown.add(k.hideMenu,k);return k},createColorSplitButton:function(f,n,h){var l=this,j=l.editor,i,k,m,g;if(l.get(f)){return null}n.title=j.translate(n.title);n.scope=n.scope||j;if(!n.onclick){n.onclick=function(o){if(c.isIE){g=j.selection.getBookmark(1)}j.execCommand(n.cmd,n.ui||false,o||n.value)}}if(!n.onselect){n.onselect=function(o){j.execCommand(n.cmd,n.ui||false,o||n.value)}}n=e({title:n.title,"class":"mce_"+f,menu_class:j.getParam("skin")+"Skin",scope:n.scope,more_colors_title:j.getLang("more_colors")},n);f=l.prefix+f;m=h||l._cls.colorsplitbutton||c.ui.ColorSplitButton;k=new m(f,n,j);j.onMouseDown.add(k.hideMenu,k);j.onRemove.add(function(){k.destroy()});if(c.isIE){k.onShowMenu.add(function(){j.focus();g=j.selection.getBookmark(1)});k.onHideMenu.add(function(){if(g){j.selection.moveToBookmark(g);g=0}})}return l.add(k)},createToolbar:function(k,h,j){var i,g=this,f;k=g.prefix+k;f=j||g._cls.toolbar||c.ui.Toolbar;i=new f(k,h,g.editor);if(g.get(k)){return null}return g.add(i)},createToolbarGroup:function(k,h,j){var i,g=this,f;k=g.prefix+k;f=j||this._cls.toolbarGroup||c.ui.ToolbarGroup;i=new f(k,h,g.editor);if(g.get(k)){return null}return g.add(i)},createSeparator:function(g){var f=g||this._cls.separator||c.ui.Separator;return new f()},setControlType:function(g,f){return this._cls[g.toLowerCase()]=f},destroy:function(){d(this.controls,function(f){f.destroy()});this.controls=null}})})(tinymce);(function(d){var a=d.util.Dispatcher,e=d.each,c=d.isIE,b=d.isOpera;d.create("tinymce.WindowManager",{WindowManager:function(f){var g=this;g.editor=f;g.onOpen=new a(g);g.onClose=new a(g);g.params={};g.features={}},open:function(z,h){var v=this,k="",n,m,i=v.editor.settings.dialog_type=="modal",q,o,j,g=d.DOM.getViewPort(),r;z=z||{};h=h||{};o=b?g.w:screen.width;j=b?g.h:screen.height;z.name=z.name||"mc_"+new Date().getTime();z.width=parseInt(z.width||320);z.height=parseInt(z.height||240);z.resizable=true;z.left=z.left||parseInt(o/2)-(z.width/2);z.top=z.top||parseInt(j/2)-(z.height/2);h.inline=false;h.mce_width=z.width;h.mce_height=z.height;h.mce_auto_focus=z.auto_focus;if(i){if(c){z.center=true;z.help=false;z.dialogWidth=z.width+"px";z.dialogHeight=z.height+"px";z.scroll=z.scrollbars||false}}e(z,function(p,f){if(d.is(p,"boolean")){p=p?"yes":"no"}if(!/^(name|url)$/.test(f)){if(c&&i){k+=(k?";":"")+f+":"+p}else{k+=(k?",":"")+f+"="+p}}});v.features=z;v.params=h;v.onOpen.dispatch(v,z,h);r=z.url||z.file;r=d._addVer(r);try{if(c&&i){q=1;window.showModalDialog(r,window,k)}else{q=window.open(r,z.name,k)}}catch(l){}if(!q){alert(v.editor.getLang("popup_blocked"))}},close:function(f){f.close();this.onClose.dispatch(this)},createInstance:function(i,h,g,m,l,k){var j=d.resolve(i);return new j(h,g,m,l,k)},confirm:function(h,f,i,g){g=g||window;f.call(i||this,g.confirm(this._decode(this.editor.getLang(h,h))))},alert:function(h,f,j,g){var i=this;g=g||window;g.alert(i._decode(i.editor.getLang(h,h)));if(f){f.call(j||i)}},resizeBy:function(f,g,h){h.resizeBy(f,g)},_decode:function(f){return d.DOM.decode(f).replace(/\\n/g,"\n")}})}(tinymce));(function(a){a.Formatter=function(aa){var Q={},T=a.each,c=aa.dom,r=aa.selection,t=a.dom.TreeWalker,N=new a.dom.RangeUtils(c),d=aa.schema.isValidChild,H=c.isBlock,m=aa.settings.forced_root_block,s=c.nodeIndex,G=a.isGecko?"\u200B":"\uFEFF",e=/^(src|href|style)$/,X=false,C=true,P,D,x=c.getContentEditable;function A(ab){return ab instanceof Array}function n(ac,ab){return c.getParents(ac,ab,c.getRoot())}function b(ab){return ab.nodeType===1&&ab.id==="_mce_caret"}function j(){l({alignleft:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"left"},defaultBlock:"div"},{selector:"img,table",collapsed:false,styles:{"float":"left"}}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"center"},defaultBlock:"div"},{selector:"img",collapsed:false,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:false,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"right"},defaultBlock:"div"},{selector:"img,table",collapsed:false,styles:{"float":"right"}}],alignfull:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"justify"},defaultBlock:"div"}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:true},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:true},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},wrap_links:false},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},wrap_links:false},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},link:{inline:"a",selector:"a",remove:"all",split:true,deep:true,onmatch:function(ab){return true},onformat:function(ad,ab,ac){T(ac,function(af,ae){c.setAttrib(ad,ae,af)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike",remove:"all",split:true,expand:false,block_expand:true,deep:true},{selector:"span",attributes:["style","class"],remove:"empty",split:true,expand:false,deep:true},{selector:"*",attributes:["style","class"],split:false,expand:false,deep:true}]});T("p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp".split(/\s/),function(ab){l(ab,{block:ab,remove:"all"})});l(aa.settings.formats)}function W(){aa.addShortcut("ctrl+b","bold_desc","Bold");aa.addShortcut("ctrl+i","italic_desc","Italic");aa.addShortcut("ctrl+u","underline_desc","Underline");for(var ab=1;ab<=6;ab++){aa.addShortcut("ctrl+"+ab,"",["FormatBlock",false,"h"+ab])}aa.addShortcut("ctrl+7","",["FormatBlock",false,"p"]);aa.addShortcut("ctrl+8","",["FormatBlock",false,"div"]);aa.addShortcut("ctrl+9","",["FormatBlock",false,"address"])}function V(ab){return ab?Q[ab]:Q}function l(ab,ac){if(ab){if(typeof(ab)!=="string"){T(ab,function(ae,ad){l(ad,ae)})}else{ac=ac.length?ac:[ac];T(ac,function(ad){if(ad.deep===D){ad.deep=!ad.selector}if(ad.split===D){ad.split=!ad.selector||ad.inline}if(ad.remove===D&&ad.selector&&!ad.inline){ad.remove="none"}if(ad.selector&&ad.inline){ad.mixed=true;ad.block_expand=true}if(typeof(ad.classes)==="string"){ad.classes=ad.classes.split(/\s+/)}});Q[ab]=ac}}}var i=function(ac){var ab;aa.dom.getParent(ac,function(ad){ab=aa.dom.getStyle(ad,"text-decoration");return ab&&ab!=="none"});return ab};var L=function(ab){var ac;if(ab.nodeType===1&&ab.parentNode&&ab.parentNode.nodeType===1){ac=i(ab.parentNode);if(aa.dom.getStyle(ab,"color")&&ac){aa.dom.setStyle(ab,"text-decoration",ac)}else{if(aa.dom.getStyle(ab,"textdecoration")===ac){aa.dom.setStyle(ab,"text-decoration",null)}}}};function Y(ae,al,ag){var ah=V(ae),am=ah[0],ak,ac,aj,ai=r.isCollapsed();function ab(aq,ap){ap=ap||am;if(aq){if(ap.onformat){ap.onformat(aq,ap,al,ag)}T(ap.styles,function(at,ar){c.setStyle(aq,ar,q(at,al))});T(ap.attributes,function(at,ar){c.setAttrib(aq,ar,q(at,al))});T(ap.classes,function(ar){ar=q(ar,al);if(!c.hasClass(aq,ar)){c.addClass(aq,ar)}})}}function af(){function ar(ay,aw){var ax=new t(aw);for(ag=ax.current();ag;ag=ax.prev()){if(ag.childNodes.length>1||ag==ay||ag.tagName=="BR"){return ag}}}var aq=aa.selection.getRng();var av=aq.startContainer;var ap=aq.endContainer;if(av!=ap&&aq.endOffset===0){var au=ar(av,ap);var at=au.nodeType==3?au.length:au.childNodes.length;aq.setEnd(au,at)}return aq}function ad(at,ay,aw,av,aq){var ap=[],ar=-1,ax,aA=-1,au=-1,az;T(at.childNodes,function(aC,aB){if(aC.nodeName==="UL"||aC.nodeName==="OL"){ar=aB;ax=aC;return false}});T(at.childNodes,function(aC,aB){if(aC.nodeName==="SPAN"&&c.getAttrib(aC,"data-mce-type")=="bookmark"){if(aC.id==ay.id+"_start"){aA=aB}else{if(aC.id==ay.id+"_end"){au=aB}}}});if(ar<=0||(aA<ar&&au>ar)){T(a.grep(at.childNodes),aq);return 0}else{az=c.clone(aw,X);T(a.grep(at.childNodes),function(aC,aB){if((aA<ar&&aB<ar)||(aA>ar&&aB>ar)){ap.push(aC);aC.parentNode.removeChild(aC)}});if(aA<ar){at.insertBefore(az,ax)}else{if(aA>ar){at.insertBefore(az,ax.nextSibling)}}av.push(az);T(ap,function(aB){az.appendChild(aB)});return az}}function an(aq,at,aw){var ap=[],av,ar,au=true;av=am.inline||am.block;ar=c.create(av);ab(ar);N.walk(aq,function(ax){var ay;function az(aA){var aF,aD,aB,aC,aE;aE=au;aF=aA.nodeName.toLowerCase();aD=aA.parentNode.nodeName.toLowerCase();if(aA.nodeType===1&&x(aA)){aE=au;au=x(aA)==="true";aC=true}if(g(aF,"br")){ay=0;if(am.block){c.remove(aA)}return}if(am.wrapper&&y(aA,ae,al)){ay=0;return}if(au&&!aC&&am.block&&!am.wrapper&&I(aF)){aA=c.rename(aA,av);ab(aA);ap.push(aA);ay=0;return}if(am.selector){T(ah,function(aG){if("collapsed" in aG&&aG.collapsed!==ai){return}if(c.is(aA,aG.selector)&&!b(aA)){ab(aA,aG);aB=true}});if(!am.inline||aB){ay=0;return}}if(au&&!aC&&d(av,aF)&&d(aD,av)&&!(!aw&&aA.nodeType===3&&aA.nodeValue.length===1&&aA.nodeValue.charCodeAt(0)===65279)&&!b(aA)){if(!ay){ay=c.clone(ar,X);aA.parentNode.insertBefore(ay,aA);ap.push(ay)}ay.appendChild(aA)}else{if(aF=="li"&&at){ay=ad(aA,at,ar,ap,az)}else{ay=0;T(a.grep(aA.childNodes),az);if(aC){au=aE}ay=0}}}T(ax,az)});if(am.wrap_links===false){T(ap,function(ax){function ay(aC){var aB,aA,az;if(aC.nodeName==="A"){aA=c.clone(ar,X);ap.push(aA);az=a.grep(aC.childNodes);for(aB=0;aB<az.length;aB++){aA.appendChild(az[aB])}aC.appendChild(aA)}T(a.grep(aC.childNodes),ay)}ay(ax)})}T(ap,function(az){var ax;function aA(aC){var aB=0;T(aC.childNodes,function(aD){if(!f(aD)&&!K(aD)){aB++}});return aB}function ay(aB){var aD,aC;T(aB.childNodes,function(aE){if(aE.nodeType==1&&!K(aE)&&!b(aE)){aD=aE;return X}});if(aD&&h(aD,am)){aC=c.clone(aD,X);ab(aC);c.replace(aC,aB,C);c.remove(aD,1)}return aC||aB}ax=aA(az);if((ap.length>1||!H(az))&&ax===0){c.remove(az,1);return}if(am.inline||am.wrapper){if(!am.exact&&ax===1){az=ay(az)}T(ah,function(aB){T(c.select(aB.inline,az),function(aD){var aC;if(aB.wrap_links===false){aC=aD.parentNode;do{if(aC.nodeName==="A"){return}}while(aC=aC.parentNode)}Z(aB,al,aD,aB.exact?aD:null)})});if(y(az.parentNode,ae,al)){c.remove(az,1);az=0;return C}if(am.merge_with_parents){c.getParent(az.parentNode,function(aB){if(y(aB,ae,al)){c.remove(az,1);az=0;return C}})}if(az&&am.merge_siblings!==false){az=u(E(az),az);az=u(az,E(az,C))}}})}if(am){if(ag){if(ag.nodeType){ac=c.createRng();ac.setStartBefore(ag);ac.setEndAfter(ag);an(p(ac,ah),null,true)}else{an(ag,null,true)}}else{if(!ai||!am.inline||c.select("td.mceSelected,th.mceSelected").length){var ao=aa.selection.getNode();if(!m&&ah[0].defaultBlock&&!c.getParent(ao,c.isBlock)){Y(ah[0].defaultBlock)}aa.selection.setRng(af());ak=r.getBookmark();an(p(r.getRng(C),ah),ak);if(am.styles&&(am.styles.color||am.styles.textDecoration)){a.walk(ao,L,"childNodes");L(ao)}r.moveToBookmark(ak);R(r.getRng(C));aa.nodeChanged()}else{U("apply",ae,al)}}}}function B(ad,am,af){var ag=V(ad),ao=ag[0],ak,aj,ac,al=true;function ae(av){var au,at,ar,aq,ax,aw;if(av.nodeType===1&&x(av)){ax=al;al=x(av)==="true";aw=true}au=a.grep(av.childNodes);if(al&&!aw){for(at=0,ar=ag.length;at<ar;at++){if(Z(ag[at],am,av,av)){break}}}if(ao.deep){if(au.length){for(at=0,ar=au.length;at<ar;at++){ae(au[at])}if(aw){al=ax}}}}function ah(aq){var ar;T(n(aq.parentNode).reverse(),function(at){var au;if(!ar&&at.id!="_start"&&at.id!="_end"){au=y(at,ad,am);if(au&&au.split!==false){ar=at}}});return ar}function ab(au,aq,aw,az){var aA,ay,ax,at,av,ar;if(au){ar=au.parentNode;for(aA=aq.parentNode;aA&&aA!=ar;aA=aA.parentNode){ay=c.clone(aA,X);for(av=0;av<ag.length;av++){if(Z(ag[av],am,ay,ay)){ay=0;break}}if(ay){if(ax){ay.appendChild(ax)}if(!at){at=ay}ax=ay}}if(az&&(!ao.mixed||!H(au))){aq=c.split(au,aq)}if(ax){aw.parentNode.insertBefore(ax,aw);at.appendChild(aw)}}return aq}function an(aq){return ab(ah(aq),aq,aq,true)}function ai(at){var ar=c.get(at?"_start":"_end"),aq=ar[at?"firstChild":"lastChild"];if(K(aq)){aq=aq[at?"firstChild":"lastChild"]}c.remove(ar,true);return aq}function ap(aq){var at,au,ar;aq=p(aq,ag,C);if(ao.split){at=M(aq,C);au=M(aq);if(at!=au){if(/^(TR|TD)$/.test(at.nodeName)&&at.firstChild){at=(at.nodeName=="TD"?at.firstChild:at.firstChild.firstChild)||at}at=S(at,"span",{id:"_start","data-mce-type":"bookmark"});au=S(au,"span",{id:"_end","data-mce-type":"bookmark"});an(at);an(au);at=ai(C);au=ai()}else{at=au=an(at)}aq.startContainer=at.parentNode;aq.startOffset=s(at);aq.endContainer=au.parentNode;aq.endOffset=s(au)+1}N.walk(aq,function(av){T(av,function(aw){ae(aw);if(aw.nodeType===1&&aa.dom.getStyle(aw,"text-decoration")==="underline"&&aw.parentNode&&i(aw.parentNode)==="underline"){Z({deep:false,exact:true,inline:"span",styles:{textDecoration:"underline"}},null,aw)}})})}if(af){if(af.nodeType){ac=c.createRng();ac.setStartBefore(af);ac.setEndAfter(af);ap(ac)}else{ap(af)}return}if(!r.isCollapsed()||!ao.inline||c.select("td.mceSelected,th.mceSelected").length){ak=r.getBookmark();ap(r.getRng(C));r.moveToBookmark(ak);if(ao.inline&&k(ad,am,r.getStart())){R(r.getRng(true))}aa.nodeChanged()}else{U("remove",ad,am)}}function F(ac,ae,ad){var ab=V(ac);if(k(ac,ae,ad)&&(!("toggle" in ab[0])||ab[0].toggle)){B(ac,ae,ad)}else{Y(ac,ae,ad)}}function y(ac,ab,ah,af){var ad=V(ab),ai,ag,ae;function aj(an,ap,aq){var am,ao,ak=ap[aq],al;if(ap.onmatch){return ap.onmatch(an,ap,aq)}if(ak){if(ak.length===D){for(am in ak){if(ak.hasOwnProperty(am)){if(aq==="attributes"){ao=c.getAttrib(an,am)}else{ao=O(an,am)}if(af&&!ao&&!ap.exact){return}if((!af||ap.exact)&&!g(ao,q(ak[am],ah))){return}}}}else{for(al=0;al<ak.length;al++){if(aq==="attributes"?c.getAttrib(an,ak[al]):O(an,ak[al])){return ap}}}}return ap}if(ad&&ac){for(ag=0;ag<ad.length;ag++){ai=ad[ag];if(h(ac,ai)&&aj(ac,ai,"attributes")&&aj(ac,ai,"styles")){if(ae=ai.classes){for(ag=0;ag<ae.length;ag++){if(!c.hasClass(ac,ae[ag])){return}}}return ai}}}}function k(ad,af,ae){var ac;function ab(ag){ag=c.getParent(ag,function(ah){return !!y(ah,ad,af,true)});return y(ag,ad,af)}if(ae){return ab(ae)}ae=r.getNode();if(ab(ae)){return C}ac=r.getStart();if(ac!=ae){if(ab(ac)){return C}}return X}function v(ai,ah){var af,ag=[],ae={},ad,ac,ab;af=r.getStart();c.getParent(af,function(al){var ak,aj;for(ak=0;ak<ai.length;ak++){aj=ai[ak];if(!ae[aj]&&y(al,aj,ah)){ae[aj]=true;ag.push(aj)}}},c.getRoot());return ag}function z(af){var ah=V(af),ae,ad,ag,ac,ab;if(ah){ae=r.getStart();ad=n(ae);for(ac=ah.length-1;ac>=0;ac--){ab=ah[ac].selector;if(!ab){return C}for(ag=ad.length-1;ag>=0;ag--){if(c.is(ad[ag],ab)){return C}}}}return X}function J(ab,ad){var ac;if(!P){P={};ac={};aa.onNodeChange.addToTop(function(af,ae,ah){var ag=n(ah),ai={};T(P,function(aj,ak){T(ag,function(al){if(y(al,ak,{},true)){if(!ac[ak]){T(aj,function(am){am(true,{node:al,format:ak,parents:ag})});ac[ak]=aj}ai[ak]=aj;return false}})});T(ac,function(aj,ak){if(!ai[ak]){delete ac[ak];T(aj,function(al){al(false,{node:ah,format:ak,parents:ag})})}})})}T(ab.split(","),function(ae){if(!P[ae]){P[ae]=[]}P[ae].push(ad)});return this}a.extend(this,{get:V,register:l,apply:Y,remove:B,toggle:F,match:k,matchAll:v,matchNode:y,canApply:z,formatChanged:J});j();W();function h(ab,ac){if(g(ab,ac.inline)){return C}if(g(ab,ac.block)){return C}if(ac.selector){return c.is(ab,ac.selector)}}function g(ac,ab){ac=ac||"";ab=ab||"";ac=""+(ac.nodeName||ac);ab=""+(ab.nodeName||ab);return ac.toLowerCase()==ab.toLowerCase()}function O(ac,ab){var ad=c.getStyle(ac,ab);if(ab=="color"||ab=="backgroundColor"){ad=c.toHex(ad)}if(ab=="fontWeight"&&ad==700){ad="bold"}return""+ad}function q(ab,ac){if(typeof(ab)!="string"){ab=ab(ac)}else{if(ac){ab=ab.replace(/%(\w+)/g,function(ae,ad){return ac[ad]||ae})}}return ab}function f(ab){return ab&&ab.nodeType===3&&/^([\t \r\n]+|)$/.test(ab.nodeValue)}function S(ad,ac,ab){var ae=c.create(ac,ab);ad.parentNode.insertBefore(ae,ad);ae.appendChild(ad);return ae}function p(ab,am,ae){var ap,an,ah,al,ad=ab.startContainer,ai=ab.startOffset,ar=ab.endContainer,ak=ab.endOffset;function ao(az){var au,ax,ay,aw,av,at;au=ax=az?ad:ar;av=az?"previousSibling":"nextSibling";at=c.getRoot();if(au.nodeType==3&&!f(au)){if(az?ai>0:ak<au.nodeValue.length){return au}}for(;;){if(!am[0].block_expand&&H(ax)){return ax}for(aw=ax[av];aw;aw=aw[av]){if(!K(aw)&&!f(aw)){return ax}}if(ax.parentNode==at){au=ax;break}ax=ax.parentNode}return au}function ag(at,au){if(au===D){au=at.nodeType===3?at.length:at.childNodes.length}while(at&&at.hasChildNodes()){at=at.childNodes[au];if(at){au=at.nodeType===3?at.length:at.childNodes.length}}return{node:at,offset:au}}if(ad.nodeType==1&&ad.hasChildNodes()){an=ad.childNodes.length-1;ad=ad.childNodes[ai>an?an:ai];if(ad.nodeType==3){ai=0}}if(ar.nodeType==1&&ar.hasChildNodes()){an=ar.childNodes.length-1;ar=ar.childNodes[ak>an?an:ak-1];if(ar.nodeType==3){ak=ar.nodeValue.length}}function aq(au){var at=au;while(at){if(at.nodeType===1&&x(at)){return x(at)==="false"?at:au}at=at.parentNode}return au}function aj(au,ay,aA){var ax,av,az,at;function aw(aC,aE){var aF,aB,aD=aC.nodeValue;if(typeof(aE)=="undefined"){aE=aA?aD.length:0}if(aA){aF=aD.lastIndexOf(" ",aE);aB=aD.lastIndexOf("\u00a0",aE);aF=aF>aB?aF:aB;if(aF!==-1&&!ae){aF++}}else{aF=aD.indexOf(" ",aE);aB=aD.indexOf("\u00a0",aE);aF=aF!==-1&&(aB===-1||aF<aB)?aF:aB}return aF}if(au.nodeType===3){az=aw(au,ay);if(az!==-1){return{container:au,offset:az}}at=au}ax=new t(au,c.getParent(au,H)||aa.getBody());while(av=ax[aA?"prev":"next"]()){if(av.nodeType===3){at=av;az=aw(av);if(az!==-1){return{container:av,offset:az}}}else{if(H(av)){break}}}if(at){if(aA){ay=0}else{ay=at.length}return{container:at,offset:ay}}}function af(au,at){var av,aw,ay,ax;if(au.nodeType==3&&au.nodeValue.length===0&&au[at]){au=au[at]}av=n(au);for(aw=0;aw<av.length;aw++){for(ay=0;ay<am.length;ay++){ax=am[ay];if("collapsed" in ax&&ax.collapsed!==ab.collapsed){continue}if(c.is(av[aw],ax.selector)){return av[aw]}}}return au}function ac(au,at,aw){var av;if(!am[0].wrapper){av=c.getParent(au,am[0].block)}if(!av){av=c.getParent(au.nodeType==3?au.parentNode:au,H)}if(av&&am[0].wrapper){av=n(av,"ul,ol").reverse()[0]||av}if(!av){av=au;while(av[at]&&!H(av[at])){av=av[at];if(g(av,"br")){break}}}return av||au}ad=aq(ad);ar=aq(ar);if(K(ad.parentNode)||K(ad)){ad=K(ad)?ad:ad.parentNode;ad=ad.nextSibling||ad;if(ad.nodeType==3){ai=0}}if(K(ar.parentNode)||K(ar)){ar=K(ar)?ar:ar.parentNode;ar=ar.previousSibling||ar;if(ar.nodeType==3){ak=ar.length}}if(am[0].inline){if(ab.collapsed){al=aj(ad,ai,true);if(al){ad=al.container;ai=al.offset}al=aj(ar,ak);if(al){ar=al.container;ak=al.offset}}ah=ag(ar,ak);if(ah.node){while(ah.node&&ah.offset===0&&ah.node.previousSibling){ah=ag(ah.node.previousSibling)}if(ah.node&&ah.offset>0&&ah.node.nodeType===3&&ah.node.nodeValue.charAt(ah.offset-1)===" "){if(ah.offset>1){ar=ah.node;ar.splitText(ah.offset-1)}}}}if(am[0].inline||am[0].block_expand){if(!am[0].inline||(ad.nodeType!=3||ai===0)){ad=ao(true)}if(!am[0].inline||(ar.nodeType!=3||ak===ar.nodeValue.length)){ar=ao()}}if(am[0].selector&&am[0].expand!==X&&!am[0].inline){ad=af(ad,"previousSibling");ar=af(ar,"nextSibling")}if(am[0].block||am[0].selector){ad=ac(ad,"previousSibling");ar=ac(ar,"nextSibling");if(am[0].block){if(!H(ad)){ad=ao(true)}if(!H(ar)){ar=ao()}}}if(ad.nodeType==1){ai=s(ad);ad=ad.parentNode}if(ar.nodeType==1){ak=s(ar)+1;ar=ar.parentNode}return{startContainer:ad,startOffset:ai,endContainer:ar,endOffset:ak}}function Z(ah,ag,ae,ab){var ad,ac,af;if(!h(ae,ah)){return X}if(ah.remove!="all"){T(ah.styles,function(aj,ai){aj=q(aj,ag);if(typeof(ai)==="number"){ai=aj;ab=0}if(!ab||g(O(ab,ai),aj)){c.setStyle(ae,ai,"")}af=1});if(af&&c.getAttrib(ae,"style")==""){ae.removeAttribute("style");ae.removeAttribute("data-mce-style")}T(ah.attributes,function(ak,ai){var aj;ak=q(ak,ag);if(typeof(ai)==="number"){ai=ak;ab=0}if(!ab||g(c.getAttrib(ab,ai),ak)){if(ai=="class"){ak=c.getAttrib(ae,ai);if(ak){aj="";T(ak.split(/\s+/),function(al){if(/mce\w+/.test(al)){aj+=(aj?" ":"")+al}});if(aj){c.setAttrib(ae,ai,aj);return}}}if(ai=="class"){ae.removeAttribute("className")}if(e.test(ai)){ae.removeAttribute("data-mce-"+ai)}ae.removeAttribute(ai)}});T(ah.classes,function(ai){ai=q(ai,ag);if(!ab||c.hasClass(ab,ai)){c.removeClass(ae,ai)}});ac=c.getAttribs(ae);for(ad=0;ad<ac.length;ad++){if(ac[ad].nodeName.indexOf("_")!==0){return X}}}if(ah.remove!="none"){o(ae,ah);return C}}function o(ad,ae){var ab=ad.parentNode,ac;function af(ah,ag,ai){ah=E(ah,ag,ai);return !ah||(ah.nodeName=="BR"||H(ah))}if(ae.block){if(!m){if(H(ad)&&!H(ab)){if(!af(ad,X)&&!af(ad.firstChild,C,1)){ad.insertBefore(c.create("br"),ad.firstChild)}if(!af(ad,C)&&!af(ad.lastChild,X,1)){ad.appendChild(c.create("br"))}}}else{if(ab==c.getRoot()){if(!ae.list_block||!g(ad,ae.list_block)){T(a.grep(ad.childNodes),function(ag){if(d(m,ag.nodeName.toLowerCase())){if(!ac){ac=S(ag,m)}else{ac.appendChild(ag)}}else{ac=0}})}}}}if(ae.selector&&ae.inline&&!g(ae.inline,ad)){return}c.remove(ad,1)}function E(ac,ab,ad){if(ac){ab=ab?"nextSibling":"previousSibling";for(ac=ad?ac:ac[ab];ac;ac=ac[ab]){if(ac.nodeType==1||!f(ac)){return ac}}}}function K(ab){return ab&&ab.nodeType==1&&ab.getAttribute("data-mce-type")=="bookmark"}function u(af,ae){var ab,ad,ac;function ah(ak,aj){if(ak.nodeName!=aj.nodeName){return X}function ai(am){var an={};T(c.getAttribs(am),function(ao){var ap=ao.nodeName.toLowerCase();if(ap.indexOf("_")!==0&&ap!=="style"){an[ap]=c.getAttrib(am,ap)}});return an}function al(ap,ao){var an,am;for(am in ap){if(ap.hasOwnProperty(am)){an=ao[am];if(an===D){return X}if(ap[am]!=an){return X}delete ao[am]}}for(am in ao){if(ao.hasOwnProperty(am)){return X}}return C}if(!al(ai(ak),ai(aj))){return X}if(!al(c.parseStyle(c.getAttrib(ak,"style")),c.parseStyle(c.getAttrib(aj,"style")))){return X}return C}function ag(aj,ai){for(ad=aj;ad;ad=ad[ai]){if(ad.nodeType==3&&ad.nodeValue.length!==0){return aj}if(ad.nodeType==1&&!K(ad)){return ad}}return aj}if(af&&ae){af=ag(af,"previousSibling");ae=ag(ae,"nextSibling");if(ah(af,ae)){for(ad=af.nextSibling;ad&&ad!=ae;){ac=ad;ad=ad.nextSibling;af.appendChild(ac)}c.remove(ae);T(a.grep(ae.childNodes),function(ai){af.appendChild(ai)});return af}}return ae}function I(ab){return/^(h[1-6]|p|div|pre|address|dl|dt|dd)$/.test(ab)}function M(ac,ag){var ab,af,ad,ae;ab=ac[ag?"startContainer":"endContainer"];af=ac[ag?"startOffset":"endOffset"];if(ab.nodeType==1){ad=ab.childNodes.length-1;if(!ag&&af){af--}ab=ab.childNodes[af>ad?ad:af]}if(ab.nodeType===3&&ag&&af>=ab.nodeValue.length){ab=new t(ab,aa.getBody()).next()||ab}if(ab.nodeType===3&&!ag&&af===0){ab=new t(ab,aa.getBody()).prev()||ab}return ab}function U(ak,ab,ai){var al="_mce_caret",ac=aa.settings.caret_debug;function ad(ap){var ao=c.create("span",{id:al,"data-mce-bogus":true,style:ac?"color:red":""});if(ap){ao.appendChild(aa.getDoc().createTextNode(G))}return ao}function aj(ap,ao){while(ap){if((ap.nodeType===3&&ap.nodeValue!==G)||ap.childNodes.length>1){return false}if(ao&&ap.nodeType===1){ao.push(ap)}ap=ap.firstChild}return true}function ag(ao){while(ao){if(ao.id===al){return ao}ao=ao.parentNode}}function af(ao){var ap;if(ao){ap=new t(ao,ao);for(ao=ap.current();ao;ao=ap.next()){if(ao.nodeType===3){return ao}}}}function ae(aq,ap){var ar,ao;if(!aq){aq=ag(r.getStart());if(!aq){while(aq=c.get(al)){ae(aq,false)}}}else{ao=r.getRng(true);if(aj(aq)){if(ap!==false){ao.setStartBefore(aq);ao.setEndBefore(aq)}c.remove(aq)}else{ar=af(aq);if(ar.nodeValue.charAt(0)===G){ar=ar.deleteData(0,1)}c.remove(aq,1)}r.setRng(ao)}}function ah(){var aq,ao,av,au,ar,ap,at;aq=r.getRng(true);au=aq.startOffset;ap=aq.startContainer;at=ap.nodeValue;ao=ag(r.getStart());if(ao){av=af(ao)}if(at&&au>0&&au<at.length&&/\w/.test(at.charAt(au))&&/\w/.test(at.charAt(au-1))){ar=r.getBookmark();aq.collapse(true);aq=p(aq,V(ab));aq=N.split(aq);Y(ab,ai,aq);r.moveToBookmark(ar)}else{if(!ao||av.nodeValue!==G){ao=ad(true);av=ao.firstChild;aq.insertNode(ao);au=1;Y(ab,ai,ao)}else{Y(ab,ai,ao)}r.setCursorLocation(av,au)}}function am(){var ao=r.getRng(true),ap,ar,av,au,aq,ay,ax=[],at,aw;ap=ao.startContainer;ar=ao.startOffset;aq=ap;if(ap.nodeType==3){if(ar!=ap.nodeValue.length||ap.nodeValue===G){au=true}aq=aq.parentNode}while(aq){if(y(aq,ab,ai)){ay=aq;break}if(aq.nextSibling){au=true}ax.push(aq);aq=aq.parentNode}if(!ay){return}if(au){av=r.getBookmark();ao.collapse(true);ao=p(ao,V(ab),true);ao=N.split(ao);B(ab,ai,ao);r.moveToBookmark(av)}else{aw=ad();aq=aw;for(at=ax.length-1;at>=0;at--){aq.appendChild(c.clone(ax[at],false));aq=aq.firstChild}aq.appendChild(c.doc.createTextNode(G));aq=aq.firstChild;c.insertAfter(aw,ay);r.setCursorLocation(aq,1)}}function an(){var ap,ao,aq;ao=ag(r.getStart());if(ao&&!c.isEmpty(ao)){a.walk(ao,function(ar){if(ar.nodeType==1&&ar.id!==al&&!c.isEmpty(ar)){c.setAttrib(ar,"data-mce-bogus",null)}},"childNodes")}}if(!self._hasCaretEvents){aa.onBeforeGetContent.addToTop(function(){var ao=[],ap;if(aj(ag(r.getStart()),ao)){ap=ao.length;while(ap--){c.setAttrib(ao[ap],"data-mce-bogus","1")}}});a.each("onMouseUp onKeyUp".split(" "),function(ao){aa[ao].addToTop(function(){ae();an()})});aa.onKeyDown.addToTop(function(ao,aq){var ap=aq.keyCode;if(ap==8||ap==37||ap==39){ae(ag(r.getStart()))}an()});r.onSetContent.add(an);self._hasCaretEvents=true}if(ak=="apply"){ah()}else{am()}}function R(ac){var ab=ac.startContainer,ai=ac.startOffset,ae,ah,ag,ad,af;if(ab.nodeType==3&&ai>=ab.nodeValue.length){ai=s(ab);ab=ab.parentNode;ae=true}if(ab.nodeType==1){ad=ab.childNodes;ab=ad[Math.min(ai,ad.length-1)];ah=new t(ab,c.getParent(ab,c.isBlock));if(ai>ad.length-1||ae){ah.next()}for(ag=ah.current();ag;ag=ah.next()){if(ag.nodeType==3&&!f(ag)){af=c.create("a",null,G);ag.parentNode.insertBefore(af,ag);ac.setStart(ag,0);r.setRng(ac);c.remove(af);return}}}}}})(tinymce);tinymce.onAddEditor.add(function(e,a){var d,h,g,c=a.settings;function b(j,i){e.each(i,function(l,k){if(l){g.setStyle(j,k,l)}});g.rename(j,"span")}function f(i,j){g=i.dom;if(c.convert_fonts_to_spans){e.each(g.select("font,u,strike",j.node),function(k){d[k.nodeName.toLowerCase()](a.dom,k)})}}if(c.inline_styles){h=e.explode(c.font_size_legacy_values);d={font:function(j,i){b(i,{backgroundColor:i.style.backgroundColor,color:i.color,fontFamily:i.face,fontSize:h[parseInt(i.size,10)-1]})},u:function(j,i){b(i,{textDecoration:"underline"})},strike:function(j,i){b(i,{textDecoration:"line-through"})}};a.onPreProcess.add(f);a.onSetContent.add(f);a.onInit.add(function(){a.selection.onSetContent.add(f)})}});(function(b){var a=b.dom.TreeWalker;b.EnterKey=function(f){var i=f.dom,e=f.selection,d=f.settings,h=f.undoManager,c=f.schema.getNonEmptyElements();function g(A){var v=e.getRng(true),E,j,z,u,p,L,o,k,n,t,I,x,B;function D(M){return M&&i.isBlock(M)&&!/^(TD|TH|CAPTION|FORM)$/.test(M.nodeName)&&!/^(fixed|absolute)/i.test(M.style.position)&&i.getContentEditable(M)!=="true"}function F(N){var M;if(b.isIE&&i.isBlock(N)){M=e.getRng();N.appendChild(i.create("span",null,"\u00a0"));e.select(N);N.lastChild.outerHTML="";e.setRng(M)}}function y(O){var N=O,P=[],M;while(N=N.firstChild){if(i.isBlock(N)){return}if(N.nodeType==1&&!c[N.nodeName.toLowerCase()]){P.push(N)}}M=P.length;while(M--){N=P[M];if(!N.hasChildNodes()||(N.firstChild==N.lastChild&&N.firstChild.nodeValue==="")){i.remove(N)}}}function m(N){var S,Q,M,T,R,P=N,O;M=i.createRng();if(N.hasChildNodes()){S=new a(N,N);while(Q=S.current()){if(Q.nodeType==3){M.setStart(Q,0);M.setEnd(Q,0);break}if(c[Q.nodeName.toLowerCase()]){M.setStartBefore(Q);M.setEndBefore(Q);break}P=Q;Q=S.next()}if(!Q){M.setStart(P,0);M.setEnd(P,0)}}else{if(N.nodeName=="BR"){if(N.nextSibling&&i.isBlock(N.nextSibling)){if(!L||L<9){O=i.create("br");N.parentNode.insertBefore(O,N)}M.setStartBefore(N);M.setEndBefore(N)}else{M.setStartAfter(N);M.setEndAfter(N)}}else{M.setStart(N,0);M.setEnd(N,0)}}e.setRng(M);i.remove(O);R=i.getViewPort(f.getWin());T=i.getPos(N).y;if(T<R.y||T+25>R.y+R.h){f.getWin().scrollTo(0,T<R.y?T:T-R.h+25)}}function r(N){var O=z,Q,P,M;Q=N||t=="TABLE"?i.create(N||x):p.cloneNode(false);M=Q;if(d.keep_styles!==false){do{if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(O.nodeName)){P=O.cloneNode(false);i.setAttrib(P,"id","");if(Q.hasChildNodes()){P.appendChild(Q.firstChild);Q.appendChild(P)}else{M=P;Q.appendChild(P)}}}while(O=O.parentNode)}if(!b.isIE){M.innerHTML="<br>"}return Q}function q(P){var O,N,M;if(z.nodeType==3&&(P?u>0:u<z.nodeValue.length)){return false}if(z.parentNode==p&&B&&!P){return true}if(P&&z.nodeType==1&&z==p.firstChild){return true}if(z.nodeName==="TABLE"||(z.previousSibling&&z.previousSibling.nodeName=="TABLE")){return(B&&!P)||(!B&&P)}O=new a(z,p);if(z.nodeType==3){if(P&&u==0){O.prev()}else{if(!P&&u==z.nodeValue.length){O.next()}}}while(N=O.current()){if(N.nodeType===1){if(!N.getAttribute("data-mce-bogus")){M=N.nodeName.toLowerCase();if(c[M]&&M!=="br"){return false}}}else{if(N.nodeType===3&&!/^[ \t\r\n]*$/.test(N.nodeValue)){return false}}if(P){O.prev()}else{O.next()}}return true}function l(M,S){var T,R,O,Q,P,N=x||"P";R=i.getParent(M,i.isBlock);if(!R||!D(R)){R=R||j;if(!R.hasChildNodes()){T=i.create(N);R.appendChild(T);v.setStart(T,0);v.setEnd(T,0);return T}Q=M;while(Q.parentNode!=R){Q=Q.parentNode}while(Q&&!i.isBlock(Q)){O=Q;Q=Q.previousSibling}if(O){T=i.create(N);O.parentNode.insertBefore(T,O);Q=O;while(Q&&!i.isBlock(Q)){P=Q.nextSibling;T.appendChild(Q);Q=P}v.setStart(M,S);v.setEnd(M,S)}}return M}function G(){function M(O){var N=n[O?"firstChild":"lastChild"];while(N){if(N.nodeType==1){break}N=N[O?"nextSibling":"previousSibling"]}return N===p}o=x?r(x):i.create("BR");if(M(true)&&M()){i.replace(o,n)}else{if(M(true)){n.parentNode.insertBefore(o,n)}else{if(M()){i.insertAfter(o,n);F(o)}else{E=v.cloneRange();E.setStartAfter(p);E.setEndAfter(n);k=E.extractContents();i.insertAfter(k,n);i.insertAfter(o,n)}}}i.remove(p);m(o);h.add()}function C(){var N=new a(z,p),M;while(M=N.current()){if(M.nodeName=="BR"){return true}M=N.next()}}function K(){var N,M;if(z&&z.nodeType==3&&u>=z.nodeValue.length){if(!b.isIE&&!C()){N=i.create("br");v.insertNode(N);v.setStartAfter(N);v.setEndAfter(N);M=true}}N=i.create("br");v.insertNode(N);if(b.isIE&&t=="PRE"&&(!L||L<8)){N.parentNode.insertBefore(i.doc.createTextNode("\r"),N)}if(!M){v.setStartAfter(N);v.setEndAfter(N)}else{v.setStartBefore(N);v.setEndBefore(N)}e.setRng(v);h.add()}function s(M){do{if(M.nodeType===3){M.nodeValue=M.nodeValue.replace(/^[\r\n]+/,"")}M=M.firstChild}while(M)}function J(O){var M=i.getRoot(),N,P;N=O;while(N!==M&&i.getContentEditable(N)!=="false"){if(i.getContentEditable(N)==="true"){P=N}N=N.parentNode}return N!==M?P:M}function H(N){var M;if(!b.isIE){N.normalize();M=N.lastChild;if(!M||(/^(left|right)$/gi.test(i.getStyle(M,"float",true)))){i.add(N,"br")}}}if(!v.collapsed){f.execCommand("Delete");return}if(A.isDefaultPrevented()){return}z=v.startContainer;u=v.startOffset;x=d.forced_root_block;x=x?x.toUpperCase():"";L=i.doc.documentMode;if(z.nodeType==1&&z.hasChildNodes()){B=u>z.childNodes.length-1;z=z.childNodes[Math.min(u,z.childNodes.length-1)]||z;if(B&&z.nodeType==3){u=z.nodeValue.length}else{u=0}}j=J(z);if(!j){return}h.beforeChange();if(!i.isBlock(j)&&j!=i.getRoot()){if(!x||A.shiftKey){K()}return}if((x&&!A.shiftKey)||(!x&&A.shiftKey)){z=l(z,u)}p=i.getParent(z,i.isBlock);n=p?i.getParent(p.parentNode,i.isBlock):null;t=p?p.nodeName.toUpperCase():"";I=n?n.nodeName.toUpperCase():"";if(t=="LI"&&i.isEmpty(p)){if(/^(UL|OL|LI)$/.test(n.parentNode.nodeName)){return false}G();return}if(t=="PRE"&&d.br_in_pre!==false){if(!A.shiftKey){K();return}}else{if((!x&&!A.shiftKey&&t!="LI")||(x&&A.shiftKey)){K();return}}x=x||"P";if(q()){if(/^(H[1-6]|PRE)$/.test(t)&&I!="HGROUP"){o=r(x)}else{o=r()}if(d.end_container_on_empty_block&&D(n)&&i.isEmpty(p)){o=i.split(n,p)}else{i.insertAfter(o,p)}m(o)}else{if(q(true)){o=p.parentNode.insertBefore(r(),p);F(o)}else{E=v.cloneRange();E.setEndAfter(p);k=E.extractContents();s(k);o=k.firstChild;i.insertAfter(k,p);y(o);H(p);m(o)}}i.setAttrib(o,"id","");h.add()}f.onKeyDown.add(function(k,j){if(j.keyCode==13){if(g(j)!==false){j.preventDefault()}}})}})(tinymce); \ No newline at end of file
diff --git a/program/js/tiny_mce/tiny_mce_src.js b/program/js/tiny_mce/tiny_mce_src.js
index 1f1fc021e..32129db7b 100644
--- a/program/js/tiny_mce/tiny_mce_src.js
+++ b/program/js/tiny_mce/tiny_mce_src.js
@@ -6,9 +6,9 @@
var tinymce = {
majorVersion : '3',
- minorVersion : '5.2',
+ minorVersion : '5.4.1',
- releaseDate : '2012-05-31',
+ releaseDate : '2012-06-24',
_init : function() {
var t = this, d = document, na = navigator, ua = na.userAgent, i, nl, n, base, p, v;
@@ -1083,6 +1083,10 @@ tinymce.create('static tinymce.util.XHR', {
modifierPressed: function (e) {
return e.shiftKey || e.ctrlKey || e.altKey;
+ },
+
+ metaKeyPressed: function(e) {
+ return tinymce.isMac ? e.metaKey : e.ctrlKey;
}
};
})(tinymce);
@@ -1098,6 +1102,12 @@ tinymce.util.Quirks = function(editor) {
}
}
+ function getDocumentMode() {
+ var documentMode = editor.getDoc().documentMode;
+
+ return documentMode ? documentMode : 6;
+ };
+
function cleanupStylesWhenDeleting() {
function removeMergedFormatSpans(isDelete) {
var rng, blockElm, node, clonedSpan;
@@ -1157,74 +1167,58 @@ tinymce.util.Quirks = function(editor) {
};
function emptyEditorWhenDeleting() {
- function getEndPointNode(rng, start) {
- var container, offset, prefix = start ? 'start' : 'end';
-
- container = rng[prefix + 'Container'];
- offset = rng[prefix + 'Offset'];
+ function serializeRng(rng) {
+ var body = dom.create("body");
+ var contents = rng.cloneContents();
+ body.appendChild(contents);
+ return selection.serializer.serialize(body, {format: 'html'});
+ }
- // Resolve indexed container
- if (container.nodeType == 1 && container.hasChildNodes()) {
- container = container.childNodes[Math.min(start ? offset : (offset > 0 ? offset - 1 : 0), container.childNodes.length - 1)]
- }
+ function allContentsSelected(rng) {
+ var selection = serializeRng(rng);
- return container;
- };
+ var allRng = dom.createRng();
+ allRng.selectNode(editor.getBody());
- function isAtStartEndOfBody(rng, start) {
- var container, offset, root, childNode, prefix = start ? 'start' : 'end', isAfter;
+ var allSelection = serializeRng(allRng);//console.log(selection, "----", allSelection);
+ return selection === allSelection;
+ }
- container = rng[prefix + 'Container'];
- offset = rng[prefix + 'Offset'];
- root = dom.getRoot();
+ editor.onKeyDown.add(function(editor, e) {
+ var keyCode = e.keyCode, isCollapsed;
- // Resolve indexed container
- if (container.nodeType == 1) {
- isAfter = offset >= container.childNodes.length;
- container = getEndPointNode(rng, start);
+ // Empty the editor if it's needed for example backspace at <p><b>|</b></p>
+ if (!e.isDefaultPrevented() && (keyCode == DELETE || keyCode == BACKSPACE)) {
+ isCollapsed = editor.selection.isCollapsed();
- if (container.nodeType == 3) {
- offset = start && !isAfter ? 0 : container.nodeValue.length;
+ // Selection is collapsed but the editor isn't empty
+ if (isCollapsed && !dom.isEmpty(editor.getBody())) {
+ return;
}
- }
- // Check if start/end is in the middle of text
- if (container.nodeType == 3 && ((start && offset > 0) || (!start && offset < container.nodeValue.length))) {
- return false;
- }
-
- // Walk up the DOM tree to see if the endpoint is at the beginning/end of body
- while (container !== root) {
- childNode = container.parentNode[start ? 'firstChild' : 'lastChild'];
-
- // If first/last element is a BR then jump to it's sibling in case: <p>x<br></p>
- if (childNode.nodeName == "BR") {
- childNode = childNode[start ? 'nextSibling' : 'previousSibling'] || childNode;
+ // IE deletes all contents correctly when everything is selected
+ if (tinymce.isIE && !isCollapsed) {
+ return;
}
- // If the childNode isn't the container node then break in case <p><span>A</span>[X]</p>
- if (childNode !== container) {
- return false;
+ // Selection isn't collapsed but not all the contents is selected
+ if (!isCollapsed && !allContentsSelected(editor.selection.getRng())) {
+ return;
}
- container = container.parentNode;
+ // Manually empty the editor
+ editor.setContent('');
+ editor.selection.setCursorLocation(editor.getBody(), 0);
+ editor.nodeChanged();
}
+ });
+ };
- return true;
- };
-
- editor.onKeyDown.addToTop(function(editor, e) {
- var rng, keyCode = e.keyCode;
-
- if (!e.isDefaultPrevented() && (keyCode == DELETE || keyCode == BACKSPACE)) {
- rng = selection.getRng(true);
-
- if (isAtStartEndOfBody(rng, true) && isAtStartEndOfBody(rng, false) &&
- (rng.collapsed || dom.findCommonAncestor(getEndPointNode(rng, true), getEndPointNode(rng)) === dom.getRoot())) {
- editor.setContent('');
- editor.nodeChanged();
- e.preventDefault();
- }
+ function selectAll() {
+ editor.onKeyDown.add(function(editor, e) {
+ if (e.keyCode == 65 && VK.metaKeyPressed(e)) {
+ e.preventDefault();
+ editor.execCommand('SelectAll');
}
});
};
@@ -1393,16 +1387,15 @@ tinymce.util.Quirks = function(editor) {
}
function addNewLinesBeforeBrInPre() {
- var documentMode = editor.getDoc().documentMode;
-
// IE8+ rendering mode does the right thing with BR in PRE
- if (documentMode && documentMode > 7) {
+ if (getDocumentMode() > 7) {
return;
}
// Enable display: none in area and add a specific class that hides all BR elements in PRE to
// avoid the caret from getting stuck at the BR elements while pressing the right arrow key
setEditorCommandState('RespectVisibilityInDesign', true);
+ editor.contentStyles.push('.mceHideBrInPre pre br {display: none}');
dom.addClass(editor.getBody(), 'mceHideBrInPre');
// Adds a \n before all BR elements in PRE to get them visual
@@ -1608,13 +1601,105 @@ tinymce.util.Quirks = function(editor) {
editor.onSetContent.add(repaint);
};
- function deleteImageOnBackSpace() {
+ function deleteControlItemOnBackSpace() {
editor.onKeyDown.add(function(editor, e) {
- if (!e.isDefaultPrevented() && e.keyCode == 8 && selection.getNode().nodeName == 'IMG') {
+ var rng;
+
+ if (!e.isDefaultPrevented() && e.keyCode == BACKSPACE) {
+ rng = editor.getDoc().selection.createRange();
+ if (rng && rng.item) {
+ e.preventDefault();
+ editor.undoManager.beforeChange();
+ dom.remove(rng.item(0));
+ editor.undoManager.add();
+ }
+ }
+ });
+ };
+
+ function renderEmptyBlocksFix() {
+ var emptyBlocksCSS;
+
+ // IE10+
+ if (getDocumentMode() >= 10) {
+ emptyBlocksCSS = '';
+ tinymce.each('p div h1 h2 h3 h4 h5 h6'.split(' '), function(name, i) {
+ emptyBlocksCSS += (i > 0 ? ',' : '') + name + ':empty';
+ });
+
+ editor.contentStyles.push(emptyBlocksCSS + '{padding-right: 1px !important}');
+ }
+ };
+
+ function fakeImageResize() {
+ var mouseDownImg, startX, startY, startW, startH;
+
+ if (!settings.object_resizing || settings.webkit_fake_resize === false) {
+ return;
+ }
+
+ editor.contentStyles.push('.mceResizeImages img {cursor: se-resize !important}');
+
+ function resizeImage(e) {
+ var deltaX, deltaY, ratio, width, height;
+
+ if (mouseDownImg) {
+ deltaX = e.screenX - startX;
+ deltaY = e.screenY - startY;
+ ratio = Math.max((startW + deltaX) / startW, (startH + deltaY) / startH);
+
+ // Only update styles if the user draged one pixel or more
+ if (Math.abs(deltaX) > 1 || Math.abs(deltaY) > 1) {
+ // Constrain proportions
+ width = Math.round(startW * ratio);
+ height = Math.round(startH * ratio);
+
+ // Resize by using style or attribute
+ if (mouseDownImg.style.width) {
+ dom.setStyle(mouseDownImg, 'width', width);
+ } else {
+ dom.setAttrib(mouseDownImg, 'width', width);
+ }
+
+ // Resize by using style or attribute
+ if (mouseDownImg.style.height) {
+ dom.setStyle(mouseDownImg, 'height', height);
+ } else {
+ dom.setAttrib(mouseDownImg, 'height', height);
+ }
+
+ if (!dom.hasClass(editor.getBody(), 'mceResizeImages')) {
+ dom.addClass(editor.getBody(), 'mceResizeImages');
+ }
+ }
+ }
+ };
+
+ editor.onMouseDown.add(function(editor, e) {
+ var target = e.target;
+
+ if (target.nodeName == "IMG") {
+ mouseDownImg = target;
+ startX = e.screenX;
+ startY = e.screenY;
+ startW = mouseDownImg.clientWidth;
+ startH = mouseDownImg.clientHeight;
+ dom.bind(editor.getDoc(), 'mousemove', resizeImage);
e.preventDefault();
- editor.undoManager.beforeChange();
- dom.remove(selection.getNode());
- editor.undoManager.add();
+ }
+ });
+
+ // Unbind events on node change and restore resize cursor
+ editor.onNodeChange.add(function() {
+ if (mouseDownImg) {
+ mouseDownImg = null;
+ dom.unbind(editor.getDoc(), 'mousemove', resizeImage);
+ }
+
+ if (selection.getNode().nodeName == "IMG") {
+ dom.addClass(editor.getBody(), 'mceResizeImages');
+ } else {
+ dom.removeClass(editor.getBody(), 'mceResizeImages');
}
});
};
@@ -1635,6 +1720,9 @@ tinymce.util.Quirks = function(editor) {
// iOS
if (tinymce.isIDevice) {
selectionChangeNodeChanged();
+ } else {
+ fakeImageResize();
+ selectAll();
}
}
@@ -1644,7 +1732,8 @@ tinymce.util.Quirks = function(editor) {
ensureBodyHasRoleApplication();
addNewLinesBeforeBrInPre();
removePreSerializedStylesWhenSelectingControls();
- deleteImageOnBackSpace();
+ deleteControlItemOnBackSpace();
+ renderEmptyBlocksFix();
}
// Gecko
@@ -2107,9 +2196,9 @@ tinymce.html.Styles = function(settings, schema) {
if (!html5) {
html5 = mapCache.html5 = unpack({
- A : 'id|accesskey|class|dir|draggable|item|hidden|itemprop|role|spellcheck|style|subject|title',
+ A : 'id|accesskey|class|dir|draggable|item|hidden|itemprop|role|spellcheck|style|subject|title|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup',
B : '#|a|abbr|area|audio|b|bdo|br|button|canvas|cite|code|command|datalist|del|dfn|em|embed|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|meta|' +
- 'meter|noscript|object|output|progress|q|ruby|samp|script|select|small|span|strong|sub|sup|svg|textarea|time|var|video',
+ 'meter|noscript|object|output|progress|q|ruby|samp|script|select|small|span|strong|sub|sup|svg|textarea|time|var|video|wbr',
C : '#|a|abbr|area|address|article|aside|audio|b|bdo|blockquote|br|button|canvas|cite|code|command|datalist|del|details|dfn|dialog|div|dl|em|embed|fieldset|' +
'figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|menu|meta|meter|nav|noscript|ol|object|output|' +
'p|pre|progress|q|ruby|samp|script|section|select|small|span|strong|style|sub|sup|svg|table|textarea|time|ul|var|video'
@@ -2218,7 +2307,8 @@ tinymce.html.Styles = function(settings, schema) {
'tbody[A][tr]' +
'tr[A][th|td]' +
'th[A|headers|rowspan|colspan|scope][B]' +
- 'td[A|headers|rowspan|colspan][C]'
+ 'td[A|headers|rowspan|colspan][C]' +
+ 'wbr[A][]'
);
}
@@ -2399,7 +2489,7 @@ tinymce.html.Styles = function(settings, schema) {
// Setup map objects
whiteSpaceElementsMap = createLookupTable('whitespace_elements', 'pre script style textarea');
selfClosingElementsMap = createLookupTable('self_closing_elements', 'colgroup dd dt li option p td tfoot th thead tr');
- shortEndedElementsMap = createLookupTable('short_ended_elements', 'area base basefont br col frame hr img input isindex link meta param embed source');
+ shortEndedElementsMap = createLookupTable('short_ended_elements', 'area base basefont br col frame hr img input isindex link meta param embed source wbr');
boolAttrMap = createLookupTable('boolean_attributes', 'checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls');
nonEmptyElementsMap = createLookupTable('non_empty_elements', 'td th iframe video audio object', shortEndedElementsMap);
blockElementsMap = createLookupTable('block_elements', 'h1 h2 h3 h4 h5 h6 hr p div address pre form table tbody thead tfoot ' +
@@ -4657,7 +4747,7 @@ tinymce.dom = {};
// Old API supported multiple targets
if (target && target instanceof Array) {
- var i = target;
+ var i = target.length;
while (i--) {
self.add(target[i], events, func, scope);
@@ -5499,6 +5589,32 @@ tinymce.dom.TreeWalker = function(start_node, root_node) {
return this.styles.serialize(o, name);
},
+ addStyle: function(cssText) {
+ var doc = this.doc, head;
+
+ // Create style element if needed
+ styleElm = doc.getElementById('mceDefaultStyles');
+ if (!styleElm) {
+ styleElm = doc.createElement('style'),
+ styleElm.id = 'mceDefaultStyles';
+ styleElm.type = 'text/css';
+
+ head = doc.getElementsByTagName('head')[0]
+ if (head.firstChild) {
+ head.insertBefore(styleElm, head.firstChild);
+ } else {
+ head.appendChild(styleElm);
+ }
+ }
+
+ // Append style data to old or new style element
+ if (styleElm.styleSheet) {
+ styleElm.styleSheet.cssText += cssText;
+ } else {
+ styleElm.appendChild(doc.createTextNode(cssText));
+ }
+ },
+
loadCSS : function(u) {
var t = this, d = t.doc, head;
@@ -5622,13 +5738,13 @@ tinymce.dom.TreeWalker = function(start_node, root_node) {
// This seems to fix this problem
// Create new div with HTML contents and a BR infront to keep comments
- element = self.create('div');
- element.innerHTML = '<br />' + html;
+ var newElement = self.create('div');
+ newElement.innerHTML = '<br />' + html;
// Add all children from div to target
- each (element.childNodes, function(node, i) {
+ each (tinymce.grep(newElement.childNodes), function(node, i) {
// Skip br element
- if (i)
+ if (i && element.canHaveHTML)
element.appendChild(node);
});
}
@@ -9069,7 +9185,7 @@ window.tinymce.dom.Sizzle = Sizzle;
},
getStart : function() {
- var rng = this.getRng(), startElement, parentElement, checkRng, node;
+ var self = this, rng = self.getRng(), startElement, parentElement, checkRng, node;
if (rng.duplicate || rng.item) {
// Control selection, return first item
@@ -9080,6 +9196,9 @@ window.tinymce.dom.Sizzle = Sizzle;
checkRng = rng.duplicate();
checkRng.collapse(1);
startElement = checkRng.parentElement();
+ if (startElement.ownerDocument !== self.dom.doc) {
+ startElement = self.dom.getRoot();
+ }
// Check if range parent is inside the start element, then return the inner parent element
// This will fix issues when a single element is selected, IE would otherwise return the wrong start element
@@ -9106,31 +9225,34 @@ window.tinymce.dom.Sizzle = Sizzle;
},
getEnd : function() {
- var t = this, r = t.getRng(), e, eo;
+ var self = this, rng = self.getRng(), endElement, endOffset;
- if (r.duplicate || r.item) {
- if (r.item)
- return r.item(0);
+ if (rng.duplicate || rng.item) {
+ if (rng.item)
+ return rng.item(0);
- r = r.duplicate();
- r.collapse(0);
- e = r.parentElement();
+ rng = rng.duplicate();
+ rng.collapse(0);
+ endElement = rng.parentElement();
+ if (endElement.ownerDocument !== self.dom.doc) {
+ endElement = self.dom.getRoot();
+ }
- if (e && e.nodeName == 'BODY')
- return e.lastChild || e;
+ if (endElement && endElement.nodeName == 'BODY')
+ return endElement.lastChild || endElement;
- return e;
+ return endElement;
} else {
- e = r.endContainer;
- eo = r.endOffset;
+ endElement = rng.endContainer;
+ endOffset = rng.endOffset;
- if (e.nodeType == 1 && e.hasChildNodes())
- e = e.childNodes[eo > 0 ? eo - 1 : eo];
+ if (endElement.nodeType == 1 && endElement.hasChildNodes())
+ endElement = endElement.childNodes[endOffset > 0 ? endOffset - 1 : endOffset];
- if (e && e.nodeType == 3)
- return e.parentNode;
+ if (endElement && endElement.nodeType == 3)
+ return endElement.parentNode;
- return e;
+ return endElement;
}
},
@@ -11475,7 +11597,7 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', {
l = DOM.encode(s.label || '');
h = '<a role="button" id="' + this.id + '" href="javascript:;" class="' + cp + ' ' + cp + 'Enabled ' + s['class'] + (l ? ' ' + cp + 'Labeled' : '') +'" onmousedown="return false;" onclick="return false;" aria-labelledby="' + this.id + '_voice" title="' + DOM.encode(s.title) + '">';
if (s.image && !(this.editor &&this.editor.forcedHighContrastMode) )
- h += '<img class="mceIcon" src="' + s.image + '" alt="' + DOM.encode(s.title) + '" />' + l;
+ h += '<span class="mceIcon ' + s['class'] + '"><img class="mceIcon" src="' + s.image + '" alt="' + DOM.encode(s.title) + '" /></span>' + (l ? '<span class="' + cp + 'Label">' + l + '</span>' : '');
else
h += '<span class="mceIcon ' + s['class'] + '"></span>' + (l ? '<span class="' + cp + 'Label">' + l + '</span>' : '');
@@ -12183,6 +12305,16 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', {
DOM.select('a', t.id + '_menu')[0].focus(); // Select first link
}
+ t.keyboardNav = new tinymce.ui.KeyboardNavigation({
+ root: t.id + '_menu',
+ items: DOM.select('a', t.id + '_menu'),
+ onCancel: function() {
+ t.hideMenu();
+ t.focus();
+ }
+ });
+
+ t.keyboardNav.focus();
t.isMenuVisible = 1;
},
@@ -12203,6 +12335,7 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', {
t.isMenuVisible = 0;
t.onHideMenu.dispatch();
+ t.keyboardNav.destroy();
}
},
@@ -12267,15 +12400,6 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', {
}
DOM.addClass(m, 'mceColorSplitMenu');
-
- new tinymce.ui.KeyboardNavigation({
- root: t.id + '_menu',
- items: DOM.select('a', t.id + '_menu'),
- onCancel: function() {
- t.hideMenu();
- t.focus();
- }
- });
// Prevent IE from scrolling and hindering click to occur #4019
Event.add(t.id + '_menu', 'mousedown', function(e) {return Event.cancel(e);});
@@ -12317,11 +12441,17 @@ tinymce.create('tinymce.ui.Separator:tinymce.ui.Control', {
},
destroy : function() {
- this.parent();
+ var self = this;
- Event.clear(this.id + '_menu');
- Event.clear(this.id + '_more');
- DOM.remove(this.id + '_menu');
+ self.parent();
+
+ Event.clear(self.id + '_menu');
+ Event.clear(self.id + '_more');
+ DOM.remove(self.id + '_menu');
+
+ if (self.keyboardNav) {
+ self.keyboardNav.destroy();
+ }
}
});
})(tinymce);
@@ -12965,6 +13095,8 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
self.contentCSS = [];
+ self.contentStyles = [];
+
// Creates all events like onClick, onSetContent etc see Editor.Events.js for the actual logic
self.setupEvents();
@@ -13156,12 +13288,6 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
t.controlManager = new tinymce.ControlManager(t);
- t.onExecCommand.add(function(ed, c) {
- // Don't refresh the select lists until caret move
- if (!/^(FontName|FontSize)$/.test(c))
- t.nodeChanged();
- });
-
// Enables users to override the control factory
t.onBeforeRenderUI.dispatch(t, t.controlManager);
@@ -13321,7 +13447,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
},
initContentBody : function() {
- var self = this, settings = self.settings, targetElm = DOM.get(self.id), doc = self.getDoc(), html, body;
+ var self = this, settings = self.settings, targetElm = DOM.get(self.id), doc = self.getDoc(), html, body, contentCssText;
// Setup iframe body
if ((!isIE || !tinymce.relaxedDomain) && !settings.content_editable) {
@@ -13430,6 +13556,12 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
self.enterKey = new tinymce.EnterKey(self);
self.editorCommands = new tinymce.EditorCommands(self);
+ self.onExecCommand.add(function(editor, command) {
+ // Don't refresh the select lists until caret move
+ if (!/^(FontName|FontSize)$/.test(command))
+ self.nodeChanged();
+ });
+
// Pass through
self.serializer.onPreProcess.add(function(se, o) {
return self.onPreProcess.dispatch(self, o, se);
@@ -13492,6 +13624,17 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
self.focus(true);
self.nodeChanged({initial : true});
+ // Add editor specific CSS styles
+ if (self.contentStyles.length > 0) {
+ contentCssText = '';
+
+ each(self.contentStyles, function(style) {
+ contentCssText += style + "\r\n";
+ });
+
+ self.dom.addStyle(contentCssText);
+ }
+
// Load specified content CSS last
each(self.contentCSS, function(url) {
self.dom.loadCSS(url);
@@ -14119,7 +14262,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
return;
case 'A':
- if (!elm.href) {
+ if (!dom.getAttrib(elm, 'href', false)) {
value = dom.getAttrib(elm, 'name') || elm.id;
cls = 'mceItemAnchor';
@@ -14148,13 +14291,12 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
// Don't clear the window or document if content editable
// is enabled since other instances might still be present
if (!self.settings.content_editable) {
- Event.clear(self.getWin());
- Event.clear(self.getDoc());
+ Event.unbind(self.getWin());
+ Event.unbind(self.getDoc());
}
- Event.clear(self.getBody());
- Event.clear(self.formElement);
- Event.unbind(elm);
+ Event.unbind(self.getBody());
+ Event.clear(elm);
self.execCallback('remove_instance_callback', self);
self.onRemove.dispatch(self);
@@ -14356,8 +14498,10 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
// Handle legacy handle_event_callback option
if (settings.handle_event_callback) {
self.onEvent.add(function(ed, e, o) {
- if (self.execCallback('handle_event_callback', e, ed, o) === false)
- Event.cancel(e);
+ if (self.execCallback('handle_event_callback', e, ed, o) === false) {
+ e.preventDefault();
+ e.stopPropagation();
+ }
});
}
@@ -14423,9 +14567,12 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
self.focus(true);
};
- function nodeChanged() {
- // Normalize selection for example <b>a</b><i>|a</i> becomes <b>a|</b><i>a</i>
- self.selection.normalize();
+ function nodeChanged(ed, e) {
+ // Normalize selection for example <b>a</b><i>|a</i> becomes <b>a|</b><i>a</i> except for Ctrl+A since it selects everything
+ if (e.keyCode != 65 || !tinymce.VK.metaKeyPressed(e)) {
+ self.selection.normalize();
+ }
+
self.nodeChanged();
}
@@ -14469,7 +14616,7 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
var keyCode = e.keyCode;
if ((keyCode >= 33 && keyCode <= 36) || (keyCode >= 37 && keyCode <= 40) || keyCode == 13 || keyCode == 45 || keyCode == 46 || keyCode == 8 || (tinymce.isMac && (keyCode == 91 || keyCode == 93)) || e.ctrlKey)
- nodeChanged();
+ nodeChanged(ed, e);
});
// Add reset handler
@@ -14896,6 +15043,10 @@ tinymce.create('tinymce.ui.Toolbar:tinymce.ui.Container', {
editor.setContent(editor.getContent().replace(/tiny_mce_marker/g, function() { return value }));
},
+ mceToggleFormat : function(command, ui, value) {
+ toggleFormat(value);
+ },
+
mceSetContent : function(command, ui, value) {
editor.setContent(value);
},
@@ -15284,7 +15435,7 @@ tinymce.ForceBlocks = function(editor) {
var settings = editor.settings, dom = editor.dom, selection = editor.selection, blockElements = editor.schema.getBlockElements();
function addRootBlocks() {
- var node = selection.getStart(), rootNode = editor.getBody(), rng, startContainer, startOffset, endContainer, endOffset, rootBlockNode, tempNode, offset = -0xFFFFFF, wrapped;
+ var node = selection.getStart(), rootNode = editor.getBody(), rng, startContainer, startOffset, endContainer, endOffset, rootBlockNode, tempNode, offset = -0xFFFFFF, wrapped, isInEditorDocument;
if (!node || node.nodeType !== 1 || !settings.forced_root_block)
return;
@@ -15312,6 +15463,7 @@ tinymce.ForceBlocks = function(editor) {
rng.moveToElementText(node);
}
+ isInEditorDocument = rng.parentElement().ownerDocument === editor.getDoc();
tmpRng = rng.duplicate();
tmpRng.collapse(true);
startOffset = tmpRng.move('character', offset) * -1;
@@ -15342,28 +15494,30 @@ tinymce.ForceBlocks = function(editor) {
}
}
- if (rng.setStart) {
- rng.setStart(startContainer, startOffset);
- rng.setEnd(endContainer, endOffset);
- selection.setRng(rng);
- } else {
- try {
- rng = editor.getDoc().body.createTextRange();
- rng.moveToElementText(rootNode);
- rng.collapse(true);
- rng.moveStart('character', startOffset);
+ if (wrapped) {
+ if (rng.setStart) {
+ rng.setStart(startContainer, startOffset);
+ rng.setEnd(endContainer, endOffset);
+ selection.setRng(rng);
+ } else {
+ // Only select if the previous selection was inside the document to prevent auto focus in quirks mode
+ if (isInEditorDocument) {
+ try {
+ rng = editor.getDoc().body.createTextRange();
+ rng.moveToElementText(rootNode);
+ rng.collapse(true);
+ rng.moveStart('character', startOffset);
- if (endOffset > 0)
- rng.moveEnd('character', endOffset);
+ if (endOffset > 0)
+ rng.moveEnd('character', endOffset);
- rng.select();
- } catch (ex) {
- // Ignore
+ rng.select();
+ } catch (ex) {
+ // Ignore
+ }
+ }
}
- }
- // Only trigger nodeChange when we wrapped nodes to prevent a forever loop
- if (wrapped) {
editor.nodeChanged();
}
};
@@ -17949,7 +18103,7 @@ tinymce.onAddEditor.add(function(tinymce, ed) {
var TreeWalker = tinymce.dom.TreeWalker;
tinymce.EnterKey = function(editor) {
- var dom = editor.dom, selection = editor.selection, settings = editor.settings, undoManager = editor.undoManager;
+ var dom = editor.dom, selection = editor.selection, settings = editor.settings, undoManager = editor.undoManager, nonEmptyElementsMap = editor.schema.getNonEmptyElements();
function handleEnterKey(evt) {
var rng = selection.getRng(true), tmpRng, editableRoot, container, offset, parentBlock, documentMode,
@@ -17959,11 +18113,48 @@ tinymce.onAddEditor.add(function(tinymce, ed) {
function canSplitBlock(node) {
return node &&
dom.isBlock(node) &&
- !/^(TD|TH|CAPTION)$/.test(node.nodeName) &&
+ !/^(TD|TH|CAPTION|FORM)$/.test(node.nodeName) &&
!/^(fixed|absolute)/i.test(node.style.position) &&
dom.getContentEditable(node) !== "true";
};
+ // Renders empty block on IE
+ function renderBlockOnIE(block) {
+ var oldRng;
+
+ if (tinymce.isIE && dom.isBlock(block)) {
+ oldRng = selection.getRng();
+ block.appendChild(dom.create('span', null, '\u00a0'));
+ selection.select(block);
+ block.lastChild.outerHTML = '';
+ selection.setRng(oldRng);
+ }
+ };
+
+ // Remove the first empty inline element of the block so this: <p><b><em></em></b>x</p> becomes this: <p>x</p>
+ function trimInlineElementsOnLeftSideOfBlock(block) {
+ var node = block, firstChilds = [], i;
+
+ // Find inner most first child ex: <p><i><b>*</b></i></p>
+ while (node = node.firstChild) {
+ if (dom.isBlock(node)) {
+ return;
+ }
+
+ if (node.nodeType == 1 && !nonEmptyElementsMap[node.nodeName.toLowerCase()]) {
+ firstChilds.push(node);
+ }
+ }
+
+ i = firstChilds.length;
+ while (i--) {
+ node = firstChilds[i];
+ if (!node.hasChildNodes() || (node.firstChild == node.lastChild && node.firstChild.nodeValue === '')) {
+ dom.remove(node);
+ }
+ }
+ };
+
// Moves the caret to a suitable position within the root for example in the first non pure whitespace text node or before an image
function moveToCaretPosition(root) {
var walker, node, rng, y, viewPort, lastNode = root, tempElm;
@@ -17980,7 +18171,7 @@ tinymce.onAddEditor.add(function(tinymce, ed) {
break;
}
- if (/^(BR|IMG)$/.test(node.nodeName)) {
+ if (nonEmptyElementsMap[node.nodeName.toLowerCase()]) {
rng.setStartBefore(node);
rng.setEndBefore(node);
break;
@@ -18077,6 +18268,11 @@ tinymce.onAddEditor.add(function(tinymce, ed) {
return true;
}
+ // If the caret if before the first element in parentBlock
+ if (start && container.nodeType == 1 && container == parentBlock.firstChild) {
+ return true;
+ }
+
// Caret can be before/after a table
if (container.nodeName === "TABLE" || (container.previousSibling && container.previousSibling.nodeName == "TABLE")) {
return (isAfterLastNodeInContainer && !start) || (!isAfterLastNodeInContainer && start);
@@ -18084,21 +18280,35 @@ tinymce.onAddEditor.add(function(tinymce, ed) {
// Walk the DOM and look for text nodes or non empty elements
walker = new TreeWalker(container, parentBlock);
- while (node = (start ? walker.prev() : walker.next())) {
+
+ // If caret is in beginning or end of a text block then jump to the next/previous node
+ if (container.nodeType == 3) {
+ if (start && offset == 0) {
+ walker.prev();
+ } else if (!start && offset == container.nodeValue.length) {
+ walker.next();
+ }
+ }
+
+ while (node = walker.current()) {
if (node.nodeType === 1) {
// Ignore bogus elements
- if (node.getAttribute('data-mce-bogus')) {
- continue;
- }
-
- // Keep empty elements like <img />
- name = node.nodeName.toLowerCase();
- if (name === 'IMG') {
- return false;
+ if (!node.getAttribute('data-mce-bogus')) {
+ // Keep empty elements like <img /> <input /> but not trailing br:s like <p>text|<br></p>
+ name = node.nodeName.toLowerCase();
+ if (nonEmptyElementsMap[name] && name !== 'br') {
+ return false;
+ }
}
} else if (node.nodeType === 3 && !/^[ \t\r\n]*$/.test(node.nodeValue)) {
return false;
}
+
+ if (start) {
+ walker.prev();
+ } else {
+ walker.next();
+ }
}
return true;
@@ -18182,6 +18392,7 @@ tinymce.onAddEditor.add(function(tinymce, ed) {
} else if (isFirstOrLastLi()) {
// Last LI in list then temove LI and add text block after list
dom.insertAfter(newBlock, containerBlock);
+ renderBlockOnIE(newBlock);
} else {
// Middle LI in list the split the list and insert a text block in the middle
// Extract after fragment and insert it after the current block
@@ -18273,6 +18484,22 @@ tinymce.onAddEditor.add(function(tinymce, ed) {
return parent !== root ? editableRoot : root;
};
+ // Adds a BR at the end of blocks that only contains an IMG or INPUT since these might be floated and then they won't expand the block
+ function addBrToBlockIfNeeded(block) {
+ var lastChild;
+
+ // IE will render the blocks correctly other browsers needs a BR
+ if (!tinymce.isIE) {
+ block.normalize(); // Remove empty text nodes that got left behind by the extract
+
+ // Check if the block is empty or contains a floated last child
+ lastChild = block.lastChild;
+ if (!lastChild || (/^(left|right)$/gi.test(dom.getStyle(lastChild, 'float', true)))) {
+ dom.add(block, 'br');
+ }
+ }
+ };
+
// Delete any selected contents
if (!rng.collapsed) {
editor.execCommand('Delete');
@@ -18295,7 +18522,11 @@ tinymce.onAddEditor.add(function(tinymce, ed) {
if (container.nodeType == 1 && container.hasChildNodes()) {
isAfterLastNodeInContainer = offset > container.childNodes.length - 1;
container = container.childNodes[Math.min(offset, container.childNodes.length - 1)] || container;
- offset = 0;
+ if (isAfterLastNodeInContainer && container.nodeType == 3) {
+ offset = container.nodeValue.length;
+ } else {
+ offset = 0;
+ }
}
// Get editable root node normaly the body element but sometimes a div or span
@@ -18376,9 +18607,12 @@ tinymce.onAddEditor.add(function(tinymce, ed) {
} else {
dom.insertAfter(newBlock, parentBlock);
}
+
+ moveToCaretPosition(newBlock);
} else if (isCaretAtStartOrEndOfBlock(true)) {
// Insert new block before
newBlock = parentBlock.parentNode.insertBefore(createNewBlock(), parentBlock);
+ renderBlockOnIE(newBlock);
} else {
// Extract after fragment and insert it after the current block
tmpRng = rng.cloneRange();
@@ -18387,10 +18621,12 @@ tinymce.onAddEditor.add(function(tinymce, ed) {
trimLeadingLineBreaks(fragment);
newBlock = fragment.firstChild;
dom.insertAfter(fragment, parentBlock);
+ trimInlineElementsOnLeftSideOfBlock(newBlock);
+ addBrToBlockIfNeeded(parentBlock);
+ moveToCaretPosition(newBlock);
}
dom.setAttrib(newBlock, 'id', ''); // Remove ID since it needs to be document unique
- moveToCaretPosition(newBlock);
undoManager.add();
}