graybook 1.0.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. data/.gitignore +1 -0
  2. data/CHANGES.md +49 -0
  3. data/Manifest.txt +59 -0
  4. data/README.md +66 -0
  5. data/Rakefile +40 -0
  6. data/VERSION +1 -0
  7. data/VERSION.yml +4 -0
  8. data/VERSION_NAME +1 -0
  9. data/debug_graybook.rb +10 -0
  10. data/init.rb +1 -0
  11. data/lib/graybook/exporter/base.rb +16 -0
  12. data/lib/graybook/exporter/vcf.rb +45 -0
  13. data/lib/graybook/exporter/xml.rb +28 -0
  14. data/lib/graybook/importer/aol.rb +87 -0
  15. data/lib/graybook/importer/base.rb +39 -0
  16. data/lib/graybook/importer/csv.rb +74 -0
  17. data/lib/graybook/importer/freenet.rb +62 -0
  18. data/lib/graybook/importer/gmail.rb +84 -0
  19. data/lib/graybook/importer/gmx.rb +68 -0
  20. data/lib/graybook/importer/hotmail.rb +135 -0
  21. data/lib/graybook/importer/page_scraper.rb +86 -0
  22. data/lib/graybook/importer/web.de.rb +67 -0
  23. data/lib/graybook/importer/yahoo.rb +63 -0
  24. data/lib/graybook.rb +83 -0
  25. data/test/config/credentials.yml.example +9 -0
  26. data/test/fixtures/aol_application_page.html +566 -0
  27. data/test/fixtures/aol_bad_login_response_stage_3.html +565 -0
  28. data/test/fixtures/aol_contacts.html +102 -0
  29. data/test/fixtures/aol_login_response_stage_1.html +158 -0
  30. data/test/fixtures/aol_login_response_stage_2.html +559 -0
  31. data/test/fixtures/aol_login_response_stage_3.html +48 -0
  32. data/test/fixtures/aol_login_response_stage_4.html +404 -0
  33. data/test/fixtures/aol_login_response_stage_5.html +404 -0
  34. data/test/fixtures/aol_new_contacts.html +431 -0
  35. data/test/fixtures/gmail.csv +3 -0
  36. data/test/fixtures/gmail_bad_login_response_stage_2.html +560 -0
  37. data/test/fixtures/gmail_contacts.html +228 -0
  38. data/test/fixtures/gmail_login_response_stage_1.html +556 -0
  39. data/test/fixtures/gmail_login_response_stage_2.html +1 -0
  40. data/test/fixtures/gmail_login_response_stage_2a.html +1 -0
  41. data/test/fixtures/gmail_login_response_stage_3.html +249 -0
  42. data/test/fixtures/gmail_redirect_body.html +10 -0
  43. data/test/fixtures/hotmail_bad_login_response_stage_2.html +31 -0
  44. data/test/fixtures/hotmail_contacts.html +262 -0
  45. data/test/fixtures/hotmail_login_response_stage_1.html +31 -0
  46. data/test/fixtures/hotmail_login_response_stage_2.html +1 -0
  47. data/test/fixtures/hotmail_login_response_stage_3.html +519 -0
  48. data/test/fixtures/hotmail_scrape_first_page.html +77 -0
  49. data/test/fixtures/hotmail_scrape_response_stage_1.html +90 -0
  50. data/test/fixtures/hotmail_scrape_response_stage_2.html +77 -0
  51. data/test/fixtures/hotmail_scrape_response_stage_3.html +0 -0
  52. data/test/fixtures/yahoo_bad_login_response_stage_2.html +443 -0
  53. data/test/fixtures/yahoo_contacts.csv +3 -0
  54. data/test/fixtures/yahoo_contacts_not_logged_in.html +432 -0
  55. data/test/fixtures/yahoo_contacts_stage_1.html +399 -0
  56. data/test/fixtures/yahoo_login_response_stage_1.html +433 -0
  57. data/test/fixtures/yahoo_login_response_stage_2.html +16 -0
  58. data/test/fixtures/yahoo_no_user_response_stage_2.html +574 -0
  59. data/test/freenet_importer_test.rb +53 -0
  60. data/test/gmx_importer_test.rb +53 -0
  61. data/test/scripts/live_test.rb +25 -0
  62. data/test/test_graybook.rb +60 -0
  63. data/test/test_graybook_exporter_base.rb +16 -0
  64. data/test/test_graybook_exporter_vcf.rb +52 -0
  65. data/test/test_graybook_exporter_xml.rb +16 -0
  66. data/test/test_graybook_importer_aol.rb +108 -0
  67. data/test/test_graybook_importer_base.rb +24 -0
  68. data/test/test_graybook_importer_csv.rb +60 -0
  69. data/test/test_graybook_importer_gmail.rb +116 -0
  70. data/test/test_graybook_importer_hotmail.rb +165 -0
  71. data/test/test_graybook_importer_page_scraper.rb +51 -0
  72. data/test/test_graybook_importer_yahoo.rb +137 -0
  73. data/test/test_helper.rb +71 -0
  74. data/test/web.de_importer_test.rb +53 -0
  75. data/updater.rb +15 -0
  76. data/vendor/plugins/graybook/lib/autotest/discover.rb +3 -0
  77. data/vendor/plugins/graybook/lib/autotest/graybook.rb +27 -0
  78. metadata +185 -0
