comfortable_mexican_sofa 1.0.27 → 1.0.28
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/comfortable_mexican_sofa.gemspec +34 -11
- data/lib/comfortable_mexican_sofa/view_methods.rb +4 -6
- data/public/javascripts/comfortable_mexican_sofa/cms.js +10 -7
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/jquery.tinymce.js +1 -0
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/langs/en.js +170 -0
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/about.htm +54 -0
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/anchor.htm +26 -0
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/charmap.htm +52 -0
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/color_picker.htm +73 -0
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/editor_template.js +1 -0
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/image.htm +80 -0
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/img/colorpicker.jpg +0 -0
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/img/icons.gif +0 -0
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/js/about.js +72 -0
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/js/anchor.js +37 -0
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/js/charmap.js +335 -0
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/js/color_picker.js +253 -0
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/js/image.js +245 -0
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/js/link.js +156 -0
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/js/source_editor.js +56 -0
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/langs/en.js +62 -0
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/langs/en_dlg.js +51 -0
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/link.htm +58 -0
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/skins/default/content.css +36 -0
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/skins/default/dialog.css +117 -0
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/skins/default/img/buttons.png +0 -0
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/skins/default/img/items.gif +0 -0
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/skins/default/img/menu_check.gif +0 -0
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/skins/default/img/progress.gif +0 -0
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/skins/default/img/tabs.gif +0 -0
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/skins/default/ui.css +213 -0
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/source_editor.htm +25 -0
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/tiny_mce.js +1 -0
- data/public/javascripts/comfortable_mexican_sofa/tiny_mce/tiny_mce_popup.js +5 -0
- metadata +36 -13
- data/public/javascripts/comfortable_mexican_sofa/jwysiwyg/jquery.wysiwyg.css +0 -62
- data/public/javascripts/comfortable_mexican_sofa/jwysiwyg/jquery.wysiwyg.gif +0 -0
- data/public/javascripts/comfortable_mexican_sofa/jwysiwyg/jquery.wysiwyg.jpg +0 -0
- data/public/javascripts/comfortable_mexican_sofa/jwysiwyg/jquery.wysiwyg.js +0 -1393
- data/public/javascripts/comfortable_mexican_sofa/jwysiwyg/jquery.wysiwyg.modal.css +0 -51
- data/public/javascripts/comfortable_mexican_sofa/plupload/plupload.full.min.js +0 -1
- data/public/javascripts/comfortable_mexican_sofa/plupload/plupload.html4.min.js +0 -1
- data/public/javascripts/comfortable_mexican_sofa/plupload/plupload.html5.min.js +0 -1
- data/public/javascripts/comfortable_mexican_sofa/uploader.js +0 -47
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/skins/default/img/tabs.gif
ADDED
Binary file
|
data/public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/skins/default/ui.css
ADDED
@@ -0,0 +1,213 @@
|
|
1
|
+
/* Reset */
|
2
|
+
.defaultSkin table, .defaultSkin tbody, .defaultSkin a, .defaultSkin img, .defaultSkin tr, .defaultSkin div, .defaultSkin td, .defaultSkin iframe, .defaultSkin span, .defaultSkin *, .defaultSkin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left}
|
3
|
+
.defaultSkin a:hover, .defaultSkin a:link, .defaultSkin a:visited, .defaultSkin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000}
|
4
|
+
.defaultSkin table td {vertical-align:middle}
|
5
|
+
|
6
|
+
/* Containers */
|
7
|
+
.defaultSkin table {direction:ltr; background:#F0F0EE}
|
8
|
+
.defaultSkin iframe {display:block; background:#FFF}
|
9
|
+
.defaultSkin .mceToolbar {height:26px}
|
10
|
+
.defaultSkin .mceLeft {text-align:left}
|
11
|
+
.defaultSkin .mceRight {text-align:right}
|
12
|
+
|
13
|
+
/* External */
|
14
|
+
.defaultSkin .mceExternalToolbar {position:absolute; border:1px solid #CCC; border-bottom:0; display:none;}
|
15
|
+
.defaultSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;}
|
16
|
+
.defaultSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0}
|
17
|
+
|
18
|
+
/* Layout */
|
19
|
+
.defaultSkin table.mceLayout {border:0; border-left:1px solid #CCC; border-right:1px solid #CCC}
|
20
|
+
.defaultSkin table.mceLayout tr.mceFirst td {border-top:1px solid #CCC}
|
21
|
+
.defaultSkin table.mceLayout tr.mceLast td {border-bottom:1px solid #CCC}
|
22
|
+
.defaultSkin table.mceToolbar, .defaultSkin tr.mceFirst .mceToolbar tr td, .defaultSkin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0;}
|
23
|
+
.defaultSkin td.mceToolbar {padding-top:1px; vertical-align:top}
|
24
|
+
.defaultSkin .mceIframeContainer {border-top:1px solid #CCC; border-bottom:1px solid #CCC}
|
25
|
+
.defaultSkin .mceStatusbar {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; display:block; height:20px}
|
26
|
+
.defaultSkin .mceStatusbar div {float:left; margin:2px}
|
27
|
+
.defaultSkin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize; outline:0}
|
28
|
+
.defaultSkin .mceStatusbar a:hover {text-decoration:underline}
|
29
|
+
.defaultSkin table.mceToolbar {margin-left:3px}
|
30
|
+
.defaultSkin span.mceIcon, .defaultSkin img.mceIcon {display:block; width:20px; height:20px}
|
31
|
+
.defaultSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px}
|
32
|
+
.defaultSkin td.mceCenter {text-align:center;}
|
33
|
+
.defaultSkin td.mceCenter table {margin:0 auto; text-align:left;}
|
34
|
+
.defaultSkin td.mceRight table {margin:0 0 0 auto;}
|
35
|
+
|
36
|
+
/* Button */
|
37
|
+
.defaultSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px; margin-right:1px}
|
38
|
+
.defaultSkin a.mceButtonEnabled:hover {border:1px solid #0A246A; background-color:#B2BBD0}
|
39
|
+
.defaultSkin a.mceButtonActive, .defaultSkin a.mceButtonSelected {border:1px solid #0A246A; background-color:#C2CBE0}
|
40
|
+
.defaultSkin .mceButtonDisabled .mceIcon {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
41
|
+
.defaultSkin .mceButtonLabeled {width:auto}
|
42
|
+
.defaultSkin .mceButtonLabeled span.mceIcon {float:left}
|
43
|
+
.defaultSkin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica}
|
44
|
+
.defaultSkin .mceButtonDisabled .mceButtonLabel {color:#888}
|
45
|
+
|
46
|
+
/* Separator */
|
47
|
+
.defaultSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:2px 2px 0 4px}
|
48
|
+
|
49
|
+
/* ListBox */
|
50
|
+
.defaultSkin .mceListBox, .defaultSkin .mceListBox a {display:block}
|
51
|
+
.defaultSkin .mceListBox .mceText {padding-left:4px; width:70px; text-align:left; border:1px solid #CCC; border-right:0; background:#FFF; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden}
|
52
|
+
.defaultSkin .mceListBox .mceOpen {width:9px; height:20px; background:url(../../img/icons.gif) -741px 0; margin-right:2px; border:1px solid #CCC;}
|
53
|
+
.defaultSkin table.mceListBoxEnabled:hover .mceText, .defaultSkin .mceListBoxHover .mceText, .defaultSkin .mceListBoxSelected .mceText {border:1px solid #A2ABC0; border-right:0; background:#FFF}
|
54
|
+
.defaultSkin table.mceListBoxEnabled:hover .mceOpen, .defaultSkin .mceListBoxHover .mceOpen, .defaultSkin .mceListBoxSelected .mceOpen {background-color:#FFF; border:1px solid #A2ABC0}
|
55
|
+
.defaultSkin .mceListBoxDisabled a.mceText {color:gray; background-color:transparent;}
|
56
|
+
.defaultSkin .mceListBoxMenu {overflow:auto; overflow-x:hidden}
|
57
|
+
.defaultSkin .mceOldBoxModel .mceListBox .mceText {height:22px}
|
58
|
+
.defaultSkin .mceOldBoxModel .mceListBox .mceOpen {width:11px; height:22px;}
|
59
|
+
.defaultSkin select.mceNativeListBox {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:7pt; background:#F0F0EE; border:1px solid gray; margin-right:2px;}
|
60
|
+
|
61
|
+
/* SplitButton */
|
62
|
+
.defaultSkin .mceSplitButton {width:32px; height:20px; direction:ltr}
|
63
|
+
.defaultSkin .mceSplitButton a, .defaultSkin .mceSplitButton span {height:20px; display:block}
|
64
|
+
.defaultSkin .mceSplitButton a.mceAction {width:20px; border:1px solid #F0F0EE; border-right:0;}
|
65
|
+
.defaultSkin .mceSplitButton span.mceAction {width:20px; background-image:url(../../img/icons.gif);}
|
66
|
+
.defaultSkin .mceSplitButton a.mceOpen {width:9px; background:url(../../img/icons.gif) -741px 0; border:1px solid #F0F0EE;}
|
67
|
+
.defaultSkin .mceSplitButton span.mceOpen {display:none}
|
68
|
+
.defaultSkin table.mceSplitButtonEnabled:hover a.mceAction, .defaultSkin .mceSplitButtonHover a.mceAction, .defaultSkin .mceSplitButtonSelected a.mceAction {border:1px solid #0A246A; border-right:0; background-color:#B2BBD0}
|
69
|
+
.defaultSkin table.mceSplitButtonEnabled:hover a.mceOpen, .defaultSkin .mceSplitButtonHover a.mceOpen, .defaultSkin .mceSplitButtonSelected a.mceOpen {background-color:#B2BBD0; border:1px solid #0A246A;}
|
70
|
+
.defaultSkin .mceSplitButtonDisabled .mceAction, .defaultSkin .mceSplitButtonDisabled a.mceOpen {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
|
71
|
+
.defaultSkin .mceSplitButtonActive a.mceAction {border:1px solid #0A246A; background-color:#C2CBE0}
|
72
|
+
.defaultSkin .mceSplitButtonActive a.mceOpen {border-left:0;}
|
73
|
+
|
74
|
+
/* ColorSplitButton */
|
75
|
+
.defaultSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray}
|
76
|
+
.defaultSkin .mceColorSplitMenu td {padding:2px}
|
77
|
+
.defaultSkin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080}
|
78
|
+
.defaultSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px}
|
79
|
+
.defaultSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF}
|
80
|
+
.defaultSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2}
|
81
|
+
.defaultSkin a.mceMoreColors:hover {border:1px solid #0A246A}
|
82
|
+
.defaultSkin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a}
|
83
|
+
.defaultSkin .mce_forecolor span.mceAction, .defaultSkin .mce_backcolor span.mceAction {overflow:hidden; height:16px}
|
84
|
+
|
85
|
+
/* Menu */
|
86
|
+
.defaultSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #D4D0C8}
|
87
|
+
.defaultSkin .mceNoIcons span.mceIcon {width:0;}
|
88
|
+
.defaultSkin .mceNoIcons a .mceText {padding-left:10px}
|
89
|
+
.defaultSkin .mceMenu table {background:#FFF}
|
90
|
+
.defaultSkin .mceMenu a, .defaultSkin .mceMenu span, .defaultSkin .mceMenu {display:block}
|
91
|
+
.defaultSkin .mceMenu td {height:20px}
|
92
|
+
.defaultSkin .mceMenu a {position:relative;padding:3px 0 4px 0}
|
93
|
+
.defaultSkin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block}
|
94
|
+
.defaultSkin .mceMenu span.mceText, .defaultSkin .mceMenu .mcePreview {font-size:11px}
|
95
|
+
.defaultSkin .mceMenu pre.mceText {font-family:Monospace}
|
96
|
+
.defaultSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;}
|
97
|
+
.defaultSkin .mceMenu .mceMenuItemEnabled a:hover, .defaultSkin .mceMenu .mceMenuItemActive {background-color:#dbecf3}
|
98
|
+
.defaultSkin td.mceMenuItemSeparator {background:#DDD; height:1px}
|
99
|
+
.defaultSkin .mceMenuItemTitle a {border:0; background:#EEE; border-bottom:1px solid #DDD}
|
100
|
+
.defaultSkin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px}
|
101
|
+
.defaultSkin .mceMenuItemDisabled .mceText {color:#888}
|
102
|
+
.defaultSkin .mceMenuItemSelected .mceIcon {background:url(img/menu_check.gif)}
|
103
|
+
.defaultSkin .mceNoIcons .mceMenuItemSelected a {background:url(img/menu_arrow.gif) no-repeat -6px center}
|
104
|
+
.defaultSkin .mceMenu span.mceMenuLine {display:none}
|
105
|
+
.defaultSkin .mceMenuItemSub a {background:url(img/menu_arrow.gif) no-repeat top right;}
|
106
|
+
|
107
|
+
/* Progress,Resize */
|
108
|
+
.defaultSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50); background:#FFF}
|
109
|
+
.defaultSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px}
|
110
|
+
|
111
|
+
/* Formats */
|
112
|
+
.defaultSkin .mce_formatPreview a {font-size:10px}
|
113
|
+
.defaultSkin .mce_p span.mceText {}
|
114
|
+
.defaultSkin .mce_address span.mceText {font-style:italic}
|
115
|
+
.defaultSkin .mce_pre span.mceText {font-family:monospace}
|
116
|
+
.defaultSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em}
|
117
|
+
.defaultSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em}
|
118
|
+
.defaultSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em}
|
119
|
+
.defaultSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em}
|
120
|
+
.defaultSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em}
|
121
|
+
.defaultSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em}
|
122
|
+
|
123
|
+
/* Theme */
|
124
|
+
.defaultSkin span.mce_bold {background-position:0 0}
|
125
|
+
.defaultSkin span.mce_italic {background-position:-60px 0}
|
126
|
+
.defaultSkin span.mce_underline {background-position:-140px 0}
|
127
|
+
.defaultSkin span.mce_strikethrough {background-position:-120px 0}
|
128
|
+
.defaultSkin span.mce_undo {background-position:-160px 0}
|
129
|
+
.defaultSkin span.mce_redo {background-position:-100px 0}
|
130
|
+
.defaultSkin span.mce_cleanup {background-position:-40px 0}
|
131
|
+
.defaultSkin span.mce_bullist {background-position:-20px 0}
|
132
|
+
.defaultSkin span.mce_numlist {background-position:-80px 0}
|
133
|
+
.defaultSkin span.mce_justifyleft {background-position:-460px 0}
|
134
|
+
.defaultSkin span.mce_justifyright {background-position:-480px 0}
|
135
|
+
.defaultSkin span.mce_justifycenter {background-position:-420px 0}
|
136
|
+
.defaultSkin span.mce_justifyfull {background-position:-440px 0}
|
137
|
+
.defaultSkin span.mce_anchor {background-position:-200px 0}
|
138
|
+
.defaultSkin span.mce_indent {background-position:-400px 0}
|
139
|
+
.defaultSkin span.mce_outdent {background-position:-540px 0}
|
140
|
+
.defaultSkin span.mce_link {background-position:-500px 0}
|
141
|
+
.defaultSkin span.mce_unlink {background-position:-640px 0}
|
142
|
+
.defaultSkin span.mce_sub {background-position:-600px 0}
|
143
|
+
.defaultSkin span.mce_sup {background-position:-620px 0}
|
144
|
+
.defaultSkin span.mce_removeformat {background-position:-580px 0}
|
145
|
+
.defaultSkin span.mce_newdocument {background-position:-520px 0}
|
146
|
+
.defaultSkin span.mce_image {background-position:-380px 0}
|
147
|
+
.defaultSkin span.mce_help {background-position:-340px 0}
|
148
|
+
.defaultSkin span.mce_code {background-position:-260px 0}
|
149
|
+
.defaultSkin span.mce_hr {background-position:-360px 0}
|
150
|
+
.defaultSkin span.mce_visualaid {background-position:-660px 0}
|
151
|
+
.defaultSkin span.mce_charmap {background-position:-240px 0}
|
152
|
+
.defaultSkin span.mce_paste {background-position:-560px 0}
|
153
|
+
.defaultSkin span.mce_copy {background-position:-700px 0}
|
154
|
+
.defaultSkin span.mce_cut {background-position:-680px 0}
|
155
|
+
.defaultSkin span.mce_blockquote {background-position:-220px 0}
|
156
|
+
.defaultSkin .mce_forecolor span.mceAction {background-position:-720px 0}
|
157
|
+
.defaultSkin .mce_backcolor span.mceAction {background-position:-760px 0}
|
158
|
+
.defaultSkin span.mce_forecolorpicker {background-position:-720px 0}
|
159
|
+
.defaultSkin span.mce_backcolorpicker {background-position:-760px 0}
|
160
|
+
|
161
|
+
/* Plugins */
|
162
|
+
.defaultSkin span.mce_advhr {background-position:-0px -20px}
|
163
|
+
.defaultSkin span.mce_ltr {background-position:-20px -20px}
|
164
|
+
.defaultSkin span.mce_rtl {background-position:-40px -20px}
|
165
|
+
.defaultSkin span.mce_emotions {background-position:-60px -20px}
|
166
|
+
.defaultSkin span.mce_fullpage {background-position:-80px -20px}
|
167
|
+
.defaultSkin span.mce_fullscreen {background-position:-100px -20px}
|
168
|
+
.defaultSkin span.mce_iespell {background-position:-120px -20px}
|
169
|
+
.defaultSkin span.mce_insertdate {background-position:-140px -20px}
|
170
|
+
.defaultSkin span.mce_inserttime {background-position:-160px -20px}
|
171
|
+
.defaultSkin span.mce_absolute {background-position:-180px -20px}
|
172
|
+
.defaultSkin span.mce_backward {background-position:-200px -20px}
|
173
|
+
.defaultSkin span.mce_forward {background-position:-220px -20px}
|
174
|
+
.defaultSkin span.mce_insert_layer {background-position:-240px -20px}
|
175
|
+
.defaultSkin span.mce_insertlayer {background-position:-260px -20px}
|
176
|
+
.defaultSkin span.mce_movebackward {background-position:-280px -20px}
|
177
|
+
.defaultSkin span.mce_moveforward {background-position:-300px -20px}
|
178
|
+
.defaultSkin span.mce_media {background-position:-320px -20px}
|
179
|
+
.defaultSkin span.mce_nonbreaking {background-position:-340px -20px}
|
180
|
+
.defaultSkin span.mce_pastetext {background-position:-360px -20px}
|
181
|
+
.defaultSkin span.mce_pasteword {background-position:-380px -20px}
|
182
|
+
.defaultSkin span.mce_selectall {background-position:-400px -20px}
|
183
|
+
.defaultSkin span.mce_preview {background-position:-420px -20px}
|
184
|
+
.defaultSkin span.mce_print {background-position:-440px -20px}
|
185
|
+
.defaultSkin span.mce_cancel {background-position:-460px -20px}
|
186
|
+
.defaultSkin span.mce_save {background-position:-480px -20px}
|
187
|
+
.defaultSkin span.mce_replace {background-position:-500px -20px}
|
188
|
+
.defaultSkin span.mce_search {background-position:-520px -20px}
|
189
|
+
.defaultSkin span.mce_styleprops {background-position:-560px -20px}
|
190
|
+
.defaultSkin span.mce_table {background-position:-580px -20px}
|
191
|
+
.defaultSkin span.mce_cell_props {background-position:-600px -20px}
|
192
|
+
.defaultSkin span.mce_delete_table {background-position:-620px -20px}
|
193
|
+
.defaultSkin span.mce_delete_col {background-position:-640px -20px}
|
194
|
+
.defaultSkin span.mce_delete_row {background-position:-660px -20px}
|
195
|
+
.defaultSkin span.mce_col_after {background-position:-680px -20px}
|
196
|
+
.defaultSkin span.mce_col_before {background-position:-700px -20px}
|
197
|
+
.defaultSkin span.mce_row_after {background-position:-720px -20px}
|
198
|
+
.defaultSkin span.mce_row_before {background-position:-740px -20px}
|
199
|
+
.defaultSkin span.mce_merge_cells {background-position:-760px -20px}
|
200
|
+
.defaultSkin span.mce_table_props {background-position:-980px -20px}
|
201
|
+
.defaultSkin span.mce_row_props {background-position:-780px -20px}
|
202
|
+
.defaultSkin span.mce_split_cells {background-position:-800px -20px}
|
203
|
+
.defaultSkin span.mce_template {background-position:-820px -20px}
|
204
|
+
.defaultSkin span.mce_visualchars {background-position:-840px -20px}
|
205
|
+
.defaultSkin span.mce_abbr {background-position:-860px -20px}
|
206
|
+
.defaultSkin span.mce_acronym {background-position:-880px -20px}
|
207
|
+
.defaultSkin span.mce_attribs {background-position:-900px -20px}
|
208
|
+
.defaultSkin span.mce_cite {background-position:-920px -20px}
|
209
|
+
.defaultSkin span.mce_del {background-position:-940px -20px}
|
210
|
+
.defaultSkin span.mce_ins {background-position:-960px -20px}
|
211
|
+
.defaultSkin span.mce_pagebreak {background-position:0 -40px}
|
212
|
+
.defaultSkin span.mce_restoredraft {background-position:-20px -40px}
|
213
|
+
.defaultSkin span.mce_spellchecker {background-position:-540px -20px}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
2
|
+
<head>
|
3
|
+
<title>{#advanced_dlg.code_title}</title>
|
4
|
+
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
5
|
+
<script type="text/javascript" src="js/source_editor.js"></script>
|
6
|
+
</head>
|
7
|
+
<body onresize="resizeInputs();" style="display:none; overflow:hidden;">
|
8
|
+
<form name="source" onsubmit="saveContent();return false;" action="#">
|
9
|
+
<div style="float: left" class="title">{#advanced_dlg.code_title}</div>
|
10
|
+
|
11
|
+
<div id="wrapline" style="float: right">
|
12
|
+
<input type="checkbox" name="wraped" id="wraped" onclick="toggleWordWrap(this);" class="wordWrapCode" /><label for="wraped">{#advanced_dlg.code_wordwrap}</label>
|
13
|
+
</div>
|
14
|
+
|
15
|
+
<br style="clear: both" />
|
16
|
+
|
17
|
+
<textarea name="htmlSource" id="htmlSource" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,monospace; font-size: 12px;" dir="ltr" wrap="off" class="mceFocus"></textarea>
|
18
|
+
|
19
|
+
<div class="mceActionPanel">
|
20
|
+
<input type="submit" name="insert" value="{#update}" id="insert" />
|
21
|
+
<input type="button" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" id="cancel" />
|
22
|
+
</div>
|
23
|
+
</form>
|
24
|
+
</body>
|
25
|
+
</html>
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(d){var a=/^\s*|\s*$/g,e,c="B".replace(/A(.)|B/,"$1")==="$1";var b={majorVersion:"3",minorVersion:"3.9.2",releaseDate:"2010-09-29",_init:function(){var s=this,q=document,o=navigator,g=o.userAgent,m,f,l,k,j,r;s.isOpera=d.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.isGecko=!s.isWebKit&&/Gecko/.test(g);s.isMac=g.indexOf("Mac")!=-1;s.isAir=/adobeair/i.test(g);s.isIDevice=/(iPad|iPhone)/.test(g);if(d.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++){if(r=f[m].href){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!==e}if(f=="array"&&(g.hasOwnProperty&&g instanceof Array)){return true}return typeof(g)==f},each:function(i,f,h){var j,g;if(!i){return 0}h=h||i;if(i.length!==e){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},trim:function(f){return(f?""+f:"").replace(a,"")},create:function(n,f){var m=this,g,i,j,k,h,l=0;n=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(n);j=n[3].match(/(^|\.)(\w+)$/i)[2];i=m.createNS(n[3].replace(/\.\w+$/,""));if(i[j]){return}if(n[2]=="static"){i[j]=f;if(this.onCreate){this.onCreate(n[2],n[3],i[j])}return}if(!f[j]){f[j]=function(){};l=1}i[j]=f[j];m.extend(i[j].prototype,f);if(n[5]){g=m.resolve(n[5]).prototype;k=n[5].match(/\.(\w+)$/i)[1];h=i[j];if(l){i[j]=function(){return g[k].apply(this,arguments)}}else{i[j]=function(){this.parent=g[k];return h.apply(this,arguments)}}i[j].prototype[j]=i[j];m.each(g,function(o,p){i[j].prototype[p]=g[p]});m.each(f,function(o,p){if(g[p]){i[j].prototype[p]=function(){this.parent=g[p];return o.apply(this,arguments)}}else{if(p!=j){i[j].prototype[p]=o}}})}m.each(f["static"],function(o,p){i[j][p]=o});if(this.onCreate){this.onCreate(n[2],n[3],i[j].prototype)}},walk:function(i,h,j,g){g=g||this;if(i){if(j){i=i[j]}b.each(i,function(k,f){if(h.call(g,k,f,j)===false){return false}b.walk(k,h,j,g)})}},createNS:function(j,h){var g,f;h=h||d;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||d;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;j={func:j,scope:i||this};if(!h.unloads){function g(){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(d.detachEvent){d.detachEvent("onbeforeunload",k);d.detachEvent("onunload",g)}else{if(d.removeEventListener){d.removeEventListener("unload",g,false)}}h.unloads=l=f=w=g=0;if(d.CollectGarbage){CollectGarbage()}}}function k(){var l=document;if(l.readyState=="interactive"){function f(){l.detachEvent("onstop",f);if(g){g()}l=0}if(l){l.attachEvent("onstop",f)}d.setTimeout(function(){if(l){l.detachEvent("onstop",f)}},0)}}if(d.attachEvent){d.attachEvent("onunload",g);d.attachEvent("onbeforeunload",k)}else{if(d.addEventListener){d.addEventListener("unload",g,false)}}h.unloads=[j]}else{h.unloads.push(j)}return j},removeUnload:function(i){var g=this.unloads,h=null;b.each(g,function(j,f){if(j&&j.func==i){g.splice(f,1);h=i;return false}});return h},explode:function(f,g){return f?b.map(f.split(g||","),b.trim):f},_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(c){return g.replace(h,function(){var l=f,j=arguments,k;for(k=0;k<j.length-2;k++){if(j[k]===e){l=l.replace(new RegExp("\\$"+k,"g"),"")}else{l=l.replace(new RegExp("\\$"+k,"g"),j[k])}}return l})}return g.replace(h,f)}};b._init();d.tinymce=d.tinyMCE=b})(window);(function(e,d){var c=d.is,b=/^(href|src|style)$/i,f;if(!e){return alert("Load jQuery first!")}d.$=e;d.adapter={patchEditor:function(j){var i=e.fn;function h(n,o){var m=this;if(o){m.removeAttr("_mce_style")}return i.css.apply(m,arguments)}function g(n,o){var m=this;if(b.test(n)){if(o!==f){m.each(function(p,q){j.dom.setAttrib(q,n,o)});return m}else{return m.attr("_mce_"+n)}}return i.attr.apply(m,arguments)}function k(m){return function(n){if(n){n=j.dom.processHTML(n)}return m.call(this,n)}}function l(m){if(m.css!==h){m.css=h;m.attr=g;m.html=k(i.html);m.append=k(i.append);m.prepend=k(i.prepend);m.after=k(i.after);m.before=k(i.before);m.replaceWith=k(i.replaceWith);m.tinymce=j;m.pushStack=function(){return l(i.pushStack.apply(this,arguments))}}return m}j.$=function(m,n){var o=j.getDoc();return l(e(m||o,o||n))}}};d.extend=e.extend;d.extend(d,{map:e.map,grep:function(g,h){return e.grep(g,h||function(){return 1})},inArray:function(g,h){return e.inArray(h,g||[])}});var a={"tinymce.dom.DOMUtils":{select:function(i,h){var g=this;return e.find(i,g.get(h)||g.get(g.settings.root_element)||g.doc,[])},is:function(h,g){return e(this.get(h)).is(g)}}};d.onCreate=function(g,i,h){d.extend(h,a[i])}})(window.jQuery,tinymce);tinymce.create("tinymce.util.Dispatcher",{scope:null,listeners:null,Dispatcher:function(a){this.scope=a||this;this.listeners=[]},add:function(a,b){this.listeners.push({cb:a,scope:b||this.scope});return a},addToTop:function(a,b){this.listeners.unshift({cb:a,scope:b||this.scope});return a},remove:function(a){var b=this.listeners,c=null;tinymce.each(b,function(e,d){if(a==e.cb){c=a;b.splice(d,1);return false}});return c},dispatch:function(){var f,d=arguments,e,b=this.listeners,g;for(e=0;e<b.length;e++){g=b[e];f=g.cb.apply(g.scope,d);if(f===false){break}}return f}});(function(){var a=tinymce.each;tinymce.create("tinymce.util.URI",{URI:function(e,g){var f=this,h,d,c;e=tinymce.trim(e);g=f.settings=g||{};if(/^(mailto|tel|news|javascript|about|data):/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)){e=(g.base_uri.protocol||"http")+"://mce_host"+f.toAbsPath(g.base_uri.path,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});if(c=g.base_uri){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 c=this,d;if(b==="./"){return b}b=new tinymce.util.URI(b,{base_uri:c});if((b.host!="mce_host"&&c.host!=b.host&&b.host)||c.port!=b.port||c.protocol!=b.protocol){return b.getURI()}d=c.toRelPath(c.path,b.path);if(b.query){d+="?"+b.query}if(b.anchor){d+="#"+b.anchor}return d},toAbsolute:function(b,c){var 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(e,b){var c=new Date();c.setTime(c.getTime()-1000);this.set(e,"",c,b,c)}})})();tinymce.create("static tinymce.util.JSON",{serialize:function(e){var c,a,d=tinymce.util.JSON.serialize,b;if(e==null){return"null"}b=typeof e;if(b=="string"){a="\bb\tt\nn\ff\rr\"\"''\\\\";return'"'+e.replace(/([\u0080-\uFFFF\x00-\x1f\"])/g,function(g,f){c=a.indexOf(f);if(c+1){return"\\"+a.charAt(c+1)}g=f.charCodeAt().toString(16);return"\\u"+"0000".substring(g.length)+g})+'"'}if(b=="object"){if(e.hasOwnProperty&&e instanceof Array){for(c=0,a="[";c<e.length;c++){a+=(c>0?",":"")+d(e[c])}return a+"]"}a="{";for(c in e){a+=typeof e[c]!="function"?(a.length>1?',"':'"')+c+'":'+d(e[c]):""}return a+"}"}return""+e},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;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);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)}}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){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(m){var k=m.each,j=m.is,i=m.isWebKit,d=m.isIE,a=/^(H[1-6R]|P|DIV|ADDRESS|PRE|FORM|T(ABLE|BODY|HEAD|FOOT|H|R|D)|LI|OL|UL|CAPTION|BLOCKQUOTE|CENTER|DL|DT|DD|DIR|FIELDSET|NOSCRIPT|MENU|ISINDEX|SAMP)$/,e=g("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),f=g("src,href,style,coords,shape"),c={"&":"&",'"':""","<":"<",">":">"},n=/[<>&\"]/g,b=/^([a-z0-9],?)+$/i,h=/<(\w+)((?:\s+\w+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)(\s*\/?)>/g,l=/(\w+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g;function g(q){var p={},o;q=q.split(",");for(o=q.length;o>=0;o--){p[q[o]]=1}return p}m.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(u,q){var p=this,o;p.doc=u;p.win=window;p.files={};p.cssFlicker=false;p.counter=0;p.stdMode=u.documentMode>=8;p.boxModel=!m.isIE||u.compatMode=="CSS1Compat"||p.stdMode;p.settings=q=m.extend({keep_values:false,hex_colors:1,process_html:1},q);if(m.isIE6){try{u.execCommand("BackgroundImageCache",false,true)}catch(r){p.cssFlicker=true}}if(q.valid_styles){p._styles={};k(q.valid_styles,function(t,s){p._styles[s]=m.explode(t)})}m.addUnload(p.destroy,p)},getRoot:function(){var o=this,p=o.settings;return(p&&o.get(p.root_element))||o.doc.body},getViewPort:function(p){var q,o;p=!p?this.win:p;q=p.document;o=this.boxModel?q.documentElement:q.body;return{x:p.pageXOffset||o.scrollLeft,y:p.pageYOffset||o.scrollTop,w:p.innerWidth||o.clientWidth,h:p.innerHeight||o.clientHeight}},getRect:function(s){var r,o=this,q;s=o.get(s);r=o.getPos(s);q=o.getSize(s);return{x:r.x,y:r.y,w:q.w,h:q.h}},getSize:function(r){var p=this,o,q;r=p.get(r);o=p.getStyle(r,"width");q=p.getStyle(r,"height");if(o.indexOf("px")===-1){o=0}if(q.indexOf("px")===-1){q=0}return{w:parseInt(o)||r.offsetWidth||r.clientWidth,h:parseInt(q)||r.offsetHeight||r.clientHeight}},getParent:function(q,p,o){return this.getParents(q,p,o,false)},getParents:function(z,v,s,y){var q=this,p,u=q.settings,x=[];z=q.get(z);y=y===undefined;if(u.strict_root){s=s||q.getRoot()}if(j(v,"string")){p=v;if(v==="*"){v=function(o){return o.nodeType==1}}else{v=function(o){return q.is(o,p)}}}while(z){if(z==s||!z.nodeType||z.nodeType===9){break}if(!v||v(z)){if(y){x.push(z)}else{return z}}z=z.parentNode}return y?x:null},get:function(o){var p;if(o&&this.doc&&typeof(o)=="string"){p=o;o=this.doc.getElementById(o);if(o&&o.id!==p){return this.doc.getElementsByName(p)[1]}}return o},getNext:function(p,o){return this._findSib(p,o,"nextSibling")},getPrev:function(p,o){return this._findSib(p,o,"previousSibling")},add:function(s,v,o,r,u){var q=this;return this.run(s,function(y){var x,t;x=j(v,"string")?q.doc.createElement(v):v;q.setAttribs(x,o);if(r){if(r.nodeType){x.appendChild(r)}else{q.setHTML(x,r)}}return !u?y.appendChild(x):x})},create:function(q,o,p){return this.add(this.doc.createElement(q),q,o,p,1)},createHTML:function(v,p,s){var u="",r=this,q;u+="<"+v;for(q in p){if(p.hasOwnProperty(q)){u+=" "+q+'="'+r.encode(p[q])+'"'}}if(typeof(s)!="undefined"){return u+">"+s+"</"+v+">"}return u+" />"},remove:function(o,p){return this.run(o,function(r){var q,s;q=r.parentNode;if(!q){return null}if(p){while(s=r.firstChild){if(!m.isIE||s.nodeType!==3||s.nodeValue){q.insertBefore(s,r)}else{r.removeChild(s)}}}return q.removeChild(r)})},setStyle:function(r,o,p){var q=this;return q.run(r,function(v){var u,t;u=v.style;o=o.replace(/-(\D)/g,function(x,s){return s.toUpperCase()});if(q.pixelStyles.test(o)&&(m.is(p,"number")||/^[\-0-9\.]+$/.test(p))){p+="px"}switch(o){case"opacity":if(d){u.filter=p===""?"":"alpha(opacity="+(p*100)+")";if(!r.currentStyle||!r.currentStyle.hasLayout){u.display="inline-block"}}u[o]=u["-moz-opacity"]=u["-khtml-opacity"]=p||"";break;case"float":d?u.styleFloat=p:u.cssFloat=p;break;default:u[o]=p||""}if(q.settings.update_styles){q.setAttrib(v,"_mce_style")}})},getStyle:function(r,o,q){r=this.get(r);if(!r){return false}if(this.doc.defaultView&&q){o=o.replace(/[A-Z]/g,function(s){return"-"+s});try{return this.doc.defaultView.getComputedStyle(r,null).getPropertyValue(o)}catch(p){return null}}o=o.replace(/-(\D)/g,function(t,s){return s.toUpperCase()});if(o=="float"){o=d?"styleFloat":"cssFloat"}if(r.currentStyle&&q){return r.currentStyle[o]}return r.style[o]},setStyles:function(u,v){var q=this,r=q.settings,p;p=r.update_styles;r.update_styles=0;k(v,function(o,s){q.setStyle(u,s,o)});r.update_styles=p;if(r.update_styles){q.setAttrib(u,r.cssText)}},setAttrib:function(q,r,o){var p=this;if(!q||!r){return}if(p.settings.strict){r=r.toLowerCase()}return this.run(q,function(u){var t=p.settings;switch(r){case"style":if(!j(o,"string")){k(o,function(s,x){p.setStyle(u,x,s)});return}if(t.keep_values){if(o&&!p._isRes(o)){u.setAttribute("_mce_style",o,2)}else{u.removeAttribute("_mce_style",2)}}u.style.cssText=o;break;case"class":u.className=o||"";break;case"src":case"href":if(t.keep_values){if(t.url_converter){o=t.url_converter.call(t.url_converter_scope||p,o,r,u)}p.setAttrib(u,"_mce_"+r,o,2)}break;case"shape":u.setAttribute("_mce_style",o);break}if(j(o)&&o!==null&&o.length!==0){u.setAttribute(r,""+o,2)}else{u.removeAttribute(r,2)}})},setAttribs:function(q,r){var p=this;return this.run(q,function(o){k(r,function(s,t){p.setAttrib(o,t,s)})})},getAttrib:function(r,s,q){var o,p=this;r=p.get(r);if(!r||r.nodeType!==1){return false}if(!j(q)){q=""}if(/^(src|href|style|coords|shape)$/.test(s)){o=r.getAttribute("_mce_"+s);if(o){return o}}if(d&&p.props[s]){o=r[p.props[s]];o=o&&o.nodeValue?o.nodeValue:o}if(!o){o=r.getAttribute(s,2)}if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(s)){if(r[p.props[s]]===true&&o===""){return s}return o?s:""}if(r.nodeName==="FORM"&&r.getAttributeNode(s)){return r.getAttributeNode(s).nodeValue}if(s==="style"){o=o||r.style.cssText;if(o){o=p.serializeStyle(p.parseStyle(o),r.nodeName);if(p.settings.keep_values&&!p._isRes(o)){r.setAttribute("_mce_style",o)}}}if(i&&s==="class"&&o){o=o.replace(/(apple|webkit)\-[a-z\-]+/gi,"")}if(d){switch(s){case"rowspan":case"colspan":if(o===1){o=""}break;case"size":if(o==="+0"||o===20||o===0){o=""}break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":if(o===0){o=""}break;case"hspace":if(o===-1){o=""}break;case"maxlength":case"tabindex":if(o===32768||o===2147483647||o==="32768"){o=""}break;case"multiple":case"compact":case"noshade":case"nowrap":if(o===65535){return s}return q;case"shape":o=o.toLowerCase();break;default:if(s.indexOf("on")===0&&o){o=m._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1",""+o)}}}return(o!==undefined&&o!==null&&o!=="")?""+o:q},getPos:function(A,s){var p=this,o=0,z=0,u,v=p.doc,q;A=p.get(A);s=s||v.body;if(A){if(d&&!p.stdMode){A=A.getBoundingClientRect();u=p.boxModel?v.documentElement:v.body;o=p.getStyle(p.select("html")[0],"borderWidth");o=(o=="medium"||p.boxModel&&!p.isIE6)&&2||o;return{x:A.left+u.scrollLeft-o,y:A.top+u.scrollTop-o}}q=A;while(q&&q!=s&&q.nodeType){o+=q.offsetLeft||0;z+=q.offsetTop||0;q=q.offsetParent}q=A.parentNode;while(q&&q!=s&&q.nodeType){o-=q.scrollLeft||0;z-=q.scrollTop||0;q=q.parentNode}}return{x:o,y:z}},parseStyle:function(r){var u=this,v=u.settings,x={};if(!r){return x}function p(D,A,C){var z,B,o,y;z=x[D+"-top"+A];if(!z){return}B=x[D+"-right"+A];if(z!=B){return}o=x[D+"-bottom"+A];if(B!=o){return}y=x[D+"-left"+A];if(o!=y){return}x[C]=y;delete x[D+"-top"+A];delete x[D+"-right"+A];delete x[D+"-bottom"+A];delete x[D+"-left"+A]}function q(y,s,o,A){var z;z=x[s];if(!z){return}z=x[o];if(!z){return}z=x[A];if(!z){return}x[y]=x[s]+" "+x[o]+" "+x[A];delete x[s];delete x[o];delete x[A]}r=r.replace(/&(#?[a-z0-9]+);/g,"&$1_MCE_SEMI_");k(r.split(";"),function(s){var o,t=[];if(s){s=s.replace(/_MCE_SEMI_/g,";");s=s.replace(/url\([^\)]+\)/g,function(y){t.push(y);return"url("+t.length+")"});s=s.split(":");o=m.trim(s[1]);o=o.replace(/url\(([^\)]+)\)/g,function(z,y){return t[parseInt(y)-1]});o=o.replace(/rgb\([^\)]+\)/g,function(y){return u.toHex(y)});if(v.url_converter){o=o.replace(/url\([\'\"]?([^\)\'\"]+)[\'\"]?\)/g,function(y,z){return"url("+v.url_converter.call(v.url_converter_scope||u,u.decode(z),"style",null)+")"})}x[m.trim(s[0]).toLowerCase()]=o}});p("border","","border");p("border","-width","border-width");p("border","-color","border-color");p("border","-style","border-style");p("padding","","padding");p("margin","","margin");q("border","border-width","border-style","border-color");if(d){if(x.border=="medium none"){x.border=""}}return x},serializeStyle:function(v,p){var q=this,r="";function u(s,o){if(o&&s){if(o.indexOf("-")===0){return}switch(o){case"font-weight":if(s==700){s="bold"}break;case"color":case"background-color":s=s.toLowerCase();break}r+=(r?" ":"")+o+": "+s+";"}}if(p&&q._styles){k(q._styles["*"],function(o){u(v[o],o)});k(q._styles[p.toLowerCase()],function(o){u(v[o],o)})}else{k(v,u)}return r},loadCSS:function(o){var q=this,r=q.doc,p;if(!o){o=""}p=q.select("head")[0];k(o.split(","),function(s){var t;if(q.files[s]){return}q.files[s]=true;t=q.create("link",{rel:"stylesheet",href:m._addVer(s)});if(d&&r.documentMode&&r.recalc){t.onload=function(){r.recalc();t.onload=null}}p.appendChild(t)})},addClass:function(o,p){return this.run(o,function(q){var r;if(!p){return 0}if(this.hasClass(q,p)){return q.className}r=this.removeClass(q,p);return q.className=(r!=""?(r+" "):"")+p})},removeClass:function(q,r){var o=this,p;return o.run(q,function(t){var s;if(o.hasClass(t,r)){if(!p){p=new RegExp("(^|\\s+)"+r+"(\\s+|$)","g")}s=t.className.replace(p," ");s=m.trim(s!=" "?s:"");t.className=s;if(!s){t.removeAttribute("class");t.removeAttribute("className")}return s}return t.className})},hasClass:function(p,o){p=this.get(p);if(!p||!o){return false}return(" "+p.className+" ").indexOf(" "+o+" ")!==-1},show:function(o){return this.setStyle(o,"display","block")},hide:function(o){return this.setStyle(o,"display","none")},isHidden:function(o){o=this.get(o);return !o||o.style.display=="none"||this.getStyle(o,"display")=="none"},uniqueId:function(o){return(!o?"mce_":o)+(this.counter++)},setHTML:function(q,p){var o=this;return this.run(q,function(v){var r,t,s,z,u,r;p=o.processHTML(p);if(d){function y(){while(v.firstChild){v.firstChild.removeNode()}try{v.innerHTML="<br />"+p;v.removeChild(v.firstChild)}catch(x){r=o.create("div");r.innerHTML="<br />"+p;k(r.childNodes,function(B,A){if(A){v.appendChild(B)}})}}if(o.settings.fix_ie_paragraphs){p=p.replace(/<p><\/p>|<p([^>]+)><\/p>|<p[^\/+]\/>/gi,'<p$1 _mce_keep="true"> </p>')}y();if(o.settings.fix_ie_paragraphs){s=v.getElementsByTagName("p");for(t=s.length-1,r=0;t>=0;t--){z=s[t];if(!z.hasChildNodes()){if(!z._mce_keep){r=1;break}z.removeAttribute("_mce_keep")}}}if(r){p=p.replace(/<p ([^>]+)>|<p>/ig,'<div $1 _mce_tmp="1">');p=p.replace(/<\/p>/gi,"</div>");y();if(o.settings.fix_ie_paragraphs){s=v.getElementsByTagName("DIV");for(t=s.length-1;t>=0;t--){z=s[t];if(z._mce_tmp){u=o.doc.createElement("p");z.cloneNode(false).outerHTML.replace(/([a-z0-9\-_]+)=/gi,function(A,x){var B;if(x!=="_mce_tmp"){B=z.getAttribute(x);if(!B&&x==="class"){B=z.className}u.setAttribute(x,B)}});for(r=0;r<z.childNodes.length;r++){u.appendChild(z.childNodes[r].cloneNode(true))}z.swapNode(u)}}}}}else{v.innerHTML=p}return p})},processHTML:function(r){var p=this,q=p.settings,v=[];if(!q.process_html){return r}if(d){r=r.replace(/'/g,"'");r=r.replace(/\s+(disabled|checked|readonly|selected)\s*=\s*[\"\']?(false|0)[\"\']?/gi,"")}r=m._replace(/<a( )([^>]+)\/>|<a\/>/gi,"<a$1$2></a>",r);if(q.keep_values){if(/<script|noscript|style/i.test(r)){function o(t){t=t.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n");t=t.replace(/^[\r\n]*|[\r\n]*$/g,"");t=t.replace(/^\s*(\/\/\s*<!--|\/\/\s*<!\[CDATA\[|<!--|<!\[CDATA\[)[\r\n]*/g,"");t=t.replace(/\s*(\/\/\s*\]\]>|\/\/\s*-->|\]\]>|-->|\]\]-->)\s*$/g,"");return t}r=r.replace(/<script([^>]+|)>([\s\S]*?)<\/script>/gi,function(s,x,t){if(!x){x=' type="text/javascript"'}x=x.replace(/src=\"([^\"]+)\"?/i,function(y,z){if(q.url_converter){z=p.encode(q.url_converter.call(q.url_converter_scope||p,p.decode(z),"src","script"))}return'_mce_src="'+z+'"'});if(m.trim(t)){v.push(o(t));t="<!--\nMCE_SCRIPT:"+(v.length-1)+"\n// -->"}return"<mce:script"+x+">"+t+"</mce:script>"});r=r.replace(/<style([^>]+|)>([\s\S]*?)<\/style>/gi,function(s,x,t){if(t){v.push(o(t));t="<!--\nMCE_SCRIPT:"+(v.length-1)+"\n-->"}return"<mce:style"+x+">"+t+"</mce:style><style "+x+' _mce_bogus="1">'+t+"</style>"});r=r.replace(/<noscript([^>]+|)>([\s\S]*?)<\/noscript>/g,function(s,x,t){return"<mce:noscript"+x+"><!--"+p.encode(t).replace(/--/g,"--")+"--></mce:noscript>"})}r=m._replace(/<!\[CDATA\[([\s\S]+)\]\]>/g,"<!--[CDATA[$1]]-->",r);function u(s){return s.replace(h,function(y,z,x,t){return"<"+z+x.replace(l,function(B,A,E,D,C){var F;A=A.toLowerCase();E=E||D||C||"";if(e[A]){if(E==="false"||E==="0"){return}return A+'="'+A+'"'}if(f[A]&&x.indexOf("_mce_"+A)==-1){F=p.decode(E);if(q.url_converter&&(A=="src"||A=="href")){F=q.url_converter.call(q.url_converter_scope||p,F,A,z)}if(A=="style"){F=p.serializeStyle(p.parseStyle(F),A)}return A+'="'+E+'" _mce_'+A+'="'+p.encode(F)+'"'}return B})+t+">"})}r=u(r);r=r.replace(/MCE_SCRIPT:([0-9]+)/g,function(t,s){return v[s]})}return r},getOuterHTML:function(o){var p;o=this.get(o);if(!o){return null}if(o.outerHTML!==undefined){return o.outerHTML}p=(o.ownerDocument||this.doc).createElement("body");p.appendChild(o.cloneNode(true));return p.innerHTML},setOuterHTML:function(r,p,s){var o=this;function q(u,t,x){var y,v;v=x.createElement("body");v.innerHTML=t;y=v.lastChild;while(y){o.insertAfter(y.cloneNode(true),u);y=y.previousSibling}o.remove(u)}return this.run(r,function(u){u=o.get(u);if(u.nodeType==1){s=s||u.ownerDocument||o.doc;if(d){try{if(d&&u.nodeType==1){u.outerHTML=p}else{q(u,p,s)}}catch(t){q(u,p,s)}}else{q(u,p,s)}}})},decode:function(p){var q,r,o;if(/&[\w#]+;/.test(p)){q=this.doc.createElement("div");q.innerHTML=p;r=q.firstChild;o="";if(r){do{o+=r.nodeValue}while(r=r.nextSibling)}return o||p}return p},encode:function(o){return(""+o).replace(n,function(p){return c[p]})},insertAfter:function(o,p){p=this.get(p);return this.run(o,function(r){var q,s;q=p.parentNode;s=p.nextSibling;if(s){q.insertBefore(r,s)}else{q.appendChild(r)}return r})},isBlock:function(o){if(o.nodeType&&o.nodeType!==1){return false}o=o.nodeName||o;return a.test(o)},replace:function(s,r,p){var q=this;if(j(r,"array")){s=s.cloneNode(true)}return q.run(r,function(t){if(p){k(m.grep(t.childNodes),function(o){s.appendChild(o)})}return t.parentNode.replaceChild(s,t)})},rename:function(r,o){var q=this,p;if(r.nodeName!=o.toUpperCase()){p=q.create(o);k(q.getAttribs(r),function(s){q.setAttrib(p,s.nodeName,q.getAttrib(r,s.nodeName))});q.replace(p,r,1)}return p||r},findCommonAncestor:function(q,o){var r=q,p;while(r){p=o;while(p&&r!=p){p=p.parentNode}if(r==p){break}r=r.parentNode}if(!r&&q.ownerDocument){return q.ownerDocument.documentElement}return r},toHex:function(o){var q=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(o);function p(r){r=parseInt(r).toString(16);return r.length>1?r:"0"+r}if(q){o="#"+p(q[1])+p(q[2])+p(q[3]);return o}return o},getClasses:function(){var s=this,o=[],r,u={},v=s.settings.class_filter,q;if(s.classes){return s.classes}function x(t){k(t.imports,function(y){x(y)});k(t.cssRules||t.rules,function(y){switch(y.type||1){case 1:if(y.selectorText){k(y.selectorText.split(","),function(z){z=z.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(z)||!/\.[\w\-]+$/.test(z)){return}q=z;z=m._replace(/.*\.([a-z0-9_\-]+).*/i,"$1",z);if(v&&!(z=v(z,q))){return}if(!u[z]){o.push({"class":z});u[z]=1}})}break;case 3:x(y.styleSheet);break}})}try{k(s.doc.styleSheets,x)}catch(p){}if(o.length>0){s.classes=o}return o},run:function(u,r,q){var p=this,v;if(p.doc&&typeof(u)==="string"){u=p.get(u)}if(!u){return false}q=q||this;if(!u.nodeType&&(u.length||u.length===0)){v=[];k(u,function(s,o){if(s){if(typeof(s)=="string"){s=p.doc.getElementById(s)}v.push(r.call(q,s,o))}});return v}return r.call(q,u)},getAttribs:function(q){var p;q=this.get(q);if(!q){return[]}if(d){p=[];if(q.nodeName=="OBJECT"){return q.attributes}if(q.nodeName==="OPTION"&&this.getAttrib(q,"selected")){p.push({specified:1,nodeName:"selected"})}q.cloneNode(false).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(o){p.push({specified:1,nodeName:o})});return p}return q.attributes},destroy:function(p){var o=this;if(o.events){o.events.destroy()}o.win=o.doc=o.root=o.events=null;if(!p){m.removeUnload(o.destroy)}},createRng:function(){var o=this.doc;return o.createRange?o.createRange():new m.dom.Range(this)},nodeIndex:function(s,t){var o=0,q,r,p;if(s){for(q=s.nodeType,s=s.previousSibling,r=s;s;s=s.previousSibling){p=s.nodeType;if(t&&p==3){if(p==q||!s.nodeValue.length){continue}}o++;q=p}}return o},split:function(u,s,y){var z=this,o=z.createRng(),v,q,x;function p(A){var t,r=A.childNodes;if(A.nodeType==1&&A.getAttribute("_mce_type")=="bookmark"){return}for(t=r.length-1;t>=0;t--){p(r[t])}if(A.nodeType!=9){if(A.nodeType==3&&A.nodeValue.length>0){if(!z.isBlock(A.parentNode)||m.trim(A.nodeValue).length>0){return}}if(A.nodeType==1){r=A.childNodes;if(r.length==1&&r[0]&&r[0].nodeType==1&&r[0].getAttribute("_mce_type")=="bookmark"){A.parentNode.insertBefore(r[0],A)}if(r.length||/^(br|hr|input|img)$/i.test(A.nodeName)){return}}z.remove(A)}return A}if(u&&s){o.setStart(u.parentNode,z.nodeIndex(u));o.setEnd(s.parentNode,z.nodeIndex(s));v=o.extractContents();o=z.createRng();o.setStart(s.parentNode,z.nodeIndex(s)+1);o.setEnd(u.parentNode,z.nodeIndex(u)+1);q=o.extractContents();x=u.parentNode;x.insertBefore(p(v),u);if(y){x.replaceChild(y,s)}else{x.insertBefore(s,u)}x.insertBefore(p(q),u);z.remove(u);return y||s}},bind:function(s,o,r,q){var p=this;if(!p.events){p.events=new m.dom.EventUtils()}return p.events.add(s,o,r,q||this)},unbind:function(r,o,q){var p=this;if(!p.events){p.events=new m.dom.EventUtils()}return p.events.remove(r,o,q)},_findSib:function(r,o,p){var q=this,s=o;if(r){if(j(s,"string")){s=function(t){return q.is(t,o)}}for(r=r[p];r;r=r[p]){if(s(r)){return r}}}return null},_isRes:function(o){return/^(top|left|bottom|right|width|height)/i.test(o)||/;\s*(top|left|bottom|right|width|height)/i.test(o)}});m.DOM=new m.dom.DOMUtils(document,{process_html:0})})(tinymce);(function(a){function b(c){var N=this,e=c.doc,S=0,E=1,j=2,D=true,R=false,U="startOffset",h="startContainer",P="endContainer",z="endOffset",k=tinymce.extend,n=c.nodeIndex;k(N,{startContainer:e,startOffset:0,endContainer:e,endOffset:0,collapsed:D,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:I,setEndBefore:J,setEndAfter:u,collapse:A,selectNode:x,selectNodeContents:F,compareBoundaryPoints:v,deleteContents:p,extractContents:H,cloneContents:d,insertNode:C,surroundContents:M,cloneRange:K});function q(V,t){B(D,V,t)}function s(V,t){B(R,V,t)}function g(t){q(t.parentNode,n(t))}function I(t){q(t.parentNode,n(t)+1)}function J(t){s(t.parentNode,n(t))}function u(t){s(t.parentNode,n(t)+1)}function A(t){if(t){N[P]=N[h];N[z]=N[U]}else{N[h]=N[P];N[U]=N[z]}N.collapsed=D}function x(t){g(t);u(t)}function F(t){q(t,0);s(t,t.nodeType===1?t.childNodes.length:t.nodeValue.length)}function v(W,X){var Z=N[h],Y=N[U],V=N[P],t=N[z];if(W===0){return G(Z,Y,Z,Y)}if(W===1){return G(Z,Y,V,t)}if(W===2){return G(V,t,V,t)}if(W===3){return G(V,t,Z,Y)}}function p(){m(j)}function H(){return m(S)}function d(){return m(E)}function C(Y){var V=this[h],t=this[U],X,W;if((V.nodeType===3||V.nodeType===4)&&V.nodeValue){if(!t){V.parentNode.insertBefore(Y,V)}else{if(t>=V.nodeValue.length){c.insertAfter(Y,V)}else{X=V.splitText(t);V.parentNode.insertBefore(Y,X)}}}else{if(V.childNodes.length>0){W=V.childNodes[t]}if(W){V.insertBefore(Y,W)}else{V.appendChild(Y)}}}function M(V){var t=N.extractContents();N.insertNode(V);V.appendChild(t);N.selectNode(V)}function K(){return k(new b(c),{startContainer:N[h],startOffset:N[U],endContainer:N[P],endOffset:N[z],collapsed:N.collapsed,commonAncestorContainer:N.commonAncestorContainer})}function O(t,V){var W;if(t.nodeType==3){return t}if(V<0){return t}W=t.firstChild;while(W&&V>0){--V;W=W.nextSibling}if(W){return W}return t}function l(){return(N[h]==N[P]&&N[U]==N[z])}function G(X,Z,V,Y){var aa,W,t,ab,ad,ac;if(X==V){if(Z==Y){return 0}if(Z<Y){return -1}return 1}aa=V;while(aa&&aa.parentNode!=X){aa=aa.parentNode}if(aa){W=0;t=X.firstChild;while(t!=aa&&W<Z){W++;t=t.nextSibling}if(Z<=W){return -1}return 1}aa=X;while(aa&&aa.parentNode!=V){aa=aa.parentNode}if(aa){W=0;t=V.firstChild;while(t!=aa&&W<Y){W++;t=t.nextSibling}if(W<Y){return -1}return 1}ab=c.findCommonAncestor(X,V);ad=X;while(ad&&ad.parentNode!=ab){ad=ad.parentNode}if(!ad){ad=ab}ac=V;while(ac&&ac.parentNode!=ab){ac=ac.parentNode}if(!ac){ac=ab}if(ad==ac){return 0}t=ab.firstChild;while(t){if(t==ad){return -1}if(t==ac){return 1}t=t.nextSibling}}function B(V,Y,X){var t,W;if(V){N[h]=Y;N[U]=X}else{N[P]=Y;N[z]=X}t=N[P];while(t.parentNode){t=t.parentNode}W=N[h];while(W.parentNode){W=W.parentNode}if(W==t){if(G(N[h],N[U],N[P],N[z])>0){N.collapse(V)}}else{N.collapse(V)}N.collapsed=l();N.commonAncestorContainer=c.findCommonAncestor(N[h],N[P])}function m(ab){var aa,X=0,ad=0,V,Z,W,Y,t,ac;if(N[h]==N[P]){return f(ab)}for(aa=N[P],V=aa.parentNode;V;aa=V,V=V.parentNode){if(V==N[h]){return r(aa,ab)}++X}for(aa=N[h],V=aa.parentNode;V;aa=V,V=V.parentNode){if(V==N[P]){return T(aa,ab)}++ad}Z=ad-X;W=N[h];while(Z>0){W=W.parentNode;Z--}Y=N[P];while(Z<0){Y=Y.parentNode;Z++}for(t=W.parentNode,ac=Y.parentNode;t!=ac;t=t.parentNode,ac=ac.parentNode){W=t;Y=ac}return o(W,Y,ab)}function f(Z){var ab,Y,X,aa,t,W,V;if(Z!=j){ab=e.createDocumentFragment()}if(N[U]==N[z]){return ab}if(N[h].nodeType==3){Y=N[h].nodeValue;X=Y.substring(N[U],N[z]);if(Z!=E){N[h].deleteData(N[U],N[z]-N[U]);N.collapse(D)}if(Z==j){return}ab.appendChild(e.createTextNode(X));return ab}aa=O(N[h],N[U]);t=N[z]-N[U];while(t>0){W=aa.nextSibling;V=y(aa,Z);if(ab){ab.appendChild(V)}--t;aa=W}if(Z!=E){N.collapse(D)}return ab}function r(ab,Y){var aa,Z,V,t,X,W;if(Y!=j){aa=e.createDocumentFragment()}Z=i(ab,Y);if(aa){aa.appendChild(Z)}V=n(ab);t=V-N[U];if(t<=0){if(Y!=E){N.setEndBefore(ab);N.collapse(R)}return aa}Z=ab.previousSibling;while(t>0){X=Z.previousSibling;W=y(Z,Y);if(aa){aa.insertBefore(W,aa.firstChild)}--t;Z=X}if(Y!=E){N.setEndBefore(ab);N.collapse(R)}return aa}function T(Z,Y){var ab,V,aa,t,X,W;if(Y!=j){ab=e.createDocumentFragment()}aa=Q(Z,Y);if(ab){ab.appendChild(aa)}V=n(Z);++V;t=N[z]-V;aa=Z.nextSibling;while(t>0){X=aa.nextSibling;W=y(aa,Y);if(ab){ab.appendChild(W)}--t;aa=X}if(Y!=E){N.setStartAfter(Z);N.collapse(D)}return ab}function o(Z,t,ac){var W,ae,Y,aa,ab,V,ad,X;if(ac!=j){ae=e.createDocumentFragment()}W=Q(Z,ac);if(ae){ae.appendChild(W)}Y=Z.parentNode;aa=n(Z);ab=n(t);++aa;V=ab-aa;ad=Z.nextSibling;while(V>0){X=ad.nextSibling;W=y(ad,ac);if(ae){ae.appendChild(W)}ad=X;--V}W=i(t,ac);if(ae){ae.appendChild(W)}if(ac!=E){N.setStartAfter(Z);N.collapse(D)}return ae}function i(aa,ab){var W=O(N[P],N[z]-1),ac,Z,Y,t,V,X=W!=N[P];if(W==aa){return L(W,X,R,ab)}ac=W.parentNode;Z=L(ac,R,R,ab);while(ac){while(W){Y=W.previousSibling;t=L(W,X,R,ab);if(ab!=j){Z.insertBefore(t,Z.firstChild)}X=D;W=Y}if(ac==aa){return Z}W=ac.previousSibling;ac=ac.parentNode;V=L(ac,R,R,ab);if(ab!=j){V.appendChild(Z)}Z=V}}function Q(aa,ab){var X=O(N[h],N[U]),Y=X!=N[h],ac,Z,W,t,V;if(X==aa){return L(X,Y,D,ab)}ac=X.parentNode;Z=L(ac,R,D,ab);while(ac){while(X){W=X.nextSibling;t=L(X,Y,D,ab);if(ab!=j){Z.appendChild(t)}Y=D;X=W}if(ac==aa){return Z}X=ac.nextSibling;ac=ac.parentNode;V=L(ac,R,D,ab);if(ab!=j){V.appendChild(Z)}Z=V}}function L(t,Y,ab,ac){var X,W,Z,V,aa;if(Y){return y(t,ac)}if(t.nodeType==3){X=t.nodeValue;if(ab){V=N[U];W=X.substring(V);Z=X.substring(0,V)}else{V=N[z];W=X.substring(0,V);Z=X.substring(V)}if(ac!=E){t.nodeValue=Z}if(ac==j){return}aa=t.cloneNode(R);aa.nodeValue=W;return aa}if(ac==j){return}return t.cloneNode(R)}function y(V,t){if(t!=j){return t==E?V.cloneNode(D):V}V.parentNode.removeChild(V)}}a.Range=b})(tinymce.dom);(function(){function a(g){var i=this,j="\uFEFF",e,h,d=g.dom,c=true,f=false;function b(){var n=g.getRng(),k=d.createRng(),m,o;m=n.item?n.item(0):n.parentElement();if(m.ownerDocument!=d.doc){return k}if(n.item||!m.hasChildNodes()){k.setStart(m.parentNode,d.nodeIndex(m));k.setEnd(k.startContainer,k.startOffset+1);return k}o=g.isCollapsed();function l(s){var u,q,t,p,A=0,x,y,z,r,v;r=n.duplicate();r.collapse(s);u=d.create("a");z=r.parentElement();if(!z.hasChildNodes()){k[s?"setStart":"setEnd"](z,0);return}z.appendChild(u);r.moveToElementText(u);v=n.compareEndPoints(s?"StartToStart":"EndToEnd",r);if(v>0){k[s?"setStartAfter":"setEndAfter"](z);d.remove(u);return}p=tinymce.grep(z.childNodes);x=p.length-1;while(A<=x){y=Math.floor((A+x)/2);z.insertBefore(u,p[y]);r.moveToElementText(u);v=n.compareEndPoints(s?"StartToStart":"EndToEnd",r);if(v>0){A=y+1}else{if(v<0){x=y-1}else{found=true;break}}}q=v>0||y==0?u.nextSibling:u.previousSibling;if(q.nodeType==1){d.remove(u);t=d.nodeIndex(q);q=q.parentNode;if(!s||y>0){t++}}else{if(v>0||y==0){r.setEndPoint(s?"StartToStart":"EndToEnd",n);t=r.text.length}else{r.setEndPoint(s?"StartToStart":"EndToEnd",n);t=q.nodeValue.length-r.text.length}d.remove(u)}k[s?"setStart":"setEnd"](q,t)}l(true);if(!o){l()}return k}this.addRange=function(k){var p,n,m,r,u,s,t=g.dom.doc,o=t.body;function l(B){var x,A,v,z,y;v=d.create("a");x=B?m:u;A=B?r:s;z=p.duplicate();if(x==t){x=o;A=0}if(x.nodeType==3){x.parentNode.insertBefore(v,x);z.moveToElementText(v);z.moveStart("character",A);d.remove(v);p.setEndPoint(B?"StartToStart":"EndToEnd",z)}else{y=x.childNodes;if(y.length){if(A>=y.length){d.insertAfter(v,y[y.length-1])}else{x.insertBefore(v,y[A])}z.moveToElementText(v)}else{v=t.createTextNode(j);x.appendChild(v);z.moveToElementText(v.parentNode);z.collapse(c)}p.setEndPoint(B?"StartToStart":"EndToEnd",z);d.remove(v)}}this.destroy();m=k.startContainer;r=k.startOffset;u=k.endContainer;s=k.endOffset;p=o.createTextRange();if(m==u&&m.nodeType==1&&r==s-1){if(r==s-1){try{n=o.createControlRange();n.addElement(m.childNodes[r]);n.select();n.scrollIntoView();return}catch(q){}}}l(true);l();p.select();p.scrollIntoView()};this.getRangeAt=function(){if(!e||!tinymce.dom.RangeUtils.compareRanges(h,g.getRng())){e=b();h=g.getRng()}try{e.startContainer.nextSibling}catch(k){e=b();h=null}return e};this.destroy=function(){h=e=null}}tinymce.dom.TridentSelection=a})();(function(d){var f=d.each,c=d.DOM,b=d.isIE,e=d.isWebKit,a;d.create("tinymce.dom.EventUtils",{EventUtils:function(){this.inits=[];this.events=[]},add:function(m,p,l,j){var g,h=this,i=h.events,k;if(p instanceof Array){k=[];f(p,function(o){k.push(h.add(m,o,l,j))});return k}if(m&&m.hasOwnProperty&&m instanceof Array){k=[];f(m,function(n){n=c.get(n);k.push(h.add(n,p,l,j))});return k}m=c.get(m);if(!m){return}g=function(n){if(h.disabled){return}n=n||window.event;if(n&&b){if(!n.target){n.target=n.srcElement}d.extend(n,h._stoppers)}if(!j){return l(n)}return l.call(j,n)};if(p=="unload"){d.unloads.unshift({func:g});return g}if(p=="init"){if(h.domLoaded){g()}else{h.inits.push(g)}return g}i.push({obj:m,name:p,func:l,cfunc:g,scope:j});h._add(m,p,g);return l},remove:function(l,m,k){var h=this,g=h.events,i=false,j;if(l&&l.hasOwnProperty&&l instanceof Array){j=[];f(l,function(n){n=c.get(n);j.push(h.remove(n,m,k))});return j}l=c.get(l);f(g,function(o,n){if(o.obj==l&&o.name==m&&(!k||(o.func==k||o.cfunc==k))){g.splice(n,1);h._remove(l,m,o.cfunc);i=true;return false}});return i},clear:function(l){var j=this,g=j.events,h,k;if(l){l=c.get(l);for(h=g.length-1;h>=0;h--){k=g[h];if(k.obj===l){j._remove(k.obj,k.name,k.cfunc);k.obj=k.cfunc=null;g.splice(h,1)}}}},cancel:function(g){if(!g){return false}this.stop(g);return this.prevent(g)},stop:function(g){if(g.stopPropagation){g.stopPropagation()}else{g.cancelBubble=true}return false},prevent:function(g){if(g.preventDefault){g.preventDefault()}else{g.returnValue=false}return false},destroy:function(){var g=this;f(g.events,function(j,h){g._remove(j.obj,j.name,j.cfunc);j.obj=j.cfunc=null});g.events=[];g=null},_add:function(h,i,g){if(h.attachEvent){h.attachEvent("on"+i,g)}else{if(h.addEventListener){h.addEventListener(i,g,false)}else{h["on"+i]=g}}},_remove:function(i,j,h){if(i){try{if(i.detachEvent){i.detachEvent("on"+j,h)}else{if(i.removeEventListener){i.removeEventListener(j,h,false)}else{i["on"+j]=null}}}catch(g){}}},_pageInit:function(h){var g=this;if(g.domLoaded){return}g.domLoaded=true;f(g.inits,function(i){i()});g.inits=[]},_wait:function(i){var g=this,h=i.document;if(i.tinyMCE_GZ&&tinyMCE_GZ.loaded){g.domLoaded=1;return}if(h.attachEvent){h.attachEvent("onreadystatechange",function(){if(h.readyState==="complete"){h.detachEvent("onreadystatechange",arguments.callee);g._pageInit(i)}});if(h.documentElement.doScroll&&i==i.top){(function(){if(g.domLoaded){return}try{h.documentElement.doScroll("left")}catch(j){setTimeout(arguments.callee,0);return}g._pageInit(i)})()}}else{if(h.addEventListener){g._add(i,"DOMContentLoaded",function(){g._pageInit(i)})}}g._add(i,"load",function(){g._pageInit(i)})},_stoppers:{preventDefault:function(){this.returnValue=false},stopPropagation:function(){this.cancelBubble=true}}});a=d.dom.Event=new d.dom.EventUtils();a._wait(window);d.addUnload(function(){a.destroy()})})(tinymce);(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(c){function e(f){return f.replace(/[\n\r]+/g,"")}var b=c.is,a=c.isIE,d=c.each;c.create("tinymce.dom.Selection",{Selection:function(i,h,g){var f=this;f.dom=i;f.win=h;f.serializer=g;d(["onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent"],function(j){f[j]=new c.util.Dispatcher(f)});if(!f.win.getSelection){f.tridentSel=new c.dom.TridentSelection(f)}if(c.isIE&&i.boxModel){this._fixIESelection()}c.addUnload(f.destroy,f)},getContent:function(g){var f=this,h=f.getRng(),l=f.dom.create("body"),j=f.getSel(),i,k,m;g=g||{};i=k="";g.get=true;g.format=g.format||"html";f.onBeforeGetContent.dispatch(f,g);if(g.format=="text"){return f.isCollapsed()?"":(h.text||(j.toString?j.toString():""))}if(h.cloneContents){m=h.cloneContents();if(m){l.appendChild(m)}}else{if(b(h.item)||b(h.htmlText)){l.innerHTML=h.item?h.item(0).outerHTML:h.htmlText}else{l.innerHTML=h.toString()}}if(/^\s/.test(l.innerHTML)){i=" "}if(/\s+$/.test(l.innerHTML)){k=" "}g.getInner=true;g.content=f.isCollapsed()?"":i+f.serializer.serialize(l,g)+k;f.onGetContent.dispatch(f,g);return g.content},setContent:function(j,i){var g=this,k=g.getRng(),n,l=g.win.document;i=i||{format:"html"};i.set=true;j=i.content=g.dom.processHTML(j);g.onBeforeSetContent.dispatch(g,i);j=i.content;if(k.insertNode){j+='<span id="__caret">_</span>';if(k.startContainer==l&&k.endContainer==l){l.body.innerHTML=j}else{k.deleteContents();if(l.body.childNodes.length==0){l.body.innerHTML=j}else{if(k.createContextualFragment){k.insertNode(k.createContextualFragment(j))}else{var m=l.createDocumentFragment(),f=l.createElement("div");m.appendChild(f);f.outerHTML=j;k.insertNode(m)}}}n=g.dom.get("__caret");k=l.createRange();k.setStartBefore(n);k.setEndBefore(n);g.setRng(k);g.dom.remove("__caret")}else{if(k.item){l.execCommand("Delete",false,null);k=g.getRng()}k.pasteHTML(j)}g.onSetContent.dispatch(g,i)},getStart:function(){var g=this.getRng(),h,f,j,i;if(g.duplicate||g.item){if(g.item){return g.item(0)}j=g.duplicate();j.collapse(1);h=j.parentElement();f=i=g.parentElement();while(i=i.parentNode){if(i==h){h=f;break}}if(h&&h.nodeName=="BODY"){return h.firstChild||h}return h}else{h=g.startContainer;if(h.nodeType==1&&h.hasChildNodes()){h=h.childNodes[Math.min(h.childNodes.length-1,g.startOffset)]}if(h&&h.nodeType==3){return h.parentNode}return h}},getEnd:function(){var g=this,h=g.getRng(),i,f;if(h.duplicate||h.item){if(h.item){return h.item(0)}h=h.duplicate();h.collapse(0);i=h.parentElement();if(i&&i.nodeName=="BODY"){return i.lastChild||i}return i}else{i=h.endContainer;f=h.endOffset;if(i.nodeType==1&&i.hasChildNodes()){i=i.childNodes[f>0?f-1:f]}if(i&&i.nodeType==3){return i.parentNode}return i}},getBookmark:function(q,r){var u=this,m=u.dom,g,j,i,n,h,o,p,l="\uFEFF",s;function f(v,x){var t=0;d(m.select(v),function(z,y){if(z==x){t=y}});return t}if(q==2){function k(){var v=u.getRng(true),t=m.getRoot(),x={};function y(B,G){var A=B[G?"startContainer":"endContainer"],F=B[G?"startOffset":"endOffset"],z=[],C,E,D=0;if(A.nodeType==3){if(r){for(C=A.previousSibling;C&&C.nodeType==3;C=C.previousSibling){F+=C.nodeValue.length}}z.push(F)}else{E=A.childNodes;if(F>=E.length&&E.length){D=1;F=Math.max(0,E.length-1)}z.push(u.dom.nodeIndex(E[F],r)+D)}for(;A&&A!=t;A=A.parentNode){z.push(u.dom.nodeIndex(A,r))}return z}x.start=y(v,true);if(!u.isCollapsed()){x.end=y(v)}return x}return k()}if(q){return{rng:u.getRng()}}g=u.getRng();i=m.uniqueId();n=tinyMCE.activeEditor.selection.isCollapsed();s="overflow:hidden;line-height:0px";if(g.duplicate||g.item){if(!g.item){j=g.duplicate();g.collapse();g.pasteHTML('<span _mce_type="bookmark" id="'+i+'_start" style="'+s+'">'+l+"</span>");if(!n){j.collapse(false);j.pasteHTML('<span _mce_type="bookmark" id="'+i+'_end" style="'+s+'">'+l+"</span>")}}else{o=g.item(0);h=o.nodeName;return{name:h,index:f(h,o)}}}else{o=u.getNode();h=o.nodeName;if(h=="IMG"){return{name:h,index:f(h,o)}}j=g.cloneRange();if(!n){j.collapse(false);j.insertNode(m.create("span",{_mce_type:"bookmark",id:i+"_end",style:s},l))}g.collapse(true);g.insertNode(m.create("span",{_mce_type:"bookmark",id:i+"_start",style:s},l))}u.moveToBookmark({id:i,keep:1});return{id:i}},moveToBookmark:function(n){var r=this,l=r.dom,i,h,f,q,j,s,o,p;if(r.tridentSel){r.tridentSel.destroy()}if(n){if(n.start){f=l.createRng();q=l.getRoot();function g(z){var t=n[z?"start":"end"],v,x,y,u;if(t){for(x=q,v=t.length-1;v>=1;v--){u=x.childNodes;if(u.length){x=u[t[v]]}}if(z){f.setStart(x,t[0])}else{f.setEnd(x,t[0])}}}g(true);g();r.setRng(f)}else{if(n.id){function k(A){var u=l.get(n.id+"_"+A),z,t,x,y,v=n.keep;if(u){z=u.parentNode;if(A=="start"){if(!v){t=l.nodeIndex(u)}else{z=u.firstChild;t=1}j=s=z;o=p=t}else{if(!v){t=l.nodeIndex(u)}else{z=u.firstChild;t=1}s=z;p=t}if(!v){y=u.previousSibling;x=u.nextSibling;d(c.grep(u.childNodes),function(B){if(B.nodeType==3){B.nodeValue=B.nodeValue.replace(/\uFEFF/g,"")}});while(u=l.get(n.id+"_"+A)){l.remove(u,1)}if(y&&x&&y.nodeType==x.nodeType&&y.nodeType==3&&!c.isOpera){t=y.nodeValue.length;y.appendData(x.nodeValue);l.remove(x);if(A=="start"){j=s=y;o=p=t}else{s=y;p=t}}}}}function m(t){if(!a&&l.isBlock(t)&&!t.innerHTML){t.innerHTML='<br _mce_bogus="1" />'}return t}k("start");k("end");if(j){f=l.createRng();f.setStart(m(j),o);f.setEnd(m(s),p);r.setRng(f)}}else{if(n.name){r.select(l.select(n.name)[n.index])}else{if(n.rng){r.setRng(n.rng)}}}}}},select:function(k,j){var i=this,l=i.dom,g=l.createRng(),f;f=l.nodeIndex(k);g.setStart(k.parentNode,f);g.setEnd(k.parentNode,f+1);if(j){function h(m,o){var n=new c.dom.TreeWalker(m,m);do{if(m.nodeType==3&&c.trim(m.nodeValue).length!=0){if(o){g.setStart(m,0)}else{g.setEnd(m,m.nodeValue.length)}return}if(m.nodeName=="BR"){if(o){g.setStartBefore(m)}else{g.setEndBefore(m)}return}}while(m=(o?n.next():n.prev()))}h(k,1);h(k)}i.setRng(g);return k},isCollapsed:function(){var f=this,h=f.getRng(),g=f.getSel();if(!h||h.item){return false}if(h.compareEndPoints){return h.compareEndPoints("StartToEnd",h)===0}return !g||h.collapsed},collapse:function(f){var g=this,h=g.getRng(),i;if(h.item){i=h.item(0);h=this.win.document.body.createTextRange();h.moveToElementText(i)}h.collapse(!!f);g.setRng(h)},getSel:function(){var g=this,f=this.win;return f.getSelection?f.getSelection():f.document.selection},getRng:function(l){var g=this,h,i,k,j=g.win.document;if(l&&g.tridentSel){return g.tridentSel.getRangeAt(0)}try{if(h=g.getSel()){i=h.rangeCount>0?h.getRangeAt(0):(h.createRange?h.createRange():j.createRange())}}catch(f){}if(c.isIE&&i.setStart&&j.selection.createRange().item){k=j.selection.createRange().item(0);i=j.createRange();i.setStartBefore(k);i.setEndAfter(k)}if(!i){i=j.createRange?j.createRange():j.body.createTextRange()}if(g.selectedRange&&g.explicitRange){if(i.compareBoundaryPoints(i.START_TO_START,g.selectedRange)===0&&i.compareBoundaryPoints(i.END_TO_END,g.selectedRange)===0){i=g.explicitRange}else{g.selectedRange=null;g.explicitRange=null}}return i},setRng:function(i){var h,g=this;if(!g.tridentSel){h=g.getSel();if(h){g.explicitRange=i;h.removeAllRanges();h.addRange(i);g.selectedRange=h.getRangeAt(0)}}else{if(i.cloneRange){g.tridentSel.addRange(i);return}try{i.select()}catch(f){}}},setNode:function(g){var f=this;f.setContent(f.dom.getOuterHTML(g));return g},getNode:function(){var g=this,f=g.getRng(),h=g.getSel(),i;if(f.setStart){if(!f){return g.dom.getRoot()}i=f.commonAncestorContainer;if(!f.collapsed){if(f.startContainer==f.endContainer){if(f.startOffset-f.endOffset<2){if(f.startContainer.hasChildNodes()){i=f.startContainer.childNodes[f.startOffset]}}}if(c.isWebKit&&h.anchorNode&&h.anchorNode.nodeType==1){return h.anchorNode.childNodes[h.anchorOffset]}}if(i&&i.nodeType==3){return i.parentNode}return i}return f.item?f.item(0):f.parentElement()},getSelectedBlocks:function(g,f){var i=this,j=i.dom,m,h,l,k=[];m=j.getParent(g||i.getStart(),j.isBlock);h=j.getParent(f||i.getEnd(),j.isBlock);if(m){k.push(m)}if(m&&h&&m!=h){l=m;while((l=l.nextSibling)&&l!=h){if(j.isBlock(l)){k.push(l)}}}if(h&&m!=h){k.push(h)}return k},destroy:function(g){var f=this;f.win=null;if(f.tridentSel){f.tridentSel.destroy()}if(!g){c.removeUnload(f.destroy)}},_fixIESelection:function(){var m=this.dom,l=m.doc,g=l.body,i,j;l.documentElement.unselectable=true;function k(n,q){var o=g.createTextRange();try{o.moveToPoint(n,q)}catch(p){o=null}return o}function h(o){var n;if(o.button){n=k(o.x,o.y);if(n){if(n.compareEndPoints("StartToStart",j)>0){n.setEndPoint("StartToStart",j)}else{n.setEndPoint("EndToEnd",j)}n.select()}}else{f()}}function f(){m.unbind(l,"mouseup",f);m.unbind(l,"mousemove",h);i=0}m.bind(l,"mousedown",function(n){if(n.target.nodeName==="HTML"){if(i){f()}i=1;j=k(n.x,n.y);if(j){m.bind(l,"mouseup",f);m.bind(l,"mousemove",h);m.win.focus();j.select()}}})}})})(tinymce);(function(a){a.create("tinymce.dom.XMLWriter",{node:null,XMLWriter:function(c){function b(){var e=document.implementation;if(!e||!e.createDocument){try{return new ActiveXObject("MSXML2.DOMDocument")}catch(d){}try{return new ActiveXObject("Microsoft.XmlDom")}catch(d){}}else{return e.createDocument("","",null)}}this.doc=b();this.valid=a.isOpera||a.isWebKit;this.reset()},reset:function(){var b=this,c=b.doc;if(c.firstChild){c.removeChild(c.firstChild)}b.node=c.appendChild(c.createElement("html"))},writeStartElement:function(c){var b=this;b.node=b.node.appendChild(b.doc.createElement(c))},writeAttribute:function(c,b){if(this.valid){b=b.replace(/>/g,"%MCGT%")}this.node.setAttribute(c,b)},writeEndElement:function(){this.node=this.node.parentNode},writeFullEndElement:function(){var b=this,c=b.node;c.appendChild(b.doc.createTextNode(""));b.node=c.parentNode},writeText:function(b){if(this.valid){b=b.replace(/>/g,"%MCGT%")}this.node.appendChild(this.doc.createTextNode(b))},writeCDATA:function(b){this.node.appendChild(this.doc.createCDATASection(b))},writeComment:function(b){if(a.isIE){b=b.replace(/^\-|\-$/g," ")}this.node.appendChild(this.doc.createComment(b.replace(/\-\-/g," ")))},getContent:function(){var b;b=this.doc.xml||new XMLSerializer().serializeToString(this.doc);b=b.replace(/<\?[^?]+\?>|<html[^>]*>|<\/html>|<html\/>|<!DOCTYPE[^>]+>/g,"");b=b.replace(/ ?\/>/g," />");if(this.valid){b=b.replace(/\%MCGT%/g,">")}return b}})})(tinymce);(function(c){var d=/[&\"<>]/g,b=/[<>&]/g,a={"&":"&",'"':""","<":"<",">":">"};c.create("tinymce.dom.StringWriter",{str:null,tags:null,count:0,settings:null,indent:null,StringWriter:function(e){this.settings=c.extend({indent_char:" ",indentation:0},e);this.reset()},reset:function(){this.indent="";this.str="";this.tags=[];this.count=0},writeStartElement:function(e){this._writeAttributesEnd();this.writeRaw("<"+e);this.tags.push(e);this.inAttr=true;this.count++;this.elementCount=this.count;this.attrs={}},writeAttribute:function(g,e){var f=this;if(!f.attrs[g]){f.writeRaw(" "+f.encode(g,true)+'="'+f.encode(e,true)+'"');f.attrs[g]=e}},writeEndElement:function(){var e;if(this.tags.length>0){e=this.tags.pop();if(this._writeAttributesEnd(1)){this.writeRaw("</"+e+">")}if(this.settings.indentation>0){this.writeRaw("\n")}}},writeFullEndElement:function(){if(this.tags.length>0){this._writeAttributesEnd();this.writeRaw("</"+this.tags.pop()+">");if(this.settings.indentation>0){this.writeRaw("\n")}}},writeText:function(e){this._writeAttributesEnd();this.writeRaw(this.encode(e));this.count++},writeCDATA:function(e){this._writeAttributesEnd();this.writeRaw("<![CDATA["+e+"]]>");this.count++},writeComment:function(e){this._writeAttributesEnd();this.writeRaw("<!--"+e+"-->");this.count++},writeRaw:function(e){this.str+=e},encode:function(f,e){return f.replace(e?d:b,function(g){return a[g]})},getContent:function(){return this.str},_writeAttributesEnd:function(e){if(!this.inAttr){return}this.inAttr=false;if(e&&this.elementCount==this.count){this.writeRaw(" />");return false}this.writeRaw(">");return true}})})(tinymce);(function(e){var g=e.extend,f=e.each,b=e.util.Dispatcher,d=e.isIE,a=e.isGecko;function c(h){return h.replace(/([?+*])/g,".$1")}e.create("tinymce.dom.Serializer",{Serializer:function(j){var i=this;i.key=0;i.onPreProcess=new b(i);i.onPostProcess=new b(i);try{i.writer=new e.dom.XMLWriter()}catch(h){i.writer=new e.dom.StringWriter()}if(e.isIE&&document.documentMode>8){i.writer=new e.dom.StringWriter()}i.settings=j=g({dom:e.DOM,valid_nodes:0,node_filter:0,attr_filter:0,invalid_attrs:/^(_mce_|_moz_|sizset|sizcache)/,closed:/^(br|hr|input|meta|img|link|param|area)$/,entity_encoding:"named",entities:"160,nbsp,161,iexcl,162,cent,163,pound,164,curren,165,yen,166,brvbar,167,sect,168,uml,169,copy,170,ordf,171,laquo,172,not,173,shy,174,reg,175,macr,176,deg,177,plusmn,178,sup2,179,sup3,180,acute,181,micro,182,para,183,middot,184,cedil,185,sup1,186,ordm,187,raquo,188,frac14,189,frac12,190,frac34,191,iquest,192,Agrave,193,Aacute,194,Acirc,195,Atilde,196,Auml,197,Aring,198,AElig,199,Ccedil,200,Egrave,201,Eacute,202,Ecirc,203,Euml,204,Igrave,205,Iacute,206,Icirc,207,Iuml,208,ETH,209,Ntilde,210,Ograve,211,Oacute,212,Ocirc,213,Otilde,214,Ouml,215,times,216,Oslash,217,Ugrave,218,Uacute,219,Ucirc,220,Uuml,221,Yacute,222,THORN,223,szlig,224,agrave,225,aacute,226,acirc,227,atilde,228,auml,229,aring,230,aelig,231,ccedil,232,egrave,233,eacute,234,ecirc,235,euml,236,igrave,237,iacute,238,icirc,239,iuml,240,eth,241,ntilde,242,ograve,243,oacute,244,ocirc,245,otilde,246,ouml,247,divide,248,oslash,249,ugrave,250,uacute,251,ucirc,252,uuml,253,yacute,254,thorn,255,yuml,402,fnof,913,Alpha,914,Beta,915,Gamma,916,Delta,917,Epsilon,918,Zeta,919,Eta,920,Theta,921,Iota,922,Kappa,923,Lambda,924,Mu,925,Nu,926,Xi,927,Omicron,928,Pi,929,Rho,931,Sigma,932,Tau,933,Upsilon,934,Phi,935,Chi,936,Psi,937,Omega,945,alpha,946,beta,947,gamma,948,delta,949,epsilon,950,zeta,951,eta,952,theta,953,iota,954,kappa,955,lambda,956,mu,957,nu,958,xi,959,omicron,960,pi,961,rho,962,sigmaf,963,sigma,964,tau,965,upsilon,966,phi,967,chi,968,psi,969,omega,977,thetasym,978,upsih,982,piv,8226,bull,8230,hellip,8242,prime,8243,Prime,8254,oline,8260,frasl,8472,weierp,8465,image,8476,real,8482,trade,8501,alefsym,8592,larr,8593,uarr,8594,rarr,8595,darr,8596,harr,8629,crarr,8656,lArr,8657,uArr,8658,rArr,8659,dArr,8660,hArr,8704,forall,8706,part,8707,exist,8709,empty,8711,nabla,8712,isin,8713,notin,8715,ni,8719,prod,8721,sum,8722,minus,8727,lowast,8730,radic,8733,prop,8734,infin,8736,ang,8743,and,8744,or,8745,cap,8746,cup,8747,int,8756,there4,8764,sim,8773,cong,8776,asymp,8800,ne,8801,equiv,8804,le,8805,ge,8834,sub,8835,sup,8836,nsub,8838,sube,8839,supe,8853,oplus,8855,otimes,8869,perp,8901,sdot,8968,lceil,8969,rceil,8970,lfloor,8971,rfloor,9001,lang,9002,rang,9674,loz,9824,spades,9827,clubs,9829,hearts,9830,diams,338,OElig,339,oelig,352,Scaron,353,scaron,376,Yuml,710,circ,732,tilde,8194,ensp,8195,emsp,8201,thinsp,8204,zwnj,8205,zwj,8206,lrm,8207,rlm,8211,ndash,8212,mdash,8216,lsquo,8217,rsquo,8218,sbquo,8220,ldquo,8221,rdquo,8222,bdquo,8224,dagger,8225,Dagger,8240,permil,8249,lsaquo,8250,rsaquo,8364,euro",valid_elements:"*[*]",extended_valid_elements:0,invalid_elements:0,fix_table_elements:1,fix_list_elements:true,fix_content_duplication:true,convert_fonts_to_spans:false,font_size_classes:0,apply_source_formatting:0,indent_mode:"simple",indent_char:"\t",indent_levels:1,remove_linebreaks:1,remove_redundant_brs:1,element_format:"xhtml"},j);i.dom=j.dom;i.schema=j.schema;if(j.entity_encoding=="named"&&!j.entities){j.entity_encoding="raw"}if(j.remove_redundant_brs){i.onPostProcess.add(function(k,l){l.content=l.content.replace(/(<br \/>\s*)+<\/(p|h[1-6]|div|li)>/gi,function(n,m,o){if(/^<br \/>\s*<\//.test(n)){return"</"+o+">"}return n})})}if(j.element_format=="html"){i.onPostProcess.add(function(k,l){l.content=l.content.replace(/<([^>]+) \/>/g,"<$1>")})}if(j.fix_list_elements){i.onPreProcess.add(function(v,s){var l,z,y=["ol","ul"],u,t,q,k=/^(OL|UL)$/,A;function m(r,x){var o=x.split(","),p;while((r=r.previousSibling)!=null){for(p=0;p<o.length;p++){if(r.nodeName==o[p]){return r}}}return null}for(z=0;z<y.length;z++){l=i.dom.select(y[z],s.node);for(u=0;u<l.length;u++){t=l[u];q=t.parentNode;if(k.test(q.nodeName)){A=m(t,"LI");if(!A){A=i.dom.create("li");A.innerHTML=" ";A.appendChild(t);q.insertBefore(A,q.firstChild)}else{A.appendChild(t)}}}}})}if(j.fix_table_elements){i.onPreProcess.add(function(k,l){if(!e.isOpera||opera.buildNumber()>=1767){f(i.dom.select("p table",l.node).reverse(),function(p){var o=i.dom.getParent(p.parentNode,"table,p");if(o.nodeName!="TABLE"){try{i.dom.split(o,p)}catch(m){}}})}})}},setEntities:function(o){var n=this,j,m,h={},k;if(n.entityLookup){return}j=o.split(",");for(m=0;m<j.length;m+=2){k=j[m];if(k==34||k==38||k==60||k==62){continue}h[String.fromCharCode(j[m])]=j[m+1];k=parseInt(j[m]).toString(16)}n.entityLookup=h},setRules:function(i){var h=this;h._setup();h.rules={};h.wildRules=[];h.validElements={};return h.addRules(i)},addRules:function(i){var h=this,j;if(!i){return}h._setup();f(i.split(","),function(m){var q=m.split(/\[|\]/),l=q[0].split("/"),r,k,o,n=[];if(j){k=e.extend([],j.attribs)}if(q.length>1){f(q[1].split("|"),function(u){var p={},t;k=k||[];u=u.replace(/::/g,"~");u=/^([!\-])?([\w*.?~_\-]+|)([=:<])?(.+)?$/.exec(u);u[2]=u[2].replace(/~/g,":");if(u[1]=="!"){r=r||[];r.push(u[2])}if(u[1]=="-"){for(t=0;t<k.length;t++){if(k[t].name==u[2]){k.splice(t,1);return}}}switch(u[3]){case"=":p.defaultVal=u[4]||"";break;case":":p.forcedVal=u[4];break;case"<":p.validVals=u[4].split("?");break}if(/[*.?]/.test(u[2])){o=o||[];p.nameRE=new RegExp("^"+c(u[2])+"$");o.push(p)}else{p.name=u[2];k.push(p)}n.push(u[2])})}f(l,function(v,u){var y=v.charAt(0),t=1,p={};if(j){if(j.noEmpty){p.noEmpty=j.noEmpty}if(j.fullEnd){p.fullEnd=j.fullEnd}if(j.padd){p.padd=j.padd}}switch(y){case"-":p.noEmpty=true;break;case"+":p.fullEnd=true;break;case"#":p.padd=true;break;default:t=0}l[u]=v=v.substring(t);h.validElements[v]=1;if(/[*.?]/.test(l[0])){p.nameRE=new RegExp("^"+c(l[0])+"$");h.wildRules=h.wildRules||{};h.wildRules.push(p)}else{p.name=l[0];if(l[0]=="@"){j=p}h.rules[v]=p}p.attribs=k;if(r){p.requiredAttribs=r}if(o){v="";f(n,function(s){if(v){v+="|"}v+="("+c(s)+")"});p.validAttribsRE=new RegExp("^"+v.toLowerCase()+"$");p.wildAttribs=o}})});i="";f(h.validElements,function(m,l){if(i){i+="|"}if(l!="@"){i+=l}});h.validElementsRE=new RegExp("^("+c(i.toLowerCase())+")$")},findRule:function(m){var j=this,l=j.rules,h,k;j._setup();k=l[m];if(k){return k}l=j.wildRules;for(h=0;h<l.length;h++){if(l[h].nameRE.test(m)){return l[h]}}return null},findAttribRule:function(h,l){var j,k=h.wildAttribs;for(j=0;j<k.length;j++){if(k[j].nameRE.test(l)){return k[j]}}return null},serialize:function(r,q){var m,k=this,p,i,j,l;k._setup();q=q||{};q.format=q.format||"html";k.processObj=q;if(d){l=[];f(r.getElementsByTagName("option"),function(o){var h=k.dom.getAttrib(o,"selected");l.push(h?h:null)})}r=r.cloneNode(true);if(d){f(r.getElementsByTagName("option"),function(o,h){k.dom.setAttrib(o,"selected",l[h])})}j=r.ownerDocument.implementation;if(j.createHTMLDocument&&(e.isOpera&&opera.buildNumber()>=1767)){p=j.createHTMLDocument("");f(r.nodeName=="BODY"?r.childNodes:[r],function(h){p.body.appendChild(p.importNode(h,true))});if(r.nodeName!="BODY"){r=p.body.firstChild}else{r=p.body}i=k.dom.doc;k.dom.doc=p}k.key=""+(parseInt(k.key)+1);if(!q.no_events){q.node=r;k.onPreProcess.dispatch(k,q)}k.writer.reset();k._info=q;k._serializeNode(r,q.getInner);q.content=k.writer.getContent();if(i){k.dom.doc=i}if(!q.no_events){k.onPostProcess.dispatch(k,q)}k._postProcess(q);q.node=null;return e.trim(q.content)},_postProcess:function(n){var i=this,k=i.settings,j=n.content,m=[],l;if(n.format=="html"){l=i._protect({content:j,patterns:[{pattern:/(<script[^>]*>)(.*?)(<\/script>)/g},{pattern:/(<noscript[^>]*>)(.*?)(<\/noscript>)/g},{pattern:/(<style[^>]*>)(.*?)(<\/style>)/g},{pattern:/(<pre[^>]*>)(.*?)(<\/pre>)/g,encode:1},{pattern:/(<!--\[CDATA\[)(.*?)(\]\]-->)/g}]});j=l.content;if(k.entity_encoding!=="raw"){j=i._encode(j)}if(!n.set){j=e._replace(/<p>\s+<\/p>|<p([^>]+)>\s+<\/p>/g,k.entity_encoding=="numeric"?"<p$1> </p>":"<p$1> </p>",j);if(k.remove_linebreaks){j=j.replace(/\r?\n|\r/g," ");j=e._replace(/(<[^>]+>)\s+/g,"$1 ",j);j=e._replace(/\s+(<\/[^>]+>)/g," $1",j);j=e._replace(/<(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object) ([^>]+)>\s+/g,"<$1 $2>",j);j=e._replace(/<(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object)>\s+/g,"<$1>",j);j=e._replace(/\s+<\/(p|h[1-6]|blockquote|hr|div|table|tbody|tr|td|body|head|html|title|meta|style|pre|script|link|object)>/g,"</$1>",j)}if(k.apply_source_formatting&&k.indent_mode=="simple"){j=e._replace(/<(\/?)(ul|hr|table|meta|link|tbody|tr|object|body|head|html|map)(|[^>]+)>\s*/g,"\n<$1$2$3>\n",j);j=e._replace(/\s*<(p|h[1-6]|blockquote|div|title|style|pre|script|td|li|area)(|[^>]+)>/g,"\n<$1$2>",j);j=e._replace(/<\/(p|h[1-6]|blockquote|div|title|style|pre|script|td|li)>\s*/g,"</$1>\n",j);j=j.replace(/\n\n/g,"\n")}}j=i._unprotect(j,l);j=e._replace(/<!--\[CDATA\[([\s\S]+)\]\]-->/g,"<![CDATA[$1]]>",j);if(k.entity_encoding=="raw"){j=e._replace(/<p> <\/p>|<p([^>]+)> <\/p>/g,"<p$1>\u00a0</p>",j)}j=j.replace(/<noscript([^>]+|)>([\s\S]*?)<\/noscript>/g,function(h,p,o){return"<noscript"+p+">"+i.dom.decode(o.replace(/<!--|-->/g,""))+"</noscript>"})}n.content=j},_serializeNode:function(E,J){var A=this,B=A.settings,y=A.writer,q,j,u,G,F,I,C,h,z,k,r,D,p,m,H,o,x;if(!B.node_filter||B.node_filter(E)){switch(E.nodeType){case 1:if(E.hasAttribute?E.hasAttribute("_mce_bogus"):E.getAttribute("_mce_bogus")){return}p=H=false;q=E.hasChildNodes();k=E.getAttribute("_mce_name")||E.nodeName.toLowerCase();o=E.getAttribute("_mce_type");if(o){if(!A._info.cleanup){p=true;return}else{H=1}}if(d){x=E.scopeName;if(x&&x!=="HTML"&&x!=="html"){k=x+":"+k}}if(k.indexOf("mce:")===0){k=k.substring(4)}if(!H){if(!A.validElementsRE||!A.validElementsRE.test(k)||(A.invalidElementsRE&&A.invalidElementsRE.test(k))||J){p=true;break}}if(d){if(B.fix_content_duplication){if(E._mce_serialized==A.key){return}E._mce_serialized=A.key}if(k.charAt(0)=="/"){k=k.substring(1)}}else{if(a){if(E.nodeName==="BR"&&E.getAttribute("type")=="_moz"){return}}}if(B.validate_children){if(A.elementName&&!A.schema.isValid(A.elementName,k)){p=true;break}A.elementName=k}r=A.findRule(k);if(!r){p=true;break}k=r.name||k;m=B.closed.test(k);if((!q&&r.noEmpty)||(d&&!k)){p=true;break}if(r.requiredAttribs){I=r.requiredAttribs;for(G=I.length-1;G>=0;G--){if(this.dom.getAttrib(E,I[G])!==""){break}}if(G==-1){p=true;break}}y.writeStartElement(k);if(r.attribs){for(G=0,C=r.attribs,F=C.length;G<F;G++){I=C[G];z=A._getAttrib(E,I);if(z!==null){y.writeAttribute(I.name,z)}}}if(r.validAttribsRE){C=A.dom.getAttribs(E);for(G=C.length-1;G>-1;G--){h=C[G];if(h.specified){I=h.nodeName.toLowerCase();if(B.invalid_attrs.test(I)||!r.validAttribsRE.test(I)){continue}D=A.findAttribRule(r,I);z=A._getAttrib(E,D,I);if(z!==null){y.writeAttribute(I,z)}}}}if(o&&H){y.writeAttribute("_mce_type",o)}if(k==="script"&&e.trim(E.innerHTML)){y.writeText("// ");y.writeCDATA(E.innerHTML.replace(/<!--|-->|<\[CDATA\[|\]\]>/g,""));q=false;break}if(r.padd){if(q&&(u=E.firstChild)&&u.nodeType===1&&E.childNodes.length===1){if(u.hasAttribute?u.hasAttribute("_mce_bogus"):u.getAttribute("_mce_bogus")){y.writeText("\u00a0")}}else{if(!q){y.writeText("\u00a0")}}}break;case 3:if(B.validate_children&&A.elementName&&!A.schema.isValid(A.elementName,"#text")){return}return y.writeText(E.nodeValue);case 4:return y.writeCDATA(E.nodeValue);case 8:return y.writeComment(E.nodeValue)}}else{if(E.nodeType==1){q=E.hasChildNodes()}}if(q&&!m){u=E.firstChild;while(u){A._serializeNode(u);A.elementName=k;u=u.nextSibling}}if(!p){if(!m){y.writeFullEndElement()}else{y.writeEndElement()}}},_protect:function(j){var i=this;j.items=j.items||[];function h(l){return l.replace(/[\r\n\\]/g,function(m){if(m==="\n"){return"\\n"}else{if(m==="\\"){return"\\\\"}}return"\\r"})}function k(l){return l.replace(/\\[\\rn]/g,function(m){if(m==="\\n"){return"\n"}else{if(m==="\\\\"){return"\\"}}return"\r"})}f(j.patterns,function(l){j.content=k(h(j.content).replace(l.pattern,function(n,o,m,p){m=k(m);if(l.encode){m=i._encode(m)}j.items.push(m);return o+"<!--mce:"+(j.items.length-1)+"-->"+p}))});return j},_unprotect:function(i,j){i=i.replace(/\<!--mce:([0-9]+)--\>/g,function(k,h){return j.items[parseInt(h)]});j.items=[];return i},_encode:function(m){var j=this,k=j.settings,i;if(k.entity_encoding!=="raw"){if(k.entity_encoding.indexOf("named")!=-1){j.setEntities(k.entities);i=j.entityLookup;m=m.replace(/[\u007E-\uFFFF]/g,function(h){var l;if(l=i[h]){h="&"+l+";"}return h})}if(k.entity_encoding.indexOf("numeric")!=-1){m=m.replace(/[\u007E-\uFFFF]/g,function(h){return"&#"+h.charCodeAt(0)+";"})}}return m},_setup:function(){var h=this,i=this.settings;if(h.done){return}h.done=1;h.setRules(i.valid_elements);h.addRules(i.extended_valid_elements);if(i.invalid_elements){h.invalidElementsRE=new RegExp("^("+c(i.invalid_elements.replace(/,/g,"|").toLowerCase())+")$")}if(i.attrib_value_filter){h.attribValueFilter=i.attribValueFilter}},_getAttrib:function(m,j,h){var l,k;h=h||j.name;if(j.forcedVal&&(k=j.forcedVal)){if(k==="{$uid}"){return this.dom.uniqueId()}return k}k=this.dom.getAttrib(m,h);switch(h){case"rowspan":case"colspan":if(k=="1"){k=""}break}if(this.attribValueFilter){k=this.attribValueFilter(h,k,m)}if(j.validVals){for(l=j.validVals.length-1;l>=0;l--){if(k==j.validVals[l]){break}}if(l==-1){return null}}if(k===""&&typeof(j.defaultVal)!="undefined"){k=j.defaultVal;if(k==="{$uid}"){return this.dom.uniqueId()}return k}else{if(h=="class"&&this.processObj.get){k=k.replace(/\s?mceItem\w+\s?/g,"")}}if(k===""){return null}return k}})})(tinymce);(function(a){a.dom.ScriptLoader=function(h){var c=0,k=1,i=2,l={},j=[],f={},d=[],g=0,e;function b(m,u){var v=this,q=a.DOM,s,o,r,n;function p(){q.remove(n);if(s){s.onreadystatechange=s.onload=s=null}u()}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){a.util.XHR.send({url:a._addVer(o.getURI()),success:function(x){var t=q.create("script",{type:"text/javascript"});t.text=x;document.getElementsByTagName("head")[0].appendChild(t);q.remove(t);p()}});return}}s=q.create("script",{id:n,type:"text/javascript",src:a._addVer(m)});if(!a.isIE){s.onload=p}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==e){j.push(m);l[m]=c}if(q){if(!f[m]){f[m]=[]}f[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(f[r],function(s){s.func.call(s.scope)});f[r]=e}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);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","lastSibling",e))}};(function(){var a={};function b(f,e){var d;function c(g){return g.replace(/[A-Z]+/g,function(h){return c(f[h])})}for(d in f){if(f.hasOwnProperty(d)){f[d]=c(f[d])}}c(e).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]/g,function(l,g,j){var h,k={};j=j.split(/\|/);for(h=j.length-1;h>=0;h--){k[j[h]]=1}a[g]=k})}b({Z:"#|H|K|N|O|P",Y:"#|X|form|R|Q",X:"p|T|div|U|W|isindex|fieldset|table",W:"pre|hr|blockquote|address|center|noframes",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"},"script[]style[]object[#|param|X|form|a|H|K|N|O|Q]param[]p[S]a[Z]br[]span[S]bdo[S]applet[#|param|X|form|a|H|K|N|O|Q]h1[S]img[]map[X|form|Q|area]h2[S]iframe[#|X|form|a|H|K|N|O|Q]h3[S]tt[S]i[S]b[S]u[S]s[S]strike[S]big[S]small[S]font[S]basefont[]em[S]strong[S]dfn[S]code[S]q[S]samp[S]kbd[S]var[S]cite[S]abbr[S]acronym[S]sub[S]sup[S]input[]select[optgroup|option]optgroup[option]option[]textarea[]label[S]button[#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]h4[S]ins[#|X|form|a|H|K|N|O|Q]h5[S]del[#|X|form|a|H|K|N|O|Q]h6[S]div[#|X|form|a|H|K|N|O|Q]ul[li]li[#|X|form|a|H|K|N|O|Q]ol[li]dl[dt|dd]dt[S]dd[#|X|form|a|H|K|N|O|Q]menu[li]dir[li]pre[ZA]hr[]blockquote[#|X|form|a|H|K|N|O|Q]address[S|p]center[#|X|form|a|H|K|N|O|Q]noframes[#|X|form|a|H|K|N|O|Q]isindex[]fieldset[#|legend|X|form|a|H|K|N|O|Q]legend[S]table[caption|col|colgroup|thead|tfoot|tbody|tr]caption[S]col[]colgroup[col]thead[tr]tr[th|td]th[#|X|form|a|H|K|N|O|Q]form[#|X|a|H|K|N|O|Q]noscript[#|X|form|a|H|K|N|O|Q]td[#|X|form|a|H|K|N|O|Q]tfoot[tr]tbody[tr]area[]base[]body[#|X|form|a|H|K|N|O|Q]");tinymce.dom.Schema=function(){var c=this,d=a;c.isValid=function(f,e){var g=d[f];return !!(g&&(!e||g[e]))}}})();(function(a){a.dom.RangeUtils=function(c){var b="\uFEFF";this.walk=function(d,r){var h=d.startContainer,k=d.startOffset,s=d.endContainer,l=d.endOffset,i,f,n,g,q,p,e;e=c.select("td.mceSelected,th.mceSelected");if(e.length>0){a.each(e,function(t){r([t])});return}function o(v,u,t){var x=[];for(;v&&v!=t;v=v[u]){x.push(v)}return x}function m(u,t){do{if(u.parentNode==t){return u}u=u.parentNode}while(u)}function j(v,u,x){var t=x?"nextSibling":"previousSibling";for(g=v,q=g.parentNode;g&&g!=u;g=q){q=g.parentNode;p=o(g==v?g:g[t],t);if(p.length){if(!x){p.reverse()}r(p)}}}if(h.nodeType==1&&h.hasChildNodes()){h=h.childNodes[k]}if(s.nodeType==1&&s.hasChildNodes()){s=s.childNodes[Math.min(k==l?l:l-1,s.childNodes.length-1)]}i=c.findCommonAncestor(h,s);if(h==s){return r([h])}for(g=h;g;g=g.parentNode){if(g==s){return j(h,i,true)}if(g==i){break}}for(g=s;g;g=g.parentNode){if(g==h){return j(s,i)}if(g==i){break}}f=m(h,i)||h;n=m(s,i)||s;j(h,f,true);p=o(f==h?f:f.nextSibling,"nextSibling",n==s?n.nextSibling:n);if(p.length){r(p)}j(s,n)}};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(c){var b=c.DOM,a=c.is;c.create("tinymce.ui.Control",{Control:function(e,d){this.id=e;this.settings=d=d||{};this.rendered=false;this.onRender=new c.util.Dispatcher(this);this.classPrefix="";this.scope=d.scope||this;this.disabled=0;this.active=0},setDisabled:function(d){var f;if(d!=this.disabled){f=b.get(this.id);if(f&&this.settings.unavailable_prefix){if(d){this.prevTitle=f.title;f.title=this.settings.unavailable_prefix+": "+f.title}else{f.title=this.prevTitle}}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}},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(b,a){this.parent(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"},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix})}});(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.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;g=new e.ui.DropMenu(j.id||c.uniqueId(),j);g.onAddItem.add(h.onAddItem.dispatch,h.onAddItem);return g},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.clientWidth,j.max_width):g.clientWidth;k=j.max_height?Math.min(g.clientHeight,j.max_height):g.clientHeight;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 a.cancel(s)}});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")}}})}z.onShowMenu.dispatch(z);if(A.keyboard_focus){a.add(o,"keydown",z._keyHandler,z);c.select("a","menu_"+z.id)[0].focus();z._focusIdx=0}},hideMenu:function(j){var g=this,i=c.get("menu_"+g.id),h;if(!g.isMenuVisible){return}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);a.remove(h,"mouseover",g.mouseOverFunc);a.remove(h,"click",g.mouseClickFunc);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",{id:"menu_"+i.id,"class":j["class"],style:"position:absolute;left:0;top:0;z-index:200000"});k=c.add(g,"div",{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",{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},_keyHandler:function(j){var i=this,h=j.keyCode;function g(m){var k=i._focusIdx+m,l=c.select("a","menu_"+i.id)[k];if(l){i._focusIdx=k;l.focus()}}switch(h){case 38:g(-1);return;case 40:g(1);return;case 13:return;case 27:return this.hideMenu()}},_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,"td");i=p=c.add(i,"a",{href:"javascript:;",onclick:"return false;",onmousedown:"return false;"});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){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(d,c){this.parent(d,c);this.classPrefix="mceButton"},renderHTML:function(){var f=this.classPrefix,e=this.settings,d,c;c=a.encode(e.label||"");d='<a id="'+this.id+'" href="javascript:;" class="'+f+" "+f+"Enabled "+e["class"]+(c?" "+f+"Labeled":"")+'" onmousedown="return false;" onclick="return false;" title="'+a.encode(e.title)+'">';if(e.image){d+='<img class="mceIcon" src="'+e.image+'" />'+c+"</a>"}else{d+='<span class="mceIcon '+e["class"]+'"></span>'+(c?'<span class="'+f+'Label">'+c+"</span>":"")+"</a>"}return d},postRender:function(){var c=this,d=c.settings;b.dom.Event.add(c.id,"click",function(f){if(!c.isDisabled()){return d.onclick.call(d.scope,f)}})}})})(tinymce);(function(d){var c=d.DOM,b=d.dom.Event,e=d.each,a=d.util.Dispatcher;d.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(h,g){var f=this;f.parent(h,g);f.items=[];f.onChange=new a(f);f.onPostRender=new a(f);f.onAdd=new a(f);f.onRenderMenu=new d.util.Dispatcher(this);f.classPrefix="mceListBox"},select:function(h){var g=this,j,i;if(h==undefined){return g.selectByIndex(-1)}if(h&&h.call){i=h}else{i=function(f){return f==h}}if(h!=g.selectedValue){e(g.items,function(k,f){if(i(k.value)){j=1;g.selectByIndex(f);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(f){var g=this,h,i;if(f!=g.selectedIndex){h=c.get(g.id+"_text");i=g.items[f];if(i){g.selectedValue=i.value;g.selectedIndex=f;c.setHTML(h,c.encode(i.title));c.removeClass(h,"mceTitle")}else{c.setHTML(h,c.encode(g.settings.title));c.addClass(h,"mceTitle");g.selectedValue=g.selectedIndex=null}h=0}},add:function(i,f,h){var g=this;h=h||{};h=d.extend(h,{title:i,value:f});g.items.push(h);g.onAdd.dispatch(g,h)},getLength:function(){return this.items.length},renderHTML:function(){var i="",f=this,g=f.settings,j=f.classPrefix;i='<table id="'+f.id+'" cellpadding="0" cellspacing="0" class="'+j+" "+j+"Enabled"+(g["class"]?(" "+g["class"]):"")+'"><tbody><tr>';i+="<td>"+c.createHTML("a",{id:f.id+"_text",href:"javascript:;","class":"mceText",onclick:"return false;",onmousedown:"return false;"},c.encode(f.settings.title))+"</td>";i+="<td>"+c.createHTML("a",{id:f.id+"_open",tabindex:-1,href:"javascript:;","class":"mceOpen",onclick:"return false;",onmousedown:"return false;"},"<span></span>")+"</td>";i+="</tr></tbody></table>";return i},showMenu:function(){var g=this,j,i,h=c.get(this.id),f;if(g.isDisabled()||g.items.length==0){return}if(g.menu&&g.menu.isMenuVisible){return g.hideMenu()}if(!g.isMenuRendered){g.renderMenu();g.isMenuRendered=true}j=c.getPos(this.settings.menu_container);i=c.getPos(h);f=g.menu;f.settings.offset_x=i.x;f.settings.offset_y=i.y;f.settings.keyboard_focus=!d.isOpera;if(g.oldID){f.items[g.oldID].setSelected(0)}e(g.items,function(k){if(k.value===g.selectedValue){f.items[k.id].setSelected(1);g.oldID=k.id}});f.showMenu(0,h.clientHeight);b.add(c.doc,"mousedown",g.hideMenu,g);c.addClass(g.id,g.classPrefix+"Selected")},hideMenu:function(g){var f=this;if(f.menu&&f.menu.isMenuVisible){if(g&&g.type=="mousedown"&&(g.target.id==f.id+"_text"||g.target.id==f.id+"_open")){return}if(!g||!c.getParent(g.target,".mceMenu")){c.removeClass(f.id,f.classPrefix+"Selected");b.remove(c.doc,"mousedown",f.hideMenu,f);f.menu.hideMenu()}}},renderMenu:function(){var g=this,f;f=g.settings.control_manager.createDropMenu(g.id+"_menu",{menu_line:1,"class":g.classPrefix+"Menu mceNoIcons",max_width:150,max_height:150});f.onHideMenu.add(g.hideMenu,g);f.add({title:g.settings.title,"class":"mceMenuItemTitle",onclick:function(){if(g.settings.onselect("")!==false){g.select("")}}});e(g.items,function(h){if(h.value===undefined){f.add({title:h.title,"class":"mceMenuItemTitle",onclick:function(){if(g.settings.onselect("")!==false){g.select("")}}})}else{h.id=c.uniqueId();h.onclick=function(){if(g.settings.onselect(h.value)!==false){g.select(h.value)}};f.add(h)}});g.onRenderMenu.dispatch(g,f);g.menu=f},postRender:function(){var f=this,g=f.classPrefix;b.add(f.id,"click",f.showMenu,f);b.add(f.id+"_text","focus",function(){if(!f._focused){f.keyDownHandler=b.add(f.id+"_text","keydown",function(k){var h=-1,i,j=k.keyCode;e(f.items,function(l,m){if(f.selectedValue==l.value){h=m}});if(j==38){i=f.items[h-1]}else{if(j==40){i=f.items[h+1]}else{if(j==13){i=f.selectedValue;f.selectedValue=null;f.settings.onselect(i);return b.cancel(k)}}}if(i){f.hideMenu();f.select(i.value)}})}f._focused=1});b.add(f.id+"_text","blur",function(){b.remove(f.id+"_text","keydown",f.keyDownHandler);f._focused=0});if(d.isIE6||!c.boxModel){b.add(f.id,"mouseover",function(){if(!c.hasClass(f.id,g+"Disabled")){c.addClass(f.id,g+"Hover")}});b.add(f.id,"mouseout",function(){if(!c.hasClass(f.id,g+"Disabled")){c.removeClass(f.id,g+"Hover")}})}f.onPostRender.dispatch(f,c.get(f.id))},destroy:function(){this.parent();b.clear(this.id+"_text");b.clear(this.id+"_open")}})})(tinymce);(function(d){var c=d.DOM,b=d.dom.Event,e=d.each,a=d.util.Dispatcher;d.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(g,f){this.parent(g,f);this.classPrefix="mceNativeListBox"},setDisabled:function(f){c.get(this.id).disabled=f},isDisabled:function(){return c.get(this.id).disabled},select:function(h){var g=this,j,i;if(h==undefined){return g.selectByIndex(-1)}if(h&&h.call){i=h}else{i=function(f){return f==h}}if(h!=g.selectedValue){e(g.items,function(k,f){if(i(k.value)){j=1;g.selectByIndex(f);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(f){c.get(this.id).selectedIndex=f+1;this.selectedValue=this.items[f]?this.items[f].value:null},add:function(j,g,f){var i,h=this;f=f||{};f.value=g;if(h.isRendered()){c.add(c.get(this.id),"option",f,j)}i={title:j,value:g,attribs:f};h.items.push(i);h.onAdd.dispatch(h,i)},getLength:function(){return this.items.length},renderHTML:function(){var g,f=this;g=c.createHTML("option",{value:""},"-- "+f.settings.title+" --");e(f.items,function(h){g+=c.createHTML("option",{value:h.value},h.title)});g=c.createHTML("select",{id:f.id,"class":"mceNativeListBox"},g);return g},postRender:function(){var g=this,h;g.rendered=true;function f(j){var i=g.items[j.target.selectedIndex-1];if(i&&(i=i.value)){g.onChange.dispatch(g,i);if(g.settings.onselect){g.settings.onselect(i)}}}b.add(g.id,"change",f);b.add(g.id,"keydown",function(j){var i;b.remove(g.id,"change",h);i=b.add(g.id,"blur",function(){b.add(g.id,"change",f);b.remove(g.id,"blur",i)});if(j.keyCode==13||j.keyCode==32){f(j);return b.cancel(j)}});g.onPostRender.dispatch(g,c.get(g.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(f,e){this.parent(f,e);this.onRenderMenu=new c.util.Dispatcher(this);e.menu_container=e.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.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(f.hideMenu,f);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(f,e){this.parent(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,"class":"mceAction "+g["class"]})}else{e=b.createHTML("span",{"class":"mceAction "+g["class"]},"")}i+="<td>"+b.createHTML("a",{id:f.id+"_action",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"]});i+="<td>"+b.createHTML("a",{id:f.id+"_open",href:"javascript:;","class":"mceOpen "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+"</td>";i+="</tr></tbody>";return b.createHTML("table",{id:f.id,"class":"mceSplitButton mceSplitButtonEnabled "+g["class"],cellpadding:"0",cellspacing:"0",onmousedown:"return false;",title:g.title},i)},postRender:function(){var e=this,f=e.settings;if(f.onclick){a.add(e.id+"_action","click",function(){if(!e.isDisabled()){f.onclick(e.value)}})}a.add(e.id+"_open","click",e.showMenu,e);a.add(e.id+"_open","focus",function(){e._focused=1});a.add(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")}})})(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(h,g){var f=this;f.parent(h,g);f.settings=g=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"},f.settings);f.onShowMenu=new d.util.Dispatcher(f);f.onHideMenu=new d.util.Dispatcher(f);f.value=g.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.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(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.onHideMenu.dispatch(f);f.isMenuVisible=0},renderMenu:function(){var k=this,f,j=0,l=k.settings,p,h,o,g;g=c.add(l.menu_container,"div",{id:k.id+"_menu","class":l.menu_class+" "+l["class"],style:"position:absolute;left:0;top:-1000px;"});f=c.add(g,"div",{"class":l["class"]+" mceSplitButtonMenu"});c.add(f,"span",{"class":"mceMenuLine"});p=c.add(f,"table",{"class":"mceColorSplitMenu"});h=c.add(p,"tbody");j=0;e(b(l.colors,"array")?l.colors:l.colors.split(","),function(i){i=i.replace(/^#/,"");if(!j--){o=c.add(h,"tr");j=l.grid_width-1}p=c.add(o,"td");p=c.add(p,"a",{href:"javascript:;",style:{backgroundColor:"#"+i},_mce_color:"#"+i})});if(l.more_colors_func){p=c.add(h,"tr");p=c.add(p,"td",{colspan:l.grid_width,"class":"mceMoreColors"});p=c.add(p,"a",{id:k.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},l.more_colors_title);a.add(p,"click",function(i){l.more_colors_func.call(l.more_colors_scope||this);return a.cancel(i)})}c.addClass(f,"mceColorSplitMenu");a.add(k.id+"_menu","click",function(i){var m;i=i.target;if(i.nodeName=="A"&&(m=i.getAttribute("_mce_color"))){k.setColor(m)}return a.cancel(i)});return g},setColor:function(g){var f=this;c.setStyle(f.id+"_preview","backgroundColor",g);f.value=g;f.hideMenu();f.settings.onselect(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);tinymce.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var l=this,e="",g,j,b=tinymce.DOM,m=l.settings,d,a,f,k;k=l.controls;for(d=0;d<k.length;d++){j=k[d];a=k[d-1];f=k[d+1];if(d===0){g="mceToolbarStart";if(j.Button){g+=" mceToolbarStartButton"}else{if(j.SplitButton){g+=" mceToolbarStartSplitButton"}else{if(j.ListBox){g+=" mceToolbarStartListBox"}}}e+=b.createHTML("td",{"class":g},b.createHTML("span",null,"<!-- IE -->"))}if(a&&j.ListBox){if(a.Button||a.SplitButton){e+=b.createHTML("td",{"class":"mceToolbarEnd"},b.createHTML("span",null,"<!-- IE -->"))}}if(b.stdMode){e+='<td style="position: relative">'+j.renderHTML()+"</td>"}else{e+="<td>"+j.renderHTML()+"</td>"}if(f&&j.ListBox){if(f.Button||f.SplitButton){e+=b.createHTML("td",{"class":"mceToolbarStart"},b.createHTML("span",null,"<!-- IE -->"))}}}g="mceToolbarEnd";if(j.Button){g+=" mceToolbarEndButton"}else{if(j.SplitButton){g+=" mceToolbarEndSplitButton"}else{if(j.ListBox){g+=" mceToolbarEndListBox"}}}e+=b.createHTML("td",{"class":g},b.createHTML("span",null,"<!-- IE -->"));return b.createHTML("table",{id:l.id,"class":"mceToolbar"+(m["class"]?" "+m["class"]:""),cellpadding:"0",cellspacing:"0",align:l.settings.align||""},"<tbody><tr>"+e+"</tr></tbody>")}});(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){return this.lookup[d]},requireLangPack:function(e){var d=b.settings;if(d&&d.language){b.ScriptLoader.add(this.urls[e]+"/langs/"+d.language+".js")}},add:function(e,d){this.items.push(d);this.lookup[e]=d;this.onAdd.dispatch(this,e,d);return d},load:function(h,e,d,g){var f=this;if(f.urls[h]){return}if(e.indexOf("/")!=0&&e.indexOf("://")==-1){e=b.baseURL+"/"+e}f.urls[h]=e.substring(0,e.lastIndexOf("/"));if(!f.lookup[h]){b.ScriptLoader.add(e,d,g)}}});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(q){var n=this,p,l=j.ScriptLoader,u,o=[],m;function r(x,y,t){var v=x[y];if(!v){return}if(j.is(v,"string")){t=v.replace(/\.\w+$/,"");t=t?j.resolve(t):0;v=j.resolve(v)}return v.apply(t||this,Array.prototype.slice.call(arguments,2))}q=d({theme:"simple",language:"en"},q);n.settings=q;i.add(document,"init",function(){var s,v;r(q,"onpageload");switch(q.mode){case"exact":s=q.elements||"";if(s.length>0){g(e(s),function(x){if(k.get(x)){m=new j.Editor(x,q);o.push(m);m.render(1)}else{g(document.forms,function(y){g(y.elements,function(z){if(z.name===x){x="mce_editor_"+c++;k.setAttrib(z,"id",x);m=new j.Editor(x,q);o.push(m);m.render(1)}})})}})}break;case"textareas":case"specific_textareas":function t(y,x){return x.constructor===RegExp?x.test(y.className):k.hasClass(y,x)}g(k.select("textarea"),function(x){if(q.editor_deselector&&t(x,q.editor_deselector)){return}if(!q.editor_selector||t(x,q.editor_selector)){u=k.get(x.name);if(!x.id&&!u){x.id=x.name}if(!x.id||n.get(x.id)){x.id=k.uniqueId()}m=new j.Editor(x.id,q);o.push(m);m.render(1)}});break}if(q.oninit){s=v=0;g(o,function(x){v++;if(!x.initialized){x.onInit.add(function(){s++;if(s==v){r(q,"oninit")}})}else{s++}if(s==v){r(q,"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);if(j.adapter){j.adapter.patchEditor(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;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){function m(){n.destroy();l.detachEvent("onunload",m);l=l.tinyMCE=l.tinymce=null}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(m){var n=m.DOM,j=m.dom.Event,f=m.extend,k=m.util.Dispatcher,i=m.each,a=m.isGecko,b=m.isIE,e=m.isWebKit,d=m.is,h=m.ThemeManager,c=m.PluginManager,o=m.inArray,l=m.grep,g=m.explode;m.create("tinymce.Editor",{Editor:function(r,q){var p=this;p.id=p.editorId=r;p.execCommands={};p.queryStateCommands={};p.queryValueCommands={};p.isNotDirty=false;p.plugins={};i(["onPreInit","onBeforeRenderUI","onPostRender","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"],function(s){p[s]=new k(p)});p.settings=q=f({id:r,language:"en",docs_language:"en",theme:"simple",skin:"default",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:m.documentBaseURL,add_form_submit_trigger:1,submit_patch:1,add_unload_trigger:1,convert_urls:1,relative_urls:1,remove_script_host:1,table_inline_editing:0,object_resizing:1,cleanup:1,accessibility_focus:1,custom_shortcuts:1,custom_undo_redo_keyboard_shortcuts:1,custom_undo_redo_restore_selection:1,custom_undo_redo:1,doctype:m.isIE6?'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">':"<!DOCTYPE>",visual_table_class:"mceItemTable",visual:1,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",apply_source_formatting:1,directionality:"ltr",forced_root_block:"p",valid_elements:"@[id|class|style|title|dir<ltr?rtl|lang|xml::lang|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],a[rel|rev|charset|hreflang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur],strong/b,em/i,strike,u,#p,-ol[type|compact],-ul[type|compact],-li,br,img[longdesc|usemap|src|border|alt=|title|hspace|vspace|width|height|align],-sub,-sup,-blockquote[cite],-table[border|cellspacing|cellpadding|width|frame|rules|height|align|summary|bgcolor|background|bordercolor],-tr[rowspan|width|height|align|valign|bgcolor|background|bordercolor],tbody,thead,tfoot,#td[colspan|rowspan|width|height|align|valign|bgcolor|background|bordercolor|scope],#th[colspan|rowspan|width|height|align|valign|scope],caption,-div,-span,-code,-pre,address,-h1,-h2,-h3,-h4,-h5,-h6,hr[size|noshade],-font[face|size|color],dd,dl,dt,cite,abbr,acronym,del[datetime|cite],ins[datetime|cite],object[classid|width|height|codebase|*],param[name|value],embed[type|width|height|src|*],script[src|type],map[name],area[shape|coords|href|alt|target],bdo,button,col[align|char|charoff|span|valign|width],colgroup[align|char|charoff|span|valign|width],dfn,fieldset,form[action|accept|accept-charset|enctype|method],input[accept|alt|checked|disabled|maxlength|name|readonly|size|src|type|value|tabindex|accesskey],kbd,label[for],legend,noscript,optgroup[label|disabled],option[disabled|label|selected|value],q[cite],samp,select[disabled|multiple|name|size],small,textarea[cols|rows|disabled|name|readonly],tt,var,big",hidden_input:1,padd_empty_editor:1,render_ui:1,init_theme:1,force_p_newlines:1,indentation:"30px",keep_styles:1,fix_table_elements:1,inline_styles:1,convert_fonts_to_spans:true},q);p.documentBaseURI=new m.util.URI(q.document_base_url||m.documentBaseURL,{base_uri:tinyMCE.baseURI});p.baseURI=m.baseURI;p.execCallback("setup",p)},render:function(r){var u=this,v=u.settings,x=u.id,p=m.ScriptLoader;if(!j.domLoaded){j.add(document,"init",function(){u.render()});return}tinyMCE.settings=v;if(!u.getElement()){return}if(m.isIDevice){return}if(!/TEXTAREA|INPUT/i.test(u.getElement().nodeName)&&v.hidden_input&&n.getParent(x,"form")){n.insertAfter(n.create("input",{type:"hidden",name:x}),x)}if(m.WindowManager){u.windowManager=new m.WindowManager(u)}if(v.encoding=="xml"){u.onGetContent.add(function(s,t){if(t.save){t.content=n.encode(t.content)}})}if(v.add_form_submit_trigger){u.onSubmit.addToTop(function(){if(u.initialized){u.save();u.isNotDirty=1}})}if(v.add_unload_trigger){u._beforeUnload=tinyMCE.onBeforeUnload.add(function(){if(u.initialized&&!u.destroyed&&!u.isHidden()){u.save({format:"raw",no_events:true})}})}m.addUnload(u.destroy,u);if(v.submit_patch){u.onBeforeRenderUI.add(function(){var s=u.getElement().form;if(!s){return}if(s._mceOldSubmit){return}if(!s.submit.nodeType&&!s.submit.length){u.formElement=s;s._mceOldSubmit=s.submit;s.submit=function(){m.triggerSave();u.isNotDirty=1;return u.formElement._mceOldSubmit(u.formElement)}}s=null})}function q(){if(v.language){p.add(m.baseURL+"/langs/"+v.language+".js")}if(v.theme&&v.theme.charAt(0)!="-"&&!h.urls[v.theme]){h.load(v.theme,"themes/"+v.theme+"/editor_template"+m.suffix+".js")}i(g(v.plugins),function(s){if(s&&s.charAt(0)!="-"&&!c.urls[s]){if(s=="safari"){return}c.load(s,"plugins/"+s+"/editor_plugin"+m.suffix+".js")}});p.loadQueue(function(){if(!u.removed){u.init()}})}q()},init:function(){var r,E=this,F=E.settings,B,y,A=E.getElement(),q,p,C,x,z,D;m.add(E);if(F.theme){F.theme=F.theme.replace(/-/,"");q=h.get(F.theme);E.theme=new q();if(E.theme.init&&F.init_theme){E.theme.init(E,h.urls[F.theme]||m.documentBaseURL.replace(/\/$/,""))}}i(g(F.plugins.replace(/\-/g,"")),function(G){var H=c.get(G),t=c.urls[G]||m.documentBaseURL.replace(/\/$/,""),s;if(H){s=new H(E,t);E.plugins[G]=s;if(s.init){s.init(E,t)}}});if(F.popup_css!==false){if(F.popup_css){F.popup_css=E.documentBaseURI.toAbsolute(F.popup_css)}else{F.popup_css=E.baseURI.toAbsolute("themes/"+F.theme+"/skins/"+F.skin+"/dialog.css")}}if(F.popup_css_add){F.popup_css+=","+E.documentBaseURI.toAbsolute(F.popup_css_add)}E.controlManager=new m.ControlManager(E);if(F.custom_undo_redo){E.onBeforeExecCommand.add(function(t,G,u,H,s){if(G!="Undo"&&G!="Redo"&&G!="mceRepaint"&&(!s||!s.skip_undo)){if(!E.undoManager.hasUndo()){E.undoManager.add()}}});E.onExecCommand.add(function(t,G,u,H,s){if(G!="Undo"&&G!="Redo"&&G!="mceRepaint"&&(!s||!s.skip_undo)){E.undoManager.add()}})}E.onExecCommand.add(function(s,t){if(!/^(FontName|FontSize)$/.test(t)){E.nodeChanged()}});if(a){function v(s,t){if(!t||!t.initial){E.execCommand("mceRepaint")}}E.onUndo.add(v);E.onRedo.add(v);E.onSetContent.add(v)}E.onBeforeRenderUI.dispatch(E,E.controlManager);if(F.render_ui){B=F.width||A.style.width||A.offsetWidth;y=F.height||A.style.height||A.offsetHeight;E.orgDisplay=A.style.display;D=/^[0-9\.]+(|px)$/i;if(D.test(""+B)){B=Math.max(parseInt(B)+(q.deltaWidth||0),100)}if(D.test(""+y)){y=Math.max(parseInt(y)+(q.deltaHeight||0),100)}q=E.theme.renderUI({targetNode:A,width:B,height:y,deltaWidth:F.delta_width,deltaHeight:F.delta_height});E.editorContainer=q.editorContainer}if(document.domain&&location.hostname!=document.domain){m.relaxedDomain=document.domain}n.setStyles(q.sizeContainer||q.editorContainer,{width:B,height:y});y=(q.iframeHeight||y)+(typeof(y)=="number"?(q.deltaHeight||0):"");if(y<100){y=100}E.iframeHTML=F.doctype+'<html><head xmlns="http://www.w3.org/1999/xhtml">';if(F.document_base_url!=m.documentBaseURL){E.iframeHTML+='<base href="'+E.documentBaseURI.getURI()+'" />'}E.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=7" /><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';if(m.relaxedDomain){E.iframeHTML+='<script type="text/javascript">document.domain = "'+m.relaxedDomain+'";<\/script>'}x=F.body_id||"tinymce";if(x.indexOf("=")!=-1){x=E.getParam("body_id","","hash");x=x[E.id]||x}z=F.body_class||"";if(z.indexOf("=")!=-1){z=E.getParam("body_class","","hash");z=z[E.id]||""}E.iframeHTML+='</head><body id="'+x+'" class="mceContentBody '+z+'"></body></html>';if(m.relaxedDomain){if(b||(m.isOpera&&parseFloat(opera.version())>=9.5)){C='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+E.id+'");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()'}else{if(m.isOpera){C='javascript:(function(){document.open();document.domain="'+document.domain+'";document.close();ed.setupIframe();})()'}}}r=n.add(q.iframeContainer,"iframe",{id:E.id+"_ifr",src:C||'javascript:""',frameBorder:"0",style:{width:"100%",height:y}});E.contentAreaContainer=q.iframeContainer;n.get(q.editorContainer).style.display=E.orgDisplay;n.get(E.id).style.display="none";if(!b||!m.relaxedDomain){E.setupIframe()}A=r=q=null},setupIframe:function(){var z=this,A=z.settings,r=n.get(z.id),u=z.getDoc(),q,x;if(!b||!m.relaxedDomain){u.open();u.write(z.iframeHTML);u.close()}if(!b){try{if(!A.readonly){u.designMode="On"}}catch(v){}}if(b){x=z.getBody();n.hide(x);if(!A.readonly){x.contentEditable=true}n.show(x)}z.dom=new m.dom.DOMUtils(z.getDoc(),{keep_values:true,url_converter:z.convertURL,url_converter_scope:z,hex_colors:A.force_hex_style_colors,class_filter:A.class_filter,update_styles:1,fix_ie_paragraphs:1,valid_styles:A.valid_styles});z.schema=new m.dom.Schema();z.serializer=new m.dom.Serializer(f(A,{valid_elements:A.verify_html===false?"*[*]":A.valid_elements,dom:z.dom,schema:z.schema}));z.selection=new m.dom.Selection(z.dom,z.getWin(),z.serializer);z.formatter=new m.Formatter(this);z.formatter.register({alignleft:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"left"}},{selector:"img,table",styles:{"float":"left"}}],aligncenter:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"center"}},{selector:"img",styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"right"}},{selector:"img,table",styles:{"float":"right"}}],alignfull:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"justify"}}],bold:[{inline:"strong"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b"}],italic:[{inline:"em"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:true},{inline:"u"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:true},{inline:"u"}],forecolor:{inline:"span",styles:{color:"%value"}},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"}},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"},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}]});i("p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp".split(/\s/),function(s){z.formatter.register(s,{block:s,remove:"all"})});z.formatter.register(z.settings.formats);z.undoManager=new m.UndoManager(z);z.undoManager.onAdd.add(function(t,s){if(!s.initial){return z.onChange.dispatch(z,s,t)}});z.undoManager.onUndo.add(function(t,s){return z.onUndo.dispatch(z,s,t)});z.undoManager.onRedo.add(function(t,s){return z.onRedo.dispatch(z,s,t)});z.forceBlocks=new m.ForceBlocks(z,{forced_root_block:A.forced_root_block});z.editorCommands=new m.EditorCommands(z);z.serializer.onPreProcess.add(function(s,t){return z.onPreProcess.dispatch(z,t,s)});z.serializer.onPostProcess.add(function(s,t){return z.onPostProcess.dispatch(z,t,s)});z.onPreInit.dispatch(z);if(!A.gecko_spellcheck){z.getBody().spellcheck=0}if(!A.readonly){z._addEvents()}z.controlManager.onPostRender.dispatch(z,z.controlManager);z.onPostRender.dispatch(z);if(A.directionality){z.getBody().dir=A.directionality}if(A.nowrap){z.getBody().style.whiteSpace="nowrap"}if(A.custom_elements){function y(s,t){i(g(A.custom_elements),function(B){var C;if(B.indexOf("~")===0){B=B.substring(1);C="span"}else{C="div"}t.content=t.content.replace(new RegExp("<("+B+")([^>]*)>","g"),"<"+C+' _mce_name="$1"$2>');t.content=t.content.replace(new RegExp("</("+B+")>","g"),"</"+C+">")})}z.onBeforeSetContent.add(y);z.onPostProcess.add(function(s,t){if(t.set){y(s,t)}})}if(A.handle_node_change_callback){z.onNodeChange.add(function(t,s,B){z.execCallback("handle_node_change_callback",z.id,B,-1,-1,true,z.selection.isCollapsed())})}if(A.save_callback){z.onSaveContent.add(function(s,B){var t=z.execCallback("save_callback",z.id,B.content,z.getBody());if(t){B.content=t}})}if(A.onchange_callback){z.onChange.add(function(t,s){z.execCallback("onchange_callback",z,s)})}if(A.convert_newlines_to_brs){z.onBeforeSetContent.add(function(s,t){if(t.initial){t.content=t.content.replace(/\r?\n/g,"<br />")}})}if(A.fix_nesting&&b){z.onBeforeSetContent.add(function(s,t){t.content=z._fixNesting(t.content)})}if(A.preformatted){z.onPostProcess.add(function(s,t){t.content=t.content.replace(/^\s*<pre.*?>/,"");t.content=t.content.replace(/<\/pre>\s*$/,"");if(t.set){t.content='<pre class="mceItemHidden">'+t.content+"</pre>"}})}if(A.verify_css_classes){z.serializer.attribValueFilter=function(D,B){var C,t;if(D=="class"){if(!z.classesRE){t=z.dom.getClasses();if(t.length>0){C="";i(t,function(s){C+=(C?"|":"")+s["class"]});z.classesRE=new RegExp("("+C+")","gi")}}return !z.classesRE||/(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(B)||z.classesRE.test(B)?B:""}return B}}if(A.cleanup_callback){z.onBeforeSetContent.add(function(s,t){t.content=z.execCallback("cleanup_callback","insert_to_editor",t.content,t)});z.onPreProcess.add(function(s,t){if(t.set){z.execCallback("cleanup_callback","insert_to_editor_dom",t.node,t)}if(t.get){z.execCallback("cleanup_callback","get_from_editor_dom",t.node,t)}});z.onPostProcess.add(function(s,t){if(t.set){t.content=z.execCallback("cleanup_callback","insert_to_editor",t.content,t)}if(t.get){t.content=z.execCallback("cleanup_callback","get_from_editor",t.content,t)}})}if(A.save_callback){z.onGetContent.add(function(s,t){if(t.save){t.content=z.execCallback("save_callback",z.id,t.content,z.getBody())}})}if(A.handle_event_callback){z.onEvent.add(function(s,t,B){if(z.execCallback("handle_event_callback",t,s,B)===false){j.cancel(t)}})}z.onSetContent.add(function(){z.addVisual(z.getBody())});if(A.padd_empty_editor){z.onPostProcess.add(function(s,t){t.content=t.content.replace(/^(<p[^>]*>( | |\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")})}if(a){function p(s,t){i(s.dom.select("a"),function(C){var B=C.parentNode;if(s.dom.isBlock(B)&&B.lastChild===C){s.dom.add(B,"br",{_mce_bogus:1})}})}z.onExecCommand.add(function(s,t){if(t==="CreateLink"){p(s)}});z.onSetContent.add(z.selection.onSetContent.add(p));if(!A.readonly){try{u.designMode="Off";u.designMode="On"}catch(v){}}}setTimeout(function(){if(z.removed){return}z.load({initial:true,format:(A.cleanup_on_startup?"html":"raw")});z.startContent=z.getContent({format:"raw"});z.initialized=true;z.onInit.dispatch(z);z.execCallback("setupcontent_callback",z.id,z.getBody(),z.getDoc());z.execCallback("init_instance_callback",z);z.focus(true);z.nodeChanged({initial:1});if(A.content_css){m.each(g(A.content_css),function(s){z.dom.loadCSS(z.documentBaseURI.toAbsolute(s))})}if(A.auto_focus){setTimeout(function(){var s=m.get(A.auto_focus);s.selection.select(s.getBody(),1);s.selection.collapse(1);s.getWin().focus()},100)}},1);r=null},focus:function(s){var x,q=this,v=q.settings.content_editable,r,p,u=q.getDoc();if(!s){r=q.selection.getRng();if(r.item){p=r.item(0)}if(!v){q.getWin().focus()}if(p&&p.ownerDocument==u){r=u.body.createControlRange();r.addElement(p);r.select()}}if(m.activeEditor!=q){if((x=m.activeEditor)!=null){x.onDeactivate.dispatch(x,q)}q.onActivate.dispatch(q,x)}m._setActive(q)},execCallback:function(u){var p=this,r=p.settings[u],q;if(!r){return}if(p.callbackLookup&&(q=p.callbackLookup[u])){r=q.func;q=q.scope}if(d(r,"string")){q=r.replace(/\.\w+$/,"");q=q?m.resolve(q):0;r=m.resolve(r);p.callbackLookup=p.callbackLookup||{};p.callbackLookup[u]={func:r,scope:q}}return r.apply(q||p,Array.prototype.slice.call(arguments,1))},translate:function(p){var r=this.settings.language||"en",q=m.i18n;if(!p){return""}return q[r+"."+p]||p.replace(/{\#([^}]+)\}/g,function(t,s){return q[r+"."+s]||"{#"+s+"}"})},getLang:function(q,p){return m.i18n[(this.settings.language||"en")+"."+q]||(d(p)?p:"{#"+q+"}")},getParam:function(u,r,p){var s=m.trim,q=d(this.settings[u])?this.settings[u]:r,t;if(p==="hash"){t={};if(d(q,"string")){i(q.indexOf("=")>0?q.split(/[;,](?![^=;,]*(?:[;,]|$))/):q.split(","),function(x){x=x.split("=");if(x.length>1){t[s(x[0])]=s(x[1])}else{t[s(x[0])]=s(x)}})}else{t=q}return t}return q},nodeChanged:function(r){var p=this,q=p.selection,u=(b?q.getNode():q.getStart())||p.getBody();if(p.initialized){r=r||{};u=b&&u.ownerDocument!=p.getDoc()?p.getBody():u;r.parents=[];p.dom.getParent(u,function(s){if(s.nodeName=="BODY"){return true}r.parents.push(s)});p.onNodeChange.dispatch(p,r?r.controlManager||p.controlManager:p.controlManager,u,q.isCollapsed(),r)}},addButton:function(r,q){var p=this;p.buttons=p.buttons||{};p.buttons[r]=q},addCommand:function(r,q,p){this.execCommands[r]={func:q,scope:p||this}},addQueryStateHandler:function(r,q,p){this.queryStateCommands[r]={func:q,scope:p||this}},addQueryValueHandler:function(r,q,p){this.queryValueCommands[r]={func:q,scope:p||this}},addShortcut:function(r,u,p,s){var q=this,v;if(!q.settings.custom_shortcuts){return false}q.shortcuts=q.shortcuts||{};if(d(p,"string")){v=p;p=function(){q.execCommand(v,false,null)}}if(d(p,"object")){v=p;p=function(){q.execCommand(v[0],v[1],v[2])}}i(g(r),function(t){var x={func:p,scope:s||this,desc:u,alt:false,ctrl:false,shift:false};i(g(t,"+"),function(y){switch(y){case"alt":case"ctrl":case"shift":x[y]=true;break;default:x.charCode=y.charCodeAt(0);x.keyCode=y.toUpperCase().charCodeAt(0)}});q.shortcuts[(x.ctrl?"ctrl":"")+","+(x.alt?"alt":"")+","+(x.shift?"shift":"")+","+x.keyCode]=x});return true},execCommand:function(x,v,z,p){var r=this,u=0,y,q;if(!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(x)&&(!p||!p.skip_focus)){r.focus()}y={};r.onBeforeExecCommand.dispatch(r,x,v,z,y);if(y.terminate){return false}if(r.execCallback("execcommand_callback",r.id,r.selection.getNode(),x,v,z)){r.onExecCommand.dispatch(r,x,v,z,p);return true}if(y=r.execCommands[x]){q=y.func.call(y.scope,v,z);if(q!==true){r.onExecCommand.dispatch(r,x,v,z,p);return q}}i(r.plugins,function(s){if(s.execCommand&&s.execCommand(x,v,z)){r.onExecCommand.dispatch(r,x,v,z,p);u=1;return false}});if(u){return true}if(r.theme&&r.theme.execCommand&&r.theme.execCommand(x,v,z)){r.onExecCommand.dispatch(r,x,v,z,p);return true}if(m.GlobalCommands.execCommand(r,x,v,z)){r.onExecCommand.dispatch(r,x,v,z,p);return true}if(r.editorCommands.execCommand(x,v,z)){r.onExecCommand.dispatch(r,x,v,z,p);return true}r.getDoc().execCommand(x,v,z);r.onExecCommand.dispatch(r,x,v,z,p)},queryCommandState:function(u){var q=this,v,r;if(q._isHidden()){return}if(v=q.queryStateCommands[u]){r=v.func.call(v.scope);if(r!==true){return r}}v=q.editorCommands.queryCommandState(u);if(v!==-1){return v}try{return this.getDoc().queryCommandState(u)}catch(p){}},queryCommandValue:function(v){var q=this,u,r;if(q._isHidden()){return}if(u=q.queryValueCommands[v]){r=u.func.call(u.scope);if(r!==true){return r}}u=q.editorCommands.queryCommandValue(v);if(d(u)){return u}try{return this.getDoc().queryCommandValue(v)}catch(p){}},show:function(){var p=this;n.show(p.getContainer());n.hide(p.id);p.load()},hide:function(){var p=this,q=p.getDoc();if(b&&q){q.execCommand("SelectAll")}p.save();n.hide(p.getContainer());n.setStyle(p.id,"display",p.orgDisplay)},isHidden:function(){return !n.isHidden(this.id)},setProgressState:function(p,q,r){this.onSetProgressState.dispatch(this,p,q,r);return p},load:function(s){var p=this,r=p.getElement(),q;if(r){s=s||{};s.load=true;q=p.setContent(d(r.value)?r.value:r.innerHTML,s);s.element=r;if(!s.no_events){p.onLoadContent.dispatch(p,s)}s.element=r=null;return q}},save:function(u){var p=this,s=p.getElement(),q,r;if(!s||!p.initialized){return}u=u||{};u.save=true;if(!u.no_events){p.undoManager.typing=0;p.undoManager.add()}u.element=s;q=u.content=p.getContent(u);if(!u.no_events){p.onSaveContent.dispatch(p,u)}q=u.content;if(!/TEXTAREA|INPUT/i.test(s.nodeName)){s.innerHTML=q;if(r=n.getParent(p.id,"form")){i(r.elements,function(t){if(t.name==p.id){t.value=q;return false}})}}else{s.value=q}u.element=s=null;return q},setContent:function(q,r){var p=this;r=r||{};r.format=r.format||"html";r.set=true;r.content=q;if(!r.no_events){p.onBeforeSetContent.dispatch(p,r)}if(!m.isIE&&(q.length===0||/^\s+$/.test(q))){r.content=p.dom.setHTML(p.getBody(),'<br _mce_bogus="1" />');r.format="raw"}r.content=p.dom.setHTML(p.getBody(),m.trim(r.content));if(r.format!="raw"&&p.settings.cleanup){r.getInner=true;r.content=p.dom.setHTML(p.getBody(),p.serializer.serialize(p.getBody(),r))}if(!r.no_events){p.onSetContent.dispatch(p,r)}return r.content},getContent:function(r){var p=this,q;r=r||{};r.format=r.format||"html";r.get=true;if(!r.no_events){p.onBeforeGetContent.dispatch(p,r)}if(r.format!="raw"&&p.settings.cleanup){r.getInner=true;q=p.serializer.serialize(p.getBody(),r)}else{q=p.getBody().innerHTML}q=q.replace(/^\s*|\s*$/g,"");r.content=q;if(!r.no_events){p.onGetContent.dispatch(p,r)}return r.content},isDirty:function(){var p=this;return m.trim(p.startContent)!=m.trim(p.getContent({format:"raw",no_events:1}))&&!p.isNotDirty},getContainer:function(){var p=this;if(!p.container){p.container=n.get(p.editorContainer||p.id+"_parent")}return p.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return n.get(this.settings.content_element||this.id)},getWin:function(){var p=this,q;if(!p.contentWindow){q=n.get(p.id+"_ifr");if(q){p.contentWindow=q.contentWindow}}return p.contentWindow},getDoc:function(){var q=this,p;if(!q.contentDocument){p=q.getWin();if(p){q.contentDocument=p.document}}return q.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(p,x,v){var q=this,r=q.settings;if(r.urlconverter_callback){return q.execCallback("urlconverter_callback",p,v,true,x)}if(!r.convert_urls||(v&&v.nodeName=="LINK")||p.indexOf("file:")===0){return p}if(r.relative_urls){return q.documentBaseURI.toRelative(p)}p=q.documentBaseURI.toAbsolute(p,r.remove_script_host);return p},addVisual:function(r){var p=this,q=p.settings;r=r||p.getBody();if(!d(p.hasVisual)){p.hasVisual=q.visual}i(p.dom.select("table,a",r),function(t){var s;switch(t.nodeName){case"TABLE":s=p.dom.getAttrib(t,"border");if(!s||s=="0"){if(p.hasVisual){p.dom.addClass(t,q.visual_table_class)}else{p.dom.removeClass(t,q.visual_table_class)}}return;case"A":s=p.dom.getAttrib(t,"name");if(s){if(p.hasVisual){p.dom.addClass(t,"mceItemAnchor")}else{p.dom.removeClass(t,"mceItemAnchor")}}return}});p.onVisualAid.dispatch(p,r,p.hasVisual)},remove:function(){var p=this,q=p.getContainer();p.removed=1;p.hide();p.execCallback("remove_instance_callback",p);p.onRemove.dispatch(p);p.onExecCommand.listeners=[];m.remove(p);n.remove(q)},destroy:function(q){var p=this;if(p.destroyed){return}if(!q){m.removeUnload(p.destroy);tinyMCE.onBeforeUnload.remove(p._beforeUnload);if(p.theme&&p.theme.destroy){p.theme.destroy()}p.controlManager.destroy();p.selection.destroy();p.dom.destroy();if(!p.settings.content_editable){j.clear(p.getWin());j.clear(p.getDoc())}j.clear(p.getBody());j.clear(p.formElement)}if(p.formElement){p.formElement.submit=p.formElement._mceOldSubmit;p.formElement._mceOldSubmit=null}p.contentAreaContainer=p.formElement=p.container=p.settings.content_element=p.bodyElement=p.contentDocument=p.contentWindow=null;if(p.selection){p.selection=p.selection.win=p.selection.dom=p.selection.dom.doc=null}p.destroyed=1},_addEvents:function(){var z=this,r,A=z.settings,q=z.dom,x={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"};function p(t,B){var s=t.type;if(z.removed){return}if(z.onEvent.dispatch(z,t,B)!==false){z[x[t.fakeType||t.type]].dispatch(z,t,B)}}i(x,function(t,s){switch(s){case"contextmenu":if(m.isOpera){q.bind(z.getBody(),"mousedown",function(B){if(B.ctrlKey){B.fakeType="contextmenu";p(B)}})}else{q.bind(z.getBody(),s,p)}break;case"paste":q.bind(z.getBody(),s,function(B){p(B)});break;case"submit":case"reset":q.bind(z.getElement().form||n.getParent(z.id,"form"),s,p);break;default:q.bind(A.content_editable?z.getBody():z.getDoc(),s,p)}});q.bind(A.content_editable?z.getBody():(a?z.getDoc():z.getWin()),"focus",function(s){z.focus(true)});if(m.isGecko){q.bind(z.getDoc(),"DOMNodeInserted",function(t){var s;t=t.target;if(t.nodeType===1&&t.nodeName==="IMG"&&(s=t.getAttribute("_mce_src"))){t.src=z.documentBaseURI.toAbsolute(s)}})}if(a){function u(){var C=this,E=C.getDoc(),D=C.settings;if(a&&!D.readonly){if(C._isHidden()){try{if(!D.content_editable){E.designMode="On"}}catch(B){}}try{E.execCommand("styleWithCSS",0,false)}catch(B){if(!C._isHidden()){try{E.execCommand("useCSS",0,true)}catch(B){}}}if(!D.table_inline_editing){try{E.execCommand("enableInlineTableEditing",false,false)}catch(B){}}if(!D.object_resizing){try{E.execCommand("enableObjectResizing",false,false)}catch(B){}}}}z.onBeforeExecCommand.add(u);z.onMouseDown.add(u)}if(m.isWebKit){z.onClick.add(function(s,t){t=t.target;if(t.nodeName=="IMG"||(t.nodeName=="A"&&q.hasClass(t,"mceItemAnchor"))){z.selection.getSel().setBaseAndExtent(t,0,t,1);z.nodeChanged()}})}z.onMouseUp.add(z.nodeChanged);z.onKeyUp.add(function(s,t){var B=t.keyCode;if((B>=33&&B<=36)||(B>=37&&B<=40)||B==13||B==45||B==46||B==8||(m.isMac&&(B==91||B==93))||t.ctrlKey){z.nodeChanged()}});z.onReset.add(function(){z.setContent(z.startContent,{format:"raw"})});if(A.custom_shortcuts){if(A.custom_undo_redo_keyboard_shortcuts){z.addShortcut("ctrl+z",z.getLang("undo_desc"),"Undo");z.addShortcut("ctrl+y",z.getLang("redo_desc"),"Redo")}z.addShortcut("ctrl+b",z.getLang("bold_desc"),"Bold");z.addShortcut("ctrl+i",z.getLang("italic_desc"),"Italic");z.addShortcut("ctrl+u",z.getLang("underline_desc"),"Underline");for(r=1;r<=6;r++){z.addShortcut("ctrl+"+r,"",["FormatBlock",false,"h"+r])}z.addShortcut("ctrl+7","",["FormatBlock",false,"<p>"]);z.addShortcut("ctrl+8","",["FormatBlock",false,"<div>"]);z.addShortcut("ctrl+9","",["FormatBlock",false,"<address>"]);function v(t){var s=null;if(!t.altKey&&!t.ctrlKey&&!t.metaKey){return s}i(z.shortcuts,function(B){if(m.isMac&&B.ctrl!=t.metaKey){return}else{if(!m.isMac&&B.ctrl!=t.ctrlKey){return}}if(B.alt!=t.altKey){return}if(B.shift!=t.shiftKey){return}if(t.keyCode==B.keyCode||(t.charCode&&t.charCode==B.charCode)){s=B;return false}});return s}z.onKeyUp.add(function(s,t){var B=v(t);if(B){return j.cancel(t)}});z.onKeyPress.add(function(s,t){var B=v(t);if(B){return j.cancel(t)}});z.onKeyDown.add(function(s,t){var B=v(t);if(B){B.func.call(B.scope);return j.cancel(t)}})}if(m.isIE){q.bind(z.getDoc(),"controlselect",function(B){var t=z.resizeInfo,s;B=B.target;if(B.nodeName!=="IMG"){return}if(t){q.unbind(t.node,t.ev,t.cb)}if(!q.hasClass(B,"mceItemNoResize")){ev="resizeend";s=q.bind(B,ev,function(D){var C;D=D.target;if(C=q.getStyle(D,"width")){q.setAttrib(D,"width",C.replace(/[^0-9%]+/g,""));q.setStyle(D,"width","")}if(C=q.getStyle(D,"height")){q.setAttrib(D,"height",C.replace(/[^0-9%]+/g,""));q.setStyle(D,"height","")}})}else{ev="resizestart";s=q.bind(B,"resizestart",j.cancel,j)}t=z.resizeInfo={node:B,ev:ev,cb:s}});z.onKeyDown.add(function(s,t){switch(t.keyCode){case 8:if(z.selection.getRng().item){s.dom.remove(z.selection.getRng().item(0));return j.cancel(t)}}})}if(m.isOpera){z.onClick.add(function(s,t){j.prevent(t)})}if(A.custom_undo_redo){function y(){z.undoManager.typing=0;z.undoManager.add()}q.bind(z.getDoc(),"focusout",function(s){if(!z.removed&&z.undoManager.typing){y()}});z.onKeyUp.add(function(s,t){if((t.keyCode>=33&&t.keyCode<=36)||(t.keyCode>=37&&t.keyCode<=40)||t.keyCode==13||t.keyCode==45||t.ctrlKey){y()}});z.onKeyDown.add(function(t,E){var s,D,C;if(b&&E.keyCode==46){s=z.selection.getRng();if(s.parentElement){D=s.parentElement();if(E.ctrlKey){s.moveEnd("word",1);s.select()}z.selection.getSel().clear();if(s.parentElement()==D){C=z.selection.getBookmark();try{D.innerHTML=D.innerHTML}catch(B){}z.selection.moveToBookmark(C)}E.preventDefault();return}}if((E.keyCode>=33&&E.keyCode<=36)||(E.keyCode>=37&&E.keyCode<=40)||E.keyCode==13||E.keyCode==45){if(z.undoManager.typing){y()}return}if(!z.undoManager.typing){z.undoManager.add();z.undoManager.typing=1}});z.onMouseDown.add(function(){if(z.undoManager.typing){y()}})}},_isHidden:function(){var p;if(!a){return 0}p=this.selection.getSel();return(!p||!p.rangeCount||p.rangeCount==0)},_fixNesting:function(q){var r=[],p;q=q.replace(/<(\/)?([^\s>]+)[^>]*?>/g,function(t,s,v){var u;if(s==="/"){if(!r.length){return""}if(v!==r[r.length-1].tag){for(p=r.length-1;p>=0;p--){if(r[p].tag===v){r[p].close=1;break}}return""}else{r.pop();if(r.length&&r[r.length-1].close){t=t+"</"+r[r.length-1].tag+">";r.pop()}}}else{if(/^(br|hr|input|meta|img|link|param)$/i.test(v)){return t}if(/\/>$/.test(t)){return t}r.push({tag:v})}return t});for(p=r.length-1;p>=0;p--){q+="</"+r[p].tag+">"}return q}})})(tinymce);(function(c){var d=c.each,e,a=true,b=false;c.EditorCommands=function(n){var l=n.dom,p=n.selection,j={state:{},exec:{},value:{}},k=n.settings,o;function q(y,x,v){var u;y=y.toLowerCase();if(u=j.exec[y]){u(y,x,v);return a}return b}function m(v){var u;v=v.toLowerCase();if(u=j.state[v]){return u(v)}return -1}function h(v){var u;v=v.toLowerCase();if(u=j.value[v]){return u(v)}return b}function t(u,v){v=v||"exec";d(u,function(y,x){d(x.toLowerCase().split(","),function(z){j[v][z]=y})})}c.extend(this,{execCommand:q,queryCommandState:m,queryCommandValue:h,addCommands:t});function f(x,v,u){if(v===e){v=b}if(u===e){u=null}return n.getDoc().execCommand(x,v,u)}function s(u){return n.formatter.match(u)}function r(u,v){n.formatter.toggle(u,v?{value:v}:e)}function i(u){o=p.getBookmark(u)}function g(){p.moveToBookmark(o)}t({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){n.undoManager.add()},"Cut,Copy,Paste":function(y){var x=n.getDoc(),u;try{f(y)}catch(v){u=a}if(u||!x.queryCommandSupported(y)){if(c.isGecko){n.windowManager.confirm(n.getLang("clipboard_msg"),function(z){if(z){open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}})}else{n.windowManager.alert(n.getLang("clipboard_no_support"))}}},unlink:function(u){if(p.isCollapsed()){p.select(p.getNode())}f(u);p.collapse(b)},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(u){var v=u.substring(7);d("left,center,right,full".split(","),function(x){if(v!=x){n.formatter.remove("align"+x)}});r("align"+v)},"InsertUnorderedList,InsertOrderedList":function(x){var u,v;f(x);u=l.getParent(p.getNode(),"ol,ul");if(u){v=u.parentNode;if(/^(H[1-6]|P|ADDRESS|PRE)$/.test(v.nodeName)){i();l.split(v,u);g()}}},"Bold,Italic,Underline,Strikethrough":function(u){r(u)},"ForeColor,HiliteColor,FontName":function(x,v,u){r(x,u)},FontSize:function(y,x,v){var u,z;if(v>=1&&v<=7){z=c.explode(k.font_size_style_values);u=c.explode(k.font_size_classes);if(u){v=u[v-1]||v}else{v=z[v-1]||v}}r(y,v)},RemoveFormat:function(u){n.formatter.remove(u)},mceBlockQuote:function(u){r("blockquote")},FormatBlock:function(x,v,u){return r(u||"p")},mceCleanup:function(){var u=p.getBookmark();n.setContent(n.getContent({cleanup:a}),{cleanup:a});p.moveToBookmark(u)},mceRemoveNode:function(y,x,v){var u=v||p.getNode();if(u!=n.getBody()){i();n.dom.remove(u,a);g()}},mceSelectNodeDepth:function(y,x,v){var u=0;l.getParent(p.getNode(),function(z){if(z.nodeType==1&&u++==v){p.select(z);return b}},n.getBody())},mceSelectNode:function(x,v,u){p.select(u)},mceInsertContent:function(x,v,u){p.setContent(u)},mceInsertRawHTML:function(x,v,u){p.setContent("tiny_mce_marker");n.setContent(n.getContent().replace(/tiny_mce_marker/g,function(){return u}))},mceSetContent:function(x,v,u){n.setContent(u)},"Indent,Outdent":function(y){var v,u,x;v=k.indentation;u=/[a-z%]+$/i.exec(v);v=parseInt(v);if(!m("InsertUnorderedList")&&!m("InsertOrderedList")){d(p.getSelectedBlocks(),function(z){if(y=="outdent"){x=Math.max(0,parseInt(z.style.paddingLeft||0)-v);l.setStyle(z,"paddingLeft",x?x+u:"")}else{l.setStyle(z,"paddingLeft",(parseInt(z.style.paddingLeft||0)+v)+u)}})}else{f(y)}},mceRepaint:function(){var v;if(c.isGecko){try{i(a);if(p.getSel()){p.getSel().selectAllChildren(n.getBody())}p.collapse(a);g()}catch(u){}}},mceToggleFormat:function(x,v,u){n.formatter.toggle(u)},InsertHorizontalRule:function(){p.setContent("<hr />")},mceToggleVisualAid:function(){n.hasVisual=!n.hasVisual;n.addVisual()},mceReplaceContent:function(x,v,u){p.setContent(u.replace(/\{\$selection\}/g,p.getContent({format:"text"})))},mceInsertLink:function(y,x,v){var u=l.getParent(p.getNode(),"a");if(c.is(v,"string")){v={href:v}}if(!u){f("CreateLink",b,"javascript:mctmp(0);");d(l.select("a[href=javascript:mctmp(0);]"),function(z){l.setAttribs(z,v)})}else{if(v.href){l.setAttribs(u,v)}else{n.dom.remove(u,a)}}},selectAll:function(){var v=l.getRoot(),u=l.createRng();u.setStart(v,0);u.setEnd(v,v.childNodes.length);n.selection.setRng(u)}});t({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(u){return s("align"+u.substring(7))},"Bold,Italic,Underline,Strikethrough":function(u){return s(u)},mceBlockQuote:function(){return s("blockquote")},Outdent:function(){var u;if(k.inline_styles){if((u=l.getParent(p.getStart(),l.isBlock))&&parseInt(u.style.paddingLeft)>0){return a}if((u=l.getParent(p.getEnd(),l.isBlock))&&parseInt(u.style.paddingLeft)>0){return a}}return m("InsertUnorderedList")||m("InsertOrderedList")||(!k.inline_styles&&!!l.getParent(p.getNode(),"BLOCKQUOTE"))},"InsertUnorderedList,InsertOrderedList":function(u){return l.getParent(p.getNode(),u=="insertunorderedlist"?"UL":"OL")}},"state");t({"FontSize,FontName":function(x){var v=0,u;if(u=l.getParent(p.getNode(),"span")){if(x=="fontsize"){v=u.style.fontSize}else{v=u.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()}}return v}},"value");if(k.custom_undo_redo){t({Undo:function(){n.undoManager.undo()},Redo:function(){n.undoManager.redo()}})}}})(tinymce);(function(b){var a=b.util.Dispatcher;b.UndoManager=function(e){var c,d=0,g=[];function f(){return b.trim(e.getContent({format:"raw",no_events:1}))}return c={typing:0,onAdd:new a(c),onUndo:new a(c),onRedo:new a(c),add:function(l){var h,j=e.settings,k;l=l||{};l.content=f();k=g[d];if(k&&k.content==l.content){if(d>0||g.length==1){return null}}if(j.custom_undo_redo_levels){if(g.length>j.custom_undo_redo_levels){for(h=0;h<g.length-1;h++){g[h]=g[h+1]}g.length--;d=g.length}}l.bookmark=e.selection.getBookmark(2,true);if(d<g.length-1){if(d==0){g=[]}else{g.length=d+1}}g.push(l);d=g.length-1;c.onAdd.dispatch(c,l);e.isNotDirty=0;return l},undo:function(){var j,h;if(c.typing){c.add();c.typing=0}if(d>0){j=g[--d];e.setContent(j.content,{format:"raw"});e.selection.moveToBookmark(j.bookmark);c.onUndo.dispatch(c,j)}return j},redo:function(){var h;if(d<g.length-1){h=g[++d];e.setContent(h.content,{format:"raw"});e.selection.moveToBookmark(h.bookmark);c.onRedo.dispatch(c,h)}return h},clear:function(){g=[];d=c.typing=0},hasUndo:function(){return d>0||c.typing},hasRedo:function(){return d<g.length-1}}}})(tinymce);(function(m){var k=m.dom.Event,c=m.isIE,a=m.isGecko,b=m.isOpera,j=m.each,i=m.extend,d=true,h=false;function l(p){var q,o,n;do{if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(p.nodeName)){if(q){o=p.cloneNode(false);o.appendChild(q);q=o}else{q=n=p.cloneNode(false)}q.removeAttribute("id")}}while(p=p.parentNode);if(q){return{wrapper:q,inner:n}}}function g(o,p){var n=p.ownerDocument.createRange();n.setStart(o.endContainer,o.endOffset);n.setEndAfter(p);return n.cloneContents().textContent.length==0}function f(o){o=o.innerHTML;o=o.replace(/<(img|hr|table|input|select|textarea)[ \>]/gi,"-");o=o.replace(/<[^>]+>/g,"");return o.replace(/[ \u00a0\t\r\n]+/g,"")==""}function e(p,r,n){var o,q;if(f(n)){o=r.getParent(n,"ul,ol");if(!r.getParent(o.parentNode,"ul,ol")){r.split(o,n);q=r.create("p",0,'<br _mce_bogus="1" />');r.replace(q,n);p.select(q,1)}return h}return d}m.create("tinymce.ForceBlocks",{ForceBlocks:function(o){var p=this,q=o.settings,r;p.editor=o;p.dom=o.dom;r=(q.forced_root_block||"p").toLowerCase();q.element=r.toUpperCase();o.onPreInit.add(p.setup,p);p.reOpera=new RegExp("(\\u00a0| | )</"+r+">","gi");p.rePadd=new RegExp("<p( )([^>]+)><\\/p>|<p( )([^>]+)\\/>|<p( )([^>]+)>\\s+<\\/p>|<p><\\/p>|<p\\/>|<p>\\s+<\\/p>".replace(/p/g,r),"gi");p.reNbsp2BR1=new RegExp("<p( )([^>]+)>[\\s\\u00a0]+<\\/p>|<p>[\\s\\u00a0]+<\\/p>".replace(/p/g,r),"gi");p.reNbsp2BR2=new RegExp("<%p()([^>]+)>( | )<\\/%p>|<%p>( | )<\\/%p>".replace(/%p/g,r),"gi");p.reBR2Nbsp=new RegExp("<p( )([^>]+)>\\s*<br \\/>\\s*<\\/p>|<p>\\s*<br \\/>\\s*<\\/p>".replace(/p/g,r),"gi");function n(s,t){if(b){t.content=t.content.replace(p.reOpera,"</"+r+">")}t.content=m._replace(p.rePadd,"<"+r+"$1$2$3$4$5$6>\u00a0</"+r+">",t.content);if(!c&&!b&&t.set){t.content=t.content.replace(p.reNbsp2BR1,"<"+r+"$1$2><br /></"+r+">");t.content=t.content.replace(p.reNbsp2BR2,"<"+r+"$1$2><br /></"+r+">")}else{t.content=m._replace(p.reBR2Nbsp,"<"+r+"$1$2>\u00a0</"+r+">",t.content)}}o.onBeforeSetContent.add(n);o.onPostProcess.add(n);if(q.forced_root_block){o.onInit.add(p.forceRoots,p);o.onSetContent.add(p.forceRoots,p);o.onBeforeGetContent.add(p.forceRoots,p)}},setup:function(){var o=this,n=o.editor,q=n.settings,u=n.dom,p=n.selection;if(q.forced_root_block){n.onBeforeExecCommand.add(o.forceRoots,o);n.onKeyUp.add(o.forceRoots,o);n.onPreProcess.add(o.forceRoots,o)}if(q.force_br_newlines){if(c){n.onKeyPress.add(function(s,t){var v;if(t.keyCode==13&&p.getNode().nodeName!="LI"){p.setContent('<br id="__" /> ',{format:"raw"});v=u.get("__");v.removeAttribute("id");p.select(v);p.collapse();return k.cancel(t)}})}}if(q.force_p_newlines){if(!c){n.onKeyPress.add(function(s,t){if(t.keyCode==13&&!t.shiftKey&&!o.insertPara(t)){k.cancel(t)}})}else{m.addUnload(function(){o._previousFormats=0});n.onKeyPress.add(function(s,t){o._previousFormats=0;if(t.keyCode==13&&!t.shiftKey&&s.selection.isCollapsed()&&q.keep_styles){o._previousFormats=l(s.selection.getStart())}});n.onKeyUp.add(function(t,x){if(x.keyCode==13&&!x.shiftKey){var v=t.selection.getStart(),s=o._previousFormats;if(!v.hasChildNodes()&&s){v=u.getParent(v,u.isBlock);if(v&&v.nodeName!="LI"){v.innerHTML="";if(o._previousFormats){v.appendChild(s.wrapper);s.inner.innerHTML="\uFEFF"}else{v.innerHTML="\uFEFF"}p.select(v,1);t.getDoc().execCommand("Delete",false,null);o._previousFormats=0}}}})}if(a){n.onKeyDown.add(function(s,t){if((t.keyCode==8||t.keyCode==46)&&!t.shiftKey){o.backspaceDelete(t,t.keyCode==8)}})}}if(m.isWebKit){function r(t){var s=p.getRng(),v,z=u.create("div",null," "),y,x=u.getViewPort(t.getWin()).h;s.insertNode(v=u.create("br"));s.setStartAfter(v);s.setEndAfter(v);p.setRng(s);if(p.getSel().focusNode==v.previousSibling){p.select(u.insertAfter(u.doc.createTextNode("\u00a0"),v));p.collapse(d)}u.insertAfter(z,v);y=u.getPos(z).y;u.remove(z);if(y>x){t.getWin().scrollTo(0,y)}}n.onKeyPress.add(function(s,t){if(t.keyCode==13&&(t.shiftKey||(q.force_br_newlines&&!u.getParent(p.getNode(),"h1,h2,h3,h4,h5,h6,ol,ul")))){r(s);k.cancel(t)}})}n.onPreProcess.add(function(s,t){j(u.select("p,h1,h2,h3,h4,h5,h6,div",t.node),function(v){if(f(v)){j(u.select("span,em,strong,b,i",t.node),function(x){if(!x.hasChildNodes()){x.appendChild(s.getDoc().createTextNode("\u00a0"));return h}})}})});if(c){if(q.element!="P"){n.onKeyPress.add(function(s,t){o.lastElm=p.getNode().nodeName});n.onKeyUp.add(function(t,v){var y,x=p.getNode(),s=t.getBody();if(s.childNodes.length===1&&x.nodeName=="P"){x=u.rename(x,q.element);p.select(x);p.collapse();t.nodeChanged()}else{if(v.keyCode==13&&!v.shiftKey&&o.lastElm!="P"){y=u.getParent(x,"p");if(y){u.rename(y,q.element);t.nodeChanged()}}}})}}},find:function(v,q,r){var p=this.editor,o=p.getDoc().createTreeWalker(v,4,null,h),u=-1;while(v=o.nextNode()){u++;if(q==0&&v==r){return u}if(q==1&&u==r){return v}}return -1},forceRoots:function(x,I){var z=this,x=z.editor,M=x.getBody(),J=x.getDoc(),P=x.selection,A=P.getSel(),B=P.getRng(),N=-2,v,G,o,p,K=-16777215;var L,q,O,F,C,u=M.childNodes,E,D,y;for(E=u.length-1;E>=0;E--){L=u[E];if(L.nodeType===1&&L.getAttribute("_mce_type")){q=null;continue}if(L.nodeType===3||(!z.dom.isBlock(L)&&L.nodeType!==8&&!/^(script|mce:script|style|mce:style)$/i.test(L.nodeName))){if(!q){if(L.nodeType!=3||/[^\s]/g.test(L.nodeValue)){if(N==-2&&B){if(!c||B.setStart){if(B.startContainer.nodeType==1&&(D=B.startContainer.childNodes[B.startOffset])&&D.nodeType==1){y=D.getAttribute("id");D.setAttribute("id","__mce")}else{if(x.dom.getParent(B.startContainer,function(n){return n===M})){G=B.startOffset;o=B.endOffset;N=z.find(M,0,B.startContainer);v=z.find(M,0,B.endContainer)}}}else{if(B.item){p=J.body.createTextRange();p.moveToElementText(B.item(0));B=p}p=J.body.createTextRange();p.moveToElementText(M);p.collapse(1);O=p.move("character",K)*-1;p=B.duplicate();p.collapse(1);F=p.move("character",K)*-1;p=B.duplicate();p.collapse(0);C=(p.move("character",K)*-1)-F;N=F-O;v=C}}q=x.dom.create(x.settings.forced_root_block);L.parentNode.replaceChild(q,L);q.appendChild(L)}}else{if(q.hasChildNodes()){q.insertBefore(L,q.firstChild)}else{q.appendChild(L)}}}else{q=null}}if(N!=-2){if(!c||B.setStart){q=M.getElementsByTagName(x.settings.element)[0];B=J.createRange();if(N!=-1){B.setStart(z.find(M,1,N),G)}else{B.setStart(q,0)}if(v!=-1){B.setEnd(z.find(M,1,v),o)}else{B.setEnd(q,0)}if(A){A.removeAllRanges();A.addRange(B)}}else{try{B=A.createRange();B.moveToElementText(M);B.collapse(1);B.moveStart("character",N);B.moveEnd("character",v);B.select()}catch(H){}}}else{if((!c||B.setStart)&&(D=x.dom.get("__mce"))){if(y){D.setAttribute("id",y)}else{D.removeAttribute("id")}B=J.createRange();B.setStartBefore(D);B.setEndBefore(D);P.setRng(B)}}},getParentBlock:function(p){var o=this.dom;return o.getParent(p,o.isBlock)},insertPara:function(S){var G=this,x=G.editor,O=x.dom,T=x.getDoc(),X=x.settings,H=x.selection.getSel(),I=H.getRangeAt(0),W=T.body;var L,M,J,Q,P,u,p,v,A,o,E,V,q,z,K,N=O.getViewPort(x.getWin()),D,F,C;L=T.createRange();L.setStart(H.anchorNode,H.anchorOffset);L.collapse(d);M=T.createRange();M.setStart(H.focusNode,H.focusOffset);M.collapse(d);J=L.compareBoundaryPoints(L.START_TO_END,M)<0;Q=J?H.anchorNode:H.focusNode;P=J?H.anchorOffset:H.focusOffset;u=J?H.focusNode:H.anchorNode;p=J?H.focusOffset:H.anchorOffset;if(Q===u&&/^(TD|TH)$/.test(Q.nodeName)){if(Q.firstChild.nodeName=="BR"){O.remove(Q.firstChild)}if(Q.childNodes.length==0){x.dom.add(Q,X.element,null,"<br />");V=x.dom.add(Q,X.element,null,"<br />")}else{K=Q.innerHTML;Q.innerHTML="";x.dom.add(Q,X.element,null,K);V=x.dom.add(Q,X.element,null,"<br />")}I=T.createRange();I.selectNodeContents(V);I.collapse(1);x.selection.setRng(I);return h}if(Q==W&&u==W&&W.firstChild&&x.dom.isBlock(W.firstChild)){Q=u=Q.firstChild;P=p=0;L=T.createRange();L.setStart(Q,0);M=T.createRange();M.setStart(u,0)}Q=Q.nodeName=="HTML"?T.body:Q;Q=Q.nodeName=="BODY"?Q.firstChild:Q;u=u.nodeName=="HTML"?T.body:u;u=u.nodeName=="BODY"?u.firstChild:u;v=G.getParentBlock(Q);A=G.getParentBlock(u);o=v?v.nodeName:X.element;if(K=G.dom.getParent(v,"li,pre")){if(K.nodeName=="LI"){return e(x.selection,G.dom,K)}return d}if(v&&(v.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(O.getStyle(v,"position",1)))){o=X.element;v=null}if(A&&(A.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(O.getStyle(v,"position",1)))){o=X.element;A=null}if(/(TD|TABLE|TH|CAPTION)/.test(o)||(v&&o=="DIV"&&/left|right/gi.test(O.getStyle(v,"float",1)))){o=X.element;v=A=null}E=(v&&v.nodeName==o)?v.cloneNode(0):x.dom.create(o);V=(A&&A.nodeName==o)?A.cloneNode(0):x.dom.create(o);V.removeAttribute("id");if(/^(H[1-6])$/.test(o)&&g(I,v)){V=x.dom.create(X.element)}K=q=Q;do{if(K==W||K.nodeType==9||G.dom.isBlock(K)||/(TD|TABLE|TH|CAPTION)/.test(K.nodeName)){break}q=K}while((K=K.previousSibling?K.previousSibling:K.parentNode));K=z=u;do{if(K==W||K.nodeType==9||G.dom.isBlock(K)||/(TD|TABLE|TH|CAPTION)/.test(K.nodeName)){break}z=K}while((K=K.nextSibling?K.nextSibling:K.parentNode));if(q.nodeName==o){L.setStart(q,0)}else{L.setStartBefore(q)}L.setEnd(Q,P);E.appendChild(L.cloneContents()||T.createTextNode(""));try{M.setEndAfter(z)}catch(R){}M.setStart(u,p);V.appendChild(M.cloneContents()||T.createTextNode(""));I=T.createRange();if(!q.previousSibling&&q.parentNode.nodeName==o){I.setStartBefore(q.parentNode)}else{if(L.startContainer.nodeName==o&&L.startOffset==0){I.setStartBefore(L.startContainer)}else{I.setStart(L.startContainer,L.startOffset)}}if(!z.nextSibling&&z.parentNode.nodeName==o){I.setEndAfter(z.parentNode)}else{I.setEnd(M.endContainer,M.endOffset)}I.deleteContents();if(b){x.getWin().scrollTo(0,N.y)}if(E.firstChild&&E.firstChild.nodeName==o){E.innerHTML=E.firstChild.innerHTML}if(V.firstChild&&V.firstChild.nodeName==o){V.innerHTML=V.firstChild.innerHTML}if(f(E)){E.innerHTML="<br />"}function U(y,s){var r=[],Z,Y,t;y.innerHTML="";if(X.keep_styles){Y=s;do{if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(Y.nodeName)){Z=Y.cloneNode(h);O.setAttrib(Z,"id","");r.push(Z)}}while(Y=Y.parentNode)}if(r.length>0){for(t=r.length-1,Z=y;t>=0;t--){Z=Z.appendChild(r[t])}r[0].innerHTML=b?" ":"<br />";return r[0]}else{y.innerHTML=b?" ":"<br />"}}if(f(V)){C=U(V,u)}if(b&&parseFloat(opera.version())<9.5){I.insertNode(E);I.insertNode(V)}else{I.insertNode(V);I.insertNode(E)}V.normalize();E.normalize();function B(r){return T.createTreeWalker(r,NodeFilter.SHOW_TEXT,null,h).nextNode()||r}I=T.createRange();I.selectNodeContents(a?B(C||V):C||V);I.collapse(1);H.removeAllRanges();H.addRange(I);D=x.dom.getPos(V).y;F=V.clientHeight;if(D<N.y||D+F>N.y+N.h){x.getWin().scrollTo(0,D<N.y?D:D-N.h+25)}return h},backspaceDelete:function(v,C){var D=this,u=D.editor,z=u.getBody(),s=u.dom,q,x=u.selection,p=x.getRng(),y=p.startContainer,q,A,B,o;if(!C&&p.collapsed&&y.nodeType==1&&p.startOffset==y.childNodes.length){o=new m.dom.TreeWalker(y.lastChild,y);for(q=y.lastChild;q;q=o.prev()){if(q.nodeType==3){p.setStart(q,q.nodeValue.length);p.collapse(true);x.setRng(p);return}}}if(y&&u.dom.isBlock(y)&&!/^(TD|TH)$/.test(y.nodeName)&&C){if(y.childNodes.length==0||(y.childNodes.length==1&&y.firstChild.nodeName=="BR")){q=y;while((q=q.previousSibling)&&!u.dom.isBlock(q)){}if(q){if(y!=z.firstChild){A=u.dom.doc.createTreeWalker(q,NodeFilter.SHOW_TEXT,null,h);while(B=A.nextNode()){q=B}p=u.getDoc().createRange();p.setStart(q,q.nodeValue?q.nodeValue.length:0);p.setEnd(q,q.nodeValue?q.nodeValue.length:0);x.setRng(p);u.dom.remove(y)}return k.cancel(v)}}}}})})(tinymce);(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(i){var h,g=this,f=g.editor;d(f.plugins,function(j){if(j.createControl){h=j.createControl(i,g);if(h){return false}}});switch(i){case"|":case"separator":return g.createSeparator()}if(!h&&f.buttons&&(h=f.buttons[i])){return g.createButton(i,h)}return g.add(h)},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)}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(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.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;if(g.settings.use_native_selects){k=new c.ui.NativeListBox(m,i)}else{f=l||h._cls.listbox||c.ui.ListBox;k=new f(m,i)}h.controls[m]=k;if(c.isWebKit){k.onPostRender.add(function(p,o){a.add(o,"mousedown",function(){g.bookmark=g.selection.getBookmark(1)});a.add(o,"focus",function(){g.selection.moveToBookmark(g.bookmark);g.bookmark=null})})}if(k.hideMenu){g.onMouseDown.add(k.hideMenu,k)}return h.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.onMouseDown.add(k.hideMenu,k)}else{f=h._cls.button||c.ui.Button;k=new f(m,i)}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.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.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);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){function b(){var d={},c={},e={};function f(j,i,h,g){if(typeof(i)=="string"){i=[i]}a.each(i,function(k){j[k.toLowerCase()]={func:h,scope:g}})}a.extend(this,{add:function(i,h,g){f(d,i,h,g)},addQueryStateHandler:function(i,h,g){f(c,i,h,g)},addQueryValueHandler:function(i,h,g){f(e,i,h,g)},execCommand:function(h,k,j,i,g){if(k=d[k.toLowerCase()]){if(k.func.call(h||k.scope,j,i,g)!==false){return true}}},queryCommandValue:function(){if(cmd=e[cmd.toLowerCase()]){return cmd.func.call(scope||cmd.scope,ui,value,args)}},queryCommandState:function(){if(cmd=c[cmd.toLowerCase()]){return cmd.func.call(scope||cmd.scope,ui,value,args)}}})}a.GlobalCommands=new b()})(tinymce);(function(a){a.Formatter=function(T){var K={},M=a.each,c=T.dom,p=T.selection,s=a.dom.TreeWalker,I=new a.dom.RangeUtils(c),d=T.schema.isValid,E=c.isBlock,k=T.settings.forced_root_block,r=c.nodeIndex,D="\uFEFF",e=/^(src|href|style)$/,Q=false,A=true,o,N={apply:[],remove:[]};function y(U){return U instanceof Array}function l(V,U){return c.getParents(V,U,c.getRoot())}function b(U){return U.nodeType===1&&(U.face==="mceinline"||U.style.fontFamily==="mceinline")}function P(U){return U?K[U]:K}function j(U,V){if(U){if(typeof(U)!=="string"){M(U,function(X,W){j(W,X)})}else{V=V.length?V:[V];M(V,function(W){if(W.deep===o){W.deep=!W.selector}if(W.split===o){W.split=!W.selector||W.inline}if(W.remove===o&&W.selector&&!W.inline){W.remove="none"}if(W.selector&&W.inline){W.mixed=true;W.block_expand=true}if(typeof(W.classes)==="string"){W.classes=W.classes.split(/\s+/)}});K[U]=V}}}function R(W,ac,Y){var Z=P(W),ad=Z[0],ab,V,aa;function X(ag){var af=ag.startContainer,aj=ag.startOffset,ai,ah;if(af.nodeType==1||af.nodeValue===""){af=af.nodeType==1?af.childNodes[aj]:af;if(af){ai=new s(af,af.parentNode);for(ah=ai.current();ah;ah=ai.next()){if(ah.nodeType==3&&!f(ah)){ag.setStart(ah,0);break}}}}return ag}function U(ag,af){af=af||ad;if(ag){M(af.styles,function(ai,ah){c.setStyle(ag,ah,q(ai,ac))});M(af.attributes,function(ai,ah){c.setAttrib(ag,ah,q(ai,ac))});M(af.classes,function(ah){ah=q(ah,ac);if(!c.hasClass(ag,ah)){c.addClass(ag,ah)}})}}function ae(ag){var af=[],ai,ah;ai=ad.inline||ad.block;ah=c.create(ai);U(ah);I.walk(ag,function(aj){var ak;function al(am){var ap=am.nodeName.toLowerCase(),ao=am.parentNode.nodeName.toLowerCase(),an;if(g(ap,"br")){ak=0;if(ad.block){c.remove(am)}return}if(ad.wrapper&&v(am,W,ac)){ak=0;return}if(ad.block&&!ad.wrapper&&F(ap)){am=c.rename(am,ai);U(am);af.push(am);ak=0;return}if(ad.selector){M(Z,function(aq){if(c.is(am,aq.selector)&&!b(am)){U(am,aq);an=true}});if(!ad.inline||an){ak=0;return}}if(d(ai,ap)&&d(ao,ai)){if(!ak){ak=ah.cloneNode(Q);am.parentNode.insertBefore(ak,am);af.push(ak)}ak.appendChild(am)}else{ak=0;M(a.grep(am.childNodes),al);ak=0}}M(aj,al)});M(af,function(al){var aj;function am(ao){var an=0;M(ao.childNodes,function(ap){if(!f(ap)&&!G(ap)){an++}});return an}function ak(an){var ap,ao;M(an.childNodes,function(aq){if(aq.nodeType==1&&!G(aq)&&!b(aq)){ap=aq;return Q}});if(ap&&h(ap,ad)){ao=ap.cloneNode(Q);U(ao);c.replace(ao,an,A);c.remove(ap,1)}return ao||an}aj=am(al);if(aj===0){c.remove(al,1);return}if(ad.inline||ad.wrapper){if(!ad.exact&&aj===1){al=ak(al)}M(Z,function(an){M(c.select(an.inline,al),function(ao){S(an,ac,ao,an.exact?ao:null)})});if(v(al.parentNode,W,ac)){c.remove(al,1);al=0;return A}if(ad.merge_with_parents){c.getParent(al.parentNode,function(an){if(v(an,W,ac)){c.remove(al,1);al=0;return A}})}if(al){al=t(B(al),al);al=t(al,B(al,A))}}})}if(ad){if(Y){V=c.createRng();V.setStartBefore(Y);V.setEndAfter(Y);ae(n(V,Z))}else{if(!p.isCollapsed()||!ad.inline){ab=p.getBookmark();ae(n(p.getRng(A),Z));p.moveToBookmark(ab);p.setRng(X(p.getRng(A)));T.nodeChanged()}else{O("apply",W,ac)}}}}function z(W,af,Z){var aa=P(W),ah=aa[0],ae,ad,V;function Y(ak){var aj=ak.startContainer,ap=ak.startOffset,ao,an,al,am;if(aj.nodeType==3&&ap>=aj.nodeValue.length-1){aj=aj.parentNode;ap=r(aj)+1}if(aj.nodeType==1){al=aj.childNodes;aj=al[Math.min(ap,al.length-1)];ao=new s(aj);if(ap>al.length-1){ao.next()}for(an=ao.current();an;an=ao.next()){if(an.nodeType==3&&!f(an)){am=c.create("a",null,D);an.parentNode.insertBefore(am,an);ak.setStart(an,0);p.setRng(ak);c.remove(am);return}}}}function X(am){var al,ak,aj;al=a.grep(am.childNodes);for(ak=0,aj=aa.length;ak<aj;ak++){if(S(aa[ak],af,am,am)){break}}if(ah.deep){for(ak=0,aj=al.length;ak<aj;ak++){X(al[ak])}}}function ab(aj){var ak;M(l(aj.parentNode).reverse(),function(al){var am;if(!ak&&al.id!="_start"&&al.id!="_end"){am=v(al,W,af);if(am&&am.split!==false){ak=al}}});return ak}function U(am,aj,ao,ar){var at,aq,ap,al,an,ak;if(am){ak=am.parentNode;for(at=aj.parentNode;at&&at!=ak;at=at.parentNode){aq=at.cloneNode(Q);for(an=0;an<aa.length;an++){if(S(aa[an],af,aq,aq)){aq=0;break}}if(aq){if(ap){aq.appendChild(ap)}if(!al){al=aq}ap=aq}}if(ar&&(!ah.mixed||!E(am))){aj=c.split(am,aj)}if(ap){ao.parentNode.insertBefore(ap,ao);al.appendChild(ao)}}return aj}function ag(aj){return U(ab(aj),aj,aj,true)}function ac(al){var ak=c.get(al?"_start":"_end"),aj=ak[al?"firstChild":"lastChild"];if(G(aj)){aj=aj[al?"firstChild":"lastChild"]}c.remove(ak,true);return aj}function ai(aj){var ak,al;aj=n(aj,aa,A);if(ah.split){ak=H(aj,A);al=H(aj);if(ak!=al){ak=L(ak,"span",{id:"_start",_mce_type:"bookmark"});al=L(al,"span",{id:"_end",_mce_type:"bookmark"});ag(ak);ag(al);ak=ac(A);al=ac()}else{ak=al=ag(ak)}aj.startContainer=ak.parentNode;aj.startOffset=r(ak);aj.endContainer=al.parentNode;aj.endOffset=r(al)+1}I.walk(aj,function(am){M(am,function(an){X(an)})})}if(Z){V=c.createRng();V.setStartBefore(Z);V.setEndAfter(Z);ai(V);return}if(!p.isCollapsed()||!ah.inline){ae=p.getBookmark();ai(p.getRng(A));p.moveToBookmark(ae);if(i(W,af,p.getStart())){Y(p.getRng(true))}T.nodeChanged()}else{O("remove",W,af)}}function C(U,W,V){if(i(U,W,V)){z(U,W,V)}else{R(U,W,V)}}function v(V,U,aa,Y){var W=P(U),ab,Z,X;function ac(ag,ai,aj){var af,ah,ad=ai[aj],ae;if(ad){if(ad.length===o){for(af in ad){if(ad.hasOwnProperty(af)){if(aj==="attributes"){ah=c.getAttrib(ag,af)}else{ah=J(ag,af)}if(Y&&!ah&&!ai.exact){return}if((!Y||ai.exact)&&!g(ah,q(ad[af],aa))){return}}}}else{for(ae=0;ae<ad.length;ae++){if(aj==="attributes"?c.getAttrib(ag,ad[ae]):J(ag,ad[ae])){return ai}}}}return ai}if(W&&V){for(Z=0;Z<W.length;Z++){ab=W[Z];if(h(V,ab)&&ac(V,ab,"attributes")&&ac(V,ab,"styles")){if(X=ab.classes){for(Z=0;Z<X.length;Z++){if(!c.hasClass(V,X[Z])){return}}}return ab}}}}function i(W,Z,Y){var V,X;function U(aa){aa=c.getParent(aa,function(ab){return !!v(ab,W,Z,true)});return v(aa,W,Z)}if(Y){return U(Y)}if(p.isCollapsed()){for(X=N.apply.length-1;X>=0;X--){if(N.apply[X].name==W){return true}}for(X=N.remove.length-1;X>=0;X--){if(N.remove[X].name==W){return false}}return U(p.getNode())}Y=p.getNode();if(U(Y)){return A}V=p.getStart();if(V!=Y){if(U(V)){return A}}return Q}function u(ab,aa){var Y,Z=[],X={},W,V,U;if(p.isCollapsed()){for(V=0;V<ab.length;V++){for(W=N.remove.length-1;W>=0;W--){U=ab[V];if(N.remove[W].name==U){X[U]=true;break}}}for(W=N.apply.length-1;W>=0;W--){for(V=0;V<ab.length;V++){U=ab[V];if(!X[U]&&N.apply[W].name==U){X[U]=true;Z.push(U)}}}}Y=p.getStart();c.getParent(Y,function(ae){var ad,ac;for(ad=0;ad<ab.length;ad++){ac=ab[ad];if(!X[ac]&&v(ae,ac,aa)){X[ac]=true;Z.push(ac)}}});return Z}function x(Y){var aa=P(Y),X,W,Z,V,U;if(aa){X=p.getStart();W=l(X);for(V=aa.length-1;V>=0;V--){U=aa[V].selector;if(!U){return A}for(Z=W.length-1;Z>=0;Z--){if(c.is(W[Z],U)){return A}}}}return Q}a.extend(this,{get:P,register:j,apply:R,remove:z,toggle:C,match:i,matchAll:u,matchNode:v,canApply:x});function h(U,V){if(g(U,V.inline)){return A}if(g(U,V.block)){return A}if(V.selector){return c.is(U,V.selector)}}function g(V,U){V=V||"";U=U||"";V=""+(V.nodeName||V);U=""+(U.nodeName||U);return V.toLowerCase()==U.toLowerCase()}function J(V,U){var W=c.getStyle(V,U);if(U=="color"||U=="backgroundColor"){W=c.toHex(W)}if(U=="fontWeight"&&W==700){W="bold"}return""+W}function q(U,V){if(typeof(U)!="string"){U=U(V)}else{if(V){U=U.replace(/%(\w+)/g,function(X,W){return V[W]||X})}}return U}function f(U){return U&&U.nodeType===3&&/^([\s\r\n]+|)$/.test(U.nodeValue)}function L(W,V,U){var X=c.create(V,U);W.parentNode.insertBefore(X,W);X.appendChild(W);return X}function n(U,ac,X){var W=U.startContainer,Z=U.startOffset,af=U.endContainer,aa=U.endOffset,ae,ab;function ad(ai,aj,ag,ah){var ak,al;ah=ah||c.getRoot();for(;;){ak=ai.parentNode;if(ak==ah||(!ac[0].block_expand&&E(ak))){return ai}for(ae=ak[aj];ae&&ae!=ai;ae=ae[ag]){if(ae.nodeType==1&&!G(ae)){return ai}if(ae.nodeType==3&&!f(ae)){return ai}}ai=ai.parentNode}return ai}if(W.nodeType==1&&W.hasChildNodes()){ab=W.childNodes.length-1;W=W.childNodes[Z>ab?ab:Z];if(W.nodeType==3){Z=0}}if(af.nodeType==1&&af.hasChildNodes()){ab=af.childNodes.length-1;af=af.childNodes[aa>ab?ab:aa-1];if(af.nodeType==3){aa=af.nodeValue.length}}if(G(W.parentNode)){W=W.parentNode}if(G(W)){W=W.nextSibling||W}if(G(af.parentNode)){af=af.parentNode}if(G(af)){af=af.previousSibling||af}if(ac[0].inline||ac[0].block_expand){W=ad(W,"firstChild","nextSibling");af=ad(af,"lastChild","previousSibling")}if(ac[0].selector&&ac[0].expand!==Q&&!ac[0].inline){function Y(ah,ag){var ai,aj,ak;if(ah.nodeType==3&&ah.nodeValue.length==0&&ah[ag]){ah=ah[ag]}ai=l(ah);for(aj=0;aj<ai.length;aj++){for(ak=0;ak<ac.length;ak++){if(c.is(ai[aj],ac[ak].selector)){return ai[aj]}}}return ah}W=Y(W,"previousSibling");af=Y(af,"nextSibling")}if(ac[0].block||ac[0].selector){function V(ah,ag,aj){var ai;if(!ac[0].wrapper){ai=c.getParent(ah,ac[0].block)}if(!ai){ai=c.getParent(ah.nodeType==3?ah.parentNode:ah,E)}if(ai&&ac[0].wrapper){ai=l(ai,"ul,ol").reverse()[0]||ai}if(!ai){ai=ah;while(ai[ag]&&!E(ai[ag])){ai=ai[ag];if(g(ai,"br")){break}}}return ai||ah}W=V(W,"previousSibling");af=V(af,"nextSibling");if(ac[0].block){if(!E(W)){W=ad(W,"firstChild","nextSibling")}if(!E(af)){af=ad(af,"lastChild","previousSibling")}}}if(W.nodeType==1){Z=r(W);W=W.parentNode}if(af.nodeType==1){aa=r(af)+1;af=af.parentNode}return{startContainer:W,startOffset:Z,endContainer:af,endOffset:aa}}function S(aa,Z,X,U){var W,V,Y;if(!h(X,aa)){return Q}if(aa.remove!="all"){M(aa.styles,function(ac,ab){ac=q(ac,Z);if(typeof(ab)==="number"){ab=ac;U=0}if(!U||g(J(U,ab),ac)){c.setStyle(X,ab,"")}Y=1});if(Y&&c.getAttrib(X,"style")==""){X.removeAttribute("style");X.removeAttribute("_mce_style")}M(aa.attributes,function(ad,ab){var ac;ad=q(ad,Z);if(typeof(ab)==="number"){ab=ad;U=0}if(!U||g(c.getAttrib(U,ab),ad)){if(ab=="class"){ad=c.getAttrib(X,ab);if(ad){ac="";M(ad.split(/\s+/),function(ae){if(/mce\w+/.test(ae)){ac+=(ac?" ":"")+ae}});if(ac){c.setAttrib(X,ab,ac);return}}}if(ab=="class"){X.removeAttribute("className")}if(e.test(ab)){X.removeAttribute("_mce_"+ab)}X.removeAttribute(ab)}});M(aa.classes,function(ab){ab=q(ab,Z);if(!U||c.hasClass(U,ab)){c.removeClass(X,ab)}});V=c.getAttribs(X);for(W=0;W<V.length;W++){if(V[W].nodeName.indexOf("_")!==0){return Q}}}if(aa.remove!="none"){m(X,aa);return A}}function m(W,X){var U=W.parentNode,V;if(X.block){if(!k){function Y(aa,Z,ab){aa=B(aa,Z,ab);return !aa||(aa.nodeName=="BR"||E(aa))}if(E(W)&&!E(U)){if(!Y(W,Q)&&!Y(W.firstChild,A,1)){W.insertBefore(c.create("br"),W.firstChild)}if(!Y(W,A)&&!Y(W.lastChild,Q,1)){W.appendChild(c.create("br"))}}}else{if(U==c.getRoot()){if(!X.list_block||!g(W,X.list_block)){M(a.grep(W.childNodes),function(Z){if(d(k,Z.nodeName.toLowerCase())){if(!V){V=L(Z,k)}else{V.appendChild(Z)}}else{V=0}})}}}}if(X.selector&&X.inline&&!g(X.inline,W)){return}c.remove(W,1)}function B(V,U,W){if(V){U=U?"nextSibling":"previousSibling";for(V=W?V:V[U];V;V=V[U]){if(V.nodeType==1||!f(V)){return V}}}}function G(U){return U&&U.nodeType==1&&U.getAttribute("_mce_type")=="bookmark"}function t(Y,X){var U,W,V;function aa(ad,ac){if(ad.nodeName!=ac.nodeName){return Q}function ab(af){var ag={};M(c.getAttribs(af),function(ah){var ai=ah.nodeName.toLowerCase();if(ai.indexOf("_")!==0&&ai!=="style"){ag[ai]=c.getAttrib(af,ai)}});return ag}function ae(ai,ah){var ag,af;for(af in ai){if(ai.hasOwnProperty(af)){ag=ah[af];if(ag===o){return Q}if(ai[af]!=ag){return Q}delete ah[af]}}for(af in ah){if(ah.hasOwnProperty(af)){return Q}}return A}if(!ae(ab(ad),ab(ac))){return Q}if(!ae(c.parseStyle(c.getAttrib(ad,"style")),c.parseStyle(c.getAttrib(ac,"style")))){return Q}return A}if(Y&&X){function Z(ac,ab){for(W=ac;W;W=W[ab]){if(W.nodeType==3&&!f(W)){return ac}if(W.nodeType==1&&!G(W)){return W}}return ac}Y=Z(Y,"previousSibling");X=Z(X,"nextSibling");if(aa(Y,X)){for(W=Y.nextSibling;W&&W!=X;){V=W;W=W.nextSibling;Y.appendChild(V)}c.remove(X);M(a.grep(X.childNodes),function(ab){Y.appendChild(ab)});return Y}}return X}function F(U){return/^(h[1-6]|p|div|pre|address|dl|dt|dd)$/.test(U)}function H(V,Y){var U,X,W;U=V[Y?"startContainer":"endContainer"];X=V[Y?"startOffset":"endOffset"];if(U.nodeType==1){W=U.childNodes.length-1;if(!Y&&X){X--}U=U.childNodes[X>W?W:X]}return U}function O(Z,V,Y){var W,U=N[Z],aa=N[Z=="apply"?"remove":"apply"];function ab(){return N.apply.length||N.remove.length}function X(){N.apply=[];N.remove=[]}function ac(ad){M(N.apply.reverse(),function(ae){R(ae.name,ae.vars,ad)});M(N.remove.reverse(),function(ae){z(ae.name,ae.vars,ad)});c.remove(ad,1);X()}for(W=U.length-1;W>=0;W--){if(U[W].name==V){return}}U.push({name:V,vars:Y});for(W=aa.length-1;W>=0;W--){if(aa[W].name==V){aa.splice(W,1)}}if(ab()){T.getDoc().execCommand("FontName",false,"mceinline");N.lastRng=p.getRng();M(c.select("font,span"),function(ae){var ad;if(b(ae)){ad=p.getBookmark();ac(ae);p.moveToBookmark(ad);T.nodeChanged()}});if(!N.isListening&&ab()){N.isListening=true;M("onKeyDown,onKeyUp,onKeyPress,onMouseUp".split(","),function(ad){T[ad].addToTop(function(ae,af){if(ab()&&!a.dom.RangeUtils.compareRanges(N.lastRng,p.getRng())){M(c.select("font,span"),function(ah){var ai,ag;if(b(ah)){ai=ah.firstChild;if(ai){ac(ah);ag=c.createRng();ag.setStart(ai,ai.nodeValue.length);ag.setEnd(ai,ai.nodeValue.length);p.setRng(ag);ae.nodeChanged()}else{c.remove(ah)}}});if(af.type=="keyup"||af.type=="mouseup"){X()}}})})}}}}})(tinymce);tinymce.onAddEditor.add(function(e,a){var d,h,g,c=a.settings;if(c.inline_styles){h=e.explode(c.font_size_style_values);function b(j,i){e.each(i,function(l,k){if(l){g.setStyle(j,k,l)}});g.rename(j,"span")}d={font:function(j,i){b(i,{backgroundColor:i.style.backgroundColor,color:i.color,fontFamily:i.face,fontSize:h[parseInt(i.size)-1]})},u:function(j,i){b(i,{textDecoration:"underline"})},strike:function(j,i){b(i,{textDecoration:"line-through"})}};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)})}}a.onPreProcess.add(f);a.onInit.add(function(){a.selection.onSetContent.add(f)})}});
|
@@ -0,0 +1,5 @@
|
|
1
|
+
|
2
|
+
// Uncomment and change this document.domain value if you are loading the script cross subdomains
|
3
|
+
// document.domain = 'moxiecode.com';
|
4
|
+
|
5
|
+
var tinymce=null,tinyMCEPopup,tinyMCE;tinyMCEPopup={init:function(){var b=this,a,c;a=b.getWin();tinymce=a.tinymce;tinyMCE=a.tinyMCE;b.editor=tinymce.EditorManager.activeEditor;b.params=b.editor.windowManager.params;b.features=b.editor.windowManager.features;b.dom=b.editor.windowManager.createInstance("tinymce.dom.DOMUtils",document);if(b.features.popup_css!==false){b.dom.loadCSS(b.features.popup_css||b.editor.settings.popup_css)}b.listeners=[];b.onInit={add:function(e,d){b.listeners.push({func:e,scope:d})}};b.isWindow=!b.getWindowArg("mce_inline");b.id=b.getWindowArg("mce_window_id");b.editor.windowManager.onOpen.dispatch(b.editor.windowManager,window)},getWin:function(){return(!window.frameElement&&window.dialogArguments)||opener||parent||top},getWindowArg:function(c,b){var a=this.params[c];return tinymce.is(a)?a:b},getParam:function(b,a){return this.editor.getParam(b,a)},getLang:function(b,a){return this.editor.getLang(b,a)},execCommand:function(d,c,e,b){b=b||{};b.skip_focus=1;this.restoreSelection();return this.editor.execCommand(d,c,e,b)},resizeToInnerSize:function(){var a=this;setTimeout(function(){var b=a.dom.getViewPort(window);a.editor.windowManager.resizeBy(a.getWindowArg("mce_width")-b.w,a.getWindowArg("mce_height")-b.h,a.id||window)},0)},executeOnLoad:function(s){this.onInit.add(function(){eval(s)})},storeSelection:function(){this.editor.windowManager.bookmark=tinyMCEPopup.editor.selection.getBookmark(1)},restoreSelection:function(){var a=tinyMCEPopup;if(!a.isWindow&&tinymce.isIE){a.editor.selection.moveToBookmark(a.editor.windowManager.bookmark)}},requireLangPack:function(){var b=this,a=b.getWindowArg("plugin_url")||b.getWindowArg("theme_url");if(a&&b.editor.settings.language&&b.features.translate_i18n!==false){a+="/langs/"+b.editor.settings.language+"_dlg.js";if(!tinymce.ScriptLoader.isDone(a)){document.write('<script type="text/javascript" src="'+tinymce._addVer(a)+'"><\/script>');tinymce.ScriptLoader.markDone(a)}}},pickColor:function(b,a){this.execCommand("mceColorPicker",true,{color:document.getElementById(a).value,func:function(e){document.getElementById(a).value=e;try{document.getElementById(a).onchange()}catch(d){}}})},openBrowser:function(a,c,b){tinyMCEPopup.restoreSelection();this.editor.execCallback("file_browser_callback",a,document.getElementById(a).value,c,window)},confirm:function(b,a,c){this.editor.windowManager.confirm(b,a,c,window)},alert:function(b,a,c){this.editor.windowManager.alert(b,a,c,window)},close:function(){var a=this;function b(){a.editor.windowManager.close(window);tinymce=tinyMCE=a.editor=a.params=a.dom=a.dom.doc=null}if(tinymce.isOpera){a.getWin().setTimeout(b,0)}else{b()}},_restoreSelection:function(){var a=window.event.srcElement;if(a.nodeName=="INPUT"&&(a.type=="submit"||a.type=="button")){tinyMCEPopup.restoreSelection()}},_onDOMLoaded:function(){var b=tinyMCEPopup,d=document.title,e,c,a;if(b.domLoaded){return}b.domLoaded=1;if(b.features.translate_i18n!==false){c=document.body.innerHTML;if(tinymce.isIE){c=c.replace(/ (value|title|alt)=([^"][^\s>]+)/gi,' $1="$2"')}document.dir=b.editor.getParam("directionality","");if((a=b.editor.translate(c))&&a!=c){document.body.innerHTML=a}if((a=b.editor.translate(d))&&a!=d){document.title=d=a}}document.body.style.display="";if(tinymce.isIE){document.attachEvent("onmouseup",tinyMCEPopup._restoreSelection);b.dom.add(b.dom.select("head")[0],"base",{target:"_self"})}b.restoreSelection();b.resizeToInnerSize();if(!b.isWindow){b.editor.windowManager.setTitle(window,d)}else{window.focus()}if(!tinymce.isIE&&!b.isWindow){tinymce.dom.Event._add(document,"focus",function(){b.editor.windowManager.focus(b.id)})}tinymce.each(b.dom.select("select"),function(f){f.onkeydown=tinyMCEPopup._accessHandler});tinymce.each(b.listeners,function(f){f.func.call(f.scope,b.editor)});if(b.getWindowArg("mce_auto_focus",true)){window.focus();tinymce.each(document.forms,function(g){tinymce.each(g.elements,function(f){if(b.dom.hasClass(f,"mceFocus")&&!f.disabled){f.focus();return false}})})}document.onkeyup=tinyMCEPopup._closeWinKeyHandler},_accessHandler:function(a){a=a||window.event;if(a.keyCode==13||a.keyCode==32){a=a.target||a.srcElement;if(a.onchange){a.onchange()}return tinymce.dom.Event.cancel(a)}},_closeWinKeyHandler:function(a){a=a||window.event;if(a.keyCode==27){tinyMCEPopup.close()}},_wait:function(){if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);tinyMCEPopup._onDOMLoaded()}});if(document.documentElement.doScroll&&window==window.top){(function(){if(tinyMCEPopup.domLoaded){return}try{document.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,0);return}tinyMCEPopup._onDOMLoaded()})()}document.attachEvent("onload",tinyMCEPopup._onDOMLoaded)}else{if(document.addEventListener){window.addEventListener("DOMContentLoaded",tinyMCEPopup._onDOMLoaded,false);window.addEventListener("load",tinyMCEPopup._onDOMLoaded,false)}}}};tinyMCEPopup.init();tinyMCEPopup._wait();
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: comfortable_mexican_sofa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 47
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 28
|
10
|
+
version: 1.0.28
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Oleg Khabarov
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-11-
|
19
|
+
date: 2010-11-24 00:00:00 -05:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -187,16 +187,39 @@ files:
|
|
187
187
|
- public/javascripts/comfortable_mexican_sofa/jquery-ui/jquery-ui.css
|
188
188
|
- public/javascripts/comfortable_mexican_sofa/jquery-ui/jquery-ui.js
|
189
189
|
- public/javascripts/comfortable_mexican_sofa/jquery.js
|
190
|
-
- public/javascripts/comfortable_mexican_sofa/jwysiwyg/jquery.wysiwyg.css
|
191
|
-
- public/javascripts/comfortable_mexican_sofa/jwysiwyg/jquery.wysiwyg.gif
|
192
|
-
- public/javascripts/comfortable_mexican_sofa/jwysiwyg/jquery.wysiwyg.jpg
|
193
|
-
- public/javascripts/comfortable_mexican_sofa/jwysiwyg/jquery.wysiwyg.js
|
194
|
-
- public/javascripts/comfortable_mexican_sofa/jwysiwyg/jquery.wysiwyg.modal.css
|
195
|
-
- public/javascripts/comfortable_mexican_sofa/plupload/plupload.full.min.js
|
196
|
-
- public/javascripts/comfortable_mexican_sofa/plupload/plupload.html4.min.js
|
197
|
-
- public/javascripts/comfortable_mexican_sofa/plupload/plupload.html5.min.js
|
198
190
|
- public/javascripts/comfortable_mexican_sofa/rails.js
|
199
|
-
- public/javascripts/comfortable_mexican_sofa/
|
191
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/jquery.tinymce.js
|
192
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/langs/en.js
|
193
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/about.htm
|
194
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/anchor.htm
|
195
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/charmap.htm
|
196
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/color_picker.htm
|
197
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/editor_template.js
|
198
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/image.htm
|
199
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/img/colorpicker.jpg
|
200
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/img/icons.gif
|
201
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/js/about.js
|
202
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/js/anchor.js
|
203
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/js/charmap.js
|
204
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/js/color_picker.js
|
205
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/js/image.js
|
206
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/js/link.js
|
207
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/js/source_editor.js
|
208
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/langs/en.js
|
209
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/langs/en_dlg.js
|
210
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/link.htm
|
211
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/skins/default/content.css
|
212
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/skins/default/dialog.css
|
213
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/skins/default/img/buttons.png
|
214
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/skins/default/img/items.gif
|
215
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif
|
216
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/skins/default/img/menu_check.gif
|
217
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/skins/default/img/progress.gif
|
218
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/skins/default/img/tabs.gif
|
219
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/skins/default/ui.css
|
220
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/themes/advanced/source_editor.htm
|
221
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/tiny_mce.js
|
222
|
+
- public/javascripts/comfortable_mexican_sofa/tiny_mce/tiny_mce_popup.js
|
200
223
|
- public/robots.txt
|
201
224
|
- public/stylesheets/comfortable_mexican_sofa/reset.css
|
202
225
|
- public/stylesheets/comfortable_mexican_sofa/structure.css
|
@@ -1,62 +0,0 @@
|
|
1
|
-
|
2
|
-
div.wysiwyg { border: 1px solid #ccc; padding: 5px; background-color: #fff; }
|
3
|
-
div.wysiwyg * { margin: 0; padding: 0; }
|
4
|
-
|
5
|
-
div.wysiwyg ul.panel li.jwysiwyg-custom-command {overflow:hidden;}
|
6
|
-
div.wysiwyg ul.panel li.jwysiwyg-custom-command img { margin-left: 5000px; }
|
7
|
-
|
8
|
-
div.wysiwyg ul.panel { border-bottom: 1px solid #ccc; float: left; width: 100%; padding: 0; }
|
9
|
-
div.wysiwyg ul.panel li { list-style: none; float: left; margin: 1px 2px 3px 0; background: #fff; -moz-user-select: none; -webkit-user-select: none; user-select: none;}
|
10
|
-
div.wysiwyg ul.panel li.separator { width: 1px; height: 16px; margin: 0 4px; border-left: 1px solid #ccc; }
|
11
|
-
div.wysiwyg ul.panel li { text-indent: -5000px; opacity: 0.85; filter:alpha(opacity=85); display: block; width: 16px; height: 16px; background: url('jquery.wysiwyg.gif') no-repeat -64px -80px; border: 0; cursor: pointer; margin: 1px; }
|
12
|
-
div.wysiwyg ul.panel li.wysiwyg-button-hover, div.wysiwyg ul.panel li.active { opacity: 1.00; filter:alpha(opacity=100); }
|
13
|
-
div.wysiwyg ul.panel li.active { background-color: #f9f9f9; border: 1px solid #ccc; border-left-color: #aaa; border-top-color: #aaa; margin: 0; }
|
14
|
-
|
15
|
-
div.wysiwyg ul.panel li.bold { background-position: 0 -16px; }
|
16
|
-
div.wysiwyg ul.panel li.italic { background-position: -16px -16px; }
|
17
|
-
div.wysiwyg ul.panel li.strikeThrough { background-position: -32px -16px; }
|
18
|
-
div.wysiwyg ul.panel li.underline { background-position: -48px -16px; }
|
19
|
-
|
20
|
-
div.wysiwyg ul.panel li.justifyLeft { background-position: 0 0; }
|
21
|
-
div.wysiwyg ul.panel li.justifyCenter { background-position: -16px 0; }
|
22
|
-
div.wysiwyg ul.panel li.justifyRight { background-position: -32px 0; }
|
23
|
-
div.wysiwyg ul.panel li.justifyFull { background-position: -48px 0; }
|
24
|
-
|
25
|
-
div.wysiwyg ul.panel li.indent { background-position: -64px 0; }
|
26
|
-
div.wysiwyg ul.panel li.outdent { background-position: -80px 0; }
|
27
|
-
|
28
|
-
div.wysiwyg ul.panel li.subscript { background-position: -64px -16px; }
|
29
|
-
div.wysiwyg ul.panel li.superscript { background-position: -80px -16px; }
|
30
|
-
|
31
|
-
div.wysiwyg ul.panel li.undo { background-position: 0 -64px; }
|
32
|
-
div.wysiwyg ul.panel li.redo { background-position: -16px -64px; }
|
33
|
-
|
34
|
-
div.wysiwyg ul.panel li.insertOrderedList { background-position: -32px -48px; }
|
35
|
-
div.wysiwyg ul.panel li.insertUnorderedList { background-position: -16px -48px; }
|
36
|
-
div.wysiwyg ul.panel li.insertHorizontalRule { background-position: 0 -48px; }
|
37
|
-
|
38
|
-
div.wysiwyg ul.panel li.h1 { background-position: 0 -32px; }
|
39
|
-
div.wysiwyg ul.panel li.h2 { background-position: -16px -32px; }
|
40
|
-
div.wysiwyg ul.panel li.h3 { background-position: -32px -32px; }
|
41
|
-
div.wysiwyg ul.panel li.h4 { background-position: -48px -32px; }
|
42
|
-
div.wysiwyg ul.panel li.h5 { background-position: -64px -32px; }
|
43
|
-
div.wysiwyg ul.panel li.h6 { background-position: -80px -32px; }
|
44
|
-
|
45
|
-
div.wysiwyg ul.panel li.cut { background-position: -32px -64px; }
|
46
|
-
div.wysiwyg ul.panel li.copy { background-position: -48px -64px; }
|
47
|
-
div.wysiwyg ul.panel li.paste { background-position: -64px -64px; }
|
48
|
-
div.wysiwyg ul.panel li.insertTable { background-position: -64px -48px; }
|
49
|
-
|
50
|
-
div.wysiwyg ul.panel li.increaseFontSize { background-position: -16px -80px; }
|
51
|
-
div.wysiwyg ul.panel li.decreaseFontSize { background-position: -32px -80px; }
|
52
|
-
|
53
|
-
div.wysiwyg ul.panel li.createLink { background-position: -80px -48px; }
|
54
|
-
div.wysiwyg ul.panel li.insertImage { background-position: -80px -80px; }
|
55
|
-
|
56
|
-
div.wysiwyg ul.panel li.html { background-position: -47px -46px; }
|
57
|
-
div.wysiwyg ul.panel li.removeFormat { background-position: -80px -63px; }
|
58
|
-
|
59
|
-
div.wysiwyg ul.panel li.empty { background-position: -64px -80px; }
|
60
|
-
|
61
|
-
div.wysiwyg iframe { border: 0; clear: left; margin: 4px 0 0 1px; }
|
62
|
-
|
Binary file
|
Binary file
|
@@ -1,1393 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* WYSIWYG - jQuery plugin 0.93
|
3
|
-
* (koken)
|
4
|
-
*
|
5
|
-
* Copyright (c) 2008-2009 Juan M Martinez, 2010 Akzhan Abdulin and all contrbutors
|
6
|
-
* http://plugins.jquery.com/project/jWYSIWYG
|
7
|
-
*
|
8
|
-
* Dual licensed under the MIT and GPL licenses:
|
9
|
-
* http://www.opensource.org/licenses/mit-license.php
|
10
|
-
* http://www.gnu.org/licenses/gpl.html
|
11
|
-
*
|
12
|
-
* $Id: $
|
13
|
-
*/
|
14
|
-
|
15
|
-
/*jslint browser: true, forin: true */
|
16
|
-
|
17
|
-
(function ($)
|
18
|
-
{
|
19
|
-
/**
|
20
|
-
* @constructor
|
21
|
-
* @private
|
22
|
-
*/
|
23
|
-
var Wysiwyg = function (element, options)
|
24
|
-
{
|
25
|
-
this.init(element, options);
|
26
|
-
};
|
27
|
-
|
28
|
-
var innerDocument = function (elts)
|
29
|
-
{
|
30
|
-
var element = $(elts).get(0);
|
31
|
-
|
32
|
-
if (element.nodeName.toLowerCase() == 'iframe')
|
33
|
-
{
|
34
|
-
return element.contentWindow.document;
|
35
|
-
/*
|
36
|
-
return ( $.browser.msie )
|
37
|
-
? document.frames[element.id].document
|
38
|
-
: element.contentWindow.document // contentDocument;
|
39
|
-
*/
|
40
|
-
}
|
41
|
-
return element;
|
42
|
-
};
|
43
|
-
|
44
|
-
var documentSelection = function ()
|
45
|
-
{
|
46
|
-
var element = this.get(0);
|
47
|
-
|
48
|
-
if (element.contentWindow.document.selection)
|
49
|
-
{
|
50
|
-
return element.contentWindow.document.selection.createRange().text;
|
51
|
-
}
|
52
|
-
else
|
53
|
-
{
|
54
|
-
return element.contentWindow.getSelection().toString();
|
55
|
-
}
|
56
|
-
};
|
57
|
-
|
58
|
-
$.fn.wysiwyg = function (options)
|
59
|
-
{
|
60
|
-
if (arguments.length > 0 && arguments[0].constructor == String)
|
61
|
-
{
|
62
|
-
var action = arguments[0].toString();
|
63
|
-
var params = [];
|
64
|
-
|
65
|
-
if (action == 'enabled')
|
66
|
-
{
|
67
|
-
return this.data('wysiwyg') !== null;
|
68
|
-
}
|
69
|
-
for (var i = 1; i < arguments.length; i++)
|
70
|
-
{
|
71
|
-
params[i - 1] = arguments[i];
|
72
|
-
}
|
73
|
-
var retValue = null;
|
74
|
-
|
75
|
-
// .filter('textarea') is a fix for bug 29 ( http://github.com/akzhan/jwysiwyg/issues/issue/29 )
|
76
|
-
this.filter('textarea').each(function()
|
77
|
-
{
|
78
|
-
$.data(this, 'wysiwyg').designMode();
|
79
|
-
retValue = Wysiwyg[action].apply(this, params);
|
80
|
-
});
|
81
|
-
return retValue;
|
82
|
-
}
|
83
|
-
|
84
|
-
if (this.data('wysiwyg'))
|
85
|
-
{
|
86
|
-
return this;
|
87
|
-
}
|
88
|
-
|
89
|
-
var controls = { };
|
90
|
-
|
91
|
-
/**
|
92
|
-
* If the user set custom controls, we catch it, and merge with the
|
93
|
-
* defaults controls later.
|
94
|
-
*/
|
95
|
-
|
96
|
-
if (options && options.controls)
|
97
|
-
{
|
98
|
-
controls = options.controls;
|
99
|
-
delete options.controls;
|
100
|
-
}
|
101
|
-
|
102
|
-
options = $.extend({}, $.fn.wysiwyg.defaults, options);
|
103
|
-
options.controls = $.extend(true, options.controls, $.fn.wysiwyg.controls);
|
104
|
-
for (var control in controls)
|
105
|
-
{
|
106
|
-
if (control in options.controls)
|
107
|
-
{
|
108
|
-
$.extend(options.controls[control], controls[control]);
|
109
|
-
}
|
110
|
-
else
|
111
|
-
{
|
112
|
-
options.controls[control] = controls[control];
|
113
|
-
}
|
114
|
-
}
|
115
|
-
|
116
|
-
// not break the chain
|
117
|
-
return this.each(function ()
|
118
|
-
{
|
119
|
-
new Wysiwyg(this, options);
|
120
|
-
});
|
121
|
-
};
|
122
|
-
|
123
|
-
$.fn.wysiwyg.defaults = {
|
124
|
-
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" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">STYLE_SHEET</head><body style="margin: 0px;">INITIAL_CONTENT</body></html>',
|
125
|
-
formTableHtml: '<form class="wysiwyg"><fieldset><legend>Insert table</legend><label>Count of columns: <input type="text" name="colCount" value="3" /></label><label><br />Count of rows: <input type="text" name="rowCount" value="3" /></label><input type="submit" class="button" value="Insert table" /> <input type="reset" value="Cancel" /></fieldset></form>',
|
126
|
-
formImageHtml:'<form class="wysiwyg"><fieldset><legend>Insert Image</legend><label>Image URL: <input type="text" name="url" value="http://" /></label><label>Image Title: <input type="text" name="imagetitle" value="" /></label><label>Image Description: <input type="text" name="description" value="" /></label><input type="submit" class="button" value="Insert Image" /> <input type="reset" value="Cancel" /></fieldset></form>',
|
127
|
-
formWidth: 440,
|
128
|
-
formHeight: 270,
|
129
|
-
tableFiller: 'Lorem ipsum',
|
130
|
-
css: { },
|
131
|
-
debug: false,
|
132
|
-
autoSave: true,
|
133
|
-
// http://code.google.com/p/jwysiwyg/issues/detail?id=11
|
134
|
-
rmUnwantedBr: true,
|
135
|
-
// http://code.google.com/p/jwysiwyg/issues/detail?id=15
|
136
|
-
brIE: true,
|
137
|
-
iFrameClass: null,
|
138
|
-
messages:
|
139
|
-
{
|
140
|
-
nonSelection: 'select the text you wish to link'
|
141
|
-
},
|
142
|
-
events: { },
|
143
|
-
controls: { },
|
144
|
-
resizeOptions: false
|
145
|
-
};
|
146
|
-
|
147
|
-
/**
|
148
|
-
* Custom control support by Alec Gorge ( http://github.com/alecgorge )
|
149
|
-
*/
|
150
|
-
// need a global, static namespace
|
151
|
-
$.wysiwyg = {
|
152
|
-
addControl : function (name, settings) {
|
153
|
-
// sample settings
|
154
|
-
/*
|
155
|
-
var example = {
|
156
|
-
icon: '/path/to/icon',
|
157
|
-
tooltip: 'my custom item',
|
158
|
-
callback: function(selectedText, wysiwygInstance) {
|
159
|
-
//Do whatever you want to do in here.
|
160
|
-
}
|
161
|
-
};
|
162
|
-
*/
|
163
|
-
|
164
|
-
var custom = {};
|
165
|
-
custom[name] = {visible: false, custom: true, options: settings};
|
166
|
-
|
167
|
-
$.extend($.fn.wysiwyg.controls, $.fn.wysiwyg.controls, custom);
|
168
|
-
}
|
169
|
-
};
|
170
|
-
|
171
|
-
$.fn.wysiwyg.controls = {
|
172
|
-
bold: {
|
173
|
-
visible: true,
|
174
|
-
tags: ['b', 'strong'],
|
175
|
-
css: {
|
176
|
-
fontWeight: 'bold'
|
177
|
-
},
|
178
|
-
tooltip: 'Bold'
|
179
|
-
},
|
180
|
-
italic: {
|
181
|
-
visible: true,
|
182
|
-
tags: ['i', 'em'],
|
183
|
-
css: {
|
184
|
-
fontStyle: 'italic'
|
185
|
-
},
|
186
|
-
tooltip: 'Italic'
|
187
|
-
},
|
188
|
-
strikeThrough: {
|
189
|
-
visible: true,
|
190
|
-
tags: ['s', 'strike'],
|
191
|
-
css: {
|
192
|
-
textDecoration: 'line-through'
|
193
|
-
},
|
194
|
-
tooltip: 'Strike-through'
|
195
|
-
},
|
196
|
-
underline: {
|
197
|
-
visible: true,
|
198
|
-
tags: ['u'],
|
199
|
-
css: {
|
200
|
-
textDecoration: 'underline'
|
201
|
-
},
|
202
|
-
tooltip: 'Underline'
|
203
|
-
},
|
204
|
-
justifyLeft: {
|
205
|
-
visible: true,
|
206
|
-
groupIndex: 1,
|
207
|
-
css: {
|
208
|
-
textAlign: 'left'
|
209
|
-
},
|
210
|
-
tooltip: 'Justify Left'
|
211
|
-
},
|
212
|
-
justifyCenter: {
|
213
|
-
visible: true,
|
214
|
-
tags: ['center'],
|
215
|
-
css: {
|
216
|
-
textAlign: 'center'
|
217
|
-
},
|
218
|
-
tooltip: 'Justify Center'
|
219
|
-
},
|
220
|
-
justifyRight: {
|
221
|
-
visible: true,
|
222
|
-
css: {
|
223
|
-
textAlign: 'right'
|
224
|
-
},
|
225
|
-
tooltip: 'Justify Right'
|
226
|
-
},
|
227
|
-
justifyFull: {
|
228
|
-
visible: true,
|
229
|
-
css: {
|
230
|
-
textAlign: 'justify'
|
231
|
-
},
|
232
|
-
tooltip: 'Justify Full'
|
233
|
-
},
|
234
|
-
indent: {
|
235
|
-
groupIndex: 2,
|
236
|
-
visible: true,
|
237
|
-
tooltip: 'Indent'
|
238
|
-
},
|
239
|
-
outdent: {
|
240
|
-
visible: true,
|
241
|
-
tooltip: 'Outdent'
|
242
|
-
},
|
243
|
-
subscript: {
|
244
|
-
groupIndex: 3,
|
245
|
-
visible: true,
|
246
|
-
tags: ['sub'],
|
247
|
-
tooltip: 'Subscript'
|
248
|
-
},
|
249
|
-
superscript: {
|
250
|
-
visible: true,
|
251
|
-
tags: ['sup'],
|
252
|
-
tooltip: 'Superscript'
|
253
|
-
},
|
254
|
-
undo: {
|
255
|
-
groupIndex: 4,
|
256
|
-
visible: true,
|
257
|
-
tooltip: 'Undo'
|
258
|
-
},
|
259
|
-
redo: {
|
260
|
-
visible: true,
|
261
|
-
tooltip: 'Redo'
|
262
|
-
},
|
263
|
-
insertOrderedList: {
|
264
|
-
groupIndex: 5,
|
265
|
-
visible: true,
|
266
|
-
tags: ['ol'],
|
267
|
-
tooltip: 'Insert Ordered List'
|
268
|
-
},
|
269
|
-
insertUnorderedList: {
|
270
|
-
visible: true,
|
271
|
-
tags: ['ul'],
|
272
|
-
tooltip: 'Insert Unordered List'
|
273
|
-
},
|
274
|
-
insertHorizontalRule: {
|
275
|
-
visible: true,
|
276
|
-
tags: ['hr'],
|
277
|
-
tooltip: 'Insert Horizontal Rule'
|
278
|
-
},
|
279
|
-
createLink: {
|
280
|
-
groupIndex: 6,
|
281
|
-
visible: true,
|
282
|
-
exec: function ()
|
283
|
-
{
|
284
|
-
var selection = documentSelection.call($(this.editor));
|
285
|
-
|
286
|
-
if (selection && selection.length > 0)
|
287
|
-
{
|
288
|
-
if ($.browser.msie)
|
289
|
-
{
|
290
|
-
this.focus();
|
291
|
-
this.editorDoc.execCommand('createLink', true, null);
|
292
|
-
}
|
293
|
-
else
|
294
|
-
{
|
295
|
-
var szURL = prompt('URL', 'http://');
|
296
|
-
if (szURL && szURL.length > 0)
|
297
|
-
{
|
298
|
-
this.editorDoc.execCommand('unlink', false, null);
|
299
|
-
this.editorDoc.execCommand('createLink', false, szURL);
|
300
|
-
}
|
301
|
-
}
|
302
|
-
}
|
303
|
-
else if (this.options.messages.nonSelection)
|
304
|
-
{
|
305
|
-
alert(this.options.messages.nonSelection);
|
306
|
-
}
|
307
|
-
},
|
308
|
-
tags: ['a'],
|
309
|
-
tooltip: 'Create link'
|
310
|
-
},
|
311
|
-
insertImage: {
|
312
|
-
visible: true,
|
313
|
-
exec: function ()
|
314
|
-
{
|
315
|
-
var self = this;
|
316
|
-
if ($.modal)
|
317
|
-
{
|
318
|
-
$.modal($.fn.wysiwyg.defaults.formImageHtml, {
|
319
|
-
onShow: function(dialog)
|
320
|
-
{
|
321
|
-
$('input:submit', dialog.data).click(function(e)
|
322
|
-
{
|
323
|
-
e.preventDefault();
|
324
|
-
var szURL = $('input[name="url"]', dialog.data).val();
|
325
|
-
var title = $('input[name="imagetitle"]', dialog.data).val();
|
326
|
-
var description = $('input[name="description"]', dialog.data).val();
|
327
|
-
var img="<img src='" + szURL + "' title='" + title + "' alt='" + description + "' />";
|
328
|
-
self.insertHtml(img);
|
329
|
-
$.modal.close();
|
330
|
-
});
|
331
|
-
$('input:reset', dialog.data).click(function(e)
|
332
|
-
{
|
333
|
-
e.preventDefault();
|
334
|
-
$.modal.close();
|
335
|
-
});
|
336
|
-
},
|
337
|
-
maxWidth: $.fn.wysiwyg.defaults.formWidth,
|
338
|
-
maxHeight: $.fn.wysiwyg.defaults.formHeight,
|
339
|
-
overlayClose: true
|
340
|
-
});
|
341
|
-
}
|
342
|
-
else
|
343
|
-
{
|
344
|
-
if ($.fn.dialog){
|
345
|
-
var dialog = $($.fn.wysiwyg.defaults.formImageHtml).appendTo('body');
|
346
|
-
dialog.dialog({
|
347
|
-
modal: true,
|
348
|
-
width: $.fn.wysiwyg.defaults.formWidth,
|
349
|
-
height: $.fn.wysiwyg.defaults.formHeight,
|
350
|
-
open: function(ev, ui)
|
351
|
-
{
|
352
|
-
$('input:submit', $(this)).click(function(e)
|
353
|
-
{
|
354
|
-
e.preventDefault();
|
355
|
-
var szURL = $('input[name="url"]', dialog).val();
|
356
|
-
var title = $('input[name="imagetitle"]', dialog).val();
|
357
|
-
var description = $('input[name="description"]', dialog).val();
|
358
|
-
var img="<img src='" + szURL + "' title='" + title + "' alt='" + description + "' />";
|
359
|
-
self.insertHtml(img);
|
360
|
-
$(dialog).dialog("close");
|
361
|
-
});
|
362
|
-
$('input:reset', $(this)).click(function(e)
|
363
|
-
{
|
364
|
-
e.preventDefault();
|
365
|
-
$(dialog).dialog("close");
|
366
|
-
});
|
367
|
-
},
|
368
|
-
close: function(ev, ui){
|
369
|
-
$(this).dialog("destroy");
|
370
|
-
|
371
|
-
}
|
372
|
-
});
|
373
|
-
}
|
374
|
-
else
|
375
|
-
{
|
376
|
-
if ($.browser.msie)
|
377
|
-
{
|
378
|
-
this.focus();
|
379
|
-
this.editorDoc.execCommand('insertImage', true, null);
|
380
|
-
}
|
381
|
-
else
|
382
|
-
{
|
383
|
-
var szURL = prompt('URL', 'http://');
|
384
|
-
if (szURL && szURL.length > 0)
|
385
|
-
{
|
386
|
-
this.editorDoc.execCommand('insertImage', false, szURL);
|
387
|
-
}
|
388
|
-
}
|
389
|
-
}
|
390
|
-
|
391
|
-
|
392
|
-
}
|
393
|
-
|
394
|
-
},
|
395
|
-
tags: ['img'],
|
396
|
-
tooltip: 'Insert image'
|
397
|
-
},
|
398
|
-
insertTable: {
|
399
|
-
visible: true,
|
400
|
-
exec: function ()
|
401
|
-
{
|
402
|
-
var self = this;
|
403
|
-
if ($.fn.modal)
|
404
|
-
{
|
405
|
-
$.modal($.fn.wysiwyg.defaults.formTableHtml, {
|
406
|
-
onShow: function(dialog)
|
407
|
-
{
|
408
|
-
$('input:submit', dialog.data).click(function(e)
|
409
|
-
{
|
410
|
-
e.preventDefault();
|
411
|
-
var rowCount = $('input[name="rowCount"]', dialog.data).val();
|
412
|
-
var colCount = $('input[name="colCount"]', dialog.data).val();
|
413
|
-
self.insertTable(colCount, rowCount, $.fn.wysiwyg.defaults.tableFiller);
|
414
|
-
$.modal.close();
|
415
|
-
});
|
416
|
-
$('input:reset', dialog.data).click(function(e)
|
417
|
-
{
|
418
|
-
e.preventDefault();
|
419
|
-
$.modal.close();
|
420
|
-
});
|
421
|
-
},
|
422
|
-
maxWidth: $.fn.wysiwyg.defaults.formWidth,
|
423
|
-
maxHeight: $.fn.wysiwyg.defaults.formHeight,
|
424
|
-
overlayClose: true
|
425
|
-
});
|
426
|
-
}
|
427
|
-
else
|
428
|
-
{
|
429
|
-
if ($.fn.dialog){
|
430
|
-
var dialog = $($.fn.wysiwyg.defaults.formTableHtml).appendTo('body');
|
431
|
-
dialog.dialog({
|
432
|
-
modal: true,
|
433
|
-
width: $.fn.wysiwyg.defaults.formWidth,
|
434
|
-
height: $.fn.wysiwyg.defaults.formHeight,
|
435
|
-
open: function(event, ui){
|
436
|
-
$('input:submit', $(this)).click(function(e)
|
437
|
-
{
|
438
|
-
e.preventDefault();
|
439
|
-
var rowCount = $('input[name="rowCount"]', dialog).val();
|
440
|
-
var colCount = $('input[name="colCount"]', dialog).val();
|
441
|
-
self.insertTable(colCount, rowCount, $.fn.wysiwyg.defaults.tableFiller);
|
442
|
-
$(dialog).dialog("close");
|
443
|
-
});
|
444
|
-
$('input:reset', $(this)).click(function(e)
|
445
|
-
{
|
446
|
-
e.preventDefault();
|
447
|
-
$(dialog).dialog("close");
|
448
|
-
});
|
449
|
-
},
|
450
|
-
close: function(event, ui){
|
451
|
-
$(this).dialog("destroy");
|
452
|
-
|
453
|
-
}
|
454
|
-
});
|
455
|
-
}
|
456
|
-
else
|
457
|
-
{
|
458
|
-
var colCount = prompt('Count of columns', '3');
|
459
|
-
var rowCount = prompt('Count of rows', '3');
|
460
|
-
this.insertTable(colCount, rowCount, $.fn.wysiwyg.defaults.tableFiller);
|
461
|
-
}
|
462
|
-
}
|
463
|
-
},
|
464
|
-
tags: ['table'],
|
465
|
-
tooltip: 'Insert table'
|
466
|
-
},
|
467
|
-
h1: {
|
468
|
-
visible: true,
|
469
|
-
groupIndex: 7,
|
470
|
-
className: 'h1',
|
471
|
-
command: ($.browser.msie || $.browser.safari) ? 'FormatBlock' : 'heading',
|
472
|
-
'arguments': ($.browser.msie || $.browser.safari) ? '<h1>' : 'h1',
|
473
|
-
tags: ['h1'],
|
474
|
-
tooltip: 'Header 1'
|
475
|
-
},
|
476
|
-
h2: {
|
477
|
-
visible: true,
|
478
|
-
className: 'h2',
|
479
|
-
command: ($.browser.msie || $.browser.safari) ? 'FormatBlock' : 'heading',
|
480
|
-
'arguments': ($.browser.msie || $.browser.safari) ? '<h2>' : 'h2',
|
481
|
-
tags: ['h2'],
|
482
|
-
tooltip: 'Header 2'
|
483
|
-
},
|
484
|
-
h3: {
|
485
|
-
visible: true,
|
486
|
-
className: 'h3',
|
487
|
-
command: ($.browser.msie || $.browser.safari) ? 'FormatBlock' : 'heading',
|
488
|
-
'arguments': ($.browser.msie || $.browser.safari) ? '<h3>' : 'h3',
|
489
|
-
tags: ['h3'],
|
490
|
-
tooltip: 'Header 3'
|
491
|
-
},
|
492
|
-
cut: {
|
493
|
-
groupIndex: 8,
|
494
|
-
visible: false,
|
495
|
-
tooltip: 'Cut'
|
496
|
-
},
|
497
|
-
copy: {
|
498
|
-
visible: false,
|
499
|
-
tooltip: 'Copy'
|
500
|
-
},
|
501
|
-
paste: {
|
502
|
-
visible: false,
|
503
|
-
tooltip: 'Paste'
|
504
|
-
},
|
505
|
-
increaseFontSize: {
|
506
|
-
groupIndex: 9,
|
507
|
-
visible: false && !($.browser.msie),
|
508
|
-
tags: ['big'],
|
509
|
-
tooltip: 'Increase font size'
|
510
|
-
},
|
511
|
-
decreaseFontSize: {
|
512
|
-
visible: false && !($.browser.msie),
|
513
|
-
tags: ['small'],
|
514
|
-
tooltip: 'Decrease font size'
|
515
|
-
},
|
516
|
-
removeFormat: {
|
517
|
-
visible: true,
|
518
|
-
exec: function ()
|
519
|
-
{
|
520
|
-
if ($.browser.msie)
|
521
|
-
{
|
522
|
-
this.focus();
|
523
|
-
}
|
524
|
-
this.editorDoc.execCommand('formatBlock', false, '<P>'); // remove headings
|
525
|
-
this.editorDoc.execCommand('removeFormat', false, null);
|
526
|
-
this.editorDoc.execCommand('unlink', false, null);
|
527
|
-
},
|
528
|
-
tooltip: 'Remove formatting'
|
529
|
-
},
|
530
|
-
html: {
|
531
|
-
groupIndex: 10,
|
532
|
-
visible: false,
|
533
|
-
exec: function ()
|
534
|
-
{
|
535
|
-
if (this.viewHTML)
|
536
|
-
{
|
537
|
-
this.setContent($(this.original).val());
|
538
|
-
$(this.original).hide();
|
539
|
-
$(this.editor).show();
|
540
|
-
}
|
541
|
-
else
|
542
|
-
{
|
543
|
-
var $ed = $(this.editor);
|
544
|
-
this.saveContent();
|
545
|
-
$(this.original).css({
|
546
|
-
width: $(this.element).outerWidth() - 6,
|
547
|
-
height: $(this.element).height() - $(this.panel).height() - 6,
|
548
|
-
resize: 'none'
|
549
|
-
}).show();
|
550
|
-
$ed.hide();
|
551
|
-
}
|
552
|
-
|
553
|
-
this.viewHTML = !(this.viewHTML);
|
554
|
-
},
|
555
|
-
tooltip: 'View source code'
|
556
|
-
},
|
557
|
-
rtl: {
|
558
|
-
visible : false,
|
559
|
-
exec : function()
|
560
|
-
{
|
561
|
-
var selection = $(this.editor).documentSelection();
|
562
|
-
if ($("<div />").append(selection).children().length > 0)
|
563
|
-
{
|
564
|
-
selection = $(selection).attr("dir", "rtl");
|
565
|
-
}
|
566
|
-
else
|
567
|
-
{
|
568
|
-
selection = $("<div />").attr("dir", "rtl").append(selection);
|
569
|
-
}
|
570
|
-
this.editorDoc.execCommand('inserthtml', false, $("<div />").append(selection).html());
|
571
|
-
},
|
572
|
-
tooltip : "Right to Left"
|
573
|
-
},
|
574
|
-
ltr: {
|
575
|
-
visible : false,
|
576
|
-
exec : function()
|
577
|
-
{
|
578
|
-
var selection = $(this.editor).documentSelection();
|
579
|
-
if ($("<div />").append(selection).children().length > 0)
|
580
|
-
{
|
581
|
-
selection = $(selection).attr("dir", "ltr");
|
582
|
-
}
|
583
|
-
else
|
584
|
-
{
|
585
|
-
selection = $("<div />").attr("dir", "ltr").append(selection);
|
586
|
-
}
|
587
|
-
this.editorDoc.execCommand('inserthtml', false, $("<div />").append(selection).html());
|
588
|
-
},
|
589
|
-
tooltip : "Left to Right"
|
590
|
-
}
|
591
|
-
};
|
592
|
-
|
593
|
-
$.extend(Wysiwyg, {
|
594
|
-
insertImage: function (szURL, attributes)
|
595
|
-
{
|
596
|
-
var self = $.data(this, 'wysiwyg');
|
597
|
-
if (self.constructor == Wysiwyg && szURL && szURL.length > 0)
|
598
|
-
{
|
599
|
-
if ($.browser.msie)
|
600
|
-
{
|
601
|
-
self.focus();
|
602
|
-
}
|
603
|
-
if (attributes)
|
604
|
-
{
|
605
|
-
self.editorDoc.execCommand('insertImage', false, '#jwysiwyg#');
|
606
|
-
var img = self.getElementByAttributeValue('img', 'src', '#jwysiwyg#');
|
607
|
-
|
608
|
-
if (img)
|
609
|
-
{
|
610
|
-
img.src = szURL;
|
611
|
-
|
612
|
-
for (var attribute in attributes)
|
613
|
-
{
|
614
|
-
img.setAttribute(attribute, attributes[attribute]);
|
615
|
-
}
|
616
|
-
}
|
617
|
-
}
|
618
|
-
else
|
619
|
-
{
|
620
|
-
self.editorDoc.execCommand('insertImage', false, szURL);
|
621
|
-
}
|
622
|
-
}
|
623
|
-
return this;
|
624
|
-
},
|
625
|
-
|
626
|
-
createLink: function (szURL)
|
627
|
-
{
|
628
|
-
var self = $.data(this, 'wysiwyg');
|
629
|
-
|
630
|
-
if (self.constructor == Wysiwyg && szURL && szURL.length > 0)
|
631
|
-
{
|
632
|
-
var selection = documentSelection.call($(self.editor));
|
633
|
-
|
634
|
-
if (selection && selection.length > 0)
|
635
|
-
{
|
636
|
-
if ($.browser.msie)
|
637
|
-
{
|
638
|
-
self.focus();
|
639
|
-
}
|
640
|
-
self.editorDoc.execCommand('unlink', false, null);
|
641
|
-
self.editorDoc.execCommand('createLink', false, szURL);
|
642
|
-
}
|
643
|
-
else if (self.options.messages.nonSelection)
|
644
|
-
{
|
645
|
-
alert(self.options.messages.nonSelection);
|
646
|
-
}
|
647
|
-
}
|
648
|
-
return this;
|
649
|
-
},
|
650
|
-
|
651
|
-
insertHtml: function (szHTML)
|
652
|
-
{
|
653
|
-
var self = $.data(this, 'wysiwyg');
|
654
|
-
self.insertHtml(szHTML);
|
655
|
-
return this;
|
656
|
-
},
|
657
|
-
|
658
|
-
insertTable: function(colCount, rowCount, filler)
|
659
|
-
{
|
660
|
-
$.data(this, 'wysiwyg').insertTable(colCount, rowCount, filler);
|
661
|
-
return this;
|
662
|
-
},
|
663
|
-
|
664
|
-
getContent: function()
|
665
|
-
{
|
666
|
-
var self = $.data(this, 'wysiwyg');
|
667
|
-
return self.getContent();
|
668
|
-
},
|
669
|
-
|
670
|
-
setContent: function (newContent)
|
671
|
-
{
|
672
|
-
var self = $.data(this, 'wysiwyg');
|
673
|
-
self.setContent(newContent);
|
674
|
-
self.saveContent();
|
675
|
-
return this;
|
676
|
-
},
|
677
|
-
|
678
|
-
clear: function ()
|
679
|
-
{
|
680
|
-
var self = $.data(this, 'wysiwyg');
|
681
|
-
self.setContent('');
|
682
|
-
self.saveContent();
|
683
|
-
return this;
|
684
|
-
},
|
685
|
-
|
686
|
-
removeFormat: function ()
|
687
|
-
{
|
688
|
-
var self = $.data(this, 'wysiwyg');
|
689
|
-
self.removeFormat();
|
690
|
-
return this;
|
691
|
-
},
|
692
|
-
|
693
|
-
save: function ()
|
694
|
-
{
|
695
|
-
var self = $.data(this, 'wysiwyg');
|
696
|
-
self.saveContent();
|
697
|
-
return this;
|
698
|
-
},
|
699
|
-
|
700
|
-
"document": function()
|
701
|
-
{
|
702
|
-
var self = $.data(this, 'wysiwyg');
|
703
|
-
return $(self.editorDoc);
|
704
|
-
},
|
705
|
-
|
706
|
-
destroy: function ()
|
707
|
-
{
|
708
|
-
var self = $.data(this, 'wysiwyg');
|
709
|
-
self.destroy();
|
710
|
-
return this;
|
711
|
-
}
|
712
|
-
});
|
713
|
-
|
714
|
-
var addHoverClass = function()
|
715
|
-
{
|
716
|
-
$(this).addClass('wysiwyg-button-hover');
|
717
|
-
};
|
718
|
-
var removeHoverClass = function()
|
719
|
-
{
|
720
|
-
$(this).removeClass('wysiwyg-button-hover');
|
721
|
-
};
|
722
|
-
|
723
|
-
$.extend(Wysiwyg.prototype, {
|
724
|
-
original: null,
|
725
|
-
options: {
|
726
|
-
},
|
727
|
-
|
728
|
-
element: null,
|
729
|
-
rangeSaver: null,
|
730
|
-
editor: null,
|
731
|
-
|
732
|
-
removeFormat: function ()
|
733
|
-
{
|
734
|
-
if ($.browser.msie)
|
735
|
-
{
|
736
|
-
this.focus();
|
737
|
-
}
|
738
|
-
this.editorDoc.execCommand('removeFormat', false, null);
|
739
|
-
this.editorDoc.execCommand('unlink', false, null);
|
740
|
-
return this;
|
741
|
-
},
|
742
|
-
destroy: function ()
|
743
|
-
{
|
744
|
-
// Remove bindings
|
745
|
-
var $form = $(this.element).closest('form');
|
746
|
-
$form.unbind('submit', this.autoSaveFunction)
|
747
|
-
.unbind('reset', this.resetFunction);
|
748
|
-
$(this.element).remove();
|
749
|
-
$.removeData(this.original, 'wysiwyg');
|
750
|
-
$(this.original).show();
|
751
|
-
return this;
|
752
|
-
},
|
753
|
-
focus: function ()
|
754
|
-
{
|
755
|
-
this.editor.get(0).contentWindow.focus();
|
756
|
-
return this;
|
757
|
-
},
|
758
|
-
|
759
|
-
init: function (element, options)
|
760
|
-
{
|
761
|
-
var self = this;
|
762
|
-
|
763
|
-
this.editor = element;
|
764
|
-
this.options = options || {
|
765
|
-
};
|
766
|
-
|
767
|
-
$.data(element, 'wysiwyg', this);
|
768
|
-
|
769
|
-
var newX = element.width || element.clientWidth || 0;
|
770
|
-
var newY = element.height || element.clientHeight || 0;
|
771
|
-
|
772
|
-
if (element.nodeName.toLowerCase() == 'textarea')
|
773
|
-
{
|
774
|
-
this.original = element;
|
775
|
-
|
776
|
-
if (newX === 0 && element.cols)
|
777
|
-
{
|
778
|
-
newX = (element.cols * 8) + 21;
|
779
|
-
|
780
|
-
// fix for issue 30 ( http://github.com/akzhan/jwysiwyg/issues/issue/30 )
|
781
|
-
element.cols = 1;
|
782
|
-
}
|
783
|
-
if (newY === 0 && element.rows)
|
784
|
-
{
|
785
|
-
newY = (element.rows * 16) + 16;
|
786
|
-
|
787
|
-
// fix for issue 30 ( http://github.com/akzhan/jwysiwyg/issues/issue/30 )
|
788
|
-
element.rows = 1;
|
789
|
-
}
|
790
|
-
this.editor = $(location.protocol == 'https:' ? '<iframe src="javascript:false;"></iframe>' : '<iframe></iframe>').attr('frameborder', '0');
|
791
|
-
if (options.iFrameClass)
|
792
|
-
{
|
793
|
-
this.editor.addClass(options.iFrameClass);
|
794
|
-
}
|
795
|
-
else
|
796
|
-
{
|
797
|
-
this.editor.css({
|
798
|
-
minHeight: (newY - 6).toString() + 'px',
|
799
|
-
|
800
|
-
// fix for issue 12 ( http://github.com/akzhan/jwysiwyg/issues/issue/12 )
|
801
|
-
width: (newX > 50) ? (newX - 8).toString() + 'px' : ''
|
802
|
-
});
|
803
|
-
if ($.browser.msie)
|
804
|
-
{
|
805
|
-
this.editor.css('height', newY.toString() + 'px');
|
806
|
-
}
|
807
|
-
}
|
808
|
-
|
809
|
-
/**
|
810
|
-
* http://code.google.com/p/jwysiwyg/issues/detail?id=96
|
811
|
-
*/
|
812
|
-
this.editor.attr('tabindex', $(element).attr('tabindex'));
|
813
|
-
}
|
814
|
-
|
815
|
-
var panel = this.panel = $('<ul role="menu" class="panel"></ul>');
|
816
|
-
|
817
|
-
this.appendControls();
|
818
|
-
this.element = $('<div></div>').addClass('wysiwyg').append(panel).append($('<div><!-- --></div>').css({
|
819
|
-
clear: 'both'
|
820
|
-
})).append(this.editor);
|
821
|
-
|
822
|
-
if (!options.iFrameClass)
|
823
|
-
{
|
824
|
-
this.element.css({
|
825
|
-
width: (newX > 0) ? newX.toString() + 'px' : '100%'
|
826
|
-
});
|
827
|
-
}
|
828
|
-
|
829
|
-
$(element).hide().before(this.element);
|
830
|
-
|
831
|
-
this.viewHTML = false;
|
832
|
-
this.initialHeight = newY - 8;
|
833
|
-
|
834
|
-
/**
|
835
|
-
* @link http://code.google.com/p/jwysiwyg/issues/detail?id=52
|
836
|
-
*/
|
837
|
-
this.initialContent = $(element).val();
|
838
|
-
this.initFrame();
|
839
|
-
|
840
|
-
this.autoSaveFunction = function ()
|
841
|
-
{
|
842
|
-
self.saveContent();
|
843
|
-
};
|
844
|
-
|
845
|
-
this.resetFunction = function()
|
846
|
-
{
|
847
|
-
self.setContent(self.initialContent);
|
848
|
-
self.saveContent();
|
849
|
-
}
|
850
|
-
|
851
|
-
if(this.options.resizeOptions && $.fn.resizable)
|
852
|
-
{
|
853
|
-
this.element.resizable($.extend(true, {
|
854
|
-
alsoResize: this.editor
|
855
|
-
}, this.options.resizeOptions));
|
856
|
-
}
|
857
|
-
|
858
|
-
var $form = $(element).closest('form');
|
859
|
-
|
860
|
-
if (this.options.autoSave)
|
861
|
-
{
|
862
|
-
$form.submit(self.autoSaveFunction);
|
863
|
-
}
|
864
|
-
|
865
|
-
$form.bind('reset', self.resetFunction);
|
866
|
-
},
|
867
|
-
|
868
|
-
initFrame: function ()
|
869
|
-
{
|
870
|
-
var self = this;
|
871
|
-
var style = '';
|
872
|
-
|
873
|
-
/**
|
874
|
-
* @link http://code.google.com/p/jwysiwyg/issues/detail?id=14
|
875
|
-
*/
|
876
|
-
if (this.options.css && this.options.css.constructor == String)
|
877
|
-
{
|
878
|
-
style = '<link rel="stylesheet" type="text/css" media="screen" href="' + this.options.css + '" />';
|
879
|
-
}
|
880
|
-
|
881
|
-
this.editorDoc = innerDocument(this.editor);
|
882
|
-
this.editorDoc_designMode = false;
|
883
|
-
|
884
|
-
this.designMode();
|
885
|
-
|
886
|
-
this.editorDoc.open();
|
887
|
-
this.editorDoc.write(
|
888
|
-
this.options.html
|
889
|
-
/**
|
890
|
-
* @link http://code.google.com/p/jwysiwyg/issues/detail?id=144
|
891
|
-
*/
|
892
|
-
.replace(/INITIAL_CONTENT/, function ()
|
893
|
-
{
|
894
|
-
return self.initialContent;
|
895
|
-
}).replace(/STYLE_SHEET/, function ()
|
896
|
-
{
|
897
|
-
return style;
|
898
|
-
}));
|
899
|
-
this.editorDoc.close();
|
900
|
-
|
901
|
-
if ($.browser.msie)
|
902
|
-
{
|
903
|
-
/**
|
904
|
-
* Remove the horrible border it has on IE.
|
905
|
-
*/
|
906
|
-
window.setTimeout(function ()
|
907
|
-
{
|
908
|
-
$(self.editorDoc.body).css('border', 'none');
|
909
|
-
}, 0);
|
910
|
-
}
|
911
|
-
|
912
|
-
$(this.editorDoc).click(function (event)
|
913
|
-
{
|
914
|
-
self.checkTargets(event.target ? event.target : event.srcElement);
|
915
|
-
});
|
916
|
-
|
917
|
-
/**
|
918
|
-
* @link http://code.google.com/p/jwysiwyg/issues/detail?id=20
|
919
|
-
*/
|
920
|
-
$(this.original).focus(function ()
|
921
|
-
{
|
922
|
-
if ($(this).filter(':visible'))
|
923
|
-
{
|
924
|
-
return;
|
925
|
-
}
|
926
|
-
self.focus();
|
927
|
-
});
|
928
|
-
|
929
|
-
if (!$.browser.msie)
|
930
|
-
{
|
931
|
-
$(this.editorDoc).keydown(function (event)
|
932
|
-
{
|
933
|
-
if (event.ctrlKey)
|
934
|
-
{
|
935
|
-
switch (event.keyCode)
|
936
|
-
{
|
937
|
-
case 66:
|
938
|
-
// Ctrl + B
|
939
|
-
this.execCommand('Bold', false, false);
|
940
|
-
return false;
|
941
|
-
case 73:
|
942
|
-
// Ctrl + I
|
943
|
-
this.execCommand('Italic', false, false);
|
944
|
-
return false;
|
945
|
-
case 85:
|
946
|
-
// Ctrl + U
|
947
|
-
this.execCommand('Underline', false, false);
|
948
|
-
return false;
|
949
|
-
}
|
950
|
-
}
|
951
|
-
return true;
|
952
|
-
});
|
953
|
-
}
|
954
|
-
else if (this.options.brIE)
|
955
|
-
{
|
956
|
-
$(this.editorDoc).keydown(function (event)
|
957
|
-
{
|
958
|
-
if (event.keyCode == 13)
|
959
|
-
{
|
960
|
-
var rng = self.getRange();
|
961
|
-
rng.pasteHTML('<br />');
|
962
|
-
rng.collapse(false);
|
963
|
-
rng.select();
|
964
|
-
return false;
|
965
|
-
}
|
966
|
-
return true;
|
967
|
-
});
|
968
|
-
}
|
969
|
-
|
970
|
-
if (this.options.autoSave)
|
971
|
-
{
|
972
|
-
/**
|
973
|
-
* @link http://code.google.com/p/jwysiwyg/issues/detail?id=11
|
974
|
-
*/
|
975
|
-
var handler = function () {
|
976
|
-
self.saveContent();
|
977
|
-
};
|
978
|
-
$(this.editorDoc).keydown(handler).keyup(handler).mousedown(handler).bind($.support.noCloneEvent ? "input" : "paste", handler);
|
979
|
-
|
980
|
-
}
|
981
|
-
|
982
|
-
if (this.options.css)
|
983
|
-
{
|
984
|
-
window.setTimeout(function ()
|
985
|
-
{
|
986
|
-
if (self.options.css.constructor == String)
|
987
|
-
{
|
988
|
-
/**
|
989
|
-
* $(self.editorDoc)
|
990
|
-
* .find('head')
|
991
|
-
* .append(
|
992
|
-
* $('<link rel="stylesheet" type="text/css" media="screen" />')
|
993
|
-
* .attr('href', self.options.css)
|
994
|
-
* );
|
995
|
-
*/
|
996
|
-
}
|
997
|
-
else
|
998
|
-
{
|
999
|
-
$(self.editorDoc).find('body').css(self.options.css);
|
1000
|
-
}
|
1001
|
-
}, 0);
|
1002
|
-
}
|
1003
|
-
|
1004
|
-
if (this.initialContent.length === 0)
|
1005
|
-
{
|
1006
|
-
this.setContent('<p>initial content</p>');
|
1007
|
-
}
|
1008
|
-
|
1009
|
-
$.each(this.options.events, function(key, handler)
|
1010
|
-
{
|
1011
|
-
$(self.editorDoc).bind(key, handler);
|
1012
|
-
});
|
1013
|
-
|
1014
|
-
// restores selection properly on focus
|
1015
|
-
$(self.editor).blur(function() {
|
1016
|
-
self.rangeSaver = self.getInternalRange();
|
1017
|
-
});
|
1018
|
-
|
1019
|
-
$(this.editorDoc.body).addClass('wysiwyg');
|
1020
|
-
if(this.options.events && this.options.events.save) {
|
1021
|
-
var handler = this.options.events.save;
|
1022
|
-
$(self.editorDoc).bind('keyup', handler);
|
1023
|
-
$(self.editorDoc).bind('change', handler);
|
1024
|
-
if($.support.noCloneEvent) {
|
1025
|
-
$(self.editorDoc).bind("input", handler);
|
1026
|
-
} else {
|
1027
|
-
$(self.editorDoc).bind("paste", handler);
|
1028
|
-
$(self.editorDoc).bind("cut", handler);
|
1029
|
-
}
|
1030
|
-
}
|
1031
|
-
},
|
1032
|
-
|
1033
|
-
focusEditor: function () {
|
1034
|
-
//console.log(this.editorDoc.body.focus());//.focus();
|
1035
|
-
if (this.rangeSaver != null) {
|
1036
|
-
if (window.getSelection) { //non IE and there is already a selection
|
1037
|
-
var s = window.getSelection();
|
1038
|
-
if (s.rangeCount > 0) s.removeAllRanges();
|
1039
|
-
s.addRange(savedRange);
|
1040
|
-
}
|
1041
|
-
else if (document.createRange) { //non IE and no selection
|
1042
|
-
window.getSelection().addRange(savedRange);
|
1043
|
-
}
|
1044
|
-
else if (document.selection) { //IE
|
1045
|
-
savedRange.select();
|
1046
|
-
}
|
1047
|
-
}
|
1048
|
-
},
|
1049
|
-
|
1050
|
-
execute: function (command, arg) {
|
1051
|
-
if(typeof(arg) == "undefined") arg = null;
|
1052
|
-
this.editorDoc.execCommand(command, false, arg);
|
1053
|
-
},
|
1054
|
-
|
1055
|
-
designMode: function ()
|
1056
|
-
{
|
1057
|
-
var attempts = 3;
|
1058
|
-
var runner;
|
1059
|
-
var self = this;
|
1060
|
-
var doc = this.editorDoc;
|
1061
|
-
runner = function()
|
1062
|
-
{
|
1063
|
-
if (innerDocument(self.editor) !== doc)
|
1064
|
-
{
|
1065
|
-
self.initFrame();
|
1066
|
-
return;
|
1067
|
-
}
|
1068
|
-
try
|
1069
|
-
{
|
1070
|
-
doc.designMode = 'on';
|
1071
|
-
}
|
1072
|
-
catch (e)
|
1073
|
-
{
|
1074
|
-
}
|
1075
|
-
attempts--;
|
1076
|
-
if (attempts > 0 && $.browser.mozilla)
|
1077
|
-
{
|
1078
|
-
setTimeout(runner, 100);
|
1079
|
-
}
|
1080
|
-
};
|
1081
|
-
runner();
|
1082
|
-
this.editorDoc_designMode = true;
|
1083
|
-
},
|
1084
|
-
|
1085
|
-
getSelection: function ()
|
1086
|
-
{
|
1087
|
-
return (window.getSelection) ? window.getSelection() : document.selection;
|
1088
|
-
},
|
1089
|
-
|
1090
|
-
|
1091
|
-
getInternalSelection: function ()
|
1092
|
-
{
|
1093
|
-
return (this.editor[0].contentWindow.getSelection) ? this.editor[0].contentWindow.getSelection() : this.editor[0].contentDocument.selection;
|
1094
|
-
},
|
1095
|
-
|
1096
|
-
getRange: function ()
|
1097
|
-
{
|
1098
|
-
var selection = this.getSelection();
|
1099
|
-
|
1100
|
-
if (!selection)
|
1101
|
-
{
|
1102
|
-
return null;
|
1103
|
-
}
|
1104
|
-
|
1105
|
-
return (selection.rangeCount > 0) ? selection.getRangeAt(0) : (selection.createRange ? selection.createRange() : null);
|
1106
|
-
},
|
1107
|
-
|
1108
|
-
getInternalRange: function ()
|
1109
|
-
{
|
1110
|
-
var selection = this.getInternalSelection();
|
1111
|
-
|
1112
|
-
if (!selection)
|
1113
|
-
{
|
1114
|
-
return null;
|
1115
|
-
}
|
1116
|
-
|
1117
|
-
return (selection.rangeCount > 0) ? selection.getRangeAt(0) : (selection.createRange ? selection.createRange() : null);
|
1118
|
-
},
|
1119
|
-
|
1120
|
-
getContent: function ()
|
1121
|
-
{
|
1122
|
-
return $(innerDocument(this.editor)).find('body').html();
|
1123
|
-
},
|
1124
|
-
|
1125
|
-
setContent: function (newContent)
|
1126
|
-
{
|
1127
|
-
$(innerDocument(this.editor)).find('body').html(newContent);
|
1128
|
-
return this;
|
1129
|
-
},
|
1130
|
-
insertHtml: function (szHTML)
|
1131
|
-
{
|
1132
|
-
if (szHTML && szHTML.length > 0)
|
1133
|
-
{
|
1134
|
-
if ($.browser.msie)
|
1135
|
-
{
|
1136
|
-
this.focus();
|
1137
|
-
this.editorDoc.execCommand('insertImage', false, '#jwysiwyg#');
|
1138
|
-
var img = this.getElementByAttributeValue('img', 'src', '#jwysiwyg#');
|
1139
|
-
if (img)
|
1140
|
-
{
|
1141
|
-
$(img).replaceWith(szHTML);
|
1142
|
-
}
|
1143
|
-
}
|
1144
|
-
else
|
1145
|
-
{
|
1146
|
-
this.editorDoc.execCommand('insertHTML', false, szHTML);
|
1147
|
-
}
|
1148
|
-
}
|
1149
|
-
return this;
|
1150
|
-
},
|
1151
|
-
insertTable: function(colCount, rowCount, filler)
|
1152
|
-
{
|
1153
|
-
if (isNaN(rowCount) || isNaN(colCount) || rowCount === null || colCount === null)
|
1154
|
-
{
|
1155
|
-
return;
|
1156
|
-
}
|
1157
|
-
colCount = parseInt(colCount, 10);
|
1158
|
-
rowCount = parseInt(rowCount, 10);
|
1159
|
-
if (filler === null)
|
1160
|
-
{
|
1161
|
-
filler = ' ';
|
1162
|
-
}
|
1163
|
-
filler = '<td>' + filler + '</td>';
|
1164
|
-
var html = ['<table border="1" style="width: 100%;"><tbody>'];
|
1165
|
-
for (var i = rowCount; i > 0; i--)
|
1166
|
-
{
|
1167
|
-
html.push('<tr>');
|
1168
|
-
for (var j = colCount; j > 0; j--)
|
1169
|
-
{
|
1170
|
-
html.push(filler);
|
1171
|
-
}
|
1172
|
-
html.push('</tr>');
|
1173
|
-
}
|
1174
|
-
html.push('</tbody></table>');
|
1175
|
-
return this.insertHtml(html.join(''));
|
1176
|
-
},
|
1177
|
-
saveContent: function ()
|
1178
|
-
{
|
1179
|
-
if (this.original)
|
1180
|
-
{
|
1181
|
-
var content = this.getContent();
|
1182
|
-
|
1183
|
-
if (this.options.rmUnwantedBr)
|
1184
|
-
{
|
1185
|
-
content = (content.substr(-4) == '<br>') ? content.substr(0, content.length - 4) : content;
|
1186
|
-
}
|
1187
|
-
|
1188
|
-
$(this.original).val(content);
|
1189
|
-
if(this.options.events && this.options.events.save) {
|
1190
|
-
this.options.events.save.call(this);
|
1191
|
-
}
|
1192
|
-
}
|
1193
|
-
return this;
|
1194
|
-
},
|
1195
|
-
|
1196
|
-
withoutCss: function ()
|
1197
|
-
{
|
1198
|
-
if ($.browser.mozilla)
|
1199
|
-
{
|
1200
|
-
try
|
1201
|
-
{
|
1202
|
-
this.editorDoc.execCommand('styleWithCSS', false, false);
|
1203
|
-
}
|
1204
|
-
catch (e)
|
1205
|
-
{
|
1206
|
-
try
|
1207
|
-
{
|
1208
|
-
this.editorDoc.execCommand('useCSS', false, true);
|
1209
|
-
}
|
1210
|
-
catch (e2)
|
1211
|
-
{
|
1212
|
-
}
|
1213
|
-
}
|
1214
|
-
}
|
1215
|
-
return this;
|
1216
|
-
},
|
1217
|
-
|
1218
|
-
appendMenuCustom: function (name, options)
|
1219
|
-
{
|
1220
|
-
var self = this;
|
1221
|
-
|
1222
|
-
$(window).bind("wysiwyg-trigger-"+name, options.callback);
|
1223
|
-
|
1224
|
-
return $('<li role="menuitem" UNSELECTABLE="on"><img src="' + options.icon + '" class="jwysiwyg-custom-icon" />' + (name) + '</li>')
|
1225
|
-
.addClass("custom-command-"+name)
|
1226
|
-
.addClass("jwysiwyg-custom-command")
|
1227
|
-
.addClass(name)
|
1228
|
-
.attr('title', options.tooltip)
|
1229
|
-
.hover(addHoverClass, removeHoverClass)
|
1230
|
-
.click(function () {
|
1231
|
-
self.triggerCallback(name);
|
1232
|
-
})
|
1233
|
-
.appendTo(this.panel);
|
1234
|
-
},
|
1235
|
-
|
1236
|
-
triggerCallback : function (name) {
|
1237
|
-
$(window).trigger("wysiwyg-trigger-"+name, [
|
1238
|
-
this.getInternalRange(),
|
1239
|
-
this,
|
1240
|
-
this.getInternalSelection()
|
1241
|
-
]);
|
1242
|
-
$(".custom-command-"+name, this.panel).blur();
|
1243
|
-
this.focusEditor();
|
1244
|
-
},
|
1245
|
-
|
1246
|
-
appendMenu: function (cmd, args, className, fn, tooltip)
|
1247
|
-
{
|
1248
|
-
var self = this;
|
1249
|
-
args = args || [];
|
1250
|
-
|
1251
|
-
return $('<li role="menuitem" UNSELECTABLE="on">' + (className || cmd) + '</li>').addClass(className || cmd).attr('title', tooltip).hover(addHoverClass, removeHoverClass).click(function ()
|
1252
|
-
{
|
1253
|
-
if (fn)
|
1254
|
-
{
|
1255
|
-
fn.apply(self);
|
1256
|
-
}
|
1257
|
-
else
|
1258
|
-
{
|
1259
|
-
self.focus();
|
1260
|
-
self.withoutCss();
|
1261
|
-
self.editorDoc.execCommand(cmd, false, args);
|
1262
|
-
}
|
1263
|
-
if (self.options.autoSave)
|
1264
|
-
{
|
1265
|
-
self.saveContent();
|
1266
|
-
}
|
1267
|
-
this.blur();
|
1268
|
-
self.focusEditor();
|
1269
|
-
}).appendTo(this.panel);
|
1270
|
-
},
|
1271
|
-
|
1272
|
-
appendMenuSeparator: function ()
|
1273
|
-
{
|
1274
|
-
return $('<li role="separator" class="separator"></li>').appendTo(this.panel);
|
1275
|
-
},
|
1276
|
-
parseControls: function() {
|
1277
|
-
if(this.options.parseControls) {
|
1278
|
-
return this.options.parseControls.call(this);
|
1279
|
-
}
|
1280
|
-
return this.options.controls;
|
1281
|
-
},
|
1282
|
-
appendControls: function ()
|
1283
|
-
{
|
1284
|
-
var controls = this.parseControls();
|
1285
|
-
var currentGroupIndex = 0;
|
1286
|
-
var hasVisibleControls = true; // to prevent separator before first item
|
1287
|
-
for (var name in controls)
|
1288
|
-
{
|
1289
|
-
var control = controls[name];
|
1290
|
-
if (control.groupIndex && currentGroupIndex != control.groupIndex)
|
1291
|
-
{
|
1292
|
-
currentGroupIndex = control.groupIndex;
|
1293
|
-
hasVisibleControls = false;
|
1294
|
-
}
|
1295
|
-
if (!control.visible)
|
1296
|
-
{
|
1297
|
-
continue;
|
1298
|
-
}
|
1299
|
-
if (!hasVisibleControls)
|
1300
|
-
{
|
1301
|
-
this.appendMenuSeparator();
|
1302
|
-
hasVisibleControls = true;
|
1303
|
-
}
|
1304
|
-
|
1305
|
-
if(control.custom) {
|
1306
|
-
this.appendMenuCustom(name, control.options);
|
1307
|
-
}
|
1308
|
-
else {
|
1309
|
-
this.appendMenu(
|
1310
|
-
control.command || name,
|
1311
|
-
control['arguments'] || '',
|
1312
|
-
control.className || control.command || name || 'empty',
|
1313
|
-
control.exec,
|
1314
|
-
control.tooltip || control.command || name || ''
|
1315
|
-
);
|
1316
|
-
}
|
1317
|
-
}
|
1318
|
-
},
|
1319
|
-
|
1320
|
-
checkTargets: function (element)
|
1321
|
-
{
|
1322
|
-
for (var name in this.options.controls)
|
1323
|
-
{
|
1324
|
-
var control = this.options.controls[name];
|
1325
|
-
var className = control.className || control.command || name || 'empty';
|
1326
|
-
|
1327
|
-
$('.' + className, this.panel).removeClass('active');
|
1328
|
-
|
1329
|
-
if (control.tags || (control.options && control.options.tags))
|
1330
|
-
{
|
1331
|
-
var tags = control.tags || (control.options && control.options.tags);
|
1332
|
-
var elm = element;
|
1333
|
-
do
|
1334
|
-
{
|
1335
|
-
if (elm.nodeType != 1)
|
1336
|
-
{
|
1337
|
-
break;
|
1338
|
-
}
|
1339
|
-
|
1340
|
-
if ($.inArray(elm.tagName.toLowerCase(), tags) != -1)
|
1341
|
-
{
|
1342
|
-
$('.' + className, this.panel).addClass('active');
|
1343
|
-
}
|
1344
|
-
} while ((elm = elm.parentNode));
|
1345
|
-
}
|
1346
|
-
|
1347
|
-
if (control.css || (control.options && control.options.css))
|
1348
|
-
{
|
1349
|
-
var css = control.css || (control.options && control.options.css);
|
1350
|
-
var el = $(element);
|
1351
|
-
|
1352
|
-
do
|
1353
|
-
{
|
1354
|
-
if (el[0].nodeType != 1)
|
1355
|
-
{
|
1356
|
-
break;
|
1357
|
-
}
|
1358
|
-
|
1359
|
-
for (var cssProperty in css)
|
1360
|
-
{
|
1361
|
-
if (el.css(cssProperty).toString().toLowerCase() == css[cssProperty])
|
1362
|
-
{
|
1363
|
-
$('.' + className, this.panel).addClass('active');
|
1364
|
-
}
|
1365
|
-
}
|
1366
|
-
} while ((el = el.parent()));
|
1367
|
-
}
|
1368
|
-
}
|
1369
|
-
},
|
1370
|
-
|
1371
|
-
getElementByAttributeValue: function (tagName, attributeName, attributeValue)
|
1372
|
-
{
|
1373
|
-
var elements = this.editorDoc.getElementsByTagName(tagName);
|
1374
|
-
|
1375
|
-
for (var i = 0; i < elements.length; i++)
|
1376
|
-
{
|
1377
|
-
var value = elements[i].getAttribute(attributeName);
|
1378
|
-
|
1379
|
-
if ($.browser.msie)
|
1380
|
-
{ /** IE add full path, so I check by the last chars. */
|
1381
|
-
value = value.substr(value.length - attributeValue.length);
|
1382
|
-
}
|
1383
|
-
|
1384
|
-
if (value == attributeValue)
|
1385
|
-
{
|
1386
|
-
return elements[i];
|
1387
|
-
}
|
1388
|
-
}
|
1389
|
-
|
1390
|
-
return false;
|
1391
|
-
}
|
1392
|
-
});
|
1393
|
-
})(jQuery);
|