site_logic 1.9.4 → 1.9.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (658) hide show
  1. data/VERSION +1 -1
  2. data/app/controllers/pages_controller.rb +1 -1
  3. data/app/models/page.rb +19 -2
  4. data/app/models/site.rb +5 -0
  5. data/config/environments/test.rb +2 -27
  6. data/features/support/env.rb +38 -20
  7. data/lib/tasks/cucumber.rake +12 -0
  8. data/site_logic.gemspec +2 -649
  9. data/spec/controllers/pages_controller_spec.rb +1 -1
  10. data/spec/models/page_spec.rb +63 -22
  11. metadata +5 -651
  12. data/config/environments/development.rb +0 -27
  13. data/config/environments/production.rb +0 -49
  14. data/public/favicon.ico +0 -0
  15. data/public/javascripts/ckeditor/.htaccess +0 -24
  16. data/public/javascripts/ckeditor/CHANGES.html +0 -993
  17. data/public/javascripts/ckeditor/INSTALL.html +0 -92
  18. data/public/javascripts/ckeditor/LICENSE.html +0 -1334
  19. data/public/javascripts/ckeditor/_samples/ajax.html +0 -87
  20. data/public/javascripts/ckeditor/_samples/api.html +0 -152
  21. data/public/javascripts/ckeditor/_samples/api_dialog/my_dialog.js +0 -28
  22. data/public/javascripts/ckeditor/_samples/api_dialog.html +0 -188
  23. data/public/javascripts/ckeditor/_samples/asp/advanced.asp +0 -105
  24. data/public/javascripts/ckeditor/_samples/asp/events.asp +0 -136
  25. data/public/javascripts/ckeditor/_samples/asp/index.html +0 -103
  26. data/public/javascripts/ckeditor/_samples/asp/replace.asp +0 -72
  27. data/public/javascripts/ckeditor/_samples/asp/replaceall.asp +0 -77
  28. data/public/javascripts/ckeditor/_samples/asp/sample_posteddata.asp +0 -46
  29. data/public/javascripts/ckeditor/_samples/asp/standalone.asp +0 -72
  30. data/public/javascripts/ckeditor/_samples/assets/output_for_flash.fla +0 -0
  31. data/public/javascripts/ckeditor/_samples/assets/output_for_flash.swf +0 -0
  32. data/public/javascripts/ckeditor/_samples/assets/output_xhtml.css +0 -204
  33. data/public/javascripts/ckeditor/_samples/assets/swfobject.js +0 -18
  34. data/public/javascripts/ckeditor/_samples/autogrow.html +0 -75
  35. data/public/javascripts/ckeditor/_samples/divreplace.html +0 -137
  36. data/public/javascripts/ckeditor/_samples/enterkey.html +0 -88
  37. data/public/javascripts/ckeditor/_samples/fullpage.html +0 -62
  38. data/public/javascripts/ckeditor/_samples/index.html +0 -57
  39. data/public/javascripts/ckeditor/_samples/jqueryadapter.html +0 -73
  40. data/public/javascripts/ckeditor/_samples/output_for_flash.html +0 -257
  41. data/public/javascripts/ckeditor/_samples/output_html.html +0 -259
  42. data/public/javascripts/ckeditor/_samples/output_xhtml.html +0 -159
  43. data/public/javascripts/ckeditor/_samples/php/advanced.php +0 -93
  44. data/public/javascripts/ckeditor/_samples/php/events.php +0 -130
  45. data/public/javascripts/ckeditor/_samples/php/replace.php +0 -63
  46. data/public/javascripts/ckeditor/_samples/php/replaceall.php +0 -68
  47. data/public/javascripts/ckeditor/_samples/php/standalone.php +0 -64
  48. data/public/javascripts/ckeditor/_samples/replacebyclass.html +0 -49
  49. data/public/javascripts/ckeditor/_samples/replacebycode.html +0 -80
  50. data/public/javascripts/ckeditor/_samples/sample.css +0 -81
  51. data/public/javascripts/ckeditor/_samples/sample.js +0 -65
  52. data/public/javascripts/ckeditor/_samples/sample_posteddata.php +0 -59
  53. data/public/javascripts/ckeditor/_samples/sharedspaces.html +0 -131
  54. data/public/javascripts/ckeditor/_samples/skins.html +0 -83
  55. data/public/javascripts/ckeditor/_samples/ui_color.html +0 -87
  56. data/public/javascripts/ckeditor/_samples/ui_languages.html +0 -103
  57. data/public/javascripts/ckeditor/_source/adapters/jquery.js +0 -297
  58. data/public/javascripts/ckeditor/_source/core/_bootstrap.js +0 -96
  59. data/public/javascripts/ckeditor/_source/core/ajax.js +0 -142
  60. data/public/javascripts/ckeditor/_source/core/ckeditor.js +0 -133
  61. data/public/javascripts/ckeditor/_source/core/ckeditor_base.js +0 -196
  62. data/public/javascripts/ckeditor/_source/core/ckeditor_basic.js +0 -239
  63. data/public/javascripts/ckeditor/_source/core/command.js +0 -209
  64. data/public/javascripts/ckeditor/_source/core/commanddefinition.js +0 -129
  65. data/public/javascripts/ckeditor/_source/core/config.js +0 -430
  66. data/public/javascripts/ckeditor/_source/core/dataprocessor.js +0 -65
  67. data/public/javascripts/ckeditor/_source/core/dom/comment.js +0 -32
  68. data/public/javascripts/ckeditor/_source/core/dom/document.js +0 -224
  69. data/public/javascripts/ckeditor/_source/core/dom/documentfragment.js +0 -49
  70. data/public/javascripts/ckeditor/_source/core/dom/domobject.js +0 -255
  71. data/public/javascripts/ckeditor/_source/core/dom/element.js +0 -1564
  72. data/public/javascripts/ckeditor/_source/core/dom/elementpath.js +0 -119
  73. data/public/javascripts/ckeditor/_source/core/dom/event.js +0 -142
  74. data/public/javascripts/ckeditor/_source/core/dom/node.js +0 -683
  75. data/public/javascripts/ckeditor/_source/core/dom/nodelist.js +0 -26
  76. data/public/javascripts/ckeditor/_source/core/dom/range.js +0 -1883
  77. data/public/javascripts/ckeditor/_source/core/dom/rangelist.js +0 -214
  78. data/public/javascripts/ckeditor/_source/core/dom/text.js +0 -123
  79. data/public/javascripts/ckeditor/_source/core/dom/walker.js +0 -445
  80. data/public/javascripts/ckeditor/_source/core/dom/window.js +0 -96
  81. data/public/javascripts/ckeditor/_source/core/dom.js +0 -20
  82. data/public/javascripts/ckeditor/_source/core/dtd.js +0 -238
  83. data/public/javascripts/ckeditor/_source/core/editor.js +0 -924
  84. data/public/javascripts/ckeditor/_source/core/editor_basic.js +0 -182
  85. data/public/javascripts/ckeditor/_source/core/env.js +0 -270
  86. data/public/javascripts/ckeditor/_source/core/event.js +0 -342
  87. data/public/javascripts/ckeditor/_source/core/eventInfo.js +0 -120
  88. data/public/javascripts/ckeditor/_source/core/focusmanager.js +0 -152
  89. data/public/javascripts/ckeditor/_source/core/htmlparser/basicwriter.js +0 -145
  90. data/public/javascripts/ckeditor/_source/core/htmlparser/cdata.js +0 -43
  91. data/public/javascripts/ckeditor/_source/core/htmlparser/comment.js +0 -60
  92. data/public/javascripts/ckeditor/_source/core/htmlparser/element.js +0 -240
  93. data/public/javascripts/ckeditor/_source/core/htmlparser/filter.js +0 -288
  94. data/public/javascripts/ckeditor/_source/core/htmlparser/fragment.js +0 -504
  95. data/public/javascripts/ckeditor/_source/core/htmlparser/text.js +0 -55
  96. data/public/javascripts/ckeditor/_source/core/htmlparser.js +0 -224
  97. data/public/javascripts/ckeditor/_source/core/imagecacher.js +0 -80
  98. data/public/javascripts/ckeditor/_source/core/lang.js +0 -156
  99. data/public/javascripts/ckeditor/_source/core/loader.js +0 -243
  100. data/public/javascripts/ckeditor/_source/core/plugindefinition.js +0 -66
  101. data/public/javascripts/ckeditor/_source/core/plugins.js +0 -85
  102. data/public/javascripts/ckeditor/_source/core/resourcemanager.js +0 -238
  103. data/public/javascripts/ckeditor/_source/core/scriptloader.js +0 -200
  104. data/public/javascripts/ckeditor/_source/core/skins.js +0 -212
  105. data/public/javascripts/ckeditor/_source/core/themes.js +0 -19
  106. data/public/javascripts/ckeditor/_source/core/tools.js +0 -734
  107. data/public/javascripts/ckeditor/_source/core/ui.js +0 -116
  108. data/public/javascripts/ckeditor/_source/core/xml.js +0 -165
  109. data/public/javascripts/ckeditor/_source/lang/_languages.js +0 -83
  110. data/public/javascripts/ckeditor/_source/lang/_translationstatus.txt +0 -60
  111. data/public/javascripts/ckeditor/_source/lang/af.js +0 -758
  112. data/public/javascripts/ckeditor/_source/lang/ar.js +0 -758
  113. data/public/javascripts/ckeditor/_source/lang/bg.js +0 -758
  114. data/public/javascripts/ckeditor/_source/lang/bn.js +0 -758
  115. data/public/javascripts/ckeditor/_source/lang/bs.js +0 -758
  116. data/public/javascripts/ckeditor/_source/lang/ca.js +0 -758
  117. data/public/javascripts/ckeditor/_source/lang/cs.js +0 -758
  118. data/public/javascripts/ckeditor/_source/lang/cy.js +0 -758
  119. data/public/javascripts/ckeditor/_source/lang/da.js +0 -758
  120. data/public/javascripts/ckeditor/_source/lang/de.js +0 -758
  121. data/public/javascripts/ckeditor/_source/lang/el.js +0 -758
  122. data/public/javascripts/ckeditor/_source/lang/en-au.js +0 -758
  123. data/public/javascripts/ckeditor/_source/lang/en-ca.js +0 -758
  124. data/public/javascripts/ckeditor/_source/lang/en-gb.js +0 -758
  125. data/public/javascripts/ckeditor/_source/lang/en.js +0 -758
  126. data/public/javascripts/ckeditor/_source/lang/eo.js +0 -758
  127. data/public/javascripts/ckeditor/_source/lang/es.js +0 -758
  128. data/public/javascripts/ckeditor/_source/lang/et.js +0 -758
  129. data/public/javascripts/ckeditor/_source/lang/eu.js +0 -758
  130. data/public/javascripts/ckeditor/_source/lang/fa.js +0 -758
  131. data/public/javascripts/ckeditor/_source/lang/fi.js +0 -758
  132. data/public/javascripts/ckeditor/_source/lang/fo.js +0 -758
  133. data/public/javascripts/ckeditor/_source/lang/fr-ca.js +0 -758
  134. data/public/javascripts/ckeditor/_source/lang/fr.js +0 -758
  135. data/public/javascripts/ckeditor/_source/lang/gl.js +0 -758
  136. data/public/javascripts/ckeditor/_source/lang/gu.js +0 -758
  137. data/public/javascripts/ckeditor/_source/lang/he.js +0 -758
  138. data/public/javascripts/ckeditor/_source/lang/hi.js +0 -758
  139. data/public/javascripts/ckeditor/_source/lang/hr.js +0 -758
  140. data/public/javascripts/ckeditor/_source/lang/hu.js +0 -758
  141. data/public/javascripts/ckeditor/_source/lang/is.js +0 -758
  142. data/public/javascripts/ckeditor/_source/lang/it.js +0 -758
  143. data/public/javascripts/ckeditor/_source/lang/ja.js +0 -758
  144. data/public/javascripts/ckeditor/_source/lang/km.js +0 -758
  145. data/public/javascripts/ckeditor/_source/lang/ko.js +0 -758
  146. data/public/javascripts/ckeditor/_source/lang/lt.js +0 -758
  147. data/public/javascripts/ckeditor/_source/lang/lv.js +0 -758
  148. data/public/javascripts/ckeditor/_source/lang/mn.js +0 -758
  149. data/public/javascripts/ckeditor/_source/lang/ms.js +0 -758
  150. data/public/javascripts/ckeditor/_source/lang/nb.js +0 -758
  151. data/public/javascripts/ckeditor/_source/lang/nl.js +0 -758
  152. data/public/javascripts/ckeditor/_source/lang/no.js +0 -758
  153. data/public/javascripts/ckeditor/_source/lang/pl.js +0 -758
  154. data/public/javascripts/ckeditor/_source/lang/pt-br.js +0 -757
  155. data/public/javascripts/ckeditor/_source/lang/pt.js +0 -758
  156. data/public/javascripts/ckeditor/_source/lang/ro.js +0 -758
  157. data/public/javascripts/ckeditor/_source/lang/ru.js +0 -758
  158. data/public/javascripts/ckeditor/_source/lang/sk.js +0 -758
  159. data/public/javascripts/ckeditor/_source/lang/sl.js +0 -758
  160. data/public/javascripts/ckeditor/_source/lang/sr-latn.js +0 -758
  161. data/public/javascripts/ckeditor/_source/lang/sr.js +0 -758
  162. data/public/javascripts/ckeditor/_source/lang/sv.js +0 -758
  163. data/public/javascripts/ckeditor/_source/lang/th.js +0 -758
  164. data/public/javascripts/ckeditor/_source/lang/tr.js +0 -757
  165. data/public/javascripts/ckeditor/_source/lang/uk.js +0 -758
  166. data/public/javascripts/ckeditor/_source/lang/vi.js +0 -758
  167. data/public/javascripts/ckeditor/_source/lang/zh-cn.js +0 -758
  168. data/public/javascripts/ckeditor/_source/lang/zh.js +0 -758
  169. data/public/javascripts/ckeditor/_source/plugins/a11yhelp/dialogs/a11yhelp.js +0 -211
  170. data/public/javascripts/ckeditor/_source/plugins/a11yhelp/lang/en.js +0 -108
  171. data/public/javascripts/ckeditor/_source/plugins/a11yhelp/lang/he.js +0 -216
  172. data/public/javascripts/ckeditor/_source/plugins/a11yhelp/plugin.js +0 -46
  173. data/public/javascripts/ckeditor/_source/plugins/about/dialogs/about.js +0 -73
  174. data/public/javascripts/ckeditor/_source/plugins/about/dialogs/logo_ckeditor.png +0 -0
  175. data/public/javascripts/ckeditor/_source/plugins/about/plugin.js +0 -23
  176. data/public/javascripts/ckeditor/_source/plugins/ajax_save/plugin.js +0 -44
  177. data/public/javascripts/ckeditor/_source/plugins/attachment/dialogs/attachment.js +0 -384
  178. data/public/javascripts/ckeditor/_source/plugins/attachment/images/attachment.png +0 -0
  179. data/public/javascripts/ckeditor/_source/plugins/attachment/lang/en.js +0 -10
  180. data/public/javascripts/ckeditor/_source/plugins/attachment/lang/ru.js +0 -10
  181. data/public/javascripts/ckeditor/_source/plugins/attachment/lang/uk.js +0 -10
  182. data/public/javascripts/ckeditor/_source/plugins/attachment/plugin.js +0 -44
  183. data/public/javascripts/ckeditor/_source/plugins/autogrow/plugin.js +0 -86
  184. data/public/javascripts/ckeditor/_source/plugins/basicstyles/plugin.js +0 -101
  185. data/public/javascripts/ckeditor/_source/plugins/bidi/plugin.js +0 -259
  186. data/public/javascripts/ckeditor/_source/plugins/blockquote/plugin.js +0 -301
  187. data/public/javascripts/ckeditor/_source/plugins/button/plugin.js +0 -277
  188. data/public/javascripts/ckeditor/_source/plugins/clipboard/dialogs/paste.js +0 -205
  189. data/public/javascripts/ckeditor/_source/plugins/clipboard/plugin.js +0 -412
  190. data/public/javascripts/ckeditor/_source/plugins/colorbutton/plugin.js +0 -250
  191. data/public/javascripts/ckeditor/_source/plugins/colordialog/dialogs/colordialog.js +0 -336
  192. data/public/javascripts/ckeditor/_source/plugins/colordialog/plugin.js +0 -13
  193. data/public/javascripts/ckeditor/_source/plugins/contextmenu/plugin.js +0 -290
  194. data/public/javascripts/ckeditor/_source/plugins/dialog/dialogDefinition.js +0 -315
  195. data/public/javascripts/ckeditor/_source/plugins/dialog/plugin.js +0 -3015
  196. data/public/javascripts/ckeditor/_source/plugins/dialogadvtab/plugin.js +0 -213
  197. data/public/javascripts/ckeditor/_source/plugins/dialogui/plugin.js +0 -1523
  198. data/public/javascripts/ckeditor/_source/plugins/div/dialogs/div.js +0 -535
  199. data/public/javascripts/ckeditor/_source/plugins/div/plugin.js +0 -121
  200. data/public/javascripts/ckeditor/_source/plugins/domiterator/plugin.js +0 -356
  201. data/public/javascripts/ckeditor/_source/plugins/editingblock/plugin.js +0 -229
  202. data/public/javascripts/ckeditor/_source/plugins/elementspath/plugin.js +0 -206
  203. data/public/javascripts/ckeditor/_source/plugins/embed/dialogs/embed.js +0 -65
  204. data/public/javascripts/ckeditor/_source/plugins/embed/images/embed.png +0 -0
  205. data/public/javascripts/ckeditor/_source/plugins/embed/lang/en.js +0 -9
  206. data/public/javascripts/ckeditor/_source/plugins/embed/lang/ru.js +0 -9
  207. data/public/javascripts/ckeditor/_source/plugins/embed/lang/uk.js +0 -9
  208. data/public/javascripts/ckeditor/_source/plugins/embed/plugin.js +0 -44
  209. data/public/javascripts/ckeditor/_source/plugins/enterkey/plugin.js +0 -363
  210. data/public/javascripts/ckeditor/_source/plugins/entities/plugin.js +0 -226
  211. data/public/javascripts/ckeditor/_source/plugins/fakeobjects/plugin.js +0 -122
  212. data/public/javascripts/ckeditor/_source/plugins/filebrowser/plugin.js +0 -501
  213. data/public/javascripts/ckeditor/_source/plugins/find/dialogs/find.js +0 -890
  214. data/public/javascripts/ckeditor/_source/plugins/find/plugin.js +0 -46
  215. data/public/javascripts/ckeditor/_source/plugins/flash/dialogs/flash.js +0 -698
  216. data/public/javascripts/ckeditor/_source/plugins/flash/images/placeholder.png +0 -0
  217. data/public/javascripts/ckeditor/_source/plugins/flash/plugin.js +0 -168
  218. data/public/javascripts/ckeditor/_source/plugins/floatpanel/plugin.js +0 -402
  219. data/public/javascripts/ckeditor/_source/plugins/font/plugin.js +0 -234
  220. data/public/javascripts/ckeditor/_source/plugins/format/plugin.js +0 -194
  221. data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/button.js +0 -135
  222. data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/checkbox.js +0 -153
  223. data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/form.js +0 -177
  224. data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/hiddenfield.js +0 -98
  225. data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/radio.js +0 -135
  226. data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/select.js +0 -556
  227. data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/textarea.js +0 -114
  228. data/public/javascripts/ckeditor/_source/plugins/forms/dialogs/textfield.js +0 -199
  229. data/public/javascripts/ckeditor/_source/plugins/forms/images/hiddenfield.gif +0 -0
  230. data/public/javascripts/ckeditor/_source/plugins/forms/plugin.js +0 -284
  231. data/public/javascripts/ckeditor/_source/plugins/horizontalrule/plugin.js +0 -36
  232. data/public/javascripts/ckeditor/_source/plugins/htmldataprocessor/plugin.js +0 -502
  233. data/public/javascripts/ckeditor/_source/plugins/htmlwriter/plugin.js +0 -319
  234. data/public/javascripts/ckeditor/_source/plugins/iframedialog/plugin.js +0 -136
  235. data/public/javascripts/ckeditor/_source/plugins/image/dialogs/image.js +0 -1396
  236. data/public/javascripts/ckeditor/_source/plugins/image/plugin.js +0 -81
  237. data/public/javascripts/ckeditor/_source/plugins/indent/plugin.js +0 -455
  238. data/public/javascripts/ckeditor/_source/plugins/justify/plugin.js +0 -221
  239. data/public/javascripts/ckeditor/_source/plugins/keystrokes/plugin.js +0 -225
  240. data/public/javascripts/ckeditor/_source/plugins/link/dialogs/anchor.js +0 -99
  241. data/public/javascripts/ckeditor/_source/plugins/link/dialogs/link.js +0 -1424
  242. data/public/javascripts/ckeditor/_source/plugins/link/images/anchor.gif +0 -0
  243. data/public/javascripts/ckeditor/_source/plugins/link/plugin.js +0 -238
  244. data/public/javascripts/ckeditor/_source/plugins/list/plugin.js +0 -710
  245. data/public/javascripts/ckeditor/_source/plugins/listblock/plugin.js +0 -257
  246. data/public/javascripts/ckeditor/_source/plugins/liststyle/dialogs/liststyle.js +0 -204
  247. data/public/javascripts/ckeditor/_source/plugins/liststyle/plugin.js +0 -66
  248. data/public/javascripts/ckeditor/_source/plugins/maximize/plugin.js +0 -350
  249. data/public/javascripts/ckeditor/_source/plugins/menu/plugin.js +0 -408
  250. data/public/javascripts/ckeditor/_source/plugins/menubutton/plugin.js +0 -94
  251. data/public/javascripts/ckeditor/_source/plugins/newpage/plugin.js +0 -53
  252. data/public/javascripts/ckeditor/_source/plugins/pagebreak/images/pagebreak.gif +0 -0
  253. data/public/javascripts/ckeditor/_source/plugins/pagebreak/plugin.js +0 -121
  254. data/public/javascripts/ckeditor/_source/plugins/panel/plugin.js +0 -399
  255. data/public/javascripts/ckeditor/_source/plugins/panelbutton/plugin.js +0 -147
  256. data/public/javascripts/ckeditor/_source/plugins/pastefromword/filter/default.js +0 -1170
  257. data/public/javascripts/ckeditor/_source/plugins/pastefromword/plugin.js +0 -122
  258. data/public/javascripts/ckeditor/_source/plugins/pastetext/dialogs/pastetext.js +0 -70
  259. data/public/javascripts/ckeditor/_source/plugins/pastetext/plugin.js +0 -145
  260. data/public/javascripts/ckeditor/_source/plugins/popup/plugin.js +0 -64
  261. data/public/javascripts/ckeditor/_source/plugins/preview/plugin.js +0 -108
  262. data/public/javascripts/ckeditor/_source/plugins/print/plugin.js +0 -41
  263. data/public/javascripts/ckeditor/_source/plugins/removeformat/plugin.js +0 -184
  264. data/public/javascripts/ckeditor/_source/plugins/resize/plugin.js +0 -157
  265. data/public/javascripts/ckeditor/_source/plugins/richcombo/plugin.js +0 -370
  266. data/public/javascripts/ckeditor/_source/plugins/save/plugin.js +0 -55
  267. data/public/javascripts/ckeditor/_source/plugins/scayt/dialogs/options.js +0 -534
  268. data/public/javascripts/ckeditor/_source/plugins/scayt/dialogs/toolbar.css +0 -71
  269. data/public/javascripts/ckeditor/_source/plugins/scayt/plugin.js +0 -945
  270. data/public/javascripts/ckeditor/_source/plugins/selection/plugin.js +0 -1375
  271. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_address.png +0 -0
  272. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_blockquote.png +0 -0
  273. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_div.png +0 -0
  274. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_h1.png +0 -0
  275. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_h2.png +0 -0
  276. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_h3.png +0 -0
  277. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_h4.png +0 -0
  278. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_h5.png +0 -0
  279. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_h6.png +0 -0
  280. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_p.png +0 -0
  281. data/public/javascripts/ckeditor/_source/plugins/showblocks/images/block_pre.png +0 -0
  282. data/public/javascripts/ckeditor/_source/plugins/showblocks/plugin.js +0 -155
  283. data/public/javascripts/ckeditor/_source/plugins/showborders/plugin.js +0 -201
  284. data/public/javascripts/ckeditor/_source/plugins/smiley/dialogs/smiley.js +0 -218
  285. data/public/javascripts/ckeditor/_source/plugins/smiley/images/angel_smile.gif +0 -0
  286. data/public/javascripts/ckeditor/_source/plugins/smiley/images/angry_smile.gif +0 -0
  287. data/public/javascripts/ckeditor/_source/plugins/smiley/images/broken_heart.gif +0 -0
  288. data/public/javascripts/ckeditor/_source/plugins/smiley/images/confused_smile.gif +0 -0
  289. data/public/javascripts/ckeditor/_source/plugins/smiley/images/cry_smile.gif +0 -0
  290. data/public/javascripts/ckeditor/_source/plugins/smiley/images/devil_smile.gif +0 -0
  291. data/public/javascripts/ckeditor/_source/plugins/smiley/images/embaressed_smile.gif +0 -0
  292. data/public/javascripts/ckeditor/_source/plugins/smiley/images/envelope.gif +0 -0
  293. data/public/javascripts/ckeditor/_source/plugins/smiley/images/heart.gif +0 -0
  294. data/public/javascripts/ckeditor/_source/plugins/smiley/images/kiss.gif +0 -0
  295. data/public/javascripts/ckeditor/_source/plugins/smiley/images/lightbulb.gif +0 -0
  296. data/public/javascripts/ckeditor/_source/plugins/smiley/images/omg_smile.gif +0 -0
  297. data/public/javascripts/ckeditor/_source/plugins/smiley/images/regular_smile.gif +0 -0
  298. data/public/javascripts/ckeditor/_source/plugins/smiley/images/sad_smile.gif +0 -0
  299. data/public/javascripts/ckeditor/_source/plugins/smiley/images/shades_smile.gif +0 -0
  300. data/public/javascripts/ckeditor/_source/plugins/smiley/images/teeth_smile.gif +0 -0
  301. data/public/javascripts/ckeditor/_source/plugins/smiley/images/thumbs_down.gif +0 -0
  302. data/public/javascripts/ckeditor/_source/plugins/smiley/images/thumbs_up.gif +0 -0
  303. data/public/javascripts/ckeditor/_source/plugins/smiley/images/tounge_smile.gif +0 -0
  304. data/public/javascripts/ckeditor/_source/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
  305. data/public/javascripts/ckeditor/_source/plugins/smiley/images/wink_smile.gif +0 -0
  306. data/public/javascripts/ckeditor/_source/plugins/smiley/plugin.js +0 -94
  307. data/public/javascripts/ckeditor/_source/plugins/sourcearea/plugin.js +0 -207
  308. data/public/javascripts/ckeditor/_source/plugins/specialchar/dialogs/specialchar.js +0 -409
  309. data/public/javascripts/ckeditor/_source/plugins/specialchar/plugin.js +0 -29
  310. data/public/javascripts/ckeditor/_source/plugins/styles/plugin.js +0 -1479
  311. data/public/javascripts/ckeditor/_source/plugins/styles/styles/default.js +0 -88
  312. data/public/javascripts/ckeditor/_source/plugins/stylescombo/plugin.js +0 -206
  313. data/public/javascripts/ckeditor/_source/plugins/tab/plugin.js +0 -367
  314. data/public/javascripts/ckeditor/_source/plugins/table/dialogs/table.js +0 -672
  315. data/public/javascripts/ckeditor/_source/plugins/table/plugin.js +0 -78
  316. data/public/javascripts/ckeditor/_source/plugins/tableresize/plugin.js +0 -450
  317. data/public/javascripts/ckeditor/_source/plugins/tabletools/dialogs/tableCell.js +0 -533
  318. data/public/javascripts/ckeditor/_source/plugins/tabletools/plugin.js +0 -1120
  319. data/public/javascripts/ckeditor/_source/plugins/templates/dialogs/templates.js +0 -233
  320. data/public/javascripts/ckeditor/_source/plugins/templates/plugin.js +0 -99
  321. data/public/javascripts/ckeditor/_source/plugins/templates/templates/default.js +0 -94
  322. data/public/javascripts/ckeditor/_source/plugins/templates/templates/images/template1.gif +0 -0
  323. data/public/javascripts/ckeditor/_source/plugins/templates/templates/images/template2.gif +0 -0
  324. data/public/javascripts/ckeditor/_source/plugins/templates/templates/images/template3.gif +0 -0
  325. data/public/javascripts/ckeditor/_source/plugins/toolbar/plugin.js +0 -481
  326. data/public/javascripts/ckeditor/_source/plugins/uicolor/dialogs/uicolor.js +0 -205
  327. data/public/javascripts/ckeditor/_source/plugins/uicolor/lang/en.js +0 -15
  328. data/public/javascripts/ckeditor/_source/plugins/uicolor/lang/he.js +0 -15
  329. data/public/javascripts/ckeditor/_source/plugins/uicolor/plugin.js +0 -37
  330. data/public/javascripts/ckeditor/_source/plugins/uicolor/uicolor.gif +0 -0
  331. data/public/javascripts/ckeditor/_source/plugins/uicolor/yui/assets/hue_bg.png +0 -0
  332. data/public/javascripts/ckeditor/_source/plugins/uicolor/yui/assets/hue_thumb.png +0 -0
  333. data/public/javascripts/ckeditor/_source/plugins/uicolor/yui/assets/picker_mask.png +0 -0
  334. data/public/javascripts/ckeditor/_source/plugins/uicolor/yui/assets/picker_thumb.png +0 -0
  335. data/public/javascripts/ckeditor/_source/plugins/uicolor/yui/assets/yui.css +0 -15
  336. data/public/javascripts/ckeditor/_source/plugins/uicolor/yui/yui.js +0 -71
  337. data/public/javascripts/ckeditor/_source/plugins/undo/plugin.js +0 -554
  338. data/public/javascripts/ckeditor/_source/plugins/wsc/dialogs/ciframe.html +0 -49
  339. data/public/javascripts/ckeditor/_source/plugins/wsc/dialogs/tmpFrameset.html +0 -52
  340. data/public/javascripts/ckeditor/_source/plugins/wsc/dialogs/wsc.css +0 -82
  341. data/public/javascripts/ckeditor/_source/plugins/wsc/dialogs/wsc.js +0 -176
  342. data/public/javascripts/ckeditor/_source/plugins/wsc/plugin.js +0 -33
  343. data/public/javascripts/ckeditor/_source/plugins/wysiwygarea/plugin.js +0 -1146
  344. data/public/javascripts/ckeditor/_source/skins/kama/dialog.css +0 -882
  345. data/public/javascripts/ckeditor/_source/skins/kama/editor.css +0 -25
  346. data/public/javascripts/ckeditor/_source/skins/kama/elementspath.css +0 -73
  347. data/public/javascripts/ckeditor/_source/skins/kama/icons.css +0 -357
  348. data/public/javascripts/ckeditor/_source/skins/kama/icons.png +0 -0
  349. data/public/javascripts/ckeditor/_source/skins/kama/icons_rtl.png +0 -0
  350. data/public/javascripts/ckeditor/_source/skins/kama/images/dialog_sides.gif +0 -0
  351. data/public/javascripts/ckeditor/_source/skins/kama/images/dialog_sides.png +0 -0
  352. data/public/javascripts/ckeditor/_source/skins/kama/images/dialog_sides_rtl.png +0 -0
  353. data/public/javascripts/ckeditor/_source/skins/kama/images/mini.gif +0 -0
  354. data/public/javascripts/ckeditor/_source/skins/kama/images/noimage.png +0 -0
  355. data/public/javascripts/ckeditor/_source/skins/kama/images/sprites.png +0 -0
  356. data/public/javascripts/ckeditor/_source/skins/kama/images/sprites_ie6.png +0 -0
  357. data/public/javascripts/ckeditor/_source/skins/kama/images/toolbar_start.gif +0 -0
  358. data/public/javascripts/ckeditor/_source/skins/kama/mainui.css +0 -195
  359. data/public/javascripts/ckeditor/_source/skins/kama/menu.css +0 -216
  360. data/public/javascripts/ckeditor/_source/skins/kama/panel.css +0 -217
  361. data/public/javascripts/ckeditor/_source/skins/kama/presets.css +0 -49
  362. data/public/javascripts/ckeditor/_source/skins/kama/reset.css +0 -84
  363. data/public/javascripts/ckeditor/_source/skins/kama/richcombo.css +0 -277
  364. data/public/javascripts/ckeditor/_source/skins/kama/skin.js +0 -268
  365. data/public/javascripts/ckeditor/_source/skins/kama/templates.css +0 -88
  366. data/public/javascripts/ckeditor/_source/skins/kama/toolbar.css +0 -409
  367. data/public/javascripts/ckeditor/_source/skins/office2003/dialog.css +0 -785
  368. data/public/javascripts/ckeditor/_source/skins/office2003/editor.css +0 -25
  369. data/public/javascripts/ckeditor/_source/skins/office2003/elementspath.css +0 -74
  370. data/public/javascripts/ckeditor/_source/skins/office2003/icons.css +0 -354
  371. data/public/javascripts/ckeditor/_source/skins/office2003/icons.png +0 -0
  372. data/public/javascripts/ckeditor/_source/skins/office2003/icons_rtl.png +0 -0
  373. data/public/javascripts/ckeditor/_source/skins/office2003/images/dialog_sides.gif +0 -0
  374. data/public/javascripts/ckeditor/_source/skins/office2003/images/dialog_sides.png +0 -0
  375. data/public/javascripts/ckeditor/_source/skins/office2003/images/dialog_sides_rtl.png +0 -0
  376. data/public/javascripts/ckeditor/_source/skins/office2003/images/mini.gif +0 -0
  377. data/public/javascripts/ckeditor/_source/skins/office2003/images/noimage.png +0 -0
  378. data/public/javascripts/ckeditor/_source/skins/office2003/images/sprites.png +0 -0
  379. data/public/javascripts/ckeditor/_source/skins/office2003/images/sprites_ie6.png +0 -0
  380. data/public/javascripts/ckeditor/_source/skins/office2003/mainui.css +0 -145
  381. data/public/javascripts/ckeditor/_source/skins/office2003/menu.css +0 -213
  382. data/public/javascripts/ckeditor/_source/skins/office2003/panel.css +0 -212
  383. data/public/javascripts/ckeditor/_source/skins/office2003/presets.css +0 -49
  384. data/public/javascripts/ckeditor/_source/skins/office2003/reset.css +0 -84
  385. data/public/javascripts/ckeditor/_source/skins/office2003/richcombo.css +0 -297
  386. data/public/javascripts/ckeditor/_source/skins/office2003/skin.js +0 -81
  387. data/public/javascripts/ckeditor/_source/skins/office2003/templates.css +0 -87
  388. data/public/javascripts/ckeditor/_source/skins/office2003/toolbar.css +0 -470
  389. data/public/javascripts/ckeditor/_source/skins/v2/dialog.css +0 -800
  390. data/public/javascripts/ckeditor/_source/skins/v2/editor.css +0 -25
  391. data/public/javascripts/ckeditor/_source/skins/v2/elementspath.css +0 -74
  392. data/public/javascripts/ckeditor/_source/skins/v2/icons.css +0 -354
  393. data/public/javascripts/ckeditor/_source/skins/v2/icons.png +0 -0
  394. data/public/javascripts/ckeditor/_source/skins/v2/icons_rtl.png +0 -0
  395. data/public/javascripts/ckeditor/_source/skins/v2/images/dialog_sides.gif +0 -0
  396. data/public/javascripts/ckeditor/_source/skins/v2/images/dialog_sides.png +0 -0
  397. data/public/javascripts/ckeditor/_source/skins/v2/images/dialog_sides_rtl.png +0 -0
  398. data/public/javascripts/ckeditor/_source/skins/v2/images/mini.gif +0 -0
  399. data/public/javascripts/ckeditor/_source/skins/v2/images/noimage.png +0 -0
  400. data/public/javascripts/ckeditor/_source/skins/v2/images/sprites.png +0 -0
  401. data/public/javascripts/ckeditor/_source/skins/v2/images/sprites_ie6.png +0 -0
  402. data/public/javascripts/ckeditor/_source/skins/v2/images/toolbar_start.gif +0 -0
  403. data/public/javascripts/ckeditor/_source/skins/v2/mainui.css +0 -154
  404. data/public/javascripts/ckeditor/_source/skins/v2/menu.css +0 -215
  405. data/public/javascripts/ckeditor/_source/skins/v2/panel.css +0 -212
  406. data/public/javascripts/ckeditor/_source/skins/v2/presets.css +0 -50
  407. data/public/javascripts/ckeditor/_source/skins/v2/reset.css +0 -84
  408. data/public/javascripts/ckeditor/_source/skins/v2/richcombo.css +0 -297
  409. data/public/javascripts/ckeditor/_source/skins/v2/skin.js +0 -77
  410. data/public/javascripts/ckeditor/_source/skins/v2/templates.css +0 -87
  411. data/public/javascripts/ckeditor/_source/skins/v2/toolbar.css +0 -423
  412. data/public/javascripts/ckeditor/_source/themes/default/theme.js +0 -361
  413. data/public/javascripts/ckeditor/adapters/jquery.js +0 -6
  414. data/public/javascripts/ckeditor/ckeditor.js +0 -137
  415. data/public/javascripts/ckeditor/ckeditor.pack +0 -211
  416. data/public/javascripts/ckeditor/ckeditor_basic.js +0 -8
  417. data/public/javascripts/ckeditor/ckeditor_basic_source.js +0 -20
  418. data/public/javascripts/ckeditor/ckeditor_source.js +0 -25
  419. data/public/javascripts/ckeditor/config.js +0 -43
  420. data/public/javascripts/ckeditor/contents.css +0 -39
  421. data/public/javascripts/ckeditor/css/ckfinder.css +0 -299
  422. data/public/javascripts/ckeditor/css/fck_dialog.css +0 -119
  423. data/public/javascripts/ckeditor/css/fck_editor.css +0 -448
  424. data/public/javascripts/ckeditor/css/swfupload.css +0 -94
  425. data/public/javascripts/ckeditor/images/add.gif +0 -0
  426. data/public/javascripts/ckeditor/images/cancelbutton.gif +0 -0
  427. data/public/javascripts/ckeditor/images/ckfnothumb.gif +0 -0
  428. data/public/javascripts/ckeditor/images/doc.gif +0 -0
  429. data/public/javascripts/ckeditor/images/mp3.gif +0 -0
  430. data/public/javascripts/ckeditor/images/pdf.gif +0 -0
  431. data/public/javascripts/ckeditor/images/rar.gif +0 -0
  432. data/public/javascripts/ckeditor/images/refresh.gif +0 -0
  433. data/public/javascripts/ckeditor/images/select_files.png +0 -0
  434. data/public/javascripts/ckeditor/images/spacer.gif +0 -0
  435. data/public/javascripts/ckeditor/images/swf.gif +0 -0
  436. data/public/javascripts/ckeditor/images/toolbar.start.gif +0 -0
  437. data/public/javascripts/ckeditor/images/xls.gif +0 -0
  438. data/public/javascripts/ckeditor/lang/_languages.js +0 -6
  439. data/public/javascripts/ckeditor/lang/_translationstatus.txt +0 -60
  440. data/public/javascripts/ckeditor/lang/af.js +0 -6
  441. data/public/javascripts/ckeditor/lang/ar.js +0 -6
  442. data/public/javascripts/ckeditor/lang/bg.js +0 -6
  443. data/public/javascripts/ckeditor/lang/bn.js +0 -6
  444. data/public/javascripts/ckeditor/lang/bs.js +0 -6
  445. data/public/javascripts/ckeditor/lang/ca.js +0 -6
  446. data/public/javascripts/ckeditor/lang/cs.js +0 -6
  447. data/public/javascripts/ckeditor/lang/cy.js +0 -6
  448. data/public/javascripts/ckeditor/lang/da.js +0 -6
  449. data/public/javascripts/ckeditor/lang/de.js +0 -6
  450. data/public/javascripts/ckeditor/lang/el.js +0 -6
  451. data/public/javascripts/ckeditor/lang/en-au.js +0 -6
  452. data/public/javascripts/ckeditor/lang/en-ca.js +0 -6
  453. data/public/javascripts/ckeditor/lang/en-gb.js +0 -6
  454. data/public/javascripts/ckeditor/lang/en.js +0 -6
  455. data/public/javascripts/ckeditor/lang/eo.js +0 -6
  456. data/public/javascripts/ckeditor/lang/es.js +0 -6
  457. data/public/javascripts/ckeditor/lang/et.js +0 -6
  458. data/public/javascripts/ckeditor/lang/eu.js +0 -6
  459. data/public/javascripts/ckeditor/lang/fa.js +0 -6
  460. data/public/javascripts/ckeditor/lang/fi.js +0 -6
  461. data/public/javascripts/ckeditor/lang/fo.js +0 -6
  462. data/public/javascripts/ckeditor/lang/fr-ca.js +0 -6
  463. data/public/javascripts/ckeditor/lang/fr.js +0 -6
  464. data/public/javascripts/ckeditor/lang/gl.js +0 -6
  465. data/public/javascripts/ckeditor/lang/gu.js +0 -6
  466. data/public/javascripts/ckeditor/lang/he.js +0 -6
  467. data/public/javascripts/ckeditor/lang/hi.js +0 -6
  468. data/public/javascripts/ckeditor/lang/hr.js +0 -6
  469. data/public/javascripts/ckeditor/lang/hu.js +0 -6
  470. data/public/javascripts/ckeditor/lang/is.js +0 -6
  471. data/public/javascripts/ckeditor/lang/it.js +0 -6
  472. data/public/javascripts/ckeditor/lang/ja.js +0 -6
  473. data/public/javascripts/ckeditor/lang/km.js +0 -6
  474. data/public/javascripts/ckeditor/lang/ko.js +0 -6
  475. data/public/javascripts/ckeditor/lang/lt.js +0 -6
  476. data/public/javascripts/ckeditor/lang/lv.js +0 -6
  477. data/public/javascripts/ckeditor/lang/mn.js +0 -6
  478. data/public/javascripts/ckeditor/lang/ms.js +0 -6
  479. data/public/javascripts/ckeditor/lang/nb.js +0 -6
  480. data/public/javascripts/ckeditor/lang/nl.js +0 -6
  481. data/public/javascripts/ckeditor/lang/no.js +0 -6
  482. data/public/javascripts/ckeditor/lang/pl.js +0 -6
  483. data/public/javascripts/ckeditor/lang/pt-br.js +0 -6
  484. data/public/javascripts/ckeditor/lang/pt.js +0 -6
  485. data/public/javascripts/ckeditor/lang/ro.js +0 -6
  486. data/public/javascripts/ckeditor/lang/ru.js +0 -6
  487. data/public/javascripts/ckeditor/lang/sk.js +0 -6
  488. data/public/javascripts/ckeditor/lang/sl.js +0 -6
  489. data/public/javascripts/ckeditor/lang/sr-latn.js +0 -6
  490. data/public/javascripts/ckeditor/lang/sr.js +0 -6
  491. data/public/javascripts/ckeditor/lang/sv.js +0 -6
  492. data/public/javascripts/ckeditor/lang/th.js +0 -6
  493. data/public/javascripts/ckeditor/lang/tr.js +0 -6
  494. data/public/javascripts/ckeditor/lang/uk.js +0 -6
  495. data/public/javascripts/ckeditor/lang/vi.js +0 -6
  496. data/public/javascripts/ckeditor/lang/zh-cn.js +0 -6
  497. data/public/javascripts/ckeditor/lang/zh.js +0 -6
  498. data/public/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +0 -7
  499. data/public/javascripts/ckeditor/plugins/a11yhelp/lang/en.js +0 -6
  500. data/public/javascripts/ckeditor/plugins/a11yhelp/lang/he.js +0 -6
  501. data/public/javascripts/ckeditor/plugins/about/dialogs/about.js +0 -6
  502. data/public/javascripts/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
  503. data/public/javascripts/ckeditor/plugins/ajax_save/plugin.js +0 -1
  504. data/public/javascripts/ckeditor/plugins/attachment/dialogs/attachment.js +0 -1
  505. data/public/javascripts/ckeditor/plugins/attachment/images/attachment.png +0 -0
  506. data/public/javascripts/ckeditor/plugins/attachment/lang/en.js +0 -10
  507. data/public/javascripts/ckeditor/plugins/attachment/lang/ru.js +0 -10
  508. data/public/javascripts/ckeditor/plugins/attachment/lang/uk.js +0 -10
  509. data/public/javascripts/ckeditor/plugins/attachment/plugin.js +0 -1
  510. data/public/javascripts/ckeditor/plugins/autogrow/plugin.js +0 -6
  511. data/public/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +0 -7
  512. data/public/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +0 -7
  513. data/public/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +0 -4
  514. data/public/javascripts/ckeditor/plugins/div/dialogs/div.js +0 -8
  515. data/public/javascripts/ckeditor/plugins/embed/dialogs/embed.js +0 -1
  516. data/public/javascripts/ckeditor/plugins/embed/images/embed.png +0 -0
  517. data/public/javascripts/ckeditor/plugins/embed/lang/en.js +0 -9
  518. data/public/javascripts/ckeditor/plugins/embed/lang/ru.js +0 -9
  519. data/public/javascripts/ckeditor/plugins/embed/lang/uk.js +0 -9
  520. data/public/javascripts/ckeditor/plugins/embed/plugin.js +0 -1
  521. data/public/javascripts/ckeditor/plugins/find/dialogs/find.js +0 -9
  522. data/public/javascripts/ckeditor/plugins/flash/dialogs/flash.js +0 -9
  523. data/public/javascripts/ckeditor/plugins/flash/images/placeholder.png +0 -0
  524. data/public/javascripts/ckeditor/plugins/forms/dialogs/button.js +0 -6
  525. data/public/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +0 -6
  526. data/public/javascripts/ckeditor/plugins/forms/dialogs/form.js +0 -6
  527. data/public/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +0 -6
  528. data/public/javascripts/ckeditor/plugins/forms/dialogs/radio.js +0 -6
  529. data/public/javascripts/ckeditor/plugins/forms/dialogs/select.js +0 -9
  530. data/public/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +0 -6
  531. data/public/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +0 -7
  532. data/public/javascripts/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
  533. data/public/javascripts/ckeditor/plugins/iframedialog/plugin.js +0 -6
  534. data/public/javascripts/ckeditor/plugins/image/dialogs/image.js +0 -13
  535. data/public/javascripts/ckeditor/plugins/link/dialogs/anchor.js +0 -6
  536. data/public/javascripts/ckeditor/plugins/link/dialogs/link.js +0 -11
  537. data/public/javascripts/ckeditor/plugins/link/images/anchor.gif +0 -0
  538. data/public/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +0 -6
  539. data/public/javascripts/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
  540. data/public/javascripts/ckeditor/plugins/pastefromword/filter/default.js +0 -10
  541. data/public/javascripts/ckeditor/plugins/pastetext/dialogs/pastetext.js +0 -6
  542. data/public/javascripts/ckeditor/plugins/scayt/dialogs/options.js +0 -8
  543. data/public/javascripts/ckeditor/plugins/scayt/dialogs/toolbar.css +0 -6
  544. data/public/javascripts/ckeditor/plugins/showblocks/images/block_address.png +0 -0
  545. data/public/javascripts/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
  546. data/public/javascripts/ckeditor/plugins/showblocks/images/block_div.png +0 -0
  547. data/public/javascripts/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
  548. data/public/javascripts/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
  549. data/public/javascripts/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
  550. data/public/javascripts/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
  551. data/public/javascripts/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
  552. data/public/javascripts/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
  553. data/public/javascripts/ckeditor/plugins/showblocks/images/block_p.png +0 -0
  554. data/public/javascripts/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
  555. data/public/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +0 -7
  556. data/public/javascripts/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
  557. data/public/javascripts/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
  558. data/public/javascripts/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
  559. data/public/javascripts/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
  560. data/public/javascripts/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
  561. data/public/javascripts/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
  562. data/public/javascripts/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
  563. data/public/javascripts/ckeditor/plugins/smiley/images/envelope.gif +0 -0
  564. data/public/javascripts/ckeditor/plugins/smiley/images/heart.gif +0 -0
  565. data/public/javascripts/ckeditor/plugins/smiley/images/kiss.gif +0 -0
  566. data/public/javascripts/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
  567. data/public/javascripts/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
  568. data/public/javascripts/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
  569. data/public/javascripts/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
  570. data/public/javascripts/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
  571. data/public/javascripts/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
  572. data/public/javascripts/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
  573. data/public/javascripts/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
  574. data/public/javascripts/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
  575. data/public/javascripts/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
  576. data/public/javascripts/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
  577. data/public/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +0 -7
  578. data/public/javascripts/ckeditor/plugins/styles/styles/default.js +0 -6
  579. data/public/javascripts/ckeditor/plugins/table/dialogs/table.js +0 -9
  580. data/public/javascripts/ckeditor/plugins/tableresize/plugin.js +0 -7
  581. data/public/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +0 -8
  582. data/public/javascripts/ckeditor/plugins/templates/dialogs/templates.js +0 -7
  583. data/public/javascripts/ckeditor/plugins/templates/templates/default.js +0 -6
  584. data/public/javascripts/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
  585. data/public/javascripts/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
  586. data/public/javascripts/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
  587. data/public/javascripts/ckeditor/plugins/uicolor/dialogs/uicolor.js +0 -7
  588. data/public/javascripts/ckeditor/plugins/uicolor/lang/en.js +0 -6
  589. data/public/javascripts/ckeditor/plugins/uicolor/lang/he.js +0 -6
  590. data/public/javascripts/ckeditor/plugins/uicolor/plugin.js +0 -6
  591. data/public/javascripts/ckeditor/plugins/uicolor/uicolor.gif +0 -0
  592. data/public/javascripts/ckeditor/plugins/uicolor/yui/assets/hue_bg.png +0 -0
  593. data/public/javascripts/ckeditor/plugins/uicolor/yui/assets/hue_thumb.png +0 -0
  594. data/public/javascripts/ckeditor/plugins/uicolor/yui/assets/picker_mask.png +0 -0
  595. data/public/javascripts/ckeditor/plugins/uicolor/yui/assets/picker_thumb.png +0 -0
  596. data/public/javascripts/ckeditor/plugins/uicolor/yui/assets/yui.css +0 -6
  597. data/public/javascripts/ckeditor/plugins/uicolor/yui/yui.js +0 -76
  598. data/public/javascripts/ckeditor/plugins/wsc/dialogs/ciframe.html +0 -49
  599. data/public/javascripts/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +0 -52
  600. data/public/javascripts/ckeditor/plugins/wsc/dialogs/wsc.css +0 -6
  601. data/public/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +0 -7
  602. data/public/javascripts/ckeditor/skins/kama/dialog.css +0 -9
  603. data/public/javascripts/ckeditor/skins/kama/editor.css +0 -12
  604. data/public/javascripts/ckeditor/skins/kama/icons.png +0 -0
  605. data/public/javascripts/ckeditor/skins/kama/icons_rtl.png +0 -0
  606. data/public/javascripts/ckeditor/skins/kama/images/dialog_sides.gif +0 -0
  607. data/public/javascripts/ckeditor/skins/kama/images/dialog_sides.png +0 -0
  608. data/public/javascripts/ckeditor/skins/kama/images/dialog_sides_rtl.png +0 -0
  609. data/public/javascripts/ckeditor/skins/kama/images/mini.gif +0 -0
  610. data/public/javascripts/ckeditor/skins/kama/images/noimage.png +0 -0
  611. data/public/javascripts/ckeditor/skins/kama/images/sprites.png +0 -0
  612. data/public/javascripts/ckeditor/skins/kama/images/sprites_ie6.png +0 -0
  613. data/public/javascripts/ckeditor/skins/kama/images/toolbar_start.gif +0 -0
  614. data/public/javascripts/ckeditor/skins/kama/skin.js +0 -7
  615. data/public/javascripts/ckeditor/skins/kama/templates.css +0 -6
  616. data/public/javascripts/ckeditor/skins/office2003/dialog.css +0 -9
  617. data/public/javascripts/ckeditor/skins/office2003/editor.css +0 -13
  618. data/public/javascripts/ckeditor/skins/office2003/icons.png +0 -0
  619. data/public/javascripts/ckeditor/skins/office2003/icons_rtl.png +0 -0
  620. data/public/javascripts/ckeditor/skins/office2003/images/dialog_sides.gif +0 -0
  621. data/public/javascripts/ckeditor/skins/office2003/images/dialog_sides.png +0 -0
  622. data/public/javascripts/ckeditor/skins/office2003/images/dialog_sides_rtl.png +0 -0
  623. data/public/javascripts/ckeditor/skins/office2003/images/mini.gif +0 -0
  624. data/public/javascripts/ckeditor/skins/office2003/images/noimage.png +0 -0
  625. data/public/javascripts/ckeditor/skins/office2003/images/sprites.png +0 -0
  626. data/public/javascripts/ckeditor/skins/office2003/images/sprites_ie6.png +0 -0
  627. data/public/javascripts/ckeditor/skins/office2003/skin.js +0 -6
  628. data/public/javascripts/ckeditor/skins/office2003/templates.css +0 -6
  629. data/public/javascripts/ckeditor/skins/v2/dialog.css +0 -9
  630. data/public/javascripts/ckeditor/skins/v2/editor.css +0 -12
  631. data/public/javascripts/ckeditor/skins/v2/icons.png +0 -0
  632. data/public/javascripts/ckeditor/skins/v2/icons_rtl.png +0 -0
  633. data/public/javascripts/ckeditor/skins/v2/images/dialog_sides.gif +0 -0
  634. data/public/javascripts/ckeditor/skins/v2/images/dialog_sides.png +0 -0
  635. data/public/javascripts/ckeditor/skins/v2/images/dialog_sides_rtl.png +0 -0
  636. data/public/javascripts/ckeditor/skins/v2/images/mini.gif +0 -0
  637. data/public/javascripts/ckeditor/skins/v2/images/noimage.png +0 -0
  638. data/public/javascripts/ckeditor/skins/v2/images/sprites.png +0 -0
  639. data/public/javascripts/ckeditor/skins/v2/images/sprites_ie6.png +0 -0
  640. data/public/javascripts/ckeditor/skins/v2/images/toolbar_start.gif +0 -0
  641. data/public/javascripts/ckeditor/skins/v2/skin.js +0 -6
  642. data/public/javascripts/ckeditor/skins/v2/templates.css +0 -6
  643. data/public/javascripts/ckeditor/swfupload/fileprogress.js +0 -275
  644. data/public/javascripts/ckeditor/swfupload/handlers.js +0 -170
  645. data/public/javascripts/ckeditor/swfupload/mootools-1.2.3-core-yc.js +0 -356
  646. data/public/javascripts/ckeditor/swfupload/querystring.js +0 -40
  647. data/public/javascripts/ckeditor/swfupload/swfupload.js +0 -1
  648. data/public/javascripts/ckeditor/swfupload/swfupload.queue.js +0 -1
  649. data/public/javascripts/ckeditor/swfupload/swfupload.swf +0 -0
  650. data/public/javascripts/ckeditor/swfupload/swfupload.swfobject.js +0 -111
  651. data/public/javascripts/ckeditor/themes/default/theme.js +0 -8
  652. data/public/javascripts/controls.js +0 -62
  653. data/public/javascripts/dragdrop.js +0 -66
  654. data/public/javascripts/effects.js +0 -38
  655. data/public/javascripts/prototype.js +0 -541
  656. data/public/javascripts/rails.js +0 -22
  657. data/public/stylesheets/core_ie.css +0 -52
  658. data/public/stylesheets/csshover3.htc +0 -14
