// ==UserScript==
// @name            Autohide Google Nav Bar
// @namespace       http://gdorn.nudio.net
// @description     Hides the google navigation bar, making more space on screen for the calendar.  Mousing over the left side brings the nav bar back.
// @include         http://www.google.com/calendar*
// ==/UserScript==
//  Based on code by takayama (http://espion.just-size.jp/archives/05/136155838.html)
// $Id: HideGoogleCalendarNav.user.js 727 2006-04-14 23:17:05Z takayama $

(function() {

   {
      var disp;
      function toggle() {
         disp = !disp;
         document.getElementById('nav').style.display = (disp) ? 'none' : '';

         with(unsafeWindow) {
            if(bg) return;
            var a=new Date();
            if(a.getTime()-Uj.getTime()>=po) setTimeout(vi(),po);
            Uj=a;
            if(Cc()) at();
         }
      }

      var elm = document.createElement('div');
     	elm.innerHTML = "<a href='#'>Toggle navbar</a>";
     // elm.appendChild(document.createTextNode(' <= toggle => '));
      elm.addEventListener("click",  toggle, false);

      with(elm.style) {
         position = 'absolute';
         top  = '0px';
         left = '200px';
      }

      document.body.appendChild(elm);

      toggle();
   }

})();