--- flash_gallery.module.org	2009-08-18 20:50:56.000000000 -0500
+++ flash_gallery.module	2010-02-28 16:53:57.000000000 -0600
@@ -153,6 +153,7 @@ function theme_flash_gallery($galleries,
     if (variable_get('flash_transparent', 0)) {
       $content .= 'fo.addParam("wmode", "transparent");'."\n";
     }
+    $content .= variable_get('html_user_added', '');	
     $content .= 'fo.addVariable("preloaderColor", "0x'. variable_get('flash_loader_color', 'ff0000') .'");'."\n";
     $content .= 'fo.addVariable("xmlDataPath", "'. url('fgallery_xml/'. $tid) .'");'."\n";
     $content .= 'fo.write("flashcontent");'."\n";
@@ -216,6 +217,7 @@ function flash_gallery_xml_options($tid)
   $op[] = 'backgroundImagePath=""';
   $op[] = 'imagePath="'. flash_gallery_image_url() .'/"';
   $op[] = 'thumbPath="'. flash_gallery_image_url() .'/"';
+  $op[] = variable_get('xml_user_added', '');
   return implode(' ', $op);
 }
 
@@ -387,6 +389,18 @@ function flash_gallery_admin_form() {
     '#title' => t('build thumbnail library'),
     '#description' => t('Normally, you should do this only once, after installing the module. This builds a library of thumbnails based on pre-existing images which reside inside pre-exising galleries. You do not have to repeat this later on: images that are created after installing this module are handled automatically. '),
   );
+  $form['miscellaneous']['xml_user_added'] = array(
+    '#type' => 'textarea',
+    '#default_value' => variable_get('xml_user_added', ''),
+    '#title' => t('User-specific XML'),
+    '#description' => t('Enter any custom simpleviewer XML options to be applied to all galleries. IMPORTANT, this content will be inserted AS IS into the opening tag of each gallery\'s XML file. Incorrectly structured content can break your gallery. Do not process this content with a WYSIWYG editor. '),
+  );
+  $form['miscellaneous']['html_user_added'] = array(
+    '#type' => 'textarea',
+    '#default_value' => variable_get('html_user_added', ''),
+    '#title' => t('User-specific HTML'),
+    '#description' => t('Enter any custom lines of HTML to be included as part of the simpleviewer embed statement. IMPORTANT, this content will be inserted AS IS at end of the simpleviewr embed statment, incorrectly structured content can break your gallery. Do not process this content with a WYSIWYG editor. '),
+  );
   $form['#validate'][] = 'flash_gallery_admin_validate';
 
   return system_settings_form($form);