@@ -1,541 +0,0 @@
1
- var Prototype={Version:'1.7_rc2',Browser:(function(){var ua=navigator.userAgent;var isOpera=Object.prototype.toString.call(window.opera)=='[object Opera]';return{IE:!!window.attachEvent&&!isOpera,Opera:isOpera,WebKit:ua.indexOf('AppleWebKit/')>-1,Gecko:ua.indexOf('Gecko')>-1&&ua.indexOf('KHTML')===-1,MobileSafari:/Apple.*Mobile/.test(ua)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var constructor=window.Element||window.HTMLElement;return!!(constructor&&constructor.prototype);})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=='undefined')
2
- return true;var div=document.createElement('div'),form=document.createElement('form'),isSupported=false;if(div['__proto__']&&(div['__proto__']!==form['__proto__'])){isSupported=true;}
3
- div=form=null;return isSupported;})()},ScriptFragment:'<script[^>]*>([\\S\\s]*?)<\/script>',JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(x){return x}};if(Prototype.Browser.MobileSafari)
4
- Prototype.BrowserFeatures.SpecificElementExtensions=false;var Abstract={};var Try={these:function(){var returnValue;for(var i=0,length=arguments.length;i<length;i++){var lambda=arguments[i];try{returnValue=lambda();break;}catch(e){}}
5
- return returnValue;}};var Class=(function(){var IS_DONTENUM_BUGGY=(function(){for(var p in{toString:1}){if(p==='toString')return false;}
6
- return true;})();function subclass(){};function create(){var parent=null,properties=$A(arguments);if(Object.isFunction(properties[0]))
7
- parent=properties.shift();function klass(){this.initialize.apply(this,arguments);}
8
- Object.extend(klass,Class.Methods);klass.superclass=parent;klass.subclasses=[];if(parent){subclass.prototype=parent.prototype;klass.prototype=new subclass;parent.subclasses.push(klass);}
9
- for(var i=0,length=properties.length;i<length;i++)
10
- klass.addMethods(properties[i]);if(!klass.prototype.initialize)
11
- klass.prototype.initialize=Prototype.emptyFunction;klass.prototype.constructor=klass;return klass;}
12
- function addMethods(source){var ancestor=this.superclass&&this.superclass.prototype,properties=Object.keys(source);if(IS_DONTENUM_BUGGY){if(source.toString!=Object.prototype.toString)
13
- properties.push("toString");if(source.valueOf!=Object.prototype.valueOf)
14
- properties.push("valueOf");}
15
- for(var i=0,length=properties.length;i<length;i++){var property=properties[i],value=source[property];if(ancestor&&Object.isFunction(value)&&value.argumentNames()[0]=="$super"){var method=value;value=(function(m){return function(){return ancestor[m].apply(this,arguments);};})(property).wrap(method);value.valueOf=method.valueOf.bind(method);value.toString=method.toString.bind(method);}
16
- this.prototype[property]=value;}
17
- return this;}
18
- return{create:create,Methods:{addMethods:addMethods}};})();(function(){var _toString=Object.prototype.toString,NULL_TYPE='Null',UNDEFINED_TYPE='Undefined',BOOLEAN_TYPE='Boolean',NUMBER_TYPE='Number',STRING_TYPE='String',OBJECT_TYPE='Object',BOOLEAN_CLASS='[object Boolean]',NUMBER_CLASS='[object Number]',STRING_CLASS='[object String]',ARRAY_CLASS='[object Array]',NATIVE_JSON_STRINGIFY_SUPPORT=window.JSON&&typeof JSON.stringify==='function'&&JSON.stringify(0)==='0'&&typeof JSON.stringify(Prototype.K)==='undefined';function Type(o){switch(o){case null:return NULL_TYPE;case(void 0):return UNDEFINED_TYPE;}
19
- var type=typeof o;switch(type){case'boolean':return BOOLEAN_TYPE;case'number':return NUMBER_TYPE;case'string':return STRING_TYPE;}
20
- return OBJECT_TYPE;}
21
- function extend(destination,source){for(var property in source)
22
- destination[property]=source[property];return destination;}
23
- function inspect(object){try{if(isUndefined(object))return'undefined';if(object===null)return'null';return object.inspect?object.inspect():String(object);}catch(e){if(e instanceof RangeError)return'...';throw e;}}
24
- function toJSON(value){return Str('',{'':value},[]);}
25
- function Str(key,holder,stack){var value=holder[key],type=typeof value;if(Type(value)===OBJECT_TYPE&&typeof value.toJSON==='function'){value=value.toJSON(key);}
26
- var _class=_toString.call(value);switch(_class){case NUMBER_CLASS:case BOOLEAN_CLASS:case STRING_CLASS:value=value.valueOf();}
27
- switch(value){case null:return'null';case true:return'true';case false:return'false';}
28
- type=typeof value;switch(type){case'string':return value.inspect(true);case'number':return isFinite(value)?String(value):'null';case'object':for(var i=0,length=stack.length;i<length;i++){if(stack[i]===value){throw new TypeError();}}
29
- stack.push(value);var partial=[];if(_class===ARRAY_CLASS){for(var i=0,length=value.length;i<length;i++){var str=Str(i,value,stack);partial.push(typeof str==='undefined'?'null':str);}
30
- partial='['+partial.join(',')+']';}else{var keys=Object.keys(value);for(var i=0,length=keys.length;i<length;i++){var key=keys[i],str=Str(key,value,stack);if(typeof str!=="undefined"){partial.push(key.inspect(true)+':'+str);}}
31
- partial='{'+partial.join(',')+'}';}
32
- stack.pop();return partial;}}
33
- function stringify(object){return JSON.stringify(object);}
34
- function toQueryString(object){return $H(object).toQueryString();}
35
- function toHTML(object){return object&&object.toHTML?object.toHTML():String.interpret(object);}
36
- function keys(object){if(Type(object)!==OBJECT_TYPE){throw new TypeError();}
37
- var results=[];for(var property in object){if(object.hasOwnProperty(property)){results.push(property);}}
38
- return results;}
39
- function values(object){var results=[];for(var property in object)
40
- results.push(object[property]);return results;}
41
- function clone(object){return extend({},object);}
42
- function isElement(object){return!!(object&&object.nodeType==1);}
43
- function isArray(object){return _toString.call(object)===ARRAY_CLASS;}
44
- var hasNativeIsArray=(typeof Array.isArray=='function')&&Array.isArray([])&&!Array.isArray({});if(hasNativeIsArray){isArray=Array.isArray;}
45
- function isHash(object){return object instanceof Hash;}
46
- function isFunction(object){return typeof object==="function";}
47
- function isString(object){return _toString.call(object)===STRING_CLASS;}
48
- function isNumber(object){return _toString.call(object)===NUMBER_CLASS;}
49
- function isUndefined(object){return typeof object==="undefined";}
50
- extend(Object,{extend:extend,inspect:inspect,toJSON:NATIVE_JSON_STRINGIFY_SUPPORT?stringify:toJSON,toQueryString:toQueryString,toHTML:toHTML,keys:Object.keys||keys,values:values,clone:clone,isElement:isElement,isArray:isArray,isHash:isHash,isFunction:isFunction,isString:isString,isNumber:isNumber,isUndefined:isUndefined});})();Object.extend(Function.prototype,(function(){var slice=Array.prototype.slice;function update(array,args){var arrayLength=array.length,length=args.length;while(length--)array[arrayLength+length]=args[length];return array;}
51
- function merge(array,args){array=slice.call(array,0);return update(array,args);}
52
- function argumentNames(){var names=this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g,'').replace(/\s+/g,'').split(',');return names.length==1&&!names[0]?[]:names;}
53
- function bind(context){if(arguments.length<2&&Object.isUndefined(arguments[0]))return this;var __method=this,args=slice.call(arguments,1);return function(){var a=merge(args,arguments);return __method.apply(context,a);}}
54
- function bindAsEventListener(context){var __method=this,args=slice.call(arguments,1);return function(event){var a=update([event||window.event],args);return __method.apply(context,a);}}
55
- function curry(){if(!arguments.length)return this;var __method=this,args=slice.call(arguments,0);return function(){var a=merge(args,arguments);return __method.apply(this,a);}}
56
- function delay(timeout){var __method=this,args=slice.call(arguments,1);timeout=timeout*1000;return window.setTimeout(function(){return __method.apply(__method,args);},timeout);}
57
- function defer(){var args=update([0.01],arguments);return this.delay.apply(this,args);}
58
- function wrap(wrapper){var __method=this;return function(){var a=update([__method.bind(this)],arguments);return wrapper.apply(this,a);}}
59
- function methodize(){if(this._methodized)return this._methodized;var __method=this;return this._methodized=function(){var a=update([this],arguments);return __method.apply(null,a);};}
60
- return{argumentNames:argumentNames,bind:bind,bindAsEventListener:bindAsEventListener,curry:curry,delay:delay,defer:defer,wrap:wrap,methodize:methodize}})());(function(proto){function toISOString(){return this.getUTCFullYear()+'-'+(this.getUTCMonth()+1).toPaddedString(2)+'-'+this.getUTCDate().toPaddedString(2)+'T'+this.getUTCHours().toPaddedString(2)+':'+this.getUTCMinutes().toPaddedString(2)+':'+this.getUTCSeconds().toPaddedString(2)+'Z';}
61
- function toJSON(){return this.toISOString();}
62
- if(!proto.toISOString)proto.toISOString=toISOString;if(!proto.toJSON)proto.toJSON=toJSON;})(Date.prototype);RegExp.prototype.match=RegExp.prototype.test;RegExp.escape=function(str){return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g,'\\$1');};var PeriodicalExecuter=Class.create({initialize:function(callback,frequency){this.callback=callback;this.frequency=frequency;this.currentlyExecuting=false;this.registerCallback();},registerCallback:function(){this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1000);},execute:function(){this.callback(this);},stop:function(){if(!this.timer)return;clearInterval(this.timer);this.timer=null;},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.execute();this.currentlyExecuting=false;}catch(e){this.currentlyExecuting=false;throw e;}}}});Object.extend(String,{interpret:function(value){return value==null?'':String(value);},specialChar:{'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','\\':'\\\\'}});Object.extend(String.prototype,(function(){var NATIVE_JSON_PARSE_SUPPORT=window.JSON&&typeof JSON.parse==='function'&&JSON.parse('{"test": true}').test;function prepareReplacement(replacement){if(Object.isFunction(replacement))return replacement;var template=new Template(replacement);return function(match){return template.evaluate(match)};}
63
- function gsub(pattern,replacement){var result='',source=this,match;replacement=prepareReplacement(replacement);if(Object.isString(pattern))
64
- pattern=RegExp.escape(pattern);if(!(pattern.length||pattern.source)){replacement=replacement('');return replacement+source.split('').join(replacement)+replacement;}
65
- while(source.length>0){if(match=source.match(pattern)){result+=source.slice(0,match.index);result+=String.interpret(replacement(match));source=source.slice(match.index+match[0].length);}else{result+=source,source='';}}
66
- return result;}
67
- function sub(pattern,replacement,count){replacement=prepareReplacement(replacement);count=Object.isUndefined(count)?1:count;return this.gsub(pattern,function(match){if(--count<0)return match[0];return replacement(match);});}
68
- function scan(pattern,iterator){this.gsub(pattern,iterator);return String(this);}
69
- function truncate(length,truncation){length=length||30;truncation=Object.isUndefined(truncation)?'...':truncation;return this.length>length?this.slice(0,length-truncation.length)+truncation:String(this);}
70
- function strip(){return this.replace(/^\s+/,'').replace(/\s+$/,'');}
71
- function stripTags(){return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?>|<\/\w+>/gi,'');}
72
- function stripScripts(){return this.replace(new RegExp(Prototype.ScriptFragment,'img'),'');}
73
- function extractScripts(){var matchAll=new RegExp(Prototype.ScriptFragment,'img'),matchOne=new RegExp(Prototype.ScriptFragment,'im');return(this.match(matchAll)||[]).map(function(scriptTag){return(scriptTag.match(matchOne)||['',''])[1];});}
74
- function evalScripts(){return this.extractScripts().map(function(script){return eval(script)});}
75
- function escapeHTML(){return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');}
76
- function unescapeHTML(){return this.stripTags().replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&amp;/g,'&');}
77
- function toQueryParams(separator){var match=this.strip().match(/([^?#]*)(#.*)?$/);if(!match)return{};return match[1].split(separator||'&').inject({},function(hash,pair){if((pair=pair.split('='))[0]){var key=decodeURIComponent(pair.shift()),value=pair.length>1?pair.join('='):pair[0];if(value!=undefined)value=decodeURIComponent(value);if(key in hash){if(!Object.isArray(hash[key]))hash[key]=[hash[key]];hash[key].push(value);}
78
- else hash[key]=value;}
79
- return hash;});}
80
- function toArray(){return this.split('');}
81
- function succ(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1);}
82
- function times(count){return count<1?'':new Array(count+1).join(this);}
83
- function camelize(){return this.replace(/-+(.)?/g,function(match,chr){return chr?chr.toUpperCase():'';});}
84
- function capitalize(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase();}
85
- function underscore(){return this.replace(/::/g,'/').replace(/([A-Z]+)([A-Z][a-z])/g,'$1_$2').replace(/([a-z\d])([A-Z])/g,'$1_$2').replace(/-/g,'_').toLowerCase();}
86
- function dasherize(){return this.replace(/_/g,'-');}
87
- function inspect(useDoubleQuotes){var escapedString=this.replace(/[\x00-\x1f\\]/g,function(character){if(character in String.specialChar){return String.specialChar[character];}
88
- return'\\u00'+character.charCodeAt().toPaddedString(2,16);});if(useDoubleQuotes)return'"'+escapedString.replace(/"/g,'\\"')+'"';return"'"+escapedString.replace(/'/g,'\\\'')+"'";}
89
- function unfilterJSON(filter){return this.replace(filter||Prototype.JSONFilter,'$1');}
90
- function isJSON(){var str=this;if(str.blank())return false;str=str.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@');str=str.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']');str=str.replace(/(?:^|:|,)(?:\s*\[)+/g,'');return(/^[\],:{}\s]*$/).test(str);}
91
- function evalJSON(sanitize){var json=this.unfilterJSON(),cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;if(cx.test(json)){json=json.replace(cx,function(a){return'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);});}
92
- try{if(!sanitize||json.isJSON())return eval('('+json+')');}catch(e){}
93
- throw new SyntaxError('Badly formed JSON string: '+this.inspect());}
94
- function parseJSON(){var json=this.unfilterJSON();return JSON.parse(json);}
95
- function include(pattern){return this.indexOf(pattern)>-1;}
96
- function startsWith(pattern){return this.lastIndexOf(pattern,0)===0;}
97
- function endsWith(pattern){var d=this.length-pattern.length;return d>=0&&this.indexOf(pattern,d)===d;}
98
- function empty(){return this=='';}
99
- function blank(){return/^\s*$/.test(this);}
100
- function interpolate(object,pattern){return new Template(this,pattern).evaluate(object);}
101
- return{gsub:gsub,sub:sub,scan:scan,truncate:truncate,strip:String.prototype.trim||strip,stripTags:stripTags,stripScripts:stripScripts,extractScripts:extractScripts,evalScripts:evalScripts,escapeHTML:escapeHTML,unescapeHTML:unescapeHTML,toQueryParams:toQueryParams,parseQuery:toQueryParams,toArray:toArray,succ:succ,times:times,camelize:camelize,capitalize:capitalize,underscore:underscore,dasherize:dasherize,inspect:inspect,unfilterJSON:unfilterJSON,isJSON:isJSON,evalJSON:NATIVE_JSON_PARSE_SUPPORT?parseJSON:evalJSON,include:include,startsWith:startsWith,endsWith:endsWith,empty:empty,blank:blank,interpolate:interpolate};})());var Template=Class.create({initialize:function(template,pattern){this.template=template.toString();this.pattern=pattern||Template.Pattern;},evaluate:function(object){if(object&&Object.isFunction(object.toTemplateReplacements))
102
- object=object.toTemplateReplacements();return this.template.gsub(this.pattern,function(match){if(object==null)return(match[1]+'');var before=match[1]||'';if(before=='\\')return match[2];var ctx=object,expr=match[3],pattern=/^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;match=pattern.exec(expr);if(match==null)return before;while(match!=null){var comp=match[1].startsWith('[')?match[2].replace(/\\\\]/g,']'):match[1];ctx=ctx[comp];if(null==ctx||''==match[3])break;expr=expr.substring('['==match[3]?match[1].length:match[0].length);match=pattern.exec(expr);}
103
- return before+String.interpret(ctx);});}});Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;var $break={};var Enumerable=(function(){function each(iterator,context){var index=0;try{this._each(function(value){iterator.call(context,value,index++);});}catch(e){if(e!=$break)throw e;}
104
- return this;}
105
- function eachSlice(number,iterator,context){var index=-number,slices=[],array=this.toArray();if(number<1)return array;while((index+=number)<array.length)
106
- slices.push(array.slice(index,index+number));return slices.collect(iterator,context);}
107
- function all(iterator,context){iterator=iterator||Prototype.K;var result=true;this.each(function(value,index){result=result&&!!iterator.call(context,value,index);if(!result)throw $break;});return result;}
108
- function any(iterator,context){iterator=iterator||Prototype.K;var result=false;this.each(function(value,index){if(result=!!iterator.call(context,value,index))
109
- throw $break;});return result;}
110
- function collect(iterator,context){iterator=iterator||Prototype.K;var results=[];this.each(function(value,index){results.push(iterator.call(context,value,index));});return results;}
111
- function detect(iterator,context){var result;this.each(function(value,index){if(iterator.call(context,value,index)){result=value;throw $break;}});return result;}
112
- function findAll(iterator,context){var results=[];this.each(function(value,index){if(iterator.call(context,value,index))
113
- results.push(value);});return results;}
114
- function grep(filter,iterator,context){iterator=iterator||Prototype.K;var results=[];if(Object.isString(filter))
115
- filter=new RegExp(RegExp.escape(filter));this.each(function(value,index){if(filter.match(value))
116
- results.push(iterator.call(context,value,index));});return results;}
117
- function include(object){if(Object.isFunction(this.indexOf))
118
- if(this.indexOf(object)!=-1)return true;var found=false;this.each(function(value){if(value==object){found=true;throw $break;}});return found;}
119
- function inGroupsOf(number,fillWith){fillWith=Object.isUndefined(fillWith)?null:fillWith;return this.eachSlice(number,function(slice){while(slice.length<number)slice.push(fillWith);return slice;});}
120
- function inject(memo,iterator,context){this.each(function(value,index){memo=iterator.call(context,memo,value,index);});return memo;}
121
- function invoke(method){var args=$A(arguments).slice(1);return this.map(function(value){return value[method].apply(value,args);});}
122
- function max(iterator,context){iterator=iterator||Prototype.K;var result;this.each(function(value,index){value=iterator.call(context,value,index);if(result==null||value>=result)
123
- result=value;});return result;}
124
- function min(iterator,context){iterator=iterator||Prototype.K;var result;this.each(function(value,index){value=iterator.call(context,value,index);if(result==null||value<result)
125
- result=value;});return result;}
126
- function partition(iterator,context){iterator=iterator||Prototype.K;var trues=[],falses=[];this.each(function(value,index){(iterator.call(context,value,index)?trues:falses).push(value);});return[trues,falses];}
127
- function pluck(property){var results=[];this.each(function(value){results.push(value[property]);});return results;}
128
- function reject(iterator,context){var results=[];this.each(function(value,index){if(!iterator.call(context,value,index))
129
- results.push(value);});return results;}
130
- function sortBy(iterator,context){return this.map(function(value,index){return{value:value,criteria:iterator.call(context,value,index)};}).sort(function(left,right){var a=left.criteria,b=right.criteria;return a<b?-1:a>b?1:0;}).pluck('value');}
131
- function toArray(){return this.map();}
132
- function zip(){var iterator=Prototype.K,args=$A(arguments);if(Object.isFunction(args.last()))
133
- iterator=args.pop();var collections=[this].concat(args).map($A);return this.map(function(value,index){return iterator(collections.pluck(index));});}
134
- function size(){return this.toArray().length;}
135
- function inspect(){return'#<Enumerable:'+this.toArray().inspect()+'>';}
136
- return{each:each,eachSlice:eachSlice,all:all,every:all,any:any,some:any,collect:collect,map:collect,detect:detect,findAll:findAll,select:findAll,filter:findAll,grep:grep,include:include,member:include,inGroupsOf:inGroupsOf,inject:inject,invoke:invoke,max:max,min:min,partition:partition,pluck:pluck,reject:reject,sortBy:sortBy,toArray:toArray,entries:toArray,zip:zip,size:size,inspect:inspect,find:detect};})();function $A(iterable){if(!iterable)return[];if('toArray'in Object(iterable))return iterable.toArray();var length=iterable.length||0,results=new Array(length);while(length--)results[length]=iterable[length];return results;}
137
- function $w(string){if(!Object.isString(string))return[];string=string.strip();return string?string.split(/\s+/):[];}
138
- Array.from=$A;(function(){var arrayProto=Array.prototype,slice=arrayProto.slice,_each=arrayProto.forEach;function each(iterator){for(var i=0,length=this.length;i<length;i++)
139
- iterator(this[i]);}
140
- if(!_each)_each=each;function clear(){this.length=0;return this;}
141
- function first(){return this[0];}
142
- function last(){return this[this.length-1];}
143
- function compact(){return this.select(function(value){return value!=null;});}
144
- function flatten(){return this.inject([],function(array,value){if(Object.isArray(value))
145
- return array.concat(value.flatten());array.push(value);return array;});}
146
- function without(){var values=slice.call(arguments,0);return this.select(function(value){return!values.include(value);});}
147
- function reverse(inline){return(inline===false?this.toArray():this)._reverse();}
148
- function uniq(sorted){return this.inject([],function(array,value,index){if(0==index||(sorted?array.last()!=value:!array.include(value)))
149
- array.push(value);return array;});}
150
- function intersect(array){return this.uniq().findAll(function(item){return array.detect(function(value){return item===value});});}
151
- function clone(){return slice.call(this,0);}
152
- function size(){return this.length;}
153
- function inspect(){return'['+this.map(Object.inspect).join(', ')+']';}
154
- function indexOf(item,i){i||(i=0);var length=this.length;if(i<0)i=length+i;for(;i<length;i++)
155
- if(this[i]===item)return i;return-1;}
156
- function lastIndexOf(item,i){i=isNaN(i)?this.length:(i<0?this.length+i:i)+1;var n=this.slice(0,i).reverse().indexOf(item);return(n<0)?n:i-n-1;}
157
- function concat(){var array=slice.call(this,0),item;for(var i=0,length=arguments.length;i<length;i++){item=arguments[i];if(Object.isArray(item)&&!('callee'in item)){for(var j=0,arrayLength=item.length;j<arrayLength;j++)
158
- array.push(item[j]);}else{array.push(item);}}
159
- return array;}
160
- Object.extend(arrayProto,Enumerable);if(!arrayProto._reverse)
161
- arrayProto._reverse=arrayProto.reverse;Object.extend(arrayProto,{_each:_each,clear:clear,first:first,last:last,compact:compact,flatten:flatten,without:without,reverse:reverse,uniq:uniq,intersect:intersect,clone:clone,toArray:clone,size:size,inspect:inspect});var CONCAT_ARGUMENTS_BUGGY=(function(){return[].concat(arguments)[0][0]!==1;})(1,2)
162
- if(CONCAT_ARGUMENTS_BUGGY)arrayProto.concat=concat;if(!arrayProto.indexOf)arrayProto.indexOf=indexOf;if(!arrayProto.lastIndexOf)arrayProto.lastIndexOf=lastIndexOf;})();function $H(object){return new Hash(object);};var Hash=Class.create(Enumerable,(function(){function initialize(object){this._object=Object.isHash(object)?object.toObject():Object.clone(object);}
163
- function _each(iterator){for(var key in this._object){var value=this._object[key],pair=[key,value];pair.key=key;pair.value=value;iterator(pair);}}
164
- function set(key,value){return this._object[key]=value;}
165
- function get(key){if(this._object[key]!==Object.prototype[key])
166
- return this._object[key];}
167
- function unset(key){var value=this._object[key];delete this._object[key];return value;}
168
- function toObject(){return Object.clone(this._object);}
169
- function keys(){return this.pluck('key');}
170
- function values(){return this.pluck('value');}
171
- function index(value){var match=this.detect(function(pair){return pair.value===value;});return match&&match.key;}
172
- function merge(object){return this.clone().update(object);}
173
- function update(object){return new Hash(object).inject(this,function(result,pair){result.set(pair.key,pair.value);return result;});}
174
- function toQueryPair(key,value){if(Object.isUndefined(value))return key;return key+'='+encodeURIComponent(String.interpret(value));}
175
- function toQueryString(){return this.inject([],function(results,pair){var key=encodeURIComponent(pair.key),values=pair.value;if(values&&typeof values=='object'){if(Object.isArray(values))
176
- return results.concat(values.map(toQueryPair.curry(key)));}else results.push(toQueryPair(key,values));return results;}).join('&');}
177
- function inspect(){return'#<Hash:{'+this.map(function(pair){return pair.map(Object.inspect).join(': ');}).join(', ')+'}>';}
178
- function clone(){return new Hash(this);}
179
- return{initialize:initialize,_each:_each,set:set,get:get,unset:unset,toObject:toObject,toTemplateReplacements:toObject,keys:keys,values:values,index:index,merge:merge,update:update,toQueryString:toQueryString,inspect:inspect,toJSON:toObject,clone:clone};})());Hash.from=$H;Object.extend(Number.prototype,(function(){function toColorPart(){return this.toPaddedString(2,16);}
180
- function succ(){return this+1;}
181
- function times(iterator,context){$R(0,this,true).each(iterator,context);return this;}
182
- function toPaddedString(length,radix){var string=this.toString(radix||10);return'0'.times(length-string.length)+string;}
183
- function abs(){return Math.abs(this);}
184
- function round(){return Math.round(this);}
185
- function ceil(){return Math.ceil(this);}
186
- function floor(){return Math.floor(this);}
187
- return{toColorPart:toColorPart,succ:succ,times:times,toPaddedString:toPaddedString,abs:abs,round:round,ceil:ceil,floor:floor};})());function $R(start,end,exclusive){return new ObjectRange(start,end,exclusive);}
188
- var ObjectRange=Class.create(Enumerable,(function(){function initialize(start,end,exclusive){this.start=start;this.end=end;this.exclusive=exclusive;}
189
- function _each(iterator){var value=this.start;while(this.include(value)){iterator(value);value=value.succ();}}
190
- function include(value){if(value<this.start)
191
- return false;if(this.exclusive)
192
- return value<this.end;return value<=this.end;}
193
- return{initialize:initialize,_each:_each,include:include};})());var Ajax={getTransport:function(){return Try.these(function(){return new XMLHttpRequest()},function(){return new ActiveXObject('Msxml2.XMLHTTP')},function(){return new ActiveXObject('Microsoft.XMLHTTP')})||false;},activeRequestCount:0};Ajax.Responders={responders:[],_each:function(iterator){this.responders._each(iterator);},register:function(responder){if(!this.include(responder))
194
- this.responders.push(responder);},unregister:function(responder){this.responders=this.responders.without(responder);},dispatch:function(callback,request,transport,json){this.each(function(responder){if(Object.isFunction(responder[callback])){try{responder[callback].apply(responder,[request,transport,json]);}catch(e){}}});}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});Ajax.Base=Class.create({initialize:function(options){this.options={method:'post',asynchronous:true,contentType:'application/x-www-form-urlencoded',encoding:'UTF-8',parameters:'',evalJSON:true,evalJS:true};Object.extend(this.options,options||{});this.options.method=this.options.method.toLowerCase();if(Object.isString(this.options.parameters))
195
- this.options.parameters=this.options.parameters.toQueryParams();else if(Object.isHash(this.options.parameters))
196
- this.options.parameters=this.options.parameters.toObject();}});Ajax.Request=Class.create(Ajax.Base,{_complete:false,initialize:function($super,url,options){$super(options);this.transport=Ajax.getTransport();this.request(url);},request:function(url){this.url=url;this.method=this.options.method;var params=Object.clone(this.options.parameters);if(!['get','post'].include(this.method)){params['_method']=this.method;this.method='post';}
197
- this.parameters=params;if(params=Object.toQueryString(params)){if(this.method=='get')
198
- this.url+=(this.url.include('?')?'&':'?')+params;else if(/Konqueror|Safari|KHTML/.test(navigator.userAgent))
199
- params+='&_=';}
200
- try{var response=new Ajax.Response(this);if(this.options.onCreate)this.options.onCreate(response);Ajax.Responders.dispatch('onCreate',this,response);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);if(this.options.asynchronous)this.respondToReadyState.bind(this).defer(1);this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();this.body=this.method=='post'?(this.options.postBody||params):null;this.transport.send(this.body);if(!this.options.asynchronous&&this.transport.overrideMimeType)
201
- this.onStateChange();}
202
- catch(e){this.dispatchException(e);}},onStateChange:function(){var readyState=this.transport.readyState;if(readyState>1&&!((readyState==4)&&this._complete))
203
- this.respondToReadyState(this.transport.readyState);},setRequestHeaders:function(){var headers={'X-Requested-With':'XMLHttpRequest','X-Prototype-Version':Prototype.Version,'Accept':'text/javascript, text/html, application/xml, text/xml, */*'};if(this.method=='post'){headers['Content-type']=this.options.contentType+(this.options.encoding?'; charset='+this.options.encoding:'');if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005)
204
- headers['Connection']='close';}
205
- if(typeof this.options.requestHeaders=='object'){var extras=this.options.requestHeaders;if(Object.isFunction(extras.push))
206
- for(var i=0,length=extras.length;i<length;i+=2)
207
- headers[extras[i]]=extras[i+1];else
208
- $H(extras).each(function(pair){headers[pair.key]=pair.value});}
209
- for(var name in headers)
210
- this.transport.setRequestHeader(name,headers[name]);},success:function(){var status=this.getStatus();return!status||(status>=200&&status<300);},getStatus:function(){try{return this.transport.status||0;}catch(e){return 0}},respondToReadyState:function(readyState){var state=Ajax.Request.Events[readyState],response=new Ajax.Response(this);if(state=='Complete'){try{this._complete=true;(this.options['on'+response.status]||this.options['on'+(this.success()?'Success':'Failure')]||Prototype.emptyFunction)(response,response.headerJSON);}catch(e){this.dispatchException(e);}
211
- var contentType=response.getHeader('Content-type');if(this.options.evalJS=='force'||(this.options.evalJS&&this.isSameOrigin()&&contentType&&contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i)))
212
- this.evalResponse();}
213
- try{(this.options['on'+state]||Prototype.emptyFunction)(response,response.headerJSON);Ajax.Responders.dispatch('on'+state,this,response,response.headerJSON);}catch(e){this.dispatchException(e);}
214
- if(state=='Complete'){this.transport.onreadystatechange=Prototype.emptyFunction;}},isSameOrigin:function(){var m=this.url.match(/^\s*https?:\/\/[^\/]*/);return!m||(m[0]=='#{protocol}//#{domain}#{port}'.interpolate({protocol:location.protocol,domain:document.domain,port:location.port?':'+location.port:''}));},getHeader:function(name){try{return this.transport.getResponseHeader(name)||null;}catch(e){return null;}},evalResponse:function(){try{return eval((this.transport.responseText||'').unfilterJSON());}catch(e){this.dispatchException(e);}},dispatchException:function(exception){(this.options.onException||Prototype.emptyFunction)(this,exception);Ajax.Responders.dispatch('onException',this,exception);}});Ajax.Request.Events=['Uninitialized','Loading','Loaded','Interactive','Complete'];Ajax.Response=Class.create({initialize:function(request){this.request=request;var transport=this.transport=request.transport,readyState=this.readyState=transport.readyState;if((readyState>2&&!Prototype.Browser.IE)||readyState==4){this.status=this.getStatus();this.statusText=this.getStatusText();this.responseText=String.interpret(transport.responseText);this.headerJSON=this._getHeaderJSON();}
215
- if(readyState==4){var xml=transport.responseXML;this.responseXML=Object.isUndefined(xml)?null:xml;this.responseJSON=this._getResponseJSON();}},status:0,statusText:'',getStatus:Ajax.Request.prototype.getStatus,getStatusText:function(){try{return this.transport.statusText||'';}catch(e){return''}},getHeader:Ajax.Request.prototype.getHeader,getAllHeaders:function(){try{return this.getAllResponseHeaders();}catch(e){return null}},getResponseHeader:function(name){return this.transport.getResponseHeader(name);},getAllResponseHeaders:function(){return this.transport.getAllResponseHeaders();},_getHeaderJSON:function(){var json=this.getHeader('X-JSON');if(!json)return null;json=decodeURIComponent(escape(json));try{return json.evalJSON(this.request.options.sanitizeJSON||!this.request.isSameOrigin());}catch(e){this.request.dispatchException(e);}},_getResponseJSON:function(){var options=this.request.options;if(!options.evalJSON||(options.evalJSON!='force'&&!(this.getHeader('Content-type')||'').include('application/json'))||this.responseText.blank())
216
- return null;try{return this.responseText.evalJSON(options.sanitizeJSON||!this.request.isSameOrigin());}catch(e){this.request.dispatchException(e);}}});Ajax.Updater=Class.create(Ajax.Request,{initialize:function($super,container,url,options){this.container={success:(container.success||container),failure:(container.failure||(container.success?null:container))};options=Object.clone(options);var onComplete=options.onComplete;options.onComplete=(function(response,json){this.updateContent(response.responseText);if(Object.isFunction(onComplete))onComplete(response,json);}).bind(this);$super(url,options);},updateContent:function(responseText){var receiver=this.container[this.success()?'success':'failure'],options=this.options;if(!options.evalScripts)responseText=responseText.stripScripts();if(receiver=$(receiver)){if(options.insertion){if(Object.isString(options.insertion)){var insertion={};insertion[options.insertion]=responseText;receiver.insert(insertion);}
217
- else options.insertion(receiver,responseText);}
218
- else receiver.update(responseText);}}});Ajax.PeriodicalUpdater=Class.create(Ajax.Base,{initialize:function($super,container,url,options){$super(options);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=container;this.url=url;this.start();},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent();},stop:function(){this.updater.options.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments);},updateComplete:function(response){if(this.options.decay){this.decay=(response.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=response.responseText;}
219
- this.timer=this.onTimerEvent.bind(this).delay(this.decay*this.frequency);},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options);}});function $(element){if(arguments.length>1){for(var i=0,elements=[],length=arguments.length;i<length;i++)
220
- elements.push($(arguments[i]));return elements;}
221
- if(Object.isString(element))
222
- element=document.getElementById(element);return Element.extend(element);}
223
- if(Prototype.BrowserFeatures.XPath){document._getElementsByXPath=function(expression,parentElement){var results=[];var query=document.evaluate(expression,$(parentElement)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var i=0,length=query.snapshotLength;i<length;i++)
224
- results.push(Element.extend(query.snapshotItem(i)));return results;};}
225
- if(!Node)var Node={};if(!Node.ELEMENT_NODE){Object.extend(Node,{ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12});}
226
- (function(global){var HAS_EXTENDED_CREATE_ELEMENT_SYNTAX=(function(){try{var el=document.createElement('<input name="x">');return el.tagName.toLowerCase()==='input'&&el.name==='x';}
227
- catch(err){return false;}})();var element=global.Element;global.Element=function(tagName,attributes){attributes=attributes||{};tagName=tagName.toLowerCase();var cache=Element.cache;if(HAS_EXTENDED_CREATE_ELEMENT_SYNTAX&&attributes.name){tagName='<'+tagName+' name="'+attributes.name+'">';delete attributes.name;return Element.writeAttribute(document.createElement(tagName),attributes);}
228
- if(!cache[tagName])cache[tagName]=Element.extend(document.createElement(tagName));return Element.writeAttribute(cache[tagName].cloneNode(false),attributes);};Object.extend(global.Element,element||{});if(element)global.Element.prototype=element.prototype;})(this);Element.idCounter=1;Element.cache={};function purgeElement(element){var uid=element._prototypeUID;if(uid){Element.stopObserving(element);element._prototypeUID=void 0;delete Element.Storage[uid];}}
229
- Element.Methods={visible:function(element){return $(element).style.display!='none';},toggle:function(element){element=$(element);Element[Element.visible(element)?'hide':'show'](element);return element;},hide:function(element){element=$(element);element.style.display='none';return element;},show:function(element){element=$(element);element.style.display='';return element;},remove:function(element){element=$(element);element.parentNode.removeChild(element);return element;},update:(function(){var SELECT_ELEMENT_INNERHTML_BUGGY=(function(){var el=document.createElement("select"),isBuggy=true;el.innerHTML="<option value=\"test\">test</option>";if(el.options&&el.options[0]){isBuggy=el.options[0].nodeName.toUpperCase()!=="OPTION";}
230
- el=null;return isBuggy;})();var TABLE_ELEMENT_INNERHTML_BUGGY=(function(){try{var el=document.createElement("table");if(el&&el.tBodies){el.innerHTML="<tbody><tr><td>test</td></tr></tbody>";var isBuggy=typeof el.tBodies[0]=="undefined";el=null;return isBuggy;}}catch(e){return true;}})();var SCRIPT_ELEMENT_REJECTS_TEXTNODE_APPENDING=(function(){var s=document.createElement("script"),isBuggy=false;try{s.appendChild(document.createTextNode(""));isBuggy=!s.firstChild||s.firstChild&&s.firstChild.nodeType!==3;}catch(e){isBuggy=true;}
231
- s=null;return isBuggy;})();function update(element,content){element=$(element);var descendants=element.getElementsByTagName('*'),i=descendants.length;while(i--)purgeElement(descendants[i]);if(content&&content.toElement)
232
- content=content.toElement();if(Object.isElement(content))
233
- return element.update().insert(content);content=Object.toHTML(content);var tagName=element.tagName.toUpperCase();if(tagName==='SCRIPT'&&SCRIPT_ELEMENT_REJECTS_TEXTNODE_APPENDING){element.text=content;return element;}
234
- if(SELECT_ELEMENT_INNERHTML_BUGGY||TABLE_ELEMENT_INNERHTML_BUGGY){if(tagName in Element._insertionTranslations.tags){while(element.firstChild){element.removeChild(element.firstChild);}
235
- Element._getContentFromAnonymousElement(tagName,content.stripScripts()).each(function(node){element.appendChild(node)});}
236
- else{element.innerHTML=content.stripScripts();}}
237
- else{element.innerHTML=content.stripScripts();}
238
- content.evalScripts.bind(content).defer();return element;}
239
- return update;})(),replace:function(element,content){element=$(element);if(content&&content.toElement)content=content.toElement();else if(!Object.isElement(content)){content=Object.toHTML(content);var range=element.ownerDocument.createRange();range.selectNode(element);content.evalScripts.bind(content).defer();content=range.createContextualFragment(content.stripScripts());}
240
- element.parentNode.replaceChild(content,element);return element;},insert:function(element,insertions){element=$(element);if(Object.isString(insertions)||Object.isNumber(insertions)||Object.isElement(insertions)||(insertions&&(insertions.toElement||insertions.toHTML)))
241
- insertions={bottom:insertions};var content,insert,tagName,childNodes;for(var position in insertions){content=insertions[position];position=position.toLowerCase();insert=Element._insertionTranslations[position];if(content&&content.toElement)content=content.toElement();if(Object.isElement(content)){insert(element,content);continue;}
242
- content=Object.toHTML(content);tagName=((position=='before'||position=='after')?element.parentNode:element).tagName.toUpperCase();childNodes=Element._getContentFromAnonymousElement(tagName,content.stripScripts());if(position=='top'||position=='after')childNodes.reverse();childNodes.each(insert.curry(element));content.evalScripts.bind(content).defer();}
243
- return element;},wrap:function(element,wrapper,attributes){element=$(element);if(Object.isElement(wrapper))
244
- $(wrapper).writeAttribute(attributes||{});else if(Object.isString(wrapper))wrapper=new Element(wrapper,attributes);else wrapper=new Element('div',wrapper);if(element.parentNode)
245
- element.parentNode.replaceChild(wrapper,element);wrapper.appendChild(element);return wrapper;},inspect:function(element){element=$(element);var result='<'+element.tagName.toLowerCase();$H({'id':'id','className':'class'}).each(function(pair){var property=pair.first(),attribute=pair.last(),value=(element[property]||'').toString();if(value)result+=' '+attribute+'='+value.inspect(true);});return result+'>';},recursivelyCollect:function(element,property,maximumLength){element=$(element);maximumLength=maximumLength||-1;var elements=[];while(element=element[property]){if(element.nodeType==1)
246
- elements.push(Element.extend(element));if(elements.length==maximumLength)
247
- break;}
248
- return elements;},ancestors:function(element){return Element.recursivelyCollect(element,'parentNode');},descendants:function(element){return Element.select(element,"*");},firstDescendant:function(element){element=$(element).firstChild;while(element&&element.nodeType!=1)element=element.nextSibling;return $(element);},immediateDescendants:function(element){var results=[],child=$(element).firstChild;while(child){if(child.nodeType===1){results.push(Element.extend(child));}
249
- child=child.nextSibling;}
250
- return results;},previousSiblings:function(element,maximumLength){return Element.recursivelyCollect(element,'previousSibling');},nextSiblings:function(element){return Element.recursivelyCollect(element,'nextSibling');},siblings:function(element){element=$(element);return Element.previousSiblings(element).reverse().concat(Element.nextSiblings(element));},match:function(element,selector){element=$(element);if(Object.isString(selector))
251
- return Prototype.Selector.match(element,selector);return selector.match(element);},up:function(element,expression,index){element=$(element);if(arguments.length==1)return $(element.parentNode);var ancestors=Element.ancestors(element);return Object.isNumber(expression)?ancestors[expression]:Prototype.Selector.find(ancestors,expression,index);},down:function(element,expression,index){element=$(element);if(arguments.length==1)return Element.firstDescendant(element);return Object.isNumber(expression)?Element.descendants(element)[expression]:Element.select(element,expression)[index||0];},previous:function(element,expression,index){element=$(element);if(Object.isNumber(expression))index=expression,expression=false;if(!Object.isNumber(index))index=0;if(expression){return Prototype.Selector.find(element.previousSiblings(),expression,index);}else{return element.recursivelyCollect("previousSibling",index+1)[index];}},next:function(element,expression,index){element=$(element);if(Object.isNumber(expression))index=expression,expression=false;if(!Object.isNumber(index))index=0;if(expression){return Prototype.Selector.find(element.nextSiblings(),expression,index);}else{var maximumLength=Object.isNumber(index)?index+1:1;return element.recursivelyCollect("nextSibling",index+1)[index];}},select:function(element){element=$(element);var expressions=Array.prototype.slice.call(arguments,1).join(', ');return Prototype.Selector.select(expressions,element);},adjacent:function(element){element=$(element);var expressions=Array.prototype.slice.call(arguments,1).join(', ');return Prototype.Selector.select(expressions,element.parentNode).without(element);},identify:function(element){element=$(element);var id=Element.readAttribute(element,'id');if(id)return id;do{id='anonymous_element_'+Element.idCounter++}while($(id));Element.writeAttribute(element,'id',id);return id;},readAttribute:function(element,name){element=$(element);if(Prototype.Browser.IE){var t=Element._attributeTranslations.read;if(t.values[name])return t.values[name](element,name);if(t.names[name])name=t.names[name];if(name.include(':')){return(!element.attributes||!element.attributes[name])?null:element.attributes[name].value;}}
252
- return element.getAttribute(name);},writeAttribute:function(element,name,value){element=$(element);var attributes={},t=Element._attributeTranslations.write;if(typeof name=='object')attributes=name;else attributes[name]=Object.isUndefined(value)?true:value;for(var attr in attributes){name=t.names[attr]||attr;value=attributes[attr];if(t.values[attr])name=t.values[attr](element,value);if(value===false||value===null)
253
- element.removeAttribute(name);else if(value===true)
254
- element.setAttribute(name,name);else element.setAttribute(name,value);}
255
- return element;},getHeight:function(element){return Element.getDimensions(element).height;},getWidth:function(element){return Element.getDimensions(element).width;},classNames:function(element){return new Element.ClassNames(element);},hasClassName:function(element,className){if(!(element=$(element)))return;var elementClassName=element.className;return(elementClassName.length>0&&(elementClassName==className||new RegExp("(^|\\s)"+className+"(\\s|$)").test(elementClassName)));},addClassName:function(element,className){if(!(element=$(element)))return;if(!Element.hasClassName(element,className))
256
- element.className+=(element.className?' ':'')+className;return element;},removeClassName:function(element,className){if(!(element=$(element)))return;element.className=element.className.replace(new RegExp("(^|\\s+)"+className+"(\\s+|$)"),' ').strip();return element;},toggleClassName:function(element,className){if(!(element=$(element)))return;return Element[Element.hasClassName(element,className)?'removeClassName':'addClassName'](element,className);},cleanWhitespace:function(element){element=$(element);var node=element.firstChild;while(node){var nextNode=node.nextSibling;if(node.nodeType==3&&!/\S/.test(node.nodeValue))
257
- element.removeChild(node);node=nextNode;}
258
- return element;},empty:function(element){return $(element).innerHTML.blank();},descendantOf:function(element,ancestor){element=$(element),ancestor=$(ancestor);if(element.compareDocumentPosition)
259
- return(element.compareDocumentPosition(ancestor)&8)===8;if(ancestor.contains)
260
- return ancestor.contains(element)&&ancestor!==element;while(element=element.parentNode)
261
- if(element==ancestor)return true;return false;},scrollTo:function(element){element=$(element);var pos=Element.cumulativeOffset(element);window.scrollTo(pos[0],pos[1]);return element;},getStyle:function(element,style){element=$(element);style=style=='float'?'cssFloat':style.camelize();var value=element.style[style];if(!value||value=='auto'){var css=document.defaultView.getComputedStyle(element,null);value=css?css[style]:null;}
262
- if(style=='opacity')return value?parseFloat(value):1.0;return value=='auto'?null:value;},getOpacity:function(element){return $(element).getStyle('opacity');},setStyle:function(element,styles){element=$(element);var elementStyle=element.style,match;if(Object.isString(styles)){element.style.cssText+=';'+styles;return styles.include('opacity')?element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]):element;}
263
- for(var property in styles)
264
- if(property=='opacity')element.setOpacity(styles[property]);else
265
- elementStyle[(property=='float'||property=='cssFloat')?(Object.isUndefined(elementStyle.styleFloat)?'cssFloat':'styleFloat'):property]=styles[property];return element;},setOpacity:function(element,value){element=$(element);element.style.opacity=(value==1||value==='')?'':(value<0.00001)?0:value;return element;},makePositioned:function(element){element=$(element);var pos=Element.getStyle(element,'position');if(pos=='static'||!pos){element._madePositioned=true;element.style.position='relative';if(Prototype.Browser.Opera){element.style.top=0;element.style.left=0;}}
266
- return element;},undoPositioned:function(element){element=$(element);if(element._madePositioned){element._madePositioned=undefined;element.style.position=element.style.top=element.style.left=element.style.bottom=element.style.right='';}
267
- return element;},makeClipping:function(element){element=$(element);if(element._overflow)return element;element._overflow=Element.getStyle(element,'overflow')||'auto';if(element._overflow!=='hidden')
268
- element.style.overflow='hidden';return element;},undoClipping:function(element){element=$(element);if(!element._overflow)return element;element.style.overflow=element._overflow=='auto'?'':element._overflow;element._overflow=null;return element;},cumulativeOffset:function(element){var valueT=0,valueL=0;if(element.parentNode){do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;element=element.offsetParent;}while(element);}
269
- return Element._returnOffset(valueL,valueT);},positionedOffset:function(element){var valueT=0,valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;element=element.offsetParent;if(element){if(element.tagName.toUpperCase()=='BODY')break;var p=Element.getStyle(element,'position');if(p!=='static')break;}}while(element);return Element._returnOffset(valueL,valueT);},absolutize:function(element){element=$(element);if(Element.getStyle(element,'position')=='absolute')return element;var offsets=Element.positionedOffset(element),top=offsets[1],left=offsets[0],width=element.clientWidth,height=element.clientHeight;element._originalLeft=left-parseFloat(element.style.left||0);element._originalTop=top-parseFloat(element.style.top||0);element._originalWidth=element.style.width;element._originalHeight=element.style.height;element.style.position='absolute';element.style.top=top+'px';element.style.left=left+'px';element.style.width=width+'px';element.style.height=height+'px';return element;},relativize:function(element){element=$(element);if(Element.getStyle(element,'position')=='relative')return element;element.style.position='relative';var top=parseFloat(element.style.top||0)-(element._originalTop||0),left=parseFloat(element.style.left||0)-(element._originalLeft||0);element.style.top=top+'px';element.style.left=left+'px';element.style.height=element._originalHeight;element.style.width=element._originalWidth;return element;},cumulativeScrollOffset:function(element){var valueT=0,valueL=0;do{valueT+=element.scrollTop||0;valueL+=element.scrollLeft||0;element=element.parentNode;}while(element);return Element._returnOffset(valueL,valueT);},getOffsetParent:function(element){if(element.offsetParent)return $(element.offsetParent);if(element==document.body)return $(element);while((element=element.parentNode)&&element!=document.body)
270
- if(Element.getStyle(element,'position')!='static')
271
- return $(element);return $(document.body);},viewportOffset:function(forElement){var valueT=0,valueL=0,element=forElement;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;if(element.offsetParent==document.body&&Element.getStyle(element,'position')=='absolute')break;}while(element=element.offsetParent);element=forElement;do{if(!Prototype.Browser.Opera||(element.tagName&&(element.tagName.toUpperCase()=='BODY'))){valueT-=element.scrollTop||0;valueL-=element.scrollLeft||0;}}while(element=element.parentNode);return Element._returnOffset(valueL,valueT);},clonePosition:function(element,source){var options=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});source=$(source);var p=Element.viewportOffset(source),delta=[0,0],parent=null;element=$(element);if(Element.getStyle(element,'position')=='absolute'){parent=Element.getOffsetParent(element);delta=Element.viewportOffset(parent);}
272
- if(parent==document.body){delta[0]-=document.body.offsetLeft;delta[1]-=document.body.offsetTop;}
273
- if(options.setLeft)element.style.left=(p[0]-delta[0]+options.offsetLeft)+'px';if(options.setTop)element.style.top=(p[1]-delta[1]+options.offsetTop)+'px';if(options.setWidth)element.style.width=source.offsetWidth+'px';if(options.setHeight)element.style.height=source.offsetHeight+'px';return element;}};Object.extend(Element.Methods,{getElementsBySelector:Element.Methods.select,childElements:Element.Methods.immediateDescendants});Element._attributeTranslations={write:{names:{className:'class',htmlFor:'for'},values:{}}};if(Prototype.Browser.Opera){Element.Methods.getStyle=Element.Methods.getStyle.wrap(function(proceed,element,style){switch(style){case'left':case'top':case'right':case'bottom':if(proceed(element,'position')==='static')return null;case'height':case'width':if(!Element.visible(element))return null;var dim=parseInt(proceed(element,style),10);if(dim!==element['offset'+style.capitalize()])
274
- return dim+'px';var properties;if(style==='height'){properties=['border-top-width','padding-top','padding-bottom','border-bottom-width'];}
275
- else{properties=['border-left-width','padding-left','padding-right','border-right-width'];}
276
- return properties.inject(dim,function(memo,property){var val=proceed(element,property);return val===null?memo:memo-parseInt(val,10);})+'px';default:return proceed(element,style);}});Element.Methods.readAttribute=Element.Methods.readAttribute.wrap(function(proceed,element,attribute){if(attribute==='title')return element.title;return proceed(element,attribute);});}
277
- else if(Prototype.Browser.IE){Element.Methods.getOffsetParent=Element.Methods.getOffsetParent.wrap(function(proceed,element){element=$(element);if(!element.parentNode)return $(document.body);var position=element.getStyle('position');if(position!=='static')return proceed(element);element.setStyle({position:'relative'});var value=proceed(element);element.setStyle({position:position});return value;});$w('positionedOffset viewportOffset').each(function(method){Element.Methods[method]=Element.Methods[method].wrap(function(proceed,element){element=$(element);if(!element.parentNode)return Element._returnOffset(0,0);var position=element.getStyle('position');if(position!=='static')return proceed(element);var offsetParent=element.getOffsetParent();if(offsetParent&&offsetParent.getStyle('position')==='fixed')
278
- offsetParent.setStyle({zoom:1});element.setStyle({position:'relative'});var value=proceed(element);element.setStyle({position:position});return value;});});Element.Methods.getStyle=function(element,style){element=$(element);style=(style=='float'||style=='cssFloat')?'styleFloat':style.camelize();var value=element.style[style];if(!value&&element.currentStyle)value=element.currentStyle[style];if(style=='opacity'){if(value=(element.getStyle('filter')||'').match(/alpha\(opacity=(.*)\)/))
279
- if(value[1])return parseFloat(value[1])/100;return 1.0;}
280
- if(value=='auto'){if((style=='width'||style=='height')&&(element.getStyle('display')!='none'))
281
- return element['offset'+style.capitalize()]+'px';return null;}
282
- return value;};Element.Methods.setOpacity=function(element,value){function stripAlpha(filter){return filter.replace(/alpha\([^\)]*\)/gi,'');}
283
- element=$(element);var currentStyle=element.currentStyle;if((currentStyle&&!currentStyle.hasLayout)||(!currentStyle&&element.style.zoom=='normal'))
284
- element.style.zoom=1;var filter=element.getStyle('filter'),style=element.style;if(value==1||value===''){(filter=stripAlpha(filter))?style.filter=filter:style.removeAttribute('filter');return element;}else if(value<0.00001)value=0;style.filter=stripAlpha(filter)+'alpha(opacity='+(value*100)+')';return element;};Element._attributeTranslations=(function(){var classProp='className',forProp='for',el=document.createElement('div');el.setAttribute(classProp,'x');if(el.className!=='x'){el.setAttribute('class','x');if(el.className==='x'){classProp='class';}}
285
- el=null;el=document.createElement('label');el.setAttribute(forProp,'x');if(el.htmlFor!=='x'){el.setAttribute('htmlFor','x');if(el.htmlFor==='x'){forProp='htmlFor';}}
286
- el=null;return{read:{names:{'class':classProp,'className':classProp,'for':forProp,'htmlFor':forProp},values:{_getAttr:function(element,attribute){return element.getAttribute(attribute);},_getAttr2:function(element,attribute){return element.getAttribute(attribute,2);},_getAttrNode:function(element,attribute){var node=element.getAttributeNode(attribute);return node?node.value:"";},_getEv:(function(){var el=document.createElement('div'),f;el.onclick=Prototype.emptyFunction;var value=el.getAttribute('onclick');if(String(value).indexOf('{')>-1){f=function(element,attribute){attribute=element.getAttribute(attribute);if(!attribute)return null;attribute=attribute.toString();attribute=attribute.split('{')[1];attribute=attribute.split('}')[0];return attribute.strip();};}
287
- else if(value===''){f=function(element,attribute){attribute=element.getAttribute(attribute);if(!attribute)return null;return attribute.strip();};}
288
- el=null;return f;})(),_flag:function(element,attribute){return $(element).hasAttribute(attribute)?attribute:null;},style:function(element){return element.style.cssText.toLowerCase();},title:function(element){return element.title;}}}}})();Element._attributeTranslations.write={names:Object.extend({cellpadding:'cellPadding',cellspacing:'cellSpacing'},Element._attributeTranslations.read.names),values:{checked:function(element,value){element.checked=!!value;},style:function(element,value){element.style.cssText=value?value:'';}}};Element._attributeTranslations.has={};$w('colSpan rowSpan vAlign dateTime accessKey tabIndex '+'encType maxLength readOnly longDesc frameBorder').each(function(attr){Element._attributeTranslations.write.names[attr.toLowerCase()]=attr;Element._attributeTranslations.has[attr.toLowerCase()]=attr;});(function(v){Object.extend(v,{href:v._getAttr2,src:v._getAttr2,type:v._getAttr,action:v._getAttrNode,disabled:v._flag,checked:v._flag,readonly:v._flag,multiple:v._flag,onload:v._getEv,onunload:v._getEv,onclick:v._getEv,ondblclick:v._getEv,onmousedown:v._getEv,onmouseup:v._getEv,onmouseover:v._getEv,onmousemove:v._getEv,onmouseout:v._getEv,onfocus:v._getEv,onblur:v._getEv,onkeypress:v._getEv,onkeydown:v._getEv,onkeyup:v._getEv,onsubmit:v._getEv,onreset:v._getEv,onselect:v._getEv,onchange:v._getEv});})(Element._attributeTranslations.read.values);if(Prototype.BrowserFeatures.ElementExtensions){(function(){function _descendants(element){var nodes=element.getElementsByTagName('*'),results=[];for(var i=0,node;node=nodes[i];i++)
289
- if(node.tagName!=="!")
290
- results.push(node);return results;}
291
- Element.Methods.down=function(element,expression,index){element=$(element);if(arguments.length==1)return element.firstDescendant();return Object.isNumber(expression)?_descendants(element)[expression]:Element.select(element,expression)[index||0];}})();}}
292
- else if(Prototype.Browser.Gecko&&/rv:1\.8\.0/.test(navigator.userAgent)){Element.Methods.setOpacity=function(element,value){element=$(element);element.style.opacity=(value==1)?0.999999:(value==='')?'':(value<0.00001)?0:value;return element;};}
293
- else if(Prototype.Browser.WebKit){Element.Methods.setOpacity=function(element,value){element=$(element);element.style.opacity=(value==1||value==='')?'':(value<0.00001)?0:value;if(value==1)
294
- if(element.tagName.toUpperCase()=='IMG'&&element.width){element.width++;element.width--;}else try{var n=document.createTextNode(' ');element.appendChild(n);element.removeChild(n);}catch(e){}
295
- return element;};Element.Methods.cumulativeOffset=function(element){var valueT=0,valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;if(element.offsetParent==document.body)
296
- if(Element.getStyle(element,'position')=='absolute')break;element=element.offsetParent;}while(element);return Element._returnOffset(valueL,valueT);};}
297
- if('outerHTML'in document.documentElement){Element.Methods.replace=function(element,content){element=$(element);if(content&&content.toElement)content=content.toElement();if(Object.isElement(content)){element.parentNode.replaceChild(content,element);return element;}
298
- content=Object.toHTML(content);var parent=element.parentNode,tagName=parent.tagName.toUpperCase();if(Element._insertionTranslations.tags[tagName]){var nextSibling=element.next(),fragments=Element._getContentFromAnonymousElement(tagName,content.stripScripts());parent.removeChild(element);if(nextSibling)
299
- fragments.each(function(node){parent.insertBefore(node,nextSibling)});else
300
- fragments.each(function(node){parent.appendChild(node)});}
301
- else element.outerHTML=content.stripScripts();content.evalScripts.bind(content).defer();return element;};}
302
- Element._returnOffset=function(l,t){var result=[l,t];result.left=l;result.top=t;return result;};Element._getContentFromAnonymousElement=function(tagName,html){var div=new Element('div'),t=Element._insertionTranslations.tags[tagName];if(t){div.innerHTML=t[0]+html+t[1];for(var i=t[2];i--;){div=div.firstChild;}}
303
- else{div.innerHTML=html;}
304
- return $A(div.childNodes);};Element._insertionTranslations={before:function(element,node){element.parentNode.insertBefore(node,element);},top:function(element,node){element.insertBefore(node,element.firstChild);},bottom:function(element,node){element.appendChild(node);},after:function(element,node){element.parentNode.insertBefore(node,element.nextSibling);},tags:{TABLE:['<table>','</table>',1],TBODY:['<table><tbody>','</tbody></table>',2],TR:['<table><tbody><tr>','</tr></tbody></table>',3],TD:['<table><tbody><tr><td>','</td></tr></tbody></table>',4],SELECT:['<select>','</select>',1]}};(function(){var tags=Element._insertionTranslations.tags;Object.extend(tags,{THEAD:tags.TBODY,TFOOT:tags.TBODY,TH:tags.TD});})();Element.Methods.Simulated={hasAttribute:function(element,attribute){attribute=Element._attributeTranslations.has[attribute]||attribute;var node=$(element).getAttributeNode(attribute);return!!(node&&node.specified);}};Element.Methods.ByTag={};Object.extend(Element,Element.Methods);(function(div){if(!Prototype.BrowserFeatures.ElementExtensions&&div['__proto__']){window.HTMLElement={};window.HTMLElement.prototype=div['__proto__'];Prototype.BrowserFeatures.ElementExtensions=true;}
305
- div=null;})(document.createElement('div'));Element.extend=(function(){function checkDeficiency(tagName){if(typeof window.Element!='undefined'){var proto=window.Element.prototype;if(proto){var id='_'+(Math.random()+'').slice(2),el=document.createElement(tagName);proto[id]='x';var isBuggy=(el[id]!=='x');delete proto[id];el=null;return isBuggy;}}
306
- return false;}
307
- function extendElementWith(element,methods){for(var property in methods){var value=methods[property];if(Object.isFunction(value)&&!(property in element))
308
- element[property]=value.methodize();}}
309
- var HTMLOBJECTELEMENT_PROTOTYPE_BUGGY=checkDeficiency('object');if(Prototype.BrowserFeatures.SpecificElementExtensions){if(HTMLOBJECTELEMENT_PROTOTYPE_BUGGY){return function(element){if(element&&typeof element._extendedByPrototype=='undefined'){var t=element.tagName;if(t&&(/^(?:object|applet|embed)$/i.test(t))){extendElementWith(element,Element.Methods);extendElementWith(element,Element.Methods.Simulated);extendElementWith(element,Element.Methods.ByTag[t.toUpperCase()]);}}
310
- return element;}}
311
- return Prototype.K;}
312
- var Methods={},ByTag=Element.Methods.ByTag;var extend=Object.extend(function(element){if(!element||typeof element._extendedByPrototype!='undefined'||element.nodeType!=1||element==window)return element;var methods=Object.clone(Methods),tagName=element.tagName.toUpperCase();if(ByTag[tagName])Object.extend(methods,ByTag[tagName]);extendElementWith(element,methods);element._extendedByPrototype=Prototype.emptyFunction;return element;},{refresh:function(){if(!Prototype.BrowserFeatures.ElementExtensions){Object.extend(Methods,Element.Methods);Object.extend(Methods,Element.Methods.Simulated);}}});extend.refresh();return extend;})();if(document.documentElement.hasAttribute){Element.hasAttribute=function(element,attribute){return element.hasAttribute(attribute);};}
313
- else{Element.hasAttribute=Element.Methods.Simulated.hasAttribute;}
314
- Element.addMethods=function(methods){var F=Prototype.BrowserFeatures,T=Element.Methods.ByTag;if(!methods){Object.extend(Form,Form.Methods);Object.extend(Form.Element,Form.Element.Methods);Object.extend(Element.Methods.ByTag,{"FORM":Object.clone(Form.Methods),"INPUT":Object.clone(Form.Element.Methods),"SELECT":Object.clone(Form.Element.Methods),"TEXTAREA":Object.clone(Form.Element.Methods)});}
315
- if(arguments.length==2){var tagName=methods;methods=arguments[1];}
316
- if(!tagName)Object.extend(Element.Methods,methods||{});else{if(Object.isArray(tagName))tagName.each(extend);else extend(tagName);}
317
- function extend(tagName){tagName=tagName.toUpperCase();if(!Element.Methods.ByTag[tagName])
318
- Element.Methods.ByTag[tagName]={};Object.extend(Element.Methods.ByTag[tagName],methods);}
319
- function copy(methods,destination,onlyIfAbsent){onlyIfAbsent=onlyIfAbsent||false;for(var property in methods){var value=methods[property];if(!Object.isFunction(value))continue;if(!onlyIfAbsent||!(property in destination))
320
- destination[property]=value.methodize();}}
321
- function findDOMClass(tagName){var klass;var trans={"OPTGROUP":"OptGroup","TEXTAREA":"TextArea","P":"Paragraph","FIELDSET":"FieldSet","UL":"UList","OL":"OList","DL":"DList","DIR":"Directory","H1":"Heading","H2":"Heading","H3":"Heading","H4":"Heading","H5":"Heading","H6":"Heading","Q":"Quote","INS":"Mod","DEL":"Mod","A":"Anchor","IMG":"Image","CAPTION":"TableCaption","COL":"TableCol","COLGROUP":"TableCol","THEAD":"TableSection","TFOOT":"TableSection","TBODY":"TableSection","TR":"TableRow","TH":"TableCell","TD":"TableCell","FRAMESET":"FrameSet","IFRAME":"IFrame"};if(trans[tagName])klass='HTML'+trans[tagName]+'Element';if(window[klass])return window[klass];klass='HTML'+tagName+'Element';if(window[klass])return window[klass];klass='HTML'+tagName.capitalize()+'Element';if(window[klass])return window[klass];var element=document.createElement(tagName),proto=element['__proto__']||element.constructor.prototype;element=null;return proto;}
322
- var elementPrototype=window.HTMLElement?HTMLElement.prototype:Element.prototype;if(F.ElementExtensions){copy(Element.Methods,elementPrototype);copy(Element.Methods.Simulated,elementPrototype,true);}
323
- if(F.SpecificElementExtensions){for(var tag in Element.Methods.ByTag){var klass=findDOMClass(tag);if(Object.isUndefined(klass))continue;copy(T[tag],klass.prototype);}}
324
- Object.extend(Element,Element.Methods);delete Element.ByTag;if(Element.extend.refresh)Element.extend.refresh();Element.cache={};};document.viewport={getDimensions:function(){return{width:this.getWidth(),height:this.getHeight()};},getScrollOffsets:function(){return Element._returnOffset(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop);}};(function(viewport){var B=Prototype.Browser,doc=document,element,property={};function getRootElement(){if(B.WebKit&&!doc.evaluate)
325
- return document;if(B.Opera&&window.parseFloat(window.opera.version())<9.5)
326
- return document.body;return document.documentElement;}
327
- function define(D){if(!element)element=getRootElement();property[D]='client'+D;viewport['get'+D]=function(){return element[property[D]]};return viewport['get'+D]();}
328
- viewport.getWidth=define.curry('Width');viewport.getHeight=define.curry('Height');})(document.viewport);Element.Storage={UID:1};Element.addMethods({getStorage:function(element){if(!(element=$(element)))return;var uid;if(element===window){uid=0;}else{if(typeof element._prototypeUID==="undefined")
329
- element._prototypeUID=Element.Storage.UID++;uid=element._prototypeUID;}
330
- if(!Element.Storage[uid])
331
- Element.Storage[uid]=$H();return Element.Storage[uid];},store:function(element,key,value){if(!(element=$(element)))return;if(arguments.length===2){Element.getStorage(element).update(key);}else{Element.getStorage(element).set(key,value);}
332
- return element;},retrieve:function(element,key,defaultValue){if(!(element=$(element)))return;var hash=Element.getStorage(element),value=hash.get(key);if(Object.isUndefined(value)){hash.set(key,defaultValue);value=defaultValue;}
333
- return value;},clone:function(element,deep){if(!(element=$(element)))return;var clone=element.cloneNode(deep);clone._prototypeUID=void 0;if(deep){var descendants=Element.select(clone,'*'),i=descendants.length;while(i--){descendants[i]._prototypeUID=void 0;}}
334
- return Element.extend(clone);},purge:function(element){if(!(element=$(element)))return;purgeElement(element);var descendants=element.getElementsByTagName('*'),i=descendants.length;while(i--)purgeElement(descendants[i]);return null;}});(function(){function toDecimal(pctString){var match=pctString.match(/^(\d+)%?$/i);if(!match)return null;return(Number(match[1])/100);}
335
- function getPixelValue(value,property){if(Object.isElement(value)){element=value;value=element.getStyle(property);}
336
- if(value===null){return null;}
337
- if((/^(?:-)?\d+(\.\d+)?(px)?$/i).test(value)){return window.parseFloat(value);}
338
- if(/\d/.test(value)&&element.runtimeStyle){var style=element.style.left,rStyle=element.runtimeStyle.left;element.runtimeStyle.left=element.currentStyle.left;element.style.left=value||0;value=element.style.pixelLeft;element.style.left=style;element.runtimeStyle.left=rStyle;return value;}
339
- if(value.include('%')){var decimal=toDecimal(value);var whole;if(property.include('left')||property.include('right')||property.include('width')){whole=$(element.parentNode).measure('width');}else if(property.include('top')||property.include('bottom')||property.include('height')){whole=$(element.parentNode).measure('height');}
340
- return whole*decimal;}
341
- return 0;}
342
- function toCSSPixels(number){if(Object.isString(number)&&number.endsWith('px')){return number;}
343
- return number+'px';}
344
- function isDisplayed(element){var originalElement=element;while(element&&element.parentNode){var display=element.getStyle('display');if(display==='none'){return false;}
345
- element=$(element.parentNode);}
346
- return true;}
347
- var hasLayout=Prototype.K;if('currentStyle'in document.documentElement){hasLayout=function(element){if(!element.currentStyle.hasLayout){element.style.zoom=1;}
348
- return element;};}
349
- function cssNameFor(key){if(key.include('border'))key=key+'-width';return key.camelize();}
350
- Element.Layout=Class.create(Hash,{initialize:function($super,element,preCompute){$super();this.element=$(element);Element.Layout.PROPERTIES.each(function(property){this._set(property,null);},this);if(preCompute){this._preComputing=true;this._begin();Element.Layout.PROPERTIES.each(this._compute,this);this._end();this._preComputing=false;}},_set:function(property,value){return Hash.prototype.set.call(this,property,value);},set:function(property,value){throw"Properties of Element.Layout are read-only.";},get:function($super,property){var value=$super(property);return value===null?this._compute(property):value;},_begin:function(){if(this._prepared)return;var element=this.element;if(isDisplayed(element)){this._prepared=true;return;}
351
- var originalStyles={position:element.style.position||'',width:element.style.width||'',visibility:element.style.visibility||'',display:element.style.display||''};element.store('prototype_original_styles',originalStyles);var position=element.getStyle('position'),width=element.getStyle('width');element.setStyle({position:'absolute',visibility:'hidden',display:'block'});var positionedWidth=element.getStyle('width');var newWidth;if(width&&(positionedWidth===width)){newWidth=getPixelValue(width);}else if(width&&(position==='absolute'||position==='fixed')){newWidth=getPixelValue(width);}else{var parent=element.parentNode,pLayout=$(parent).getLayout();newWidth=pLayout.get('width')-this.get('margin-left')-this.get('border-left')-this.get('padding-left')-this.get('padding-right')-this.get('border-right')-this.get('margin-right');}
352
- element.setStyle({width:newWidth+'px'});this._prepared=true;},_end:function(){var element=this.element;var originalStyles=element.retrieve('prototype_original_styles');element.store('prototype_original_styles',null);element.setStyle(originalStyles);this._prepared=false;},_compute:function(property){var COMPUTATIONS=Element.Layout.COMPUTATIONS;if(!(property in COMPUTATIONS)){throw"Property not found.";}
353
- return this._set(property,COMPUTATIONS[property].call(this,this.element));},toObject:function(){var args=$A(arguments);var keys=(args.length===0)?Element.Layout.PROPERTIES:args.join(' ').split(' ');var obj={};keys.each(function(key){if(!Element.Layout.PROPERTIES.include(key))return;var value=this.get(key);if(value!=null)obj[key]=value;},this);return obj;},toHash:function(){var obj=this.toObject.apply(this,arguments);return new Hash(obj);},toCSS:function(){var args=$A(arguments);var keys=(args.length===0)?Element.Layout.PROPERTIES:args.join(' ').split(' ');var css={};keys.each(function(key){if(!Element.Layout.PROPERTIES.include(key))return;if(Element.Layout.COMPOSITE_PROPERTIES.include(key))return;var value=this.get(key);if(value!=null)css[cssNameFor(key)]=value+'px';},this);return css;},inspect:function(){return"#<Element.Layout>";}});Object.extend(Element.Layout,{PROPERTIES:$w('height width top left right bottom border-left border-right border-top border-bottom padding-left padding-right padding-top padding-bottom margin-top margin-bottom margin-left margin-right padding-box-width padding-box-height border-box-width border-box-height margin-box-width margin-box-height'),COMPOSITE_PROPERTIES:$w('padding-box-width padding-box-height margin-box-width margin-box-height border-box-width border-box-height'),COMPUTATIONS:{'height':function(element){if(!this._preComputing)this._begin();var bHeight=this.get('border-box-height');if(bHeight<=0)return 0;var bTop=this.get('border-top'),bBottom=this.get('border-bottom');var pTop=this.get('padding-top'),pBottom=this.get('padding-bottom');if(!this._preComputing)this._end();return bHeight-bTop-bBottom-pTop-pBottom;},'width':function(element){if(!this._preComputing)this._begin();var bWidth=this.get('border-box-width');if(bWidth<=0)return 0;var bLeft=this.get('border-left'),bRight=this.get('border-right');var pLeft=this.get('padding-left'),pRight=this.get('padding-right');if(!this._preComputing)this._end();return bWidth-bLeft-bRight-pLeft-pRight;},'padding-box-height':function(element){var height=this.get('height'),pTop=this.get('padding-top'),pBottom=this.get('padding-bottom');return height+pTop+pBottom;},'padding-box-width':function(element){var width=this.get('width'),pLeft=this.get('padding-left'),pRight=this.get('padding-right');return width+pLeft+pRight;},'border-box-height':function(element){return element.offsetHeight;},'border-box-width':function(element){return element.offsetWidth;},'margin-box-height':function(element){var bHeight=this.get('border-box-height'),mTop=this.get('margin-top'),mBottom=this.get('margin-bottom');if(bHeight<=0)return 0;return bHeight+mTop+mBottom;},'margin-box-width':function(element){var bWidth=this.get('border-box-width'),mLeft=this.get('margin-left'),mRight=this.get('margin-right');if(bWidth<=0)return 0;return bWidth+mLeft+mRight;},'top':function(element){var offset=element.positionedOffset();return offset.top;},'bottom':function(element){var offset=element.positionedOffset(),parent=element.getOffsetParent(),pHeight=parent.measure('height');var mHeight=this.get('border-box-height');return pHeight-mHeight-offset.top;},'left':function(element){var offset=element.positionedOffset();return offset.left;},'right':function(element){var offset=element.positionedOffset(),parent=element.getOffsetParent(),pWidth=parent.measure('width');var mWidth=this.get('border-box-width');return pWidth-mWidth-offset.left;},'padding-top':function(element){return getPixelValue(element,'paddingTop');},'padding-bottom':function(element){return getPixelValue(element,'paddingBottom');},'padding-left':function(element){return getPixelValue(element,'paddingLeft');},'padding-right':function(element){return getPixelValue(element,'paddingRight');},'border-top':function(element){return Object.isNumber(element.clientTop)?element.clientTop:getPixelValue(element,'borderTopWidth');},'border-bottom':function(element){return Object.isNumber(element.clientBottom)?element.clientBottom:getPixelValue(element,'borderBottomWidth');},'border-left':function(element){return Object.isNumber(element.clientLeft)?element.clientLeft:getPixelValue(element,'borderLeftWidth');},'border-right':function(element){return Object.isNumber(element.clientRight)?element.clientRight:getPixelValue(element,'borderRightWidth');},'margin-top':function(element){return getPixelValue(element,'marginTop');},'margin-bottom':function(element){return getPixelValue(element,'marginBottom');},'margin-left':function(element){return getPixelValue(element,'marginLeft');},'margin-right':function(element){return getPixelValue(element,'marginRight');}}});if('getBoundingClientRect'in document.documentElement){Object.extend(Element.Layout.COMPUTATIONS,{'right':function(element){var parent=hasLayout(element.getOffsetParent());var rect=element.getBoundingClientRect(),pRect=parent.getBoundingClientRect();return(pRect.right-rect.right).round();},'bottom':function(element){var parent=hasLayout(element.getOffsetParent());var rect=element.getBoundingClientRect(),pRect=parent.getBoundingClientRect();return(pRect.bottom-rect.bottom).round();}});}
354
- Element.Offset=Class.create({initialize:function(left,top){this.left=left.round();this.top=top.round();this[0]=this.left;this[1]=this.top;},relativeTo:function(offset){return new Element.Offset(this.left-offset.left,this.top-offset.top);},inspect:function(){return"#<Element.Offset left: #{left} top: #{top}>".interpolate(this);},toString:function(){return"[#{left}, #{top}]".interpolate(this);},toArray:function(){return[this.left,this.top];}});function getLayout(element,preCompute){return new Element.Layout(element,preCompute);}
355
- function measure(element,property){return $(element).getLayout().get(property);}
356
- function getDimensions(element){var layout=$(element).getLayout();return{width:layout.get('width'),height:layout.get('height')};}
357
- function getOffsetParent(element){if(isDetached(element))return $(document.body);var isInline=(Element.getStyle(element,'display')==='inline');if(!isInline&&element.offsetParent)return $(element.offsetParent);if(element===document.body)return $(element);while((element=element.parentNode)&&element!==document.body){if(Element.getStyle(element,'position')!=='static'){return(element.nodeName==='HTML')?$(document.body):$(element);}}
358
- return $(document.body);}
359
- function cumulativeOffset(element){var valueT=0,valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;element=element.offsetParent;}while(element);return new Element.Offset(valueL,valueT);}
360
- function positionedOffset(element){var layout=element.getLayout();var valueT=0,valueL=0;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;element=element.offsetParent;if(element){if(isBody(element))break;var p=Element.getStyle(element,'position');if(p!=='static')break;}}while(element);valueL-=layout.get('margin-top');valueT-=layout.get('margin-left');return new Element.Offset(valueL,valueT);}
361
- function cumulativeScrollOffset(element){var valueT=0,valueL=0;do{valueT+=element.scrollTop||0;valueL+=element.scrollLeft||0;element=element.parentNode;}while(element);return new Element.Offset(valueL,valueT);}
362
- function viewportOffset(forElement){var valueT=0,valueL=0,docBody=document.body;var element=forElement;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;if(element.offsetParent==docBody&&Element.getStyle(element,'position')=='absolute')break;}while(element=element.offsetParent);element=forElement;do{if(element!=docBody){valueT-=element.scrollTop||0;valueL-=element.scrollLeft||0;}}while(element=element.parentNode);return new Element.Offset(valueL,valueT);}
363
- function absolutize(element){element=$(element);if(Element.getStyle(element,'position')==='absolute'){return element;}
364
- var offsetParent=getOffsetParent(element);var eOffset=element.viewportOffset(),pOffset=offsetParent.viewportOffset();var offset=eOffset.relativeTo(pOffset);var layout=element.getLayout();element.store('prototype_absolutize_original_styles',{left:element.getStyle('left'),top:element.getStyle('top'),width:element.getStyle('width'),height:element.getStyle('height')});element.setStyle({position:'absolute',top:offset.top+'px',left:offset.left+'px',width:layout.get('width')+'px',height:layout.get('height')+'px'});return element;}
365
- function relativize(element){element=$(element);if(Element.getStyle(element,'position')==='relative'){return element;}
366
- var originalStyles=element.retrieve('prototype_absolutize_original_styles');if(originalStyles)element.setStyle(originalStyles);return element;}
367
- Element.addMethods({getLayout:getLayout,measure:measure,getDimensions:getDimensions,getOffsetParent:getOffsetParent,cumulativeOffset:cumulativeOffset,positionedOffset:positionedOffset,cumulativeScrollOffset:cumulativeScrollOffset,viewportOffset:viewportOffset,absolutize:absolutize,relativize:relativize});function isBody(element){return element.nodeName.toUpperCase()==='BODY';}
368
- function isDetached(element){return element!==document.body&&!Element.descendantOf(element,document.body);}
369
- if('getBoundingClientRect'in document.documentElement){Element.addMethods({viewportOffset:function(element){element=$(element);if(isDetached(element))return new Element.Offset(0,0);var rect=element.getBoundingClientRect(),docEl=document.documentElement;return new Element.Offset(rect.left-docEl.clientLeft,rect.top-docEl.clientTop);},positionedOffset:function(element){element=$(element);var parent=element.getOffsetParent();if(isDetached(element))return new Element.Offset(0,0);if(element.offsetParent&&element.offsetParent.nodeName.toUpperCase()==='HTML'){return positionedOffset(element);}
370
- var eOffset=element.viewportOffset(),pOffset=isBody(parent)?viewportOffset(parent):parent.viewportOffset();var retOffset=eOffset.relativeTo(pOffset);var layout=element.getLayout();var top=retOffset.top-layout.get('margin-top');var left=retOffset.left-layout.get('margin-left');return new Element.Offset(left,top);}});}})();window.$$=function(){var expression=$A(arguments).join(', ');return Prototype.Selector.select(expression,document);};Prototype.Selector=(function(){function select(){throw new Error('Method "Prototype.Selector.select" must be defined.');}
371
- function match(){throw new Error('Method "Prototype.Selector.match" must be defined.');}
372
- function find(elements,expression,index){index=index||0;var match=Prototype.Selector.match,length=elements.length,matchIndex=0,i;for(i=0;i<length;i++){if(match(elements[i],expression)&&index==matchIndex++){return Element.extend(elements[i]);}}}
373
- function extendElements(elements){for(var i=0,length=elements.length;i<length;i++){Element.extend(elements[i]);}
374
- return elements;}
375
- var K=Prototype.K;return{select:select,match:match,find:find,extendElements:(Element.extend===K)?K:extendElements,extendElement:Element.extend};})();Prototype._original_property=window.Sizzle;(function(){var chunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,done=0,toString=Object.prototype.toString,hasDuplicate=false,baseHasDuplicate=true;[0,0].sort(function(){baseHasDuplicate=false;return 0;});var Sizzle=function(selector,context,results,seed){results=results||[];var origContext=context=context||document;if(context.nodeType!==1&&context.nodeType!==9){return[];}
376
- if(!selector||typeof selector!=="string"){return results;}
377
- var parts=[],m,set,checkSet,check,mode,extra,prune=true,contextXML=isXML(context),soFar=selector;while((chunker.exec(""),m=chunker.exec(soFar))!==null){soFar=m[3];parts.push(m[1]);if(m[2]){extra=m[3];break;}}
378
- if(parts.length>1&&origPOS.exec(selector)){if(parts.length===2&&Expr.relative[parts[0]]){set=posProcess(parts[0]+parts[1],context);}else{set=Expr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);while(parts.length){selector=parts.shift();if(Expr.relative[selector])
379
- selector+=parts.shift();set=posProcess(selector,set);}}}else{if(!seed&&parts.length>1&&context.nodeType===9&&!contextXML&&Expr.match.ID.test(parts[0])&&!Expr.match.ID.test(parts[parts.length-1])){var ret=Sizzle.find(parts.shift(),context,contextXML);context=ret.expr?Sizzle.filter(ret.expr,ret.set)[0]:ret.set[0];}
380
- if(context){var ret=seed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop(),parts.length===1&&(parts[0]==="~"||parts[0]==="+")&&context.parentNode?context.parentNode:context,contextXML);set=ret.expr?Sizzle.filter(ret.expr,ret.set):ret.set;if(parts.length>0){checkSet=makeArray(set);}else{prune=false;}
381
- while(parts.length){var cur=parts.pop(),pop=cur;if(!Expr.relative[cur]){cur="";}else{pop=parts.pop();}
382
- if(pop==null){pop=context;}
383
- Expr.relative[cur](checkSet,pop,contextXML);}}else{checkSet=parts=[];}}
384
- if(!checkSet){checkSet=set;}
385
- if(!checkSet){throw"Syntax error, unrecognized expression: "+(cur||selector);}
386
- if(toString.call(checkSet)==="[object Array]"){if(!prune){results.push.apply(results,checkSet);}else if(context&&context.nodeType===1){for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&contains(context,checkSet[i]))){results.push(set[i]);}}}else{for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&checkSet[i].nodeType===1){results.push(set[i]);}}}}else{makeArray(checkSet,results);}
387
- if(extra){Sizzle(extra,origContext,results,seed);Sizzle.uniqueSort(results);}
388
- return results;};Sizzle.uniqueSort=function(results){if(sortOrder){hasDuplicate=baseHasDuplicate;results.sort(sortOrder);if(hasDuplicate){for(var i=1;i<results.length;i++){if(results[i]===results[i-1]){results.splice(i--,1);}}}}
389
- return results;};Sizzle.matches=function(expr,set){return Sizzle(expr,null,null,set);};Sizzle.find=function(expr,context,isXML){var set,match;if(!expr){return[];}
390
- for(var i=0,l=Expr.order.length;i<l;i++){var type=Expr.order[i],match;if((match=Expr.leftMatch[type].exec(expr))){var left=match[1];match.splice(1,1);if(left.substr(left.length-1)!=="\\"){match[1]=(match[1]||"").replace(/\\/g,"");set=Expr.find[type](match,context,isXML);if(set!=null){expr=expr.replace(Expr.match[type],"");break;}}}}
391
- if(!set){set=context.getElementsByTagName("*");}
392
- return{set:set,expr:expr};};Sizzle.filter=function(expr,set,inplace,not){var old=expr,result=[],curLoop=set,match,anyFound,isXMLFilter=set&&set[0]&&isXML(set[0]);while(expr&&set.length){for(var type in Expr.filter){if((match=Expr.match[type].exec(expr))!=null){var filter=Expr.filter[type],found,item;anyFound=false;if(curLoop==result){result=[];}
393
- if(Expr.preFilter[type]){match=Expr.preFilter[type](match,curLoop,inplace,result,not,isXMLFilter);if(!match){anyFound=found=true;}else if(match===true){continue;}}
394
- if(match){for(var i=0;(item=curLoop[i])!=null;i++){if(item){found=filter(item,match,i,curLoop);var pass=not^!!found;if(inplace&&found!=null){if(pass){anyFound=true;}else{curLoop[i]=false;}}else if(pass){result.push(item);anyFound=true;}}}}
395
- if(found!==undefined){if(!inplace){curLoop=result;}
396
- expr=expr.replace(Expr.match[type],"");if(!anyFound){return[];}
397
- break;}}}
398
- if(expr==old){if(anyFound==null){throw"Syntax error, unrecognized expression: "+expr;}else{break;}}
399
- old=expr;}
400
- return curLoop;};var Expr=Sizzle.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(elem){return elem.getAttribute("href");}},relative:{"+":function(checkSet,part,isXML){var isPartStr=typeof part==="string",isTag=isPartStr&&!/\W/.test(part),isPartStrNotTag=isPartStr&&!isTag;if(isTag&&!isXML){part=part.toUpperCase();}
401
- for(var i=0,l=checkSet.length,elem;i<l;i++){if((elem=checkSet[i])){while((elem=elem.previousSibling)&&elem.nodeType!==1){}
402
- checkSet[i]=isPartStrNotTag||elem&&elem.nodeName===part?elem||false:elem===part;}}
403
- if(isPartStrNotTag){Sizzle.filter(part,checkSet,true);}},">":function(checkSet,part,isXML){var isPartStr=typeof part==="string";if(isPartStr&&!/\W/.test(part)){part=isXML?part:part.toUpperCase();for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){var parent=elem.parentNode;checkSet[i]=parent.nodeName===part?parent:false;}}}else{for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){checkSet[i]=isPartStr?elem.parentNode:elem.parentNode===part;}}
404
- if(isPartStr){Sizzle.filter(part,checkSet,true);}}},"":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(!/\W/.test(part)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck;}
405
- checkFn("parentNode",part,doneName,checkSet,nodeCheck,isXML);},"~":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(typeof part==="string"&&!/\W/.test(part)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck;}
406
- checkFn("previousSibling",part,doneName,checkSet,nodeCheck,isXML);}},find:{ID:function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?[m]:[];}},NAME:function(match,context,isXML){if(typeof context.getElementsByName!=="undefined"){var ret=[],results=context.getElementsByName(match[1]);for(var i=0,l=results.length;i<l;i++){if(results[i].getAttribute("name")===match[1]){ret.push(results[i]);}}
407
- return ret.length===0?null:ret;}},TAG:function(match,context){return context.getElementsByTagName(match[1]);}},preFilter:{CLASS:function(match,curLoop,inplace,result,not,isXML){match=" "+match[1].replace(/\\/g,"")+" ";if(isXML){return match;}
408
- for(var i=0,elem;(elem=curLoop[i])!=null;i++){if(elem){if(not^(elem.className&&(" "+elem.className+" ").indexOf(match)>=0)){if(!inplace)
409
- result.push(elem);}else if(inplace){curLoop[i]=false;}}}
410
- return false;},ID:function(match){return match[1].replace(/\\/g,"");},TAG:function(match,curLoop){for(var i=0;curLoop[i]===false;i++){}
411
- return curLoop[i]&&isXML(curLoop[i])?match[1]:match[1].toUpperCase();},CHILD:function(match){if(match[1]=="nth"){var test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(match[2]=="even"&&"2n"||match[2]=="odd"&&"2n+1"||!/\D/.test(match[2])&&"0n+"+match[2]||match[2]);match[2]=(test[1]+(test[2]||1))-0;match[3]=test[3]-0;}
412
- match[0]=done++;return match;},ATTR:function(match,curLoop,inplace,result,not,isXML){var name=match[1].replace(/\\/g,"");if(!isXML&&Expr.attrMap[name]){match[1]=Expr.attrMap[name];}
413
- if(match[2]==="~="){match[4]=" "+match[4]+" ";}
414
- return match;},PSEUDO:function(match,curLoop,inplace,result,not){if(match[1]==="not"){if((chunker.exec(match[3])||"").length>1||/^\w/.test(match[3])){match[3]=Sizzle(match[3],null,null,curLoop);}else{var ret=Sizzle.filter(match[3],curLoop,inplace,true^not);if(!inplace){result.push.apply(result,ret);}
415
- return false;}}else if(Expr.match.POS.test(match[0])||Expr.match.CHILD.test(match[0])){return true;}
416
- return match;},POS:function(match){match.unshift(true);return match;}},filters:{enabled:function(elem){return elem.disabled===false&&elem.type!=="hidden";},disabled:function(elem){return elem.disabled===true;},checked:function(elem){return elem.checked===true;},selected:function(elem){elem.parentNode.selectedIndex;return elem.selected===true;},parent:function(elem){return!!elem.firstChild;},empty:function(elem){return!elem.firstChild;},has:function(elem,i,match){return!!Sizzle(match[3],elem).length;},header:function(elem){return/h\d/i.test(elem.nodeName);},text:function(elem){return"text"===elem.type;},radio:function(elem){return"radio"===elem.type;},checkbox:function(elem){return"checkbox"===elem.type;},file:function(elem){return"file"===elem.type;},password:function(elem){return"password"===elem.type;},submit:function(elem){return"submit"===elem.type;},image:function(elem){return"image"===elem.type;},reset:function(elem){return"reset"===elem.type;},button:function(elem){return"button"===elem.type||elem.nodeName.toUpperCase()==="BUTTON";},input:function(elem){return/input|select|textarea|button/i.test(elem.nodeName);}},setFilters:{first:function(elem,i){return i===0;},last:function(elem,i,match,array){return i===array.length-1;},even:function(elem,i){return i%2===0;},odd:function(elem,i){return i%2===1;},lt:function(elem,i,match){return i<match[3]-0;},gt:function(elem,i,match){return i>match[3]-0;},nth:function(elem,i,match){return match[3]-0==i;},eq:function(elem,i,match){return match[3]-0==i;}},filter:{PSEUDO:function(elem,match,i,array){var name=match[1],filter=Expr.filters[name];if(filter){return filter(elem,i,match,array);}else if(name==="contains"){return(elem.textContent||elem.innerText||"").indexOf(match[3])>=0;}else if(name==="not"){var not=match[3];for(var i=0,l=not.length;i<l;i++){if(not[i]===elem){return false;}}
417
- return true;}},CHILD:function(elem,match){var type=match[1],node=elem;switch(type){case'only':case'first':while((node=node.previousSibling)){if(node.nodeType===1)return false;}
418
- if(type=='first')return true;node=elem;case'last':while((node=node.nextSibling)){if(node.nodeType===1)return false;}
419
- return true;case'nth':var first=match[2],last=match[3];if(first==1&&last==0){return true;}
420
- var doneName=match[0],parent=elem.parentNode;if(parent&&(parent.sizcache!==doneName||!elem.nodeIndex)){var count=0;for(node=parent.firstChild;node;node=node.nextSibling){if(node.nodeType===1){node.nodeIndex=++count;}}
421
- parent.sizcache=doneName;}
422
- var diff=elem.nodeIndex-last;if(first==0){return diff==0;}else{return(diff%first==0&&diff/first>=0);}}},ID:function(elem,match){return elem.nodeType===1&&elem.getAttribute("id")===match;},TAG:function(elem,match){return(match==="*"&&elem.nodeType===1)||elem.nodeName===match;},CLASS:function(elem,match){return(" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(match)>-1;},ATTR:function(elem,match){var name=match[1],result=Expr.attrHandle[name]?Expr.attrHandle[name](elem):elem[name]!=null?elem[name]:elem.getAttribute(name),value=result+"",type=match[2],check=match[4];return result==null?type==="!=":type==="="?value===check:type==="*="?value.indexOf(check)>=0:type==="~="?(" "+value+" ").indexOf(check)>=0:!check?value&&result!==false:type==="!="?value!=check:type==="^="?value.indexOf(check)===0:type==="$="?value.substr(value.length-check.length)===check:type==="|="?value===check||value.substr(0,check.length+1)===check+"-":false;},POS:function(elem,match,i,array){var name=match[2],filter=Expr.setFilters[name];if(filter){return filter(elem,i,match,array);}}}};var origPOS=Expr.match.POS;for(var type in Expr.match){Expr.match[type]=new RegExp(Expr.match[type].source+/(?![^\[]*\])(?![^\(]*\))/.source);Expr.leftMatch[type]=new RegExp(/(^(?:.|\r|\n)*?)/.source+Expr.match[type].source);}
423
- var makeArray=function(array,results){array=Array.prototype.slice.call(array,0);if(results){results.push.apply(results,array);return results;}
424
- return array;};try{Array.prototype.slice.call(document.documentElement.childNodes,0);}catch(e){makeArray=function(array,results){var ret=results||[];if(toString.call(array)==="[object Array]"){Array.prototype.push.apply(ret,array);}else{if(typeof array.length==="number"){for(var i=0,l=array.length;i<l;i++){ret.push(array[i]);}}else{for(var i=0;array[i];i++){ret.push(array[i]);}}}
425
- return ret;};}
426
- var sortOrder;if(document.documentElement.compareDocumentPosition){sortOrder=function(a,b){if(!a.compareDocumentPosition||!b.compareDocumentPosition){if(a==b){hasDuplicate=true;}
427
- return 0;}
428
- var ret=a.compareDocumentPosition(b)&4?-1:a===b?0:1;if(ret===0){hasDuplicate=true;}
429
- return ret;};}else if("sourceIndex"in document.documentElement){sortOrder=function(a,b){if(!a.sourceIndex||!b.sourceIndex){if(a==b){hasDuplicate=true;}
430
- return 0;}
431
- var ret=a.sourceIndex-b.sourceIndex;if(ret===0){hasDuplicate=true;}
432
- return ret;};}else if(document.createRange){sortOrder=function(a,b){if(!a.ownerDocument||!b.ownerDocument){if(a==b){hasDuplicate=true;}
433
- return 0;}
434
- var aRange=a.ownerDocument.createRange(),bRange=b.ownerDocument.createRange();aRange.setStart(a,0);aRange.setEnd(a,0);bRange.setStart(b,0);bRange.setEnd(b,0);var ret=aRange.compareBoundaryPoints(Range.START_TO_END,bRange);if(ret===0){hasDuplicate=true;}
435
- return ret;};}
436
- (function(){var form=document.createElement("div"),id="script"+(new Date).getTime();form.innerHTML="<a name='"+id+"'/>";var root=document.documentElement;root.insertBefore(form,root.firstChild);if(!!document.getElementById(id)){Expr.find.ID=function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?m.id===match[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===match[1]?[m]:undefined:[];}};Expr.filter.ID=function(elem,match){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return elem.nodeType===1&&node&&node.nodeValue===match;};}
437
- root.removeChild(form);root=form=null;})();(function(){var div=document.createElement("div");div.appendChild(document.createComment(""));if(div.getElementsByTagName("*").length>0){Expr.find.TAG=function(match,context){var results=context.getElementsByTagName(match[1]);if(match[1]==="*"){var tmp=[];for(var i=0;results[i];i++){if(results[i].nodeType===1){tmp.push(results[i]);}}
438
- results=tmp;}
439
- return results;};}
440
- div.innerHTML="<a href='#'></a>";if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){Expr.attrHandle.href=function(elem){return elem.getAttribute("href",2);};}
441
- div=null;})();if(document.querySelectorAll)(function(){var oldSizzle=Sizzle,div=document.createElement("div");div.innerHTML="<p class='TEST'></p>";if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){return;}
442
- Sizzle=function(query,context,extra,seed){context=context||document;if(!seed&&context.nodeType===9&&!isXML(context)){try{return makeArray(context.querySelectorAll(query),extra);}catch(e){}}
443
- return oldSizzle(query,context,extra,seed);};for(var prop in oldSizzle){Sizzle[prop]=oldSizzle[prop];}
444
- div=null;})();if(document.getElementsByClassName&&document.documentElement.getElementsByClassName)(function(){var div=document.createElement("div");div.innerHTML="<div class='test e'></div><div class='test'></div>";if(div.getElementsByClassName("e").length===0)
445
- return;div.lastChild.className="e";if(div.getElementsByClassName("e").length===1)
446
- return;Expr.order.splice(1,0,"CLASS");Expr.find.CLASS=function(match,context,isXML){if(typeof context.getElementsByClassName!=="undefined"&&!isXML){return context.getElementsByClassName(match[1]);}};div=null;})();function dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i;}
447
- elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break;}
448
- if(elem.nodeType===1&&!isXML){elem.sizcache=doneName;elem.sizset=i;}
449
- if(elem.nodeName===cur){match=elem;break;}
450
- elem=elem[dir];}
451
- checkSet[i]=match;}}}
452
- function dirCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i;}
453
- elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break;}
454
- if(elem.nodeType===1){if(!isXML){elem.sizcache=doneName;elem.sizset=i;}
455
- if(typeof cur!=="string"){if(elem===cur){match=true;break;}}else if(Sizzle.filter(cur,[elem]).length>0){match=elem;break;}}
456
- elem=elem[dir];}
457
- checkSet[i]=match;}}}
458
- var contains=document.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)&16;}:function(a,b){return a!==b&&(a.contains?a.contains(b):true);};var isXML=function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&elem.ownerDocument.documentElement.nodeName!=="HTML";};var posProcess=function(selector,context){var tmpSet=[],later="",match,root=context.nodeType?[context]:context;while((match=Expr.match.PSEUDO.exec(selector))){later+=match[0];selector=selector.replace(Expr.match.PSEUDO,"");}
459
- selector=Expr.relative[selector]?selector+"*":selector;for(var i=0,l=root.length;i<l;i++){Sizzle(selector,root[i],tmpSet);}
460
- return Sizzle.filter(later,tmpSet);};window.Sizzle=Sizzle;})();;(function(engine){var extendElements=Prototype.Selector.extendElements;function select(selector,scope){return extendElements(engine(selector,scope||document));}
461
- function match(element,selector){return engine.matches(selector,[element]).length==1;}
462
- Prototype.Selector.engine=engine;Prototype.Selector.select=select;Prototype.Selector.match=match;})(Sizzle);window.Sizzle=Prototype._original_property;delete Prototype._original_property;var Form={reset:function(form){form=$(form);form.reset();return form;},serializeElements:function(elements,options){if(typeof options!='object')options={hash:!!options};else if(Object.isUndefined(options.hash))options.hash=true;var key,value,submitted=false,submit=options.submit;var data=elements.inject({},function(result,element){if(!element.disabled&&element.name){key=element.name;value=$(element).getValue();if(value!=null&&element.type!='file'&&(element.type!='submit'||(!submitted&&submit!==false&&(!submit||key==submit)&&(submitted=true)))){if(key in result){if(!Object.isArray(result[key]))result[key]=[result[key]];result[key].push(value);}
463
- else result[key]=value;}}
464
- return result;});return options.hash?data:Object.toQueryString(data);}};Form.Methods={serialize:function(form,options){return Form.serializeElements(Form.getElements(form),options);},getElements:function(form){var elements=$(form).getElementsByTagName('*'),element,arr=[],serializers=Form.Element.Serializers;for(var i=0;element=elements[i];i++){arr.push(element);}
465
- return arr.inject([],function(elements,child){if(serializers[child.tagName.toLowerCase()])
466
- elements.push(Element.extend(child));return elements;})},getInputs:function(form,typeName,name){form=$(form);var inputs=form.getElementsByTagName('input');if(!typeName&&!name)return $A(inputs).map(Element.extend);for(var i=0,matchingInputs=[],length=inputs.length;i<length;i++){var input=inputs[i];if((typeName&&input.type!=typeName)||(name&&input.name!=name))
467
- continue;matchingInputs.push(Element.extend(input));}
468
- return matchingInputs;},disable:function(form){form=$(form);Form.getElements(form).invoke('disable');return form;},enable:function(form){form=$(form);Form.getElements(form).invoke('enable');return form;},findFirstElement:function(form){var elements=$(form).getElements().findAll(function(element){return'hidden'!=element.type&&!element.disabled;});var firstByIndex=elements.findAll(function(element){return element.hasAttribute('tabIndex')&&element.tabIndex>=0;}).sortBy(function(element){return element.tabIndex}).first();return firstByIndex?firstByIndex:elements.find(function(element){return/^(?:input|select|textarea)$/i.test(element.tagName);});},focusFirstElement:function(form){form=$(form);form.findFirstElement().activate();return form;},request:function(form,options){form=$(form),options=Object.clone(options||{});var params=options.parameters,action=form.readAttribute('action')||'';if(action.blank())action=window.location.href;options.parameters=form.serialize(true);if(params){if(Object.isString(params))params=params.toQueryParams();Object.extend(options.parameters,params);}
469
- if(form.hasAttribute('method')&&!options.method)
470
- options.method=form.method;return new Ajax.Request(action,options);}};Form.Element={focus:function(element){$(element).focus();return element;},select:function(element){$(element).select();return element;}};Form.Element.Methods={serialize:function(element){element=$(element);if(!element.disabled&&element.name){var value=element.getValue();if(value!=undefined){var pair={};pair[element.name]=value;return Object.toQueryString(pair);}}
471
- return'';},getValue:function(element){element=$(element);var method=element.tagName.toLowerCase();return Form.Element.Serializers[method](element);},setValue:function(element,value){element=$(element);var method=element.tagName.toLowerCase();Form.Element.Serializers[method](element,value);return element;},clear:function(element){$(element).value='';return element;},present:function(element){return $(element).value!='';},activate:function(element){element=$(element);try{element.focus();if(element.select&&(element.tagName.toLowerCase()!='input'||!(/^(?:button|reset|submit)$/i.test(element.type))))
472
- element.select();}catch(e){}
473
- return element;},disable:function(element){element=$(element);element.disabled=true;return element;},enable:function(element){element=$(element);element.disabled=false;return element;}};var Field=Form.Element;var $F=Form.Element.Methods.getValue;Form.Element.Serializers={input:function(element,value){switch(element.type.toLowerCase()){case'checkbox':case'radio':return Form.Element.Serializers.inputSelector(element,value);default:return Form.Element.Serializers.textarea(element,value);}},inputSelector:function(element,value){if(Object.isUndefined(value))return element.checked?element.value:null;else element.checked=!!value;},textarea:function(element,value){if(Object.isUndefined(value))return element.value;else element.value=value;},select:function(element,value){if(Object.isUndefined(value))
474
- return this[element.type=='select-one'?'selectOne':'selectMany'](element);else{var opt,currentValue,single=!Object.isArray(value);for(var i=0,length=element.length;i<length;i++){opt=element.options[i];currentValue=this.optionValue(opt);if(single){if(currentValue==value){opt.selected=true;return;}}
475
- else opt.selected=value.include(currentValue);}}},selectOne:function(element){var index=element.selectedIndex;return index>=0?this.optionValue(element.options[index]):null;},selectMany:function(element){var values,length=element.length;if(!length)return null;for(var i=0,values=[];i<length;i++){var opt=element.options[i];if(opt.selected)values.push(this.optionValue(opt));}
476
- return values;},optionValue:function(opt){return Element.extend(opt).hasAttribute('value')?opt.value:opt.text;}};Abstract.TimedObserver=Class.create(PeriodicalExecuter,{initialize:function($super,element,frequency,callback){$super(callback,frequency);this.element=$(element);this.lastValue=this.getValue();},execute:function(){var value=this.getValue();if(Object.isString(this.lastValue)&&Object.isString(value)?this.lastValue!=value:String(this.lastValue)!=String(value)){this.callback(this.element,value);this.lastValue=value;}}});Form.Element.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.Element.getValue(this.element);}});Form.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.serialize(this.element);}});Abstract.EventObserver=Class.create({initialize:function(element,callback){this.element=$(element);this.callback=callback;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=='form')
477
- this.registerFormCallbacks();else
478
- this.registerCallback(this.element);},onElementEvent:function(){var value=this.getValue();if(this.lastValue!=value){this.callback(this.element,value);this.lastValue=value;}},registerFormCallbacks:function(){Form.getElements(this.element).each(this.registerCallback,this);},registerCallback:function(element){if(element.type){switch(element.type.toLowerCase()){case'checkbox':case'radio':Event.observe(element,'click',this.onElementEvent.bind(this));break;default:Event.observe(element,'change',this.onElementEvent.bind(this));break;}}}});Form.Element.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.Element.getValue(this.element);}});Form.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.serialize(this.element);}});(function(){var Event={KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,KEY_INSERT:45,cache:{}};var docEl=document.documentElement;var MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED='onmouseenter'in docEl&&'onmouseleave'in docEl;var _isButton;if(Prototype.Browser.IE){var buttonMap={0:1,1:4,2:2};_isButton=function(event,code){return event.button===buttonMap[code];};}else if(Prototype.Browser.WebKit){_isButton=function(event,code){switch(code){case 0:return event.which==1&&!event.metaKey;case 1:return event.which==1&&event.metaKey;default:return false;}};}else{_isButton=function(event,code){return event.which?(event.which===code+1):(event.button===code);};}
479
- function isLeftClick(event){return _isButton(event,0)}
480
- function isMiddleClick(event){return _isButton(event,1)}
481
- function isRightClick(event){return _isButton(event,2)}
482
- function element(event){event=Event.extend(event);var node=event.target,type=event.type,currentTarget=event.currentTarget;if(currentTarget&&currentTarget.tagName){if(type==='load'||type==='error'||(type==='click'&&currentTarget.tagName.toLowerCase()==='input'&&currentTarget.type==='radio'))
483
- node=currentTarget;}
484
- if(node.nodeType==Node.TEXT_NODE)
485
- node=node.parentNode;return Element.extend(node);}
486
- function findElement(event,expression){var element=Event.element(event);if(!expression)return element;while(element){if(Object.isElement(element)&&Prototype.Selector.match(element,expression)){return Element.extend(element);}
487
- element=element.parentNode;}}
488
- function pointer(event){return{x:pointerX(event),y:pointerY(event)};}
489
- function pointerX(event){var docElement=document.documentElement,body=document.body||{scrollLeft:0};return event.pageX||(event.clientX+(docElement.scrollLeft||body.scrollLeft)-(docElement.clientLeft||0));}
490
- function pointerY(event){var docElement=document.documentElement,body=document.body||{scrollTop:0};return event.pageY||(event.clientY+(docElement.scrollTop||body.scrollTop)-(docElement.clientTop||0));}
491
- function stop(event){Event.extend(event);event.preventDefault();event.stopPropagation();event.stopped=true;}
492
- Event.Methods={isLeftClick:isLeftClick,isMiddleClick:isMiddleClick,isRightClick:isRightClick,element:element,findElement:findElement,pointer:pointer,pointerX:pointerX,pointerY:pointerY,stop:stop};var methods=Object.keys(Event.Methods).inject({},function(m,name){m[name]=Event.Methods[name].methodize();return m;});if(Prototype.Browser.IE){function _relatedTarget(event){var element;switch(event.type){case'mouseover':element=event.fromElement;break;case'mouseout':element=event.toElement;break;default:return null;}
493
- return Element.extend(element);}
494
- Object.extend(methods,{stopPropagation:function(){this.cancelBubble=true},preventDefault:function(){this.returnValue=false},inspect:function(){return'[object Event]'}});Event.extend=function(event,element){if(!event)return false;if(event._extendedByPrototype)return event;event._extendedByPrototype=Prototype.emptyFunction;var pointer=Event.pointer(event);Object.extend(event,{target:event.srcElement||element,relatedTarget:_relatedTarget(event),pageX:pointer.x,pageY:pointer.y});return Object.extend(event,methods);};}else{Event.prototype=window.Event.prototype||document.createEvent('HTMLEvents').__proto__;Object.extend(Event.prototype,methods);Event.extend=Prototype.K;}
495
- function _createResponder(element,eventName,handler){var registry=Element.retrieve(element,'prototype_event_registry');if(Object.isUndefined(registry)){CACHE.push(element);registry=Element.retrieve(element,'prototype_event_registry',$H());}
496
- var respondersForEvent=registry.get(eventName);if(Object.isUndefined(respondersForEvent)){respondersForEvent=[];registry.set(eventName,respondersForEvent);}
497
- if(respondersForEvent.pluck('handler').include(handler))return false;var responder;if(eventName.include(":")){responder=function(event){if(Object.isUndefined(event.eventName))
498
- return false;if(event.eventName!==eventName)
499
- return false;Event.extend(event,element);handler.call(element,event);};}else{if(!MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED&&(eventName==="mouseenter"||eventName==="mouseleave")){if(eventName==="mouseenter"||eventName==="mouseleave"){responder=function(event){Event.extend(event,element);var parent=event.relatedTarget;while(parent&&parent!==element){try{parent=parent.parentNode;}
500
- catch(e){parent=element;}}
501
- if(parent===element)return;handler.call(element,event);};}}else{responder=function(event){Event.extend(event,element);handler.call(element,event);};}}
502
- responder.handler=handler;respondersForEvent.push(responder);return responder;}
503
- function _destroyCache(){for(var i=0,length=CACHE.length;i<length;i++){Event.stopObserving(CACHE[i]);CACHE[i]=null;}}
504
- var CACHE=[];if(Prototype.Browser.IE)
505
- window.attachEvent('onunload',_destroyCache);if(Prototype.Browser.WebKit)
506
- window.addEventListener('unload',Prototype.emptyFunction,false);var _getDOMEventName=Prototype.K,translations={mouseenter:"mouseover",mouseleave:"mouseout"};if(!MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED){_getDOMEventName=function(eventName){return(translations[eventName]||eventName);};}
507
- function observe(element,eventName,handler){element=$(element);var responder=_createResponder(element,eventName,handler);if(!responder)return element;if(eventName.include(':')){if(element.addEventListener)
508
- element.addEventListener("dataavailable",responder,false);else{element.attachEvent("ondataavailable",responder);element.attachEvent("onfilterchange",responder);}}else{var actualEventName=_getDOMEventName(eventName);if(element.addEventListener)
509
- element.addEventListener(actualEventName,responder,false);else
510
- element.attachEvent("on"+actualEventName,responder);}
511
- return element;}
512
- function stopObserving(element,eventName,handler){element=$(element);var registry=Element.retrieve(element,'prototype_event_registry');if(!registry)return element;if(!eventName){registry.each(function(pair){var eventName=pair.key;stopObserving(element,eventName);});return element;}
513
- var responders=registry.get(eventName);if(!responders)return element;if(!handler){responders.each(function(r){stopObserving(element,eventName,r.handler);});return element;}
514
- var responder=responders.find(function(r){return r.handler===handler;});if(!responder)return element;if(eventName.include(':')){if(element.removeEventListener)
515
- element.removeEventListener("dataavailable",responder,false);else{element.detachEvent("ondataavailable",responder);element.detachEvent("onfilterchange",responder);}}else{var actualEventName=_getDOMEventName(eventName);if(element.removeEventListener)
516
- element.removeEventListener(actualEventName,responder,false);else
517
- element.detachEvent('on'+actualEventName,responder);}
518
- registry.set(eventName,responders.without(responder));return element;}
519
- function fire(element,eventName,memo,bubble){element=$(element);if(Object.isUndefined(bubble))
520
- bubble=true;if(element==document&&document.createEvent&&!element.dispatchEvent)
521
- element=document.documentElement;var event;if(document.createEvent){event=document.createEvent('HTMLEvents');event.initEvent('dataavailable',true,true);}else{event=document.createEventObject();event.eventType=bubble?'ondataavailable':'onfilterchange';}
522
- event.eventName=eventName;event.memo=memo||{};if(document.createEvent)
523
- element.dispatchEvent(event);else
524
- element.fireEvent(event.eventType,event);return Event.extend(event);}
525
- Event.Handler=Class.create({initialize:function(element,eventName,selector,callback){this.element=$(element);this.eventName=eventName;this.selector=selector;this.callback=callback;this.handler=this.handleEvent.bind(this);},start:function(){Event.observe(this.element,this.eventName,this.handler);return this;},stop:function(){Event.stopObserving(this.element,this.eventName,this.handler);return this;},handleEvent:function(event){var element=event.findElement(this.selector);if(element)this.callback.call(this.element,event,element);}});function on(element,eventName,selector,callback){element=$(element);if(Object.isFunction(selector)&&Object.isUndefined(callback)){callback=selector,selector=null;}
526
- return new Event.Handler(element,eventName,selector,callback).start();}
527
- Object.extend(Event,Event.Methods);Object.extend(Event,{fire:fire,observe:observe,stopObserving:stopObserving,on:on});Element.addMethods({fire:fire,observe:observe,stopObserving:stopObserving,on:on});Object.extend(document,{fire:fire.methodize(),observe:observe.methodize(),stopObserving:stopObserving.methodize(),on:on.methodize(),loaded:false});if(window.Event)Object.extend(window.Event,Event);else window.Event=Event;})();(function(){var timer;function fireContentLoadedEvent(){if(document.loaded)return;if(timer)window.clearTimeout(timer);document.loaded=true;document.fire('dom:loaded');}
528
- function checkReadyState(){if(document.readyState==='complete'){document.stopObserving('readystatechange',checkReadyState);fireContentLoadedEvent();}}
529
- function pollDoScroll(){try{document.documentElement.doScroll('left');}
530
- catch(e){timer=pollDoScroll.defer();return;}
531
- fireContentLoadedEvent();}
532
- if(document.addEventListener){document.addEventListener('DOMContentLoaded',fireContentLoadedEvent,false);}else{document.observe('readystatechange',checkReadyState);if(window==top)
533
- timer=pollDoScroll.defer();}
534
- Event.observe(window,'load',fireContentLoadedEvent);})();Element.addMethods();Hash.toQueryString=Object.toQueryString;var Toggle={display:Element.toggle};Element.Methods.childOf=Element.Methods.descendantOf;var Insertion={Before:function(element,content){return Element.insert(element,{before:content});},Top:function(element,content){return Element.insert(element,{top:content});},Bottom:function(element,content){return Element.insert(element,{bottom:content});},After:function(element,content){return Element.insert(element,{after:content});}};var $continue=new Error('"throw $continue" is deprecated, use "return" instead');var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;},within:function(element,x,y){if(this.includeScrollOffsets)
535
- return this.withinIncludingScrolloffsets(element,x,y);this.xcomp=x;this.ycomp=y;this.offset=Element.cumulativeOffset(element);return(y>=this.offset[1]&&y<this.offset[1]+element.offsetHeight&&x>=this.offset[0]&&x<this.offset[0]+element.offsetWidth);},withinIncludingScrolloffsets:function(element,x,y){var offsetcache=Element.cumulativeScrollOffset(element);this.xcomp=x+offsetcache[0]-this.deltaX;this.ycomp=y+offsetcache[1]-this.deltaY;this.offset=Element.cumulativeOffset(element);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+element.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+element.offsetWidth);},overlap:function(mode,element){if(!mode)return 0;if(mode=='vertical')
536
- return((this.offset[1]+element.offsetHeight)-this.ycomp)/element.offsetHeight;if(mode=='horizontal')
537
- return((this.offset[0]+element.offsetWidth)-this.xcomp)/element.offsetWidth;},cumulativeOffset:Element.Methods.cumulativeOffset,positionedOffset:Element.Methods.positionedOffset,absolutize:function(element){Position.prepare();return Element.absolutize(element);},relativize:function(element){Position.prepare();return Element.relativize(element);},realOffset:Element.Methods.cumulativeScrollOffset,offsetParent:Element.Methods.getOffsetParent,page:Element.Methods.viewportOffset,clone:function(source,target,options){options=options||{};return Element.clonePosition(target,source,options);}};if(!document.getElementsByClassName)document.getElementsByClassName=function(instanceMethods){function iter(name){return name.blank()?null:"[contains(concat(' ', @class, ' '), ' "+name+" ')]";}
538
- instanceMethods.getElementsByClassName=Prototype.BrowserFeatures.XPath?function(element,className){className=className.toString().strip();var cond=/\s/.test(className)?$w(className).map(iter).join(''):iter(className);return cond?document._getElementsByXPath('.//*'+cond,element):[];}:function(element,className){className=className.toString().strip();var elements=[],classNames=(/\s/.test(className)?$w(className):null);if(!classNames&&!className)return elements;var nodes=$(element).getElementsByTagName('*');className=' '+className+' ';for(var i=0,child,cn;child=nodes[i];i++){if(child.className&&(cn=' '+child.className+' ')&&(cn.include(className)||(classNames&&classNames.all(function(name){return!name.toString().blank()&&cn.include(' '+name+' ');}))))
539
- elements.push(Element.extend(child));}
540
- return elements;};return function(className,parentElement){return $(parentElement||document.body).getElementsByClassName(className);};}(Element.Methods);Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(element){this.element=$(element);},_each:function(iterator){this.element.className.split(/\s+/).select(function(name){return name.length>0;})._each(iterator);},set:function(className){this.element.className=className;},add:function(classNameToAdd){if(this.include(classNameToAdd))return;this.set($A(this).concat(classNameToAdd).join(' '));},remove:function(classNameToRemove){if(!this.include(classNameToRemove))return;this.set($A(this).without(classNameToRemove).join(' '));},toString:function(){return $A(this).join(' ');}};Object.extend(Element.ClassNames.prototype,Enumerable);(function(){window.Selector=Class.create({initialize:function(expression){this.expression=expression.strip();},findElements:function(rootElement){return Prototype.Selector.select(this.expression,rootElement);},match:function(element){return Prototype.Selector.match(element,this.expression);},toString:function(){return this.expression;},inspect:function(){return"#<Selector: "+this.expression+">";}});Object.extend(Selector,{matchElements:function(elements,expression){var match=Prototype.Selector.match,results=[];for(var i=0,length=elements.length;i<length;i++){var element=elements[i];if(match(element,expression)){results.push(Element.extend(element));}}
541
- return results;},findElement:function(elements,expression,index){index=index||0;var matchIndex=0,element;for(var i=0,length=elements.length;i<length;i++){element=elements[i];if(Prototype.Selector.match(element,expression)&&index===matchIndex++){return Element.extend(element);}}},findChildElements:function(element,expressions){var selector=expressions.toArray().join(', ');return Prototype.Selector.select(selector,element||document);}});})();