@@ -0,0 +1,404 @@
1
+ ---------------------------------
2
+
3
+
4
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" >
7
+ <head><link type="text/css" rel="stylesheet" href="http://o.aolcdn.com/cdn.webmail.aol.com/31361/aim/en-us/styles-lite-all.css" /><script type="text/javascript" src="http://o.aolcdn.com/cdn.webmail.aol.com/31361/js/external_compressed/axs.js"></script><script type="text/javascript" src="http://o.aolcdn.com/cdn.webmail.aol.com/31361/js/external_compressed/adsWrapper.js"></script><script type="text/javascript" src="DateFormat.js.aspx"></script><title>
8
+ AIM Mail - Today on AIM
9
+ </title></head>
10
+
11
+ <body onload="onloadFunctions();">
12
+
13
+
14
+
15
+ <div class="WSHat">
16
+ <div class="topHat">
17
+ <div class="salutation">
18
+ Hi, user@aim.com
19
+ </div>
20
+ <a href="http://webmail.aol.com/31361/aim/en-us/common/Logout.aspx?siteState=ver%3a2%7cac%3aWS%7cat%3aSNS%7cld%3awebmail.aol.com%7clc%3aen-us%7cuv%3aAIM%7crt%3aBASIC" class="signOutLink">
21
+ Sign Out
22
+ </a>
23
+
24
+ <ul class="hatLinks"><li><a target="_blank" href="http://pr.atwola.com/promoclk/100001269x1116143256x1077350428/aol?redir=http:%2F%2Fwww.aol.com">AOL</a></li><li><a target="_blank" href="http://my.aol.com">myAOL</a></li><li class="last"><a target="_blank" href="http://pr.atwola.com/promoclk/100001269x1115550333x1077361411/aol?redir=http:%2F%2Fwww.aol.com%2Fmksplash.adp">Make AOL My Home Page</a></li></ul>
25
+ </div>
26
+
27
+ <div class="logoArea">
28
+ <img src="http://o.aolcdn.com/cdn.webmail.aol.com/31361/aim/en-us/images/hat_logo_lite.gif" class="logo" alt="Mail logo">
29
+ <ul class="hatLinks adminLinks">
30
+
31
+ <li class="link"><a href='GeneralSettings.aspx' onclick="try{document.location='GeneralSettings.aspx?user=ULKLrUelQ2';return false;}catch(e){}">
32
+ Settings</a></li>
33
+ <li class="last"><a href="http://help.channels.aol.com/topic.adp?topicId=Product_WebSuiteBasic" onclick="aol.wsl.fOnHelpClick(event, 'http://webmail.aol.com/31361/aim/en-us/'); return false;">Help</a></li>
34
+ </ul>
35
+ </div>
36
+
37
+
38
+ <script>
39
+ var aol = {wsl: {
40
+ fResetSearch: function(sDefaultSearchQuery, sDropdownId) {
41
+ var oForm = document.forms.search;
42
+ oForm.searchQuery.value = sDefaultSearchQuery;
43
+ oForm.searchQuery.className = "wsInputDefault";
44
+ oForm[sDropdownId][0].selected = true;
45
+ oForm.searchSubmit.disabled = true;
46
+ }
47
+ ,fClearSearchTextbox: function() {
48
+ var oSearchForm = document.forms.search;
49
+ var oSearchTextbox = oSearchForm.searchEdit;
50
+ oSearchTextbox.value = "";
51
+ oSearchTextbox.className = "wsInput";
52
+ oSearchForm.searchSubmit.disabled = false;
53
+ }
54
+ ,fbSearchHandler: function(sWebAllSearchUrl, htExtraSearchOptions, sDefaultSearchQuery, sDropdownId) {
55
+ var oForm = document.forms.search;
56
+ var iSelectedOption = oForm[sDropdownId].selectedIndex;
57
+ var bUsingPopout = false;
58
+ if (oForm[sDropdownId].options[iSelectedOption].value == "webAll") {
59
+ window.open(sWebAllSearchUrl + oForm.searchQuery.value);
60
+ bUsingPopout = true;
61
+ }
62
+ if (!bUsingPopout && htExtraSearchOptions) {
63
+ for (var sExtraOptionValue in htExtraSearchOptions) {
64
+ if (oForm[sDropdownId].options[iSelectedOption].value == sExtraOptionValue) {
65
+ window.open(htExtraSearchOptions[sExtraOptionValue] + oForm.searchQuery.value);
66
+ bUsingPopout = true;
67
+ break;
68
+ }
69
+ }
70
+ }
71
+
72
+ if (bUsingPopout) {
73
+ aol.wsl.fResetSearch(sDefaultSearchQuery, sDropdownId);
74
+ }
75
+ return !bUsingPopout;
76
+ }
77
+ ,fOnHelpClick: function(evt, url) {
78
+
79
+
80
+ if(!window.event){
81
+ evt.stopPropagation();
82
+ }
83
+
84
+ if (evt.shiftKey){
85
+ window.open(url + "tools/Support.aspx");
86
+ }
87
+ else
88
+ {
89
+ window.open('http://help.channels.aol.com/topic.adp?topicId=Product_WebSuiteBasic');
90
+ }
91
+
92
+ }
93
+ }};
94
+ </script>
95
+
96
+ <div class="searchArea nobr">
97
+ <form name="searchForm" id=search method="POST"
98
+ onSubmit="return aol.wsl.fbSearchHandler('http://search.aol.com/aolcom/search?invocationType=wbmailcayman&query=', null, 'Search', 'searchIn');"
99
+ action="http://webmail.aol.com/31361/aim/en-us/Lite/MsgList.aspx">
100
+ <input type=hidden name="user" value="ULKLrUelQ2">
101
+ <input type=hidden name='folder' value='Inbox' />
102
+ <input type=hidden name="searchAction" value="search">
103
+ <input type="text" id=searchEdit name="searchQuery" maxlength="256" size=14 onFocus="aol.wsl.fClearSearchTextbox(this);" class="wsInputDefault" value="Search">
104
+ <label for=searchEdit><span class=SROnly>Search</span></label>
105
+ <select id=searchOptions name="searchIn">
106
+ <option value="alltext">Mail All</option>
107
+ <option value="subject">Mail Subject</option>
108
+ <option value="from">Mail Sender</option>
109
+ <option disabled=disabled>------------</option>
110
+
111
+ <option value="webAll">Web</option>
112
+ </select>
113
+ <input id=searchSubmit name="searchSubmit" type=submit disabled="true" value=Go title="Start searching"/>
114
+ </form>
115
+ </div>
116
+
117
+
118
+ <script>
119
+ var lowRes = false;
120
+ if (screen.width < 1024) {
121
+ lowRes = true;
122
+ }
123
+ </script>
124
+
125
+ <div id="myAd">
126
+ <script type="text/javascript">
127
+ var myAd = document.getElementById("myAd");
128
+ adSetTarget('_blank');
129
+ adSetType("I");
130
+ if (lowRes) {
131
+ htmlAdWH(93210713, 468, 60);
132
+ myAd.className="mlBannerSmall";
133
+ } else {
134
+ htmlAdWH(93225974, 728, 90);
135
+ myAd.className="mlBannerLarge";
136
+ }
137
+ </script>
138
+ </div>
139
+
140
+
141
+ </div>
142
+
143
+
144
+ <table cellpadding="0" cellspacing="0" border="0" width="100%" class="tblContainer">
145
+ <tr>
146
+
147
+ <td class="tblLeftNav">
148
+
149
+
150
+ <div class=ws_nav>
151
+ <div class=ws_nav_top>
152
+
153
+ <script>
154
+ var aolLeftNav = {
155
+ fSubmitToMsgList: function(sFolder) {
156
+ if (sFolder) {
157
+ document.forms.MsgList.folder.value = sFolder;
158
+ }
159
+ try{document.forms.MsgList.submit();}catch(ex){}
160
+ },
161
+ fAutoClick: function() {
162
+ if (this === undefined) {
163
+ return;
164
+ } else if (this.click) {
165
+ this.click();
166
+ } else if (this.onclick) {
167
+ this.onclick();
168
+ } else if (this.href) {
169
+ try{document.location = this.href;} catch(e) {}
170
+ }
171
+ }
172
+ };
173
+ </script>
174
+ <form>
175
+ <input type=button value="Check Mail" id="checkMailBtn" onclick="document.forms.MsgList.action='MsgList.aspx#leftNav'; aolLeftNav.fSubmitToMsgList();return false;" />
176
+ <input type=button value="Compose" id="writeMailBtn" onclick='document.forms.Compose.submit();return false;' />
177
+ <input type=hidden name='folder' value='Inbox' />
178
+ </form>
179
+ <div class=fieldsetHidden>
180
+ <form method=POST name=MsgList action='MsgList.aspx' enctype="multipart/form-data" accept-charset=UTF-8>
181
+ <input type=hidden name='user' value='ULKLrUelQ2' />
182
+ <input type=hidden name='folder' value='Inbox' />
183
+
184
+ <input type=hidden name='sort' value='received' />
185
+ <input type=hidden name='sortDir' value='descending' />
186
+ <input type=hidden name='showUserFolders' value='False' />
187
+ </form>
188
+
189
+ <form method=POST name=Compose action='Compose.aspx' enctype="multipart/form-data" accept-charset=UTF-8>
190
+ <input type=hidden name='user' value='ULKLrUelQ2' />
191
+ <input type=hidden name='folder' value='Inbox' />
192
+ <input type=hidden name='showUserFolders' value='False' />
193
+ </form>
194
+ </div>
195
+ </div>
196
+ <h1 id=leftNav class=SROnly>
197
+ <a name=leftNav>List of Folders</a>
198
+ </h1>
199
+ <div class=ws_main_pane>
200
+
201
+ <div id=sysFolders>
202
+ <div class='todayLink'><div class='navItem navItemCurrent'><div class='icon iconToday'></div><div class='navItemLabel'><a title='Today on AIM' href="Today.aspx">Today on AIM</a></div></div></div>
203
+
204
+ <div class="navItem "><div class="icon iconInbox"></div><div class="navItemLabel"><a href=# id=inboxLnk onclick="aolLeftNav.fSubmitToMsgList('Inbox');return false;" title="Inbox Folder View">Inbox<span id="InboxCount"></span></a></div></div>
205
+ <div class="navItem "><div class="icon iconFolder"></div><div class="navItemLabel"><a href=# onclick="aolLeftNav.fSubmitToMsgList('Drafts');return false;" title="Drafts Folder View">Drafts<span id="DraftsCount"></span></span></a></div></div>
206
+ <div class="navItem "><div class="icon iconFolder"></div><div class="navItemLabel"><a href=# id=sentFolderLnk onclick="aolLeftNav.fSubmitToMsgList('Sent');return false;" title="Sent Folder View" id="sentFolderLnk">Sent</a></div></div>
207
+ <div class="navItem "><div class="icon iconFolder"></div><div class="navItemLabel"><a href=# onclick="aolLeftNav.fSubmitToMsgList('Spam');return false;" title="Spam Folder View">Spam<span id="SpamCount"></span></a></div></div>
208
+ <div class="navItem "><div class="icon iconFolder"></div><div class="navItemLabel"><a href=# onclick="aolLeftNav.fSubmitToMsgList('Trash');return false;" title="Trash Folder View">Trash</a></div></div></div>
209
+
210
+ <div class='navItemContacts'><div class='navItem '><div class='icon iconContacts'></div><div class='navItemLabel'><a title='Contacts' href="ContactList.aspx?folder=Inbox&showUserFolders=False">Contacts</a></div></div></div>
211
+
212
+ <div class="navItem"><div class="twisty twistyClosed"><img src="http://o.aolcdn.com/cdn.webmail.aol.com/31361/aim/en-us/images/space.gif" width="10px" height="10px"/></div><div class="myFoldersLabel"><h2 class="plain"><a href="Today.aspx?showUserFolders=true" title="Show all of your folders">My Folders</a></h2></div><span class="ctrl wsLink"><a href="Folders.aspx" >Manage Folders</a></span></div>
213
+
214
+ </div></div>
215
+
216
+ </div>
217
+ <script>
218
+ axs.keyreg("alt+i",aolLeftNav.fAutoClick,"Go to Inbox Folder View",{obj:axs.id("inboxLnk")});
219
+ axs.keyreg("alt+m",aolLeftNav.fAutoClick,"Check Mail",{obj:axs.id("checkMailBtn")});
220
+ axs.keyreg("alt+n",aolLeftNav.fAutoClick,"Compose",{obj:axs.id("writeMailBtn")});
221
+ axs.keyreg("alt+o",aolLeftNav.fAutoClick,"Go to Sent Folder View",{obj:axs.id("sentFolderLnk")});
222
+ </script>
223
+ </div>
224
+ <div class=swAds>
225
+
226
+ <div class="swAd1">
227
+ <script type="text/javascript">
228
+ adSetType("I");
229
+ adSetTarget('_blank');
230
+ htmlAdWH(93237312, 160, 40);
231
+ </script>
232
+ </div>
233
+
234
+
235
+ <div class="swAd2">
236
+ <script type="text/javascript">
237
+ adSetType("I");
238
+ adSetTarget('_blank');
239
+ htmlAdWH(93221707, 160, 40);
240
+ </script>
241
+ </div>
242
+
243
+ </div>
244
+ </td>
245
+ <td class="tblMainArea" id="tblMainArea">
246
+
247
+
248
+
249
+ <div class=omniDiv>
250
+ <script type="text/javascript">
251
+ var s_account = "aolaimmail,aolsvc";
252
+ </script>
253
+
254
+ <!-- In Omniture H code, the file inclusion has to come first -->
255
+ <script type="text/javascript" src="http://o.aolcdn.com/cdn.webmail.aol.com/31361/js/external/OmniUniH.js"></script>
256
+
257
+ <script type="text/javascript">
258
+ s_265.channel = "aim.mail";
259
+ s_265.pageName = "Today";
260
+ s_265.pfxID = "wml";
261
+ s_265.prop1 = "WebSuite Basic";
262
+ s_265.prop2 = "Mail";
263
+ s_265.prop12 = document.URL;
264
+ var s_code = s_265.t();
265
+ if (s_code) document.write(s_code);
266
+ </script>
267
+ </div>
268
+
269
+
270
+
271
+ <style>td {background:#F4F2F0;}</style>
272
+
273
+ <div class=TodayOnAOL>
274
+
275
+ <h1 id=main class=SROnly><a name=main>Today on AIM</a></h1>
276
+ <div class="welcomeMessage">
277
+ <div class='TodayHeader'><span class='TodayHeaderTxt'>You're using AIM Mail Basic which is optimized for your computer and browser.</span></div>
278
+ <div class='TodayGreeting' id='aolTodayGreeting'></div>
279
+ <div class='TodayDate' id='aolLocalTime'></div>
280
+ <script>
281
+ try {
282
+ //Morning, afternoon, or evening?
283
+ var dtToday = new Date();
284
+ var iCurrentHour = dtToday.getHours();
285
+ var sPartOfDayGreeting;
286
+ if (iCurrentHour < 12) {
287
+ sPartOfDayGreeting = "Good Morning, user@aim.com";
288
+ } else if (iCurrentHour >= 12 && iCurrentHour < 18) {
289
+ sPartOfDayGreeting = "Good Afternoon, user@aim.com";
290
+ } else {
291
+ sPartOfDayGreeting = "Good Evening, user@aim.com";
292
+ }
293
+ //defined in DateFormat.js.aspx
294
+ var sLocalTime = DateFormat.FormatDate(dtToday, "EE, MMM dd, yyyy h:mm a");
295
+
296
+ var tnPartOfDayGreeting = document.createTextNode(sPartOfDayGreeting);
297
+ var eTodayGreeting = document.getElementById('aolTodayGreeting');
298
+ if (eTodayGreeting && tnPartOfDayGreeting) {
299
+ eTodayGreeting.appendChild(tnPartOfDayGreeting);
300
+ }
301
+
302
+ var tnLocalTime = document.createTextNode(sLocalTime);
303
+ var eLocalTime = document.getElementById('aolLocalTime');
304
+ if (eLocalTime && tnLocalTime) {
305
+ eLocalTime.appendChild(tnLocalTime);
306
+ }
307
+ } catch (ex) {
308
+ }
309
+ </script>
310
+
311
+ <br />
312
+ <div class="todayMsgCount">
313
+ <a href="http://webmail.aol.com/31361/aim/en-us/lite/msglist.aspx">
314
+
315
+ <span id="TodayMailCount"></span>
316
+
317
+ </a>
318
+ </div>
319
+ </div>
320
+
321
+ <iframe src="http://welcome.mail.aol.com/beta.adp?type=aim" title="Today on AIM" width=100% height=630px frameborder=0 border=0 marginwidth=0 marginheight=0 scrolling="no" align="top" allowTransparency="true"></iframe>
322
+
323
+ </div>
324
+
325
+
326
+
327
+
328
+ </td>
329
+
330
+ </tr>
331
+ <tr><td colspan=2>
332
+
333
+
334
+ <div class="footer_container">
335
+ <ul class="hatLinks"><li><a target="_blank" href="http://www.aol.com/aolnetwork/aolcom_terms.html">Terms of Service</a></li><li><a target="_blank" href="http://about.aol.com/aolnetwork/mem_commitments">Privacy Policy</a></li><li class=last><a target="_blank" href="http://www.aol.com/aolnetwork/trademarks.html">Trademarks</a></li></ul>
336
+ <div class="copyright">&copy; 2007 AOL LLC. All Rights Reserved</div>
337
+ <script>
338
+ axs.l10n.keycap_summary = "This table describes the shortcut keys implemented on this page.";
339
+ axs.l10n.keycap_caption = "Key combinations and the actions they invoke.";
340
+ axs.l10n.keycap_combo = "Key Combination";
341
+ axs.l10n.keycap_act = "Action";
342
+ axs.l10n.keycap_keyshow = "Show or hide the keyboard shortcuts table";
343
+ axs.l10n.keycap_linkshow = "Click this link to show or hide the keyboard shortcuts table.";
344
+ axs.keychart("alt+shift+i");
345
+
346
+ if ((typeof aol != 'undefined') && aol && aol.wsl && aol.wsl.fFocusPerUri) { aol.wsl.fFocusPerUri(); }
347
+ </script>
348
+ </div>
349
+ </td></tr>
350
+ </table>
351
+
352
+
353
+ <iframe id="CheckNewMessagesFrame" style="visibility:hidden;" src=''></iframe>
354
+ <script>
355
+ function updateCheckNewMessagesFrame() {
356
+ var CheckNewMessagesFrame = document.getElementById("CheckNewMessagesFrame");
357
+ if (CheckNewMessagesFrame) {
358
+ CheckNewMessagesFrame.src = 'http://webmail.aol.com/31361/aim/en-us/common/rpc/RPC.aspx?user=ULKLrUelQ2&automatic=true&dojo.transport=iframe&requests=[{"stateToken":"-1","action":"CheckNewMessages"}]]';
359
+ }
360
+ }
361
+ setInterval(updateCheckNewMessagesFrame, 120000);
362
+ </script>
363
+
364
+
365
+ <script>
366
+
367
+ function onloadFunctions() {
368
+ try {
369
+
370
+ setTodaySrc();
371
+
372
+ } catch (ex) {
373
+ }
374
+ }
375
+
376
+ function setMessageCounts(InboxCount, DraftsCount, SpamCount) {
377
+ var InboxCountSpan = document.getElementById("InboxCount");
378
+ if (InboxCountSpan != null && InboxCount != -1) {InboxCountSpan.innerHTML = "&nbsp;(" + InboxCount + ")";}
379
+ var DraftsCountSpan = document.getElementById("DraftsCount");
380
+ if (DraftsCountSpan != null && DraftsCount != -1) {DraftsCountSpan.innerHTML = "&nbsp;(" + DraftsCount + ")";}
381
+ var SpamCountSpan = document.getElementById("SpamCount");
382
+ if (SpamCountSpan != null && SpamCount != -1) {SpamCountSpan.innerHTML = "&nbsp;(" + SpamCount + ")";}
383
+
384
+
385
+ var TodayMailCountSpan = document.getElementById("TodayMailCount");
386
+ if (TodayMailCountSpan != null && InboxCount != -1) {
387
+ if (InboxCount == 0) {
388
+ TodayMailCountSpan.innerHTML = "0 New Messages";
389
+ } else if (InboxCount == 1) {
390
+ TodayMailCountSpan.innerHTML = "{0} New Message".replace("{0}",InboxCount);
391
+ } else {
392
+ TodayMailCountSpan.innerHTML = "{0} New Messages".replace("{0}",InboxCount);
393
+ }
394
+ }
395
+
396
+ }
397
+ </script>
398
+
399
+
400
+ <iframe style="visibility:hidden;" src='MailCounts.aspx'></iframe>
401
+
402
+ </body>
403
+ </html>
404
+ ---------------------------------