Index: /CKEditor/branches/prototype/_source/core/config.js
===================================================================
--- /CKEditor/branches/prototype/_source/core/config.js	(revision 2668)
+++ /CKEditor/branches/prototype/_source/core/config.js	(revision 2669)
@@ -159,5 +159,5 @@
 	 * config.plugins = 'elementspath,toolbar,wysiwygarea';
 	 */
-	plugins : 'basicstyles,button,dialog,elementspath,horizontalrule,htmldataprocessor,keystrokes,removeformat,smiley,link,sourcearea,tab,toolbar,wysiwygarea,forms',
+	plugins : 'basicstyles,button,dialog,elementspath,horizontalrule,htmldataprocessor,keystrokes,removeformat,smiley,link,sourcearea,tab,toolbar,wysiwygarea,forms,image',
 
 	/**
@@ -225,4 +225,13 @@
 
 	/**
+	 * Show Upload tab in the Image dialog.
+	 * @type Boolean
+	 * @default true
+	 * @example
+	 * config.imageUpload : true;
+	 */
+	imageUpload : true,
+	
+	/**
 	 * List of smiley images displayed in the Smiley dialog.
 	 * @type Array
Index: /CKEditor/branches/prototype/_source/dialogs/image.js
===================================================================
--- /CKEditor/branches/prototype/_source/dialogs/image.js	(revision 2668)
+++ /CKEditor/branches/prototype/_source/dialogs/image.js	(revision 2669)
@@ -25,5 +25,67 @@
 	var imageDialog = ( dialogType == 'image' );
 
-	return {
+	var linkTab = 
+	{
+		id : 'Link',
+		label : editor.lang.linkTitle,
+		padding : 0,
+		elements : 
+		[
+			{
+				id : 'txtUrl',
+				type : 'text',
+				label : editor.lang.dlgImgURL,
+				style : 'width: 385px',
+				validate: function( data ) {
+					return true;
+				}
+			},
+			{
+				type : 'button',
+				id : 'browse',
+				style : 'float:right',
+				label : editor.lang.browseServer,
+			},
+			{
+				id : 'cmbTarget',
+				type : 'select',
+				label : editor.lang.linkTarget,
+				style : 'width : 90px',
+				items :
+				[
+					[ editor.lang.linkTargetNotSet , ''],
+					[ editor.lang.linkTargetNew , '_blank'],
+					[ editor.lang.linkTargetTop , '_top'],
+					[ editor.lang.linkTargetSelf , '_self'],
+					[ editor.lang.linkTargetParent , '_parent'],
+				]
+			},
+		]
+	};
+	
+	var uploadTab = 
+	{
+		id : 'Upload',
+		label : editor.lang.dlgImgUpload,
+		elements : 
+		[
+			{
+				type : 'file',
+				id : 'upload',
+				label : editor.lang.dlgImgBtnUpload,
+				action : uploadAction,
+				size : 38
+			},
+			{
+				type : 'fileButton',
+				id : 'uploadButton',
+				label : editor.lang.dlgImgBtnUpload,
+				'for' : [ 'Upload', 'upload' ]
+			}
+		]
+	};
+
+	dialogElements = 
+	{
 		title : ( imageDialog ) ? editor.lang.dlgImgTitle : editor.lang.imageButtonProp,
 		minWidth : 450,
@@ -217,24 +279,4 @@
 			},
 			{
-				id : 'Upload',
-				label : editor.lang.dlgImgUpload,
-				elements : 
-				[
-					{
-						type : 'file',
-						id : 'upload',
-						label : editor.lang.dlgImgBtnUpload,
-						action : uploadAction,
-						size : 38
-					},
-					{
-						type : 'fileButton',
-						id : 'uploadButton',
-						label : editor.lang.dlgImgBtnUpload,
-						'for' : [ 'Upload', 'upload' ]
-					}
-				]
-			},
-			{
 				id : 'advanced',
 				label : editor.lang.dlgDivAdvancedTab,
@@ -300,5 +342,19 @@
 			}
 		]
+	};
+
+	if ( imageDialog || editor.config.imageUpload )
+	{
+	var advancedTab = dialogElements.contents.pop();
+		if ( imageDialog )
+			dialogElements.contents.push( linkTab );		//Add the Link tab.
+
+		if ( editor.config.imageUpload )
+			dialogElements.contents.push( uploadTab );		//Add upload tab.
+
+		dialogElements.contents.push( advancedTab );
 	}
+
+	return dialogElements;
 };
 
Index: /CKEditor/branches/prototype/_source/lang/en.js
===================================================================
--- /CKEditor/branches/prototype/_source/lang/en.js	(revision 2668)
+++ /CKEditor/branches/prototype/_source/lang/en.js	(revision 2669)
@@ -89,4 +89,5 @@
 	url				: 'URL',
 	protocol		: 'Protocol',
+	image			: 'Image',
 	form			: 'Form',
 	checkbox		: 'Checkbox',
Index: /CKEditor/branches/prototype/_source/plugins/image/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/image/plugin.js	(revision 2669)
+++ /CKEditor/branches/prototype/_source/plugins/image/plugin.js	(revision 2669)
@@ -0,0 +1,44 @@
+/*
+ * CKEditor - The text editor for Internet - http://ckeditor.com
+ * Copyright (C) 2003-2008 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ */
+
+CKEDITOR.plugins.add( 'image',
+{
+	init : function( editor, pluginPath )
+	{
+		var image = CKEDITOR.plugins.image;
+
+		editor.addCommand( 'image', image);
+		editor.ui.addButton( 'Image',
+			{
+				label : editor.lang.image,
+				command : 'image'
+			});
+		CKEDITOR.dialog.add( 'image',		'_source/dialogs/image.js' );
+	}
+} );
+
+CKEDITOR.plugins.image =
+{
+	exec : function( editor )
+	{
+		editor.openDialog( 'image' );
+	}
+};
Index: /CKEditor/branches/prototype/_source/plugins/toolbar/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/toolbar/plugin.js	(revision 2668)
+++ /CKEditor/branches/prototype/_source/plugins/toolbar/plugin.js	(revision 2669)
@@ -222,5 +222,5 @@
 CKEDITOR.config.toolbar =
 [
-	[ 'Source', '-', 'Bold', 'Italic', 'Underline', 'Strike', '-', 'Subscript', 'Superscript', '-', 'SelectAll', 'RemoveFormat', '-', 'Link', 'Smiley', 'HorizontalRule', '-',
+	[ 'Source', '-', 'Bold', 'Italic', 'Underline', 'Strike', '-', 'Subscript', 'Superscript', '-', 'SelectAll', 'RemoveFormat', '-', 'Link', 'Smiley', 'Image', 'HorizontalRule', '-', 
 	'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ]
 ];
Index: /CKEditor/branches/prototype/_source/skins/default/toolbar.css
===================================================================
--- /CKEditor/branches/prototype/_source/skins/default/toolbar.css	(revision 2668)
+++ /CKEditor/branches/prototype/_source/skins/default/toolbar.css	(revision 2669)
@@ -187,4 +187,9 @@
 }
 
+.cke_skin_default a.cke_button_image .cke_icon
+{
+	background-position: 0 -576px;
+}
+
 .cke_skin_default a.cke_button_form .cke_icon
 {
