diff -urpN openwysiwyg/library/scripts/openwysiwyg.js openwysiwyg_new/library/scripts/openwysiwyg.js
--- openwysiwyg/library/scripts/openwysiwyg.js	2008-09-08 00:51:01.000000000 +0700
+++ openwysiwyg_new/library/scripts/openwysiwyg.js	2008-09-09 13:54:09.695146300 +0700
@@ -23,7 +23,8 @@
  * with this library; if not, write to the Free Software Foundation, Inc., 59 
  * Temple Place, Suite 330, Boston, MA 02111-1307 USA  
  ********************************************************************/
-var WYSIWYG = {
+if (!$.browser.safari) {
+  var WYSIWYG = {
 
 	/**
 	 * Settings class, holds all customizeable properties
@@ -790,7 +791,7 @@ var WYSIWYG = {
 						}
 			  		}
 			  	}
-			  	editor += '<td>&nbsp;</td></tr></table>';
+			  	editor += '<td class="last">&nbsp;</td></tr></table>';
 			}
 		}
 		
@@ -2710,9 +2711,9 @@ var WYSIWYG_Table = {
 		WYSIWYG_Core.removeAttribute(node, "style");
 		WYSIWYG_Core.setAttribute(node, "style", style);
 	}
-}
-
+  }
 
+}
 /**
  * Get an element by it's identifier
  *
diff -urpN openwysiwyg/openwysiwyg.info openwysiwyg_new/openwysiwyg.info
--- openwysiwyg/openwysiwyg.info	2008-09-08 00:55:15.000000000 +0700
+++ openwysiwyg_new/openwysiwyg.info	2008-09-09 10:40:27.717629500 +0700
@@ -1,9 +1,7 @@
 ; $Id $
 name = OpenWYSIWYG
 description = "Enables OpenWYSIWYG editor. Free cross-browser WYSIWYG editor."
-version = "5.x-1.1"
 project = "openwysiwyg"
-package = "Easy Module""
 
 ; Information added by drupal.org packaging script on 2008-09-07
 version = "5.x-1.1"
diff -urpN openwysiwyg/openwysiwyg.module openwysiwyg_new/openwysiwyg.module
--- openwysiwyg/openwysiwyg.module	2008-09-08 00:51:01.000000000 +0700
+++ openwysiwyg_new/openwysiwyg.module	2008-09-12 23:27:48.609375000 +0700
@@ -226,8 +226,15 @@ function openwysiwyg_settings_visibility
   '#default_value' => variable_get('openwysiwyg_content_type_val', 'page'),
   '#description' => t("Specify the content type for this rule. Separate by comma."),
   );   
-  
-	return $form;
+
+  $form['openwysiwyg_visibility']['openwysiwyg_pages'] = array(
+    '#type' => 'textarea',
+    '#title' => t('Choose pages'),
+    '#description' => t('If you enter pages in here, and a textarea id above, these pages will be checked for the textarea, and the WYSIWYG editor will be initialized.  Enter your pages in the form <em>admin/build/block/add</em>, each on its own line.'),
+    '#default_value' => variable_get('openwysiwyg_pages', ''),
+  );
+	
+  return system_settings_form($form);
 }
 /**
  * Implementation of hook_elements() to show the openwysiwyg editor when a textarea is loaded
@@ -241,7 +248,24 @@ function openwysiwyg_elements(){
     );
   }
   return $type;
+}
 
+/**
+ * Checks the list of pages to check against the current path
+ */
+function _openwysiwyg_allowed_pages() {
+  $values = variable_get('openwysiwyg_pages', '');
+  
+  $path = drupal_get_path_alias($_GET['q']);
+  $regexp = '/^('. preg_replace(array('/(\r\n?|\n)/', '/\\\\\*/', '/(^|\|)\\\\<front\\\\>($|\|)/'), array('|', '.*', '\1'. preg_quote(variable_get('site_frontpage', 'node'), '/') .'\2'), preg_quote($values, '/')) .')$/';
+  
+  // Compare with the internal and path alias (if any).
+  $page_match = preg_match($regexp, $path);
+  if ($path != $_GET['q']) {
+    $page_match = $page_match || preg_match($regexp, $_GET['q']);
+  }
+
+  return $page_match;
 }
 
 /**
@@ -250,32 +274,73 @@ function openwysiwyg_elements(){
 function openwysiwyg_change_textarea($element) {
   static $openwysiwyg_ready = FALSE;
   
-  if (arg(0) == 'node' && is_numeric(arg(1)) && arg(2)=='edit') {
+  if (arg(0) == 'node' && is_numeric(arg(1)) && arg(2) == 'edit') {
     $node = node_load(arg(1));
     $form_type = $node->type;
   }
   if (arg(0) == 'node' && arg(1)=='add') {
-    $form_type =arg(2);
-  } 
-  if(_openwysiwyg_validate_element_id($element["#id"]) && _openwysiwyg_validate_content_type($form_type)) {
+    $form_type = arg(2);
+  }
+  
+  if(_openwysiwyg_validate_element_id($element["#id"]) && (_openwysiwyg_validate_content_type($form_type) || _openwysiwyg_allowed_pages())) {
     if (!$openwysiwyg_ready) {
       // get the path for the buttom images
-		  $buttonpath = base_path().drupal_get_path('module', 'openwysiwyg').'/library/images/'; 
-			$PopupsDir  = base_path().drupal_get_path('module', 'openwysiwyg').'/library/popups/';   
+      $buttonpath = base_path().drupal_get_path('module', 'openwysiwyg').'/library/images/'; 
+      $PopupsDir  = base_path().drupal_get_path('module', 'openwysiwyg').'/library/popups/';   
       // add the openwysiwyg js library
       drupal_add_js(drupal_get_path('module', 'openwysiwyg').'/library/scripts/openwysiwyg.js');
-      drupal_add_css(drupal_get_path('module', 'openwysiwyg') ."/library/styles/".variable_get("openwysiwyg_style","wysiwyg.css"));
+      drupal_add_css(drupal_get_path('module', 'openwysiwyg') ."/library/styles/". variable_get("openwysiwyg_style","wysiwyg.css"));
       
-      // optionally use IMCE as file browser (if module is available)
-    if(variable_get("openwysiwyg_imce", '1') == 1){
-      $imcepath = '/'.base_path().'imce/browse';
-    }
+      // define which buttons will appear on the toolbar and their order 
+      $buttons = (variable_get('openwysiwyg_toolbar_buttons',0) == 1) ? variable_get('openwysiwyg_toolbar_buttons_list','') : 'all';
+      
+      if ($buttons != 'all') {
+        $default_buttons = _openwysiwyg_buttonlist();
+        $buttons = explode(' ', $buttons);
+        $script = '';
+        
+        $buttons1 = '';
+        $buttons2 = '';
+        
+        //drupal_set_message(serialize($default_buttons));
+        
+        for ($count = 0; $count < count($buttons); $count++) {
+          $button = 'buttons'. (floor($count / 10) + 1);
+          if ($default_buttons[trim($buttons[$count])]) {
+            $$button .= '"'. $default_buttons[trim($buttons[$count])][0] . '" ';
+          }
+        }
+        
+        $buttons1 = str_replace(" ", ",", trim($buttons1));
+        $buttons2 = str_replace(" ", ",", trim($buttons2));
+
+        if ($buttons1) {
+          $script = "mysettings.Toolbar[0] = new Array(". $buttons1 .");\n";
+        }
+        else {
+          $script = "mysettings.Toolbar[0] = ''\n";
+        }
+        
+        if ($buttons2) {
+          $script .= "mysettings.Toolbar[1] = new Array(". $buttons2 .");\n";
+        }
+        else {
+          $script .= "mysettings.Toolbar[1] = ''\n";
+        }
+        
+      }
+      
+      // initialize openwysiwyg 
+      $element_id = $element['#id'];
     
-      drupal_add_js("var mysettings = new WYSIWYG.Settings();
+      
+      drupal_add_js("
+      if (!$.browser.safari) {
+        var mysettings = new WYSIWYG.Settings();
         mysettings.ImagesDir = \"$buttonpath\";
         mysettings.PopupsDir = \"$PopupsDir\";
-        mysettings.imageBrowsePath = \"$imcepath\";
-      ", inline);
+        mysettings.CSSFile = '". drupal_get_path('module', 'openwysiwyg') ."/library/styles/". variable_get("openwysiwyg_style","wysiwyg.css") ."';\n". $script ."WYSIWYG.attach('$element_id', mysettings);
+      }", inline);
       $openwysiwyg_ready = TRUE;
    } 
 		    
@@ -292,12 +357,25 @@ function openwysiwyg_change_textarea($el
       // only set width
       $element['#attributes'] = array('style' => "width: $editor_width;");
     }
-    
-    // define which buttons will appear on the toolbar and their order 
-    $buttons = (variable_get('openwysiwyg_toolbar_buttons',0) == 1)?variable_get('openwysiwyg_toolbar_buttons_list',''):'all';

     
     // add custom buttons to the editor
     $custombtn_arr = variable_get("openwysiwyg_custombuttons", NULL);
+    
     if(!empty($custombtn_arr)){
       foreach($custombtn_arr as $key => $val){
         // check if button is in buttonlist
@@ -311,13 +389,9 @@ function openwysiwyg_change_textarea($el
       $custombtn_decl = "buts = '$custombtn_buts';".PHP_EOL;
       $custombtn_decl .= $custombtn_dobut;
     }
-    
-    // initialize openwysiwyg 
-    $element_id = $element['#id'];
-    drupal_add_js("WYSIWYG.attach('$element_id', mysettings);", inline);
+
   }
-  // openwysiwyg_make(\"".$element['#id']."\", \"$buttons\");
-  // WYSIWYG.attach('textarea1');
+
   return $element;
 }
 
@@ -357,19 +431,27 @@ function _openwysiwyg_validate_element_i
   // when returned valid, the openwysiwyg editor will be shown
   $values = variable_get('openwysiwyg_textarea_id_val','edit-teaser,edit-body');
   $values_arr = split(',',$values);
+  
+  // someone might put a space between the comma and the next textarea id
+  foreach ($values_arr as $key => $value) {
+    $values_arr[$key] = trim($value);
+  }
+  
   // exclude some textfields that we need on the settings page from showing the editor
   array_push($values_arr,'edit-openwysiwyg-textarea-id-val');
   array_push($values_arr,'edit-openwysiwyg-visibility-path-val');  
   array_push($values_arr,'edit-openwysiwyg-toolbar-buttons-list');
-  if(variable_get('openwysiwyg_textarea_id',1) == 0){
+  
+  if(variable_get('openwysiwyg_textarea_id', 1) == 0){
     // don't show editor if id is found in values
-    if(!in_array($id,$values_arr)){
+    if(!in_array($id, $values_arr)){
       $valid = true; 
     }
   }else{
     // only show editor if id is found in values
-    if(in_array($id,$values_arr)){
-      $valid = true; 
+    
+    if(in_array($id, $values_arr)){
+      $valid = true;
     }
   }
   
@@ -384,6 +466,12 @@ function _openwysiwyg_validate_content_t
   // when returned valid, the openwysiwyg editor will be shown
   $values = variable_get('openwysiwyg_content_type_val','page');
   $values_arr = split(',',$values);
+  
+  // someone might put a space between the comma and the next content type
+  foreach ($values_arr as $key => $value) {
+    $values_arr[$key] = trim($value);
+  }
+
   // exclude some textfields that we need on the settings page from showing the editor
   array_push($values_arr,'edit-openwysiwyg-textarea-id-val');
   array_push($values_arr,'edit-openwysiwyg-visibility-path-val');  
@@ -456,7 +544,46 @@ function _openwysiwyg_settings_toolbar()
  * List of buttons to show for toolbar settings
  */
 function _openwysiwyg_buttonlist(){
-  return array("bold", "italics", "underline", "justify_left", "justify_center", "justify_right", "list_ordered", "list_unordered", "indent_right", "indent_left", "undo", "redo", "forecolor", "backcolor", "insert_hyperlink", "insert_picture", "insert_table", "remove_format", "view_source"
+  return array(
+	//key          name                   title                  image filename
+	"b"   => array('bold',                'Bold',                'bold.gif'),
+	"i"   => array('italic',              'Italic',              'italics.gif'),
+	"u"   => array('underline',           'Underline',           'underline.gif'),
+	"st"  => array('strikethrough',       'Strikethrough',       'strikethrough.gif'),
+	"se"  => array('seperator',           'Seperator',           'seperator.gif'),
+	"sub" => array('subscript',           'Subscript',           'subscript.gif'),
+	"sup" => array('superscript',         'Superscript',         'superscript.gif'),
+	"jl"  => array('justifyleft',         'Justify Left',        'justify_left.gif'),
+	"jc"  => array('justifycenter',       'Justify Center',      'justify_center.gif'),
+	"jr"  => array('justifyright',        'Justify Right',       'justify_right.gif'),
+	"jf"  => array('justifyfull',         'Justify Full',         'justify_justify.gif'),
+	"ul"  => array('unorderedlist',       'Insert Unordered List', 'list_unordered.gif'),
+	"ol"  => array('orderedlist',         'Insert Ordered List',   'list_ordered.gif'),
+	"od"  => array('outdent',             'Outdent',             'indent_left.gif'),
+	"in"  => array('indent',              'Indent',              'indent_right.gif'),
+	"cu"  => array('cut',                 'Cut',                 'cut.gif'),
+	"co"  => array('copy',                'Copy',                'copy.gif'),
+	"p"   => array('paste',               'Paste',               'paste.gif'), 
+	"fc"  => array('forecolor',           'ForeColor',           'forecolor.gif'),
+	"bc"  => array('backcolor',           'BackColor',           'backcolor.gif'), 
+	"un"  => array('undo',                'Undo',                'undo.gif'), 
+	"re"  => array('redo',                'Redo',                'redo.gif'), 
+	"it"  => array('inserttable',         'Insert Table',         'insert_table.gif'), 
+	"ii"  => array('insertimage',         'Insert Image',         'insert_picture.gif'),
+	"cl"  => array('createlink',          'Create Link',          'insert_hyperlink.gif'),
+	"vs"  => array('viewSource',          'View Source',          'view_source.gif'), 
+	"vt"  => array('viewText',            'View Text',            'view_text.gif'),
+	"he"  => array('help',                'Help',                'help.gif'), 
+	"fo"  => array('fonts',               'Fonts',               'select_font.gif'), 
+	"fs"  => array('fontsizes',           'Font Sizes',           'select_size.gif'),
+	"h"   => array('headings',            'Headings',            'select_heading.gif'),
+	"pre" => array('preview',             'Preview',             'preview.gif'),
+	"pr"  => array('print',               'Print',               'print.gif'),
+	"rem" => array('removeFormat',        'Remove Format',        'remove_format.gif'),
+	"del" => array('delete',              'Delete',              'delete.gif'),
+	"sa"  => array('save',                'Save',                'save.gif'), 
+	"ret" => array('return',              'Return',              'return.gif'),
+	"max" => array('maximize',            'Maximize',            'maximize.gif'),
   );
 }
 
