Index: webfm.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webfm/js/webfm.js,v
retrieving revision 1.7
diff -u -r1.7 webfm.js
--- webfm.js	2 Apr 2007 01:48:56 -0000	1.7
+++ webfm.js	15 May 2007 11:03:00 -0000
@@ -106,10 +106,10 @@
 ** Functions
 */
 if (Drupal.jsEnabled) {
-  Webfm_addLoadEvent(webfmLayout);
-  Webfm_addLoadEvent(webfmAttachmentLayout);
-  Webfm_addLoadEvent(dragContainer);
-  Webfm_addLoadEvent(contextContainer);
+  $(window).load(webfmLayout);
+  $(window).load(webfmAttachmentLayout);
+  $(window).load(dragContainer);
+  $(window).load(contextContainer);
 }
 
 function webfmLayout() {
@@ -2128,22 +2128,6 @@
 }
 
 /**
- * Adds a function to the window onload event
- */
-function Webfm_addLoadEvent(func) {
-  var oldOnload = window.onload;
-  if (typeof window.onload != 'function') {
-    window.onload = func;
-  }
-  else {
-    window.onload = function() {
-      oldOnload();
-      func();
-    }
-  }
-}
-
-/**
  * Maintain compatibility with collapse.js
  * Since webfm fieldsets are built directly on the DOM, collapse.js onload
  * event will not convert them automatically - we must invoke manually here

