Index: omniture.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/omniture/omniture.module,v
retrieving revision 1.6.4.2
diff -p -u -p -r1.6.4.2 omniture.module
--- omniture.module	19 Aug 2009 09:23:16 -0000	1.6.4.2
+++ omniture.module	26 Aug 2009 14:16:43 -0000
@@ -103,7 +103,7 @@ function omniture_footer($main = 0) {
     $header .=  check_plain(variable_get("omniture_version", 'H.13.'));
     $header .= " Copyright 1997-2009 Omniture, Inc. More info available at http://www.omniture.com -->\n";
     $header .= "<script type=\"text/javascript\" language=\"JavaScript\" src=\"";
-    $header .=  check_plain(variable_get("omniture_js_file_location", 'http://www.example.com/js/s_code_remote_h.js'));
+    $header .=  check_plain(variable_get(($_SERVER['HTTPS'] ? 'omniture_js_file_secure_location' : 'omniture_js_file_location'), 'http://www.example.com/js/s_code_remote_h.js'));
     $header .= "\"></script>\n";
     $header .= "<script type=\"text/javascript\" language=\"JavaScript\"><!--\n";
 
@@ -112,7 +112,7 @@ function omniture_footer($main = 0) {
     $footer .= '<script language="JavaScript" type="text/javascript"><!--'."\n";
     $footer .= "if(navigator.appVersion.indexOf('MSIE')>=0)document.write(unescape('%3C')+'\!-'+'-')"."\n";
     $footer .= '//--></script><noscript><a href="http://www.omniture.com" title="Web Analytics"><img src="';
-    $footer .= check_plain(variable_get("omniture_image_file_location", 'http://examplecom.112.2O7.net/b/ss/examplecom/1/H.13--NS/0')) .'"'."\n";
+    $footer .= check_plain(variable_get(($_SERVER['HTTPS'] ? 'omniture_image_file_secure_location' : 'omniture_image_file_location'), 'http://examplecom.112.2O7.net/b/ss/examplecom/1/H.13--NS/0')) .'"'."\n";
     $footer .= 'height="1" width="1" border="0" alt="" /></a></noscript><!--/DO NOT REMOVE/-->'."\n";
     $footer .= '<!-- End SiteCatalyst code version: ';
     $footer .=  check_plain(variable_get("omniture_version", 'H.13.'));
@@ -158,12 +158,24 @@ function omniture_admin_settings() {
       '#default_value' => check_plain(variable_get("omniture_js_file_location", 'http://www.example.com/js/s_code_remote_h.js')),
   );
 
+  $form['general']['omniture_js_file_secure_location'] = array(
+      '#type' => 'textfield',
+      '#title' => t("Complete path to a secure SiteCatalyst Javascript file"),
+      '#default_value' => check_plain(variable_get("omniture_js_file_secure_location")),
+  );
+
   $form['general']['omniture_image_file_location'] = array(
       '#type' => 'textfield',
       '#title' => t("Complete path to SiteCatalyst Image file"),
       '#default_value' => check_plain(variable_get("omniture_image_file_location", 'http://examplecom.112.2O7.net/b/ss/examplecom/1/H.13--NS/0')),
   );
 
+  $form['general']['omniture_image_file_secure_location'] = array(
+      '#type' => 'textfield',
+      '#title' => t("Complete path to secure SiteCatalyst Image file"),
+      '#default_value' => check_plain(variable_get("omniture_image_file_secure_location")),
+  );
+
   $form['general']['omniture_version'] = array(
       '#type' => 'textfield',
       '#title' => t("SiteCatalyst version (used by omniture for debugging)"),
