Index: modules/overlay/overlay-parent.css
===================================================================
RCS file: /cvs/drupal/drupal/modules/overlay/overlay-parent.css,v
retrieving revision 1.15
diff -u -p -r1.15 overlay-parent.css
--- modules/overlay/overlay-parent.css	8 Jun 2010 05:16:29 -0000	1.15
+++ modules/overlay/overlay-parent.css	29 Aug 2010 16:25:07 -0000
@@ -36,6 +36,11 @@ html.overlay-open .displace-bottom {
   z-index: 600;
 }
 
+#disable-overlay {
+  position:absolute;
+  top:-9999px;	
+}
+
 /**
  * IE6 shows elements with position:fixed as position:static so replace
  * it with position:absolute;
Index: modules/overlay/overlay.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/overlay/overlay.module,v
retrieving revision 1.30
diff -u -p -r1.30 overlay.module
--- modules/overlay/overlay.module	11 Aug 2010 02:08:09 -0000	1.30
+++ modules/overlay/overlay.module	29 Aug 2010 16:25:08 -0000
@@ -30,6 +30,14 @@ function overlay_menu() {
     'access arguments' => array('access overlay'),
     'type' => MENU_CALLBACK,
   );
+
+  // @todo: maybe expose an overlay toggle rather than just a disable link
+  $items['overlay-disable'] = array(
+    'title' => 'Disable the overlay',
+    'page callback' => 'overlay_disable',
+    'access arguments' => array('access overlay'),
+    'type' => MENU_CALLBACK,
+  );
   return $items;
 }
 
@@ -257,10 +265,44 @@ function overlay_page_alter(&$page) {
   if (overlay_get_mode() == 'child') {
     // Add the overlay wrapper before the html wrapper.
     array_unshift($page['#theme_wrappers'], 'overlay');
+  } 
+  global $user;
+  // Only display link if the user has access to the overlay (mode was not already set or it has been set to true).
+  // @todo: if we only want to show this until a decision has been made change it to !isset($user->data['overlay'])
+  $use_overlay = !isset($user->data['overlay']) || $user->data['overlay'];
+  if ( user_access('access overlay') && $use_overlay ) {
+    // Insertthe disable link as far as possible to the top and wrap it in a <div> to keep it similar to "skip-link"
+    $disable_link_html = '<div id="disable-overlay">' . l( t('Disable administrative overlay'), 'overlay-disable', array( 'query' => drupal_get_destination() ) ) . '</div>';
+    $page['page_top']['disable_overview'] = array(
+      '#markup' => $disable_link_html,  
+      '#weight' => -99
+    );
   }
 }
 
 /**
+ * Menu callback disabling the overlay and redirecting back to the last page.
+ * If no page/destination was given, this redirects to the user edit page.
+ */
+function overlay_disable() {
+ global $user;
+ if ( $user->data['overlay'] || !isset($user->data['overlay']) )  {
+  if ( user_save($user, array('overlay' => FALSE) ) ) {
+   drupal_set_message( t('The overlay has been disabled.') );
+  }
+  else {
+   drupal_set_message( t('The overlay could not be disabled. Please try again.'), 'warning' );
+  }
+ }
+ if ($_GET['destination']) {
+  drupal_goto( drupal_get_destination() );
+ } 
+ else {
+  drupal_goto( 'user/' . $user->uid . '/edit' );
+ }
+}
+
+/**
  * Implements hook_block_list_alter().
  */
 function overlay_block_list_alter(&$blocks) {
