Index: wp-admin/admin-ajax.php
===================================================================
--- wp-admin/admin-ajax.php	(revision 4960)
+++ wp-admin/admin-ajax.php	(working copy)
@@ -201,15 +201,30 @@
 	die('1'); // We know meta exists; we also know it's unchanged (or DB error, in which case there are bigger problems).
 	break;
 case 'add-user' :
-	if ( !current_user_can('edit_users') )
-		die('-1');
+	if ( !current_user_can('edit_users') ) {
+		$x = new WP_Ajax_Response( array(
+			'what' => 'user',
+			'data' => new WP_Error( 'add_user', __( 'You are not allowed to add users to this blog.' ) )
+		) );
+		$x->send();
+		break;
+	}	
 	require_once(ABSPATH . WPINC . '/registration.php');
-	if ( !$user_id = add_user() )
-		die('0');
+	if ( !$user_id = add_user() ) {
+		$x = new WP_Ajax_Response( array(
+			'what' => 'user',
+			'data' => new WP_Error( 'add_user', __( 'Something strange happened.  Try refreshing the page.' ) )
+		) );
+		$x->send();
+		break;
+	}
 	elseif ( is_wp_error( $user_id ) ) {
-		foreach( $user_id->get_error_messages() as $message )
-			echo "<p>$message<p>";
-		exit;
+		$x = new WP_Ajax_Response( array(
+			'what' => 'user',
+			'data' => $user_id
+		) );
+		$x->send();
+		break;
 	}
 	$user_object = new WP_User( $user_id );
 	$x = new WP_Ajax_Response( array(
@@ -220,6 +235,7 @@
 	) );
 	$x->send();
 	break;
+	
 case 'autosave' : // The name of this action is hardcoded in edit_post()
 	$_POST['post_content'] = $_POST['content'];
 	$_POST['post_excerpt'] = $_POST['excerpt'];
Index: wp-admin/admin-header.php
===================================================================
--- wp-admin/admin-header.php	(revision 4960)
+++ wp-admin/admin-header.php	(working copy)
@@ -21,11 +21,6 @@
 <?php if ( ('rtl' == $wp_locale->text_direction) ) : ?>
 <link rel="stylesheet" href="<?php echo get_option('siteurl') ?>/wp-admin/rtl.css?version=<?php bloginfo('version'); ?>" type="text/css" />
 <?php endif; ?> 
-<script type="text/javascript">
-//<![CDATA[
-function addLoadEvent(func) {if ( typeof wpOnload!='function'){wpOnload=func;}else{ var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}}
-//]]>
-</script>
 <?php if ( ($parent_file != 'link-manager.php') && ($parent_file != 'options-general.php') ) : ?>
 <style type="text/css">* html { overflow-x: hidden; }</style>
 <?php endif;
Index: wp-admin/admin.php
===================================================================
--- wp-admin/admin.php	(revision 4960)
+++ wp-admin/admin.php	(working copy)
@@ -28,6 +28,7 @@
 
 wp_reset_vars(array('profile', 'redirect', 'redirect_url', 'a', 'popuptitle', 'popupurl', 'text', 'trackback', 'pingback'));
 
+wp_enqueue_script( 'jqwp' );
 wp_enqueue_script( 'fat' );
 
 $editing = false;
Index: wp-admin/index.php
===================================================================
--- wp-admin/index.php	(revision 4960)
+++ wp-admin/index.php	(working copy)
@@ -4,18 +4,15 @@
 function index_js() {
 ?>
 <script type="text/javascript">
-Event.observe( window, 'load', dashboard_init, false );
-function dashboard_init() {
-	var update1 = new Ajax.Updater( 'incominglinks', 'index-extra.php?jax=incominglinks' );
-	var update2 = new Ajax.Updater( 'devnews', 'index-extra.php?jax=devnews' );
-	var update3 = new Ajax.Updater( 'planetnews', 'index-extra.php?jax=planetnews'	);
-}
+jQuery( function() {
+	jQuery( '#incominglinks' ).load( 'index-extra.php?jax=incominglinks' );
+	jQuery( '#devnews' ).load( 'index-extra.php?jax=devnews' );
+	jQuery( '#planetnews' ).load( 'index-extra.php?jax=planetnews' );
+} );
 </script>
 <?php
 }
 add_action( 'admin_head', 'index_js' );
-wp_enqueue_script('prototype');
-wp_enqueue_script('interface');
 
 $title = __('Dashboard'); 
 $parent_file = 'index.php';
