--- C:/Users/roettger.DI/AppData/Local/Temp/multiselect.modul-revBASE.svn001.tmp.module	Di 22. Mrz 11:47:04 2011
+++ O:/meininger/webpass/paro.webpass.di/sites/all/modules/contrib/multiselect/multiselect.module	Di 22. Mrz 11:46:17 2011
@@ -110,6 +110,11 @@
     '#value_key' => $value_key,
     '#element_validate' => array('options_field_widget_validate'),
     '#properties' => $properties,
+    '#attached' => array
+    (
+      'css' => array(drupal_get_path('module', 'multiselect') . '/multiselect.css'),
+      'js' => array(drupal_get_path('module', 'multiselect') . '/multiselect.js'),
+    ),
   );
 
   return $element;
@@ -157,11 +162,6 @@
  * return $widget = an array of html items and values for use in the final presentation of widget.
  */
 function _multiselect_build_widget_code($options, $items, $element, $required = FALSE) {
-  // Insert Javascript and CSS for this widget.
-  $path = drupal_get_path('module', 'multiselect');
-  drupal_add_js($path . '/multiselect.js');
-  drupal_add_css($path . '/multiselect.css');
-
   // For this specific widget, HTML should be filtered out and entities left unencoded.
   // See content_allowed_values / content_filter_xss / filter_xss.
   _multiselect_allowed_values_filter_html($options);
