From 3d62e1309e02e6211fff05e4f5032395cf7f670e Mon Sep 17 00:00:00 2001
From: Michael M Slusarz
Date: Thu, 12 Feb 2009 22:11:02 -0700
Subject: [PATCH] Remove compressed files from git repo.
Eventually, have these files be generated automatically when creating
distribution tarballs. But because they don't diff well with the
previous version, it needlesly inflates the size of the git repo every
time one is changed. Those running development code should know how to
set up their registry to instead point at the src files.
---
.gitignore | 3 +++
chora/js/annotate.js | 1 -
chora/js/revlog.js | 1 -
drag_n_drop_portal/js/portal.js | 1 -
drag_n_drop_portal/js/portal_edit.js | 1 -
folks/js/search.js | 2 --
imp/js/ContextSensitive.js | 1 -
imp/js/DimpBase.js | 1 -
imp/js/DimpCore.js | 1 -
imp/js/DimpSlider.js | 1 -
imp/js/KeyNavList.js | 1 -
imp/js/SpellChecker.js | 1 -
imp/js/ViewPort.js | 1 -
imp/js/acl.js | 1 -
imp/js/compose-dimp.js | 1 -
imp/js/compose.js | 1 -
imp/js/contacts.js | 1 -
imp/js/dialog.js | 1 -
imp/js/dragdrop.js | 1 -
imp/js/fetchmailprefs.js | 1 -
imp/js/folders.js | 1 -
imp/js/fullmessage-dimp.js | 1 -
imp/js/imp.js | 1 -
imp/js/login.js | 1 -
imp/js/mailbox.js | 1 -
imp/js/message.js | 1 -
imp/js/search.js | 1 -
kronolith/js/ar-SY.js | 1 -
kronolith/js/bg-BG.js | 1 -
kronolith/js/bs-BA.js | 1 -
kronolith/js/ca-ES.js | 1 -
kronolith/js/calendar-panel.js | 1 -
kronolith/js/cs-CZ.js | 1 -
kronolith/js/da-DK.js | 1 -
kronolith/js/date.js | 1 -
kronolith/js/de-DE.js | 1 -
kronolith/js/el-GR.js | 1 -
kronolith/js/embed.js | 1 -
kronolith/js/en-US.js | 1 -
kronolith/js/es-ES.js | 1 -
kronolith/js/et-EE.js | 1 -
kronolith/js/eu-ES.js | 1 -
kronolith/js/extras.js | 1 -
kronolith/js/fa-IR.js | 1 -
kronolith/js/fi-FI.js | 1 -
kronolith/js/fr-FR.js | 1 -
kronolith/js/gl-ES.js | 1 -
kronolith/js/he-IL.js | 1 -
kronolith/js/hu-HU.js | 1 -
kronolith/js/id-ID.js | 1 -
kronolith/js/is-IS.js | 1 -
kronolith/js/it-IT.js | 1 -
kronolith/js/ja-JP.js | 1 -
kronolith/js/ko-KR.js | 1 -
kronolith/js/kronolith.js | 1 -
kronolith/js/lt-LT.js | 1 -
kronolith/js/lv-LV.js | 1 -
kronolith/js/mk-MK.js | 1 -
kronolith/js/nb-NO.js | 1 -
kronolith/js/nl-NL.js | 1 -
kronolith/js/nn-NO.js | 1 -
kronolith/js/pl-PL.js | 1 -
kronolith/js/pt-BR.js | 1 -
kronolith/js/pt-PT.js | 1 -
kronolith/js/ro-RO.js | 1 -
kronolith/js/ru-RU.js | 1 -
kronolith/js/sk-SK.js | 1 -
kronolith/js/sl-SI.js | 1 -
kronolith/js/sv-SE.js | 1 -
kronolith/js/tagactions.js | 1 -
kronolith/js/time.js | 1 -
kronolith/js/tr-TR.js | 1 -
kronolith/js/uk-UA.js | 1 -
kronolith/js/views.js | 1 -
kronolith/js/zh-CN.js | 1 -
kronolith/js/zh-TW.js | 1 -
news/js/feed.js | 2 --
77 files changed, 3 insertions(+), 78 deletions(-)
delete mode 100644 chora/js/annotate.js
delete mode 100644 chora/js/revlog.js
delete mode 100644 drag_n_drop_portal/js/portal.js
delete mode 100644 drag_n_drop_portal/js/portal_edit.js
delete mode 100644 folks/js/search.js
delete mode 100644 imp/js/ContextSensitive.js
delete mode 100644 imp/js/DimpBase.js
delete mode 100644 imp/js/DimpCore.js
delete mode 100644 imp/js/DimpSlider.js
delete mode 100644 imp/js/KeyNavList.js
delete mode 100644 imp/js/SpellChecker.js
delete mode 100644 imp/js/ViewPort.js
delete mode 100644 imp/js/acl.js
delete mode 100644 imp/js/compose-dimp.js
delete mode 100644 imp/js/compose.js
delete mode 100644 imp/js/contacts.js
delete mode 100644 imp/js/dialog.js
delete mode 100644 imp/js/dragdrop.js
delete mode 100644 imp/js/fetchmailprefs.js
delete mode 100644 imp/js/folders.js
delete mode 100644 imp/js/fullmessage-dimp.js
delete mode 100644 imp/js/imp.js
delete mode 100644 imp/js/login.js
delete mode 100644 imp/js/mailbox.js
delete mode 100644 imp/js/message.js
delete mode 100644 imp/js/search.js
delete mode 100644 kronolith/js/ar-SY.js
delete mode 100644 kronolith/js/bg-BG.js
delete mode 100644 kronolith/js/bs-BA.js
delete mode 100644 kronolith/js/ca-ES.js
delete mode 100644 kronolith/js/calendar-panel.js
delete mode 100644 kronolith/js/cs-CZ.js
delete mode 100644 kronolith/js/da-DK.js
delete mode 100644 kronolith/js/date.js
delete mode 100644 kronolith/js/de-DE.js
delete mode 100644 kronolith/js/el-GR.js
delete mode 100644 kronolith/js/embed.js
delete mode 100644 kronolith/js/en-US.js
delete mode 100644 kronolith/js/es-ES.js
delete mode 100644 kronolith/js/et-EE.js
delete mode 100644 kronolith/js/eu-ES.js
delete mode 100644 kronolith/js/extras.js
delete mode 100644 kronolith/js/fa-IR.js
delete mode 100644 kronolith/js/fi-FI.js
delete mode 100644 kronolith/js/fr-FR.js
delete mode 100644 kronolith/js/gl-ES.js
delete mode 100644 kronolith/js/he-IL.js
delete mode 100644 kronolith/js/hu-HU.js
delete mode 100644 kronolith/js/id-ID.js
delete mode 100644 kronolith/js/is-IS.js
delete mode 100644 kronolith/js/it-IT.js
delete mode 100644 kronolith/js/ja-JP.js
delete mode 100644 kronolith/js/ko-KR.js
delete mode 100644 kronolith/js/kronolith.js
delete mode 100644 kronolith/js/lt-LT.js
delete mode 100644 kronolith/js/lv-LV.js
delete mode 100644 kronolith/js/mk-MK.js
delete mode 100644 kronolith/js/nb-NO.js
delete mode 100644 kronolith/js/nl-NL.js
delete mode 100644 kronolith/js/nn-NO.js
delete mode 100644 kronolith/js/pl-PL.js
delete mode 100644 kronolith/js/pt-BR.js
delete mode 100644 kronolith/js/pt-PT.js
delete mode 100644 kronolith/js/ro-RO.js
delete mode 100644 kronolith/js/ru-RU.js
delete mode 100644 kronolith/js/sk-SK.js
delete mode 100644 kronolith/js/sl-SI.js
delete mode 100644 kronolith/js/sv-SE.js
delete mode 100644 kronolith/js/tagactions.js
delete mode 100644 kronolith/js/time.js
delete mode 100644 kronolith/js/tr-TR.js
delete mode 100644 kronolith/js/uk-UA.js
delete mode 100644 kronolith/js/views.js
delete mode 100644 kronolith/js/zh-CN.js
delete mode 100644 kronolith/js/zh-TW.js
delete mode 100644 news/js/feed.js
diff --git a/.gitignore b/.gitignore
index cf0456270..cf2cfe42f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,6 +11,9 @@ libs
*.rej
*/lib/base.local.php
+# Don't store compressed JS files in git
+*/js/*.js
+
# Application specific patterns
chora/config/*.php
framework/Rdo/examples/Horde/Rdo/conf.php
diff --git a/chora/js/annotate.js b/chora/js/annotate.js
deleted file mode 100644
index c8233a5bf..000000000
--- a/chora/js/annotate.js
+++ /dev/null
@@ -1 +0,0 @@
-var Chora_Annotate={showLog:function(d){var c=d.element(),b,a;if(!c.hasClassName("logdisplay")){c=c.up("SPAN.logdisplay");if(!c){return}}d.stop();b=c.hide().up("TD").down("A").readAttribute("rev");a=new Element("TD",{colspan:5}).insert(Chora.loading_text);c.up("TR").insert({after:new Element("TR",{className:"logentry"}).insert(a)});new Ajax.Updater(a,Chora.ANNOTATE_URL+b)}};document.observe("click",Chora_Annotate.showLog.bindAsEventListener(Chora_Annotate));
\ No newline at end of file
diff --git a/chora/js/revlog.js b/chora/js/revlog.js
deleted file mode 100644
index c8c54b023..000000000
--- a/chora/js/revlog.js
+++ /dev/null
@@ -1 +0,0 @@
-var Chora_RevLog={selected:null,highlight:function(){$("revlog_body").select("TR").each(function(a){if(Prototype.Browser.IE){a.observe("mouseover",this.rowover.bindAsEventListener(this,"over"));a.observe("mouseover",this.rowover.bindAsEventListener(this,"out"))}a.observe("click",this.toggle.bindAsEventListener(this))},this)},rowover:function(b,a){b.element().invoke(a=="over"?"addClassName":"removeClassName","hover")},toggle:function(b){var a=b.element();if(a.tagName.toUpperCase()!="TR"){if(a.tagName.toUpperCase()=="A"&&a.readAttribute("href")){return}a=a.up("TR")}if(this.selected!=null){this.selected.removeClassName("selected");if(this.selected==a){this.selected=null;$("revlog_body").removeClassName("selection");return}}this.selected=a;a.addClassName("selected");$("revlog_body").addClassName("selection")},sdiff:function(a){a=$(a);a.writeAttribute("href",a.readAttribute("href").replace(/r1=([\d\.]+)/,"r1="+this.selected.identify().substring(3)))}};document.observe("dom:loaded",Chora_RevLog.highlight.bind(Chora_RevLog));
\ No newline at end of file
diff --git a/drag_n_drop_portal/js/portal.js b/drag_n_drop_portal/js/portal.js
deleted file mode 100644
index 2cc5e9456..000000000
--- a/drag_n_drop_portal/js/portal.js
+++ /dev/null
@@ -1 +0,0 @@
-if(typeof Draggable=="undefined"){throw("widget.js requires including script.aculo.us' dragdrop.js library")}if(typeof Builder=="undefined"){throw("widget.js requires including script.aculo.us' builder.js library")}if(typeof Xilinus=="undefined"){Xilinus={}}Builder.dump();Xilinus.Widget=Class.create();Xilinus.Widget.lastId=0;Xilinus.Widget.remove=function(B,A){if(A&&A.afterFinish){A.afterFinish.call()}};Object.extend(Xilinus.Widget.prototype,{initialize:function(D,E){D=D||"widget";this._id=E||("widget_"+Xilinus.Widget.lastId++);this._titleDiv=DIV({className:"header",id:this._getId("header")},"");this._contentDiv=DIV({className:"headerbox",id:this._getId("content")},"");this._footerDiv=DIV({className:D+"_statusbar",id:this._getId("footer")},"");var C=DIV({className:"header"},this._titleDiv);var B=DIV({className:"headerbox"},this._contentDiv);var A=DIV({className:D+"_sw"},this._footerDiv);this._div=DIV({className:D+(D!="widget"?" widget":""),id:this._getId()},[C,B,A]);this._div.widget=this;return this},destroy:function(){this._div.remove()},getElement:function(){return $(this._getId())||$(this._div)},setTitle:function(A){$(this._titleDiv).update(A);return this},getTitle:function(A){return $(this._titleDiv)},setFooter:function(A){$(this._footerDiv).update(A);return this},getFooter:function(A){return $(this._footerDiv)},setContent:function(A){$(this._contentDiv).update(A);return this},getContent:function(A){return $(this._contentDiv)},updateHeight:function(){$(this._contentDiv).setStyle({height:null});var A=$(this._contentDiv).getHeight();$(this._contentDiv).setStyle({height:A+"px"})},_getId:function(A){return(A?A+"_":"")+this._id}});Xilinus.Portal=Class.create();Object.extend(Xilinus.Portal.prototype,{lastEvent:null,widgets:null,columns:null,initialize:function(B,A){this.options=Object.extend({url:null,onOverWidget:null,onOutWidget:null,onChange:null,onUpdate:null,removeEffect:Xilinus.Widget.remove},A);this._columns=(typeof B=="string")?$$(B):B;this._widgets=new Array();this._columns.each(function(C){Droppables.add(C,{onHover:this.onHover.bind(this),overlap:"vertical",accept:this.options.accept})}.bind(this));this._outTimer=null;this._columns.invoke("undoPositioned");this._currentOverWidget=null;this._widgetMouseOver=this.widgetMouseOver.bindAsEventListener(this);this._widgetMouseOut=this.widgetMouseOut.bindAsEventListener(this);Draggables.addObserver({onEnd:this.endDrag.bind(this),onStart:this.startDrag.bind(this)})},add:function(C,B,A){A=typeof A=="undefined"?true:A;this._widgets.push(C);if(this.options.accept){C.getElement().addClassName(this.options.accept)}this._columns[B].appendChild(C.getElement());C.updateHeight();if(A){C.draggable=new Draggable(C.getElement(),{handle:C._titleDiv,revert:false});C.getTitle().addClassName("widget_draggable")}this._updateColumnsHeight();if(this.options.onOverWidget){C.getElement().immediateDescendants().invoke("observe","mouseover",this._widgetMouseOver)}if(this.options.onOutWidget){C.getElement().immediateDescendants().invoke("observe","mouseout",this._widgetMouseOut)}},remove:function(A){this._widgets.reject(function(B){return B==A});if(this.options.onOverWidget){A.getElement().immediateDescendants().invoke("stopObserving","mouseover",this._widgetMouseOver)}if(this.options.onOutWidget){A.getElement().immediateDescendants().invoke("stopObserving","mouseout",this._widgetMouseOut)}if(A.draggable){A.draggable.destroy()}this.options.removeEffect(A.getElement(),{afterFinish:function(){A.destroy()}});this._updateColumnsHeight()},serialize:function(){parameters="";this._columns.each(function(A){var B=A.immediateDescendants().collect(function(C){return A.id+"[]="+C.id}).join("&");parameters+=B+"&"});return parameters},addWidgetControls:function(A){$(A).observe("mouseover",this._widgetMouseOver);$(A).observe("mouseout",this._widgetMouseOut)},widgetMouseOver:function(B){this._clearTimer();var A=Event.element(B).up(".widget");if(this._currentOverWidget==null||this._currentOverWidget!=A){if(this._currentOverWidget&&this._currentOverWidget!=A){this.options.onOutWidget(this,this._currentOverWidget.widget)}this._currentOverWidget=A;this.options.onOverWidget(this,A.widget)}},widgetMouseOut:function(B){this._clearTimer();var A=Event.element(B).up(".widget");this._outTimer=setTimeout(this._doWidgetMouseOut.bind(this,A),100)},_doWidgetMouseOut:function(A){this._currentOverWidget=null;this.options.onOutWidget(this,A.widget)},startDrag:function(B,A){var D=A.element;if(!this._widgets.find(function(F){return F==D.widget})){return}var C=D.parentNode;var E=DIV({className:"widget_ghost"},"");$(E).setStyle({height:D.getHeight()+"px"});C.insertBefore(E,D);D.setStyle({width:D.getWidth()+"px"});Position.absolutize(D);document.body.appendChild(D);A.element.ghost=E;this._savePosition=this.serialize()},endDrag:function(B,A){var D=A.element;if(!this._widgets.find(function(E){return E==D.widget})){return}var C=D.ghost.parentNode;C.insertBefore(A.element,D.ghost);D.ghost.remove();if(Prototype.Browser.Opera){D.setStyle({top:0,left:0,width:"100%",height:D._originalHeight,zIndex:null,opacity:null,position:"relative"})}else{D.setStyle({top:null,left:null,width:null,height:D._originalHeight,zIndex:null,opacity:null,position:"relative"})}D.ghost=null;D.widget.updateHeight();this._updateColumnsHeight();if(this._savePosition!=this.serialize()){if(this.options.url){new Ajax.Request(this.options.url,{parameters:this.serialize()})}if(this.options.onUpdate){this.options.onUpdate(this)}}},onHover:function(D,H,I){var A=Position.cumulativeOffset(H);var J=A[0]+10;var F=A[1]+(1-I)*H.getHeight();if(Position.within(D.ghost,J,F)){return}var M=false;var G=false;for(var C=0,B=this._widgets.length;CE&&L!=D.ghost){H.appendChild(D.ghost);G=true}}}if(G&&this.options.onChange){this.options.onChange(this)}this._updateColumnsHeight()},_updateColumnsHeight:function(){var A=0;this._columns.each(function(B){A=Math.max(A,B.immediateDescendants().inject(0,function(D,C){return D+C.getHeight()}))});this._columns.invoke("setStyle",{height:A+"px"})},_clearTimer:function(){if(this._outTimer){clearTimeout(this._outTimer);this._outTimer=null}}});
\ No newline at end of file
diff --git a/drag_n_drop_portal/js/portal_edit.js b/drag_n_drop_portal/js/portal_edit.js
deleted file mode 100644
index 03f7f3bf6..000000000
--- a/drag_n_drop_portal/js/portal_edit.js
+++ /dev/null
@@ -1 +0,0 @@
-var _widgets_blocks=new Array();var _layout_params=new Array();function onOverWidget(A,B){B.getElement().insertBefore($("control_buttons"),B.getElement().firstChild);$("control_buttons").show()}function onOutWidget(A,B){$("control_buttons").hide()}function minimizeWidget(A){var B=$(A).up(".widget").widget;id=B._getId().substr(7);if($("content_widget_"+id).style.display=="none"){$("content_widget_"+id).style.display="block";A.id="minimize_button"}else{$("content_widget_"+id).style.display="none";A.id="maximize_button"}}function removeWidget(A){var B=$(A).up(".widget").widget;if(confirm(confirm_remove)){document.body.appendChild($("control_buttons").hide());portal.remove(B)}}function listWidgets(){RedBox.loading();new Ajax.Request(list_url,{method:"get",onSuccess:function(A){RedBox.showHtml(''+A.responseText+"
")},onFailure:function(A){RedBox.close()}})}function addWidget(){select=$("block_selection");title=select.options[select.selectedIndex].text;widget=new Xilinus.Widget();widget.setTitle(title);widget.setContent(title);portal.add(widget,parseInt($F("block_column")));_widgets_blocks[_widgets_blocks.length]=select.value;_layout_params[_widgets_blocks.length]=new Array();editWidget(widget);cancelRedBox()}function reloadWidget(A){if($(A).id=="reload_button"){var B=$(A).up(".widget").widget}else{var B=A}var C=B._getId().substr(7);new Ajax.Request(load_url,{parameters:getAjaxParameters(A),method:"get",onSuccess:function(D){block_data=D.responseText.evalJSON(true);B.setTitle(block_data.title);B.setContent(block_data.content);_widgets_blocks[B._getId().substr(7)]=block_used},onFailure:function(D){alert("Someting gone wrong.")}})}function editWidget(A){if($(A).id=="reload_button"){var B=$(A).up(".widget").widget}else{var B=A}new Ajax.Request(edit_url,{parameters:getAjaxParameters(A),method:"get",onSuccess:function(C){RedBox.showHtml(''+C.responseText+"
")},onFailure:function(C){RedBox.close()}})}function getAjaxParameters(A){if($(A).id=="reload_button"||$(A).id=="edit_button"){var B=$(A).up(".widget").widget}else{var B=A}var C=B._getId().substr(7);parameters="block="+_widgets_blocks[C];parameters=parameters+"&widget="+B._getId();p=_layout_params[C];for(a in p){if(typeof(p[a])!="string"){break}parameters=parameters+"&defaults["+a+"]="+p[a]}return parameters}function setParams(){widget_name="";params=new Array();inputs=$("blockform").getElements();inputs.each(function(B){name=B.name.substr(0,6);if(name=="params"){pos=B.name.indexOf("]",7);param_name=B.name.substr(7,pos-7);if(B.type=="checkbox"){params[param_name]=B.checked}else{params[param_name]=B.value}}if(name=="widget"){widget_name=B.value}});_layout_params[widget_name.substr(7)]=params;var A=$(widget_name).widget;reloadWidget(A);cancelRedBox()}function noParams(B,C){var A=$(B).widget;reloadWidget(A);cancelRedBox()}function cancelRedBox(){RedBox.close();return false}function savePortal(){parameters=portal.serialize();for(var A=0;A<_layout_params.length;A++){parameters=parameters+"¶ms["+A+"][type]="+_widgets_blocks[A];p=_layout_params[A];for(a in p){if(typeof(p[a])!="string"){break}parameters=parameters+"¶ms["+A+"]["+a+"]="+p[a]}}new Ajax.Request(save_url,{parameters:parameters,method:"post"})};
\ No newline at end of file
diff --git a/folks/js/search.js b/folks/js/search.js
deleted file mode 100644
index 592af9075..000000000
--- a/folks/js/search.js
+++ /dev/null
@@ -1,2 +0,0 @@
-
-function saveSearch(url){RedBox.loading();new Ajax.Request(url,{parameters:{ajax:1},method:'get',onSuccess:function(transport){RedBox.showHtml(''+transport.responseText+'
');},onFailure:function(transport){RedBox.close();}});}
\ No newline at end of file
diff --git a/imp/js/ContextSensitive.js b/imp/js/ContextSensitive.js
deleted file mode 100644
index 99a936b2d..000000000
--- a/imp/js/ContextSensitive.js
+++ /dev/null
@@ -1 +0,0 @@
-var ContextSensitive=Class.create({initialize:function(){this.lasttarget=this.target=null;this.elements=$H();this.submenus=$H();this.current=[];this.basectx=this.onShow=null;document.observe("contextmenu",this._rightClickHandler.bindAsEventListener(this));document.observe("click",this._leftClickHandler.bindAsEventListener(this));document.observe(Prototype.Browser.Gecko?"DOMMouseScroll":"mousescroll",this.close.bind(this))},setOnShow:function(a){this.onShow=a},addElement:function(d,c,a){var b=Boolean(a.left);if(d&&!this.validElement(d,b)){this.elements.set(d+Number(b),new ContextSensitive.Element(d,c,a))}},removeElement:function(a){this.elements.unset(a+"0");this.elements.unset(a+"1")},close:function(a){this._closeSubmenu(0,a)},_closeSubmenu:function(a,b){this.current.splice(a,this.current.size()-a).each(function(c){if(b){$(c).hide()}else{Effect.Fade(c,{duration:0.2,queue:{position:"end",scope:"cm_"+c,limit:2}})}});this.target=this.current[a];this.basectx=null},element:function(a){return a?this.target:this.lasttarget},currentmenu:function(){return this.current.last()},validElement:function(b,a){return this.elements.get(b+Number(Boolean(a)))},disable:function(d,c,a){var b=this.validElement(d,c);if(b){b.disable=a}},_leftClickHandler:function(a){if(a.isRightClick()){return}this._rightClickHandler(a,true)},_rightClickHandler:function(b,a){if(this.trigger(b.element(),a,b.pointerX(),b.pointerY())){b.stop()}},trigger:function(f,e,h,g){var j,b,i,d,c,a;[f].concat(f.ancestors()).find(function(k){j=this.validElement(k.id,e);return j},this);if(!j||j.disable){if(!j||!j.hasClassName("contextSubmenu")){this.close()}return false}b=$(j.ctx);if(!b){this.close();return false}i=b.readAttribute("id");if(e&&i==this.currentmenu()){return false}this.close();this.lasttarget=this.target=$(j.id);d=j.opts.offset;if(!d&&(Object.isUndefined(h)||Object.isUndefined(g))){d=f.readAttribute("id")}d=$(d);if(d){c=d.viewportOffset();a=document.viewport.getScrollOffsets();h=c[0]+a.left;g=c[1]+d.getHeight()+a.top}this.basectx=j;this._displayMenu(b,h,g);return true},_displayMenu:function(c,a,f){var e=c.readAttribute("id"),d=c.getDimensions(),b=document.viewport.getDimensions();if((f+d.height)>b.height){f=b.height-d.height-10}if((a+d.width)>b.width){a=b.width-d.width-10}if(this.onShow){this.onShow(e,this.basectx)}Effect.Appear(c.setStyle({left:a+"px",top:f+"px"}),{duration:0.2,queue:{position:"end",scope:"cm_"+e,limit:2}});this.current.push(e)},addSubMenu:function(b,a){if(!this.submenus.get(b)){if(!this.submenus.size()){document.observe("mouseover",this._mouseoverHandler.bindAsEventListener(this))}this.submenus.set(b,a);$(b).addClassName("contextSubmenu").insert({top:new Element("SPAN",{className:"contextExpand"})})}},_mouseoverHandler:function(h){if(!this.current.size()){return}var l=this.currentmenu(),f=h.element(),g=f.up(),b=f.readAttribute("id"),k=g.readAttribute("id"),d,a,c,j,i;if(f.hasClassName("contextSubmenu")){a=this.submenus.get(b);if(a!=l){if(k!=l){this._closeSubmenu(this.current.indexOf(k)+1)}d=f.viewportOffset();c=document.viewport.getScrollOffsets();j=d[0]+c.left+f.getWidth();i=d[1]+c.top;this._displayMenu($(a),j,i)}}else{if((this.current.size()>1)&&g.hasClassName("contextMenu")&&k!=l){this._closeSubmenu(this.current.indexOf(b))}}}});ContextSensitive.Element=Class.create({initialize:function(c,b,a){this.id=c;this.ctx=b;this.opts=a;this.opts.left=Boolean(a.left);this.disable=false;b=$(b);if(b){b.addClassName("contextMenu")}}});
\ No newline at end of file
diff --git a/imp/js/DimpBase.js b/imp/js/DimpBase.js
deleted file mode 100644
index 9f7756461..000000000
--- a/imp/js/DimpBase.js
+++ /dev/null
@@ -1 +0,0 @@
-var DimpBase={bcache:$H(),cacheids:{},lastrow:-1,pivotrow:-1,ppcache:{},ppfifo:[],sfiltersfolder:$H({sf_all:"all",sf_current:"current"}),sfilters:$H({sf_msgall:"msgall",sf_from:"from",sf_to:"to",sf_subject:"subject"}),flags:$H({unseen:"statusUnseen",flagged:"statusFlagged",deletedmsg:"statusDeleted",unimportant:"lowPriority",important:"highPriority",answered:"statusAnswered",forwarded:"statusForwarded",draft:"statusDraft"}),_select:function(c,a){var b=c.get("rownum");if(b.size()==1){this.lastrow=this.pivotrow=b.first()}this.toggleButtons();if($("previewPane").visible()){if(a.right){this.clearPreviewPane()}else{if(a.delay){(this.bcache.get("initPP")||this.bcache.set("initPP",this.initPreviewPane.bind(this))).delay(a.delay)}else{this.initPreviewPane()}}}},_deselect:function(d,b){var c=this.viewport.getSelected(),a=c.size();if(!a){this.lastrow=this.pivotrow=-1}this.toggleButtons();if(b.right||!a){this.clearPreviewPane()}else{if((a==1)&&$("previewPane").visible()){this.loadPreview(c.get("dataob").first())}}},msgSelect:function(g,c){var b,e=this.viewport.createSelection("domid",g),a=e.get("rownum").first(),d=this.isSelected("domid",g),f=this.selectedCount();this.lastrow=a;$("msgList_filter").blur();if(c.shift){if(f){if(!d||f!=1){b=[a,this.pivotrow];this.viewport.select($A($R(b.min(),b.max())),{range:true})}return}}else{if(c.ctrl){this.pivotrow=a;if(d){this.viewport.deselect(e,{right:c.right});return}else{if(c.right||f){this.viewport.select(e,{add:true,right:c.right});return}}}}this.viewport.select(e,{right:c.right})},selectAll:function(){this.viewport.select($A($R(1,this.viewport.getMetaData("total_rows"))),{range:true})},isSelected:function(b,a){return this.viewport.getSelected().contains(b,a)},selectedCount:function(){return(this.viewport)?this.viewport.getSelected().size():0},resetSelected:function(){if(this.viewport){this.viewport.deselect(this.viewport.getSelected(),{clearall:true})}this.toggleButtons();this.clearPreviewPane()},moveSelected:function(a,g){var e,d,f,b,c;if(g){if(!this.viewport.getMetaData("total_rows")){return}e=a}else{if(a==0){return}c=this.viewport.getSelected();switch(c.size()){case 0:e=this.viewport.currentOffset();e+=(a>0)?1:this.viewport.getPageSize("current");break;case 1:d=c.get("dataob").first();e=d.rownum+a;break;default:c=c.get("rownum");e=(a>0?c.max():c.min())+a;break}e=(a>0)?Math.min(e,this.viewport.getMetaData("total_rows")):Math.max(e,1)}f=this.viewport.createSelection("rownum",e);if(f.size()){b=f.get("dataob").first();if(!d||b.imapuid!=d.imapuid){this.viewport.scrollTo(b.rownum);this.viewport.select(f,{delay:0.3})}}else{this.offset=e;this.viewport.requestContentRefresh(e-1)}},go:function(e,b){var d,a,c;if(e.startsWith("compose:")){return}if(e.startsWith("msg:")){c=e.indexOf(":",4);a=e.substring(4,c);this.uid=e.substring(c+1);e="folder:"+a}if(e.startsWith("folder:")){a=e.substring(7);if(this.folder!=a||!$("dimpmain_folder").visible()){this.highlightSidebar(this.getFolderId(a));if(!$("dimpmain_folder").visible()){$("dimpmain_portal").hide();$("dimpmain_folder").show()}if(!Object.isUndefined(this.folder)){this._addHistory(e)}}this.loadFolder(a);return}this.folder=null;$("dimpmain_folder").hide();$("dimpmain_portal").update(DIMP.text.loading).show();if(e.startsWith("app:")){d=e.substr(4);if(d=="imp"){this.go("folder:INBOX");return}this.highlightSidebar("app"+d);this._addHistory(e,b);if(b){this.iframeContent(e,b)}else{if(DIMP.conf.app_urls[d]){this.iframeContent(e,DIMP.conf.app_urls[d])}}return}switch(e){case"portal":this.highlightSidebar("appportal");this._addHistory(e);DimpCore.setTitle(DIMP.text.portal);DimpCore.doAction("ShowPortal",{},null,this.bcache.get("portalC")||this.bcache.set("portalC",this._portalCallback.bind(this)));break;case"options":this.highlightSidebar("appoptions");this._addHistory(e);DimpCore.setTitle(DIMP.text.prefs);this.iframeContent(e,DIMP.conf.prefs_url);break}},_addHistory:function(b,a){if(Horde.dhtmlHistory.getCurrentLocation()!=b){Horde.dhtmlHistory.add(b,a)}},highlightSidebar:function(b){if($("foldersLoading").visible()){this.highlightSidebar.bind(this,b).defer();return}$("sidebarPanel").select(".on").invoke("removeClassName","on");var a=$(b);if(!a){return}if(!a.match("LI")){a=a.up();if(!a){return}}a.addClassName("on");a.ancestors().find(function(c){if(c.hasClassName("subfolders")){this._toggleSubFolder(c.id.substring(3),"exp")}else{return(c.id=="foldersSidebar")}},this)},iframeContent:function(b,d){if(b===null){b=d}var a=$("dimpmain_portal"),c;if(!a){DimpCore.showNotifications([{type:"horde.error",message:"Bad portal!"}]);return}c=new Element("IFRAME",{id:"iframe"+b,className:"iframe",frameBorder:0,src:d});this._resizeIE6Iframe(c);if(b=="options"){c.observe("load",function(){$("iframeoptions").contentWindow.document.getElementById("menu").style.display="none"})}a.insert(c)},msgWindow:function(b){this.updateUnseenUID(b,0);var a=DIMP.conf.message_url;a+=(a.include("?")?"&":"?")+$H({folder:b.view,uid:b.imapuid}).toQueryString();DimpCore.popupWindow(a,"msgview"+b.view+b.imapuid)},composeMailbox:function(a){var b=this.viewport.getSelected();if(!b.size()){return}b.get("dataob").each(function(c){DimpCore.compose(a,{folder:c.view,uid:c.imapuid})})},loadFolder:function(b,a){if(!this.viewport){this._createViewPort()}if(!a){this.resetSelected();if(this.folder==b){this.searchfilterClear(false);return}this.searchfilterClear(true);$("folderName").update(DIMP.text.loading);$("msgHeader").update();this.folderswitch=true;this.folder=b}this.viewport.loadView(b,this.uid?{imapuid:this.uid,view:b}:null,a)},_createViewPort:function(){var b=$("msgList_filter"),a=this.setMessageListTitle.bind(this);this.viewport=new ViewPort({content_container:"msgList",empty_container:"msgList_empty",error_container:"msgList_error",fetch_action:"ListMessages",template:this.message_list_template,buffer_pages:DIMP.conf.buffer_pages,limit_factor:DIMP.conf.limit_factor,viewport_wait:DIMP.conf.viewport_wait,show_split_pane:DIMP.conf.preview_pref,split_pane:"previewPane",splitbar:"splitBar",content_class:"msglist",row_class:"msgRow",selected_class:"selectedRow",ajaxRequest:DimpCore.doAction.bind(DimpCore),norows:true,onScrollIdle:a,onSlide:a,onContent:function(f){var e,d,c=((this.viewport.getMetaData("sortby")==DIMP.conf.sortthread)&&this.viewport.getMetaData("thread"));if(this.viewport.isFiltering()){d=this.sfilters.get(this._getSearchfilterField()).capitalize();e=new RegExp("("+$F("msgList_filter")+")","i")}f.get("dataob").each(function(k){var h,i,g,j=$(k.domid);if(c&&c.get(k.imapuid)){h=j.down(".msgSubject");i=h.cloneNode(false);g=c.get(k.imapuid);$R(0,g.length,true).each(function(l){i.insert($($("thread_img_"+g.charAt(l)).cloneNode(false)).writeAttribute("id",""))});h.replace(i.insert(h.getText().escapeHTML()))}if(k.atc){j.down(".msgSize").insert({top:$($("atc_img_"+k.atc).cloneNode(false)).writeAttribute("id","")})}this._addMouseEvents({id:k.domid,type:k.menutype});new Drag(j,this._msgDragConfig);if(d=="From"||d=="Subject"){h=j.down(".msg"+d);h.update(h.getText().escapeHTML().gsub(e,'#{1}'))}},this);this.setMessageListTitle()}.bind(this),onComplete:function(){var e,c,d=this.viewport.getMetaData("label");if(this.uid){e=this.viewport.getViewportSelection().search({imapuid:{equal:[this.uid]},view:{equal:[this.folder]}});if(e.size()){this.viewport.scrollTo(e.get("rownum").first());this.viewport.select(e)}}else{if(this.offset){this.viewport.select(this.viewport.createSelection("rownum",this.offset))}}this.offset=this.uid=null;d=this.viewport.getMetaData("label");if(d){$("folderName").update(d)}if(this.folderswitch){this.folderswitch=false;if(this.folder==DIMP.conf.spam_folder){if(!DIMP.conf.spam_spamfolder&&DimpCore.buttons.indexOf("button_spam")!=-1){[$("button_spam").up(),$("ctx_message_spam")].invoke("hide")}if(DimpCore.buttons.indexOf("button_ham")!=-1){[$("button_ham").up(),$("ctx_message_ham")].invoke("show")}}else{if(DimpCore.buttons.indexOf("button_spam")!=-1){[$("button_spam").up(),$("ctx_message_spam")].invoke("show")}if(DimpCore.buttons.indexOf("button_ham")!=-1){if(DIMP.conf.ham_spamfolder){[$("button_ham").up(),$("ctx_message_ham")].invoke("hide")}else{[$("button_ham").up(),$("ctx_message_ham")].invoke("show")}}}}else{if(this.filtertoggle){if(this.filtertoggle==1&&this.viewport.getMetaData("sortby")==DIMP.conf.sortthread){c=DIMP.conf.sortdate}this.filtertoggle=0}}this.setSortColumns(c);if(this.viewport.isFiltering()){this.resetSelected()}else{this.setFolderLabel(this.folder,this.viewport.getMetaData("unseen")||0)}this.updateTitle()}.bind(this),onFetch:this.msgListLoading.bind(this,true),onEndFetch:this.msgListLoading.bind(this,false),onCacheUpdate:function(c){delete this.cacheids[c]}.bind(this),onWait:function(){if($("dimpmain_folder").visible()){DimpCore.showNotifications([{type:"horde.warning",message:DIMP.text.listmsg_wait}])}},onFail:function(){if($("dimpmain_folder").visible()){DimpCore.showNotifications([{type:"horde.error",message:DIMP.text.listmsg_timeout}])}this.msgListLoading(false)}.bind(this),onFirstContent:function(){this.clearPreviewPane()}.bind(this),onClearRows:function(c){c.each(function(d){if(d.id){this._removeMouseEvents(d)}},this)}.bind(this),onBeforeResize:function(){var c=this.viewport.getSelected();this.isvisible=(c.size()==1)&&(this.viewport.isVisible(c.get("rownum").first())==0)}.bind(this),onAfterResize:function(){if(this.isvisible){this.viewport.scrollTo(this.viewport.getSelected().get("rownum").first())}}.bind(this),onCachedList:function(e){var c,d;if(!this.cacheids[e]){d=this.viewport.getViewportSelection(e,true);if(!d.size()){return""}if(d.getBuffer().getMetaData("search")){this.cacheids[e]=d.get("uid").toJSON()}else{c={};c[e]=d.get("uid").clone();this.cacheids[e]=DimpCore.toRangeString(c)}}return this.cacheids[e]}.bind(this),onUpdateClass:function(c){this.updateStatusFlags(c)}.bind(this),selectCallback:this._select.bind(this),deselectCallback:this._deselect.bind(this)});if(!DIMP.conf.preview_pref){$("msgList").addClassName("msglistNoPreview")}this.viewport.addFilter("ListMessages",this._addSearchfilterParams.bind(this));b.observe("focus",this._searchfilterOnFocus.bind(this));b.observe("blur",this._searchfilterOnBlur.bind(this));b.addClassName("msgFilterDefault")},_addMouseEvents:function(b,c){if(c){var a=$(b.id);a.insert({after:$($("popdown_img").cloneNode(false)).writeAttribute("id",b.id+"_img").show()});b.id+="_img";b.offset=a.up();b.left=true}DimpCore.DMenu.addElement(b.id,"ctx_"+b.type,b)},_removeMouseEvents:function(a){var b,c=$(a).readAttribute("id");if(c&&(b=DragDrop.Drags.get_drag(c))){b.destroy()}DimpCore.DMenu.removeElement($(a).identify())},_onMenuShow:function(b,a){var f,d,c,e;switch(b){case"ctx_folder":f=$("ctx_folder_create","ctx_folder_rename","ctx_folder_delete");d=DimpCore.DMenu.element();if(d.readAttribute("mbox")=="INBOX"){f.invoke("hide")}else{if(DIMP.conf.fixed_folders.indexOf(d.readAttribute("mbox"))!=-1){f.shift();f.invoke("hide")}else{f.invoke("show")}}if(d.hasAttribute("u")){$("ctx_folder_poll").hide();$("ctx_folder_nopoll").show()}else{$("ctx_folder_poll").show();$("ctx_folder_nopoll").hide()}break;case"ctx_message":DimpCore.DMenu.addSubMenu("ctx_message_reply","ctx_reply");DimpCore.DMenu.addSubMenu("ctx_message_forward","ctx_forward");DimpCore.DMenu.addSubMenu("ctx_message_setflag","ctx_flag");DimpCore.DMenu.addSubMenu("ctx_message_clearflag","ctx_clearflag");break;case"ctx_reply":e=this.viewport.getSelected();if(e.size()==1){c=e.get("dataob").first()}[$("ctx_reply_reply_list")].invoke(c&&c.listmsg?"show":"hide");break;case"ctx_otheractions":$("oa_setflag","oa_clearflag","oa_sep1","oa_blacklist","oa_whitelist","oa_sep2","oa_undeleted").compact().invoke(this.viewport.getSelected().size()?"show":"hide");DimpCore.DMenu.addSubMenu("oa_setflag","ctx_flag");DimpCore.DMenu.addSubMenu("oa_clearflag","ctx_clearflag");break}return true},_onResize:function(b,a){if(this.viewport){this.viewport.onResize(b,a)}this._resizeIE6()},updateTitle:function(){var b,a,c;if(this.viewport.isFiltering()){a=DIMP.text.search+" :: "+(this.viewport.getMetaData("total_rows")||0)+" "+DIMP.text.resfound}else{b=$(this.getFolderId(this.folder));if(b){c=b.readAttribute("u");a=b.readAttribute("l");if(c>0){a+=" ("+c+")"}}else{a=this.viewport.getMetaData("label")}}DimpCore.setTitle(a)},sort:function(d){if(this.viewport.getMetaData("sortlimit")){return}var b,c,a=d.element();if(!a.hasAttribute("sortby")){a=a.up("[sortby]");if(!a){return}}c=Number(a.readAttribute("sortby"));if(c==this.viewport.getMetaData("sortby")){b={sortdir:(this.viewport.getMetaData("sortdir")?0:1)};this.viewport.setMetaData({sortdir:b.sortdir})}else{b={sortby:c};this.viewport.setMetaData({sortby:b.sortby})}this.setSortColumns(c);this.viewport.reload(b)},setSortColumns:function(c){var b,a=$("msglistHeader");if(Object.isUndefined(c)){c=this.viewport.getMetaData("sortby")}b=a.down("small[sortby="+c+"]");if(b&&b.up().visible()){b.up(1).childElements().invoke("toggle")}b=a.down("div.msgFrom a");if((this.viewport.isFiltering()&&this.fspecial)||this.viewport.getMetaData("special")){b.hide().next().show()}else{b.show().next().hide()}b=a.down("div.msgSubject a");if(this.viewport.isFiltering()||this.viewport.getMetaData("nothread")||this.viewport.getMetaData("sortlimit")){b.show().next().hide();b.down().hide()}else{b.down().show()}a.childElements().invoke("removeClassName","sortup").invoke("removeClassName","sortdown");b=a.down("div a[sortby="+c+"]");if(b){b.up().addClassName(this.viewport.getMetaData("sortdir")?"sortup":"sortdown")}},togglePreviewPane:function(){var a=DIMP.conf.preview_pref=!DIMP.conf.preview_pref;$("previewtoggle").setText(a?DIMP.text.hide_preview:DIMP.text.show_preview);[$("msgList")].invoke(a?"removeClassName":"addClassName","msglistNoPreview");this._updatePrefs("show_preview",a?1:0);this.viewport.showSplitPane(a);if(a){this.initPreviewPane()}},loadPreview:function(d,e){var a=$("previewPane"),b,c;if(!a.visible()){return}if(!e){if(this.pp&&this.pp.imapuid==d.imapuid&&this.pp.view==d.view){return}this.pp=d;c=d.imapuid+d.view;if(this.ppfifo.indexOf(c)!=-1){return this._loadPreviewCallback(this.ppcache[c])}}b=a.positionedOffset();$("msgLoading").setStyle({position:"absolute",top:(b.top+10)+"px",left:(b.left+10)+"px"}).show();DimpCore.doAction("ShowPreview",e||{},this.viewport.createSelection("dataob",this.pp),this.bcache.get("loadPC")||this.bcache.set("loadPC",this._loadPreviewCallback.bind(this)))},_loadPreviewCallback:function(resp){var ppuid,row,search,tmp,tmp2,pm=$("previewMsg"),r=resp.response,t=$("msgHeadersContent").down("THEAD");if(!r.error){search=this.viewport.getViewportSelection().search({imapuid:{equal:[r.index]},view:{equal:[r.folder]}});if(search.size()){row=search.get("dataob").first();this.updateUnseenUID(row,0)}}if(this.pp&&(this.pp.imapuid!=r.index||this.pp.view!=r.folder)){return}if(r.error||this.viewport.getSelected().size()!=1){if(r.error){DimpCore.showNotifications([{type:r.errortype,message:r.error}])}this.clearPreviewPane();return}ppuid=r.index+r.folder;this._expirePPCache([ppuid]);this.ppcache[ppuid]=resp;this.ppfifo.push(ppuid);DimpCore.removeAddressLinks(pm);DIMP.conf.msg_index=r.index;DIMP.conf.msg_folder=r.folder;tmp=pm.select(".subject");tmp.invoke("update",r.subject);switch(r.priority){case"high":case"low":tmp.invoke("insert",{top:$($(r.priority+"_priority_img").cloneNode(false)).writeAttribute("id",false)});break}$("msgHeadersColl").select(".date").invoke("update",r.minidate);$("msgHeaderDate").select(".date").invoke("update",r.fulldate);["from","to","cc"].each(function(a){if(r[a]){(a=="from"?pm.select("."+a):[t.down("."+a)]).each(function(elt){elt.replace(DimpCore.buildAddressLinks(r[a],elt.cloneNode(false)))})}[$("msgHeader"+a.capitalize())].invoke(r[a]?"show":"hide")});$("toggleHeaders").select(".attachmentImage").invoke(r.atc_label?"show":"hide");if(r.atc_label){tmp=$("msgAtc").show().down(".label");tmp2=$("partlist");tmp2.hide().previous().update(new Element("SPAN",{className:"atcLabel"}).insert(r.atc_label)).insert(r.atc_download);if(r.atc_list){$("partlist_col").show();$("partlist_exp").hide();tmp.down().hide().next().show();tmp2.down("TABLE").update(r.atc_list)}else{tmp.down().show().next().hide()}}else{$("msgAtc").hide()}$("msgBody").update(r.msgtext);$("msgLoading","previewInfo").invoke("hide");$("previewPane").scrollTop=0;pm.show();if(r.js){eval(r.js.join(";"))}this._addHistory("msg:"+row.view+":"+row.imapuid)},initPreviewPane:function(){var a=this.viewport.getSelected();if(a.size()!=1){this.clearPreviewPane()}else{this.loadPreview(a.get("dataob").first())}},clearPreviewPane:function(){$("msgLoading","previewMsg").invoke("hide");$("previewInfo").show();this.pp=null},_toggleHeaders:function(a,b){if(b){DIMP.conf.toggle_pref=!DIMP.conf.toggle_pref;this._updatePrefs("dimp_toggle_headers",a.id=="th_expand"?1:0)}[a.up().select("A"),$("msgHeadersColl","msgHeaders")].flatten().invoke("toggle")},_expirePPCache:function(a){this.ppfifo=this.ppfifo.without(a);a.each(function(b){delete this.ppcache[b]},this);if(this.ppfifo.size()>20){delete this.ppcache[this.ppfifo.shift()]}},updateUnseenUID:function(b,e){var c,d,a;if(!b.bg){return false}a=b.bg.indexOf("unseen")!=-1;if((e&&a)||(!e&&!a)){return false}c=this.viewport.createSelection("dataob",b);d=Number($(this.getFolderId(b.view)).readAttribute("u"));if(e){this.viewport.updateFlag(c,"unseen",true);++d}else{this.viewport.updateFlag(c,"unseen",false);--d}this.updateUnseenStatus(b.view,d)},updateUnseenStatus:function(b,a){if(this.viewport){this.viewport.setMetaData({unseen:a},b)}this.setFolderLabel(b,a);if(this.folder==b){this.updateTitle()}},setMessageListTitle:function(){var b,a=this.viewport.getMetaData("total_rows");if(a>0){b=this.viewport.currentOffset();$("msgHeader").update(DIMP.text.messages+" "+(b+1)+" - "+(Math.min(b+this.viewport.getPageSize(),a))+" "+DIMP.text.of+" "+a)}else{$("msgHeader").update(DIMP.text.nomessages)}},setFolderLabel:function(b,c){var a,d=this.getFolderId(b);a=$(d);if(!a||!a.hasAttribute("u")){return}c=Number(c);a.writeAttribute("u",c);if(b=="INBOX"&&window.fluid){window.fluid.setDockBadge(c?c:"")}$(d+"_label").update((c>0)?new Element("STRONG").insert(a.readAttribute("l")).insert(" ").insert(new Element("SPAN",{className:"count",dir:"ltr"}).insert("("+c+")")):a.readAttribute("l"))},getFolderId:function(a){return"fld"+decodeURIComponent(a).replace(/_/g,"__").replace(/\W/g,"_")},getSubFolderId:function(a){return"sub"+a},pollFolders:function(){this.setPollFolders();var a={};if(this.folder&&$("dimpmain_folder").visible()&&this.viewport.getMetaData("label")){a=this.viewport.addRequestParams({})}$("checkmaillink").down("A").update("["+DIMP.text.check+"]");DimpCore.doAction("PollFolders",a,null,this.bcache.get("pollFC")||this.bcache.set("pollFC",this._pollFoldersCallback.bind(this)))},_pollFoldersCallback:function(b){var a;b=b.response;if(b.poll){a=this;$H(b.poll).each(function(c){a.updateUnseenStatus(c.key,c.value)})}if(b.quota){this._displayQuota(b.quota)}$("checkmaillink").down("A").update(DIMP.text.getmail)},_displayQuota:function(a){q=$("quota").cleanWhitespace();q.setText(a.m);q.down("SPAN.used IMG").writeAttribute({width:99-a.p})},setPollFolders:function(){if(DIMP.conf.refresh_time){if(this.pollPE){this.pollPE.stop()}this.pollPE=new PeriodicalExecuter(this.pollFolders.bind(this),DIMP.conf.refresh_time)}},_portalCallback:function(b){if(b.response.linkTags){var a=$(document.documentElement).down("HEAD");b.response.linkTags.each(function(c){var d=new Element("LINK",{type:"text/css",rel:"stylesheet",href:c.href});if(c.media){d.media=c.media}a.insert(d)})}$("dimpmain_portal").update(b.response.portal)},searchfilterRun:function(){if(!this.viewport.isFiltering()){this.filtertoggle=1;this.fspecial=this.viewport.getMetaData("special")}this.viewport.runFilter($F("msgList_filter"))},_searchfilterOnFocus:function(){var a=$("qoptions").up();if($("msgList_filter").hasClassName("msgFilterDefault")){this._setFilterText(false)}if(!this.filter_on){this.filter_on=true;$("sf_current").update(this.viewport.getMetaData("label"));this._setSearchfilterParams(this.viewport.getMetaData("special")?"to":"from","msg");this._setSearchfilterParams("current","folder");$(document.documentElement).setStyle({overflowY:"hidden"});Effect.SlideDown(a,{duration:0.5,afterFinish:function(){this._onResize(false,true);$(document.documentElement).setStyle({overflowY:"auto"})}.bind(this)})}},_searchfilterOnBlur:function(){if(!$F("msgList_filter")){this._setFilterText(true)}},searchfilterClear:function(a){if(!this.filter_on){return}this.filter_on=false;if(this.searchobserve){clearTimeout(this.searchobserve);this.searchobserve=null}this._setFilterText(true);Effect.SlideUp($("qoptions").up(),{duration:0.5,afterFinish:this._onResize.bind(this,a)});this.filtertoggle=2;this.resetSelected();this.viewport.stopFilter(a)},_setFilterText:function(b){var a=$("msgList_filter");if(b){a.setValue(DIMP.text.search);a.addClassName("msgFilterDefault")}else{a.setValue("");a.removeClassName("msgFilterDefault")}},_setSearchfilterParams:function(d,a){var b=(a=="folder")?this.sfiltersfolder:this.sfilters;b.keys().each(function(c){$(c).writeAttribute("className",(d==b.get(c))?"qselected":"")})},updateSearchfilter:function(b,a){this._setSearchfilterParams(b,a);if($F("msgList_filter")){this.viewport.runFilter()}},_addSearchfilterParams:function(){var a=this.sfiltersfolder.keys().find(function(b){return $(b).hasClassName("qselected")});return $H({searchfolder:this.sfiltersfolder.get(a),searchmsg:this.sfilters.get(this._getSearchfilterField())})},_getSearchfilterField:function(){return this.sfilters.keys().find(function(a){return $(a).hasClassName("qselected")})},toggleButtons:function(){var a=(this.selectedCount()==0);DimpCore.buttons.each(function(c){var d=$(c);if(d){[d.up()].invoke(a?"addClassName":"removeClassName","disabled");DimpCore.DMenu.disable(c+"_img",true,a)}})},_folderDropHandler:function(c,d,i){var h,g,f,b=c.readAttribute("mbox"),a=c.readAttribute("ftype");if(d.hasClassName("folder")){h=(c==$("dropbase"));if(h||(a!="special"&&!this.isSubfolder(d,c))){DimpCore.doAction("RenameFolder",{old_name:d.readAttribute("mbox"),new_parent:h?"":b,new_name:d.readAttribute("l")},null,this.bcache.get("folderC")||this.bcache.set("folderC",this._folderCallback.bind(this)))}}else{if(a!="container"){g=this.viewport.getSelected();if(g.size()){f=g}else{if(d.readAttribute("mbox")!=b){f=this.viewport.createSelection("domid",d.id)}}if(f.size()){if(i.ctrlKey){DimpCore.doAction("CopyMessage",this.viewport.addRequestParams({tofld:b}),f,this.bcache.get("pollFC")||this.bcache.set("pollFC",this._pollFoldersCallback.bind(this)))}else{if(this.folder!=b){this.viewport.updateFlag(f,"deletedmsg",true);DimpCore.doAction("MoveMessage",this.viewport.addRequestParams({tofld:b}),f,this.bcache.get("deleteC")||this.bcache.set("deleteC",this._deleteCallback.bind(this)))}}}}}},dragCaption:function(){var a=this.selectedCount();return a+" "+(a==1?DIMP.text.message:DIMP.text.messages)},_keydownHandler:function(i){var j,c,a,b,k,h,d,f=i.element(),g=i.keyCode||i.charCode;c=i.findElement("FORM");if(c){switch(g){case Event.KEY_ESC:case Event.KEY_TAB:if(f.readAttribute("id")=="msgList_filter"){if(g==Event.KEY_ESC||!f.getValue()){this.searchfilterClear(false)}f.blur();i.stop()}break;case Event.KEY_RETURN:if(c.readAttribute("id")=="RB_folder"){this.cfolderaction(i);i.stop()}break}return}if(!$("dimpmain_folder").visible()){return}d=this.viewport.getSelected();switch(g){case Event.KEY_DELETE:case Event.KEY_BACKSPACE:b=d.get("dataob");if(i.shiftKey){this.moveSelected((b.last().rownum==this.viewport.getMetaData("total_rows"))?(b.first().rownum-1):(b.last().rownum+1),true)}this.flag("deleted",b);i.stop();break;case Event.KEY_UP:case Event.KEY_DOWN:if(i.shiftKey&&this.lastrow!=-1){k=this.viewport.createSelection("rownum",this.lastrow+((g==Event.KEY_UP)?-1:1));if(k.size()){k=k.get("dataob").first();this.viewport.scrollTo(k.rownum);this.msgSelect(k.domid,{shift:true})}}else{this.moveSelected(g==Event.KEY_UP?-1:1)}i.stop();break;case Event.KEY_PAGEUP:case Event.KEY_PAGEDOWN:if(!i.ctrlKey&&!i.shiftKey&&!i.altKey&&!i.metaKey){a=this.viewport.getPageSize()-1;move=a*(g==Event.KEY_PAGEUP?-1:1);if(d.size()==1){j=this.viewport.currentOffset();h=d.get("rownum").first()-1;switch(g){case Event.KEY_PAGEUP:if(j!=h){move=j-h}break;case Event.KEY_PAGEDOWN:if((j+a)!=h){move=j+a-h}break}}this.moveSelected(move);i.stop()}break;case Event.KEY_HOME:case Event.KEY_END:this.moveSelected(g==Event.KEY_HOME?1:this.viewport.getMetaData("total_rows"),true);i.stop();break;case Event.KEY_RETURN:if(!f.match("input")){if(d.size()==1){this.msgWindow(d.get("dataob").first())}}i.stop();break;case 65:case 97:if(i.ctrlKey){this.selectAll();i.stop()}break}},_keyupHandler:function(a){if(a.element().readAttribute("id")=="msgList_filter"){if(this.searchobserve){clearTimeout(this.searchobserve)}if(this.filter_on){this.searchobserve=(this.bcache.get("searchfilterR")||this.bcache.set("searchfilterR",this.searchfilterRun.bind(this))).delay(0.5)}}},_clickHandler:function(d,c){if(d.isRightClick()){return}var a=d.element(),h=d.element(),g,f,b;while(Object.isElement(a)){g=a.readAttribute("id");switch(g){case"msgList":if(c){if(!h.hasClassName("msgRow")){h=h.up(".msgRow")}b=this.viewport.createSelection("domid",h.identify()).get("dataob").first();b.draft?DimpCore.compose("resume",{folder:b.view,uid:b.imapuid}):this.msgWindow(b);d.stop();return}break;case"RB_Folder_ok":this.cfolderaction(d);d.stop();return;case"RB_Folder_cancel":this._closeRedBox();d.stop();return;case"normalfolders":case"specialfolders":this._handleFolderMouseClick(d);break;case"hometab":case"logolink":this.go("portal");d.stop();return;case"button_compose":case"composelink":DimpCore.compose("new");d.stop();return;case"checkmaillink":this.pollFolders();d.stop();return;case"fetchmaillink":IMPDialog.display({dialog_load:DIMP.conf.URI_IMP+"/FetchmailDialog"});d.stop();return;case"appportal":case"appoptions":this.go(g.substring(3));d.stop();return;case"applogout":a.down("A").update("["+DIMP.text.onlogout+"]");DimpCore.logout();d.stop();return;case"newfolder":this.createBaseFolder();d.stop();return;case"button_forward":case"button_reply":this.composeMailbox(g=="button_reply"?"reply":DIMP.conf.forward_default);break;case"button_deleted":case"button_ham":case"button_spam":this.flag(g.substring(7));d.stop();return;case"button_other":DimpCore.DMenu.trigger(d.findElement("A").next(),true);d.stop();return;case"sf_all":case"sf_current":this.updateSearchfilter(g.substring(3),"folder");d.stop();return;case"sf_msgall":case"sf_from":case"sf_to":case"sf_subject":this.updateSearchfilter(g.substring(3),"msg");d.stop();return;case"msglistHeader":this.sort(d);d.stop();return;case"ctx_folder_create":this.createSubFolder(DimpCore.DMenu.element());break;case"ctx_folder_rename":this.renameFolder(DimpCore.DMenu.element());break;case"ctx_folder_empty":f=DimpCore.DMenu.element().readAttribute("mbox");DimpCore.DMenu.close(true);if(window.confirm(DIMP.text.empty_folder)){DimpCore.doAction("EmptyFolder",{view:f},null,this._emptyFolderCallback.bind(this))}break;case"ctx_folder_delete":f=DimpCore.DMenu.element().readAttribute("mbox");DimpCore.DMenu.close(true);if(window.confirm(DIMP.text.delete_folder)){DimpCore.doAction("DeleteFolder",{view:f},null,this.bcache.get("folderC")||this.bcache.set("folderC",this._folderCallback.bind(this)))}break;case"ctx_folder_seen":case"ctx_folder_unseen":this.flag(g=="ctx_folder_seen"?"allSeen":"allUnseen",null,DimpCore.DMenu.element().readAttribute("mbox"));break;case"ctx_folder_poll":case"ctx_folder_nopoll":this.modifyPollFolder(DimpCore.DMenu.element().readAttribute("mbox"),g=="ctx_folder_poll");break;case"ctx_container_create":this.createSubFolder(DimpCore.DMenu.element());break;case"ctx_container_rename":this.renameFolder(DimpCore.DMenu.element());break;case"ctx_message_spam":case"ctx_message_ham":case"ctx_message_blacklist":case"ctx_message_whitelist":case"ctx_message_deleted":case"ctx_message_undeleted":this.flag(g.substring(12));break;case"ctx_draft_resume":this.composeMailbox("resume");d.stop();return;case"ctx_draft_flagged":case"ctx_draft_clear":case"ctx_draft_deleted":case"ctx_draft_undeleted":this.flag(g.substring(10));break;case"ctx_reply_reply":case"ctx_reply_reply_all":case"ctx_reply_reply_list":this.composeMailbox(g.substring(10));break;case"ctx_forward_forward_all":case"ctx_forward_forward_body":case"ctx_forward_forward_attachments":this.composeMailbox(g.substring(12));break;case"previewtoggle":this.togglePreviewPane();break;case"oa_seen":case"oa_unseen":case"oa_flagged":case"oa_clear":case"oa_blacklist":case"oa_whitelist":case"oa_undeleted":this.flag(g.substring(3));break;case"oa_selectall":this.selectAll();break;case"oa_purge_deleted":this.purgeDeleted();break;case"th_expand":case"th_collapse":this._toggleHeaders(a,true);break;case"msg_newwin":case"msg_newwin_options":this.msgWindow(this.viewport.getViewportSelection().search({imapuid:{equal:[DIMP.conf.msg_index]},view:{equal:[DIMP.conf.msg_folder]}}).get("dataob").first());d.stop();return;case"qclose":this.searchfilterClear(false);d.stop();return;case"applicationfolders":b=d.element();if(!b.hasClassName("custom")){b.up("LI.custom")}if(b){this.go("app:"+b.down("A").identify().substring(3));d.stop();return}break;case"tabbar":if(d.element().hasClassName("applicationtab")){this.go("app:"+d.element().identify().substring(6));d.stop();return}break;case"dimpmain_portal":if(d.element().match("H1.header a")){this.go("app:"+d.element().readAttribute("app"));d.stop();return}break}a=a.up()}},_mouseHandler:function(c,b){var a=c.element();switch(b){case"over":if(DragDrop.Drags.drag&&a.hasClassName("exp")){this._toggleSubFolder(a.up(),"exp")}break}},renameFolder:function(a){if(Object.isUndefined(a)){return}a=$(a);var b=this._createFolderForm(function(c){this._folderAction(a,c,"rename");return false}.bindAsEventListener(this),DIMP.text.rename_prompt);b.down("input").setValue(a.readAttribute("l"))},createBaseFolder:function(){this._createFolderForm(function(a){this._folderAction("",a,"create")}.bindAsEventListener(this),DIMP.text.create_prompt)},createSubFolder:function(a){if(Object.isUndefined(a)){return}this._createFolderForm(function(b){this._folderAction($(a),b,"createsub")}.bindAsEventListener(this),DIMP.text.createsub_prompt)},_createFolderForm:function(a,b){var c=new Element("FORM",{action:"#",id:"RB_folder"}).insert(new Element("P").insert(b)).insert(new Element("INPUT",{type:"text",size:15})).insert(new Element("INPUT",{type:"button",id:"RB_Folder_ok",className:"button",value:DIMP.text.ok})).insert(new Element("INPUT",{type:"button",id:"RB_Folder_cancel",className:"button",value:DIMP.text.cancel}));this.cfolderaction=a;RedBox.overlay=true;RedBox.onDisplay=Form.focusFirstElement.curry(c);RedBox.showHtml(c);return c},_closeRedBox:function(){RedBox.close();this.cfolderaction=null},_folderAction:function(b,d,h){this._closeRedBox();var c,g,f,a=d.findElement("form");f=$F(a.down("input"));if(f){switch(h){case"rename":if(b.readAttribute("l")!=f){c="RenameFolder";g={old_name:b.readAttribute("mbox"),new_parent:b.up().hasClassName("folderlist")?"":b.up(1).previous().readAttribute("mbox"),new_name:f}}break;case"create":case"createsub":c="CreateFolder";g={view:f};if(h=="createsub"){g.parent=b.readAttribute("mbox")}break}if(c){DimpCore.doAction(c,g,null,this.bcache.get("folderC")||this.bcache.set("folderC",this._folderCallback.bind(this)))}}},_folderCallback:function(a){a=a.response;if(a.d){a.d.each(this.bcache.get("deleteFolder")||this.bcache.set("deleteFolder",this.deleteFolder.bind(this)))}if(a.c){a.c.each(this.bcache.get("changeFolder")||this.bcache.set("changeFolder",this.changeFolder.bind(this)))}if(a.a){a.a.each(this.bcache.get("createFolder")||this.bcache.set("createFolder",this.createFolder.bind(this)))}},_deleteCallback:function(c){var a=null,b=[],d;this.msgListLoading(false);this._pollFoldersCallback(c);c=c.response;if(!c.uids||c.folder!=this.folder){return}c.uids=DimpCore.parseRangeString(c.uids);d=this.viewport.getViewportSelection(this.folder);if(d.getBuffer().getMetaData("search")){$H(c.uids).each(function(e){e.value.each(function(f){b.push(f+e.key)})});a=this.viewport.getViewportSelection().search({vp_id:{equal:b}})}else{c.uids=c.uids[this.folder];c.uids.each(function(g,e){b.push(e+g)}.curry(this.folder));a=this.viewport.createSelection("uid",c.uids)}if(a.size()){if(c.remove){this.viewport.remove(a,{cacheid:c.cacheid,noupdate:c.viewport});this._expirePPCache(b)}else{this.viewport.updateFlag(a,"deletedmsg",true)}}},_emptyFolderCallback:function(a){if(a.response.mbox){if(this.folder==a.response.mbox){this.viewport.reload();this.clearPreviewPane()}this.setFolderLabel(a.response.mbox,0)}},_flagAllCallback:function(a){if(a.response.mbox){this.setFolderLabel(a.response.mbox,a.response.u)}},_folderLoadCallback:function(b){this._folderCallback(b);var c=$("normalfolders"),a=c.getStyle("max-height");$("foldersLoading").hide();$("foldersSidebar").show();if(a!==null||(Prototype.Browser.IE&&Object.isUndefined(a)&&(c.getStyle("height")=="0px"))){this._sizeFolderlist();Event.observe(window,"resize",this._sizeFolderlist.bind(this))}if(b.response.quota){this._displayQuota(b.response.quota)}},_handleFolderMouseClick:function(c){var b=c.element(),a=b.up(".folder")||b.up(".custom");if(!a){return}if(b.hasClassName("exp")||b.hasClassName("col")){this._toggleSubFolder(a.id,"tog")}else{switch(a.readAttribute("ftype")){case"container":case"vcontainer":c.stop();break;case"folder":case"special":case"virtual":c.stop();return this.go("folder:"+a.readAttribute("mbox"));break}}},_toggleSubFolder:function(c,d){c=$(c);var b={duration:0.2},a=$(this.getSubFolderId(c.id));if(a&&(d=="tog"||(d=="exp"&&!a.visible())||(d=="col"&&a.visible()))){if(c.descendantOf("specialfolders")){b.afterFinish=this._sizeFolderlist}c.firstDescendant().writeAttribute({className:a.visible()?"exp":"col"});if(a.visible()){Effect.BlindUp(a,b)}else{Effect.BlindDown(a,b)}}},createFolder:function(c){var b,f,j,g,h,e=this.getFolderId(c.m),a=decodeURIComponent(c.m),d=this.getSubFolderId(e),k=$(d),i=c.v?(c.co?"vcontainer":"virtual"):(c.co?"container":(c.s?"special":"folder"));j=new Element("LI",{className:"folder",id:e,l:c.l,mbox:a,ftype:i});b=new Element("DIV",{className:c.cl||"base",id:e+"_div"});if(c.i){b.setStyle({backgroundImage:'url("'+c.i+'")'})}if(c.ch){b.writeAttribute({className:"exp"})}j.insert(b).insert(new Element("A",{id:e+"_label",title:c.l}).insert(c.l));if(k){if(k.insert({before:j}).visible()){b.removeClassName("exp").addClassName("col")}}else{if(c.s){h=$("specialfolders")}else{h=$(this.getSubFolderId(this.getFolderId(c.pa)));h=(h)?h.down():$("normalfolders")}g=a.toLowerCase();f=h.childElements().find(function(l){var m=l.readAttribute("mbox");return m&&(!c.s||m!="INBOX")&&(g=3){A.msgs.push({type:"horde.success",message:DIMP.text.ajax_recover})}this.server_error=0;if(!A.msgs_noauto){this.showNotifications(A.msgs)}if(this.onDoActionComplete){this.onDoActionComplete(A)}this.inAjaxCallback=false},setTitle:function(A){document.title=DIMP.conf.name+" :: "+A},showNotifications:function(A){if(!A.size()||this.is_logout){return}A.find(function(B){switch(B.type){case"dimp.timeout":this.logout(DIMP.conf.timeout_url);return true;case"horde.error":case"horde.message":case"horde.success":case"horde.warning":case"imp.reply":case"imp.forward":case"imp.redirect":case"dimp.request":case"dimp.sticky":var E,D,C,G=$("hordeAlerts"),H=new Element("DIV",{className:B.type.replace(".","-")}),F=B.message;if(!G){G=new Element("DIV",{id:"hordeAlerts"});$(document.body).insert(G)}if($w("dimp.request dimp.sticky").indexOf(B.type)==-1){F=F.unescapeHTML().unescapeHTML()}G.insert(H.update(F));if(DIMP.conf.is_ie6){E=new Element("DIV",{id:"hordeIE6AlertsFix"}).clonePosition(H,{setLeft:false,setTop:false});E.insert(H.remove());G.insert(E)}if($w("horde.error dimp.request dimp.sticky").indexOf(B.type)==-1){this.alertsFade.bind(this,H).delay(B.type=="horde.warning"?10:3)}if(B.type=="dimp.request"){this.alertrequest=H}if(C=$("hordeAlertslog")){switch(B.type){case"horde.error":D=DIMP.text.alog_error;break;case"horde.message":D=DIMP.text.alog_message;break;case"horde.success":D=DIMP.text.alog_success;break;case"horde.warning":D=DIMP.text.alog_warning;break}if(D){C=C.down("DIV UL");if(C.down().hasClassName("hordeNoalerts")){C.down().remove()}C.insert(new Element("LI").insert(new Element("P",{className:"label"}).insert(D)).insert(new Element("P",{className:"indent"}).insert(F).insert(new Element("SPAN",{className:"alertdate"}).insert("["+(new Date).toLocaleString()+"]"))))}}}},this)},alertsFade:function(A){if(A){Effect.Fade(A,{duration:1.5,afterFinish:this.removeAlert.bind(this)})}},toggleAlertsLog:function(){var A=$("alertsloglink").down("A"),C=$("hordeAlertslog").down("DIV"),B={duration:0.5,queue:{position:"end",scope:"hordeAlertslog",limit:2}};if(C.visible()){Effect.BlindUp(C,B);A.update(DIMP.text.showalog)}else{Effect.BlindDown(C,B);A.update(DIMP.text.hidealog)}},removeAlert:function(C){try{var A=$(C.element),B=A.up();A.remove();if(!B.childElements().size()&&B.readAttribute("id")=="hordeIE6AlertsFix"){B.remove()}}catch(D){this.debug("removeAlert",D)}},compose:function(C,B){var A=DIMP.conf.compose_url;B=B||{};if(C){B.type=C}this.popupWindow(this.addURLParam(A,B),"compose"+new Date().getTime())},popupWindow:function(B,A){if(!(window.open(B,A.replace(/\W/g,"_"),"width="+DIMP.conf.popup_width+",height="+DIMP.conf.popup_height+",status=1,scrollbars=yes,resizable=yes"))){this.showNotifications([{type:"horde.warning",message:DIMP.text.popup_block}])}},closePopup:function(){if(this.inAjaxCallback){this.closePopup.bind(this).defer()}else{window.close()}},logout:function(A){this.is_logout=true;this.redirect(A||(DIMP.conf.URI_IMP+"/LogOut"))},redirect:function(A){A=this.addURLParam(A);if(parent.frames.horde_main){parent.location=A}else{window.location=A}},buildAddressLinks:function(D,A){var E,C,B=D.size();if(B>15){C=$("largeaddrspan").cloneNode(true);C.writeAttribute("id","largeaddrspan_active");A.insert(C);E=C.down(".dispaddrlist");C=C.down(1);C.setText(C.getText().replace("%d",B))}else{E=A}D.each(function(I,H){var F,G;if(I.raw){F=I.raw}else{G=I.personal?(I.personal+" <"+I.inner+">"):I.inner;F=new Element("A",{className:"address",personal:I.personal,email:I.inner,address:G}).insert(G.escapeHTML());this.DMenu.addElement(F.identify(),"ctx_contacts",{offset:F,left:true})}E.insert(F);if(H+1!=B){E.insert(", ")}},this);return A},removeAddressLinks:function(A){A.select(".address").each(function(B){this.DMenu.removeElement(B.identify())},this)},addURLParam:function(A,C){var B=A.indexOf("?");C=$H(C);if(DIMP.conf.SESSION_ID){C.update(DIMP.conf.SESSION_ID.toQueryParams())}if(B!=-1){C.update(A.toQueryParams());A=A.substring(0,B)}return C.size()?(A+"?"+C.toQueryString()):A},reloadMessage:function(A){if(typeof DimpFullmessage!="undefined"){window.location=this.addURLParam(document.location.href,A)}else{DimpBase.loadPreview(null,A)}},_clickHandler:function(D){if(D.isRightClick()){return}var A=D.element(),E,C,B;if(this.alertrequest){this.alertsFade(this.alertrequest);this.alertrequest=null}while(Object.isElement(A)){E=A.readAttribute("id");switch(E){case"partlist_toggle":B=$("partlist");$("partlist_col","partlist_exp").invoke("toggle");C={duration:0.2,queue:{position:"end",scope:"partlist",limit:2}};if(B.visible()){Effect.BlindUp(B,C)}else{Effect.BlindDown(B,C)}D.stop();return;case"msg_print":window.print();D.stop();return;case"msg_view_source":this.popupWindow(this.addURLParam(DIMP.conf.URI_VIEW,{index:DIMP.conf.msg_index,mailbox:DIMP.conf.msg_folder,actionID:"view_source",id:0},true),DIMP.conf.msg_index+"|"+DIMP.conf.msg_folder);break;case"ctx_contacts_new":this.compose("new",{to:this.DMenu.element().readAttribute("address")});break;case"ctx_contacts_add":this.doAction("AddContact",{name:this.DMenu.element().readAttribute("personal"),email:this.DMenu.element().readAttribute("email")},null,true);break;case"alertsloglink":this.toggleAlertsLog();break;case"hordeAlerts":this.alertsFade(A);break;case"largeaddrspan_active":B=A.down();[B.down(),B.down(1),B.next()].invoke("toggle");break}A=A.up()}}};if(typeof ContextSensitive!="undefined"){DimpCore.DMenu=new ContextSensitive()}document.observe("dom:loaded",function(){try{if(parent.opener&&parent.opener.location.host==window.location.host&&parent.opener.DimpCore){DIMP.baseWindow=parent.opener.DIMP.baseWindow||parent.opener}}catch(A){}if(!DIMP.conf.spam_reporting){DimpCore.buttons=DimpCore.buttons.without("button_spam")}if(!DIMP.conf.ham_reporting){DimpCore.buttons=DimpCore.buttons.without("button_ham")}document.observe("click",DimpCore._clickHandler.bindAsEventListener(DimpCore))});Event.observe(window,"load",function(){DimpCore.window_load=true});Element.addMethods({setText:function(B,C){var A=0;$A(B.childNodes).each(function(D){if(D.nodeType==3){if(A++){Element.remove(D)}else{D.nodeValue=C}}});if(!A){$(B).insert(C)}},getText:function(B,A){var C="";$A(B.childNodes).each(function(D){if(D.nodeType==3){C+=D.nodeValue}else{if(A&&D.hasChildNodes()){C+=$(D).getText(true)}}});return C}});Object.extend(Array.prototype,{numericSort:function(){return this.collect(Number).sort(function(B,A){if(B>A){return 1}else{if(B0)&&(this.element.getStyle("position")=="absolute")){this.element.insert({after:''});this.iefix=$(this.element.id+"_iefix")}if(this.iefix){setTimeout(this.fixIEOverlapping.bind(this),50)}},fixIEOverlapping:function(){this.iefix.clonePosition(this.element).setStyle({zIndex:1}).show();this.element.setStyle({zIndex:2})},hide:function(){this.active=false;this.stopIndicator();if(this.element.visible()){this.options.onHide(this.element)}if(this.iefix){this.iefix.hide()}},startIndicator:function(){if(this.options.indicator){$(this.options.indicator).show()}},stopIndicator:function(){if(this.options.indicator){$(this.options.indicator).hide()}},onKeyPress:function(a){if(!this.active){return}switch(a.keyCode){case Event.KEY_TAB:case Event.KEY_RETURN:this.selectEntry();a.stop();case Event.KEY_ESC:this.hide();this.active=false;a.stop();return;case Event.KEY_LEFT:case Event.KEY_RIGHT:return;case Event.KEY_UP:this.markPrevious();this.render();a.stop();return;case Event.KEY_DOWN:this.markNext();this.render();a.stop();return}},onHover:function(c){var b=c.findElement("LI"),a=parseInt(b.readAttribute("autocompleteIndex"));if(this.index!=a){this.index=a;this.render()}c.stop()},onClick:function(b){var a=b.findElement("LI");this.index=parseInt(a.readAttribute("autocompleteIndex"));this.selectEntry();this.hide();b.stop()},onBlur:function(){setTimeout(this.hide.bind(this),250);this.active=false},render:function(){if(this.entryCount>0){for(var a=0;a0){this.index--}else{this.index=this.entryCount-1}},markNext:function(){if(this.index'+d+"";f=f.replace(j,e);if(this.htmlAreaParent){f=f.replace(new RegExp("(<[^>]*)"+RegExp.escape(e)+"([^>]*>)","g"),"$1"+d+"$2")}},this);if(!this.reviewDiv){this.reviewDiv=new Element("div",{className:h.readAttribute("className")+" spellcheck"}).setStyle({overflow:"auto"});if(this.resumeOnDblClick){this.reviewDiv.observe("dblclick",this.resume.bind(this))}}g=h.getDimensions();this.reviewDiv.setStyle({width:g.width+"px",height:g.height+"px"});if(!this.htmlAreaParent){f=f.replace(/~~~/g,"
")}this.reviewDiv.update(f);this.reviewDiv.select('span[name="incorrect"]').invoke("observe","click",this.showSuggestions.bindAsEventListener(this));this.reviewDiv.select("A").invoke("observe","click",Event.stop);if(this.htmlAreaParent){Element.hide(this.htmlArea);$(this.htmlAreaParent).insert({bottom:this.reviewDiv})}else{h.hide().insert({before:this.reviewDiv})}this.status("ResumeEdit")},showSuggestions:function(d){var f,a=d.element(),b=new Element("UL");try{f=a.viewportOffset()}catch(c){f=[d.pointerX(),d.pointerY()]}this.removeChoices();this.choicesDiv=new Element("DIV",{className:"autocomplete"}).setStyle({left:f[0]+"px",top:(f[1]+16)+"px"}).hide();this.curWord=a;$A(this.suggestions[this.curWord.readAttribute("index")]).each(function(e){b.insert({bottom:new Element("LI").update(e)})});this.choicesDiv.insert({bottom:b});this.choices=new KeyNavList(this.choicesDiv,{onChoose:function(e){this.replaceWord(e,this.curWord)}.bind(this)}).show();$(document.body).insert(this.choicesDiv)},replaceWord:function(a,b){b.update(a.innerHTML).writeAttribute({className:"corrected"});this.removeChoices()},removeChoices:function(){if(this.choicesDiv){this.choicesDiv.remove();this.choicesDiv=null}},resume:function(){this.removeChoices();if(!this.reviewDiv){return}var a=$(this.target),b;this.reviewDiv.select('span[name="incorrect"]').each(function(c){c.replace(c.innerHTML)});this.reviewDiv.select("A").invoke("stopObserving","click");b=this.reviewDiv.innerHTML;if(!this.htmlAreaParent){b=b.replace(/
/gi,"~~~").unescapeHTML().replace(/~~~/g,"\n")}a.value=b;a.disabled=false;if(this.resumeOnDblClick){this.reviewDiv.stopObserving("dblclick")}this.reviewDiv.remove();this.reviewDiv=null;this.status("CheckSpelling");if(this.htmlAreaParent){Element.show(this.htmlArea)}else{a.show()}if(this.onAfterSpellCheck){this.onAfterSpellCheck()}},status:function(a){if(!this.statusButton){return}this.state=a;switch(this.statusButton.tagName){case"INPUT":this.statusButton.value=this.buttonStates[a];break;case"A":this.statusButton.update(this.buttonStates[a]);break}this.statusButton.className=this.statusClass+" "+a},isActive:function(){return(this.reviewDiv)}});
\ No newline at end of file
diff --git a/imp/js/ViewPort.js b/imp/js/ViewPort.js
deleted file mode 100644
index 913629d32..000000000
--- a/imp/js/ViewPort.js
+++ /dev/null
@@ -1 +0,0 @@
-var ViewPort=Class.create({initialize:function(a){a.content=$(a.content_container);a.empty=a.empty_container?$(a.empty_container):null;a.error=a.error_container?$(a.error_container):null;this.opts=a;this.scroller=new ViewPort_Scroller(this);this.template=new Template(a.template);this.current_req_lookup=$H();this.current_req=$H();this.fetch_hash=$H();this.views=$H();this.showSplitPane(a.show_split_pane);this.isbusy=this.line_height=this.page_size=this.splitbar=this.splitbar_loc=this.uc_run=this.view=this.viewport_init=null;this.request_num=1},loadView:function(b,d,c){var a,f,h,e={},g;this._clearWait();if(this.page_size===null){g=this.getPageSize(this.show_split_pane?"default":"max");if(isNaN(g)){this.loadView.bind(this,b,d,c).defer();return}this.page_size=g}if(this.view){if(!c){this.views.set(this.view,{buffer:this._getBuffer(),offset:this.currentOffset()})}f=this.views.get(b)}else{h=true}if(c){e={background:true,view:b}}else{this.view=b;if(!this.viewport_init){this.viewport_init=1;this._renderViewport()}}if(f){this._updateContent(f.offset,e);if(!c){if(this.opts.onComplete){this.opts.onComplete()}this.opts.ajaxRequest(this.opts.fetch_action,this.addRequestParams({checkcache:1,rownum:this.currentOffset()+1}))}return true}else{if(!h){if(this.opts.onClearRows){this.opts.onClearRows(this.opts.content.childElements())}this.opts.content.update();this.scroller.clear()}}a=this._getBuffer(b,true);this.views.set(b,{buffer:a,offset:0});if(d){e.search=d}else{e.offset=0}this._fetchBuffer(e);return false},deleteView:function(a){this.views.unset(a)},scrollTo:function(a,c){var b=this.scroller;c=c||{};b.noupdate=c.noupdate;switch(this.isVisible(a)){case-1:b.moveScroll(a-1);break;case 0:if(c.top){b.moveScroll(a-1)}break;case 1:b.moveScroll(Math.min(a,this.getMetaData("total_rows")-this.getPageSize()+1));break}b.noupdate=false},isVisible:function(a){var b=this.currentOffset();return(a(b+this.getPageSize("current")))?1:0)},reload:function(a){if(this.isFiltering()){this.filter.filter(null,a)}else{this._fetchBuffer({offset:this.currentOffset(),purge:true,params:a})}},remove:function(f,c){if(this.isbusy){this.remove.bind(this,f,cacheid,view).defer();return}if(!f.size()){return}c=c||{};this.isbusy=true;var a,b=0,e=f.get("div"),d=e.size();this.deselect(f);if(c.cacheid){this._getBuffer(c.view).setMetaData({cacheid:c.cacheid},true)}if(d){a={duration:0.3,to:0.01};e.each(function(g){if(++b==d){a.afterFinish=this._removeids.bind(this,f,c)}Effect.Fade(g,a)},this)}else{this._removeids(f,c)}},_removeids:function(b,a){this._getBuffer(a.view).setMetaData({total_rows:this.getMetaData("total_rows",a.view)-b.size()},true);if(this.opts.onRemoveRows){this.opts.onRemoveRows(b)}this._getBuffer().remove(b.get("rownum"));if(this.opts.onCacheUpdate){this.opts.onCacheUpdate(a.view||this.view)}if(!a.noupdate){this.requestContentRefresh(this.currentOffset())}this.isbusy=false},addFilter:function(a,b){this.filter=new ViewPort_Filter(this,a,b)},runFilter:function(b,a){if(this.filter){this.filter.filter(Object.isUndefined(b)?null:b,a)}},isFiltering:function(){return this.filter?this.filter.isFiltering():false},stopFilter:function(a){if(this.filter){this.filter.clear(a)}},onResize:function(b,a){if(!this.uc_run||!this.opts.content.visible()){return}if(this.resizefunc){clearTimeout(this.resizefunc)}if(a){this._onResize(b)}else{this.resizefunc=this._onResize.bind(this,b).delay(0.1)}},_onResize:function(a){if(this.opts.onBeforeResize){this.opts.onBeforeResize()}this._renderViewport(a);if(this.opts.onAfterResize){this.opts.onAfterResize()}},requestContentRefresh:function(b){if(this._updateContent(b)){var a=this._getBuffer().isNearingLimit(b);if(a){this._fetchBuffer({offset:b,background:true,nearing:a})}return true}return false},_fetchBuffer:function(a){if(this.isbusy){this._fetchBuffer.bind(this,a).defer();return}this.isbusy=true;if(this.opts.onFetch&&!a.background){this.opts.onFetch()}var m=(a.view||this.view),h=this.opts.fetch_action,f,n=this._getBuffer(m),j,d,g=$H(a.params),e,p,q,l,c,k,o,i;if(a.purge){g.set("purge",true)}if(a.search){k="search";o=a.search;d=this._lookbehind(m);g.update({search_before:d,search_after:n.bufferSize()-d})}else{k="rownum";o=a.offset+1;f=n.getAllRows(true);c=a.rowlist?a.rowlist:this._getSliceBounds(o,a.nearing,m);l=$A($R(c.start,c.end)).diff(f);if(!a.purge&&!l.size()){this.isbusy=false;return}g.update({slice:l.first()+":"+l.last()})}g.set(k,Object.toJSON(o));if(this.isFiltering()){h=this.filter.getAction()}p=[m,k,o].toJSON();e=this.fetch_hash.get(p);j=this.current_req.get(m);if(j){if(e&&j.get(e)){if(++j.get(e).count==4){this._displayFetchError();this._removeRequest(m,e);this.isbusy=false;return}}else{if(k=="rownum"){i=$A($R(o,o+this.getPageSize())).diff(f);if(!i.size()){this.isbusy=false;return}q=j.keys().numericSort().find(function(b){var s=j.get(b).rlist;i=i.diff(s);if(!i.size()){return true}l=l.diff(s)});if(q){if(!a.background){this._addRequest(m,q,{background:false,offset:o-1})}this.isbusy=false;return}else{if(!a.background){j.keys().each(function(b){this._addRequest(m,b,{background:true})},this)}}}}}if(!e){e=this.fetch_hash.set(p,this.request_num++)}g.set("request_id",e);this._addRequest(m,e,{background:a.background,offset:o-1,rlist:l});this.opts.ajaxRequest(h,this.addRequestParams(g,{noslice:true,view:m}));this._handleWait();this.isbusy=false},_getSliceBounds:function(c,d,a){var e=this._getBuffer(a).bufferSize(),b={};switch(d){case"bottom":b.start=c+this.getPageSize();b.end=b.start+e;break;case"top":b.start=Math.max(c-e,1);b.end=c;break;default:b.start=Math.max(c-this._lookbehind(a),1);b.end=b.start+e;break}return b},_lookbehind:function(a){return parseInt(0.4*this._getBuffer(a).bufferSize(),10)},addRequestParams:function(a,c){c=c||{};var f=this.getMetaData("cacheid",c.view),b,d,e;if(this.isFiltering()){d=this.filter.addFilterParams().merge({view:this.isFiltering()})}else{d=this.opts.additionalParams?this.opts.additionalParams(c.view||this.view):$H();d.update({view:c.view||this.view})}if(f){d.update({cacheid:f})}if(!c.noslice){e=this._getSliceBounds(this.currentOffset(),null,c.view);d.update({slice:e.start+":"+e.end})}if(this.opts.onCachedList){b=this.opts.onCachedList(c.view||this.view)}else{b=this._getBuffer(c.view).getAllUIDs();b=b.size()?b.toJSON():""}if(b.length){d.update({cached:b})}return d.merge(a)},ajaxResponse:function(d){if(this.isbusy){this.ajaxResponse.bind(this,d).defer();return}this.isbusy=true;this._clearWait();var a,b,e=(d.request_id)?this.current_req_lookup.get(d.request_id):d.id,c=this.current_req.get(e);if(c&&d.request_id){b=c.get(d.request_id)}if(this.viewport_init){this.viewport_init=2}a=this._getBuffer(e);a.update(Object.isArray(d.data)?{}:d.data,Object.isArray(d.rowlist)?{}:d.rowlist,d.metadata||{},{partial:d.partial,reset:d.reset,resetmd:d.resetmd,update:d.update});if(!d.partial){a.setMetaData({cacheid:d.cacheid,label:d.label,total_rows:d.totalrows},true)}if(this.opts.onCacheUpdate){this.opts.onCacheUpdate(e)}if(d.request_id){this._removeRequest(e,d.request_id)}this.isbusy=false;if(d.partial){this.select(this.getViewportSelection(e))}else{if(!(this.view==e||d.search)||(b&&b.background)||!this._updateContent((b&&b.offset)?b.offset:(d.rownum?parseInt(d.rownum)-1:this.currentOffset()))){return}if(this.opts.onComplete){this.opts.onComplete()}}if(this.opts.onEndFetch){this.opts.onEndFetch()}},_addRequest:function(a,b,e){var d=this.current_req.get(a),c;if(!d){d=this.current_req.set(a,$H())}c=d.get(b);if(!c){c=d.set(b,{count:1})}["background","offset","rlist"].each(function(f){if(!Object.isUndefined(e[f])){c[f]=e[f]}});this.current_req_lookup.set(b,a)},_removeRequest:function(a,b){var c=this.current_req.get(a);if(c){c.unset(b);if(!c.size()){this.current_req.unset(a)}}this.current_req_lookup.unset(b)},_updateContent:function(g,d){d=d||{};if(!this._getBuffer(d.view).sliceLoaded(g)){this._fetchBuffer($H(d).merge({offset:g}).toObject());return false}if(!this.uc_run){this.uc_run=true;if(this.opts.onFirstContent){this.opts.onFirstContent()}}var h=this.opts.content,a=[],b=this.getPageSize(),f,e=this.getSelected();if(this.opts.onClearRows){this.opts.onClearRows(h.childElements())}this.scroller.updateSize();this.scrollTo(g+1,{noupdate:true,top:true});g=this.currentOffset();f=this.createSelection("rownum",$A($R(g+1,g+b)));if(f.size()){f.get("dataob").each(function(i){var c=Object.clone(i);if(c.bg){c.bg=i.bg.clone();if(e.contains("uid",c.vp_id)){c.bg.push(this.opts.selected_class)}c.bg_string=c.bg.join(" ")}a.push(this.template.evaluate(c))},this);h.update(a.join(""));if(this.opts.onUpdateClass){f.get("div").each(function(c){this.opts.onUpdateClass(c)},this)}}else{h.update((this.opts.empty&&this.viewport_init!=1)?this.opts.empty.innerHTML:"")}if(this.opts.onContent){this.opts.onContent(f)}return true},_displayFetchError:function(){if(this.opts.onFail){this.opts.onFail()}if(this.opts.error){this.opts.content.update(this.opts.error.innerHTML)}},_handleWait:function(a){this._clearWait();if(a&&this.opts.onWait){this.opts.onWait()}if(this.opts.viewport_wait){this.waitHandler=this._handleWait.bind(this,true).delay(this.opts.viewport_wait)}},_clearWait:function(){if(this.waitHandler){clearTimeout(this.waitHandler);this.waitHandler=null}},visibleRows:function(){return this.opts.content.childElements()},getMetaData:function(b,a){return this._getBuffer(a).getMetaData(b)},setMetaData:function(b,a){this._getBuffer(a).setMetaData(b,false)},_getBuffer:function(c,d){c=c||this.view;if(!d){var a=this.views.get(c);if(a){return a.buffer}}return new ViewPort_Buffer(this,this.opts.buffer_pages,this.opts.limit_factor,c)},currentOffset:function(){return this.scroller.currentOffset()},updateFlag:function(c,a,b){this._updateFlag(c,a,b,this.isFiltering());this._updateClass(c,a,b)},_updateFlag:function(d,a,c,b){d.get("dataob").each(function(e){if(c){e.bg.push(a)}else{e.bg.splice(e.bg.indexOf(a),1)}if(b){this._updateFlag(this.createSelection("uid",e.vp_id,e.view),a,c)}},this)},_updateClass:function(c,a,b){c.get("div").each(function(e){if(b){e.addClassName(a)}else{e.removeClassName(a)}if(this.opts.onUpdateClass){this.opts.onUpdateClass(e)}},this)},_getLineHeight:function(){if(this.line_height){return this.line_height}var a=new Element("DIV",{className:this.opts.content_class}).insert(new Element("DIV",{className:this.opts.row_class})).hide();$(document.body).insert(a);this.line_height=a.getHeight();a.remove();return this.line_height},getPageSize:function(a){switch(a){case"current":return Math.min(this.page_size,this.getMetaData("total_rows"));case"default":return Math.max(parseInt(this.getPageSize("max")*0.45),5);case"max":return parseInt(this._getMaxHeight()/this._getLineHeight());default:return this.page_size}},_getMaxHeight:function(){return document.viewport.getHeight()-this.opts.content.viewportOffset()[1]},showSplitPane:function(a){this.show_split_pane=a;this.onResize(false,true)},_renderViewport:function(e){if(!this.viewport_init){return}if(!this.opts.content.offsetHeight){return this._renderViewport.bind(this,e).defer()}var f,b,j,d,i=$(this.opts.content),g=document.documentElement,a=this._getLineHeight();if(this.opts.split_pane){j=$(this.opts.split_pane);if(this.show_split_pane){if(!j.visible()){this._initSplitBar();this.page_size=(this.splitbar_loc)?this.splitbar_loc:this.getPageSize("default")}d=true}else{if(j.visible()){this.splitbar_loc=this.page_size;$(j,this.splitbar).invoke("hide")}}}if(!d){this.page_size=this.getPageSize("max")}b=a*this.page_size;i.setStyle({height:b+"px"});if(d){j.setStyle({height:(this._getMaxHeight()-b-a)+"px"}).show();this.splitbar.show()}else{if(f=g.scrollHeight-g.clientHeight){i.setStyle({height:(a*(this.page_size-1))+"px"})}}if(!e){this.scroller.onResize()}},_initSplitBar:function(){if(this.splitbar){return}this.splitbar=$(this.opts.splitbar);new Drag(this.splitbar,{constraint:"vertical",ghosting:true,onStart:function(){var a=this._getLineHeight();this.sp={lh:a,pos:$(this.opts.content).positionedOffset()[1],max:parseInt((this._getMaxHeight()-100)/a),lines:this.page_size}}.bind(this),snap:function(a,d,c){var b=parseInt((d-this.sp.pos)/this.sp.lh);if(b<1){b=1}else{if(b>this.sp.max){b=this.sp.max}}this.sp.lines=b;return[a,this.sp.pos+(b*this.sp.lh)]}.bind(this),onEnd:function(){this.page_size=this.sp.lines;this._renderViewport()}.bind(this)});this.splitbar.observe("dblclick",function(){this.page_size=this.getPageSize("default");this._renderViewport()}.bind(this))},createSelection:function(d,c,b){var a=this._getBuffer(b);return a?new ViewPort_Selection(a,d,c):new ViewPort_Selection(this._getBuffer(this.view))},getViewportSelection:function(b,c){var a=this._getBuffer(b);return this.createSelection("uid",a?a.getAllUIDs(c):[],b)},select:function(f,c){c=c||{};var a=this._getBuffer(),d,e;if(c.range){e=this.createSelection("rownum",f);if(f.size()!=e.size()){this._fetchBuffer({offset:this.currentOffset(),params:{rangeslice:1},rowlist:{start:f.min(),end:f.size()}});return}f=e}if(!c.add){d=this.getSelected();a.deselect(d,true);this._updateClass(d,this.opts.selected_class,false)}a.select(f);this._updateClass(f,this.opts.selected_class,true);if(this.opts.selectCallback){this.opts.selectCallback(f,c)}},deselect:function(b,a){a=a||{};if(!b.size()){return}if(this._getBuffer().deselect(b,a&&a.clearall)){this._updateClass(b,this.opts.selected_class,false);if(this.opts.deselectCallback){this.opts.deselectCallback(b,a)}}},getSelected:function(){return Object.clone(this._getBuffer().getSelected())}}),ViewPort_Scroller=Class.create({initialize:function(a){this.vp=a},_createScrollBar:function(){if(this.scrollDiv){return false}var a=this.vp.opts.content;this.scrollDiv=new Element("DIV",{className:"sbdiv",style:"height:"+a.getHeight()+"px;"}).hide();a.insert({after:this.scrollDiv}).setStyle({marginRight:"-"+this.scrollDiv.getWidth()+"px"});this.scrollbar=new DimpSlider(this.scrollDiv,{buttonclass:{up:"sbup",down:"sbdown"},cursorclass:"sbcursor",onChange:this._onScroll.bind(this),onSlide:this.vp.opts.onSlide?this.vp.opts.onSlide:null,pagesize:this.vp.getPageSize(),totalsize:this.vp.getMetaData("total_rows")});a.observe(Prototype.Browser.Gecko?"DOMMouseScroll":"mousewheel",function(c){if(Prototype.Browser.Gecko&&c.eventPhase==2){return}var b=this.vp.getPageSize();b=(b>3)?3:b;this.moveScroll(this.currentOffset()+((c.wheelDelta>=0||c.detail<0)?(-1*b):b))}.bindAsEventListener(this));return true},onResize:function(){if(!this.scrollDiv){return}this.scrollsize=this.vp.opts.content.getHeight();this.scrollDiv.setStyle({height:this.scrollsize+"px"});this.updateSize();this.vp.requestContentRefresh(this.currentOffset())},updateSize:function(){if(!this._createScrollBar()){this.scrollbar.updateHandleLength(this.vp.getPageSize(),this.vp.getMetaData("total_rows"))}},clear:function(){if(this.scrollDiv){this.scrollbar.updateHandleLength(0,0)}},moveScroll:function(a){this._createScrollBar();this.scrollbar.setScrollPosition(a)},_onScroll:function(){if(!this.noupdate){if(this.vp.opts.onScroll){this.vp.opts.onScroll()}this.vp.requestContentRefresh(this.currentOffset());if(this.vp.opts.onScrollIdle){this.vp.opts.onScrollIdle()}}},currentOffset:function(){return this.scrollbar?this.scrollbar.getValue():0}}),ViewPort_Buffer=Class.create({initialize:function(c,d,b,a){this.bufferPages=d;this.limitFactor=b;this.vp=c;this.view=a;this.clear()},getView:function(){return this.view},_limitTolerance:function(){return Math.round(this.bufferSize()*(this.limitFactor/100))},bufferSize:function(){return Math.round(Math.max(this.vp.getPageSize("max")+1,this.bufferPages*this.vp.getPageSize()))},update:function(f,a,c,b){var e;f=$H(f);a=$H(a);b=b||{};if(!b.reset&&this.data.size()){this.data.update(f);if(b.partial||this.partial.size()){f.keys().each(function(d){if(b.partial){this.partial.set(d,true)}else{this.partial.unset(d)}},this)}}else{this.data=f}if(b.update||b.reset){this.uidlist=a;this.rowlist=$H()}else{this.uidlist=this.uidlist.size()?this.uidlist.merge(a):a}a.each(function(d){this.rowlist.set(d.value,d.key)},this);if(b.resetmd){this.usermdata=$H(c)}else{$H(c).each(function(d){if(Object.isString(d.value)||Object.isNumber(d.value)){this.usermdata.set(d.key,d.value)}else{e=this.usermdata.get(d.key);if(e){this.usermdata.get(d.key).update($H(d.value))}else{this.usermdata.set(d.key,$H(d.value))}}},this)}},sliceLoaded:function(a){return!this._rangeCheck($A($R(a+1,Math.min(a+this.vp.getPageSize()-1,this.getMetaData("total_rows")))))},isNearingLimit:function(a){if(this.uidlist.size()!=this.getMetaData("total_rows")){if(a!=0&&this._rangeCheck($A($R(Math.max(a+1-this._limitTolerance(),1),a)))){return"top"}else{if(this._rangeCheck($A($R(a+1,Math.min(a+this._limitTolerance()+this.vp.getPageSize()-1,this.getMetaData("total_rows")))).reverse())){return"bottom"}}}return false},_rangeCheck:function(a){var b=this.partial.size();return a.any(function(d){var c=this.rowlist.get(d);return(Object.isUndefined(c)||(b&&this.partial.get(c)))},this)},getData:function(a){return a.collect(function(b){var c=this.data.get(b);if(!Object.isUndefined(c)){c.domid="vp_row"+b;c.rownum=this.uidlist.get(b);c.vp_id=b;return c}},this).compact()},getAllUIDs:function(b){var a=this.uidlist.keys();return b?a.diff(this.partial.keys()):a},getAllRows:function(b){var a=this.rowlist.keys();return b?this.rowsToUIDs(a,true):a},rowsToUIDs:function(b,a){return b.collect(function(d){var c=this.rowlist.get(d);return a?((this.partial.get(c))?null:c):c},this).compact()},select:function(a){this.selected.add("uid",a.get("uid"))},deselect:function(c,b){var a=this.selected.size();if(b){this.selected.clear()}else{this.selected.remove("uid",c.get("uid"))}return a!=this.selected.size()},getSelected:function(){return this.selected},remove:function(b){var c=b.min(),d,e=this.rowlist.size(),a=0;d=e-b.size();return this.rowlist.keys().each(function(h){if(h>=c){var g=this.rowlist.get(h),f;if(b.include(h)){this.data.unset(g);this.uidlist.unset(g);a++}else{if(a){f=h-a;this.rowlist.set(f,g);this.uidlist.set(g,f)}}if(h>d){this.rowlist.unset(h)}}},this)},clear:function(){this.data=$H();this.partial=$H();this.mdata=$H({total_rows:0});this.usermdata=$H();this.rowlist=$H();this.selected=new ViewPort_Selection(this);this.uidlist=$H()},getMetaData:function(a){return this.mdata.get(a)||this.usermdata.get(a)},setMetaData:function(b,a){if(a){this.mdata.update(b)}else{this.usermdata.update(b)}}}),ViewPort_Filter=Class.create({initialize:function(a,b,c){this.vp=a;this.action=b;this.callback=c;this.filtering=this.last_filter=this.last_folder=null},filter:function(d,b){b=b||{};if(d===null){d=this.last_filter}else{d=d.toLowerCase();if(d==this.last_filter){return}}if(!d){this.clear();return}this.last_filter=d;if(this.filtering){this.vp._fetchBuffer({offset:0,params:b});return}this.filtering=true;this.last_folder=this.vp.view;var e=this.vp.opts.content,a;a=e.childElements().findAll(function(c){return c.collectTextNodes().toLowerCase().indexOf(d)==-1});if(this.vp.opts.onClearRows){this.vp.opts.onClearRows(a)}a.invoke("remove");this.vp.scroller.clear();if(this.vp.opts.empty&&!e.childElements().size()){e.update(this.vp.opts.empty.innerHTML)}this.vp.loadView("%%filter%%")},isFiltering:function(){return this.filtering?this.last_folder:false},getAction:function(){return this.action},addFilterParams:function(){if(!this.filtering){return $H()}var a=$H({filter:this.last_filter});if(this.callback){a.update(this.callback())}return a},clear:function(a){if(this.filtering){this.filtering=null;if(!a){this.vp.loadView(this.last_folder)}this.vp.deleteView("%%filter%%");this.last_filter=this.last_folder=null}}}),ViewPort_Selection=Class.create({initialize:function(a,c,b){this.buffer=a;this.clear();if(!Object.isUndefined(c)){this.add(c,b)}this.viewport_selection=true},add:function(a,b){var e=this._convert(a,b);this.data=(this.data.size())?this.data.concat(e).uniq():e},remove:function(a,b){this.data=this.data.diff(this._convert(a,b))},_convert:function(a,b){b=Object.isArray(b)?b:[b];switch(a){case"dataob":return b.pluck("vp_id");case"div":return b.pluck("id").invoke("substring",6);case"domid":return b.invoke("substring",6);case"rownum":return this.buffer.rowsToUIDs(b);case"uid":return b}},clear:function(){this.data=[]},get:function(a){a=Object.isUndefined(a)?"uid":a;if(a=="uid"){return this.data}var b=this.buffer.getData(this.data);switch(a){case"dataob":return b;case"div":return b.pluck("domid").collect(function(c){return $(c)}).compact();case"domid":return b.pluck("domid");case"rownum":return b.pluck("rownum")}},contains:function(a,b){return this.data.include(this._convert(a,b).first())},search:function(a){return new ViewPort_Selection(this.buffer,"uid",this.get("dataob").findAll(function(b){return $H(a).all(function(c){return $H(c.value).all(function(d){switch(d.key){case"equal":case"not":var e=b[c.key]&&d.value.include(b[c.key]);return(d.key=="equal")?e:!e;case"regex":return b[c.key].match(d.value)}})})}).pluck("vp_id"))},size:function(){return this.data.size()},set:function(a){this.get("dataob").each(function(b){$H(a).each(function(c){b[c.key]=c.value})})},getBuffer:function(){return this.buffer}});Object.extend(Array.prototype,{diff:function(a){return this.select(function(b){return!a.include(b)})},numericSort:function(){return this.collect(Number).sort(function(d,c){return(d>c)?1:((d
";g=""+d.sig.replace(/^ ?
\n/,"").replace(/ +/g," ")+"
";b=b.replace(/\s*[\s\S]*?\s*<\/p>/,e)}else{b=$F(h).replace(/\r\n/g,"\n");e=i.sig;g=d.sig}f=(i.id[2])?b.indexOf(e):b.lastIndexOf(e);if(f!=-1){if(d.id[2]==i.id[2]){b=b.substring(0,f)+g+b.substring(f+e.length,b.length)}else{if(d.id[2]){b=g+b.substring(0,f)+b.substring(f+e.length,b.length)}else{b=b.substring(0,f)+b.substring(f+e.length,b.length)+g}}b=b.replace(/\r\n/g,"\n").replace(/\n/g,"\r\n");if(this.editor_on){FCKeditorAPI.GetInstance("message").SetHTML(b)}else{h.setValue(b)}$("last_identity").setValue(a)}},get_identity:function(b,a){a=Object.isUndefined(a)?this.editor_on:a;return{id:DIMP.conf_compose.identities[b],sig:DIMP.conf_compose.identities[b][(a?1:0)].replace(/^\n/,"")}},uniqueSubmit:function(b){var a,d,f,e=$("compose");if(DIMP.SpellCheckerObject){DIMP.SpellCheckerObject.resume();if(!this.textarea_ready){this.uniqueSubmit.bind(this,b).defer();return}}e.setStyle({cursor:"wait"});if(b=="send_message"||b=="save_draft"){this.button_pressed=true;switch(b){case"send_message":if(!this.sbtext){f=$("send_button");this.sbtext=f.getText();f.setText(DIMP.text_compose.sending)}break;case"save_draft":if(!this.dbtext){a=$("draft_button");this.dbtext=a.getText();a.setText(DIMP.text_compose.saving)}break}if(this.uploading){(function(){if(this.button_pressed){this.uniqueSubmit(b)}}).bind(this).delay(0.25);return}}$("action").setValue(b);if(b=="add_attachment"){this.uploading=true;e.submit()}else{if(this.editor_on){FCKeditorAPI.GetInstance("message").UpdateLinkedField()}d=e.serialize(true);if(!DIMP.baseWindow){d.nonotify=true}DimpCore.doAction("*"+DIMP.conf.compose_url,d,null,this.uniqueSubmitCallback.bind(this))}},uniqueSubmitCallback:function(b){var a,c=b.response;if(!c){return}if(c.imp_compose){$("composeCache").setValue(c.imp_compose)}if(c.success||c.action=="add_attachment"){switch(c.action){case"auto_save_draft":this.button_pressed=false;$("draft_index").setValue(c.draft_index);break;case"save_draft":this.button_pressed=false;if(DIMP.baseWindow){DIMP.baseWindow.DimpBase.pollFolders();DIMP.baseWindow.DimpCore.showNotifications(b.msgs)}if(DIMP.conf_compose.close_draft){return this._closeCompose()}break;case"send_message":this.button_pressed=false;if(DIMP.baseWindow){switch(c.reply_type){case"reply":DIMP.baseWindow.DimpBase.flag("answered",c.index,c.reply_folder);break;case"forward":DIMP.baseWindow.DimpBase.flag("forwarded",c.index,c.reply_folder);break}if(c.folder){DIMP.baseWindow.DimpBase.createFolder(c.folder)}if(c.draft_delete){DIMP.baseWindow.DimpBase.pollFolders()}DIMP.baseWindow.DimpCore.showNotifications(b.msgs)}return this._closeCompose();case"add_attachment":this.uploading=false;if(c.success){this.addAttach(c.info.number,c.info.name,c.info.type,c.info.size)}else{this.button_pressed=false}if(DIMP.conf_compose.attach_limit!=-1&&$("attach_list").childElements().size()>DIMP.conf_compose.attach_limit){$("upload").writeAttribute("disabled",false);a=new Element("DIV",[DIMP.text_compose.attachment_limit])}else{a=new Element("INPUT",{type:"file",name:"file_1"});a.observe("change",this.uploadAttachment.bind(this))}$("upload_wait").replace(a.writeAttribute("id","upload"));this.resizeMsgArea();break}}else{this.button_pressed=false}$("compose").setStyle({cursor:null});if(!this.button_pressed){if(this.sbtext){$("send_button").setText(this.sbtext)}if(this.dbtext){$("draft_button").setText(this.dbtext)}this.dbtext=this.sbtext=null}DimpCore.showNotifications(b.msgs)},toggleHtmlEditor:function(a){if(!DIMP.conf_compose.rte_avail){return}a=a||false;if(DIMP.SpellCheckerObject){DIMP.SpellCheckerObject.resume()}var c;if(this.editor_on){this.editor_on=false;c=FCKeditorAPI.GetInstance("message").GetHTML();$("messageParent").childElements().invoke("hide");$("message").show();DimpCore.doAction("Html2Text",{text:c},null,this.setMessageText.bind(this),{asynchronous:false})}else{this.editor_on=true;if(!a){DimpCore.doAction("Text2Html",{text:$F("message")},null,this.setMessageText.bind(this),{asynchronous:false})}oFCKeditor.Height=this.getMsgAreaHeight();try{FCKeditorAPI.GetInstance("message").SetHTML($F("message"));$("messageParent").childElements().invoke("show");$("message").hide()}catch(b){this._RTELoading("show");FCKeditor_OnComplete=this._RTELoading.curry("hide");oFCKeditor.ReplaceTextarea()}}$("htmlcheckbox").checked=this.editor_on;$("html").setValue(this.editor_on?1:0)},_RTELoading:function(b){var c,a;if(!$("rteloading")){a=new Element("DIV",{id:"rteloading"}).clonePosition($("messageParent"));$(document.body).insert(a);c=a.viewportOffset();$(document.body).insert(new Element("SPAN",{id:"rteloadingtxt"}).setStyle({top:(c.top+15)+"px",left:(c.left+15)+"px"}).insert(DIMP.text.loading))}$("rteloading","rteloadingtxt").invoke(b)},toggleHtmlCheckbox:function(){if(!this.editor_on||window.confirm(DIMP.text_compose.toggle_html)){this.toggleHtmlEditor()}},getMsgAreaHeight:function(){return document.viewport.getHeight()-$("messageParent").cumulativeOffset()[1]-this.mp_padding},initializeSpellChecker:function(){if(!DIMP.conf_compose.rte_avail){return}if(typeof DIMP.SpellCheckerObject!="object"){this.initializeSpellChecker.bind(this).defer();return}DIMP.SpellCheckerObject.onBeforeSpellCheck=function(){if(!this.editor_on){return}DIMP.SpellCheckerObject.htmlAreaParent="messageParent";DIMP.SpellCheckerObject.htmlArea=$("message").adjacent("iframe[id*=message]").first();$("message").setValue(FCKeditorAPI.GetInstance("message").GetHTML());this.textarea_ready=false}.bind(this);DIMP.SpellCheckerObject.onAfterSpellCheck=function(){if(!this.editor_on){return}DIMP.SpellCheckerObject.htmlArea=DIMP.SpellCheckerObject.htmlAreaParent=null;var a=FCKeditorAPI.GetInstance("message");a.SetHTML($F("message"));a.Events.AttachEvent("OnAfterSetHTML",function(){this.textarea_ready=true}.bind(this))}.bind(this)},setMessageText:function(b){var a=$("message");if(!a){$("messageParent").insert(new Element("TEXTAREA",{id:"message",name:"message",style:"width:100%;"}).insert(b.response.text))}else{a.setValue(b.response.text)}if(!this.editor_on){this.resizeMsgArea()}},fillForm:function(g,h,b,e){if(!this.resizeto){this.fillForm.bind(this,g,h,b,e).defer();return}var a,d,c=this.get_identity($F("last_identity")),f=$("message");if(!this.last_msg.empty()&&this.last_msg!=$F(f).replace(/\r/g,"")&&!window.confirm(DIMP.text_compose.fillform)){return}if(DIMP.conf_compose.auto_save_interval_val&&!this.auto_save_interval){this.auto_save_interval=new PeriodicalExecuter(function(){var i;if(this.editor_on){i=FCKeditorAPI.GetInstance("message").GetHTML()}else{i=$F(f)}i=i.replace(/\r/g,"");if(!i.empty()&&this.last_msg!=i){this.uniqueSubmit("auto_save_draft");this.last_msg=i}}.bind(this),DIMP.conf_compose.auto_save_interval_val*60)}if(this.editor_on){d=FCKeditorAPI.GetInstance("message");d.SetHTML(g);this.last_msg=d.GetHTML().replace(/\r/g,"")}else{f.setValue(g);this.setCursorPosition(f);this.last_msg=$F(f).replace(/\r/g,"")}$("to").setValue(h.to);this.resizeto.resizeNeeded();if(h.cc){$("cc").setValue(h.cc);this.resizecc.resizeNeeded()}if(DIMP.conf_compose.cc){this.toggleCC("cc")}if(h.bcc){$("bcc").setValue(h.bcc);this.resizebcc.resizeNeeded()}if(c.id[6]){a=$F("bcc");if(a){a+=", "}$("bcc").setValue(a+c.id[6])}if(DIMP.conf_compose.bcc){this.toggleCC("bcc")}$("subject").setValue(h.subject);$("in_reply_to").setValue(h.in_reply_to);$("references").setValue(h.references);$("reply_type").setValue(h.replytype);Field.focus(b||"to");this.resizeMsgArea();if(DIMP.conf_compose.show_editor){if(!this.editor_on){this.toggleHtmlEditor(e||false)}if(b=="message"){this.focusEditor()}}},focusEditor:function(){try{FCKeditorAPI.GetInstance("message").Focus()}catch(a){this.focusEditor.bind(this).defer()}},addAttach:function(g,b,e,c){var d=new Element("SPAN").insert(b),f=new Element("DIV").insert(d).insert(" ["+e+"] ("+c+" KB) "),a=new Element("INPUT",{type:"button",atc_id:g,value:DIMP.text_compose.remove});f.insert(a);$("attach_list").insert(f);if(e!="application/octet-stream"){d.addClassName("attachName")}this.resizeMsgArea()},removeAttach:function(b){var a=[];b.each(function(c){c=$(c);a.push(c.down("INPUT").readAttribute("atc_id"));c.remove()});DimpCore.doAction("DeleteAttach",{atc_indices:a,imp_compose:$F("composeCache")});this.resizeMsgArea()},resizeMsgArea:function(){var a,b,d=document.documentElement,c=$("message");if(!DimpCore.window_load){this.resizeMsgArea.bind(this).defer();return}if(this.editor_on){a=$("messageParent").select("iframe").last();if(a){a.setStyle({height:this.getMsgAreaHeight()+"px"})}else{this.resizeMsgArea.bind(this).defer()}return}this.mp_padding=$("messageParent").getHeight()-c.getHeight();if(!this.row_height){a=$(c.cloneNode(false)).writeAttribute({id:null,name:null}).setStyle({visibility:"hidden"});$(document.body).insert(a);a.writeAttribute("rows",1);this.row_height=a.getHeight();a.writeAttribute("rows",2);this.row_height=a.getHeight()-this.row_height;a.remove()}b=parseInt(this.getMsgAreaHeight()/this.row_height);c.writeAttribute({rows:b,disabled:false});if(d.scrollHeight-d.clientHeight){c.writeAttribute({rows:b-1})}$("composeloading").hide()},uploadAttachment:function(){var a=$("upload");$("submit_frame").observe("load",this.attachmentComplete.bind(this));this.uniqueSubmit("add_attachment");a.stopObserving("change").replace(new Element("DIV",{id:"upload_wait"}).insert(DIMP.text_compose.uploading+" "+$F(a)))},attachmentComplete:function(){var a=$("submit_frame"),b=a.contentDocument||a.contentWindow.document;a.stopObserving("load");DimpCore.doActionComplete({responseJSON:b.body.innerHTML.evalJSON(true)},this.uniqueSubmitCallback.bind(this))},toggleCC:function(a){$("send"+a).show();$("toggle"+a).up().hide()},setCursorPosition:function(b){var c,a;switch(DIMP.conf_compose.compose_cursor){case"top":c=0;$("message").setValue("\n"+$F("message"));break;case"bottom":c=$F("message").length;break;case"sig":c=$F("message").replace(/\r\n/g,"\n").lastIndexOf(this.get_identity($F("last_identity")).sig)-1;break;default:return}if(b.setSelectionRange){Field.focus(b);b.setSelectionRange(c,c)}else{if(b.createTextRange){a=b.createTextRange();a.collapse(true);a.moveStart("character",c);a.moveEnd("character",0);Field.select(a);a.scrollIntoView(true)}}},openAddressbook:function(){window.open(DIMP.conf_compose.abook_url,"contacts","toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,width=550,height=300,left=100,top=100")},_clickHandler:function(b){if(b.isRightClick()){return}var a=orig=b.element(),d,c;while(Object.isElement(a)){c=a.readAttribute("id");switch(c){case"togglebcc":case"togglecc":this.toggleCC(c.substring(6));this.resizeMsgArea();break;case"compose_close":this.confirmCancel();break;case"draft_button":case"send_button":this.uniqueSubmit(c=="send_button"?"send_message":"save_draft");break;case"htmlcheckbox":this.toggleHtmlCheckbox();break;case"sendcc":case"sendbcc":case"sendto":if(orig.match("TD.label SPAN")){this.openAddressbook()}break;case"attach_list":if(orig.match("INPUT")){this.removeAttach([orig.up()])}else{if(orig.match("SPAN.attachName")){d=orig.next().readAttribute("atc_id");DimpCore.popupWindow(DimpCore.addURLParam(DIMP.conf.URI_VIEW,{composeCache:$F("composeCache"),actionID:"compose_attach_preview",id:d}),$F("composeCache")+"|"+d)}}break}a=a.up()}}},ResizeTextArea=Class.create({maxRows:5,initialize:function(c,b){this.field=$(c);this.defaultRows=Math.max(this.field.readAttribute("rows"),1);this.onResize=b;var a=this.resizeNeeded.bindAsEventListener(this);this.field.observe("mousedown",a).observe("keyup",a);this.resizeNeeded()},resizeNeeded:function(){var a=$F(this.field).split("\n"),c=this.field.readAttribute("cols"),b=a.size(),d=this.field.readAttribute("rows");a.each(function(e){if(e.length>=c){b+=Math.floor(e.length/c)}});if(b!=d){this.field.writeAttribute("rows",(b>d)?Math.min(b,this.maxRows):Math.max(this.defaultRows,b));if(this.onResize){this.onResize()}}}});document.observe("dom:loaded",function(){var b,a=DimpCompose,c=a.resizeMsgArea.bind(a);a.resizeMsgArea();a.initializeSpellChecker();$("upload").observe("change",a.uploadAttachment.bind(a));a.resizeto=new ResizeTextArea("to",c);a.resizecc=new ResizeTextArea("cc",c);a.resizebcc=new ResizeTextArea("bcc",c);if(Prototype.Browser.WebKit){$("submit_frame").writeAttribute({position:"absolute",width:"1px",height:"1px"}).setStyle({left:"-999px"}).show()}if(DIMP.conf_compose.abook_url){$("sendto","sendcc","sendbcc").each(function(d){d.down("TD.label SPAN").addClassName("composeAddrbook")})}document.observe("click",a._clickHandler.bindAsEventListener(a));$("compose").observe("submit",Event.stop);$("identity").observe("change",a.change_identity.bind(a));Event.observe(window,"resize",c)});
\ No newline at end of file
diff --git a/imp/js/compose.js b/imp/js/compose.js
deleted file mode 100644
index 40db8228b..000000000
--- a/imp/js/compose.js
+++ /dev/null
@@ -1 +0,0 @@
-var ImpCompose={display_unload_warning:true,textarea_ready:true,confirmCancel:function(a){if(window.confirm(IMP.text.compose_cancel)){this.display_unload_warning=false;if(this.popup){if(this.cancel_url){self.location=this.cancel_url}else{self.close()}}else{window.location=this.cancel_url}}else{a.stop()}},setCursorPosition:function(c,a){if(c.setSelectionRange){Field.focus(c);c.setSelectionRange(a,a)}else{if(c.createTextRange){var b=c.createTextRange();b.collapse(true);b.moveStart("character",a);b.moveEnd("character",0);Field.select(b);b.scrollIntoView(true)}}},changeIdentity:function(c){var a=$F(c),n=this.identities[$F("last_identity")],e=this.identities[a],d=0,h=$("bcc"),k=$("ssm"),j=$("sent_mail_folder"),f,g,b,m,l,o;if(this.rtemode){f=FCKeditorAPI.GetInstance("message");b=f.GetHTML.replace(/\r\n/g,"\n");g="
";m=""+e[0].replace(/^ ?
\n/,"").replace(/ +/g," ")+"
";b=b.replace(/\s*[\s\S]*?\s*<\/p>/,g)}else{b=$F("message").replace(/\r\n/g,"\n");g=n[0].replace(/^\n/,"");m=e[0].replace(/^\n/,"")}l=(n[1])?b.indexOf(g):b.lastIndexOf(g);if(l!=-1){if(e[1]==n[1]){b=b.substring(0,l)+m+b.substring(l+g.length,b.length)}else{if(e[1]){b=m+b.substring(0,l)+b.substring(l+g.length,b.length)}else{b=b.substring(0,l)+b.substring(l+g.length,b.length)+m}}b=b.replace(/\r\n/g,"\n").replace(/\n/g,"\r\n");$("last_identity").setValue(a);window.status=IMP.text.compose_sigreplace}else{window.status=IMP.text.compose_signotreplace}if(this.rtemode){f.SetHTML(b)}else{$("message").setValue(b)}if(this.smf_check){$A(j.options).detect(function(i){if(i.value==e[2]){j.selectedIndex=d;return true}++d})}else{if(j.firstChild){j.replaceChild(document.createTextNode(e[2]),j.firstChild)}else{j.appendChild(document.createTextNode(e[2]))}}if(k){k.checked=e[3]}if(h){bccval=h.value;if(n[4]){o=new RegExp(n[4]+",? ?","gi");bccval=bccval.replace(o,"");if(bccval){bccval=bccval.replace(/, ?$/,"")}}if(e[4]){if(bccval){bccval+=", "}bccval+=e[4]}h.setValue(bccval)}},uniqSubmit:function(b,a){a.stop();if(b=="redirect"){if($F("to")==""){alert(IMP.text.compose_recipient);$("to").focus()}else{if(!Prototype.Browser.WebKit){$("redirect").setStyle({cursor:"wait"})}this.display_unload_warning=false}return}if(b=="send_message"){if(($F("subject")=="")&&!window.confirm(IMP.text.compose_nosubject)){return}if(this.spellcheck&&IMP.SpellCheckerObject&&!IMP.SpellCheckerObject.isActive()){IMP.SpellCheckerObject.spellCheck();return}}if(IMP.SpellCheckerObject){IMP.SpellCheckerObject.resume()}if(!Prototype.Browser.WebKit){$("compose").setStyle({cursor:"wait"})}this.display_unload_warning=false;$("actionID").setValue(b);this._uniqSubmit()},_uniqSubmit:function(){if(this.textarea_ready){$("compose").submit()}else{this._uniqSubmit.defer()}},attachmentChanged:function(){var a=[],d=0,c,b,e;$("upload_atc").select('input[type="file"]').each(function(f){a[a.length]=f});if(this.max_attachments!==null&&a.length==this.max_attachments){return}a.each(function(f){if(f.value.length>0){d++}});if(d==a.length){c=$("attachment_row_"+d);if(c){e=new Element("TD",{align:"left"}).insert(new Element("STRONG").insert(IMP.text.compose_file+" "+(d+1)+":")).insert(" ");e.insert(new Element("INPUT",{type:"file",name:"upload_"+(d+1),size:25}));b=new Element("TR",{id:"attachment_row_"+(d+1)}).insert(e);c.parentNode.insertBefore(b,c.nextSibling)}}},initializeSpellChecker:function(){if(typeof IMP.SpellCheckerObject!="object"){this.initializeSpellChecker.defer();return}IMP.SpellCheckerObject.onBeforeSpellCheck=this._beforeSpellCheck.bind(this);IMP.SpellCheckerObject.onAfterSpellCheck=this._afterSpellCheck.bind(this)},_beforeSpellCheck:function(){IMP.SpellCheckerObject.htmlAreaParent="messageParent";IMP.SpellCheckerObject.htmlArea=$("message").adjacent("iframe[id*=message]").first();$("message").setValue(FCKeditorAPI.GetInstance("message").GetHTML());this.textarea_ready=false},_afterSpellCheck:function(){IMP.SpellCheckerObject.htmlArea=IMP.SpellCheckerObject.htmlAreaParent=null;var a=FCKeditorAPI.GetInstance("message");a.SetHTML($("message").value);a.Events.AttachEvent("OnAfterSetHTML",this._afterSetHTML.bind(this))},_afterSetHTML:function(){this.textarea_ready=true},clickHandler:function(c){var b=c.element(),a;if(b.hasClassName("button")){a=b.readAttribute("name");switch(a){case"btn_add_attachment":case"btn_redirect":case"btn_save_draft":case"btn_send_message":this.uniqSubmit(a.substring(4),c);break;case"btn_cancel_compose":this.confirmCancel(c);break}}},changeHandler:function(b){var a=b.element(),c=a.readAttribute("id");switch(c){case"identity":this.changeIdentity(a);break;case"stationery":this.uniqSubmit("change_stationery",b);break;case"sent_mail_folder":$("ssm").writeAttribute("checked","checked");break;default:if(c.substring(0,7)=="upload_"){this.attachmentChanged()}break}},onDomLoad:function(){$$("INPUT").each(function(a){if(a.type!="submit"&&a.type!="button"){a.observe("keydown",function(b){if(b.keyCode==10||b.keyCode==Event.KEY_RETURN){b.stop();return false}})}});if(this.cursor_pos!==null&&$("message")){this.setCursorPosition($("message"),this.cursor_pos)}if(this.redirect){$("to").focus()}else{if(Prototype.Browser.IE){$("subject").observe("keydown",function(a){if(a.keyCode==Event.KEY_TAB&&!a.shiftKey){a.stop();$("message").focus()}})}if(this.rtemode){this.initializeSpellChecker()}if($("to")&&!$F("to")){$("to").focus()}else{if(!$F("subject")){if(this.rtemode){$("subject").focus()}else{$("message").focus()}}}}},onLoad:function(){var b,a=this.redirect?$("redirect"):$("compose");if(this.popup&&!this.reloaded){b=Math.min(a.getHeight(),screen.height-100)-document.viewport.getHeight();if(b>0){window.resizeBy(0,b)}}document.observe("click",this.clickHandler.bindAsEventListener(this));document.observe("change",this.changeHandler.bindAsEventListener(this))},onBeforeUnload:function(){if(this.display_unload_warning){return IMP.text.compose_discard}}};document.observe("dom:loaded",ImpCompose.onDomLoad.bind(ImpCompose));Event.observe(window,"load",ImpCompose.onLoad.bind(ImpCompose));Event.observe(window,"beforeunload",ImpCompose.onBeforeUnload.bind(ImpCompose));
\ No newline at end of file
diff --git a/imp/js/contacts.js b/imp/js/contacts.js
deleted file mode 100644
index 85d2dfdc0..000000000
--- a/imp/js/contacts.js
+++ /dev/null
@@ -1 +0,0 @@
-var ImpContacts={_passAddresses:function(){var a="";$("selected_addresses").childElements().each(function(b){if(b.value){a+=b.value+"|"}});$("sa").setValue(a)},sameOption:function(e,d,a){var c=e+": "+d.value,b=a.value;return Try.these(function(){return(c==b)||(decodeURIComponent(c)==decodeURIComponent(b))},function(){return(c==b)})},addAddress:function(e){var g,a,c,b=$("search_results");if(!$F(b).size()){alert(IMP.text.contacts_select)}else{g=$("selected_addresses");a=$A(g).size();b.childElements().each(function(d){if(d.value&&d.selected){if(!$A(g).any(function(f){return this.sameOption(e,d,f)},this)){c=e+": "+d.value;g[a++]=new Option(c,c)}}},this)}},updateMessage:function(){if(parent.opener.closed){alert(IMP.text.contacts_closed);window.close();return}if(!parent.opener.document[this.formname]){alert(IMP.text.contacts_called);window.close();return}$("selected_addresses").childElements().each(function(c){var a=c.value,d,e=null,g,b;g=a.indexOf(":");d=a.substring(0,g);a=a.substring(g+2,a.length);if(d=="to"){e=parent.opener.document[this.formname].to}else{if(!this.to_only&&d=="cc"){e=parent.opener.document[this.formname].cc}else{if(!this.to_only&&d=="bcc"){e=parent.opener.document[this.formname].bcc}}}if(!e){return}if(e.value.length){b=e.value.replace(/, +/g,",").split(",").findAll(function(f){return f});e.value=b.join(", ");if(e.value.lastIndexOf(";")!=e.value.length-1){e.value+=","}e.value+=" "+a}else{e.value=a}if(a.lastIndexOf(";")!=a.length-1){e.value+=", "}},this);window.close()},removeAddress:function(){$("selected_addresses").childElements().each(function(a){if(a.selected){a.remove()}})},onDomLoad:function(){$("contacts").observe("submit",this._passAddresses.bind(this));document.observe("change",this._changeHandler.bindAsEventListener(this));document.observe("click",this._clickHandler.bindAsEventListener(this));document.observe("dblclick",this._dblclickHandler.bindAsEventListener(this))},_changeHandler:function(a){var b=a.element().readAttribute("id");switch(b){case"search_results":$(b)[0].selected=false;break}},_clickHandler:function(a){var b=a.element().readAttribute("id");switch(b){case"btn_add_to":case"btn_add_cc":case"btn_add_bcc":this.addAddress(b.substring(8));break;case"btn_update":this.updateMessage();break;case"btn_delete":this.removeAddress();break;case"btn_cancel":window.close();break}},_dblclickHandler:function(b){var a=b.element();if(!a.match("SELECT")){a=a.up("SELECT")}switch(a.readAttribute("id")){case"search_results":this.addAddress("to");break;case"selected_addresses":this.removeAddress();break}}};document.observe("dom:loaded",ImpContacts.onDomLoad.bind(ImpContacts));
\ No newline at end of file
diff --git a/imp/js/dialog.js b/imp/js/dialog.js
deleted file mode 100644
index 5b6966489..000000000
--- a/imp/js/dialog.js
+++ /dev/null
@@ -1 +0,0 @@
-var IMPDialog={display:function(a){if(Object.isString(a)){a=decodeURIComponent(a).evalJSON(true)}if(a.dialog_load){new Ajax.Request(a.dialog_load,{onComplete:this._onComplete.bind(this)})}else{this._display(a)}},_onComplete:function(a){this._display(a.responseJSON.response)},_display:function(a){this.action=a.action;this.params=a.params;this.uri=a.uri;var b=new Element("FORM",{action:"#",id:"RB_confirm"}).insert(new Element("P").insert(a.text));if(a.form){b.insert(a.form)}else{b.insert(new Element("INPUT",{name:"dialog_input",type:"text",size:15}))}if(a.ok_text){b.insert(new Element("INPUT",{type:"button",className:"button",value:a.ok_text}).observe("click",this._onClick.bind(this)))}b.insert(new Element("INPUT",{type:"button",className:"button",value:a.cancel_text}).observe("click",this._close.bind(this))).observe("keydown",function(c){if((c.keyCode||c.charCode)==Event.KEY_RETURN){c.stop();this._onClick(c)}}.bind(this));RedBox.overlay=true;RedBox.onDisplay=Form.focusFirstElement.curry(b);RedBox.showHtml(b)},_close:function(){var a=RedBox.getWindowContents();[a,a.descendants()].flatten().compact().invoke("stopObserving");RedBox.close()},_onClick:function(a){var b=$H((!this.params||Object.isArray(this.params))?{}:this.params);b.update(a.findElement("form").serialize(true));new Ajax.Request(this.uri,{parameters:b,onSuccess:this._onSuccess.bind(this),onFailure:this._onFailure.bind(this)})},_onSuccess:function(r){r=r.responseJSON;if(r.response.success){this._close();if(this.action){if(Object.isFunction(this.action)){this.action()}else{eval(this.action)()}}else{location.reload()}}else{if(r.response.error){alert(r.response.error)}}},_onFailure:function(a){}};
\ No newline at end of file
diff --git a/imp/js/dragdrop.js b/imp/js/dragdrop.js
deleted file mode 100644
index 4ee259785..000000000
--- a/imp/js/dragdrop.js
+++ /dev/null
@@ -1 +0,0 @@
-var DragDrop={Drags:{drags:$H(),register:function(a){if(!this.div){this.div=new Element("DIV",{className:a.options.classname}).hide();$(document.body).insert(this.div);document.observe("mousedown",this._mouseHandler.bindAsEventListener(this))}this.drags.set(a.element.identify(),a);a.element.addClassName("DragElt")},unregister:function(a){if(this.drag==a.element){this.drag.deactivate()}this.drags.unset(a.element.identify());a.element.removeClassName("DragElt")},get_drag:function(a){return this.drags.get(Object.isElement(a)?$(a).identify():a)},activate:function(a){if(this.drag){this.deactivate()}this.drag=a;this.mousemoveE=a._mouseMove.bindAsEventListener(a);this.mouseupE=a._mouseUp.bindAsEventListener(a);document.observe("mousemove",this.mousemoveE);document.observe("mouseup",this.mouseupE)},deactivate:function(){if(this.drag){this.drag=DragDrop.Drops.drop=null;document.stopObserving("mousemove",this.mousemoveE);document.stopObserving("mouseup",this.mouseupE)}},_mouseHandler:function(b){var a=b.element();if(this.drags.size()){if(!a.hasClassName("DragElt")){a=a.up(".DragElt")}if(a){this.get_drag(a).mouseDown(b)}}}},Drops:{drops:$H(),init:false,register:function(a){if(!this.init){document.observe("mouseover",this._mouseHandler.bindAsEventListener(this,"over"));document.observe("mouseout",this._mouseHandler.bindAsEventListener(this,"out"));this.init=true}this.drops.set(a.element.identify(),a);a.element.addClassName("DropElt")},unregister:function(a){if(this.drop==a.element){this.drop=null}this.drops.unset(a.element.identify());a.element.addClassName("DropElt")},get_drop:function(a){return this.drops.get(Object.isElement(a)?$(a).identify():a)},_mouseHandler:function(c,b){var a=c.element();if(this.drops.size()){if(!a.hasClassName("DropElt")){a=a.up(".DropElt")}if(a){switch(b){case"over":this.get_drop(a).mouseOver(c);break;case"out":this.get_drop(a).mouseOut(c);break}}}}},validDrop:function(a){var b=DragDrop.Drops.drop;return(b&&a&&a!=b.element&&(!b.options.accept.size()||b.options.accept.include(a.tagName)))}},Drag=Class.create({initialize:function(a){this.element=$(a);this.options=Object.extend({caption:"",classname:"drag",constraint:null,ghosting:false,scroll:null,snap:null,threshold:0,onDrag:null,onEnd:null,onStart:null},arguments[1]||{});if(this.options.scroll){this.options.scroll=$(this.options.scroll)}DragDrop.Drags.register(this);if(Prototype.Browser.IE){this.element.observe("selectstart",Event.stop)}else{if(Prototype.Browser.Gecko){this.element.setStyle({MozUserSelect:"none"})}}},destroy:function(){DragDrop.Drags.unregister(this)},mouseDown:function(a){$(document.body).setStyle({cursor:"default"});DragDrop.Drags.activate(this);this.move=0;this.wasDragged=false;this.lastcaption=null;if(Object.isFunction(this.options.onStart)){this.options.onStart(this,a)}if(!Prototype.Browser.IE&&!Prototype.Browser.Gecko){a.stop()}},_mouseMove:function(f){var b,c,a,d;if(++this.move<=this.options.threshold){return}this.lastCoord=d=[f.pointerX(),f.pointerY()];if(this.options.ghosting){if(!this.ghost){b=this.element.offsetLeft;c=this.element.offsetTop;this.ghost=$(this.element.cloneNode(true)).writeAttribute("id",null).setOpacity(0.7).clonePosition(this.element,{setLeft:false,setTop:false}).setStyle({left:b+"px",position:"absolute",top:c+"px",zIndex:parseInt(this.element.getStyle("zIndex"))+1});this.element.insert({before:this.ghost});a=this.ghost.viewportOffset();this.ghostOffset=[a[0]-b,a[1]-c]}d[0]-=this.ghostOffset[0];d[1]-=this.ghostOffset[1];switch(this.options.constraint){case"horizontal":d[1]=this.ghost.offsetTop;break;case"vertical":d[0]=this.ghost.offsetLeft;break}if(this.options.snap){d=this.options.snap(d[0],d[1],this.element)}if(this.options.offset){d[0]+=this.options.offset.x;d[1]+=this.options.offset.y}this._setContents(this.ghost,d[0],d[1])}this._onMoveDrag(d,f);if(Object.isFunction(this.options.onDrag)){this.options.onDrag(this,f)}this.wasDragged=true;if(this.options.scroll){this._onMoveScroll()}},_mouseUp:function(a){var b=DragDrop.Drops.drop;this._stopScrolling();if(this.ghost){this.ghost.remove();this.ghost=null}DragDrop.Drags.div.hide();if(DragDrop.validDrop(this.element)&&Object.isFunction(b.options.onDrop)){b.options.onDrop(b.element,this.element,a)}DragDrop.Drags.deactivate();if(Object.isFunction(this.options.onEnd)){this.options.onEnd(this,a)}},_onMoveDrag:function(k,g){var i,j,f,c,h=DragDrop.Drops.drop,a=DragDrop.Drags.div,b=true;if(h&&DragDrop.validDrop(this.element)){c=h.options.caption;if(c){j=Object.isFunction(c)?c(h.element,this.element,g):c;if(j&&h.options.hoverclass){f=h.options.hoverclass}}else{b=false}}if(b){if(!j){i=this.options.caption;j=Object.isFunction(i)?i(this.element):i}if(j!=this.lastcaption){this.lastcaption=j;a.update(j).writeAttribute({className:f||this.options.classname});if(j.empty()){a.hide()}}}if(!this.lastcaption.empty()){this._setContents(a,k[0]+15,k[1]+(this.ghost?(this.ghost.getHeight()+5):5))}},_onMoveScroll:function(){this._stopScrolling();var e,d,b,a=this.options.scroll,c=a.getDimensions();if(a.scrollHeight==c.height){return}e=document.viewport.getScrollOffsets();d=a.viewportOffset(),b=[0,0];d[0]+=a.scrollLeft+e.left;d[2]=d[0]+c.width;if(this.lastCoord[0]>d[2]||this.lastCoord[0]d[3]){b[1]=this.lastCoord[1]-d[3]}if(b[0]||b[1]){this.lastScrolled=new Date();this.scrollInterval=setInterval(this._scroll.bind(this,b[0]*15,b[1]*15),10)}},_stopScrolling:function(){if(this.scrollInterval){clearInterval(this.scrollInterval);this.scrollInterval=null}},_scroll:function(a,e){var c=new Date(),d=c-this.lastScrolled,b=this.options.scroll;this.lastScrolled=c;b.scrollTop+=e*d/1000},_setContents:function(c,a,e){var d=document.viewport.getDimensions(),b=c.getDimensions();if((a+b.width>d.width)||(e+b.height>d.height)){c.hide()}else{c.setStyle({left:a+"px",top:e+"px"}).show()}}}),Drop=Class.create({initialize:function(a){this.element=$(a);this.options=Object.extend({accept:[],caption:"",hoverclass:"",onDrop:null,onOut:null,onOver:null},arguments[1]||{});DragDrop.Drops.register(this)},destroy:function(){DragDrop.Drops.unregister(this)},mouseOver:function(a){if(DragDrop.Drags.drag){DragDrop.Drops.drop=this;if(Object.isFunction(this.options.onOver)){this.options.onOver(this.element,DragDrop.Drags.drag)}}},mouseOut:function(a){if(DragDrop.Drags.drag){if(Object.isFunction(this.options.onOut)){this.options.onOut(this.element,DragDrop.Drags.drag)}DragDrop.Drops.drop=null}}});
\ No newline at end of file
diff --git a/imp/js/fetchmailprefs.js b/imp/js/fetchmailprefs.js
deleted file mode 100644
index c8cc4b38c..000000000
--- a/imp/js/fetchmailprefs.js
+++ /dev/null
@@ -1 +0,0 @@
-var ImpFetchmailprefs={fmprefs_loading:false,_accountSubmit:function(a){if(!this.fmprefs_loading&&((a!=null)||!$F("account").empty())){this.fmprefs_loading=true;$("fm_switch").submit()}},_driverSubmit:function(){if(!this.fmprefs_loading&&$F("fm_driver")){this.fmprefs_loading=true;$("fm_driver_form").submit()}},onDomLoad:function(){document.observe("change",this._changeHandler.bindAsEventListener(this));document.observe("click",this._clickHandler.bindAsEventListener(this))},_changeHandler:function(a){switch(a.element().readAttribute("id")){case"account":this._accountSubmit();break;case"fm_driver":this._driverSubmit();break}},_clickHandler:function(a){switch(a.element().readAttribute("id")){case"btn_delete":$("actionID").setValue("fetchmail_prefs_delete");break;case"btn_create":$("actionID").setValue("fetchmail_create");this._accountSubmit(true);break;case"btn_return":document.location.href=this.prefsurl;break;case"btn_save":$("actionID").setValue("fetchmail_prefs_save");break;case"btn_select":document.location.href=this.fetchurl;break}}};document.observe("dom:loaded",ImpFetchmailprefs.onDomLoad.bind(ImpFetchmailprefs));
\ No newline at end of file
diff --git a/imp/js/folders.js b/imp/js/folders.js
deleted file mode 100644
index 5ae32fc33..000000000
--- a/imp/js/folders.js
+++ /dev/null
@@ -1 +0,0 @@
-var ImpFolders={getChecked:function(){return this.getFolders().findAll(function(a){return a.checked})},getFolders:function(){return $("fmanager").getInputs(null,"folder_list[]")},selectedFoldersDisplay:function(){var a=0,b="";this.getFolders().each(function(c){if(c.checked){b+=this.displayNames[a]+"\n"}++a});return b.strip()},chooseAction:function(d){var f=(d.element().readAttribute("id")=="action_choose0")?0:1,b=$("action_choose"+f),c=$F(b);b.selectedIndex=0;switch(c){case"create_folder":this.createMailbox();break;case"rebuild_tree":this.submitAction(c);break;default:if(!this.getChecked().size()){if(c!=""){alert(IMP.text.folders_select)}break}switch(c){case"rename_folder":this.renameMailbox();break;case"subscribe_folder":case"unsubscribe_folder":case"poll_folder":case"expunge_folder":case"nopoll_folder":case"mark_folder_seen":case"mark_folder_unseen":case"delete_folder_confirm":case"folders_empty_mailbox_confirm":case"mbox_size":this.submitAction(c);break;case"download_folder":case"download_folder_zip":this.downloadMailbox(c);break;case"import_mbox":if(this.getChecked().length>1){alert(IMP.text.folders_oneselect)}else{this.submitAction(c)}break}break}},submitAction:function(b){$("actionID").setValue(b);$("fmanager").submit()},createMailbox:function(){var a=this.getChecked().size(),b;if(a>1){window.alert(IMP.text.folders_oneselect);return}b=(a==1)?window.prompt(IMP.text.folders_subfolder1+" "+this.selectedFoldersDisplay()+".\n"+IMP.text.folders_subfolder2+"\n",""):window.prompt(IMP.text.folders_toplevel,"");if(b){$("new_mailbox").setValue(b);this.submitAction("create_folder")}},downloadMailbox:function(a){if(window.confirm(IMP.text.folders_download1+"\n"+this.selectedFoldersDisplay()+"\n"+IMP.text.folders_download2)){this.submitAction(a)}},renameMailbox:function(){var b="",c="",a=0;this.getFolders().each(function(e){if(e.checked){if(IMP.conf.fixed_folders.indexOf(this.displayNames[a])!=-1){window.alert(IMP.text.folders_no_rename+" "+this.displayNames[a])}else{var d=window.prompt(IMP.text.folders_rename1+" "+this.displayNames[a]+"\n"+IMP.text.folders_rename2,this.displayNames[a]);if(d){b+=d+"\n";c+=e.value+"\n"}}}++a});if(b){$("new_names").setValue(b.strip());$("old_names").setValue(c.strip());this.submitAction("rename_folder")}},toggleSelection:function(){var c=this.getChecked().size(),a=this.getFolders(),b=(c!=a.size());a.each(function(d){d.checked=b})},changeHandler:function(a){switch(a.element().readAttribute("id")){case"action_choose0":case"action_choose1":this.chooseAction(a);break}},clickHandler:function(a){switch(a.element().readAttribute("id")){case"btn_import":this.submitAction("import_mbox");break;case"btn_return":document.location.href=this.folders_url;break;case"checkAll0":case"checkAll1":this.toggleSelection();break}}};document.observe("change",ImpFolders.changeHandler.bind(ImpFolders));document.observe("click",ImpFolders.clickHandler.bind(ImpFolders));
\ No newline at end of file
diff --git a/imp/js/fullmessage-dimp.js b/imp/js/fullmessage-dimp.js
deleted file mode 100644
index c10e6d98d..000000000
--- a/imp/js/fullmessage-dimp.js
+++ /dev/null
@@ -1 +0,0 @@
-var DimpFullmessage={quickreply:function(b){var c,a={};a[$F("folder")]=[$F("index")];$("msgData").hide();$("qreply").show();switch(b){case"reply":case"reply_all":case"reply_list":c="GetReplyData";break;case"forward_all":case"forward_body":case"forward_attachments":c="GetForwardData";break}DimpCore.doAction(c,{imp_compose:$F("composeCache"),type:b},a,this.msgTextCallback.bind(this))},msgTextCallback:function(b){if(!b.response){return}var d=b.response,a=((d.format=="html")&&!DimpCompose.editor_on),e=(d.identity===null)?$F("identity"):d.identity,c=DimpCompose.get_identity(e,a);$("identity","last_identity").invoke("setValue",e);DimpCompose.fillForm((c.id[2])?("\n"+c.sig+d.body):(d.body+"\n"+c.sig),d.header);if(d.fwd_list&&d.fwd_list.length){d.fwd_list.each(function(f){DimpCompose.addAttach(f.number,f.name,f.type,f.size)})}if(a){DimpCompose.toggleHtmlEditor(true)}if(d.imp_compose){$("composeCache").setValue(d.imp_compose)}},_clickHandler:function(b){if(b.isRightClick()){return}var a=orig=b.element(),c;while(Object.isElement(a)){c=a.readAttribute("id");switch(c){case"windowclose":window.close();b.stop();return;case"forward_link":case"reply_link":this.quickreply(c=="reply_link"?"reply":DIMP.conf.forward_default);b.stop();return;case"button_deleted":case"button_ham":case"button_spam":DIMP.baseWindow.DimpBase.flag(c.substring(7),DIMP.conf.msg_index,DIMP.conf.msg_folder);window.close();b.stop();return;case"ctx_replypopdown_reply":case"ctx_replypopdown_reply_all":case"ctx_replypopdown_reply_list":this.quickreply(c.substring(17));break;case"ctx_fwdpopdown_forward_all":case"ctx_fwdpopdown_forward_body":case"ctx_fwdpopdown_forward_attachments":this.quickreply(c.substring(15));break;case"qreply":if(orig.match("DIV.headercloseimg IMG")){DimpCompose.confirmCancel()}break}a=a.up()}},addPopdown:function(b,a){var c=$(b);c.insert({after:$($("popdown_img").cloneNode(false)).writeAttribute("id",b+"_img").show()});DimpCore.DMenu.addElement(b+"_img","ctx_"+a,{offset:c.up(),left:true})}};document.observe("dom:loaded",function(){var a=DimpFullmessage;window.focus();a.addPopdown("reply_link","replypopdown");a.addPopdown("forward_link","fwdpopdown");["from","to","cc","bcc","replyTo"].each(function(b){if(a[b]){var c=$("msgHeader"+b.charAt(0).toUpperCase()+b.substring(1)).down("TD",1);c.replace(DimpCore.buildAddressLinks(a[b],c.cloneNode(false)))}});document.observe("click",a._clickHandler.bindAsEventListener(a))});
\ No newline at end of file
diff --git a/imp/js/imp.js b/imp/js/imp.js
deleted file mode 100644
index 5ca3bdf19..000000000
--- a/imp/js/imp.js
+++ /dev/null
@@ -1 +0,0 @@
-var IMP=window.IMP||{};IMP.menuFolderSubmit=function(a){var b=$("menuform");if((!this.menufolder_load||a)&&$F(b.down('SELECT[name="mailbox"]'))){this.menufolder_load=true;b.submit()}};IMP.popup=function(d,e,a,c){var f,g,h=$H(),b=new Date().getTime();a=Math.min(screen.height-75,a||500);e=Math.min(screen.width-75,e||600);f=d.indexOf("?");if(f!=-1){h=$H(d.toQueryParams());d=d.substring(0,f)}if(c){$H(c.toQueryParams()).each(function(i){h.set(i.key,unescape(i.value))})}h.set("uniq",b);g=window.open(d+"?"+h.toQueryString(),b,"toolbar=no,location=no,status=yes,scrollbars=yes,resizable=yes,width="+e+",height="+a+",left=0,top=0");if(!g){alert(IMP.text.popup_block)}else{if(Object.isUndefined(g.name)){g.name=b}if(Object.isUndefined(g.opener)){g.opener=self}g.focus()}};IMP.unblockImages=function(c,b){var a;if(!c){return true}$(c).select("[blocked]").each(function(d){var e=decodeURIComponent(d.readAttribute("blocked"));if(d.hasAttribute("src")){d.writeAttribute("src",e)}else{if(d.hasAttribute("background")){d.writeAttribute("background",e)}else{if(d.style.backgroundImage){d.setStyle({backgroundImage:"url("+e+")"})}}}});b=$(b);if(b){a=b.up();b.remove();if(!a.childElements().size()){a=a.up("TABLE.mimeStatusMessage");if(a){a.remove()}}}return false};document.observe("dom:loaded",function(){var a=$("menuform");if(a){a.observe("change",IMP.menuFolderSubmit.bind(IMP));$("openfoldericon").down().observe("click",IMP.menuFolderSubmit.bind(IMP,true))}});
\ No newline at end of file
diff --git a/imp/js/login.js b/imp/js/login.js
deleted file mode 100644
index 2661839a8..000000000
--- a/imp/js/login.js
+++ /dev/null
@@ -1 +0,0 @@
-var ImpLogin={_reload:function(){window.top.document.location=this.autologin_url+$F("server_key")},submit:function(){if(this.show_list&&$F("server_key").startsWith("_")){return}if(!$F("imapuser")){alert(IMP.text.login_username);$("imapuser").focus()}else{if(!$F("pass")){alert(IMP.text.login_password);$("pass").focus()}else{$("loginButton").disable();if(this.ie_clientcaps){try{$("ie_version").setValue(objCCaps.getComponentVersion("{89820200-ECBD-11CF-8B85-00AA005B4383}","componentid"))}catch(A){}}$("imp_login").submit()}}},_selectLang:function(){if(!$F("imapuser")&&!$F("pass")){var A={new_lang:$F("new_lang")};if(this.lang_url){A.url=this.lang_url}self.location="login.php?"+Object.toQueryString(A)}},_removeHash:function(A){return(Object.isString(A)&&A.startsWith("#"))?A.substring(1):A},onDomLoad:function(){if(this.imp_auth){if(parent.frames.horde_main){if(this.nomenu){parent.location=self.location}else{document.imp_login.target="_parent"}}}document.observe("change",this._changeHandler.bindAsEventListener(this));document.observe("click",this._clickHandler.bindAsEventListener(this));if(location.hash){$("anchor_string").setValue(this._removeHash(location.hash))}if(!$F("imapuser")){$("imapuser").focus()}else{$("pass").focus()}if(this.reloadmenu&&window.parent.frames.horde_menu){window.parent.frames.horde_menu.location.reload()}},_changeHandler:function(A){switch(A.element().readAttribute("id")){case"new_lang":this._selectLang();break;case"server_key":this._reload();break}},_clickHandler:function(A){switch(A.element().readAttribute("id")){case"btn_login":this._reload();break;case"loginButton":this.submit();break}}};document.observe("dom:loaded",ImpLogin.onDomLoad.bind(ImpLogin));
\ No newline at end of file
diff --git a/imp/js/mailbox.js b/imp/js/mailbox.js
deleted file mode 100644
index 6489f502c..000000000
--- a/imp/js/mailbox.js
+++ /dev/null
@@ -1 +0,0 @@
-var ImpMessage={keyId:null,startrange:null,anySelected:function(){return $H(this.messagelist).keys().detect(function(a){return $("check"+a).checked})},selectRow:function(c,a){var b=$(c.replace(/check/,"row"));if(a){b.addClassName("selectedRow")}else{b.removeClassName("selectedRow").removeClassName("selectedRow-over")}$(c).checked=a},confirmDialog:function(a,b){RedBox.overlay=true;RedBox.showHtml('')},submit:function(a){if(!this.anySelected()){alert(IMP.text.mailbox_submit);return}switch(a){case"delete_messages":if(IMP.conf.pop3&&!confirm(IMP.text.mailbox_delete)){return}break;case"spam_report":if(!confirm(IMP.text.spam_report)){return}break;case"nostpam_report":if(!confirm(IMP.text.notspam_report)){return}break}$("actionID").setValue(a);$("messages").submit()},makeSelection:function(b){var a="";switch(parseInt(b)){case-1:if($("checkAll").checked){a="!"}a+=IMP.conf.IMP_ALL;break;case 1:a=$F("filter1");break;default:a=$F("filter2")}if(a.empty()){return}else{if(a.startsWith("!")){this.selectFlagged(parseInt(a.substring(1)),false)}else{if(a.startsWith("+")){this.selectFlagged(a.substring(0,1),null)}else{this.selectFlagged(parseInt(a),true)}}}switch(parseInt(b)){case 1:$("select1").reset();break;default:$("select2").reset()}},selectRange:function(f){var g=f.element().readAttribute("id"),c=$(g),b=0,a,d;if(!c){return}a=c.checked;if(this.startrange!==null&&f.shiftKey){d=[$(this.startrange).readAttribute("id"),c.readAttribute("id")];$H(this.messagelist).keys().detect(function(e){e="check"+e;if(d.indexOf(e)!=-1){++b}if(b){this.selectRow(e,a);if(b==2){return true}}},this)}else{this.selectRow(g,a)}this.startrange=g},updateFolders:function(c){var b=$("targetMailbox1"),a=$("targetMailbox2");if(a){if((c==1&&$F(b)!="")||(c==2&&$F(a)!="")){b.selectedIndex=a.selectedIndex=(c==1)?b.selectedIndex:a.selectedIndex}}},_transfer:function(c){var b,a;if(this.anySelected()){a=$("targetMbox");a.setValue($F("targetMailbox1"));if($F(a)=="*new*"){b=prompt(IMP.text.newfolder,"");if(b!=null&&b!=""){$("newMbox").setValue(1);a.setValue(b);this.submit(c)}}else{if($F(a)==""){alert(IMP.text.target_mbox)}else{this.submit(c)}}}else{alert(IMP.text.mailbox_selectone)}},selectFlagged:function(a,b){$H(this.messagelist).keys().each(function(f){var c,d=$("check"+f);if(a=="+"){c=!d.checked}else{if(a&this.messagelist[f]){c=b}else{c=!b}}this.selectRow(d.id,c)},this)},flagMessages:function(b){var a=$("flag1"),c=$("flag2");if((b==1&&$F(a)!="")||(b==2&&$F(c)!="")){if(this.anySelected()){document.messages.flag.value=(b==1)?$F(a):$F(c);this.submit("flag_messages")}else{if(b==1){a.selectedIndex=0}else{c.selectedIndex=0}alert(IMP.text.mailbox_selectone)}}},getMessage:function(e,d){if(!d){return e}var a=$H(this.messagelist).keys(),c=a.indexOf(e),b=c+d;if(c!=-1){if(b>=0&&b0)?$H(this.messagelist).keys().first():$H(this.messagelist).keys().last();if(Event.KEY_UP||Event.KEY_DOWN){g=$("subject"+this.keyId)}}}}else{if(j==32&&b.id.indexOf("subject")==0&&b.tagName=="A"){this.startrange="check"+this.keyId;this.selectRow(this.startrange,!$(this.startrange).checked)}else{if(!i.shiftKey){if(j==Event.KEY_LEFT&&$("prev")){h=$("prev").href}else{if(j==Event.KEY_RIGHT&&$("next")){h=$("next").href}}if(h){document.location.href=h}return}else{return}}}if(g){g.focus();k=$("row"+this.keyId);if(i.altKey){a=g.id.replace(/subject/,"check");this.selectRow(a,!$(a).checked)}else{if(c!=g.id&&k.className.indexOf("-over")==-1){k.className+="-over"}}if(c){k=$("row"+c);if(c!=g.id){k.className=k.className.replace(/-over/,"")}}}i.stop()},submitHandler:function(a){if(a.element().readAttribute("id").startsWith("select")){a.stop()}}};document.observe("change",ImpMessage.changeHandler.bindAsEventListener(ImpMessage));document.observe("click",ImpMessage.clickHandler.bindAsEventListener(ImpMessage));document.observe("keydown",ImpMessage.keyDownHandler.bindAsEventListener(ImpMessage));document.observe("submit",ImpMessage.submitHandler.bindAsEventListener(ImpMessage));Event.observe(window,"load",function(){if(window.fluid){try{window.fluid.setDockBadge(ImpMessage.unread)}catch(a){}}});
\ No newline at end of file
diff --git a/imp/js/message.js b/imp/js/message.js
deleted file mode 100644
index b2546129f..000000000
--- a/imp/js/message.js
+++ /dev/null
@@ -1 +0,0 @@
-var ImpMessage={_arrowHandler:function(a){if(a.altKey||a.shiftKey||a.ctrlKey){return}switch(a.keyCode||a.charCode){case Event.KEY_LEFT:if($("prev")){document.location.href=$("prev").href}break;case Event.KEY_RIGHT:if($("next")){document.location.href=$("next").href}break}},submit:function(a){switch(a){case"spam_report":if(!window.confirm(IMP.text.spam_report)){return}break;case"notspam_report":if(!window.confirm(IMP.text.notspam_report)){return}break}$("actionID").setValue(a);$("messages").submit()},flagMessage:function(b){var a=$("flag1"),c=$("flag2");if((b==1&&$F(a))||(b==2&&$F(c))){$("flag").setValue((b==1)?$F(a):$F(c));this.submit("flag_message")}},_transfer:function(c){var b,a=$("targetMbox");a.setValue($F("target1"));if($F(a)=="*new*"){b=window.prompt(IMP.text.newfolder,"");if(b!=null&&b!=""){$("newMbox").setValue(1);a.setValue(b);this.submit(c)}}else{if(!$F(a)){window.alert(IMP.text.target_mbox)}else{this.submit(c)}}},updateFolders:function(a){var b=(a==1)?2:1;$("target"+b).selectedIndex=$("target"+a).selectedIndex},_messageActionsHover:function(){var a=new Element("IFRAME",{scrolling:"no",frameborder:0}).setStyle({position:"absolute"}).hide();a.writeAttribute("src","javascript:false;");$$("UL.msgactions LI").each(function(b){var c,e=b.down("UL"),d;if(!e){return}c=a.cloneNode(false);b.insert(c);c.clonePosition(e);d=b.getStyle("zIndex");if(d==""){b.setStyle({zIndex:2});c.setStyle({zIndex:1})}else{c.setStyle({zIndex:parseInt(d)-1})}b.observe("mouseout",function(){this.removeClassName("hover");b.down("iframe").hide()});b.observe("mouseover",function(){this.addClassName("hover");b.down("iframe").show()})})},onDomLoad:function(){if(!this.printmode){document.observe("keydown",this._arrowHandler.bindAsEventListener(this));document.observe("change",this._changeHandler.bindAsEventListener(this));document.observe("click",this._clickHandler.bindAsEventListener(this));if(Prototype.Browser.IE){this._messageActionsHover()}}},onLoad:function(){if(this.printmode){Event.observe(window,"afterprint",function(){window.close()});try{window.print()}catch(a){}}},_changeHandler:function(a){var b=a.element().readAttribute("id");if(b.startsWith("flag")){this.flagMessage(b.substring(4))}else{if(b.startsWith("target")){this.updateFolders(b.substring(6))}}},_clickHandler:function(b){var a=b.element();if(a.match(".msgactions A.widget")){if(a.hasClassName("moveAction")){this._transfer("move_message")}else{if(a.hasClassName("copyAction")){this._transfer("copy_message")}}}}};document.observe("dom:loaded",ImpMessage.onDomLoad.bind(ImpMessage));Event.observe(window,"load",ImpMessage.onLoad.bind(ImpMessage));
\ No newline at end of file
diff --git a/imp/js/search.js b/imp/js/search.js
deleted file mode 100644
index a33e8b578..000000000
--- a/imp/js/search.js
+++ /dev/null
@@ -1 +0,0 @@
-var ImpSearch={_toggleAll:function(a){$("search").getInputs(null,"search_folders[]").each(function(b){b.checked=a})},_dateCheck:function(b){var a=$("search_"+b+"_month"),c=$("search_"+b+"_day"),e=$("search_"+b+"_year");if(a.selectedIndex==0){a.selectedIndex=this.search_date.m}if(c.selectedIndex==0){c.selectedIndex=this.search_date.d}if(e.value==""){e.value=this.search_date.y}},_formCheck:function(){if(this.not_search&&(!$("preselected_folders")||!$F("preselected_folders"))){if(!Form.getInputs("search",null,"search_folders[]").detect(function(a){return a.checked})){alert(IMP.text.search_select);return}}$("actionID").setValue("do_search")},_reset:function(){$("actionID").setValue("reset_search");$("search").submit()},_saveCache:function(){$("edit_query").setValue($F("save_cache"));$("search").submit()},_deleteField:function(a){$("delete_field_id").setValue(a);$("actionID").setValue("delete_field");$("search").submit()},_showSubscribed:function(a){$("show_subscribed_only").setValue(a);$("search").submit()},changeHandler:function(a){var b=a.element().readAttribute("id");switch(b){case"save_cache":this._saveCache();break;default:if(b.startsWith("field_")){$("search").submit()}else{if(b.startsWith("search_date_")){this._dateCheck("on")}}break}},clickHandler:function(b){var a=b.element();if(a.hasClassName("searchSubmit")){this._formCheck()}else{if(a.hasClassName("searchReset")){this._reset()}else{if(a.hasClassName("searchDelete")){this._deleteField(a.readAttribute("fid"))}else{switch(a.readAttribute("id")){case"link_sel_all":this._toggleAll(true);break;case"link_sel_none":this._toggleAll(false);break;case"link_sub":this._showSubscribed(this.inverse_sub);break;case"search_match_and":case"search_match_or":if($("field_1")){$("search").submit()}break}}}}}};document.observe("change",ImpSearch.changeHandler.bind(ImpSearch));document.observe("click",ImpSearch.clickHandler.bind(ImpSearch));
\ No newline at end of file
diff --git a/kronolith/js/ar-SY.js b/kronolith/js/ar-SY.js
deleted file mode 100644
index 50594d76b..000000000
--- a/kronolith/js/ar-SY.js
+++ /dev/null
@@ -1 +0,0 @@
-Date.CultureInfo={name:"ar-SY",englishName:"Arabic (Syria)",nativeName:"Ø§ÙØ¹Ø±Ø¨ÙØ© (Ø³ÙØ±Ùا)",dayNames:["Ø§ÙØ§ØØ¯","Ø§ÙØ§Ø«ÙÙÙ","Ø§ÙØ«Ùاثاء","Ø§ÙØ§Ø±Ø¨Ø¹Ø§Ø¡","Ø§ÙØ®Ù
ÙØ³","Ø§ÙØ¬Ù
عة","Ø§ÙØ³Ø¨Øª"],abbreviatedDayNames:["Ø§ÙØ§ØØ¯","Ø§ÙØ§Ø«ÙÙÙ","Ø§ÙØ«Ùاثاء","Ø§ÙØ§Ø±Ø¨Ø¹Ø§Ø¡","Ø§ÙØ®Ù
ÙØ³","Ø§ÙØ¬Ù
عة","Ø§ÙØ³Ø¨Øª"],shortestDayNames:["Ø£","ا","Ø«","Ø£","Ø®","ج","س"],firstLetterDayNames:["Ø£","ا","Ø«","Ø£","Ø®","ج","س"],monthNames:["ÙØ§ÙÙÙÂ Ø§ÙØ«Ø§ÙÙ","شباط","آذار","ÙÙØ³Ø§Ù","Ø£ÙØ§Ø±","ØØ²ÙراÙ","تÙ
ÙØ²","آب","Ø£ÙÙÙÙ","تشرÙÙÂ Ø§ÙØ£ÙÙ","تشرÙÙÂ Ø§ÙØ«Ø§ÙÙ","ÙØ§ÙÙÙÂ Ø§ÙØ£ÙÙ"],abbreviatedMonthNames:["ÙØ§ÙÙÙÂ Ø§ÙØ«Ø§ÙÙ","شباط","آذار","ÙÙØ³Ø§Ù","Ø£ÙØ§Ø±","ØØ²ÙراÙ","تÙ
ÙØ²","آب","Ø£ÙÙÙÙ","تشرÙÙÂ Ø§ÙØ£ÙÙ","تشرÙÙÂ Ø§ÙØ«Ø§ÙÙ","ÙØ§ÙÙÙÂ Ø§ÙØ£ÙÙ"],amDesignator:"ص",pmDesignator:"Ù
",firstDayOfWeek:6,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dd MMMM, yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dd MMMM, yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^ÙØ§ÙÙÙÂ Ø§ÙØ«Ø§ÙÙ/i,feb:/^شباط/i,mar:/^آذار/i,apr:/^ÙÙØ³Ø§Ù/i,may:/^Ø£ÙØ§Ø±/i,jun:/^ØØ²ÙراÙ/i,jul:/^تÙ
ÙØ²/i,aug:/^آب/i,sep:/^Ø£ÙÙÙÙ/i,oct:/^تشرÙÙÂ Ø§ÙØ£ÙÙ/i,nov:/^تشرÙÙÂ Ø§ÙØ«Ø§ÙÙ/i,dec:/^ÙØ§ÙÙÙÂ Ø§ÙØ£ÙÙ/i,sun:/^Ø§ÙØ§ØØ¯/i,mon:/^ا(1)?/i,tue:/^Ø§ÙØ«Ùاثاء/i,wed:/^Ø§ÙØ§Ø±Ø¨Ø¹Ø§Ø¡/i,thu:/^Ø§ÙØ®Ù
ÙØ³/i,fri:/^Ø§ÙØ¬Ù
عة/i,sat:/^Ø§ÙØ³Ø¨Øª/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|aft(er)?|from|hence)/i,subtract:/^(\-|bef(ore)?|ago)/i,yesterday:/^yes(terday)?/i,today:/^t(od(ay)?)?/i,tomorrow:/^tom(orrow)?/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^mn|min(ute)?s?/i,hour:/^h(our)?s?/i,week:/^w(eek)?s?/i,month:/^m(onth)?s?/i,day:/^d(ay)?s?/i,year:/^y(ear)?s?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt|utc)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a(?!u|p)|p)/i},timezones:[{name:"UTC",offset:"-000"},{name:"GMT",offset:"-000"},{name:"EST",offset:"-0500"},{name:"EDT",offset:"-0400"},{name:"CST",offset:"-0600"},{name:"CDT",offset:"-0500"},{name:"MST",offset:"-0700"},{name:"MDT",offset:"-0600"},{name:"PST",offset:"-0800"},{name:"PDT",offset:"-0700"}]};
\ No newline at end of file
diff --git a/kronolith/js/bg-BG.js b/kronolith/js/bg-BG.js
deleted file mode 100644
index 1b602e603..000000000
--- a/kronolith/js/bg-BG.js
+++ /dev/null
@@ -1 +0,0 @@
-Date.CultureInfo={name:"bg-BG",englishName:"Bulgarian (Bulgaria)",nativeName:"бÑлгаÑÑки (ÐÑлгаÑиÑ)",dayNames:["неделÑ","понеделник","вÑоÑник","ÑÑÑда","ÑеÑвÑÑÑÑк","пеÑÑк","ÑÑбоÑа"],abbreviatedDayNames:["Ðд","Ðн","ÐÑ","СÑ","ЧÑ","ÐÑ","Сб"],shortestDayNames:["не","по","вÑ","ÑÑ","Ñе","пе","ÑÑ"],firstLetterDayNames:["н","п","в","Ñ","Ñ","п","Ñ"],monthNames:["ЯнÑаÑи","ФевÑÑаÑи","ÐаÑÑ","ÐпÑил","Ðай","Юни","Юли","ÐвгÑÑÑ","СепÑемвÑи","ÐкÑомвÑи","ÐоемвÑи","ÐекемвÑи"],abbreviatedMonthNames:["ЯнÑаÑи","ФевÑÑаÑи","ÐаÑÑ","ÐпÑил","Ðай","Юни","Юли","ÐвгÑÑÑ","СепÑемвÑи","ÐкÑомвÑи","ÐоемвÑи","ÐекемвÑи"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.M.yyyy 'г.'",longDate:"dd MMMM yyyy 'г.'",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dd MMMM yyyy 'г.' HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy 'г.'"},regexPatterns:{jan:/^ÑнÑаÑи/i,feb:/^ÑевÑÑаÑи/i,mar:/^маÑÑ/i,apr:/^апÑил/i,may:/^май/i,jun:/^Ñни/i,jul:/^Ñли/i,aug:/^авгÑÑÑ/i,sep:/^ÑепÑемвÑи/i,oct:/^окÑомвÑи/i,nov:/^ноемвÑи/i,dec:/^декемвÑи/i,sun:/^не((делÑ)?)?/i,mon:/^по((неделник)?)?/i,tue:/^вÑоÑник/i,wed:/^ÑÑÑда/i,thu:/^Ñе((ÑвÑÑÑÑк)?)?/i,fri:/^пе((ÑÑк)?)?/i,sat:/^ÑÑ((боÑа)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|aft(er)?|from|hence)/i,subtract:/^(\-|bef(ore)?|ago)/i,yesterday:/^yes(terday)?/i,today:/^t(od(ay)?)?/i,tomorrow:/^tom(orrow)?/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^mn|min(ute)?s?/i,hour:/^h(our)?s?/i,week:/^w(eek)?s?/i,month:/^m(onth)?s?/i,day:/^d(ay)?s?/i,year:/^y(ear)?s?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt|utc)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a(?!u|p)|p)/i},timezones:[{name:"UTC",offset:"-000"},{name:"GMT",offset:"-000"},{name:"EST",offset:"-0500"},{name:"EDT",offset:"-0400"},{name:"CST",offset:"-0600"},{name:"CDT",offset:"-0500"},{name:"MST",offset:"-0700"},{name:"MDT",offset:"-0600"},{name:"PST",offset:"-0800"},{name:"PDT",offset:"-0700"}]};
\ No newline at end of file
diff --git a/kronolith/js/bs-BA.js b/kronolith/js/bs-BA.js
deleted file mode 100644
index e60113e91..000000000
--- a/kronolith/js/bs-BA.js
+++ /dev/null
@@ -1 +0,0 @@
-Date.CultureInfo={name:"bs-Latn-BA",englishName:"Bosnian (Bosnia and Herzegovina)",nativeName:"bosanski (Bosna i Hercegovina)",dayNames:["nedjelja","ponedjeljak","utorak","srijeda","Äetvrtak","petak","subota"],abbreviatedDayNames:["ned","pon","uto","sri","Äet","pet","sub"],shortestDayNames:["ned","pon","uto","sri","Äet","pet","sub"],firstLetterDayNames:["n","p","u","s","Ä","p","s"],monthNames:["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar"],abbreviatedMonthNames:["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d.M.yyyy",longDate:"d. MMMM yyyy",shortTime:"H:mm:ss",longTime:"H:mm:ss",fullDateTime:"d. MMMM yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uar)?/i,feb:/^feb(ruar)?/i,mar:/^mar(t)?/i,apr:/^apr(il)?/i,may:/^maj/i,jun:/^jun/i,jul:/^jul/i,aug:/^avg(ust)?/i,sep:/^sep(tembar)?/i,oct:/^okt(obar)?/i,nov:/^nov(embar)?/i,dec:/^dec(embar)?/i,sun:/^nedjelja/i,mon:/^ponedjeljak/i,tue:/^utorak/i,wed:/^srijeda/i,thu:/^Äetvrtak/i,fri:/^petak/i,sat:/^subota/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|aft(er)?|from|hence)/i,subtract:/^(\-|bef(ore)?|ago)/i,yesterday:/^yes(terday)?/i,today:/^t(od(ay)?)?/i,tomorrow:/^tom(orrow)?/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^mn|min(ute)?s?/i,hour:/^h(our)?s?/i,week:/^w(eek)?s?/i,month:/^m(onth)?s?/i,day:/^d(ay)?s?/i,year:/^y(ear)?s?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt|utc)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a(?!u|p)|p)/i},timezones:[{name:"UTC",offset:"-000"},{name:"GMT",offset:"-000"},{name:"EST",offset:"-0500"},{name:"EDT",offset:"-0400"},{name:"CST",offset:"-0600"},{name:"CDT",offset:"-0500"},{name:"MST",offset:"-0700"},{name:"MDT",offset:"-0600"},{name:"PST",offset:"-0800"},{name:"PDT",offset:"-0700"}]};
\ No newline at end of file
diff --git a/kronolith/js/ca-ES.js b/kronolith/js/ca-ES.js
deleted file mode 100644
index 5530ad82e..000000000
--- a/kronolith/js/ca-ES.js
+++ /dev/null
@@ -1 +0,0 @@
-Date.CultureInfo={name:"ca-ES",englishName:"Catalan (Catalan)",nativeName:"català (català )",dayNames:["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"],abbreviatedDayNames:["dg.","dl.","dt.","dc.","dj.","dv.","ds."],shortestDayNames:["dg","dl","dt","dc","dj","dv","ds"],firstLetterDayNames:["d","d","d","d","d","d","d"],monthNames:["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre"],abbreviatedMonthNames:["gen","feb","març","abr","maig","juny","jul","ag","set","oct","nov","des"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd, d' / 'MMMM' / 'yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dddd, d' / 'MMMM' / 'yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM' / 'yyyy"},regexPatterns:{jan:/^gen(er)?/i,feb:/^feb(rer)?/i,mar:/^març/i,apr:/^abr(il)?/i,may:/^maig/i,jun:/^juny/i,jul:/^jul(iol)?/i,aug:/^ag(ost)?/i,sep:/^set(embre)?/i,oct:/^oct(ubre)?/i,nov:/^nov(embre)?/i,dec:/^des(embre)?/i,sun:/^dg((.(umenge)?)?)?/i,mon:/^dl((.(lluns)?)?)?/i,tue:/^dt((.(marts)?)?)?/i,wed:/^dc((.(mecres)?)?)?/i,thu:/^dj((.(jous)?)?)?/i,fri:/^dv((.(vendres)?)?)?/i,sat:/^ds((.(ssabte)?)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|aft(er)?|from|hence)/i,subtract:/^(\-|bef(ore)?|ago)/i,yesterday:/^yes(terday)?/i,today:/^t(od(ay)?)?/i,tomorrow:/^tom(orrow)?/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^mn|min(ute)?s?/i,hour:/^h(our)?s?/i,week:/^w(eek)?s?/i,month:/^m(onth)?s?/i,day:/^d(ay)?s?/i,year:/^y(ear)?s?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt|utc)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a(?!u|p)|p)/i},timezones:[{name:"UTC",offset:"-000"},{name:"GMT",offset:"-000"},{name:"EST",offset:"-0500"},{name:"EDT",offset:"-0400"},{name:"CST",offset:"-0600"},{name:"CDT",offset:"-0500"},{name:"MST",offset:"-0700"},{name:"MDT",offset:"-0600"},{name:"PST",offset:"-0800"},{name:"PDT",offset:"-0700"}]};
\ No newline at end of file
diff --git a/kronolith/js/calendar-panel.js b/kronolith/js/calendar-panel.js
deleted file mode 100644
index 31891a86f..000000000
--- a/kronolith/js/calendar-panel.js
+++ /dev/null
@@ -1 +0,0 @@
-function sbarToggle(){var A=$(document.body),B;if(A.hasClassName("rightPanel")){B=0;A.removeClassName("rightPanel")}else{B=1;A.addClassName("rightPanel")}new Ajax.Request(KronolithVar.pref_api_url,{parameters:{app:"kronolith",pref:"show_panel",value:B}})}function removeTag(A){}document.observe("dom:loaded",function(){$$("#pageControlsInner .checkbox").invoke("observe","click",function(){Views.invalidate();ShowView(kronolithView,{date:kronolithDate.getFullYear()+(kronolithDate.getMonth()+1).toPaddedString(2)+kronolithDate.getDate().toPaddedString(2),toggle_calendar:this.value},false)});$$("#pageControlsInner .calendar-info").invoke("observe","click",function(){RedBox.loading();var A=this.up().select(".checkbox").first().value;new Ajax.Request(KronolithVar.calendar_info_url,{parameters:{c:A},method:"get",onSuccess:function(B){RedBox.showHtml(''+B.responseText+'
')},onFailure:function(B){RedBox.close()}})})});
\ No newline at end of file
diff --git a/kronolith/js/cs-CZ.js b/kronolith/js/cs-CZ.js
deleted file mode 100644
index 3342b451a..000000000
--- a/kronolith/js/cs-CZ.js
+++ /dev/null
@@ -1 +0,0 @@
-Date.CultureInfo={name:"cs-CZ",englishName:"Czech (Czech Republic)",nativeName:"ÄeÅ¡tina (Äeská republika)",dayNames:["nedÄle","pondÄlÃ","úterý","stÅeda","Ätvrtek","pátek","sobota"],abbreviatedDayNames:["ne","po","út","st","Ät","pá","so"],shortestDayNames:["ne","po","út","st","Ät","pá","so"],firstLetterDayNames:["n","p","ú","s","Ä","p","s"],monthNames:["leden","únor","bÅezen","duben","kvÄten","Äerven","Äervenec","srpen","záÅÃ","ÅÃjen","listopad","prosinec"],abbreviatedMonthNames:["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"],amDesignator:"dop.",pmDesignator:"odp.",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d.M.yyyy",longDate:"d. MMMM yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"d. MMMM yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^leden/i,feb:/^únor/i,mar:/^bÅezen/i,apr:/^duben/i,may:/^kvÄten/i,jun:/^Äerven/i,jul:/^Äervenec/i,aug:/^srpen/i,sep:/^záÅÃ/i,oct:/^ÅÃjen/i,nov:/^listopad/i,dec:/^prosinec/i,sun:/^nedÄle/i,mon:/^pondÄlÃ/i,tue:/^úterý/i,wed:/^stÅeda/i,thu:/^Ätvrtek/i,fri:/^pátek/i,sat:/^sobota/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|aft(er)?|from|hence)/i,subtract:/^(\-|bef(ore)?|ago)/i,yesterday:/^yes(terday)?/i,today:/^t(od(ay)?)?/i,tomorrow:/^tom(orrow)?/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^mn|min(ute)?s?/i,hour:/^h(our)?s?/i,week:/^w(eek)?s?/i,month:/^m(onth)?s?/i,day:/^d(ay)?s?/i,year:/^y(ear)?s?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt|utc)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a(?!u|p)|p)/i},timezones:[{name:"UTC",offset:"-000"},{name:"GMT",offset:"-000"},{name:"EST",offset:"-0500"},{name:"EDT",offset:"-0400"},{name:"CST",offset:"-0600"},{name:"CDT",offset:"-0500"},{name:"MST",offset:"-0700"},{name:"MDT",offset:"-0600"},{name:"PST",offset:"-0800"},{name:"PDT",offset:"-0700"}]};
\ No newline at end of file
diff --git a/kronolith/js/da-DK.js b/kronolith/js/da-DK.js
deleted file mode 100644
index 393172b45..000000000
--- a/kronolith/js/da-DK.js
+++ /dev/null
@@ -1 +0,0 @@
-Date.CultureInfo={name:"da-DK",englishName:"Danish (Denmark)",nativeName:"dansk (Danmark)",dayNames:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],abbreviatedDayNames:["sø","ma","ti","on","to","fr","lø"],shortestDayNames:["sø","ma","ti","on","to","fr","lø"],firstLetterDayNames:["s","m","t","o","t","f","l"],monthNames:["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december"],abbreviatedMonthNames:["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd-MM-yyyy",longDate:"d. MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"d. MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d. MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uar)?/i,feb:/^feb(ruar)?/i,mar:/^mar(ts)?/i,apr:/^apr(il)?/i,may:/^maj/i,jun:/^jun(i)?/i,jul:/^jul(i)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^okt(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^søndag/i,mon:/^mandag/i,tue:/^tirsdag/i,wed:/^onsdag/i,thu:/^torsdag/i,fri:/^fredag/i,sat:/^lørdag/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|aft(er)?|from|hence)/i,subtract:/^(\-|bef(ore)?|ago)/i,yesterday:/^yes(terday)?/i,today:/^t(od(ay)?)?/i,tomorrow:/^tom(orrow)?/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^mn|min(ute)?s?/i,hour:/^h(our)?s?/i,week:/^w(eek)?s?/i,month:/^m(onth)?s?/i,day:/^d(ay)?s?/i,year:/^y(ear)?s?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt|utc)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a(?!u|p)|p)/i},timezones:[{name:"UTC",offset:"-000"},{name:"GMT",offset:"-000"},{name:"EST",offset:"-0500"},{name:"EDT",offset:"-0400"},{name:"CST",offset:"-0600"},{name:"CDT",offset:"-0500"},{name:"MST",offset:"-0700"},{name:"MDT",offset:"-0600"},{name:"PST",offset:"-0800"},{name:"PDT",offset:"-0700"}]};
\ No newline at end of file
diff --git a/kronolith/js/date.js b/kronolith/js/date.js
deleted file mode 100644
index fc618df1e..000000000
--- a/kronolith/js/date.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){var B=Date,A=B.prototype,D=B.CultureInfo,G=function(J,I){if(!I){I=2}return("000"+J).slice(I*-1)};A.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};A.setTimeToNow=function(){var I=new Date();this.setHours(I.getHours());this.setMinutes(I.getMinutes());this.setSeconds(I.getSeconds());this.setMilliseconds(I.getMilliseconds());return this};B.today=function(){return new Date().clearTime()};B.compare=function(J,I){if(isNaN(J)||isNaN(I)){throw new Error(J+" - "+I)}else{if(J instanceof Date&&I instanceof Date){return(JI)?1:0}else{throw new TypeError(J+" - "+I)}}};B.equals=function(J,I){return(J.compareTo(I)===0)};B.getDayNumberFromName=function(J){var N=D.dayNames,I=D.abbreviatedDayNames,M=D.shortestDayNames,L=J.toLowerCase();for(var K=0;K=J.getTime()&&this.getTime()<=I.getTime()};A.isAfter=function(I){return this.compareTo(I||new Date())===1};A.isBefore=function(I){return(this.compareTo(I||new Date())===-1)};A.isToday=A.isSameDay=function(I){return this.clone().clearTime().equals((I||new Date()).clone().clearTime())};A.addMilliseconds=function(I){this.setMilliseconds(this.getMilliseconds()+I*1);return this};A.addSeconds=function(I){return this.addMilliseconds(I*1000)};A.addMinutes=function(I){return this.addMilliseconds(I*60000)};A.addHours=function(I){return this.addMilliseconds(I*3600000)};A.addDays=function(I){this.setDate(this.getDate()+I*1);return this};A.addWeeks=function(I){return this.addDays(I*7)};A.addMonths=function(I){var J=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+I*1);this.setDate(Math.min(J,B.getDaysInMonth(this.getFullYear(),this.getMonth())));return this};A.addYears=function(I){return this.addMonths(I*12)};A.add=function(J){if(typeof J=="number"){this._orient=J;return this}var I=J;if(I.milliseconds){this.addMilliseconds(I.milliseconds)}if(I.seconds){this.addSeconds(I.seconds)}if(I.minutes){this.addMinutes(I.minutes)}if(I.hours){this.addHours(I.hours)}if(I.weeks){this.addWeeks(I.weeks)}if(I.months){this.addMonths(I.months)}if(I.years){this.addYears(I.years)}if(I.days){this.addDays(I.days)}return this};var E,F,C;A.getWeek=function(){var P,O,N,M,L,K,J,I,R,Q;E=(!E)?this.getFullYear():E;F=(!F)?this.getMonth()+1:F;C=(!C)?this.getDate():C;if(F<=2){P=E-1;O=(P/4|0)-(P/100|0)+(P/400|0);N=((P-1)/4|0)-((P-1)/100|0)+((P-1)/400|0);R=O-N;L=0;K=C-1+(31*(F-1))}else{P=E;O=(P/4|0)-(P/100|0)+(P/400|0);N=((P-1)/4|0)-((P-1)/100|0)+((P-1)/400|0);R=O-N;L=R+1;K=C+((153*(F-3)+2)/5)+58+R}J=(P+O)%7;M=(K+J-L)%7;I=(K+3-M)|0;if(I<0){Q=53-((J-R)/5|0)}else{if(I>364+R){Q=1}else{Q=(I/7|0)+1}}E=F=C=null;return Q};A.getISOWeek=function(){E=this.getUTCFullYear();F=this.getUTCMonth()+1;C=this.getUTCDate();return G(this.getWeek())};A.setWeek=function(I){return this.moveToDayOfWeek(1).addWeeks(I-this.getWeek())};var H=function(L,K,I,J){if(typeof L=="undefined"){return false}else{if(typeof L!="number"){throw new TypeError(L+" is not a Number.")}else{if(LI){throw new RangeError(L+" is not a valid value for "+J+".")}}}return true};B.validateMillisecond=function(I){return H(I,0,999,"millisecond")};B.validateSecond=function(I){return H(I,0,59,"second")};B.validateMinute=function(I){return H(I,0,59,"minute")};B.validateHour=function(I){return H(I,0,23,"hour")};B.validateDay=function(J,I,K){return H(J,1,B.getDaysInMonth(I,K),"day")};B.validateMonth=function(I){return H(I,0,11,"month")};B.validateYear=function(I){return H(I,0,9999,"year")};A.set=function(I){if(B.validateMillisecond(I.millisecond)){this.addMilliseconds(I.millisecond-this.getMilliseconds())}if(B.validateSecond(I.second)){this.addSeconds(I.second-this.getSeconds())}if(B.validateMinute(I.minute)){this.addMinutes(I.minute-this.getMinutes())}if(B.validateHour(I.hour)){this.addHours(I.hour-this.getHours())}if(B.validateMonth(I.month)){this.addMonths(I.month-this.getMonth())}if(B.validateYear(I.year)){this.addYears(I.year-this.getFullYear())}if(B.validateDay(I.day,this.getFullYear(),this.getMonth())){this.addDays(I.day-this.getDate())}if(I.timezone){this.setTimezone(I.timezone)}if(I.timezoneOffset){this.setTimezoneOffset(I.timezoneOffset)}if(I.week&&H(I.week,0,53,"week")){this.setWeek(I.week)}return this};A.moveToFirstDayOfMonth=function(){return this.set({day:1})};A.moveToLastDayOfMonth=function(){return this.set({day:B.getDaysInMonth(this.getFullYear(),this.getMonth())})};A.moveToNthOccurrence=function(J,K){var I=0;if(K>0){I=K-1}else{if(K===-1){this.moveToLastDayOfMonth();if(this.getDay()!==J){this.moveToDayOfWeek(J,-1)}return this}}return this.moveToFirstDayOfMonth().addDays(-1).moveToDayOfWeek(J,+1).addWeeks(I)};A.moveToDayOfWeek=function(I,J){var K=(I-this.getDay()+7*(J||+1))%7;return this.addDays((K===0)?K+=7*(J||+1):K)};A.moveToMonth=function(K,I){var J=(K-this.getMonth()+12*(I||+1))%12;return this.addMonths((J===0)?J+=12*(I||+1):J)};A.getOrdinalNumber=function(){return Math.ceil((this.clone().clearTime()-new Date(this.getFullYear(),0,1))/86400000)+1};A.getTimezone=function(){return B.getTimezoneAbbreviation(this.getUTCOffset())};A.setTimezoneOffset=function(K){var I=this.getTimezoneOffset(),J=Number(K)*-6/10;return this.addMinutes(J-I)};A.setTimezone=function(I){return this.setTimezoneOffset(B.getTimezoneOffset(I))};A.hasDaylightSavingTime=function(){return(Date.today().set({month:0,day:1}).getTimezoneOffset()!==Date.today().set({month:6,day:1}).getTimezoneOffset())};A.isDaylightSavingTime=function(){return Date.today().set({month:0,day:1}).getTimezoneOffset()!=this.getTimezoneOffset()};A.getUTCOffset=function(){var J=this.getTimezoneOffset()*-10/6,I;if(J<0){I=(J-10000).toString();return I.charAt(0)+I.substr(2)}else{I=(J+10000).toString();return"+"+I.substr(1)}};A.getElapsed=function(I){return(I||new Date())-this};if(!A.toISOString){A.toISOString=function(){function I(J){return J<10?"0"+J:J}return'"'+this.getUTCFullYear()+"-"+I(this.getUTCMonth()+1)+"-"+I(this.getUTCDate())+"T"+I(this.getUTCHours())+":"+I(this.getUTCMinutes())+":"+I(this.getUTCSeconds())+'Z"'}}A._toString=A.toString;A.toString=function(K){var I=this;if(K&&K.length==1){var L=D.formatPatterns;I.t=I.toString;switch(K){case"d":return I.t(L.shortDate);case"D":return I.t(L.longDate);case"F":return I.t(L.fullDateTime);case"m":return I.t(L.monthDay);case"r":return I.t(L.rfc1123);case"s":return I.t(L.sortableDateTime);case"t":return I.t(L.shortTime);case"T":return I.t(L.longTime);case"u":return I.t(L.universalSortableDateTime);case"y":return I.t(L.yearMonth)}}var J=function(M){switch(M*1){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};return K?K.replace(/(\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S)/g,function(M){if(M.charAt(0)==="\\"){return M.replace("\\","")}I.h=I.getHours;switch(M){case"hh":return G(I.h()<13?(I.h()===0?12:I.h()):(I.h()-12));case"h":return I.h()<13?(I.h()===0?12:I.h()):(I.h()-12);case"HH":return G(I.h());case"H":return I.h();case"mm":return G(I.getMinutes());case"m":return I.getMinutes();case"ss":return G(I.getSeconds());case"s":return I.getSeconds();case"yyyy":return G(I.getFullYear(),4);case"yy":return G(I.getFullYear());case"dddd":return D.dayNames[I.getDay()];case"ddd":return D.abbreviatedDayNames[I.getDay()];case"dd":return G(I.getDate());case"d":return I.getDate();case"MMMM":return D.monthNames[I.getMonth()];case"MMM":return D.abbreviatedMonthNames[I.getMonth()];case"MM":return G((I.getMonth()+1));case"M":return I.getMonth()+1;case"t":return I.h()<12?D.amDesignator.substring(0,1):D.pmDesignator.substring(0,1);case"tt":return I.h()<12?D.amDesignator:D.pmDesignator;case"S":return J(I.getDate());default:return M}}):this._toString()}}());(function(){var Q=Date,G=Q.prototype,R=Q.CultureInfo,K=Number.prototype;G._orient=+1;G._nth=null;G._is=false;G._same=false;G._isSecond=false;K._dateElement="day";G.next=function(){this._orient=+1;return this};Q.next=function(){return Q.today().next()};G.last=G.prev=G.previous=function(){this._orient=-1;return this};Q.last=Q.prev=Q.previous=function(){return Q.today().last()};G.is=function(){this._is=true;return this};G.same=function(){this._same=true;this._isSecond=false;return this};G.today=function(){return this.same().day()};G.weekday=function(){if(this._is){this._is=false;return(!this.is().sat()&&!this.is().sun())}return false};G.at=function(V){return(typeof V==="string")?Q.parse(this.toString("d")+" "+V):this.set(V)};K.fromNow=K.after=function(V){var W={};W[this._dateElement]=this;return((!V)?new Date():V.clone()).add(W)};K.ago=K.before=function(V){var W={};W[this._dateElement]=this*-1;return((!V)?new Date():V.clone()).add(W)};var E=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),H=("january february march april may june july august september october november december").split(/\s/),J=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),L=("Milliseconds Seconds Minutes Hours Date Week Month FullYear").split(/\s/),B=("final first second third fourth fifth").split(/\s/),T;G.toObject=function(){var W={};for(var V=0;VW){throw new RangeError(Q.getDayName(V)+" does not occur "+X+" times in the month of "+Q.getMonthName(W.getMonth())+" "+W.getFullYear()+".")}return this}return this.moveToDayOfWeek(V,this._orient)}};var F=function(V){return function(){var X=Q.today(),W=V-X.getDay();if(V===0&&R.firstDayOfWeek===1&&X.getDay()!==0){W=W+7}return X.addDays(W)}};for(var P=0;P-1;W--){Y=J[W].toLowerCase();if(a[Y]!=Z[Y]){return false}if(X==Y){break}}return true}if(V.substring(V.length-1)!="s"){V+="s"}return this["add"+V](this._orient)}};var D=function(V){return function(){this._dateElement=V;return this}};for(var N=0;N0&&!W){try{M=J.call(this,L[1])}catch(V){W=true}}else{W=true}if(!W&&M[1].length===0){W=true}if(!W){var S=[];for(var Q=0;Q0){O[0]=O[0].concat(N[0]);O[1]=N[1]}}if(O[1].length1){J=Array.prototype.slice.call(arguments)}else{if(arguments[0]instanceof Array){J=arguments[0]}}if(J){for(var L=0,K=J.shift();L2)?M:(M+(((M+2000)E.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.")}var O=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){O.set({timezone:this.timezone})}else{if(this.timezoneOffset){O.set({timezoneOffset:this.timezoneOffset})}}return O},finish:function(L){L=(L instanceof Array)?G(L):[L];if(L.length===0){return null}for(var Q=0;Q6){A-=7}if(B.getDay()!=A){B.moveToDayOfWeek(A,1)}return B},moveToBeginOfWeek:function(A){if(A.getDay()!=Kronolith.conf.week_start){A.moveToDayOfWeek(Kronolith.conf.week_start,-1)}return A},_addHistory:function(B,A){if(Horde.dhtmlHistory.getCurrentLocation()!=B){Horde.dhtmlHistory.add(B,A)}},iframeContent:function(B,D){if(B===null){B=D}var A=$("dimpmain_portal"),C;if(!A){this.showNotifications([{type:"horde.error",message:"Bad portal!"}]);return}C=new Element("IFRAME",{id:"iframe"+B,className:"iframe",frameBorder:0,src:D});this._resizeIE6Iframe(C);if(B=="options"){C.observe("load",function(){$("iframeoptions").contentWindow.document.getElementById("menu").style.display="none"})}A.insert(C)},_onMenuShow:function(A){var E,C,B,D;switch(A.ctx){case"ctx_folder":E=$("ctx_folder_create","ctx_folder_rename","ctx_folder_delete");C=this.DMenu.element();if(C.readAttribute("mbox")=="INBOX"){E.invoke("hide")}else{if(Kronolith.conf.fixed_folders.indexOf(C.readAttribute("mbox"))!=-1){E.shift();E.invoke("hide")}else{E.invoke("show")}}if(C.hasAttribute("u")){$("ctx_folder_poll").hide();$("ctx_folder_nopoll").show()}else{$("ctx_folder_poll").show();$("ctx_folder_nopoll").hide()}break;case"ctx_message":[$("ctx_message_reply_list")].invoke(this.viewport.createSelection("domid",A.id).get("dataob").first().listmsg?"show":"hide");break;case"ctx_reply":D=this.viewport.getSelected();if(D.size()==1){B=D.get("dataob").first()}[$("ctx_reply_reply_list")].invoke(B&&B.listmsg?"show":"hide");break;case"ctx_otheractions":$("oa_seen","oa_unseen","oa_flagged","oa_clear","oa_sep1","oa_blacklist","oa_whitelist","oa_sep2").compact().invoke(this.viewport.getSelected().size()?"show":"hide");break}return true},_onResize:function(B,A){if(this.viewport){this.viewport.onResize(B,A)}this._resizeIE6()},updateTitle:function(){var B,A,C;if(this.viewport.isFiltering()){A=Kronolith.text.search+" :: "+this.viewport.getMetaData("total_rows")+" "+Kronolith.text.resfound}else{B=$(this.getFolderId(this.folder));if(B){C=B.readAttribute("u");A=B.readAttribute("l");if(C>0){A+=" ("+C+")"}}else{A=this.viewport.getMetaData("label")}}this.setTitle(A)},_keydownHandler:function(B){var A=B.keyCode||B.charCode;switch(A){case Event.KEY_ESC:this._closeRedBox();break}},_keyupHandler:function(A){},_clickHandler:function(E,D){if(E.isRightClick()){return}var B=E.element(),G=E.element(),F,C;if(this.alertrequest){this.alertsFade(this.alertrequest);this.alertrequest=null}while(Object.isElement(B)){F=B.readAttribute("id");switch(F){case"kronolithLogo":this.go("portal");E.stop();return;case"id_fullday":this.eventForm.select(".edit_at").each(Element.toggle);E.stop();return;case"kronolithNewEvent":this.editEvent();E.stop();return;case"kronolithEventActions":if(G.match("input.button")){this._closeRedBox()}E.stop();return;case"kronolithNavDay":case"kronolithNavWeek":case"kronolithNavMonth":this.go(F.substring(12).toLowerCase());E.stop();return;case"kronolithMenu":if(G.match("div.kronolithCalendars div")){this.toggleCalendar(G)}E.stop();return;case"kronolithMinicalDate":this.go("month:"+G.readAttribute("date"));E.stop();return;case"kronolithMinical":if(G.id=="kronolithMinicalPrev"){var A=this.parseDate($("kronolithMinicalDate").readAttribute("date"));A.previous().month();this.updateMinical(A);E.stop();return}if(G.id=="kronolithMinicalNext"){var A=this.parseDate($("kronolithMinicalDate").readAttribute("date"));A.next().month();this.updateMinical(A);E.stop();return}var C=G;if(C.tagName!="td"){C.up("td")}if(C&&C.readAttribute("date")){if(C.hasClassName("kronolithMinicalWeek")){this.go("week:"+C.readAttribute("date"))}else{if(!C.hasClassName("empty")){this.go("day:"+C.readAttribute("date"))}}}E.stop();return;case"kronolithViewMonth":if(G.hasClassName("kronolithFirstCol")){this.go("week")}else{if(G.hasClassName("kronolithDay")){this.go("day")}}E.stop();return;case"kronolithBody":var C=G;if(!C.match("div.kronolithEvent")){C=C.up("div.kronolithEvent")}if(C){this.editEvent()}E.stop();return;case"alertsloglink":this.toggleAlertsLog();break;case"alerts":this.alertsFade(B);break}B=B.up()}},_mouseHandler:function(B,A){},editEvent:function(){$("kronolithEventForm").select("div.kronolithTags span").each(function(A){$("id_tags").value=$F("id_tags")+A.getText()+", "});RedBox.showHtml($("kronolithEventForm").show());this.eventForm=RedBox.getWindowContents()},_closeRedBox:function(){RedBox.close();this.eventForm=null},onLoad:function(){if(Horde.dhtmlHistory.initialize()){Horde.dhtmlHistory.addListener(this.go.bind(this))}if(!Horde.dhtmlHistory.getCurrentLocation()){this.go(Kronolith.conf.login_view)}$("kronolithMenu").select("div.kronolithCalendars div").each(function(A){A.observe("mouseover",A.addClassName.curry("kronolithCalOver"));A.observe("mouseout",A.removeClassName.curry("kronolithCalOver"))});this._resizeIE6()},_resizeIE6:function(){var C=(($("kronolithViewMonth").getWidth()-20-2-2-16)/7)-2-2;$("kronolithViewMonth").select(".kronolithCol").invoke("setStyle",{width:C+"px"});var A=(($("kronolithViewMonth").getHeight()-25)/6)-2-2;$("kronolithViewMonth").select(".kronolithViewBody .kronolithCol").invoke("setStyle",{height:A+"px"});$("kronolithViewMonth").select(".kronolithViewBody .kronolithFirstCol").invoke("setStyle",{height:A+"px"});$("kronolithViewWeek").select(".kronolithCol").invoke("setStyle",{width:(C-1)+"px"});var B=$("kronolithViewDay").getWidth()-20-2-2-16-3;var C=((B+7)/7)-1;$("kronolithViewDay").select(".kronolithViewHead .kronolithCol").invoke("setStyle",{width:B+"px"});$("kronolithViewDay").select(".kronolithViewBody .kronolithCol").invoke("setStyle",{width:C+"px"});$("kronolithViewDay").select(".kronolithViewBody .kronolithAllDay .kronolithCol").invoke("setStyle",{width:B+"px"})},_resizeIE6Iframe:function(A){if(Kronolith.conf.is_ie6){A.setStyle({width:$("kronolithmain").getStyle("width"),height:(document.viewport.getHeight()-20)+"px"})}},toggleCalendar:function(A){if(A.hasClassName("on")){A.removeClassName("on")}else{A.addClassName("on")}}};if(typeof ContextSensitive!="undefined"){KronolithCore.DMenu=new ContextSensitive()}document.observe("dom:loaded",function(){try{if(parent.opener&&parent.opener.location.host==window.location.host&&parent.opener.KronolithCore){Kronolith.baseWindow=parent.opener.Kronolith.baseWindow||parent.opener}}catch(A){}new PeriodicalExecuter(function(){if(KronolithCore.remove_gc.size()){try{$A(KronolithCore.remove_gc.splice(0,75)).compact().invoke("stopObserving")}catch(B){KronolithCore.debug("remove_gc[].stopObserving",B)}}},10);KronolithCore.onLoad();document.observe("keydown",KronolithCore._keydownHandler.bindAsEventListener(KronolithCore));document.observe("keyup",KronolithCore._keyupHandler.bindAsEventListener(KronolithCore));document.observe("click",KronolithCore._clickHandler.bindAsEventListener(KronolithCore));document.observe("dblclick",KronolithCore._clickHandler.bindAsEventListener(KronolithCore,true));document.observe("mouseover",KronolithCore._mouseHandler.bindAsEventListener(KronolithCore,"over"));Event.observe(window,"resize",KronolithCore._onResize.bind(KronolithCore));if(Kronolith.conf.is_ie6){document.observe("selectstart",Event.stop);$("foobar").compact().invoke("select","LI").flatten().compact().each(function(B){B.observe("mouseover",B.addClassName.curry("over")).observe("mouseout",B.removeClassName.curry("over"))})}});Event.observe(window,"load",function(){KronolithCore.window_load=true});Element.addMethods({setText:function(B,C){var A=0;$A(B.childNodes).each(function(D){if(D.nodeType==3){if(A++){Element.remove(D)}else{D.nodeValue=C}}});if(!A){$(B).insert(C)}return B},getText:function(B,A){var C="";$A(B.childNodes).each(function(D){if(D.nodeType==3){C+=D.nodeValue}else{if(A&&D.hasChildNodes()){C+=$(D).getText(true)}}});return C}});Object.extend(Array.prototype,{numericSort:function(){return this.sort(function(B,A){if(B>A){return 1}else{if(BM)?1:0};this.equals=function(M){return(this.compareTo(M)===0)};this.add=function(M){return(M===null)?this:this.addSeconds(M.getTotalMilliseconds()/1000)};this.subtract=function(M){return(M===null)?this:this.addSeconds(-M.getTotalMilliseconds()/1000)};this.addDays=function(M){return new TimeSpan(this.getTotalMilliseconds()+(M*86400000))};this.addHours=function(M){return new TimeSpan(this.getTotalMilliseconds()+(M*3600000))};this.addMinutes=function(M){return new TimeSpan(this.getTotalMilliseconds()+(M*60000))};this.addSeconds=function(M){return new TimeSpan(this.getTotalMilliseconds()+(M*1000))};this.addMilliseconds=function(M){return new TimeSpan(this.getTotalMilliseconds()+M)};this.get12HourHour=function(){return(this.getHours()>12)?this.getHours()-12:(this.getHours()===0)?12:this.getHours()};this.getDesignator=function(){return(this.getHours()<12)?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(N){this._toString=function(){if(this.getDays()!==null&&this.getDays()>0){return this.getDays()+"."+this.getHours()+":"+this.p(this.getMinutes())+":"+this.p(this.getSeconds())}else{return this.getHours()+":"+this.p(this.getMinutes())+":"+this.p(this.getSeconds())}};this.p=function(O){return(O.toString().length<2)?"0"+O:O};var M=this;return N?N.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(O){switch(O){case"d":return M.getDays();case"dd":return M.p(M.getDays());case"H":return M.getHours();case"HH":return M.p(M.getHours());case"h":return M.get12HourHour();case"hh":return M.p(M.get12HourHour());case"m":return M.getMinutes();case"mm":return M.p(M.getMinutes());case"s":return M.getSeconds();case"ss":return M.p(M.getSeconds());case"t":return((M.getHours()<12)?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case"tt":return(M.getHours()<12)?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()};return this};Date.prototype.getTimeOfDay=function(){return new TimeSpan(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())};var TimePeriod=function(M,F,E,P,N,J,G){var L="years months days hours minutes seconds milliseconds".split(/\s+/);var I=function(T){return function(){return this[T]}};var B=function(T){return function(U){this[T]=U;return this}};for(var O=0;OR)?-1:+1;this.years=R.getFullYear()-S.getFullYear();Q.addYears(this.years);if(H==+1){if(Q>R){if(this.years!==0){this.years--}}}else{if(QR&&S.clone().addDays(-S.getDaysInMonth())>R){S.addMonths(-1);this.months--}}var K=R-S;if(K!==0){var A=new TimeSpan(K);this.setDays(A.getDays());this.setHours(A.getHours());this.setMinutes(A.getMinutes());this.setSeconds(A.getSeconds());this.setMilliseconds(A.getMilliseconds())}}}return this};
\ No newline at end of file
diff --git a/kronolith/js/tr-TR.js b/kronolith/js/tr-TR.js
deleted file mode 100644
index a7b4c5d43..000000000
--- a/kronolith/js/tr-TR.js
+++ /dev/null
@@ -1 +0,0 @@
-Date.CultureInfo={name:"tr-TR",englishName:"Turkish (Turkey)",nativeName:"Türkçe (Türkiye)",dayNames:["Pazar","Pazartesi","Salı","ÃarÅamba","PerÅembe","Cuma","Cumartesi"],abbreviatedDayNames:["Paz","Pzt","Sal","Ãar","Per","Cum","Cmt"],shortestDayNames:["Pz","Pt","Sa","Ãa","Pe","Cu","Ct"],firstLetterDayNames:["P","P","S","Ã","P","C","C"],monthNames:["Ocak","Åubat","Mart","Nisan","Mayıs","Haziran","Temmuz","AÄustos","Eylül","Ekim","Kasım","Aralık"],abbreviatedMonthNames:["Oca","Åub","Mar","Nis","May","Haz","Tem","AÄu","Eyl","Eki","Kas","Ara"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"dd MMMM yyyy dddd",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dd MMMM yyyy dddd HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^oca(k)?/i,feb:/^Åub(at)?/i,mar:/^mar(t)?/i,apr:/^nis(an)?/i,may:/^may(ıs)?/i,jun:/^haz(iran)?/i,jul:/^tem(muz)?/i,aug:/^aÄu(stos)?/i,sep:/^eyl(ül)?/i,oct:/^eki(m)?/i,nov:/^kas(ım)?/i,dec:/^ara(lık)?/i,sun:/^pz(z(ar)?)?/i,mon:/^pt(t(artesi)?)?/i,tue:/^sa(l(ı)?)?/i,wed:/^ça(r(Åamba)?)?/i,thu:/^pe(r(Åembe)?)?/i,fri:/^cu(m(a)?)?/i,sat:/^ct(t(artesi)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|aft(er)?|from|hence)/i,subtract:/^(\-|bef(ore)?|ago)/i,yesterday:/^yes(terday)?/i,today:/^t(od(ay)?)?/i,tomorrow:/^tom(orrow)?/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^mn|min(ute)?s?/i,hour:/^h(our)?s?/i,week:/^w(eek)?s?/i,month:/^m(onth)?s?/i,day:/^d(ay)?s?/i,year:/^y(ear)?s?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt|utc)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a(?!u|p)|p)/i},timezones:[{name:"UTC",offset:"-000"},{name:"GMT",offset:"-000"},{name:"EST",offset:"-0500"},{name:"EDT",offset:"-0400"},{name:"CST",offset:"-0600"},{name:"CDT",offset:"-0500"},{name:"MST",offset:"-0700"},{name:"MDT",offset:"-0600"},{name:"PST",offset:"-0800"},{name:"PDT",offset:"-0700"}]};
\ No newline at end of file
diff --git a/kronolith/js/uk-UA.js b/kronolith/js/uk-UA.js
deleted file mode 100644
index 12046d6f2..000000000
--- a/kronolith/js/uk-UA.js
+++ /dev/null
@@ -1 +0,0 @@
-Date.CultureInfo={name:"uk-UA",englishName:"Ukrainian (Ukraine)",nativeName:"ÑкÑаÑнÑÑка (УкÑаÑна)",dayNames:["недÑлÑ","понедÑлок","вÑвÑоÑок","ÑеÑеда","ÑеÑвеÑ","п'ÑÑниÑÑ","ÑÑбоÑа"],abbreviatedDayNames:["Ðд","Ðн","ÐÑ","СÑ","ЧÑ","ÐÑ","Сб"],shortestDayNames:["Ðд","Ðн","ÐÑ","СÑ","ЧÑ","ÐÑ","Сб"],firstLetterDayNames:["Ð","Ð","Ð","С","Ч","Ð","С"],monthNames:["СÑÑенÑ","ÐÑÑий","ÐеÑезенÑ","ÐвÑÑенÑ","ТÑавенÑ","ЧеÑвенÑ","ÐипенÑ","СеÑпенÑ","ÐеÑеÑенÑ","ÐовÑенÑ","ÐиÑÑопад","ÐÑÑденÑ"],abbreviatedMonthNames:["СÑÑ","ÐÑÑ","ÐеÑ","ÐвÑ","ТÑа","ЧеÑ","Ðип","СеÑ","ÐеÑ","Ðов","ÐиÑ","ÐÑÑ"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"d MMMM yyyy' Ñ.'",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"d MMMM yyyy' Ñ.' H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d MMMM",yearMonth:"MMMM yyyy' Ñ.'"},regexPatterns:{jan:/^ÑÑÑ(енÑ)?/i,feb:/^лÑÑ(ий)?/i,mar:/^беÑ(езенÑ)?/i,apr:/^квÑ(ÑенÑ)?/i,may:/^ÑÑа(венÑ)?/i,jun:/^ÑеÑ(венÑ)?/i,jul:/^лип(енÑ)?/i,aug:/^ÑеÑ(пенÑ)?/i,sep:/^веÑ(еÑенÑ)?/i,oct:/^жов(ÑенÑ)?/i,nov:/^лиÑ(Ñопад)?/i,dec:/^гÑÑ(денÑ)?/i,sun:/^недÑлÑ/i,mon:/^понедÑлок/i,tue:/^вÑвÑоÑок/i,wed:/^ÑеÑеда/i,thu:/^ÑеÑвеÑ/i,fri:/^п'ÑÑниÑÑ/i,sat:/^ÑÑбоÑа/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|aft(er)?|from|hence)/i,subtract:/^(\-|bef(ore)?|ago)/i,yesterday:/^yes(terday)?/i,today:/^t(od(ay)?)?/i,tomorrow:/^tom(orrow)?/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^mn|min(ute)?s?/i,hour:/^h(our)?s?/i,week:/^w(eek)?s?/i,month:/^m(onth)?s?/i,day:/^d(ay)?s?/i,year:/^y(ear)?s?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt|utc)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a(?!u|p)|p)/i},timezones:[{name:"UTC",offset:"-000"},{name:"GMT",offset:"-000"},{name:"EST",offset:"-0500"},{name:"EDT",offset:"-0400"},{name:"CST",offset:"-0600"},{name:"CDT",offset:"-0500"},{name:"MST",offset:"-0700"},{name:"MDT",offset:"-0600"},{name:"PST",offset:"-0800"},{name:"PDT",offset:"-0700"}]};
\ No newline at end of file
diff --git a/kronolith/js/views.js b/kronolith/js/views.js
deleted file mode 100644
index 59f5c8ede..000000000
--- a/kronolith/js/views.js
+++ /dev/null
@@ -1 +0,0 @@
-var eventTabs=null;var Views={hash:$H(),keys:[],get:function(A){return this.hash.get(A)},push:function(A,B){this.hash.set(A,B);this.keys.push(A);if(this.hash.size()>10){this.hash.unset(this.keys.pop())}},invalidate:function(){this.hash=$H();this.keys=[]}};function ShowView(A,D,B){if(Object.isUndefined(Ajax.Updater)){return true}if(Object.isUndefined(B)){B=true}var E=$H({view:A});if(typeof D=="object"){E.update(D)}else{E.set("date",D)}var C=KronolithVar.view_url+(KronolithVar.view_url.include("?")?"&":"?")+E.toQueryString();if(Views.get(C)){$("page").update(Views.get(C));_ShowView()}else{$("page").appendChild(new Element("DIV",{id:"pageLoading"}).update(KronolithText.loading));$("pageLoading").clonePosition("page");new Effect.Opacity("pageLoading",{from:0,to:0.5});if(B){new Ajax.Updater("page",C,{onComplete:function(){Views.push(C,$("page").innerHTML);_ShowView()}})}else{new Ajax.Updater("page",C,{onComplete:_ShowView})}}return false}function _ShowView(){if(Object.isFunction(stripeAllElements)){stripeAllElements()}if(typeof ToolTips=="object"){ToolTips.out();ToolTips.attachBehavior()}var B=$("view_title");if(B&&B.firstChild&&B.firstChild.nodeValue){var D=KronolithVar.page_title+B.firstChild.nodeValue;try{document.title=D;if(parent.frames.horde_main){parent.document.title=D}}catch(C){}}var A=$("view_vars");if(A){kronolithView=A.readAttribute("view");kronolithDate=new Date(A.readAttribute("date"));kronolithPrintLink=A.readAttribute("print")}}function ShowTab(A){if(eventTabs==null){eventTabs=$("page").select(".tabset ul li")}eventTabs.each(function(C){var B=$(C.id.substring(3));if(!B){return}if(C.id=="tab"+A){C.addClassName("activeTab");B.show()}else{C.removeClassName("activeTab");B.hide()}});return false};
\ No newline at end of file
diff --git a/kronolith/js/zh-CN.js b/kronolith/js/zh-CN.js
deleted file mode 100644
index 28e32ceab..000000000
--- a/kronolith/js/zh-CN.js
+++ /dev/null
@@ -1 +0,0 @@
-Date.CultureInfo={name:"zh-CN",englishName:"Chinese (People's Republic of China)",nativeName:"䏿(ä¸å人æ°å
±åå½)",dayNames:["æææ¥","ææä¸","ææäº","ææä¸","ææå","ææäº","ææå
"],abbreviatedDayNames:["æ¥","ä¸","äº","ä¸","å","äº","å
"],shortestDayNames:["æ¥","ä¸","äº","ä¸","å","äº","å
"],firstLetterDayNames:["æ¥","ä¸","äº","ä¸","å","äº","å
"],monthNames:["䏿","äºæ","䏿","åæ","äºæ","å
æ","䏿","å
«æ","乿","åæ","å䏿","åäºæ"],abbreviatedMonthNames:["䏿","äºæ","䏿","åæ","äºæ","å
æ","䏿","å
«æ","乿","åæ","å䏿","åäºæ"],amDesignator:"ä¸å",pmDesignator:"ä¸å",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"ymd",formatPatterns:{shortDate:"yyyy/M/d",longDate:"yyyy'å¹´'M'æ'd'æ¥'",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"yyyy'å¹´'M'æ'd'æ¥' H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"M'æ'd'æ¥'",yearMonth:"yyyy'å¹´'M'æ'"},regexPatterns:{jan:/^䏿/i,feb:/^äºæ/i,mar:/^䏿/i,apr:/^åæ/i,may:/^äºæ/i,jun:/^å
æ/i,jul:/^䏿/i,aug:/^å
«æ/i,sep:/^乿/i,oct:/^åæ/i,nov:/^å䏿/i,dec:/^åäºæ/i,sun:/^æææ¥/i,mon:/^ææä¸/i,tue:/^ææäº/i,wed:/^ææä¸/i,thu:/^ææå/i,fri:/^ææäº/i,sat:/^ææå
/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|aft(er)?|from|hence)/i,subtract:/^(\-|bef(ore)?|ago)/i,yesterday:/^yes(terday)?/i,today:/^t(od(ay)?)?/i,tomorrow:/^tom(orrow)?/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^mn|min(ute)?s?/i,hour:/^h(our)?s?/i,week:/^w(eek)?s?/i,month:/^m(onth)?s?/i,day:/^d(ay)?s?/i,year:/^y(ear)?s?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt|utc)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a(?!u|p)|p)/i},timezones:[{name:"UTC",offset:"-000"},{name:"GMT",offset:"-000"},{name:"EST",offset:"-0500"},{name:"EDT",offset:"-0400"},{name:"CST",offset:"-0600"},{name:"CDT",offset:"-0500"},{name:"MST",offset:"-0700"},{name:"MDT",offset:"-0600"},{name:"PST",offset:"-0800"},{name:"PDT",offset:"-0700"}]};
\ No newline at end of file
diff --git a/kronolith/js/zh-TW.js b/kronolith/js/zh-TW.js
deleted file mode 100644
index 4761c6d4c..000000000
--- a/kronolith/js/zh-TW.js
+++ /dev/null
@@ -1 +0,0 @@
-Date.CultureInfo={name:"zh-TW",englishName:"Chinese (Taiwan)",nativeName:"䏿(å°ç£)",dayNames:["æææ¥","ææä¸","ææäº","ææä¸","ææå","ææäº","ææå
"],abbreviatedDayNames:["æææ¥","ææä¸","ææäº","ææä¸","ææå","ææäº","ææå
"],shortestDayNames:["æ¥","ä¸","äº","ä¸","å","äº","å
"],firstLetterDayNames:["æ¥","ä¸","äº","ä¸","å","äº","å
"],monthNames:["䏿","äºæ","䏿","åæ","äºæ","å
æ","䏿","å
«æ","乿","åæ","å䏿","åäºæ"],abbreviatedMonthNames:["䏿","äºæ","䏿","åæ","äºæ","å
æ","䏿","å
«æ","乿","åæ","å䏿","åäºæ"],amDesignator:"ä¸å",pmDesignator:"ä¸å",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"ymd",formatPatterns:{shortDate:"yyyy/M/d",longDate:"yyyy'å¹´'M'æ'd'æ¥'",shortTime:"tt hh:mm",longTime:"tt hh:mm:ss",fullDateTime:"yyyy'å¹´'M'æ'd'æ¥' tt hh:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"M'æ'd'æ¥'",yearMonth:"yyyy'å¹´'M'æ'"},regexPatterns:{jan:/^䏿/i,feb:/^äºæ/i,mar:/^䏿/i,apr:/^åæ/i,may:/^äºæ/i,jun:/^å
æ/i,jul:/^䏿/i,aug:/^å
«æ/i,sep:/^乿/i,oct:/^åæ/i,nov:/^å䏿/i,dec:/^åäºæ/i,sun:/^æææ¥/i,mon:/^ææä¸/i,tue:/^ææäº/i,wed:/^ææä¸/i,thu:/^ææå/i,fri:/^ææäº/i,sat:/^ææå
/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|aft(er)?|from|hence)/i,subtract:/^(\-|bef(ore)?|ago)/i,yesterday:/^yes(terday)?/i,today:/^t(od(ay)?)?/i,tomorrow:/^tom(orrow)?/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^mn|min(ute)?s?/i,hour:/^h(our)?s?/i,week:/^w(eek)?s?/i,month:/^m(onth)?s?/i,day:/^d(ay)?s?/i,year:/^y(ear)?s?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt|utc)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a(?!u|p)|p)/i},timezones:[{name:"UTC",offset:"-000"},{name:"GMT",offset:"-000"},{name:"EST",offset:"-0500"},{name:"EDT",offset:"-0400"},{name:"CST",offset:"-0600"},{name:"CDT",offset:"-0500"},{name:"MST",offset:"-0700"},{name:"MDT",offset:"-0600"},{name:"PST",offset:"-0800"},{name:"PDT",offset:"-0700"}]};
\ No newline at end of file
diff --git a/news/js/feed.js b/news/js/feed.js
deleted file mode 100644
index cf8307997..000000000
--- a/news/js/feed.js
+++ /dev/null
@@ -1,2 +0,0 @@
-
-function getFeed(){RedBox.loading();new Ajax.Updater('feed_content',document.feed_select.action,{onComplete:function(){RedBox.close();},parameters:{feed_id:$F('feed_id')},onFailure:function(){RedBox.close();alert('Error');},asynchronous:true});}
\ No newline at end of file
--
2.11.0