Index: wp-admin/users-js.php
===================================================================
--- wp-admin/users-js.php	(revision 0)
+++ wp-admin/users-js.php	(revision 0)
@@ -0,0 +1,65 @@
+<?php 
+	@require_once('../wp-config.php'); 
+	cache_javascript_headers(); 
+?>
+jQuery( function() {
+	jQuery( '#adduser' ).submit( function() { 
+		var $role = jQuery( '#role-' + jQuery( '#role :selected' ).attr( 'value' ) );
+		if( 0 == $role.length ) {
+			//html look and feel
+			return true; 
+		}
+		else {
+			//ajax look and feel
+			jQuery(this)
+			.ajaxSubmit( {
+				url:          'admin-ajax.php',
+				dataType:     'XML',
+				beforeSubmit: function( data ) {
+					for( var i = 0, top = data.length; i < top; i++ ) {
+						if( data[ i ].name == 'action' ) {
+							data[ i ].value = 'add-user';
+							break;
+						}
+					}
+					data.push( { name: 'cookie', value: encodeURIComponent(document.cookie) } );
+					return true;
+				},
+				success:      function( responseXML ) {
+					var	data = jQuery.wp.cdata( "wp_error", responseXML );
+					if( 0 == data.length ) {
+						data = jQuery.wp.cdata( "response_data", responseXML );
+						if( data[0] && ( '' != data[0] ) ) {
+							var $item = jQuery( data[0] ).appendTo( $role );
+							if( $item.prev().attr( 'class' ) != 'alternate' ) {
+								$item.attr( 'class', 'alternate' );
+							}
+							jQuery( '#adduser' ).resetForm();
+							jQuery( '#ajax-response' ).html( '' );
+						}
+						else {
+							if( isNaN( responseXML ) ) {
+								jQuery( '#ajax-response' )
+								.html( "<div class='error'><p>" + responseXML + "</p></div>" );
+							}
+							var r = parseInt( responseXML, 10 );
+							if( -1 == r ) {
+								jQuery( '#ajax-response' )
+								.html( "<div class='error'><p><?php _e("You don't have permission to do that."); ?></p></div>" );
+							} 
+							else if( 0 == r ) {
+								jQuery( '#ajax-response' )
+								.html( "<div class='error'><p><?php _e("Something strange happened.  Try refreshing the page."); ?></p></div>" );
+							}
+						}
+					}
+					else {
+						jQuery( '#ajax-response' )
+						.html( "<div class='error'><p>" + data.join( "</p><p>" ) + "</p></div>" );
+					}
+				}
+			} );
+			return false; 
+		}
+    } );
+} )
Index: wp-includes/js/jquery/wp-glue.js
===================================================================
--- wp-includes/js/jquery/wp-glue.js	(revision 0)
+++ wp-includes/js/jquery/wp-glue.js	(revision 0)
@@ -0,0 +1,22 @@
+/*
+this file glues jQuery to WordPress
+*/
+
+//jQuery can coexist with other $ libraries
+jQuery.noConflict();
+
+//the call of addLoadEvent( function ) and its semantics are the same as jQuery( function )
+addLoadEvent = jQuery;
+
+jQuery.wp = {
+	cdata: function( elementToFind, xml ) {
+		var data = [];
+		var re = /\<([\w-]+)(?:\w|\W)*?\>\<\!\[CDATA\[((?:\w|\W)*?)\]\]\>\<\/\1\s*\>/ig;
+		xml.replace( re, function( all, elementFound, content ) {
+			if( elementFound == elementToFind ) {
+				data.push( content );
+			}
+		} );
+		return data;
+	}
+};
Index: wp-includes/script-loader.php
===================================================================
--- wp-includes/script-loader.php	(revision 4960)
+++ wp-includes/script-loader.php	(working copy)
@@ -30,15 +30,16 @@
 		$this->add( 'scriptaculous-controls', '/wp-includes/js/scriptaculous/controls.js', array('scriptaculous-root'), '1.7.0');
 		$this->add( 'scriptaculous', '', array('scriptaculous-dragdrop', 'scriptaculous-slider', 'scriptaculous-controls'), '1.7.0');
 		$this->add( 'cropper', '/wp-includes/js/crop/cropper.js', array('scriptaculous-dragdrop'), '20070118');
-		$this->add( 'jquery', '/wp-includes/js/jquery/jquery.js', false, '1.1.1');
-		$this->add( 'interface', '/wp-includes/js/jquery/interface.js', array('jquery'), '1.1.1');
+        $this->add( 'jquery', '/wp-includes/js/jquery/jquery-latest.pack.js', false, '1.1.2'); 
+		$this->add( 'jqwp', '/wp-includes/js/jquery/wp-glue.js', array( 'jquery' ), '20070303' );
+		$this->add( 'jqform', '/wp-includes/js/jquery/jquery.form.js', array( 'jqwp' ), '0.9' );
 		if ( is_admin() ) {
 			$this->add( 'dbx-admin-key', '/wp-admin/dbx-admin-key-js.php', array('dbx'), '3651' );
 			$this->add( 'ajaxcat', '/wp-admin/cat-js.php', array('listman'), '20070118' );
 			$this->add( 'admin-categories', '/wp-admin/categories.js', array('listman'), '3684' );
 			$this->add( 'admin-custom-fields', '/wp-admin/custom-fields.js', array('listman'), '3733' );
 			$this->add( 'admin-comments', '/wp-admin/edit-comments.js', array('listman'), '3847' );
-			$this->add( 'admin-users', '/wp-admin/users.js', array('listman'), '4583' );
+			$this->add( 'admin-users', '/wp-admin/users-js.php', array('jqform'), '20070301' );
 			$this->add( 'xfn', '/wp-admin/xfn.js', false, '3517' );
 			$this->add( 'upload', '/wp-admin/upload-js.php', array('prototype'), '20070118' );
 		}
