diff -ur rubywebdialogs-0.0.1.tar.gz/rubywebdialogs/lib/rwd.lib.rb rubywebdialogs-0.0.2.tar.gz/rubywebdialogs/lib/rwd.lib.rb
--- rubywebdialogs-0.0.1.tar.gz/rubywebdialogs/lib/rwd.lib.rb	2004-04-18 14:20:31.000000000 +0200
+++ rubywebdialogs-0.0.2.tar.gz/rubywebdialogs/lib/rwd.lib.rb	2004-04-20 22:41:43.000000000 +0200
@@ -375,11 +375,12 @@
       res.concat "      <table #{AC} border=´#{Border}´ cellspacing=´3´ cellpadding=´0´>"
       res.concat "        <tr #{AC}>"
       tabs.each do |obj|
+        name	= obj.args["name"]
         caption	= obj.args["caption"]
-        if caption == tab
+        if name == tab
           res.concat "<td #{AC}><div class=´box´><tt><b>&nbsp;#{caption}&nbsp;</b></tt></div></td>"
         else
-          res.concat "<td #{AC}><div class=´box´><a href=´javascript:document.bodyform.rwd_action.value=\"rwd_tab_#{caption}\";document.bodyform.submit();´><tt>&nbsp;#{caption}&nbsp;</tt></a></div></td>"
+          res.concat "<td #{AC}><div class=´box´><a href=´javascript:document.bodyform.rwd_action.value=\"rwd_tab_#{name}\";document.bodyform.submit();´><tt>&nbsp;#{caption}&nbsp;</tt></a></div></td>"
         end
       end
       res.concat "        </tr>"
@@ -588,10 +589,10 @@
       tabs	= tabsobj.children.dup.delete_if{|obj| (not obj.kind_of?(OpenTag)) or (obj.subtype != "tab")}
 
       if tab.empty?
-        tab			= tabs[0].args["caption"]
+        tab			= tabs[0].args["name"]
       end
 
-      tabsobj.children.delete_if{|obj| (obj.kind_of?(OpenTag)) and (obj.subtype == "tab") and obj.args["caption"] != tab}
+      tabsobj.children.delete_if{|obj| (obj.kind_of?(OpenTag)) and (obj.subtype == "tab") and obj.args["name"] != tab}
     end
 
     if help
@@ -696,12 +697,14 @@
         @rwd_history.pop
         @rwd_action			= (@rwd_history[-1] or [nil, nil])[0]
         @rwd_window			= (@rwd_history[-1] or [nil, nil])[1]
+        @rwd_tab			= nil
         back				= true
       when "rwd_help"
         help				= true
       when "rwd_main"
-        @rwd_window			= "main"
         @rwd_action			= "main"
+        @rwd_window			= "main"
+        @rwd_tab			= nil
         @rwd_history			= []
       when "rwd_quit"
         done				= true
@@ -733,6 +736,8 @@
         rescue NameError
         end
 
+        tab		= @rwd_tab	unless @rwd_tab.nil?
+
 		# History stuff
 
         @rwd_history	= [["main", "main"]]		if @rwd_action == "main"
@@ -1077,7 +1082,7 @@
     </script>
   </head>
 
-  <body onload=´BodyGo()´ link=´#000000´ vlink=´#000000´ alink=´#000000´>
+  <body bgcolor=´white´ onload=´BodyGo()´ link=´#000000´ vlink=´#000000´ alink=´#000000´>
     <table align=´center´ border=´0´ cellspacing=´0´ cellpadding=´0´ width=´100%´ height=´100%´>
       <tr align=´center´ valign=´middle´>
         <td align=´center´>