Index: wp-includes/theme.php
===================================================================
--- wp-includes/theme.php	(revision 17721)
+++ wp-includes/theme.php	(working copy)
@@ -1430,6 +1430,17 @@
 
 	$url = get_theme_mod( 'header_image', $default );
 
+	// If random option is on, choose one from registered images
+	if ( 'random-image' == $url ) {
+		global $_wp_default_headers;
+		if ( !isset( $_wp_default_headers ) || empty( $_wp_default_headers ) )
+			return;
+		if ( 0 < count( $_wp_default_headers ) ) {
+			$random_image = array_rand( $_wp_default_headers );
+			$url = sprintf( $_wp_default_headers[$random_image]['url'], get_template_directory_uri(), get_stylesheet_directory_uri() );
+		}
+	}
+
 	if ( is_ssl() )
 		$url = str_replace( 'http://', 'https://', $url );
 	else
Index: wp-admin/custom-header.php
===================================================================
--- wp-admin/custom-header.php	(revision 17721)
+++ wp-admin/custom-header.php	(working copy)
@@ -199,11 +199,13 @@
 			}
 		}
 
-		if ( isset($_POST['default-header']) ) {
+		if ( isset( $_POST['default-header'] ) ) {
 			check_admin_referer( 'custom-header-options', '_wpnonce-custom-header-options' );
 			$this->process_default_headers();
-			if ( isset($this->default_headers[$_POST['default-header']]) )
-				set_theme_mod('header_image', esc_url($this->default_headers[$_POST['default-header']]['url']));
+			if ( 'random-image' == $_POST['default-header'] )
+				set_theme_mod( 'header_image', 'random-image' );
+			if ( isset( $this->default_headers[$_POST['default-header']] ) )
+				set_theme_mod( 'header_image', esc_url( $this->default_headers[$_POST['default-header']]['url'] ) );
 		}
 	}
 
@@ -240,10 +242,18 @@
 			$header_url = $header['url'];
 			$header_desc = $header['description'];
 			echo '<div class="default-header">';
-			echo '<label><input name="default-header" type="radio" value="' . esc_attr($header_key) . '" ' . checked($header_url, get_theme_mod( 'header_image' ), false) . ' />';
-			echo '<img src="' . $header_thumbnail . '" alt="' . esc_attr($header_desc) .'" title="' . esc_attr($header_desc) .'" /></label>';
+			echo '<label><input name="default-header" type="radio" value="' . esc_attr( $header_key ) . '" ' . checked( $header_url, get_theme_mod( 'header_image' ), false ) . ' />';
+			echo '<img src="' . $header_thumbnail . '" alt="' . esc_attr( $header_desc ) .'" title="' . esc_attr( $header_desc ) .'" /></label>';
 			echo '</div>';
 		}
+		// Show random image option
+		if ( 0 < count( $this->default_headers ) ) {
+			echo '<div class="default-header">';
+			echo '<label><input name="default-header" type="radio" value="random-image"' . checked( 'random-image', get_theme_mod( 'header_image' ), false ) . ' />';
+			echo __( '<strong>Random:</strong> Show a different image on each page.' );
+			echo '</label>';
+			echo '</div>';
+		}
 		echo '<div class="clear"></div></div>';
 	}
 
