Index: lib/editor/tinymce/plugins/advimage/image.htm
===================================================================
RCS file: /cvsroot/moodle/moodle/lib/editor/tinymce/plugins/advimage/image.htm,v
retrieving revision 1.1
diff -u -r1.1 image.htm
--- lib/editor/tinymce/plugins/advimage/image.htm	16 May 2009 20:53:41 -0000	1.1
+++ lib/editor/tinymce/plugins/advimage/image.htm	19 Oct 2009 04:08:54 -0000
@@ -31,7 +31,7 @@
 								<td colspan="2"><table border="0" cellspacing="0" cellpadding="0">
 									<tr> 
 									  <td><input name="src" type="text" id="src" value="" class="mceFocus" onchange="ImageDialog.showPreviewImage(this.value);" /></td> 
-									  <td id="srcbrowsercontainer">&nbsp;</td>
+									  <td>&nbsp;</td>
 									</tr>
 								  </table></td>
 							</tr>
@@ -39,14 +39,14 @@
 								<td><label for="src_list">{#advimage_dlg.image_list}</label></td>
 								<td><select id="src_list" name="src_list" onchange="document.getElementById('src').value=this.options[this.selectedIndex].value;document.getElementById('alt').value=this.options[this.selectedIndex].text;document.getElementById('title').value=this.options[this.selectedIndex].text;ImageDialog.showPreviewImage(this.options[this.selectedIndex].value);"><option value=""></option></select></td>
 							</tr>
+                            <tr> 
+                                <td></td> 
+                                <td id="srcbrowsercontainer"></td> 
+                            </tr> 
 							<tr> 
 								<td class="column1"><label id="altlabel" for="alt">{#advimage_dlg.alt}</label></td> 
 								<td colspan="2"><input id="alt" name="alt" type="text" value="" /></td> 
 							</tr> 
-							<tr> 
-								<td class="column1"><label id="titlelabel" for="title">{#advimage_dlg.title}</label></td> 
-								<td colspan="2"><input id="title" name="title" type="text" value="" /></td> 
-							</tr>
 						</table>
 				</fieldset>
 
@@ -139,6 +139,15 @@
 			</div>
 
 			<div id="advanced_panel" class="panel">
+                <fieldset>
+                    <legend>{#advimage_dlg.general}</legend>
+					<table border="0" cellpadding="4" cellspacing="0" width="100%">
+                        <tr> 
+                            <td class="column1"><label id="titlelabel" for="title">{#advimage_dlg.title}</label></td> 
+                            <td colspan="2"><input id="title" name="title" type="text" value="" /></td> 
+                        </tr>
+                    </table>
+                </fieldset>
 				<fieldset>
 					<legend>{#advimage_dlg.swap_image}</legend>
 
Index: lib/editor/tinymce/utils/form_utils.js
===================================================================
RCS file: /cvsroot/moodle/moodle/lib/editor/tinymce/utils/form_utils.js,v
retrieving revision 1.1
diff -u -r1.1 form_utils.js
--- lib/editor/tinymce/utils/form_utils.js	16 May 2009 20:54:46 -0000	1.1
+++ lib/editor/tinymce/utils/form_utils.js	19 Oct 2009 04:08:54 -0000
@@ -48,9 +48,16 @@
 	if (!cb)
 		return "";
 
-	html = "";
-	html += '<a id="' + id + '_link" href="javascript:openBrowser(\'' + id + '\',\'' + target_form_element + '\', \'' + type + '\',\'' + option + '\');" onmousedown="return false;" class="browse">';
-	html += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '">&nbsp;</span></a>';
+    html = "";
+    if (id=='srcbrowser') {
+        // make line-height equal height to center text
+        html += '<a style="display:block;text-align:center;line-height:22px;height: 22px;width:92px" id="' + id + '_link" href="javascript:openBrowser(\'' + id + '\',\'' + target_form_element + '\', \'' + type + '\',\'' + option + '\');" onmousedown="return false;" class="updateButton">';
+        html += tinyMCEPopup.getLang('browse');
+        html += '</a>';
+    } else {
+        html += '<a id="' + id + '_link" href="javascript:openBrowser(\'' + id + '\',\'' + target_form_element + '\', \'' + type + '\',\'' + option + '\');" onmousedown="return false;" class="browse">';
+        html += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '">&nbsp;</span></a>';
+    }
 
 	return html;
 }
@@ -58,8 +65,9 @@
 function openBrowser(img_id, target_form_element, type, option) {
 	var img = document.getElementById(img_id);
 
-	if (img.className != "mceButtonDisabled")
-		tinyMCEPopup.openBrowser(target_form_element, type, option);
+    if (!img || img.className != "mceButtonDisabled") {
+        tinyMCEPopup.openBrowser(target_form_element, type, option);
+    }
 }
 
 function selectByValue(form_obj, field_name, value, add_custom, ignore_case) {
