function formatDate()
   {
   // this is more foolproof than parsing the 'document.lastModified' string
   // which differs between browser releases and makes
      var modStr = new Date(Date.parse(win.document.lastModified));

   // translate month
      switch (modStr.getMonth())
      {
         case 0: var month = 'January';   break;
         case 1: var month = 'February';  break;
         case 2: var month = 'March';     break;
         case 3: var month = 'April';     break;
         case 4: var month = 'May';       break;
         case 5: var month = 'June';      break;
         case 6: var month = 'July';      break;
         case 7: var month = 'August';    break;
         case 8: var month = 'September'; break;
         case 9: var month = 'October';   break;
         case 10: var month = 'November'; break;
         case 11: var month = 'December';
      }

   // handle '1st', '21st', '31st', '2nd', '22nd', '3d', '23d', 'Nth'
      var test = modStr.getDate().toString();
      test = test.substring(test.length - 1);
      switch (test)
      {
         case '1': var suffix = 'st'; break;
         case '2': var suffix = 'nd'; break;
         case '3': var suffix = 'd';  break;
         default:  var suffix = 'th';
      }

      return month + ' ' + modStr.getDate() + '<sup>' + suffix + '</sup>, ' + modStr.getFullYear();
   }