Index: js/core.js
===================================================================
--- js/core.js	(revision 5059)
+++ js/core.js	(working copy)
@@ -25,6 +25,12 @@
     }
 }
 
+function cancelEventPropagation(e) {
+    if (!e) e = window.event;
+    e.cancelBubble = true;
+    if (e.stopPropagation) e.stopPropagation();
+}
+
 // quickElement(tagType, parentReference, textInChildNode, [, attribute, attributeValue ...]);
 function quickElement() {
     var obj = document.createElement(arguments[0]);
@@ -40,6 +46,11 @@
     return obj;
 }
 
+// "a" is reference to an object
+function removeChildren(a) {
+    while (a.hasChildNodes()) a.removeChild(a.lastChild);
+}
+
 // ----------------------------------------------------------------------------
 // Cross-browser xmlhttp object
 // from http://jibbering.com/2002/4/httprequest.html
Index: js/calendar.js
===================================================================
--- js/calendar.js	(revision 5059)
+++ js/calendar.js	(working copy)
@@ -2,25 +2,6 @@
 calendar.js - Calendar functions by Adrian Holovaty
 */
 
-function removeChildren(a) { // "a" is reference to an object
-    while (a.hasChildNodes()) a.removeChild(a.lastChild);
-}
-
-// quickElement(tagType, parentReference, textInChildNode, [, attribute, attributeValue ...]);
-function quickElement() {
-    var obj = document.createElement(arguments[0]);
-    if (arguments[2] != '' && arguments[2] != null) {
-        var textNode = document.createTextNode(arguments[2]);
-        obj.appendChild(textNode);
-    }
-    var len = arguments.length;
-    for (var i = 3; i < len; i += 2) {
-        obj.setAttribute(arguments[i], arguments[i+1]);
-    }
-    arguments[1].appendChild(obj);
-    return obj;
-}
-
 // CalendarNamespace -- Provides a collection of HTML calendar-related helper functions
 var CalendarNamespace = {
     monthsOfYear: gettext('January February March April May June July August September October November December').split(' '),
Index: js/admin/ordering.js
===================================================================
--- js/admin/ordering.js	(revision 5059)
+++ js/admin/ordering.js	(working copy)
@@ -119,19 +119,3 @@
     lis = temp_lis;
     draw();
 }
-
-function addEvent(elm, evType, fn, useCapture)
-// addEvent and removeEvent
-// cross-browser event handling for IE5+,  NS6 and Mozilla
-// By Scott Andrew
-{
-  if (elm.addEventListener){
-    elm.addEventListener(evType, fn, useCapture);
-    return true;
-  } else if (elm.attachEvent){
-    var r = elm.attachEvent("on"+evType, fn);
-    return r;
-  } else {
-    elm['on'+evType] = fn;
-  }
-}
Index: js/admin/DateTimeShortcuts.js
===================================================================
--- js/admin/DateTimeShortcuts.js	(revision 5059)
+++ js/admin/DateTimeShortcuts.js	(working copy)
@@ -75,7 +75,7 @@
         clock_box.className = 'clockbox module';
         clock_box.setAttribute('id', DateTimeShortcuts.clockDivName + num);
         document.body.appendChild(clock_box);
-        addEvent(clock_box, 'click', DateTimeShortcuts.cancelEventPropagation);
+        addEvent(clock_box, 'click', cancelEventPropagation);
 
         quickElement('h2', clock_box, gettext('Choose a time'));
         time_list = quickElement('ul', clock_box, '');
@@ -163,7 +163,7 @@
         cal_box.className = 'calendarbox module';
         cal_box.setAttribute('id', DateTimeShortcuts.calendarDivName1 + num);
         document.body.appendChild(cal_box);
-        addEvent(cal_box, 'click', DateTimeShortcuts.cancelEventPropagation);
+        addEvent(cal_box, 'click', cancelEventPropagation);
 
         // next-prev links
         var cal_nav = quickElement('div', cal_box, '');
@@ -230,11 +230,6 @@
        d.setDate(d.getDate() + offset)
        DateTimeShortcuts.calendarInputs[num].value = d.getISODate();
        DateTimeShortcuts.dismissCalendar(num);
-    },
-    cancelEventPropagation: function(e) {
-        if (!e) e = window.event;
-        e.cancelBubble = true;
-        if (e.stopPropagation) e.stopPropagation();
     }
 }
 
