Guest User

Untitled

a guest
Jul 1st, 2012
2,907
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 411.75 KB | None | 0 0
  1. COMPOSE PAGE TIMED OUT
  2. HTTP/1.0 302 Moved Temporarily
  3. Date: Sun, 01 Jul 2012 09:11:51 GMT
  4. Content-Type: text/html; charset=utf-8
  5. Expires: Tue, 24 Jan 2000 20:46:50 GMT
  6. Cache-Control: no-store, no-cache, must-revalidate, max-age=0
  7. Pragma: no-cache
  8. Content-Language: en-US
  9. Location: http://sz0116.wc.mail.comcast.net/zimbra/h/search?view=compose&view=compose&mesg=welcome&initial=true&app=
  10. Content-Length: 0
  11. Connection: keep-alive
  12.  
  13.  
  14. COMPOSE PAGE TIMED OUT
  15. HTTP/1.0 302 Moved Temporarily
  16. Date: Sun, 01 Jul 2012 09:13:43 GMT
  17. Content-Type: text/html; charset=utf-8
  18. Expires: Tue, 24 Jan 2000 20:46:50 GMT
  19. Cache-Control: no-store, no-cache, must-revalidate, max-age=0
  20. Pragma: no-cache
  21. Content-Language: en-US
  22. Location: http://sz0065.ev.mail.comcast.net/zimbra/h/search?view=compose&view=compose&mesg=welcome&initial=true&app=
  23. Content-Length: 0
  24.  
  25.  
  26. EMAIL RESPONSE TIMED OUT
  27. HTTP/1.0 200 OK
  28. Date: Sun, 01 Jul 2012 09:28:41 GMT
  29. Content-Type: text/javascript; charset=utf-8
  30. Content-Length: 210
  31. Connection: keep-alive
  32.  
  33. {"Header":{"context":{"session":{"id":"13303993","_content":"13303993"},"change":{"token":1625900},"_jsns":"urn:zimbra"}},"Body":{"SendMsgResponse":{"m":[{}],"_jsns":"urn:zimbraMail"}},"_jsns":"urn:zimbraSoap"}
  34. CONTACT FETCH TIMED OUT
  35. HTTP/1.0 302 Moved Temporarily
  36. Date: Sun, 01 Jul 2012 09:28:10 GMT
  37. Server: Apache
  38. Cache-Control: no-cache, must-revalidate
  39. Expires: Mon, 26 Jul 1997 05:00:00 GMT
  40. Location: http://www.comcast.net/errors/unauthorized
  41. Content-Length: 0
  42. Content-Type: text/html
  43. Connection: keep-alive
  44.  
  45.  
  46. COMPOSE PAGE TIMED OUT
  47. HTTP/1.0 302 Moved Temporarily
  48. Date: Sun, 01 Jul 2012 09:29:00 GMT
  49. Content-Type: text/html; charset=utf-8
  50. Expires: Tue, 24 Jan 2000 20:46:50 GMT
  51. Cache-Control: no-store, no-cache, must-revalidate, max-age=0
  52. Pragma: no-cache
  53. Content-Language: en-US
  54. Location: http://sz0152.wc.mail.comcast.net/zimbra/h/search?view=compose&view=compose&mesg=welcome&initial=true&app=
  55. Content-Length: 0
  56. Connection: keep-alive
  57.  
  58.  
  59. EMAIL RESPONSE TIMED OUT
  60. HTTP/1.0 200 OK
  61. Date: Sun, 01 Jul 2012 09:29:10 GMT
  62. Content-Type: text/html; charset=utf-8
  63. Expires: Tue, 24 Jan 2000 17:46:50 GMT
  64. Cache-Control: no-store, no-cache, must-revalidate, max-age=0
  65. Pragma: no-cache
  66. Content-Language: en-US
  67. Content-Encoding: gzip
  68.  
  69.  
  70. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  71. <html>
  72. <head>
  73. <!--
  74. launchZCS.jsp
  75. * ***** BEGIN LICENSE BLOCK *****
  76. * Zimbra Collaboration Suite Web Client
  77. * Copyright (C) 2007, 2008, 2009, 2010 Zimbra, Inc.
  78. *
  79. * The contents of this file are subject to the Zimbra Public License
  80. * Version 1.3 ("License"); you may not use this file except in
  81. * compliance with the License. You may obtain a copy of the License at
  82. * http://www.zimbra.com/license.
  83. *
  84. * Software distributed under the License is distributed on an "AS IS"
  85. * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
  86. * ***** END LICENSE BLOCK *****
  87. -->
  88.  
  89. <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
  90.  
  91. <title>XFINITY Connect</title>
  92. <link href="/zimbra/css/images,common,dwt,msgview,login,zm,spellcheck,wiki,skin.css?v=110527090709&debug=&skin=velodrome2&locale=en_US" rel="stylesheet" type="text/css" />
  93.  
  94. <link rel="SHORTCUT ICON" href="/zimbra/img/logo/favicon.ico">
  95. <script>
  96. appContextPath = "/zimbra";
  97. appCurrentSkin = "velodrome2";
  98. appExtension = ".zgz";
  99. appDevMode = false;
  100.  
  101. function purl(name, temp_string ) {
  102. name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  103. var regexS = "[\\?&]"+name+"=([^&#]*)";
  104. var regex = new RegExp( regexS );
  105. var results = regex.exec( temp_string );
  106. if( results == null )
  107. return "";
  108. else
  109. return results[1];
  110. }
  111.  
  112. function update_prefs_cookie ( old_cookie_name, new_cookie_name ) {
  113.  
  114. var results_new = document.cookie.match ( '(^|;) ?' + new_cookie_name + '=([^;]*)(;|$)' );
  115.  
  116. if (results_new) {
  117.  
  118. var results_old = document.cookie.match ( '(^|;) ?' + old_cookie_name + '=([^;]*)(;|$)' );
  119. if (results_old) {
  120. var old_cookie_temp = unescape(results_old[2]);
  121. old_cookie_temp = old_cookie_temp.replace(old_cookie_temp.match("&adt_user_guid=\"\""),"");
  122. old_cookie_temp = old_cookie_temp.replace(old_cookie_temp.match("&adt_user_guid="),"");
  123. old_cookie_temp = old_cookie_temp.replace(old_cookie_temp.match("&adt_zip=\"\""),"");
  124. old_cookie_temp = old_cookie_temp.replace(old_cookie_temp.match("&adt_zip=%22%22"),"");
  125. old_cookie_temp = old_cookie_temp.replace(old_cookie_temp.match("&adt_zip="),"");
  126. }
  127. else {
  128. var old_cookie_temp = "";
  129. }
  130.  
  131. var adt_zip = purl("zip", (unescape(results_new[2])));
  132. var ad_user_guid = purl("tid", (unescape(results_new[2])));
  133.  
  134. //Delete old cookie
  135. document.cookie = old_cookie_name + '=""; path=/; domain=.comcast.net; expires=Thu, 01-Jan-1970 00:00:01 GMT';
  136.  
  137. //Re-write new cookie
  138. if (old_cookie_temp) {
  139. old_cookie_temp += "&adt_zip=\"" + adt_zip + "\"&adt_user_guid=\"" + ad_user_guid + "\"";
  140. }
  141. else {
  142. old_cookie_temp = "adt_zip=\"" + adt_zip + "\"&adt_user_guid=\"" + ad_user_guid + "\"";
  143. }
  144.  
  145. var d = new Date();
  146. d.setDate(d.getDate()+1000)
  147. var cd = d.toGMTString();
  148.  
  149. document.cookie = old_cookie_name + '=' + old_cookie_temp+'; path=/; domain=.comcast.net; expires='+cd;
  150. var zip_array = new Array("zip", adt_zip);
  151. return zip_array;
  152. }
  153. else {
  154. return null;
  155. }
  156. }
  157. </script>
  158.  
  159. <script type="text/javascript">
  160. // <![CDATA[
  161. var f_ADTARGET_ZIP = (function() {
  162. var zip_matches = document.cookie.match(/adt_zip=\"(.*?)\"/);
  163. if(!zip_matches)
  164. zip_matches = document.cookie.match(/adt_zip=%22(.*?)%22/);
  165. if (!zip_matches)
  166. zip_matches = update_prefs_cookie("prefs", "MYPORTAL");
  167. var flag_matches = document.cookie.match(/adt_optout_flag=(true|false)/);
  168. if(flag_matches && flag_matches[1]=="true") {
  169. return "US:UNKNOWN";
  170. } else {
  171. if(zip_matches) {
  172. return "US:"+zip_matches[1];
  173. } else return "US:UNKNOWN";
  174. }
  175. })();
  176. document['f_ADTARGET_ZIP'] = f_ADTARGET_ZIP;
  177. // ]]>
  178. </script>
  179. <noscript>
  180. <meta http-equiv="Refresh" content="0;url=public/noscript.jsp" >
  181. </noscript>
  182. </head>
  183. <body>
  184.  
  185. <!--
  186. ***** BEGIN LICENSE BLOCK *****
  187. Zimbra Collaboration Suite Web Client
  188. Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Zimbra, Inc.
  189.  
  190. The contents of this file are subject to the Zimbra Public License
  191. Version 1.3 ("License"); you may not use this file except in
  192. compliance with the License. You may obtain a copy of the License at
  193. http://www.zimbra.com/license.
  194.  
  195. Software distributed under the License is distributed on an "AS IS"
  196. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
  197. ***** END LICENSE BLOCK *****
  198. -->
  199. <script type="text/javascript" src="/zimbra/res/I18nMsg,AjxMsg,ZMsg,ZmMsg,AjxKeys,ZmKeys,ZdMsg,AjxTemplateMsg.js.zgz?v=110527090709&skin=velodrome2"></script>
  200.  
  201.  
  202. <!-- image overlays and masks -->
  203. <script>
  204. if (!window.AjxImgData) AjxImgData = {};
  205. AjxImgData["ImgCalendarFolderOverlay"]={t:0,l:0,w:16,h:16,f:"@AppContextPath@/img/overlays/ImgCalendarFolderOverlay.png"};
  206. AjxImgData["ImgContactsFolderOverlay"]={t:0,l:0,w:14,h:16,f:"@AppContextPath@/img/overlays/ImgContactsFolderOverlay.png"};
  207. AjxImgData["ImgEmailedContactsOverlay"]={t:0,l:0,w:16,h:16,f:"@AppContextPath@/img/overlays/ImgEmailedContactsOverlay.png"};
  208. AjxImgData["ImgFolderOverlay"]={t:0,l:0,w:16,h:14,f:"@AppContextPath@/img/overlays/ImgFolderOverlay.png"};
  209. AjxImgData["ImgInboxOverlay"]={t:0,l:0,w:16,h:16,f:"@AppContextPath@/img/overlays/ImgInboxOverlay.png"};
  210. AjxImgData["ImgMailFolderOverlay"]={t:0,l:0,w:16,h:18,f:"@AppContextPath@/img/overlays/ImgMailFolderOverlay.png"};
  211. AjxImgData["ImgNotebookOverlay"]={t:0,l:0,w:16,h:15,f:"@AppContextPath@/img/overlays/ImgNotebookOverlay.png"};
  212. AjxImgData["ImgRSSOverlay"]={t:0,l:0,w:16,h:16,f:"@AppContextPath@/img/overlays/ImgRSSOverlay.png"};
  213. AjxImgData["ImgSectionOverlay"]={t:0,l:0,w:16,h:16,f:"@AppContextPath@/img/overlays/ImgSectionOverlay.png"};
  214. AjxImgData["ImgSentFolderOverlay"]={t:0,l:0,w:16,h:18,f:"@AppContextPath@/img/overlays/ImgSentFolderOverlay.png"};
  215. AjxImgData["ImgSharedCalendarFolderOverlay"]={t:0,l:0,w:16,h:15,f:"@AppContextPath@/img/overlays/ImgSharedCalendarFolderOverlay.png"};
  216. AjxImgData["ImgSharedContactsFolderOverlay"]={t:0,l:0,w:16,h:17,f:"@AppContextPath@/img/overlays/ImgSharedContactsFolderOverlay.png"};
  217. AjxImgData["ImgSharedMailFolderOverlay"]={t:0,l:0,w:16,h:17,f:"@AppContextPath@/img/overlays/ImgSharedMailFolderOverlay.png"};
  218. AjxImgData["ImgSharedNotebookOverlay"]={t:0,l:0,w:16,h:16,f:"@AppContextPath@/img/overlays/ImgSharedNotebookOverlay.png"};
  219. AjxImgData["ImgSharedSectionOverlay"]={t:0,l:0,w:16,h:16,f:"@AppContextPath@/img/overlays/ImgSharedSectionOverlay.png"};
  220. AjxImgData["ImgSharedTaskListOverlay"]={t:0,l:0,w:16,h:18,f:"@AppContextPath@/img/overlays/ImgSharedTaskListOverlay.png"};
  221. AjxImgData["ImgTagOverlay"]={t:0,l:0,w:16,h:16,f:"@AppContextPath@/img/overlays/ImgTagOverlay.png"};
  222. AjxImgData["ImgTaskListOverlay"]={t:0,l:0,w:16,h:16,f:"@AppContextPath@/img/overlays/ImgTaskListOverlay.png"};
  223. AjxImgData["ImgMailFolderMask"]={t:0,l:0,w:16,h:18,f:"@AppContextPath@/img/mail.gif"};
  224. AjxImgData["ImgRSSMask"]={t:-354,l:0,w:16,h:16,f:"@AppContextPath@/img/mail.gif"};
  225. AjxImgData["ImgSharedTaskListMask"]={t:0,l:0,w:16,h:18,f:"@AppContextPath@/img/tasks.gif"};
  226. AjxImgData["ImgTaskListMask"]={t:-114,l:0,w:16,h:16,f:"@AppContextPath@/img/tasks.gif"};
  227. AjxImgData["ImgSentFolderMask"]={t:0,l:0,w:16,h:18,f:"@AppContextPath@/img/startup.gif"};
  228. AjxImgData["ImgSharedMailFolderMask"]={t:-18,l:0,w:16,h:17,f:"@AppContextPath@/img/startup.gif"};
  229. AjxImgData["ImgInboxMask"]={t:-611,l:0,w:16,h:16,f:"@AppContextPath@/img/startup.gif"};
  230. AjxImgData["ImgTagMask"]={t:-1491,l:0,w:16,h:16,f:"@AppContextPath@/img/startup.gif"};
  231. AjxImgData["ImgFolderMask"]={t:-1731,l:0,w:16,h:14,f:"@AppContextPath@/img/startup.gif"};
  232. AjxImgData["ImgSharedContactsFolderMask"]={t:0,l:0,w:16,h:17,f:"@AppContextPath@/img/contacts.gif"};
  233. AjxImgData["ImgContactsFolderMask"]={t:-65,l:0,w:14,h:16,f:"@AppContextPath@/img/contacts.gif"};
  234. AjxImgData["ImgEmailedContactsMask"]={t:-113,l:0,w:16,h:16,f:"@AppContextPath@/img/contacts.gif"};
  235. AjxImgData["ImgNotebookMask"]={t:-80,l:0,w:16,h:16,f:"@AppContextPath@/img/notes.gif"};
  236. AjxImgData["ImgSectionMask"]={t:-128,l:0,w:16,h:16,f:"@AppContextPath@/img/notes.gif"};
  237. AjxImgData["ImgSharedNotebookMask"]={t:-160,l:0,w:16,h:16,f:"@AppContextPath@/img/notes.gif"};
  238. AjxImgData["ImgSharedSectionMask"]={t:-208,l:0,w:16,h:16,f:"@AppContextPath@/img/notes.gif"};
  239. AjxImgData["ImgCalendarFolderMask"]={t:-96,l:0,w:16,h:16,f:"@AppContextPath@/img/calendar.gif"};
  240. AjxImgData["ImgSharedCalendarFolderMask"]={t:-413,l:0,w:15,h:15,f:"@AppContextPath@/img/calendar.gif"};
  241. if (!window.AjxImgData) AjxImgData = {};
  242.  
  243. document.write("<DIV style='display:none'>");
  244. for (var id in AjxImgData) {
  245. var data = AjxImgData[id];
  246. if (data.f) data.f = data.f.replace(/@AppContextPath@/,appContextPath);
  247. document.write("<IMG id='",id,"' src='",data.d||data.f,"'>");
  248. }
  249. document.write("</DIV>");
  250. </script>
  251.  
  252. <!--
  253. --
  254. --
  255. --
  256. BEGIN SKIN
  257. --
  258. --
  259. --
  260. -->
  261.  
  262. <!--
  263. - #define GECKO true
  264. - #define WINDOWS true
  265. - #define FIREFOX_1_OR_HIGHER true
  266. - #define FIREFOX_1_5_OR_HIGHER true
  267. - #define MOZILLA true
  268. - #define FIREFOX true
  269. - #define MOZILLA_1_4_OR_HIGHER true
  270. - #define NAVIGATOR true
  271. - #define GECKO_1_8_OR_HIGHER true
  272. -->
  273.  
  274. <!--
  275. - File: zimbra/skins/velodrome2/skin.html
  276. -->
  277.  
  278. <!-- BEGIN SKIN HTML -->
  279. <script type="text/javascript" src="http://xfinity.comcast.net/js-api/compressed/xpbar.js?version=3&profile=xc&id=xcnavbar"></script>
  280. <script type="text/javascript">
  281. document.title=ZmMsg.zimbraTitle;
  282. </script>
  283. <div id='skin_outer'>
  284. <table cellspacing="0" cellpadding="0" width="100%" border="0" height="100%">
  285. <tr id='skin_R1' class='ImgSkin_Chrome_R1'>
  286. <td class='ImgSkin_Chrome_R1' colspan="3"></td>
  287. </tr>
  288. <tr>
  289. <td width="100%">
  290. <table id='skin_table_outer' class='skin_table fixed_table' cellspacing=0 cellpadding=0 border=0>
  291. <colgroup>
  292. <col id='skin_col_L'>
  293. <col id='skin_col_tree'>
  294. <col id='skin_col_sash'>
  295. <col id='skin_col_main'>
  296. <col id='skin_col_R'>
  297. </colgroup>
  298. <tr id='skin_R2'>
  299. <!-- xr-feat-111 -->
  300. <td>
  301. <div class='ImgSkin_Chrome_R2'></div>
  302. </td>
  303. <td class='ImgSkin_Chrome_R2' colspan=3>
  304. <table width=100% cellspacing=0 cellpadding=0>
  305. <tr>
  306. <td>
  307. <!-- <div class='ImgSkin_Chrome_Logo' onclick='skin.gotoApp(ZmApp.PORTAL);return false;' style='cursor:pointer;'></div> -->
  308. <div id='skin_container_quota' class='skin_container'><!-- quota --></div>
  309. </td>
  310. <td id='skin_td_search' valign='middle'>
  311. <div style='position:relative;' align='right'>
  312. <!-- search box -->
  313. <div id='skin_container_search' class='skin_container'></div>
  314. </div>
  315. </td>
  316. </tr>
  317. </table>
  318. </td>
  319. <td>
  320. <div class='ImgSkin_Chrome_R2'></div>
  321. </td>
  322. <!-- End xr-feat-111 -->
  323. </tr>
  324.  
  325. <!-- search builder -->
  326. <tr id='skin_tr_search_builder_toolbar'>
  327. <td>
  328. <div class='ImgSkin_Chrome_SB_Toolbar_L'></div>
  329. </td>
  330. <td id='skin_td_search_builder_toolbar' class='ImgSkin_Chrome_SB_Toolbar' colspan=3>
  331. <div id='skin_container_search_builder_toolbar' class='skin_container'>
  332. <!-- search builder toolbar -->
  333. </div>
  334. </td>
  335. <td>
  336. <div class='ImgSkin_Chrome_SB_Toolbar_R'></div>
  337. </td>
  338. </tr>
  339.  
  340. <tr id='skin_tr_search_builder'>
  341. <td class='ImgSkin_Chrome_SB_L'>
  342. <div></div>
  343. </td>
  344. <td id='skin_td_search_builder' class='ImgSkin_Chrome_SB' colspan=3>
  345. <div id='skin_container_search_builder' class='skin_container'>
  346. <!-- search builder -->
  347. </div>
  348. </td>
  349. <td class='ImgSkin_Chrome_SB_R'>
  350. <div></div>
  351. </td>
  352. </tr>
  353. <!-- end search builder -->
  354.  
  355. <tr id='skin_R3'>
  356. <td>
  357. <div class='ImgSkin_Chrome_R3_L'></div>
  358. </td>
  359. <td class='ImgSkin_Chrome_R3'>
  360. <div style='position:relative;width:100%;height:100%;'>
  361. <div id='Xskin_container_current_app' class='skin_container'>
  362. <table width='100%' height='100%'>
  363. <tr>
  364. <td id='skin_td_quota'>
  365. <!-- <div id='skin_container_quota' class='skin_container'>></div> -->
  366. </td>
  367. </tr>
  368. </table>
  369. </div>
  370. </div>
  371. </td>
  372. <td class='ImgSkin_Chrome_R3'>&nbsp;</td>
  373. <td class='ImgSkin_Chrome_R3' style='padding:0px;'>
  374. <table width='100%' cellspacing=0 cellpadding=0>
  375. <tr>
  376. <td id='skin_td_app_chooser'>
  377. <div id='skin_container_app_chooser' class='skin_container'></div>
  378. </td>
  379.  
  380. </tr>
  381. </table>
  382. </td>
  383. <td>
  384. <div class='ImgSkin_Chrome_R3_R'></div>
  385. </td>
  386. </tr>
  387.  
  388. <tr id='skin_tr_main'>
  389. <td id='skin_td_tree_outer' colspan=2>
  390. <table id='skin_tree_table' class='skin_table fullSize' cellspacing=0 cellpadding=0>
  391. <tr>
  392. <td height='100%' id='skin_td_tree'>
  393. <div id='skin_container_tree' class='skin_container'></div>
  394. </td>
  395. </tr>
  396. <tr id='skin_tr_tree_footer'>
  397. <td id='skin_td_tree_footer'>
  398. <div id='skin_container_tree_footer' class='skin_container'></div>
  399. </td>
  400. </tr>
  401. <tr>
  402. <td id='skin_td_tree_bottom_ad' height=150>
  403. <div id='portlet_text'>Loading...</div>
  404. </td>
  405. </tr>
  406. </table>
  407. </td>
  408. <td id='skin_td_tree_app_sash'>
  409. <div class='DwtHorizontalSash ImgHSash' style='height:100%;'>
  410. <div class='ImgHSash_thumb' style='position:relative;top:50%;'></div>
  411. </div>
  412. </td>
  413. <td id='skin_td_app_outer' colspan=2>
  414. <table id='skin_app_table' class='skin_table fullSize' cellspacing=0 cellpadding=0>
  415. <tr>
  416. <td id='skin_main_toolbar_container' class='skin_td_app_toolbar ImgSkin_Toolbar'>
  417. <div id='skin_container_app_top_toolbar' class='skin_container'></div>
  418. </td>
  419. </tr>
  420. <tr>
  421. <td id='skin_td_app'>
  422. <div id='skin_container_app_main' class='skin_container'></div>
  423. </td>
  424. </tr>
  425. </table>
  426. </td>
  427. <td></td>
  428. </tr>
  429.  
  430. <tr id='skin_tr_main_full' style='display:none'>
  431. <td id='skin_td_app_full_outer' class='full_height' colspan='5' height='100%'>
  432. <table id='skin_app_full_table' class='skin_table fullSize' cellspacing=0 cellpadding=0>
  433. <tr>
  434. <td id='skin_full_toolbar_container' class='skin_td_app_toolbar ImgSkin_Toolbar'>
  435. <!--div id='skin_container_app_top_toolbar' class='skin_container'></div-->
  436. </td>
  437. </tr>
  438. <tr>
  439. <td id='skin_td_app_full'>
  440. <div id='skin_container_app_main_full' class='skin_container' height='100%'>
  441. <!--Full screen app-->
  442. &nbsp;
  443. </div>
  444. </td>
  445. </tr>
  446. </table>
  447. </td>
  448. </tr>
  449. </table>
  450. </td>
  451. <td valign="top" id="comcast-adsrvc" style="display:none;overflow:hidden;">
  452. <div class='skin_container' id="skin_adsrvc" >
  453. <table cellpadding="0" cellspacing="0" border="0" height="100%" width="171">
  454. <tr height=100%>
  455. <td valign="middle" align="center" height=100%>
  456. <div id='comcast-adshowhide' class='AdSrvcLeftArrow'></div>
  457. </td>
  458. <td valign="middle" id="comcast-skyscrapperad" align="center">
  459. <!-- xr-feat-126 -->
  460. <div id='skin_container_sidebar_ad' style="height:95%;"></div>
  461.  
  462. <div class="adslug">
  463. <ul >
  464. <li class="comcast-adinfo" id="comcast-adinfo"><a href="#">Ad Info</a></li>
  465. <li class="comcast-adfeedback" id="comcast-adfeedback"><a href="#">Ad Feedback</a></li>
  466. </ul>
  467. </div>
  468. <!-- End xr-feat-126 -->
  469. </td>
  470. </tr>
  471. </table>
  472. </div>
  473. </td>
  474. </tr>
  475. <!-- xr-feat-173 -->
  476. <tr id='skin_R4'>
  477. <td id='skin_td_R4' class='ImgSkin_Chrome_R4' colspan="3">
  478. <div id='skin_footer' class='skin_container'>
  479. <table width=100% id='skin_table_R4' class='skin_table fullSize' cellspacing=0 cellpadding=0>
  480. <tr>
  481. <td style='text-align:left;padding-left:20px;' width=23%><table><tr><td>&copy; 2012 Comcast Cable Communications</td></tr></table></td>
  482. <td width=14%><table><tr><td><a target='blank' href='http://www.comcast.net/privacy/'>Privacy Statement</a></td></tr></table></td>
  483. <td width=14%><table><tr><td><a target='blank' href='http://www.comcast.net/terms/'>Terms of Service</a></td></tr></table></td>
  484. <td width=12%><table><tr><td><a target='blank' href='http://customer.comcast.com/Pages/HelpNFC.aspx?id=Comcast-Help-and-Support-home&CMP=ILCCOMCOMAL164104'>Contact Us</a></td></tr></table></td>
  485. <td width=15%><table><tr><td><a target='blank' href='http://www.comcast.com/shop/buyflow/default.ashx'>Add Comcast Services</a></td></tr></table></td>
  486. <td width=15%><table><tr><td><a target='blank' href='http://www.comcastsupport.com/forms/net/sccfeedback.asp'>Tell Us What You Think</a></td></tr></table></td>
  487. <td width=7% align=right><a target='blank' href='http://www.comcast.net/'><div class='ImgSkin_Customer_Logo_Bottom'></div></a></td>
  488. </tr>
  489. </table>
  490. </div>
  491. </td>
  492. </tr>
  493. <!-- End xr-feat-173 -->
  494. </table>
  495.  
  496. <!-- misc containers that haven't been placed yet -->
  497. <div id='skin_container_logo' class='skin_container offscreen'></div>
  498. <div id='skin_container_top_ad' class='skin_container offscreen'></div>
  499. <div id='skin_container_app_toolbar_sep' class='skin_container offscreen'></div>
  500. <div id='skin_container_tree_app_sash' class='skin_container offscreen'></div>
  501. <div id='skin_tr_status' class='offscreen'></div>
  502. <div id='skin_container_status' class='skin_container offscreen'></div>
  503. </div>
  504. <!-- END SKIN HTML -->
  505.  
  506. <!-- BEGIN SPLASH SCREEN -->
  507. <div id='skin_container_splash_screen' class='skin_container_splash_screen' align="center">
  508. <script language='javascript'>
  509. function showCompanyUrl() {
  510. window.open('<fmt:message key="splashScreenCompanyURL/>', '_blank');
  511. }
  512. </script>
  513. <!-- xr-feat-163 -->
  514. <div id='skin_container_splash_logo' class='skin_container_splash_logo'></div>
  515. <div class="skin_container_splash_loading"></div>
  516. <div class="skin_container_splash_footer">
  517. <div class="skin_container_splash_footer_logo"></div>
  518. <p>Copyright &copy; Comcast Interactive Media 2012. All rights reserved.</p>
  519. </div>
  520. <!-- End xr-feat-163 -->
  521. </div>
  522. <!-- END SPLASH SCREEN -->
  523.  
  524.  
  525. <!--
  526. --
  527. --
  528. --
  529. END SKIN
  530. --
  531. --
  532. --
  533. -->
  534. <div style='display:none;'>
  535.  
  536. <!-- bootstrap classes -->
  537.  
  538. <script type="text/javascript">
  539. AjxEnv=function(){};
  540. AjxEnv.DEFAULT_LOCALE=window.navigator.userLanguage||window.navigator.language||window.navigator.systemLanguage;
  541. AjxEnv._inited=false;
  542. AjxEnv.geckoDate;
  543. AjxEnv.mozVersion;
  544. AjxEnv.webKitVersion;
  545. AjxEnv.isMac;
  546. AjxEnv.isWindows;
  547. AjxEnv.isLinux;
  548. AjxEnv.isNav;
  549. AjxEnv.isIE;
  550. AjxEnv.isNav4;
  551. AjxEnv.trueNs;
  552. AjxEnv.isNav6;
  553. AjxEnv.isNav6up;
  554. AjxEnv.isNav7;
  555. AjxEnv.isIE3;
  556. AjxEnv.isIE4;
  557. AjxEnv.isIE4up;
  558. AjxEnv.isIE5;
  559. AjxEnv.isIE5_5;
  560. AjxEnv.isIE5up;
  561. AjxEnv.isIE5_5up;
  562. AjxEnv.isIE6;
  563. AjxEnv.isIE6up;
  564. AjxEnv.isIE7;
  565. AjxEnv.isIE7up;
  566. AjxEnv.isIE8;
  567. AjxEnv.isIE8up;
  568. AjxEnv.isNormalResolution;
  569. AjxEnv.ieScaleFactor;
  570. AjxEnv.isFirefox;
  571. AjxEnv.isFirefox1up;
  572. AjxEnv.isFirefox1_5up;
  573. AjxEnv.isFirefox3up;
  574. AjxEnv.isFirefox3_6up;
  575. AjxEnv.isMozilla;
  576. AjxEnv.isMozilla1_4up;
  577. AjxEnv.isSafari;
  578. AjxEnv.isSafari2;
  579. AjxEnv.isSafari3;
  580. AjxEnv.isSafari3up;
  581. AjxEnv.isSafari4;
  582. AjxEnv.isSafari4up;
  583. AjxEnv.isSafari5up;
  584. AjxEnv.isCamino;
  585. AjxEnv.isChrome;
  586. AjxEnv.isGeckoBased;
  587. AjxEnv.isWebKitBased;
  588. AjxEnv.isOpera;
  589. AjxEnv.useTransparentPNGs;
  590. AjxEnv.isDesktop;
  591. AjxEnv.isDesktop2up;
  592. AjxEnv.is800x600orLower;
  593. AjxEnv.is1024x768orLower;
  594. AjxEnv.reset=function(){
  595. AjxEnv.geckoDate=0;
  596. AjxEnv.mozVersion=-1;
  597. AjxEnv.webKitVersion=-1;
  598. AjxEnv.isMac=false;
  599. AjxEnv.isWindows=false;
  600. AjxEnv.isLinux=false;
  601. AjxEnv.isNav=false;
  602. AjxEnv.isIE=false;
  603. AjxEnv.isNav4=false;
  604. AjxEnv.trueNs=true;
  605. AjxEnv.isNav6=false;
  606. AjxEnv.isNav6up=false;
  607. AjxEnv.isNav7=false;
  608. AjxEnv.isIE3=false;
  609. AjxEnv.isIE4=false;
  610. AjxEnv.isIE4up=false;
  611. AjxEnv.isIE5=false;
  612. AjxEnv.isIE5_5=false;
  613. AjxEnv.isIE5up=false;
  614. AjxEnv.isIE5_5up=false;
  615. AjxEnv.isIE6=false;
  616. AjxEnv.isIE6up=false;
  617. AjxEnv.isIE7=false;
  618. AjxEnv.isIE7up=false;
  619. AjxEnv.isIE8=false;
  620. AjxEnv.isIE8up=false;
  621. AjxEnv.isNormalResolution=false;
  622. AjxEnv.ieScaleFactor=1;
  623. AjxEnv.isFirefox=false;
  624. AjxEnv.isFirefox1up=false;
  625. AjxEnv.isFirefox1_5up=false;
  626. AjxEnv.isFirefox3up=false;
  627. AjxEnv.isFirefox3_6up=false;
  628. AjxEnv.isMozilla=false;
  629. AjxEnv.isMozilla1_4up=false;
  630. AjxEnv.isSafari=false;
  631. AjxEnv.isSafari2=false;
  632. AjxEnv.isSafari3=false;
  633. AjxEnv.isSafari4=false;
  634. AjxEnv.isSafari3up=false;
  635. AjxEnv.isSafari4up=false;
  636. AjxEnv.isSafari5up=false;
  637. AjxEnv.isCamino=false;
  638. AjxEnv.isChrome=false;
  639. AjxEnv.isGeckoBased=false;
  640. AjxEnv.isWebKitBased=false;
  641. AjxEnv.isOpera=false;
  642. AjxEnv.useTransparentPNGs=false;
  643. AjxEnv.isDesktop=false;
  644. AjxEnv.isDesktop2up=false;
  645. AjxEnv.is800x600orLower=screen&&(screen.width<=800&&screen.height<=600);
  646. AjxEnv.is1024x768orLower=screen&&(screen.width<=1024&&screen.height<=768)
  647. };
  648. AjxEnv.parseUA=function(){
  649. AjxEnv.reset();
  650. var n=navigator.userAgent.toLowerCase();
  651. var t=n.split(" ");
  652. var c=false;
  653. var o=false;
  654. var r=false;
  655. var e=false;
  656. var a=false;
  657. if(t!=null){
  658. var u;
  659. var l=-1;
  660. if((l=t[0].search(/^\s*mozilla\//))!=-1){
  661. e=true;
  662. AjxEnv.browserVersion=parseFloat(t[0].substring(l+8));
  663. AjxEnv.isNav=true
  664. }
  665. var s;
  666. for(var h=0;
  667. h<t.length;
  668. ++h){
  669. s=t[h];
  670. if(s.indexOf("compatible")!=-1){
  671. a=true;
  672. AjxEnv.isNav=false
  673. }else{
  674. if((s.indexOf("opera"))!=-1){
  675. AjxEnv.isOpera=true;
  676. AjxEnv.isNav=false;
  677. u=parseFloat(t[h+1])
  678. }else{
  679. if((s.indexOf("spoofer"))!=-1){
  680. c=true;
  681. AjxEnv.isNav=false
  682. }else{
  683. if((s.indexOf("webtv"))!=-1){
  684. o=true;
  685. AjxEnv.isNav=false
  686. }else{
  687. if((s.indexOf("hotjava"))!=-1){
  688. r=true;
  689. AjxEnv.isNav=false
  690. }else{
  691. if((l=s.indexOf("msie"))!=-1){
  692. AjxEnv.isIE=true;
  693. u=parseFloat(t[h+1])
  694. }else{
  695. if((l=s.indexOf("gecko/"))!=-1){
  696. AjxEnv.isGeckoBased=true;
  697. AjxEnv.geckoDate=parseFloat(s.substr(l+6))
  698. }else{
  699. if((l=s.indexOf("applewebkit/"))!=-1){
  700. AjxEnv.isWebKitBased=true;
  701. AjxEnv.webKitVersion=parseFloat(s.substr(l+12))
  702. }else{
  703. if((l=s.indexOf("rv:"))!=-1){
  704. AjxEnv.mozVersion=parseFloat(s.substr(l+3));
  705. u=AjxEnv.mozVersion
  706. }else{
  707. if((l=s.indexOf("firefox/"))!=-1){
  708. AjxEnv.isFirefox=true;
  709. u=parseFloat(s.substr(l+8))
  710. }else{
  711. if((l=s.indexOf("prism"))!=-1){
  712. AjxEnv.isPrism=true
  713. }else{
  714. if((l=s.indexOf("camino/"))!=-1){
  715. AjxEnv.isCamino=true;
  716. u=parseFloat(s.substr(l+7))
  717. }else{
  718. if((l=s.indexOf("netscape6/"))!=-1){
  719. AjxEnv.trueNs=true;
  720. u=parseFloat(s.substr(l+10))
  721. }else{
  722. if((l=s.indexOf("netscape/"))!=-1){
  723. AjxEnv.trueNs=true;
  724. u=parseFloat(s.substr(l+9))
  725. }else{
  726. if((l=s.indexOf("safari/"))!=-1){
  727. AjxEnv.isSafari=true
  728. }else{
  729. if((l=s.indexOf("chrome/"))!=-1){
  730. AjxEnv.isChrome=true;
  731. u=parseFloat(s.substr(l+7))
  732. }else{
  733. if(l=s.indexOf("version/")!=-1){
  734. u=parseFloat(s.substr(l+7))
  735. }else{
  736. if(s.indexOf("windows")!=-1){
  737. AjxEnv.isWindows=true
  738. }else{
  739. if((s.indexOf("macintosh")!=-1)||(s.indexOf("mac_")!=-1)){
  740. AjxEnv.isMac=true
  741. }else{
  742. if(s.indexOf("linux")!=-1){
  743. AjxEnv.isLinux=true
  744. }else{
  745. if((l=s.indexOf("zdesktop/"))!=-1){
  746. AjxEnv.isDesktop=true;
  747. u=parseFloat(s.substr(l+9))
  748. }}}}}}}}}}}}}}}}}}}}}}
  749. AjxEnv.browserVersion=u;
  750. AjxEnv.isNav=(e&&!c&&!a&&!AjxEnv.isOpera&&!o&&!r&&!AjxEnv.isSafari);
  751. AjxEnv.isIE=(AjxEnv.isIE&&!AjxEnv.isOpera);
  752. AjxEnv.isNav4=(AjxEnv.isNav&&(u==4)&&(!AjxEnv.isIE));
  753. AjxEnv.isNav6=(AjxEnv.isNav&&AjxEnv.trueNs&&(u>=6&&u<7));
  754. AjxEnv.isNav6up=(AjxEnv.isNav&&AjxEnv.trueNs&&(u>=6));
  755. AjxEnv.isNav7=(AjxEnv.isNav&&AjxEnv.trueNs&&(u>=7&&u<8));
  756. AjxEnv.isIE3=(AjxEnv.isIE&&u<4);
  757. AjxEnv.isIE4=(AjxEnv.isIE&&u>=4&&u<5);
  758. AjxEnv.isIE4up=(AjxEnv.isIE&&u>=4);
  759. AjxEnv.isIE5=(AjxEnv.isIE&&u>=5&&u<6);
  760. AjxEnv.isIE5_5=(AjxEnv.isIE&&u==5.5);
  761. AjxEnv.isIE5up=(AjxEnv.isIE&&u>=5);
  762. AjxEnv.isIE5_5up=(AjxEnv.isIE&&u>=5.5);
  763. AjxEnv.isIE6=(AjxEnv.isIE&&u>=6&&u<7);
  764. AjxEnv.isIE6up=(AjxEnv.isIE&&u>=6);
  765. AjxEnv.isIE7=(AjxEnv.isIE&&u>=7&&u<8);
  766. AjxEnv.isIE7up=(AjxEnv.isIE&&u>=7);
  767. AjxEnv.isIE8=(AjxEnv.isIE&&u>=8&&u<9);
  768. AjxEnv.isIE8up=(AjxEnv.isIE&&u>=8);
  769. AjxEnv.isMozilla=((AjxEnv.isNav&&AjxEnv.mozVersion&&AjxEnv.isGeckoBased&&(AjxEnv.geckoDate!=0)));
  770. AjxEnv.isMozilla1_4up=(AjxEnv.isMozilla&&(AjxEnv.mozVersion>=1.4));
  771. AjxEnv.isFirefox=((AjxEnv.isMozilla&&AjxEnv.isFirefox));
  772. AjxEnv.isFirefox1up=(AjxEnv.isFirefox&&u>=1);
  773. AjxEnv.isFirefox1_5up=(AjxEnv.isFirefox&&u>=1.5);
  774. AjxEnv.isFirefox2_0up=(AjxEnv.isFirefox&&u>=2);
  775. AjxEnv.isFirefox3up=(AjxEnv.isFirefox&&u>=3);
  776. AjxEnv.isFirefox3_5up=(AjxEnv.isFirefox&&u>=3.5);
  777. AjxEnv.isFirefox3_6up=(AjxEnv.isFirefox&&u>=3.6);
  778. AjxEnv.isSafari2=(AjxEnv.isSafari&&u>=2&&u<3);
  779. AjxEnv.isSafari3=(AjxEnv.isSafari&&u>=3&&u<4)||AjxEnv.isChrome;
  780. AjxEnv.isSafari4=(AjxEnv.isSafari&&u>=4);
  781. AjxEnv.isSafari3up=(AjxEnv.isSafari&&u>=3)||AjxEnv.isChrome;
  782. AjxEnv.isSafari4up=(AjxEnv.isSafari&&u>=4)||AjxEnv.isChrome;
  783. AjxEnv.isSafari5up=(AjxEnv.isSafari&&u>=5)||AjxEnv.isChrome;
  784. AjxEnv.isDesktop2up=(AjxEnv.isDesktop&&u>=2);
  785. AjxEnv.isChrome7=(AjxEnv.isChrome&&u>=7);
  786. AjxEnv.browser="[unknown]";
  787. if(AjxEnv.isOpera){
  788. AjxEnv.browser="OPERA"
  789. }else{
  790. if(AjxEnv.isSafari3up){
  791. AjxEnv.browser="SAF3"
  792. }else{
  793. if(AjxEnv.isSafari){
  794. AjxEnv.browser="SAF"
  795. }else{
  796. if(AjxEnv.isCamino){
  797. AjxEnv.browser="CAM"
  798. }else{
  799. if(o){
  800. AjxEnv.browser="WEBTV"
  801. }else{
  802. if(r){
  803. AjxEnv.browser="HOTJAVA"
  804. }else{
  805. if(AjxEnv.isFirefox3up){
  806. AjxEnv.browser="FF3.0"
  807. }else{
  808. if(AjxEnv.isFirefox2_0up){
  809. AjxEnv.browser="FF2.0"
  810. }else{
  811. if(AjxEnv.isFirefox1_5up){
  812. AjxEnv.browser="FF1.5"
  813. }else{
  814. if(AjxEnv.isFirefox1up){
  815. AjxEnv.browser="FF1.0"
  816. }else{
  817. if(AjxEnv.isFirefox){
  818. AjxEnv.browser="FF"
  819. }else{
  820. if(AjxEnv.isPrism){
  821. AjxEnv.browser="PRISM"
  822. }else{
  823. if(AjxEnv.isNav7){
  824. AjxEnv.browser="NAV7"
  825. }else{
  826. if(AjxEnv.isNav6){
  827. AjxEnv.browser="NAV6"
  828. }else{
  829. if(AjxEnv.isNav4){
  830. AjxEnv.browser="NAV4"
  831. }else{
  832. if(AjxEnv.isIE8){
  833. AjxEnv.browser="IE8"
  834. }else{
  835. if(AjxEnv.isIE7){
  836. AjxEnv.browser="IE7"
  837. }else{
  838. if(AjxEnv.isIE6){
  839. AjxEnv.browser="IE6"
  840. }else{
  841. if(AjxEnv.isIE5){
  842. AjxEnv.browser="IE5"
  843. }else{
  844. if(AjxEnv.isIE4){
  845. AjxEnv.browser="IE4"
  846. }else{
  847. if(AjxEnv.isIE3){
  848. AjxEnv.browser="IE"
  849. }else{
  850. if(AjxEnv.isDesktop){
  851. AjxEnv.browser="ZDESKTOP"
  852. }}}}}}}}}}}}}}}}}}}}}}
  853. AjxEnv.platform="[unknown]";
  854. if(AjxEnv.isWindows){
  855. AjxEnv.platform="Win"
  856. }else{
  857. if(AjxEnv.isMac){
  858. AjxEnv.platform="Mac"
  859. }else{
  860. if(AjxEnv.isLinux){
  861. AjxEnv.platform="Linux"
  862. }}}}
  863. if(AjxEnv.isIE){
  864. AjxEnv.isNormalResolution=true;
  865. AjxEnv.ieScaleFactor=screen.deviceXDPI/screen.logicalXDPI;
  866. if(AjxEnv.ieScaleFactor>1){
  867. AjxEnv.isNormalResolution=false
  868. }}
  869. AjxEnv.useTransparentPNGs=!AjxEnv.isIE&&!AjxEnv.isLinux&&!AjxEnv.isSafari;
  870. AjxEnv._inited=!AjxEnv.isIE;
  871. if(AjxEnv.isSafari){
  872. var d=AjxEnv.getWebkitVersion();
  873. AjxEnv.isSafariNightly=(d&&d.is_nightly);
  874. AjxEnv.isSafari2=!AjxEnv.isSafari3&&!AjxEnv.isSafariNightly
  875. }};
  876. AjxEnv.getWebkitVersion=function(){
  877. var t;
  878. var o=new RegExp("\\(.*\\) AppleWebKit/(.*) \\((.*)");
  879. var s=o.exec(navigator.userAgent);
  880. if(s){
  881. var e=s[1];
  882. var n=e.split(".");
  883. var a=(e[e.length-1]=="+");
  884. var i=a?"+":parseInt(n[1]);
  885. if(isNaN(i)){
  886. i=""
  887. }
  888. t={
  889. major:parseInt(n[0]),minor:i,is_nightly:a}
  890. }
  891. return t||{}
  892. };
  893. AjxEnv.parseUA();
  894. AjxCallback=function(a,t,e){
  895. if(arguments.length==0){
  896. return
  897. }
  898. if(typeof arguments[0]=="function"){
  899. this.obj=null;
  900. this.func=arguments[0];
  901. this.args=arguments[1]
  902. }else{
  903. this.obj=a;
  904. this.func=t;
  905. this.args=e
  906. }};
  907. AjxCallback.prototype.toString=function(){
  908. return"AjxCallback"
  909. };
  910. AjxCallback.NOP=new AjxCallback(function(){}
  911. );
  912. AjxCallback.prototype.run=function(){
  913. var e=[];
  914. if(typeof this.args!="undefined"){
  915. if(this.args!==null&&this.args instanceof Array){
  916. e=arguments.length>0?e.concat(this.args):this.args
  917. }else{
  918. e.push(this.args)
  919. }}
  920. for(var t=0;
  921. t<arguments.length;
  922. ++t){
  923. e.push(arguments[t])
  924. }
  925. if(this.func){
  926. return this.func.apply(this.obj||window,e)
  927. }};
  928. AjxCallback.prototype.run1=function(t){
  929. var e=[];
  930. if(typeof this.args!="undefined"){
  931. if(this.args!==null&&this.args instanceof Array){
  932. e=arguments.length>0?e.concat(this.args):this.args
  933. }else{
  934. e.push(this.args)
  935. }}
  936. if(t&&t.length){
  937. for(var a=0;
  938. a<t.length;
  939. ++a){
  940. e.push(t[a])
  941. }}
  942. if(this.func){
  943. return this.func.apply(this.obj||window,e)
  944. }};
  945. AjxCallback.simpleClosure=function(a,o){
  946. var e=[];
  947. for(var t=2;
  948. t<arguments.length;
  949. ++t){
  950. e.push(arguments[t])
  951. }
  952. return function(){
  953. var s=[];
  954. for(var n=0;
  955. n<arguments.length;
  956. ++n){
  957. s.push(arguments[n])
  958. }
  959. return a.apply(o||this,e.concat(s))
  960. }
  961. };
  962. AjxCallback.returnFalse=function(){
  963. return false
  964. };
  965. AjxCallback.isNull=function(e){
  966. return e==null
  967. };
  968. AjxLoader=function(){};
  969. AjxLoader.__createXHR;
  970. if(window.XMLHttpRequest){
  971. AjxLoader.__createXHR=function(){
  972. return new XMLHttpRequest()
  973. }
  974. }else{
  975. if(window.ActiveXObject){
  976. (function(){
  977. var t=["MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];
  978. for(var a=0;
  979. a<t.length;
  980. a++){
  981. try{
  982. new ActiveXObject(t[a]);
  983. AjxLoader.__createXHR=function(){
  984. return new ActiveXObject(t[a])
  985. };
  986. break
  987. }
  988. catch(o){}}}
  989. )()
  990. }}
  991. AjxLoader.load=function(a){
  992. var n=a;
  993. if(typeof a=="string"){
  994. n={
  995. url:a}
  996. }
  997. var o=AjxLoader.__createXHR();
  998. var i=Boolean(n.callback)?function(){
  999. AjxLoader._response(o,n.callback)
  1000. }
  1001. :null;
  1002. var s=n.method||(n.content!=null?"POST":"GET");
  1003. if(i){
  1004. o.onreadystatechange=i
  1005. }
  1006. var t=n.async!=null?n.async:Boolean(i);
  1007. o.open(s,n.url,t,n.userName,n.password);
  1008. for(var e in n.headers){
  1009. o.setRequestHeader(e,n.headers[e])
  1010. }
  1011. o.send(n.content||"");
  1012. return o
  1013. };
  1014. AjxLoader._response=function(e,t){
  1015. if(e.readyState==4){
  1016. t.run(e)
  1017. }};
  1018. AjxPackage=function(){};
  1019. AjxPackage.METHOD_XHR_SYNC="xhr-sync";
  1020. AjxPackage.METHOD_XHR_ASYNC="xhr-async";
  1021. AjxPackage.METHOD_SCRIPT_TAG="script-tag";
  1022. AjxPackage.DEFAULT_SYNC=AjxPackage.METHOD_XHR_SYNC;
  1023. AjxPackage.DEFAULT_ASYNC=AjxEnv.isIE?AjxPackage.METHOD_XHR_ASYNC:AjxPackage.METHOD_SCRIPT_TAG;
  1024. AjxPackage._packages={};
  1025. AjxPackage._extension=".js";
  1026. AjxPackage.__depth=0;
  1027. AjxPackage.__scripts=[];
  1028. AjxPackage.__data={};
  1029. AjxPackage.setBasePath=function(e){
  1030. AjxPackage._basePath=e
  1031. };
  1032. AjxPackage.setExtension=function(e){
  1033. AjxPackage._extension=e
  1034. };
  1035. AjxPackage.setQueryString=function(e){
  1036. AjxPackage._queryString=e
  1037. };
  1038. AjxPackage.isDefined=function(e){
  1039. return Boolean(AjxPackage._packages[e])
  1040. };
  1041. AjxPackage.define=function(e){
  1042. AjxPackage.__log("DEFINE "+e,"font-weight:bold;font-style:italic");
  1043. e=AjxPackage.__package2path(e);
  1044. if(!AjxPackage._packages[e]){
  1045. AjxPackage._packages[e]=true;
  1046. return true
  1047. }
  1048. return false
  1049. };
  1050. AjxPackage.undefine=function(e){
  1051. AjxPackage.__log("UNDEFINE "+e,"font-weight:bold;font-style:italic");
  1052. e=AjxPackage.__package2path(e);
  1053. if(AjxPackage._packages[e]){
  1054. delete AjxPackage._packages[e]
  1055. }};
  1056. AjxPackage.require=function(a){
  1057. var b=a;
  1058. if(typeof a=="string"){
  1059. b={
  1060. name:a}
  1061. }
  1062. var s=b.name;
  1063. if(s instanceof Array){
  1064. if(!s.internal){
  1065. s=[].concat(s);
  1066. s.internal=true;
  1067. b.name=s
  1068. }
  1069. var x=s.shift();
  1070. if(s.length>0){
  1071. var o=new Function();
  1072. o.prototype=b;
  1073. o.prototype.constructor=o;
  1074. var n=new o();
  1075. n.name=x;
  1076. n.callback=new AjxCallback(null,AjxPackage.__requireNext,b);
  1077. AjxPackage.require(n);
  1078. return
  1079. }
  1080. b.name=x
  1081. }
  1082. var c=b.name;
  1083. var x=AjxPackage.__package2path(c);
  1084. var i=b.callback;
  1085. if(typeof i=="function"){
  1086. i=new AjxCallback(i)
  1087. }
  1088. var f=i?" (callback)":"";
  1089. var y=AjxPackage._packages[x]?" LOADED":"";
  1090. var d=AjxPackage.__scripts.length?" (async, queueing...)":"";
  1091. AjxPackage.__log(['REQUIRE "',c,'"',f,y,d].join(""));
  1092. var g=b.forceReload!=null?b.forceReload:false;
  1093. if(AjxPackage._packages[x]&&!g){
  1094. if(i){
  1095. i.run()
  1096. }
  1097. return
  1098. }
  1099. var w=b.basePath||AjxPackage._basePath||window.contextPath;
  1100. var h=b.extension||AjxPackage._extension;
  1101. var t=b.queryString||AjxPackage._queryString;
  1102. var k=[w,"/",x,h];
  1103. if(t){
  1104. k.push("?",t)
  1105. }
  1106. var m=k.join("");
  1107. var e=b.method||(b.callback?AjxPackage.DEFAULT_ASYNC:AjxPackage.DEFAULT_SYNC);
  1108. var l=e==AjxPackage.METHOD_XHR_SYNC||b.forceSync;
  1109. var r=!l;
  1110. var v={
  1111. name:x,path:m,method:e,async:r,callback:i||AjxCallback.NOP,scripts:r?[]:null};
  1112. if(l||AjxPackage.__scripts.length==0){
  1113. AjxPackage.__doLoad(v)
  1114. }else{
  1115. var p=AjxPackage.__scripts[AjxPackage.__scripts.length-1];
  1116. v.method=p.method;
  1117. v.async=p.async;
  1118. v.scripts=[];
  1119. if(i){
  1120. var u=AjxPackage.__scripts[0];
  1121. u.callback=new AjxCallback(AjxPackage.__chainCallbacks,[u.callback,i]);
  1122. v.callback=AjxCallback.NOP
  1123. }
  1124. p.scripts.push(v)
  1125. }};
  1126. AjxPackage.eval=function(text){
  1127. if(window.execScript){
  1128. window.execScript(text)
  1129. }else{
  1130. if(AjxEnv.isGeckoBased){
  1131. window.eval(text)
  1132. }else{
  1133. var e=document.createElement("SCRIPT");
  1134. var t=document.createTextNode(text);
  1135. e.appendChild(t);
  1136. var heads=document.getElementsByTagName("HEAD");
  1137. if(heads.length==0){
  1138. heads=[document.createElement("HEAD")];
  1139. document.documentElement.appendChild(heads[0])
  1140. }
  1141. heads[0].appendChild(e)
  1142. }}};
  1143. AjxPackage.__package2path=function(e){
  1144. return e.replace(/\./g,"/").replace(/\*$/,"__all__")
  1145. };
  1146. AjxPackage.__requireNext=function(t){
  1147. var e=AjxCallback.simpleClosure(AjxPackage.require,null,t);
  1148. setTimeout(e,AjxEnv.isIE?10:0)
  1149. };
  1150. AjxPackage.__doLoad=function(e){
  1151. if(e.async){
  1152. AjxPackage.__doAsyncLoad(e)
  1153. }else{
  1154. AjxPackage.__doXHR(e)
  1155. }};
  1156. AjxPackage.__doAsyncLoad=function(t,e){
  1157. AjxPackage.__data[name]=t;
  1158. if(e||AjxPackage.__scripts.length==0){
  1159. AjxPackage.__scripts.push(t);
  1160. if(t.method==AjxPackage.METHOD_SCRIPT_TAG){
  1161. AjxPackage.__doScriptTag(t)
  1162. }else{
  1163. AjxPackage.__doXHR(t)
  1164. }}else{
  1165. var a=AjxPackage.__scripts[AjxPackage.__scripts.length-1];
  1166. a.scripts.push(t)
  1167. }};
  1168. AjxPackage.__doScriptTag=function(i){
  1169. var e=document.createElement("SCRIPT");
  1170. e.type="text/javascript";
  1171. e.src=i.path;
  1172. if(AjxEnv.isIE){
  1173. var t=AjxCallback.simpleClosure(AjxPackage.__onAsyncLoadIE,null,e);
  1174. e.attachEvent("onreadystatechange",t)
  1175. }else{
  1176. var t=AjxCallback.simpleClosure(AjxPackage.__onAsyncLoad,null,i.name);
  1177. e.addEventListener("load",t,true)
  1178. }
  1179. var a=document.getElementsByTagName("HEAD");
  1180. if(!a||a.length==0){
  1181. a=[document.createElement("HEAD")];
  1182. document.documentElement.appendChild(a[0])
  1183. }
  1184. a[0].appendChild(e)
  1185. };
  1186. AjxPackage.__doXHR=function(a){
  1187. var i=a.async?new AjxCallback(null,AjxPackage.__onXHR,[a]):null;
  1188. var e={
  1189. url:a.path,userName:a.userName,password:a.password,async:a.async,callback:i};
  1190. var t=AjxLoader.load(e);
  1191. if(!a.async){
  1192. AjxPackage.__onXHR(a,t)
  1193. }};
  1194. AjxPackage.__onXHR=function(t,e){
  1195. if(e.status==200||e.status==0){
  1196. AjxPackage.__requireEval(e.responseText||"")
  1197. }else{
  1198. AjxPackage.__log("error: "+e.status,"background-color:red")
  1199. }
  1200. if(t.async){
  1201. AjxPackage.__onAsyncLoad()
  1202. }else{
  1203. AjxPackage.__onLoad(t)
  1204. }};
  1205. AjxPackage.__onAsyncLoadIE=function(e){
  1206. if(e.readyState=="loaded"){
  1207. AjxPackage.__onAsyncLoad()
  1208. }};
  1209. AjxPackage.__onAsyncLoad=function(){
  1210. var e;
  1211. while(e=AjxPackage.__scripts.pop()){
  1212. if(e.scripts.length){
  1213. AjxPackage.__scripts.push(e);
  1214. e=e.scripts.shift();
  1215. AjxPackage.__scripts.push(e);
  1216. AjxPackage.__doAsyncLoad(e,true);
  1217. return
  1218. }
  1219. AjxPackage.__onLoad(e)
  1220. }};
  1221. AjxPackage.__onLoad=function(t){
  1222. AjxPackage.define(t.name);
  1223. if(t.callback){
  1224. try{
  1225. t.callback.run()
  1226. }
  1227. catch(a){
  1228. AjxPackage.__log("error on callback: "+a,"color:red")
  1229. }}};
  1230. AjxPackage.__requireEval=function(text){
  1231. AjxPackage.__depth++;
  1232. try{
  1233. AjxPackage.eval(text)
  1234. }
  1235. catch(e){
  1236. AjxPackage.__log("error on eval: "+e,"color:red")
  1237. }
  1238. AjxPackage.__depth--
  1239. };
  1240. AjxPackage.__log=function(t,e){};
  1241. AjxPackage.__alertStack=function(r){
  1242. var e=[];
  1243. if(r){
  1244. e.push(r,"\n\n")
  1245. }
  1246. for(var s=AjxPackage.__scripts.length-1;
  1247. s>=0;
  1248. s--){
  1249. var t=AjxPackage.__scripts[s];
  1250. e.push(t.name," (",Boolean(t.callback),")","\n");
  1251. if(t.scripts){
  1252. for(var n=0;
  1253. n<t.scripts.length;
  1254. n++){
  1255. var o=t.scripts[n];
  1256. e.push(" ",o.name," (",Boolean(o.callback),")","\n")
  1257. }}}
  1258. alert(e.join(""))
  1259. };
  1260. AjxPackage.__chainCallbacks=function(t,e){
  1261. if(t){
  1262. t.run()
  1263. }
  1264. if(e){
  1265. e.run()
  1266. }};
  1267. AjxTemplate=function(){};
  1268. AjxTemplate._templates={};
  1269. AjxTemplate._stack=[];
  1270. AjxTemplate.setBasePath=function(e){
  1271. AjxTemplate._basePath=e
  1272. };
  1273. AjxTemplate.setExtension=function(e){
  1274. AjxTemplate._extension=e
  1275. };
  1276. AjxTemplate.register=function(t,a,i,e){
  1277. if(!e&&AjxTemplate._templates[t]&&AjxTemplate._templates[t].authoritative){
  1278. return
  1279. }
  1280. AjxTemplate._templates[t]={
  1281. name:t,func:a,params:i||{}
  1282. ,authoritative:e}
  1283. };
  1284. AjxTemplate.getTemplate=function(e){
  1285. var t=AjxTemplate._templates[e];
  1286. return t&&t.func
  1287. };
  1288. AjxTemplate.getParams=function(e){
  1289. var t=AjxTemplate._templates[e];
  1290. return t&&t.params
  1291. };
  1292. AjxTemplate.expand=function(t,r,s){
  1293. if(!AjxTemplate._templates[t]&&AjxTemplate.compile){
  1294. var i=document.getElementById(t);
  1295. if(i){
  1296. var d=i.nodeName.toUpperCase()=="TEXTAREA";
  1297. AjxTemplate.compile(t,true,true,d?i.value:i.innerHTML)
  1298. }}
  1299. var c=AjxTemplate.__name2Package(t);
  1300. var a=t.replace(/^[^#]*#?/,"");
  1301. if(a){
  1302. t=[c,a].join("#")
  1303. }
  1304. AjxTemplate.require(c);
  1305. var h=Boolean(s);
  1306. s=s||[];
  1307. var o=AjxTemplate.getTemplate(t);
  1308. if(o){
  1309. try{
  1310. AjxTemplate._stack.push(c);
  1311. var n=AjxTemplate.getParams(t);
  1312. o(t,n,r,s)
  1313. }
  1314. catch(l){
  1315. s.push(this.__formatError(t,l))
  1316. }
  1317. finally{
  1318. AjxTemplate._stack.pop()
  1319. }}else{
  1320. s.push(this.__formatError(t,"template not found"))
  1321. }
  1322. return h?s.length:s.join("")
  1323. };
  1324. AjxTemplate.require=function(e){
  1325. AjxPackage.require({
  1326. name:AjxTemplate.__name2Package(e),basePath:AjxTemplate._basePath,extension:AjxTemplate._extension}
  1327. );
  1328. return AjxTemplate.getTemplate(e)!=null
  1329. };
  1330. AjxTemplate.setContent=function(a,e,i){
  1331. if(typeof a=="string"){
  1332. a=document.getElementById(a)
  1333. }
  1334. if(a==null){
  1335. return
  1336. }
  1337. var t=AjxTemplate.expand(e,i);
  1338. a.innerHTML=t
  1339. };
  1340. AjxTemplate.__name2Package=function(t){
  1341. var e=t.replace(/#.*$/,"");
  1342. if(t.match(/^#/)&&AjxTemplate._stack.length>0){
  1343. e=AjxTemplate._stack[AjxTemplate._stack.length-1]
  1344. }
  1345. return e
  1346. };
  1347. AjxTemplate.__formatError=function(e,t){
  1348. return"Error in template '"+e+"': "+t
  1349. };
  1350. AjxTemplate.compile=function(d,u,l,f){
  1351. var e=AjxPackage.__package2path(d);
  1352. var g=f!=null?f:AjxLoader.load(e).reponseText;
  1353. var r=[],s=0,h=true;
  1354. AjxTemplate.__RE_TEMPLATE.lastIndex=0;
  1355. var o=AjxTemplate.__RE_TEMPLATE.exec(g);
  1356. if(o){
  1357. do{
  1358. var p=AjxTemplate.__parseAttrs(o[1]);
  1359. var c=o[2];
  1360. if(p["xml:space"]!="preserve"){
  1361. c=c.replace(AjxTemplate.__RE_GT_LINESEP_LT,"><").trim()
  1362. }
  1363. var n=d;
  1364. var a=p.id;
  1365. if(a&&(a.indexOf("#")!=-1||a.match(/^\//))){
  1366. if(a.indexOf("#")==-1){
  1367. a+="#"
  1368. }
  1369. n=a.replace(/#.*$/,"").replace(/^\//,"").replace(/\//g,".");
  1370. a=a.replace(/^.*#/,"")
  1371. }
  1372. var t=a?n+"#"+a:n;
  1373. var i=AjxTemplate.__convertLines(c);
  1374. AjxTemplate.register(n,i,p,u);
  1375. if(h&&l){
  1376. AjxPackage.define(n)
  1377. }
  1378. if(h){
  1379. h=false;
  1380. AjxTemplate.register(n,i,p,u)
  1381. }}
  1382. while(o=AjxTemplate.__RE_TEMPLATE.exec(g))
  1383. }else{
  1384. if(l){
  1385. AjxPackage.define(d)
  1386. }
  1387. var i=AjxTemplate.__convertLines(g);
  1388. AjxTemplate.register(d,i,{}
  1389. ,u)
  1390. }};
  1391. AjxTemplate.__RE_REPLACE=new RegExp(["\\$\\{(.+?)\\}","<\\$=(.+?)\\$>","<\\$(.+?)\\$>"].join("|"),"mg");
  1392. AjxTemplate.__RE_TEMPLATE=new RegExp("<template(.*?)>(.*?)</template>","mg");
  1393. AjxTemplate.__RE_ATTR=new RegExp("\\s*(\\S+)\\s*=\\s*('[^']*'|\"[^\"]*\")","mg");
  1394. AjxTemplate.__RE_PARAM_PART=new RegExp("([^\\(\\.]+)(\\(.*?\\))?\\.?","g");
  1395. AjxTemplate.__RE_GT_LINESEP_LT=new RegExp([">","\\s*\\n+\\s*","<"].join(""),"mg");
  1396. AjxTemplate.__convertLines=function(a){
  1397. var t=[],r=0;
  1398. t[r++]="\tvar _hasBuffer = Boolean(buffer);";
  1399. t[r++]='\tdata = (typeof data == "string" ? { id: data } : data) || {};';
  1400. t[r++]="\tbuffer = buffer || [];";
  1401. t[r++]="\tvar _i = buffer.length;";
  1402. t[r++]="\n";
  1403. AjxTemplate.__RE_REPLACE.lastIndex=0;
  1404. var e=AjxTemplate.__RE_REPLACE.exec(a);
  1405. if(e){
  1406. var o=0;
  1407. do{
  1408. var i=AjxTemplate.__RE_REPLACE.lastIndex-e[0].length;
  1409. if(o<i){
  1410. AjxTemplate.__printStringLines(t,a.substring(o,i))
  1411. }
  1412. var s=e[1];
  1413. var n=e[2];
  1414. if(s){
  1415. r=AjxTemplate.__printDataLine(t,s)
  1416. }else{
  1417. if(n){
  1418. r=AjxTemplate.__printBufferLine(t,n)
  1419. }else{
  1420. r=AjxTemplate.__printLine(t,"\t",e[3].replace(/\n/g,"\n\t"),"\n")
  1421. }}
  1422. o=AjxTemplate.__RE_REPLACE.lastIndex
  1423. }
  1424. while(e=AjxTemplate.__RE_REPLACE.exec(a));
  1425. if(o<a.length){
  1426. r=AjxTemplate.__printStringLines(t,a.substring(o))
  1427. }}else{
  1428. r=AjxTemplate.__printStringLines(t,a)
  1429. }
  1430. t[r++]="\n";
  1431. t[r++]='\treturn _hasBuffer ? buffer.length : buffer.join("");';
  1432. return new Function("name,params,data,buffer",t.join(""))
  1433. };
  1434. AjxTemplate.__parseAttrs=function(a){
  1435. var t={}
  1436. ,e;
  1437. AjxTemplate.__RE_ATTR.lastIndex=0;
  1438. while(e=AjxTemplate.__RE_ATTR.exec(a)){
  1439. var i=e[2];
  1440. t[e[1]]=i.substring(1,i.length-1)
  1441. }
  1442. return t
  1443. };
  1444. AjxTemplate.__printLine=function(e,a){
  1445. var o=e.length;
  1446. for(var t=1;
  1447. t<arguments.length;
  1448. t++){
  1449. e[o++]=arguments[t]
  1450. }
  1451. return o
  1452. };
  1453. AjxTemplate.__printStringLines=function(a,r){
  1454. var l=a.length;
  1455. for(var n=1;
  1456. n<arguments.length;
  1457. n++){
  1458. var h=arguments[n];
  1459. var t=h.split("\n");
  1460. for(var o=0;
  1461. o<t.length;
  1462. o++){
  1463. var e=t[o];
  1464. l=AjxTemplate.__printStringLine(a,e,n<t.length-1?"\n":"")
  1465. }}
  1466. return l
  1467. };
  1468. AjxTemplate.__printStringLine=function(e,a){
  1469. var o=e.length;
  1470. e[o++]='\tbuffer[_i++] = "';
  1471. for(var t=1;
  1472. t<arguments.length;
  1473. t++){
  1474. o=AjxTemplate.__printEscaped(e,arguments[t])
  1475. }
  1476. e[o++]='";';
  1477. return o
  1478. };
  1479. AjxTemplate.__printDataLine=function(t,a){
  1480. var i=t.length,e;
  1481. t[i++]="\tbuffer[_i++] = data";
  1482. AjxTemplate.__RE_PARAM_PART.lastIndex=0;
  1483. while(e=AjxTemplate.__RE_PARAM_PART.exec(a)){
  1484. t[i++]='["';
  1485. t[i++]=e[1];
  1486. t[i++]='"]';
  1487. if(e[2]!=null){
  1488. t[i++]=e[2]
  1489. }}
  1490. t[i++]=";";
  1491. return i
  1492. };
  1493. AjxTemplate.__printBufferLine=function(e,a){
  1494. var o=e.length;
  1495. e[o++]="\tbuffer[_i++] = ";
  1496. for(var t=1;
  1497. t<arguments.length;
  1498. t++){
  1499. e[o++]=arguments[t]
  1500. }
  1501. e[o++]=";";
  1502. return o
  1503. };
  1504. AjxTemplate.__printEscaped=function(e,t){
  1505. var a=e.length;
  1506. e[a++]=t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace("\n","\\n").replace("\r","\\r").replace("\t","\\t");
  1507. return a
  1508. };
  1509. AjxDispatcher=function(){};
  1510. AjxDispatcher._registry={};
  1511. AjxDispatcher._package={};
  1512. AjxDispatcher._preLoad=[];
  1513. AjxDispatcher._postLoad=[];
  1514. AjxDispatcher._loadFunctionsEnabled=false;
  1515. AjxDispatcher._timedAction=null;
  1516. AjxDispatcher.addPackageLoadFunction=function(e,a){
  1517. var t=AjxDispatcher._getPackageData(e);
  1518. if(!t._loaded&&!AjxPackage.isDefined(e)){
  1519. t.callback.push(a)
  1520. }else{
  1521. AjxTimedAction.scheduleAction(new AjxTimedAction(a,a.run),0)
  1522. }};
  1523. AjxDispatcher.addPreLoadFunction=function(e){
  1524. AjxDispatcher._preLoad.push(e)
  1525. };
  1526. AjxDispatcher.addPostLoadFunction=function(e){
  1527. AjxDispatcher._postLoad.push(e)
  1528. };
  1529. AjxDispatcher.setPackageLoadFunction=AjxDispatcher.addPackageLoadFunction;
  1530. AjxDispatcher.setPreLoadFunction=AjxDispatcher.addPreLoadFunction;
  1531. AjxDispatcher.setPostLoadFunction=AjxDispatcher.addPostLoadFunction;
  1532. AjxDispatcher.enableLoadFunctions=function(e){
  1533. AjxDispatcher._loadFunctionsEnabled=e
  1534. };
  1535. AjxDispatcher.loaded=function(e){
  1536. var t=AjxDispatcher._getPackageData(e);
  1537. return(t&&t._loaded)||AjxPackage.isDefined(e)
  1538. };
  1539. AjxDispatcher.setLoaded=function(t,e){
  1540. var n=AjxDispatcher._getPackageData(t);
  1541. n._loaded=e;
  1542. if(e){
  1543. var o=n.callback||[];
  1544. for(var a=0;
  1545. a<o.length;
  1546. a++){
  1547. o[a].run()
  1548. }}};
  1549. AjxDispatcher.registerMethod=function(a,e,t){
  1550. AjxDispatcher._registry[a]={
  1551. pkg:e,callback:t}
  1552. };
  1553. AjxDispatcher.run=function(o){
  1554. if(!o){
  1555. return
  1556. }
  1557. var e,a,t,l,h;
  1558. if(typeof(o)=="string"){
  1559. e=o;
  1560. t=false;
  1561. h=false
  1562. }else{
  1563. e=o.method;
  1564. a=o.noLoad;
  1565. l=o.callback;
  1566. t=o.async!=null?o.async:Boolean(l);
  1567. h=o.preLoadOk!=null?o.preLoadOk:(l!=null)
  1568. }
  1569. var c=AjxDispatcher._registry[e];
  1570. if(!c){
  1571. AjxPackage.__log("API method '"+e+"' not found");
  1572. return
  1573. }
  1574. AjxPackage.__log("Run method: "+e);
  1575. var r=c.pkg;
  1576. var s=[];
  1577. for(var n=1;
  1578. n<arguments.length;
  1579. ++n){
  1580. s.push(arguments[n])
  1581. }
  1582. if(l){
  1583. s.push(l)
  1584. }
  1585. return AjxDispatcher.require(r,t,c.callback,s,h)
  1586. };
  1587. AjxDispatcher.require=function(n,a,h,s,r){
  1588. if(!n){
  1589. return
  1590. }
  1591. if(typeof(n)=="string"){
  1592. n=[n]
  1593. }
  1594. var l=[];
  1595. for(var o=0;
  1596. o<n.length;
  1597. o++){
  1598. var t=n[o];
  1599. if(!AjxDispatcher._getPackageData(t)._loaded){
  1600. l.push(t)
  1601. }}
  1602. if(l.length==0){
  1603. return AjxDispatcher._postLoadCallback(n,false,h,s)
  1604. }else{
  1605. var e=AjxDispatcher._preLoad;
  1606. if(r&&AjxDispatcher._loadFunctionsEnabled&&e.length){
  1607. AjxPackage.__log("pre-load function");
  1608. AjxDispatcher._timedAction=new AjxCallback(null,AjxDispatcher._continueRequire,[l,a,h,s]);
  1609. for(var o=0;
  1610. o<e.length;
  1611. o++){
  1612. e[o].run()
  1613. }
  1614. window.setTimeout("AjxDispatcher._timedAction.run()",0)
  1615. }else{
  1616. return AjxDispatcher._continueRequire(l,a,h,s)
  1617. }}};
  1618. AjxDispatcher._continueRequire=function(s,e,c,r){
  1619. var l=s.join(", ");
  1620. AjxPackage.__log("------------------------------------- Loading package: "+l);
  1621. if(window.console){
  1622. console.log("------------------------------------- Loading package: "+l)
  1623. }
  1624. if(e&&c){
  1625. var o=new AjxCallback(null,AjxDispatcher._postLoadCallback,[s,true,c,r]);
  1626. AjxPackage.require({
  1627. name:s,callback:o}
  1628. )
  1629. }else{
  1630. var n=new Date();
  1631. for(var a=0;
  1632. a<s.length;
  1633. a++){
  1634. AjxPackage.require(s[a])
  1635. }
  1636. var h=new Date();
  1637. var d=h.getTime()-n.getTime();
  1638. AjxPackage.__log("LOAD TIME for "+l+": "+d);
  1639. return AjxDispatcher._postLoadCallback(s,true,c,r)
  1640. }};
  1641. AjxDispatcher._postLoadCallback=function(r,n,l,h){
  1642. for(var a=0;
  1643. a<r.length;
  1644. a++){
  1645. AjxDispatcher._getPackageData(r[a])._loaded=true
  1646. }
  1647. for(var a=0;
  1648. a<r.length;
  1649. a++){
  1650. var e=AjxDispatcher._getPackageData(r[a]);
  1651. if(n&&e.callback.length&&!e.callbackDone){
  1652. e.callbackDone=true;
  1653. AjxPackage.__log("Running post-load package function for "+r[a]);
  1654. var s=e.callback;
  1655. for(var t=0;
  1656. t<s.length;
  1657. t++){
  1658. s[t].run()
  1659. }
  1660. e.callback.length=0
  1661. }}
  1662. if(n){
  1663. var o=AjxDispatcher._postLoad;
  1664. if(AjxDispatcher._loadFunctionsEnabled&&o.length){
  1665. for(var a=0;
  1666. a<o.length;
  1667. a++){
  1668. o[a].run()
  1669. }}}
  1670. if(l){
  1671. return l.run1(h)
  1672. }};
  1673. AjxDispatcher._getPackageData=function(e){
  1674. if(!AjxDispatcher._package[e]){
  1675. AjxDispatcher._package[e]={
  1676. callback:[]}
  1677. }
  1678. return AjxDispatcher._package[e]
  1679. };
  1680. </script>
  1681.  
  1682.  
  1683. <script type="text/javascript">
  1684. AjxPackage.setBasePath("/zimbra/js");
  1685. AjxPackage.setExtension("_all.js.zgz");
  1686. AjxPackage.setQueryString("v=110527090709");
  1687.  
  1688. AjxTemplate.setBasePath("/zimbra/templates");
  1689. AjxTemplate.setExtension(".template.js");
  1690. </script>
  1691.  
  1692. <script>
  1693. AjxEnv.DEFAULT_LOCALE = "en_US";
  1694.  
  1695. function switchToStandardClient() {
  1696. document.location = appContextPath + "/?client=standard";
  1697. }
  1698.  
  1699. var enforceMinDisplay = true;
  1700. var unsupported = (screen && (screen.width <= 800 && screen.height <= 600) && !false) || (AjxEnv.isSafari && !AjxEnv.isSafari4up);
  1701. if (enforceMinDisplay && unsupported) {
  1702. switchToStandardClient();
  1703. }
  1704.  
  1705. </script>
  1706. <script>
  1707. /**
  1708. * DO NOT EDIT! This file is generated.
  1709. * <p>
  1710. * Any copy of this file checked into source control is merely for
  1711. * convenience and should not be edited in any way.
  1712. * <p>
  1713. * Generated at Sun Sep 30 16:19:40 PDT 2012
  1714. * @private
  1715. */
  1716. AjxTimezoneData = {};
  1717.  
  1718. AjxTimezoneData.TRANSITION_YEAR = 2012;
  1719.  
  1720. AjxTimezoneData.TIMEZONE_RULES = [
  1721. { serverId: "Etc/GMT+12", clientId: "Etc/GMT+12", score: 100, standard: { offset: -720, tzname: "GMT+12" } },
  1722. { serverId: "Pacific/Midway", clientId: "Pacific/Midway", score: 100, standard: { offset: -660, tzname: "SST" } },
  1723. { serverId: "Pacific/Honolulu", clientId: "Pacific/Honolulu", score: 200, standard: { offset: -600, tzname: "HST" } },
  1724. { serverId: "America/Anchorage", clientId: "America/Anchorage", score: 200,
  1725. standard: { offset: -540, mon: 11, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 11, 4 ], tzname: "AKST" },
  1726. daylight: { offset: -480, mon: 3, week: 2, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 11 ], tzname: "AKDT" }
  1727. },
  1728. { serverId: "America/Los_Angeles", clientId: "America/Los_Angeles", score: 200,
  1729. standard: { offset: -480, mon: 11, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 11, 4 ], tzname: "PST" },
  1730. daylight: { offset: -420, mon: 3, week: 2, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 11 ], tzname: "PDT" }
  1731. },
  1732. { serverId: "America/Tijuana", clientId: "America/Tijuana", score: 100,
  1733. standard: { offset: -480, mon: 10, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "PST" },
  1734. daylight: { offset: -420, mon: 4, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 4, 1 ], tzname: "PDT" }
  1735. },
  1736. { serverId: "America/Chihuahua", clientId: "America/Chihuahua", score: 100,
  1737. standard: { offset: -420, mon: 10, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "MST" },
  1738. daylight: { offset: -360, mon: 4, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 4, 1 ], tzname: "MDT" }
  1739. },
  1740. { serverId: "America/Denver", clientId: "America/Denver", score: 200,
  1741. standard: { offset: -420, mon: 11, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 11, 4 ], tzname: "MST" },
  1742. daylight: { offset: -360, mon: 3, week: 2, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 11 ], tzname: "MDT" }
  1743. },
  1744. { serverId: "America/Phoenix", clientId: "America/Phoenix", score: 200, standard: { offset: -420, tzname: "MST" } },
  1745. { serverId: "America/Chicago", clientId: "America/Chicago", score: 200,
  1746. standard: { offset: -360, mon: 11, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 11, 4 ], tzname: "CST" },
  1747. daylight: { offset: -300, mon: 3, week: 2, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 11 ], tzname: "CDT" }
  1748. },
  1749. { serverId: "America/Guatemala", clientId: "America/Guatemala", score: 100, standard: { offset: -360 } },
  1750. { serverId: "America/Mexico_City", clientId: "America/Mexico_City", score: 100,
  1751. standard: { offset: -360, mon: 10, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "CST" },
  1752. daylight: { offset: -300, mon: 4, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 4, 1 ], tzname: "CDT" }
  1753. },
  1754. { serverId: "America/Regina", clientId: "America/Regina", score: 200, standard: { offset: -360, tzname: "CST" } },
  1755. { serverId: "America/Bogota", clientId: "America/Bogota", score: 100, standard: { offset: -300 } },
  1756. { serverId: "America/Indiana/Indianapolis", clientId: "America/Indiana/Indianapolis", score: 100,
  1757. standard: { offset: -300, mon: 11, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 11, 4 ], tzname: "EST" },
  1758. daylight: { offset: -240, mon: 3, week: 2, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 11 ], tzname: "EDT" }
  1759. },
  1760. { serverId: "America/New_York", clientId: "America/New_York", score: 200,
  1761. standard: { offset: -300, mon: 11, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 11, 4 ], tzname: "EST" },
  1762. daylight: { offset: -240, mon: 3, week: 2, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 11 ], tzname: "EDT" }
  1763. },
  1764. { serverId: "America/Caracas", clientId: "America/Caracas", score: 100, standard: { offset: -270, tzname: "VET" } },
  1765. { serverId: "America/Asuncion", clientId: "America/Asuncion", score: 100,
  1766. standard: { offset: -240, mon: 4, week: 2, wkday: 1, hour: 0, min: 0, sec: 0, trans: [ 2012, 4, 8 ], tzname: "PYT" },
  1767. daylight: { offset: -180, mon: 10, week: 1, wkday: 1, hour: 0, min: 0, sec: 0, trans: [ 2012, 10, 7 ], tzname: "PYST" }
  1768. },
  1769. { serverId: "America/Cuiaba", clientId: "America/Cuiaba", score: 100,
  1770. standard: { offset: -240, mon: 2, week: 3, wkday: 1, hour: 0, min: 0, sec: 0, trans: [ 2012, 2, 19 ], tzname: "AMT" },
  1771. daylight: { offset: -180, mon: 10, week: 3, wkday: 1, hour: 0, min: 0, sec: 0, trans: [ 2012, 10, 21 ], tzname: "AMST" }
  1772. },
  1773. { serverId: "America/Guyana", clientId: "America/Guyana", score: 100, standard: { offset: -240, tzname: "GYT" } },
  1774. { serverId: "America/Halifax", clientId: "America/Halifax", score: 100,
  1775. standard: { offset: -240, mon: 11, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 11, 4 ], tzname: "AST" },
  1776. daylight: { offset: -180, mon: 3, week: 2, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 11 ], tzname: "ADT" }
  1777. },
  1778. { serverId: "America/Santiago", clientId: "America/Santiago", score: 100,
  1779. standard: { offset: -240, mon: 4, week: 1, wkday: 1, hour: 0, min: 0, sec: 0, trans: [ 2012, 4, 1 ], tzname: "CLT" },
  1780. daylight: { offset: -180, mon: 10, week: 2, wkday: 1, hour: 0, min: 0, sec: 0, trans: [ 2012, 10, 14 ], tzname: "CLST" }
  1781. },
  1782. { serverId: "America/St_Johns", clientId: "America/St_Johns", score: 100,
  1783. standard: { offset: -210, mon: 11, week: 1, wkday: 1, hour: 0, min: 1, sec: 0, trans: [ 2012, 11, 4 ], tzname: "NST" },
  1784. daylight: { offset: -150, mon: 3, week: 2, wkday: 1, hour: 0, min: 1, sec: 0, trans: [ 2012, 3, 11 ], tzname: "NDT" }
  1785. },
  1786. { serverId: "America/Argentina/Buenos_Aires", clientId: "America/Argentina/Buenos_Aires", score: 100, standard: { offset: -180 } },
  1787. { serverId: "America/Cayenne", clientId: "America/Cayenne", score: 100, standard: { offset: -180, tzname: "GFT" } },
  1788. { serverId: "America/Godthab", clientId: "America/Godthab", score: 100,
  1789. standard: { offset: -180, mon: 10, week: -1, wkday: 1, hour: 1, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "WGT" },
  1790. daylight: { offset: -120, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "WGST" }
  1791. },
  1792. { serverId: "America/Montevideo", clientId: "America/Montevideo", score: 100,
  1793. standard: { offset: -180, mon: 3, week: 2, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 11 ], tzname: "UYT" },
  1794. daylight: { offset: -120, mon: 10, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 10, 7 ], tzname: "UYST" }
  1795. },
  1796. { serverId: "America/Sao_Paulo", clientId: "America/Sao_Paulo", score: 100,
  1797. standard: { offset: -180, mon: 2, week: 3, wkday: 1, hour: 0, min: 0, sec: 0, trans: [ 2012, 2, 19 ], tzname: "BRT" },
  1798. daylight: { offset: -120, mon: 10, week: 3, wkday: 1, hour: 0, min: 0, sec: 0, trans: [ 2012, 10, 21 ], tzname: "BRST" }
  1799. },
  1800. { serverId: "Atlantic/South_Georgia", clientId: "Atlantic/South_Georgia", score: 100, standard: { offset: -120, tzname: "GST" } },
  1801. { serverId: "Atlantic/Azores", clientId: "Atlantic/Azores", score: 100,
  1802. standard: { offset: -60, mon: 10, week: -1, wkday: 1, hour: 1, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "AZOT" },
  1803. daylight: { offset: 0, mon: 3, week: -1, wkday: 1, hour: 0, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "AZOST" }
  1804. },
  1805. { serverId: "Atlantic/Cape_Verde", clientId: "Atlantic/Cape_Verde", score: 100, standard: { offset: -60, tzname: "CVT" } },
  1806. { serverId: "Africa/Casablanca", clientId: "Africa/Casablanca", score: 100,
  1807. standard: { offset: 0, mon: 8, week: 2, wkday: 1, hour: 0, min: 0, sec: 0, trans: [ 2012, 8, 12 ], tzname: "WET" },
  1808. daylight: { offset: 60, mon: 5, week: 1, wkday: 1, hour: 0, min: 0, sec: 0, trans: [ 2012, 5, 6 ], tzname: "WEST" }
  1809. },
  1810. { serverId: "Africa/Monrovia", clientId: "Africa/Monrovia", score: 100, standard: { offset: 0, tzname: "GMT" } },
  1811. { serverId: "Europe/London", clientId: "Europe/London", score: 100,
  1812. standard: { offset: 0, mon: 10, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "GMT/BST" },
  1813. daylight: { offset: 60, mon: 3, week: -1, wkday: 1, hour: 1, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "GMT/BST" }
  1814. },
  1815. { serverId: "UTC", clientId: "UTC", score: 100, standard: { offset: 0, tzname: "UTC" } },
  1816. { serverId: "Africa/Algiers", clientId: "Africa/Algiers", score: 100, standard: { offset: 60, tzname: "CET" } },
  1817. { serverId: "Africa/Windhoek", clientId: "Africa/Windhoek", score: 100,
  1818. standard: { offset: 60, mon: 4, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 4, 1 ], tzname: "WAT" },
  1819. daylight: { offset: 120, mon: 9, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 9, 2 ], tzname: "WAST" }
  1820. },
  1821. { serverId: "Europe/Belgrade", clientId: "Europe/Belgrade", score: 100,
  1822. standard: { offset: 60, mon: 10, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "CET" },
  1823. daylight: { offset: 120, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "CEST" }
  1824. },
  1825. { serverId: "Europe/Berlin", clientId: "Europe/Berlin", score: 200,
  1826. standard: { offset: 60, mon: 10, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "CET" },
  1827. daylight: { offset: 120, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "CEST" }
  1828. },
  1829. { serverId: "Europe/Brussels", clientId: "Europe/Brussels", score: 100,
  1830. standard: { offset: 60, mon: 10, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "CET" },
  1831. daylight: { offset: 120, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "CEST" }
  1832. },
  1833. { serverId: "Europe/Warsaw", clientId: "Europe/Warsaw", score: 100,
  1834. standard: { offset: 60, mon: 10, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "CET" },
  1835. daylight: { offset: 120, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "CEST" }
  1836. },
  1837. { serverId: "Africa/Cairo", clientId: "Africa/Cairo", score: 100,
  1838. standard: { offset: 120, mon: 9, week: -1, wkday: 5, hour: 0, min: 0, sec: 0, trans: [ 2012, 9, 27 ], tzname: "EET" },
  1839. daylight: { offset: 180, mon: 4, week: -1, wkday: 6, hour: 0, min: 0, sec: 0, trans: [ 2012, 4, 27 ], tzname: "EEST" }
  1840. },
  1841. { serverId: "Africa/Harare", clientId: "Africa/Harare", score: 100, standard: { offset: 120, tzname: "CAT" } },
  1842. { serverId: "Asia/Amman", clientId: "Asia/Amman", score: 100,
  1843. standard: { offset: 120, mon: 10, week: -1, wkday: 6, hour: 1, min: 0, sec: 0, trans: [ 2012, 10, 26 ], tzname: "EET" },
  1844. daylight: { offset: 180, mon: 3, week: -1, wkday: 5, hour: 23, min: 59, sec: 59, trans: [ 2012, 3, 29 ], tzname: "EEST" }
  1845. },
  1846. { serverId: "Asia/Beirut", clientId: "Asia/Beirut", score: 100,
  1847. standard: { offset: 120, mon: 10, week: -1, wkday: 1, hour: 0, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "EET" },
  1848. daylight: { offset: 180, mon: 3, week: -1, wkday: 1, hour: 0, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "EEST" }
  1849. },
  1850. { serverId: "Asia/Jerusalem", clientId: "Asia/Jerusalem", score: 100,
  1851. standard: { offset: 120, mon: 9, week: 2, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 9, 9 ], tzname: "IST" },
  1852. daylight: { offset: 180, mon: 3, week: -1, wkday: 6, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 30 ], tzname: "IDT" }
  1853. },
  1854. { serverId: "Europe/Athens", clientId: "Europe/Athens", score: 200,
  1855. standard: { offset: 120, mon: 10, week: -1, wkday: 1, hour: 4, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "EET" },
  1856. daylight: { offset: 180, mon: 3, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "EEST" }
  1857. },
  1858. { serverId: "Europe/Helsinki", clientId: "Europe/Helsinki", score: 100,
  1859. standard: { offset: 120, mon: 10, week: -1, wkday: 1, hour: 4, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "EET" },
  1860. daylight: { offset: 180, mon: 3, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "EEST" }
  1861. },
  1862. { serverId: "Europe/Minsk", clientId: "Europe/Minsk", score: 100,
  1863. standard: { offset: 120, mon: 10, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "EET" },
  1864. daylight: { offset: 180, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "EEST" }
  1865. },
  1866. { serverId: "Africa/Nairobi", clientId: "Africa/Nairobi", score: 200, standard: { offset: 180, tzname: "EAT" } },
  1867. { serverId: "Asia/Baghdad", clientId: "Asia/Baghdad", score: 100, standard: { offset: 180 } },
  1868. { serverId: "Asia/Kuwait", clientId: "Asia/Kuwait", score: 100, standard: { offset: 180, tzname: "AST" } },
  1869. { serverId: "Europe/Moscow", clientId: "Europe/Moscow", score: 100,
  1870. standard: { offset: 180, mon: 10, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "MSK/MSD" },
  1871. daylight: { offset: 240, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "MSK/MSD" }
  1872. },
  1873. { serverId: "Asia/Tehran", clientId: "Asia/Tehran", score: 100,
  1874. standard: { offset: 210, mon: 9, week: 4, wkday: 4, hour: 0, min: 0, sec: 0, trans: [ 2012, 9, 26 ], tzname: "IRST" },
  1875. daylight: { offset: 270, mon: 3, week: 4, wkday: 2, hour: 0, min: 0, sec: 0, trans: [ 2012, 3, 26 ], tzname: "IRDT" }
  1876. },
  1877. { serverId: "Asia/Baku", clientId: "Asia/Baku", score: 100,
  1878. standard: { offset: 240, mon: 10, week: -1, wkday: 1, hour: 5, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "AZT" },
  1879. daylight: { offset: 300, mon: 3, week: -1, wkday: 1, hour: 4, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "AZST" }
  1880. },
  1881. { serverId: "Asia/Muscat", clientId: "Asia/Muscat", score: 100, standard: { offset: 240, tzname: "GST" } },
  1882. { serverId: "Asia/Tbilisi", clientId: "Asia/Tbilisi", score: 200, standard: { offset: 240, tzname: "GET" } },
  1883. { serverId: "Asia/Yerevan", clientId: "Asia/Yerevan", score: 100,
  1884. standard: { offset: 240, mon: 10, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "AMT" },
  1885. daylight: { offset: 300, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "AMST" }
  1886. },
  1887. { serverId: "Indian/Mauritius", clientId: "Indian/Mauritius", score: 100, standard: { offset: 240 } },
  1888. { serverId: "Asia/Kabul", clientId: "Asia/Kabul", score: 100, standard: { offset: 270, tzname: "AFT" } },
  1889. { serverId: "Asia/Karachi", clientId: "Asia/Karachi", score: 200, standard: { offset: 300 } },
  1890. { serverId: "Asia/Tashkent", clientId: "Asia/Tashkent", score: 100, standard: { offset: 300, tzname: "UZT" } },
  1891. { serverId: "Asia/Yekaterinburg", clientId: "Asia/Yekaterinburg", score: 100,
  1892. standard: { offset: 300, mon: 10, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "YEKT" },
  1893. daylight: { offset: 360, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "YEKST" }
  1894. },
  1895. { serverId: "Asia/Colombo", clientId: "Asia/Colombo", score: 100, standard: { offset: 330, tzname: "IST" } },
  1896. { serverId: "Asia/Kolkata", clientId: "Asia/Kolkata", score: 200, standard: { offset: 330, tzname: "IST" } },
  1897. { serverId: "Asia/Almaty", clientId: "Asia/Almaty", score: 100, standard: { offset: 360, tzname: "ALMT" } },
  1898. { serverId: "Asia/Dhaka", clientId: "Asia/Dhaka", score: 100, standard: { offset: 360 } },
  1899. { serverId: "Asia/Novosibirsk", clientId: "Asia/Novosibirsk", score: 100,
  1900. standard: { offset: 360, mon: 10, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "NOVT" },
  1901. daylight: { offset: 420, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "NOVST" }
  1902. },
  1903. { serverId: "Asia/Rangoon", clientId: "Asia/Rangoon", score: 100, standard: { offset: 390, tzname: "MMT" } },
  1904. { serverId: "Asia/Bangkok", clientId: "Asia/Bangkok", score: 100, standard: { offset: 420, tzname: "ICT" } },
  1905. { serverId: "Asia/Krasnoyarsk", clientId: "Asia/Krasnoyarsk", score: 100,
  1906. standard: { offset: 420, mon: 10, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "KRAT" },
  1907. daylight: { offset: 480, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "KRAST" }
  1908. },
  1909. { serverId: "Asia/Hong_Kong", clientId: "Asia/Hong_Kong", score: 200, standard: { offset: 480 } },
  1910. { serverId: "Asia/Irkutsk", clientId: "Asia/Irkutsk", score: 100,
  1911. standard: { offset: 480, mon: 10, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "IRKT" },
  1912. daylight: { offset: 540, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "IRKST" }
  1913. },
  1914. { serverId: "Asia/Kuala_Lumpur", clientId: "Asia/Kuala_Lumpur", score: 100, standard: { offset: 480, tzname: "MYT" } },
  1915. { serverId: "Asia/Taipei", clientId: "Asia/Taipei", score: 100, standard: { offset: 480 } },
  1916. { serverId: "Asia/Ulaanbaatar", clientId: "Asia/Ulaanbaatar", score: 100, standard: { offset: 480 } },
  1917. { serverId: "Australia/Perth", clientId: "Australia/Perth", score: 100, standard: { offset: 480, tzname: "WST" } },
  1918. { serverId: "Asia/Seoul", clientId: "Asia/Seoul", score: 100, standard: { offset: 540 } },
  1919. { serverId: "Asia/Tokyo", clientId: "Asia/Tokyo", score: 200, standard: { offset: 540 } },
  1920. { serverId: "Asia/Yakutsk", clientId: "Asia/Yakutsk", score: 100,
  1921. standard: { offset: 540, mon: 10, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "YAKT" },
  1922. daylight: { offset: 600, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "YAKST" }
  1923. },
  1924. { serverId: "Australia/Adelaide", clientId: "Australia/Adelaide", score: 100,
  1925. standard: { offset: 570, mon: 4, week: 1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 4, 1 ], tzname: "CST" },
  1926. daylight: { offset: 630, mon: 10, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 10, 7 ], tzname: "CST" }
  1927. },
  1928. { serverId: "Australia/Darwin", clientId: "Australia/Darwin", score: 100, standard: { offset: 570, tzname: "CST" } },
  1929. { serverId: "Asia/Vladivostok", clientId: "Asia/Vladivostok", score: 100,
  1930. standard: { offset: 600, mon: 10, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "VLAT" },
  1931. daylight: { offset: 660, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "VLAST" }
  1932. },
  1933. { serverId: "Australia/Brisbane", clientId: "Australia/Brisbane", score: 200, standard: { offset: 600, tzname: "EST" } },
  1934. { serverId: "Australia/Hobart", clientId: "Australia/Hobart", score: 100,
  1935. standard: { offset: 600, mon: 4, week: 1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 4, 1 ], tzname: "EST" },
  1936. daylight: { offset: 660, mon: 10, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 10, 7 ], tzname: "EST" }
  1937. },
  1938. { serverId: "Australia/Sydney", clientId: "Australia/Sydney", score: 200,
  1939. standard: { offset: 600, mon: 4, week: 1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 4, 1 ], tzname: "EST" },
  1940. daylight: { offset: 660, mon: 10, week: 1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 10, 7 ], tzname: "EST" }
  1941. },
  1942. { serverId: "Pacific/Guam", clientId: "Pacific/Guam", score: 100, standard: { offset: 600, tzname: "ChST" } },
  1943. { serverId: "Asia/Magadan", clientId: "Asia/Magadan", score: 100,
  1944. standard: { offset: 660, mon: 10, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "MAGT" },
  1945. daylight: { offset: 720, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "MAGST" }
  1946. },
  1947. { serverId: "Asia/Kamchatka", clientId: "Asia/Kamchatka", score: 100,
  1948. standard: { offset: 720, mon: 10, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "PETT" },
  1949. daylight: { offset: 780, mon: 3, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "PETST" }
  1950. },
  1951. { serverId: "Pacific/Auckland", clientId: "Pacific/Auckland", score: 100,
  1952. standard: { offset: 720, mon: 4, week: 1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 4, 1 ], tzname: "NZST" },
  1953. daylight: { offset: 780, mon: 9, week: -1, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 9, 30 ], tzname: "NZDT" }
  1954. },
  1955. { serverId: "Pacific/Fiji", clientId: "Pacific/Fiji", score: 100,
  1956. standard: { offset: 720, mon: 3, week: -1, wkday: 1, hour: 3, min: 0, sec: 0, trans: [ 2012, 3, 25 ], tzname: "FJT" },
  1957. daylight: { offset: 780, mon: 10, week: 4, wkday: 1, hour: 2, min: 0, sec: 0, trans: [ 2012, 10, 28 ], tzname: "FJST" }
  1958. },
  1959. { serverId: "Pacific/Tongatapu", clientId: "Pacific/Tongatapu", score: 100, standard: { offset: 780 } }
  1960. ];
  1961.  
  1962. </script>
  1963.  
  1964. <script src="/zimbra/js/Startup1_1_all.js.zgz?v=110527090709"></script>
  1965.  
  1966. <script src="/zimbra/js/Startup1_2_all.js.zgz?v=110527090709"></script>
  1967.  
  1968. <script type="text/javascript">
  1969. function ZmSkin(e){
  1970. this.hints=this.mergeObjects({
  1971. name:"velodrome2",version:"2.0.0",logo:{
  1972. url:"http://www.comcast.net/"}
  1973. ,banner:{
  1974. position:"static",url:"http://www.comcast.net/"}
  1975. ,userInfo:{
  1976. position:"static"}
  1977. ,search:{
  1978. position:"static"}
  1979. ,quota:{
  1980. position:"static"}
  1981. ,appChooser:{
  1982. direction:"LR"}
  1983. ,helpButton:{
  1984. style:"link",container:"quota",url:""}
  1985. ,logoutButton:{
  1986. style:"link",container:"quota"}
  1987. ,toast:{
  1988. location:"N",transitions:[{
  1989. type:"fade-in",step:10,duration:200}
  1990. ,{
  1991. type:"pause",duration:1000}
  1992. ,{
  1993. type:"fade-out",step:-10,duration:500}
  1994. ]}
  1995. ,skin:{
  1996. containers:"skin_outer"}
  1997. ,tree:{
  1998. minWidth:150,maxWidth:300,containers:["skin_td_outer_tree","skin_outer_tree","skin_col_tree_inner","skin_col_tree"]}
  1999. ,searchBuilder:{
  2000. containers:["skin_container_search_builder_outer","skin_td_search_builder"]}
  2001. ,topToolbar:{
  2002. containers:["skin_tr_top_toolbar","!skin_tr_top_toolbar_shim"]}
  2003. ,bottomToolbar:{
  2004. containers:["skin_tr_bottom_toolbar","!skin_tr_bottom_toolbar_shim"]}
  2005. ,treeFooter:{
  2006. containers:["skin_tr_tree_footer_sep","skin_tr_tree_footer"]}
  2007. ,topAd:{
  2008. containers:["skin_tr_top_ad"]}
  2009. ,sidebarAd:{
  2010. containers:["skin_td_sidebar_ad"]}
  2011. ,fullScreen:{
  2012. containers:["skin_tr_toolbar_full","skin_tr_main_full","!skin_tr_toolbar","!skin_tr_main","!skin_tr_status"]}}
  2013. ,e)
  2014. }
  2015. window.BaseSkin=ZmSkin;
  2016. ZmSkin.prototype={
  2017. show:function(a,r){
  2018. var s=this.hints[a]&&this.hints[a].containers;
  2019. if(s){
  2020. if(typeof s=="function"){
  2021. s(this,r);
  2022. skin._reflowApp();
  2023. return
  2024. }
  2025. if(typeof s=="string"){
  2026. s=[s]
  2027. }
  2028. for(var n=0;
  2029. n<s.length;
  2030. n++){
  2031. var o=s[n];
  2032. var t=o.replace(/^!/,"");
  2033. var e=o!=t;
  2034. this._showEl(t,e?!r:r)
  2035. }
  2036. skin._reflowApp()
  2037. }
  2038. if(a=="fullScreen"){
  2039. this._showFullScreen(r)
  2040. }}
  2041. ,hide:function(e){
  2042. this.show(e,false)
  2043. }
  2044. ,gotoApp:function(e,t){
  2045. appCtxt.getAppController().activateApp(e,null,t)
  2046. }
  2047. ,gotoPrefs:function(e){
  2048. if(appCtxt.getCurrentAppName()!=ZmApp.PREFERENCES){
  2049. var t=new AjxCallback(this,this._gotoPrefPage,[e]);
  2050. this.gotoApp(ZmApp.PREFERENCES,t)
  2051. }else{
  2052. this._gotoPrefPage(e)
  2053. }}
  2054. ,mergeObjects:function(e,o){
  2055. if(e==null){
  2056. e={}
  2057. }
  2058. for(var a=1;
  2059. a<arguments.length;
  2060. a++){
  2061. var n=arguments[a];
  2062. for(var t in n){
  2063. var s=e[t];
  2064. if(typeof s=="object"&&!(s instanceof Array)){
  2065. this.mergeObjects(e[t],n[t]);
  2066. continue
  2067. }
  2068. e[t]=n[t]
  2069. }}
  2070. return e
  2071. }
  2072. ,getTreeWidth:function(){
  2073. return Dwt.getSize(this._getEl(this.hints.tree.containers[0])).x
  2074. }
  2075. ,setTreeWidth:function(e){
  2076. this._setContainerSizes("tree",e,null)
  2077. }
  2078. ,showTopAd:function(e){
  2079. skin._showEl("skin_tr_top_ad",e);
  2080. skin._reflowApp()
  2081. }
  2082. ,hideTopAd:function(){
  2083. skin.showTopAd(false)
  2084. }
  2085. ,getTopAdContainer:function(){
  2086. return skin._getEl("skin_container_top_ad")
  2087. }
  2088. ,showSidebarAd:function(e){
  2089. var t="skin_td_sidebar_ad";
  2090. if(e!=null){
  2091. skin._setSize(t,e)
  2092. }
  2093. skin._showEl(t);
  2094. skin._reflowApp()
  2095. }
  2096. ,hideSidebarAd:function(){
  2097. var e="skin_td_sidebar_ad";
  2098. skin._hideEl(e);
  2099. skin._reflowApp()
  2100. }
  2101. ,getSidebarAdContainer:function(){
  2102. return this._getEl("skin_container_sidebar_ad")
  2103. }
  2104. ,_getEl:function(e){
  2105. return(typeof e=="string"?document.getElementById(e):e)
  2106. }
  2107. ,_showEl:function(n,o){
  2108. var t=this._getEl(n);
  2109. if(!t){
  2110. return
  2111. }
  2112. var a;
  2113. if(o==false){
  2114. a="none"
  2115. }else{
  2116. var e=t.tagName;
  2117. if(e=="TD"&&document.all==null){
  2118. a="table-cell"
  2119. }else{
  2120. if(e=="TR"&&document.all==null){
  2121. a="table-row"
  2122. }else{
  2123. a="block"
  2124. }}}
  2125. t.style.display=a
  2126. }
  2127. ,_hideEl:function(e){
  2128. this._showEl(e,false)
  2129. }
  2130. ,_reparentEl:function(o,e){
  2131. var a=this._getEl(e);
  2132. var t=a&&this._getEl(o);
  2133. if(t){
  2134. a.appendChild(t)
  2135. }}
  2136. ,_setSize:function(o,a,e){
  2137. var t=this._getEl(o);
  2138. if(!t){
  2139. return
  2140. }
  2141. if(a!=null){
  2142. t.style.width=a
  2143. }
  2144. if(e!=null){
  2145. t.style.height=e
  2146. }}
  2147. ,_setContainerSizes:function(n,a,e){
  2148. var o=this.hints[n].containers;
  2149. for(var t=0;
  2150. t<o.length;
  2151. t++){
  2152. this._setSize(o[t],a,null)
  2153. }}
  2154. ,_reflowApp:function(){
  2155. if(window._zimbraMail){
  2156. window._zimbraMail.getAppViewMgr().fitAll()
  2157. }}
  2158. ,_showFullScreen:function(o){
  2159. var a="skin_container_app_top_toolbar";
  2160. var t=o==null||o;
  2161. var e=t?"skin_border_app_top_toolbar_full":"skin_td_app_top_toolbar";
  2162. this._reparentEl(a,e);
  2163. if(AjxEnv.isIE){
  2164. var n=document.getElementById("skin_container_app_main_full");
  2165. if(n){
  2166. Dwt.setVisible(n,t)
  2167. }}}
  2168. ,_gotoPrefPage:function(a){
  2169. if(a==null){
  2170. return
  2171. }
  2172. var o=appCtxt.getApp(ZmApp.PREFERENCES);
  2173. var t=o.getPrefController();
  2174. var e=t.getPrefsView();
  2175. e.selectSection(a)
  2176. }};
  2177. window.skin=new ZmSkin();
  2178. function VelodromeSkin(){
  2179. BaseSkin.call(this,{
  2180. appChooser:{
  2181. direction:"LR",fullWidth:true}
  2182. ,helpButton:{
  2183. style:"link",container:"quota",hideIcon:true,url:"http://www.comcast.net/help/faq/index.jsp?cat=Email#SmartZone"}
  2184. ,logoutButton:{
  2185. style:"link",container:"quota",hideIcon:true}
  2186. ,quota:{
  2187. containers:["skin_td_quota"]}
  2188. ,userInfo:{
  2189. position:"static"}
  2190. ,sidebarAd:{
  2191. containers:function(t,e){
  2192. t._showEl("skin_sidebar_ad_outer",e);
  2193. t._reflowApp()
  2194. }}
  2195. ,fullScreen:{
  2196. containers:["skin_tr_main_full","!skin_tr_main","!skin_td_tree_outer","!skin_td_tree_app_sash"]}
  2197. ,searchBuilder:{
  2198. containers:["skin_tr_search_builder_toolbar","skin_tr_search_builder","skin_td_search_builder_toolbar","skin_td_search_builder"]}
  2199. ,treeFooter:{
  2200. containers:["skin_tr_tree_footer","skin_td_tree_footer","skin_container_tree_footer"]}
  2201. ,tree:{
  2202. containers:["skin_td_tree_outer"],resizeContainers:["skin_col_tree","skin_td_tree_outer"],maxWidth:400}}
  2203. )
  2204. }
  2205. VelodromeSkin.showListeners=[];
  2206. VelodromeSkin.prototype=new BaseSkin;
  2207. VelodromeSkin.prototype.constructor=VelodromeSkin;
  2208. VelodromeSkin.prototype.show=function(h,s){
  2209. ZmFolder.HIDE_ID[ZmFolder.ID_AUTO_ADDED]=true;
  2210. BaseSkin.prototype.show.apply(this,arguments);
  2211. if(h=="fullScreen"){
  2212. s=s==null||s;
  2213. var r=s?"skin_full_toolbar_container":"skin_main_toolbar_container";
  2214. var n=document.getElementById(r);
  2215. var o="skin_container_app_top_toolbar";
  2216. var e=document.getElementById(o);
  2217. n.appendChild(e)
  2218. }
  2219. if(!this._hasRunListeners){
  2220. var a=VelodromeSkin.showListeners;
  2221. for(var t=0;
  2222. t<a.length;
  2223. t++){
  2224. if(a[t] instanceof AjxCallback){
  2225. a[t].run()
  2226. }}
  2227. this._hasRunListeners=true
  2228. }};
  2229. VelodromeSkin.prototype.getSidebarAdContainer=function(){
  2230. return document.getElementById("skin_container_sidebar_ad")
  2231. };
  2232. VelodromeSkin.prototype._getPortalToolBarOps=function(){
  2233. return[]
  2234. };
  2235. VelodromeSkin.prototype.setTreeWidth=function(e){
  2236. ZmSkin.prototype.setTreeWidth.call(this,e)
  2237. };
  2238. VelodromeSkin.prototype._setContainerSizes=function(n,a,e){
  2239. var o=this.hints[n].resizeContainers||this.hints[n].containers;
  2240. for(var t=0;
  2241. t<o.length;
  2242. t++){
  2243. this._setSize(o[t],a,null)
  2244. }};
  2245. skin=new VelodromeSkin();
  2246. skin.__handleMailLaunch=function(){
  2247. appCtxt.set(ZmSetting.SEND_ON_BEHALF_OF,true)
  2248. };
  2249. ZmZimbraMail.addAppListener(ZmApp.MAIL,ZmAppEvent.PRE_LAUNCH,new AjxListener(skin,skin.__handleMailLaunch));
  2250. VelodromeSkin.prototype.__handleVoiceLaunch=function(){
  2251. ZmVoiceApp.overviewFallbackApp=ZmApp.MAIL
  2252. };
  2253. ZmZimbraMail.addAppListener(ZmApp.VOICE,ZmAppEvent.PRE_LAUNCH,new AjxListener(skin,skin.__handleVoiceLaunch));
  2254. skin.__handlePortalLaunch=function(){
  2255. this.overrideAPI(ZmPortalController.prototype,"_getToolBarOps",this._getPortalToolBarOps)
  2256. };
  2257. AjxDispatcher.addPackageLoadFunction("Portal",new AjxCallback(skin,skin.__handlePortalLaunch));
  2258. VelodromeSkin.prototype.overrideAPI=function(a,t,o){
  2259. o=o||this[t];
  2260. if(o){
  2261. var e=a[t];
  2262. a[t]=function(){
  2263. o.func=e;
  2264. return o.apply(this,arguments)
  2265. };
  2266. a[t].func=e
  2267. }};
  2268. VelodromeSkin.prototype.setShortcut=function(e){};
  2269. skin.overrideAPI(DwtMenuItem.prototype,"setShortcut");
  2270. skin.overrideAPI(ZmContactsApp.prototype,"_registerPrefs",function(){}
  2271. );
  2272. VelodromeSkin.prototype._noImportExport_handlePrefsPreLaunch=function(){
  2273. var e="IMPORT_FOLDER";
  2274. var t=ZmPref.getPrefSectionWithPref(e);
  2275. ZmPref.unregisterPrefSection(t&&t.id);
  2276. e="CHECKED_ZIMLETS";
  2277. t=ZmPref.getPrefSectionWithPref(e);
  2278. ZmPref.unregisterPrefSection(t&&t.id)
  2279. };
  2280. ZmZimbraMail.addAppListener(ZmApp.PREFERENCES,ZmAppEvent.PRE_LAUNCH,new AjxListener(skin,skin._noImportExport_handlePrefsPreLaunch));
  2281. VelodromeSkin.prototype._collapseImapTrees_handlePreStartup=function(){
  2282. appCtxt.set(ZmSetting.COLLAPSE_IMAP_TREES,true)
  2283. };
  2284. ZmZimbraMail.addListener(ZmAppEvent.PRE_STARTUP,new AjxListener(skin,skin._collapseImapTrees_handlePreStartup));
  2285. VelodromeSkin.prototype._saveToImapSent_handlePreStartup=function(){
  2286. appCtxt.set(ZmSetting.SAVE_TO_IMAP_SENT,true)
  2287. };
  2288. ZmZimbraMail.addListener(ZmAppEvent.PRE_STARTUP,new AjxListener(skin,skin._saveToImapSent_handlePreStartup));
  2289. VelodromeSkin.prototype._MailList_initializeToolBar=function(t){
  2290. arguments.callee.func.call(this,t);
  2291. var e=this._toolbar[t];
  2292. if(e){
  2293. var a;
  2294. a=e.getButton(ZmOperation.CHECK_MAIL);
  2295. if(a){
  2296. if(!appCtxt.isOffline){
  2297. var o=(appCtxt.get(ZmSetting.GET_MAIL_ACTION)==ZmSetting.GETMAIL_ACTION_DEFAULT)?ZmMsg.checkMailPrefDefault_velodrome:ZmMsg.checkMailPrefUpdate_velodrome;
  2298. a.setToolTipContent(o)
  2299. }}
  2300. a=e.getButton(ZmOperation.PRINT);
  2301. if(a){
  2302. a.setText(ZmMsg.print)
  2303. }
  2304. if(!appCtxt.isChildWindow){
  2305. a=e.getButton(ZmOperation.MOVE);
  2306. if(a){
  2307. a.setText(ZmMsg.move)
  2308. }
  2309. a=e.getButton(ZmOperation.DELETE_MENU);
  2310. if(a){
  2311. a.setText(ZmMsg.del)
  2312. }
  2313. a=e.getButton(ZmOperation.DELETE);
  2314. if(a){
  2315. a.setText(ZmMsg.del)
  2316. }
  2317. if(AjxEnv.is800x600orLower){
  2318. a=e.getButton(REPLY);
  2319. if(a){
  2320. a.setText("")
  2321. }
  2322. a=e.getButton(REPLY_ALL);
  2323. if(a){
  2324. a.setText("")
  2325. }}}}};
  2326. VelodromeSkin.prototype._DoublePane_getToolBarOps=VelodromeSkin.prototype._MailList_getToolBarOps=function(){
  2327. if(appCtxt.isChildWindow){
  2328. return[ZmOperation.PRINT,ZmOperation.CLOSE]
  2329. }
  2330. var e=this._getDefaultToolBarOps();
  2331. e.push(ZmOperation.SEP,ZmOperation.VIEW_MENU);
  2332. return e
  2333. };
  2334. VelodromeSkin.prototype._Msg_getToolBarOps=VelodromeSkin.prototype._Conv_getToolBarOps=function(){
  2335. if(appCtxt.isChildWindow){
  2336. return[ZmOperation.PRINT,ZmOperation.CLOSE]
  2337. }
  2338. var e=this._getDefaultToolBarOps();
  2339. e.push(ZmOperation.TAG_MENU,ZmOperation.SEP);
  2340. if(appCtxt.get(ZmSetting.DETACH_MAILVIEW_ENABLED)){
  2341. e.push(ZmOperation.DETACH)
  2342. }
  2343. return e
  2344. };
  2345. VelodromeSkin.prototype._Mail_getDefaultToolBarOps=function(){
  2346. var e=[];
  2347. e.push(ZmOperation.NEW_MENU,ZmOperation.CHECK_MAIL,ZmOperation.SEP,ZmOperation.REPLY,ZmOperation.REPLY_ALL,ZmOperation.FORWARD,ZmOperation.SEP,ZmOperation.EDIT);
  2348. e.push((window.ZmConvController&&this instanceof ZmConvController)?ZmOperation.DELETE_MENU:ZmOperation.DELETE);
  2349. e.push(ZmOperation.MOVE,ZmOperation.SPAM,ZmOperation.PRINT);
  2350. return e
  2351. };
  2352. VelodromeSkin.prototype._Mail_resetOperations=function(n,a){
  2353. arguments.callee.func.call(this,n,a);
  2354. if(n&&n instanceof ZmToolBar){
  2355. var s;
  2356. var e=this._getSearchFolderId();
  2357. if(a==1&&(e!=ZmFolder.ID_DRAFTS)){
  2358. var r=this._listView[this._currentView].getSelection();
  2359. if(r&&r.length){
  2360. s=r[0]
  2361. }}
  2362. var t=(s&&s.isDraft)||(e==ZmFolder.ID_DRAFTS);
  2363. var o=n.getButton&&n.getButton(ZmOperation.VIEW_MENU);
  2364. if(o){
  2365. var h=o.getMenu();
  2366. if(h){
  2367. h.enable(ZmOperation.DETACH,(appCtxt.get(ZmSetting.DETACH_MAILVIEW_ENABLED)&&!t&&a==1))
  2368. }}}};
  2369. VelodromeSkin.prototype._Mail_setupGroupByMenuItems=function(e,a){
  2370. arguments.callee.func.call(this,e,a);
  2371. if(a){
  2372. var t=a.createMenuItem(ZmOperation.DETACH,{
  2373. image:"OpenInNewWindow",text:ZmMsg.detach}
  2374. );
  2375. t.addSelectionListener(this._listeners[ZmOperation.DETACH])
  2376. }};
  2377. VelodromeSkin.prototype._createComcastAppIconButton=function(){
  2378. if(!appCtxt.isChildWindow){
  2379. VelodromeSkin.prototype._Msg_getTabParams=function(t,e){
  2380. return{
  2381. id:t,image:"MessageView",textPrecedence:85,tooltip:ZmMsgController.DEFAULT_TAB_TEXT,tabCallback:e,hasIcon:true}
  2382. };
  2383. VelodromeSkin.prototype._Compose_getTabParams=function(){
  2384. return{
  2385. id:this.tabId,image:"NewMessage",textPrecedence:75,tooltip:ZmComposeController.DEFAULT_TAB_TEXT,hasIcon:true}
  2386. };
  2387. ComcastAppIconButton=function(e){
  2388. if(arguments.length==0){
  2389. return
  2390. }
  2391. ZmAppButton.call(this,e)
  2392. };
  2393. ComcastAppIconButton.prototype=new ZmAppButton;
  2394. ComcastAppIconButton.prototype.constructor=ComcastAppIconButton;
  2395. ComcastAppIconButton.prototype.toString=function(){
  2396. return"ComcastAppIconButton"
  2397. };
  2398. ComcastAppIconButton.prototype.TEMPLATE="share.Widgets#ZmAppChooserIconButton";
  2399. VelodromeSkin.prototype._appChooser_addButton=function(o,a){
  2400. var t={
  2401. parent:this,id:ZmId.getButtonId(ZmId.APP,o),text:a.text,image:a.image,index:a.index};
  2402. var e=(a.hasIcon)?new ComcastAppIconButton(t):new ZmAppButton(t);
  2403. e.setToolTipContent(a.tooltip);
  2404. e.textPrecedence=a.textPrecedence;
  2405. e.imagePrecedence=a.imagePrecedence;
  2406. e.setData(Dwt.KEY_ID,o);
  2407. e.addSelectionListener(this._buttonListener);
  2408. this._buttons[o]=e;
  2409. if(e.textPrecedence||e.imagePrecedence){
  2410. this._createPrecedenceList()
  2411. }
  2412. this.adjustSize();
  2413. return e
  2414. }
  2415. }};
  2416. VelodromeSkin.prototype._mail_handleStartup2Load=function(){
  2417. if(appCtxt&&!appCtxt.isChildWindow){
  2418. this._createComcastAppIconButton();
  2419. var e=window.ZmAppChooser&&ZmAppChooser.prototype;
  2420. if(e){
  2421. this.overrideAPI(ZmAppChooser.prototype,"addButton",this._appChooser_addButton)
  2422. }}};
  2423. AjxDispatcher.addPackageLoadFunction("Startup2",new AjxCallback(skin,skin._mail_handleStartup2Load));
  2424. VelodromeSkin.prototype._mail_handleMailCoreLoad=function(){
  2425. var e=window.ZmDoublePaneController&&ZmDoublePaneController.prototype;
  2426. if(e){
  2427. this.overrideAPI(e,"_getToolBarOps",this._DoublePane_getToolBarOps);
  2428. this.overrideAPI(e,"_getDefaultToolBarOps",this._Mail_getDefaultToolBarOps);
  2429. this.overrideAPI(e,"_resetOperations",this._Mail_resetOperations)
  2430. }
  2431. var e=window.ZmMailListController&&ZmMailListController.prototype;
  2432. if(e){
  2433. this.overrideAPI(e,"_initializeToolBar",this._MailList_initializeToolBar);
  2434. this.overrideAPI(e,"_getToolBarOps",this._MailList_getToolBarOps);
  2435. this.overrideAPI(e,"_getDefaultToolBarOps",this._Mail_getDefaultToolBarOps);
  2436. this.overrideAPI(e,"_resetOperations",this._Mail_resetOperations);
  2437. this.overrideAPI(e,"_setupGroupByMenuItems",this._Mail_setupGroupByMenuItems)
  2438. }
  2439. ZmOperation.NEW_ITEM_KEY[ZmOperation.NEW_MESSAGE]="newMessage";
  2440. ZmOperation.NEW_ITEM_KEY[ZmOperation.NEW_FOLDER]="newFolder"
  2441. };
  2442. VelodromeSkin.prototype._mail_handleMailLoad=function(){
  2443. var e=window.ZmMsgController&&ZmMsgController.prototype;
  2444. if(e){
  2445. this.overrideAPI(e,"_getToolBarOps",this._Msg_getToolBarOps);
  2446. this.overrideAPI(e,"_getDefaultToolBarOps",this._Mail_getDefaultToolBarOps);
  2447. this.overrideAPI(e,"_getTabParams",this._Msg_getTabParams)
  2448. }
  2449. var e=window.ZmConvController&&ZmConvController.prototype;
  2450. if(e){
  2451. this.overrideAPI(e,"_getToolBarOps",this._Conv_getToolBarOps);
  2452. this.overrideAPI(e,"_getDefaultToolBarOps",this._Mail_getDefaultToolBarOps);
  2453. this.overrideAPI(e,"_resetOperations",this._Mail_resetOperations)
  2454. }
  2455. var e=window.ZmComposeController&&ZmComposeController.prototype;
  2456. if(e){
  2457. this.overrideAPI(e,"_getTabParams",this._Compose_getTabParams)
  2458. }};
  2459. AjxDispatcher.addPackageLoadFunction("MailCore",new AjxCallback(skin,skin._mail_handleMailCoreLoad));
  2460. AjxDispatcher.addPackageLoadFunction("Mail",new AjxCallback(skin,skin._mail_handleMailLoad));
  2461. skin.overrideAPI(ZmVoiceApp.prototype,"getVoiceInfo",function(r,o,s,e){
  2462. skin.__handleVoiceLoad();
  2463. if(!this.phones.length||e){
  2464. if(!this._gettingVoiceInfo||e){
  2465. this.phones.length=0;
  2466. var n=AjxSoapDoc.create("GetVoiceInfoExtRequest","urn:zimbraVoice");
  2467. var a=n.set("prd","true");
  2468. var h=new AjxCallback(this,this._handleResponseVoiceInfo);
  2469. var l=new AjxCallback(this,this._handleErrorResponseVoiceInfo);
  2470. var t={
  2471. soapDoc:n,asyncMode:true,noBusyOverlay:s,callback:h,errorCallback:l};
  2472. appCtxt.getAppController().sendRequest(t);
  2473. this._gettingVoiceInfo=true
  2474. }
  2475. if(r){
  2476. this._voiceInfoCallbacks=this._voiceInfoCallbacks||[];
  2477. this._voiceInfoCallbacks.push(r)
  2478. }
  2479. if(o){
  2480. this._voiceInfoErrorCallbacks=this._voiceInfoErrorCallbacks||[];
  2481. this._voiceInfoErrorCallbacks.push(o)
  2482. }}else{
  2483. if(r){
  2484. r.run()
  2485. }}}
  2486. );
  2487. skin.overrideAPI(ZmVoiceApp.prototype,"_handleResponseVoiceInfo2",function(){
  2488. skin.__handleVoiceLoad();
  2489. return arguments.callee.func.apply(this,arguments)
  2490. }
  2491. );
  2492. VelodromeSkin.prototype.__handleVoiceLoad=function(){
  2493. if(!this.__hasOverriddenVoice&&window.ZmPhone){
  2494. this.__hasOverriddenVoice=true;
  2495. skin.overrideAPI(ZmPhone.prototype,"_loadFromDom",function(e){
  2496. this.hasTextMessaging=e.textmsg;
  2497. this.sns=e.sns;
  2498. this.textmsg_users=e.textmsg_users;
  2499. return arguments.callee.func.apply(this,arguments)
  2500. }
  2501. )
  2502. }};
  2503. AjxDispatcher.addPackageLoadFunction("Voice",new AjxCallback(skin,skin.__handleVoiceLoad));
  2504. VelodromeSkin.prototype._getContactListToolBarOps=function(){
  2505. return[ZmOperation.NEW_MENU,ZmOperation.SEP,ZmOperation.EDIT,ZmOperation.SEP,ZmOperation.DELETE,ZmOperation.PRINT,ZmOperation.SEP,ZmOperation.TAG_MENU]
  2506. };
  2507. VelodromeSkin.prototype._getContactListActionMenuOps=function(){
  2508. var e=this._participantOps();
  2509. e.push(ZmOperation.SEP,ZmOperation.TAG_MENU,ZmOperation.DELETE,ZmOperation.PRINT_CONTACT);
  2510. return e
  2511. };
  2512. VelodromeSkin.prototype.addRow=function(e,t){
  2513. arguments.callee.func.apply(this,arguments);
  2514. if(this._rowCount>=this._maxRows){
  2515. return
  2516. }
  2517. if(t==null){
  2518. t=this._rowCount-1
  2519. }
  2520. e=e||(this._rowDef&&AjxUtil.createProxy(this._rowDef));
  2521. if(!e){
  2522. return
  2523. }
  2524. e.id=e.id||this._items[t].id;
  2525. var a={};
  2526. a.id=e.id+"_helptext";
  2527. a.visible="true";
  2528. var n=this._registerControl(a,null,null,null,null,"DwtLabel");
  2529. var o=this._items[e.id];
  2530. o._helpId=a.id;
  2531. this._setControlIds(o.id,t);
  2532. if(this._itemDef.id=="EMAIL"){
  2533. this._setFirstHelpText(ZmMsg.contactEditAddRemoveHelp)
  2534. }};
  2535. VelodromeSkin.prototype.removeRow=function(e){
  2536. arguments.callee.func.apply(this,arguments);
  2537. if(this._itemDef.id=="EMAIL"){
  2538. this._setFirstHelpText(ZmMsg.contactEditAddRemoveHelp)
  2539. }};
  2540. VelodromeSkin.prototype._setFirstHelpText=function(o){
  2541. for(var e=0;
  2542. e<this._rowCount;
  2543. e++){
  2544. var a=this._items[e]._helpId;
  2545. if(a){
  2546. var t=this._items[a].control;
  2547. if(t){
  2548. t.setText((e==0)?o:"")
  2549. }}}};
  2550. VelodromeSkin.prototype._setControlIds=function(o,e){
  2551. arguments.callee.func.apply(this,arguments);
  2552. var n=[this.getHTMLElId(),e].join("_");
  2553. var t=this._items[o];
  2554. var a=this._items[t._helpId];
  2555. this._setControlId(a&&a.control,n+"_helptext")
  2556. };
  2557. VelodromeSkin.prototype._handleContactsLoad=function(){
  2558. var e=window.ZmContactListController&&ZmContactListController.prototype;
  2559. if(e){
  2560. this.overrideAPI(e,"_getToolBarOps",this._getContactListToolBarOps);
  2561. this.overrideAPI(e,"_getActionMenuOps",this._getContactListActionMenuOps)
  2562. }
  2563. var e=window.ZmEditContactViewInputSelectRows&&ZmEditContactViewInputSelectRows.prototype;
  2564. if(e){
  2565. this.overrideAPI(e,"addRow",this.addRow);
  2566. this.overrideAPI(e,"removeRow",this.removeRow);
  2567. this.overrideAPI(e,"_setControlIds",this._setControlIds);
  2568. this.overrideAPI(e,"_setFirstHelpText",this._setFirstHelpText)
  2569. }
  2570. ZmEditContactViewRows.prototype.ROW_TEMPLATE="abook.Contacts#ZmEditContactViewRow"
  2571. };
  2572. VelodromeSkin.prototype._handleContactsCoreLoad=function(){
  2573. ZmOperation.NEW_ITEM_KEY[ZmOperation.NEW_CONTACT]="newContact";
  2574. ZmOperation.NEW_ITEM_KEY[ZmOperation.NEW_GROUP]="newGroup"
  2575. };
  2576. AjxDispatcher.addPackageLoadFunction("Contacts",new AjxCallback(skin,skin._handleContactsLoad));
  2577. AjxDispatcher.addPackageLoadFunction("ContactsCore",new AjxCallback(skin,skin._handleContactsCoreLoad));
  2578. VelodromeSkin.prototype._SignaturesPage_initialize=function(t){
  2579. t.getHtmlElement().innerHTML=AjxTemplate.expand(ZmSignaturesPage.SIGNATURE_TEMPLATE,{
  2580. id:this._htmlElId}
  2581. );
  2582. var h=document.getElementById(this._htmlElId+"_SIG_LIST");
  2583. var l=new ZmSignatureListView(this);
  2584. this._replaceControlElement(h,l);
  2585. l.setMultiSelect(false);
  2586. l.addSelectionListener(new AjxListener(this,this._selectionListener));
  2587. l.setUI(null,true);
  2588. this._sigList=l;
  2589. var a=document.getElementById(this._htmlElId+"_SIG_NAME");
  2590. var n={
  2591. parent:this,type:DwtInputField.STRING,required:true,validationStyle:DwtInputField.CONTINUAL_VALIDATION,validator:AjxCallback.simpleClosure(this._updateName,this)};
  2592. var d=this._sigName=new DwtInputField(n);
  2593. this._replaceControlElement(a,d);
  2594. var c=document.getElementById(this._htmlElId+"_SIG_FORMAT");
  2595. if(c&&appCtxt.get(ZmSetting.HTML_COMPOSE_ENABLED)){
  2596. var u=new DwtSelect(this);
  2597. u.setToolTipContent(ZmMsg.formatTooltip);
  2598. u.addOption(ZmMsg.formatAsText,1,true);
  2599. u.addOption(ZmMsg.formatAsHtml,0,false);
  2600. u.addChangeListener(new AjxListener(this,this._handleFormatSelect));
  2601. this._replaceControlElement(c,u);
  2602. this._sigFormat=u
  2603. }
  2604. var e=document.getElementById(this._htmlElId+"_SIG_BUTTON");
  2605. var s=new DwtButton(this);
  2606. s.setText(ZmMsg.del);
  2607. s.addSelectionListener(new AjxListener(this,this._handleDeleteButton));
  2608. this._replaceControlElement(e,s);
  2609. this._sigBtn=s;
  2610. var o=document.getElementById(this._htmlElId+"_SIG_EDITOR");
  2611. var r=new ZmSignatureEditor(this);
  2612. this._replaceControlElement(o,r);
  2613. this._sigEditor=r
  2614. };
  2615. VelodromeSkin.prototype._SignaturesPage_validate=function(){
  2616. if(this._selSignature){
  2617. this._updateSignature()
  2618. }
  2619. var h=this.getAllSignatures(true);
  2620. var e=appCtxt.get(ZmSetting.SIGNATURE_MAX_LENGTH);
  2621. for(var n=0;
  2622. n<h.length;
  2623. n++){
  2624. var t=h[n];
  2625. var r=(t.name.replace(/\s*/g,"")=="");
  2626. var o=(t.value.replace(/\s*/g,"")=="");
  2627. var l=new RegExp("^"+ZmMsg.signature+"\\s#(\\d+)$","i");
  2628. var a=t.name.match(l);
  2629. if(r&&o){
  2630. this._deleteSignature(t)
  2631. }else{
  2632. if(r||(o&&!a)){
  2633. this._errorMsg=r?ZmMsg.signatureNameMissingRequired:ZmMsg.signatureValueMissingRequired;
  2634. return false
  2635. }}
  2636. var s=t.value;
  2637. if(s.length>e){
  2638. this._errorMsg=AjxMessageFormat.format((t.contentType==ZmMimeTable.TEXT_HTML)?ZmMsg.errorHtmlSignatureTooLong:ZmMsg.errorSignatureTooLong,e);
  2639. return false
  2640. }}
  2641. return true
  2642. };
  2643. VelodromeSkin.prototype._preferences_handlePreferencesLoad=function(){
  2644. var e=window.ZmSignaturesPage&&ZmSignaturesPage.prototype;
  2645. if(e){
  2646. this.overrideAPI(e,"_initialize",this._SignaturesPage_initialize);
  2647. this.overrideAPI(e,"validate",this._SignaturesPage_validate)
  2648. }};
  2649. AjxDispatcher.addPackageLoadFunction("Preferences",new AjxCallback(skin,skin._preferences_handlePreferencesLoad));
  2650. VelodromeSkin.F_homeAddress="homeAddress";
  2651. VelodromeSkin.F_otherAddress="otherAddress";
  2652. VelodromeSkin.F_otherAnniversary="otherAnniversary";
  2653. VelodromeSkin.F_otherAsstName="otherAsstName";
  2654. VelodromeSkin.F_otherCustom="otherCustom";
  2655. VelodromeSkin.F_otherDepartment="otherDepartment";
  2656. VelodromeSkin.F_otherMgrName="otherMgrName";
  2657. VelodromeSkin.F_otherOffice="otherOffice";
  2658. VelodromeSkin.F_otherProfession="otherProfession";
  2659. VelodromeSkin.F_tollFree="tollFree";
  2660. VelodromeSkin.F_workAddress="workAddress";
  2661. VelodromeSkin.F_workEmail="workEmail";
  2662. VelodromeSkin.F_workIMAddress="workIM";
  2663. VelodromeSkin.F_workMobile="workMobile";
  2664. VelodromeSkin.F_imNone="_NONE";
  2665. VelodromeSkin.F_imYahoo="yahoo";
  2666. VelodromeSkin.F_imAOL="aol";
  2667. VelodromeSkin.F_imMSN="msn";
  2668. VelodromeSkin.F_imOther="other";
  2669. VelodromeSkin.prototype._customContactFields_packageLoad=function(){
  2670. window.VelodromeSkinOther=function(){
  2671. ZmEditContactViewOther.apply(this,arguments)
  2672. };
  2673. VelodromeSkinOther.prototype=new ZmEditContactViewOther;
  2674. VelodromeSkinOther.prototype.constructor=VelodromeSkinOther;
  2675. VelodromeSkinOther.prototype.DATE_ATTRS={
  2676. birthday:true,otherAnniversary:true};
  2677. VelodromeSkinOther.prototype._createSelect=function(){
  2678. var t=ZmEditContactViewInputSelect.prototype._createSelect.apply(this,arguments);
  2679. t.addChangeListener(new AjxListener(this,this._resetPicker));
  2680. return t
  2681. };
  2682. ZmEditContactView.updateFieldLists();
  2683. ZmEditContactView.LISTS.EMAIL.onlyvalue=false;
  2684. ZmEditContactView.LISTS.IM.onlyvalue=false;
  2685. ZmEditContactView.LISTS.VELODROME_ADDRESS=ZmEditContactView.LISTS.ADDRESS;
  2686. ZmEditContactView.ATTRS.DEPARTMENT=VelodromeSkin.F_otherDepartment;
  2687. delete ZmEditContactView.LISTS.ADDRESS;
  2688. ZmEditContactView.ALWAYS_SHOW={
  2689. FIRST:true,LAST:true,TITLE:true,COMPANY:true};
  2690. var e=ZmEditContactView.prototype;
  2691. this.overrideAPI(e,"getFormItems");
  2692. this.overrideAPI(e,"getEmailOptions");
  2693. this.overrideAPI(e,"getPhoneOptions");
  2694. this.overrideAPI(e,"getIMOptions");
  2695. this.overrideAPI(e,"getIMOptions2");
  2696. this.overrideAPI(e,"getAddressOptions");
  2697. this.overrideAPI(e,"getURLOptions");
  2698. this.overrideAPI(e,"getOtherOptions");
  2699. this.overrideAPI(e,"getFileAsOptions")
  2700. };
  2701. VelodromeSkin.prototype._customContactFields_basePackageLoad=function(){
  2702. ZmContact.EMAIL_FIELDS=[ZmContact.F_email,VelodromeSkin.F_workEmail];
  2703. ZmContact.PHONE_FIELDS=[ZmContact.F_mobilePhone,ZmContact.F_homePhone,ZmContact.F_otherPhone,ZmContact.F_homeFax,ZmContact.F_pager,ZmContact.F_workPhone,VelodromeSkin.F_workMobile,ZmContact.F_workAltPhone,ZmContact.F_workFax,ZmContact.F_assistantPhone,ZmContact.F_companyPhone,ZmContact.F_otherFax,VelodromeSkin.F_tollFree];
  2704. ZmContact.IM_FIELDS=[ZmContact.F_imAddress,VelodromeSkin.F_workIMAddress];
  2705. ZmContact.ADDRESS_FIELDS=[VelodromeSkin.F_homeAddress,VelodromeSkin.F_workAddress,VelodromeSkin.F_otherAddress];
  2706. ZmContact.OTHER_FIELDS=[ZmContact.F_birthday,VelodromeSkin.F_otherAnniversary,VelodromeSkin.F_otherOffice,VelodromeSkin.F_otherProfession,VelodromeSkin.F_otherMgrName,VelodromeSkin.F_otherAsstName,VelodromeSkin.F_otherCustom];
  2707. ZmContact.updateFieldConstants();
  2708. ZmContact.IS_ADDONE[VelodromeSkin.F_workEmail]=true;
  2709. ZmContact.IS_ADDONE[VelodromeSkin.F_workIMAddress]=true;
  2710. ZmContact.IS_ADDONE[VelodromeSkin.F_otherCustom]=true;
  2711. ZmContact.IGNORE_NORMALIZATION=[ZmContact.F_homePhone]
  2712. };
  2713. VelodromeSkin.prototype.getFormItems=function(){
  2714. var t=arguments.callee.func.apply(this,arguments);
  2715. if(!t._modified){
  2716. t._modified=true;
  2717. var o=this.getFormItemById("IM",t);
  2718. o.type="ZmEditContactViewInputDoubleSelectRows";
  2719. o.rowitem={
  2720. type:"ZmEditContactViewIMDouble",equals:ZmEditContactViewInputSelect.equals,params:{
  2721. hint:ZmMsg.imScreenNameHint,cols:60,options:this.getIMOptions(),options2:this.getIMOptions2()}};
  2722. o.maxrows=4;
  2723. var a=this.getFormItemById("ADDRESS",t);
  2724. a.id="VELODROME_ADDRESS",a.rowitem={
  2725. type:"ZmEditContactViewInputSelect",equals:ZmEditContactViewInputSelect.equals,template:"abook.Contacts#ZmEditContactViewAddressSelect",params:{
  2726. hint:"Address",cols:40,rows:3,options:this.getAddressOptions()}};
  2727. var e=this.getFormItemById("OTHER",t);
  2728. e.rowitem.type="VelodromeSkinOther"
  2729. }
  2730. return t
  2731. };
  2732. VelodromeSkin.prototype.getEmailOptions=function(){
  2733. return[{
  2734. value:ZmContact.F_email,label:"Home",max:3}
  2735. ,{
  2736. value:VelodromeSkin.F_workEmail,label:"Work",max:3}
  2737. ]
  2738. };
  2739. VelodromeSkin.prototype.getPhoneOptions=function(){
  2740. return[{
  2741. value:ZmContact.F_mobilePhone,label:"Mobile",max:1}
  2742. ,{
  2743. value:ZmContact.F_homePhone,label:"Home",max:1}
  2744. ,{
  2745. value:ZmContact.F_otherPhone,label:"Home Alternate",max:1}
  2746. ,{
  2747. value:ZmContact.F_homeFax,label:"Home Fax",max:1}
  2748. ,{
  2749. value:ZmContact.F_pager,label:"Work Pager",max:1}
  2750. ,{
  2751. value:ZmContact.F_workPhone,label:"Work",max:1}
  2752. ,{
  2753. value:VelodromeSkin.F_workMobile,label:"Work Mobile",max:1}
  2754. ,{
  2755. value:ZmContact.F_workAltPhone,label:"Work Alternate",max:1}
  2756. ,{
  2757. value:ZmContact.F_workFax,label:"Work Fax",max:1}
  2758. ,{
  2759. value:ZmContact.F_assistantPhone,label:"Assistant",max:1}
  2760. ,{
  2761. value:ZmContact.F_companyPhone,label:"Company",max:1}
  2762. ,{
  2763. value:ZmContact.F_otherFax,label:"Other Fax",max:1}
  2764. ,{
  2765. value:VelodromeSkin.F_tollFree,label:"Toll Free",max:1}
  2766. ]
  2767. };
  2768. VelodromeSkin.prototype.getIMOptions2=function(){
  2769. return[{
  2770. value:VelodromeSkin.F_imNone,label:ZmMsg.none}
  2771. ,{
  2772. value:VelodromeSkin.F_imYahoo,label:ZmMsg.imGateway_yahoo}
  2773. ,{
  2774. value:VelodromeSkin.F_imAOL,label:ZmMsg.imGateway_aol}
  2775. ,{
  2776. value:VelodromeSkin.F_imMSN,label:ZmMsg.imGateway_msn}
  2777. ,{
  2778. value:VelodromeSkin.F_imOther,label:ZmMsg.other}
  2779. ]
  2780. };
  2781. VelodromeSkin.prototype.getIMOptions=function(){
  2782. return[{
  2783. value:ZmContact.F_imAddress,label:"Home",max:2}
  2784. ,{
  2785. value:VelodromeSkin.F_workIMAddress,label:"Work",max:2}
  2786. ]
  2787. };
  2788. VelodromeSkin.prototype.getAddressOptions=function(){
  2789. return[{
  2790. value:VelodromeSkin.F_homeAddress,label:"Home",max:1}
  2791. ,{
  2792. value:VelodromeSkin.F_workAddress,label:"Work",max:1}
  2793. ,{
  2794. value:VelodromeSkin.F_otherAddress,label:ZmMsg.other,max:1}
  2795. ]
  2796. };
  2797. VelodromeSkin.prototype.getURLOptions=function(){
  2798. return[{
  2799. value:ZmContact.F_homeURL,label:"Home",max:1}
  2800. ,{
  2801. value:ZmContact.F_workURL,label:"Work",max:1}
  2802. ]
  2803. };
  2804. VelodromeSkin.prototype.getOtherOptions=function(){
  2805. return[{
  2806. value:ZmContact.F_birthday,label:"Birthday",max:1}
  2807. ,{
  2808. value:VelodromeSkin.F_otherAnniversary,label:"Anniversary",max:1}
  2809. ,{
  2810. value:VelodromeSkin.F_otherOffice,label:"Office",max:1}
  2811. ,{
  2812. value:VelodromeSkin.F_otherProfession,label:"Profession",max:1}
  2813. ,{
  2814. value:VelodromeSkin.F_otherMgrName,label:"Manager",max:1}
  2815. ,{
  2816. value:VelodromeSkin.F_otherAsstName,label:"Assistant",max:1}
  2817. ,{
  2818. value:VelodromeSkin.F_otherCustom,label:"Custom",max:4}
  2819. ]
  2820. };
  2821. VelodromeSkin.prototype.getFileAsOptions=function(){
  2822. return arguments.callee.func.apply(this,arguments)
  2823. };
  2824. AjxDispatcher.addPackageLoadFunction("Contacts",new AjxCallback(skin,skin._customContactFields_packageLoad));
  2825. AjxDispatcher.addPackageLoadFunction("ContactsCore",new AjxCallback(skin,skin._customContactFields_basePackageLoad));
  2826. JSON=function(){};
  2827. (function(){
  2828. function e(t){
  2829. return t<10?"0"+t:t
  2830. }
  2831. if(typeof Date.prototype.toJSON!=="function"){
  2832. Date.prototype.toJSON=function(t){
  2833. return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+e(this.getUTCMonth()+1)+"-"+e(this.getUTCDate())+"T"+e(this.getUTCHours())+":"+e(this.getUTCMinutes())+":"+e(this.getUTCSeconds())+"Z":null
  2834. }
  2835. }
  2836. String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(t){
  2837. return this.valueOf()
  2838. }
  2839. }
  2840. )();
  2841. JSON.cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
  2842. JSON.escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
  2843. JSON.meta={
  2844. "\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};
  2845. JSON.rep;
  2846. JSON.quote=function(e){
  2847. JSON.escapable.lastIndex=0;
  2848. return JSON.escapable.test(e)?'"'+e.replace(JSON.escapable,function(t){
  2849. var o=JSON.meta[t];
  2850. return typeof o==="string"?o:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)
  2851. }
  2852. )+'"':'"'+e+'"'
  2853. };
  2854. JSON.str=function(h,n){
  2855. var a,t,l,e,s=JSON.gap,o,r=n[h];
  2856. if(r&&typeof r==="object"&&typeof r.toJSON==="function"){
  2857. r=r.toJSON(h)
  2858. }
  2859. if(typeof JSON.rep==="function"){
  2860. r=JSON.rep.call(n,h,r)
  2861. }
  2862. switch(typeof r){
  2863. case"string":return JSON.quote(r);
  2864. case"number":return isFinite(r)?String(r):"null";
  2865. case"boolean":case"null":return String(r);
  2866. case"object":if(!r){
  2867. return"null"
  2868. }
  2869. JSON.gap+=JSON.indent;
  2870. o=[];
  2871. if(Object.prototype.toString.apply(r)==="[object Array]"){
  2872. e=r.length;
  2873. for(a=0;
  2874. a<e;
  2875. a+=1){
  2876. o[a]=JSON.str(a,r)||"null"
  2877. }
  2878. l=o.length===0?"[]":JSON.gap?"[\n"+JSON.gap+o.join(",\n"+JSON.gap)+"\n"+s+"]":"["+o.join(",")+"]";
  2879. JSON.gap=s;
  2880. return l
  2881. }
  2882. if(JSON.rep&&typeof JSON.rep==="object"){
  2883. e=JSON.rep.length;
  2884. for(a=0;
  2885. a<e;
  2886. a+=1){
  2887. t=JSON.rep[a];
  2888. if(typeof t==="string"){
  2889. l=JSON.str(t,r);
  2890. if(l){
  2891. o.push(JSON.quote(t)+(JSON.gap?": ":":")+l)
  2892. }}}}else{
  2893. for(t in r){
  2894. if(Object.hasOwnProperty.call(r,t)){
  2895. l=JSON.str(t,r);
  2896. if(l){
  2897. o.push(JSON.quote(t)+(JSON.gap?": ":":")+l)
  2898. }}}}
  2899. l=o.length===0?"{}":JSON.gap?"{\n"+JSON.gap+o.join(",\n"+JSON.gap)+"\n"+s+"}":"{"+o.join(",")+"}";
  2900. JSON.gap=s;
  2901. return l
  2902. }};
  2903. JSON.stringify=function(o,t,a){
  2904. var e;
  2905. JSON.gap="";
  2906. JSON.indent="";
  2907. if(typeof a==="number"){
  2908. for(e=0;
  2909. e<a;
  2910. e+=1){
  2911. JSON.indent+=" "
  2912. }}else{
  2913. if(typeof a==="string"){
  2914. JSON.indent=a
  2915. }}
  2916. JSON.rep=t;
  2917. if(t&&typeof t!=="function"&&(typeof t!=="object"||typeof t.length!=="number")){
  2918. throw new Error("JSON.stringify")
  2919. }
  2920. return JSON.str("",{
  2921. "":o}
  2922. )
  2923. };
  2924. JSON.parse=function(text,reviver){
  2925. var j;
  2926. var walk=function walk(holder,key){
  2927. var k,v,value=holder[key];
  2928. if(value&&typeof value==="object"){
  2929. for(k in value){
  2930. if(Object.hasOwnProperty.call(value,k)){
  2931. v=walk(value,k);
  2932. if(v!==undefined){
  2933. value[k]=v
  2934. }else{
  2935. delete value[k]
  2936. }}}}
  2937. return reviver.call(holder,key,value)
  2938. };
  2939. text=String(text);
  2940. JSON.lastIndex=0;
  2941. if(JSON.cx.test(text)){
  2942. text=text.replace(JSON.cx,function(a){
  2943. return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)
  2944. }
  2945. )
  2946. }
  2947. if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){
  2948. j=eval("("+text+")");
  2949. return typeof reviver==="function"?walk({
  2950. "":j}
  2951. ,""):j
  2952. }
  2953. throw new SyntaxError("JSON.parse")
  2954. };
  2955. window.PLAXO_URL_BASE="http://calendar.comcast.net";
  2956. window.CIMA_URL="https://login.comcast.net/api/web-access?c=cal";
  2957. Comcast_plaxosync_map={};
  2958. Comcast_plaxosync_map.z2p={
  2959. anniversary:"anniversary",assistantPhone:"assistantPhone",birthday:"birthday",callbackPhone:"callbackPhone",carPhone:"carPhone",company:"company",companyPhone:"companyPhone",department:"deptName",email:"homeEmail1",email2:"homeEmail2",email3:"homeEmail3",firstName:"firstName",homeCity:"homeCity",homeCountry:"homeCountry",homeFax:"homeFax",homePhone:"homePhone1",homePhone2:"homePhone2",homePostalCode:"homePostalCode",homeState:"homeState",homeStreet:"homeAddress",homeURL:"homeWebPage",image:"workPhotoURL",jobTitle:"jobTitle",lastName:"lastName",middleName:"middleName",mobilePhone:"homeMobile",namePrefix:"nameTitle",nameSuffix:"nameSuffix",nickname:"nickname",otherCity:"otherCity",otherCountry:"otherCountry",otherFax:"otherFax",otherPhone:"otherPhone",otherPostalCode:"otherPostalCode",otherState:"otherState",otherStreet:"otherAddress",pager:"workPager",workCity:"workCity",workCountry:"workCountry",workEmail1:"workEmail1",workEmail2:"workEmail2",workEmail3:"workEmail3",workFax:"workFax",workMobile:"workMobile",workPhone:"workPhone1",workAltPhone:"workPhone2",workPostalCode:"workPostalCode",workState:"workState",workStreet:"workStreet",workURL:"workWebPage",workCardMessage:"workCardMessage",homeCardMessage:"homeCardMessage",fullName:null,itemId:"itemId"};
  2960. Comcast_plaxosync_map.p2z={};
  2961. for(var key in Comcast_plaxosync_map.z2p){
  2962. if(Comcast_plaxosync_map.z2p[key]){
  2963. Comcast_plaxosync_map.p2z[Comcast_plaxosync_map.z2p[key]]=key
  2964. }}
  2965. Comcast_plaxosync_map.p2z.email="email";
  2966. Comcast_plaxosync_map.im_z2p={
  2967. imAddress:"homeIMList",workIM:"workIMList"};
  2968. Comcast_plaxosync_map.imPattern=/(\w+):\/\/(.+)/;
  2969. Comcast_plaxosync_map.map=function(s,o){
  2970. if(AjxUtil.isObject(o)){
  2971. if(AjxUtil.isArray(s)){
  2972. var n=[];
  2973. for(var a=0;
  2974. a<s.length;
  2975. a++){
  2976. n.push(Comcast_plaxosync_map.map(s[a],o))
  2977. }
  2978. return n
  2979. }else{
  2980. if(AjxUtil.isObject(s)){
  2981. var n={};
  2982. for(var t in s){
  2983. if(t!=null){
  2984. var e=o[t]||null;
  2985. if(e!=null){
  2986. n[e]=s[t]
  2987. }}}
  2988. return n
  2989. }else{
  2990. if(AxjUtil.isString(s)){
  2991. return o[s]
  2992. }}}}
  2993. return null
  2994. };
  2995. Comcast_plaxosync_map.map_z2p=function(t){
  2996. if(AjxUtil.isArray(t)){
  2997. var e=[];
  2998. for(var n=0;
  2999. n<t.length;
  3000. n++){
  3001. var o=t[n];
  3002. var s=Comcast_plaxosync_map.map(o,Comcast_plaxosync_map.z2p);
  3003. var r=Comcast_plaxosync_map.mapIM_z2p(o);
  3004. s=AjxUtil.hashUpdate(s,r,true);
  3005. e.push(s)
  3006. }
  3007. return e
  3008. }else{
  3009. if(AjxUtil.isObject(t)){
  3010. var e=Comcast_plaxosync_map.map(t,Comcast_plaxosync_map.z2p);
  3011. var a=Comcast_plaxosync_map.mapIM_z2p(t);
  3012. e=AjxUtil.hashUpdate(e,a,true);
  3013. return e
  3014. }}};
  3015. Comcast_plaxosync_map.map_p2z=function(t){
  3016. if(AjxUtil.isArray(t)){
  3017. var e=[];
  3018. for(var n=0;
  3019. n<t.length;
  3020. n++){
  3021. var r=t[n];
  3022. var o=Comcast_plaxosync_map.map(r,Comcast_plaxosync_map.p2z);
  3023. var a=Comcast_plaxosync_map.mapIM_p2z(r);
  3024. o=AjxUtil.hashUpdate(o,a,true);
  3025. e.push(o)
  3026. }
  3027. return e
  3028. }else{
  3029. if(AjxUtil.isObject(t)){
  3030. var e=Comcast_plaxosync_map.map(t,Comcast_plaxosync_map.p2z);
  3031. var s=Comcast_plaxosync_map.mapIM_p2z(t);
  3032. e=AjxUtil.hashUpdate(e,s,true);
  3033. return e
  3034. }}};
  3035. Comcast_plaxosync_map.mapIM_z2p=function(d){
  3036. if(AjxUtil.isObject(d)){
  3037. var a={};
  3038. for(var e in Comcast_plaxosync_map.im_z2p){
  3039. var r=Comcast_plaxosync_map.im_z2p[e];
  3040. var o=new RegExp(e+"(\\d+)");
  3041. var h=[];
  3042. for(var c in d){
  3043. var n=o.exec(c);
  3044. if(n&&n.length>=2){
  3045. var s=parseInt(n[1])-1;
  3046. var l=d[c];
  3047. if(l!=null){
  3048. var t=Comcast_plaxosync_map.mapIM_z2p_single(l);
  3049. if(t!=null){
  3050. h[s]=t
  3051. }}}}
  3052. if(h.length>0){
  3053. a[r]={
  3054. imAddress:h}
  3055. }}
  3056. return a
  3057. }};
  3058. Comcast_plaxosync_map.mapIM_z2p_single=function(n){
  3059. var t=Comcast_plaxosync_map.imPattern.exec(n);
  3060. if(t&&t.length>=3){
  3061. var e=t[1];
  3062. var a=t[2];
  3063. var o={};
  3064. o.service=t[1];
  3065. o.address=t[2];
  3066. return o
  3067. }
  3068. return null
  3069. };
  3070. Comcast_plaxosync_map.mapIM_p2z=function(a){
  3071. var u={};
  3072. for(var t in Comcast_plaxosync_map.im_z2p){
  3073. var c=Comcast_plaxosync_map.im_z2p[t];
  3074. try{
  3075. var l=a[c];
  3076. var n=l.imAddress;
  3077. var s=1;
  3078. for(var r=0;
  3079. r<n.length;
  3080. r++){
  3081. var d=n[r];
  3082. var o=Comcast_plaxosync_map.mapIM_p2z_single(d);
  3083. u[t+s]=o;
  3084. s++
  3085. }}
  3086. catch(h){}}
  3087. return u
  3088. };
  3089. Comcast_plaxosync_map.mapIM_p2z_single=function(e){
  3090. return e.service.toLowerCase()+"://"+e.address
  3091. };
  3092. Comcast_plaxosync=function(){
  3093. this.requestmgr=new Comcast_plaxosync_requestmgr();
  3094. window.Comcast_plaxosync_instance=this
  3095. };
  3096. Comcast_plaxosync.DISPLAY_IFRAME=true;
  3097. Comcast_plaxosync.prototype.toString=function(){
  3098. return"Comcast_plaxosync"
  3099. };
  3100. Comcast_plaxosync.handleFrameData=function(e,a,t){
  3101. if(AjxUtil.isString(e)){
  3102. if(t){
  3103. Comcast_plaxosync_instance.setIframeUrl(t)
  3104. }
  3105. var o={
  3106. action:ZmOperation.NEW_MESSAGE,toOverride:e,subjOverride:a||""};
  3107. AjxDispatcher.run("GetComposeController").doAction(o)
  3108. }};
  3109. Comcast_plaxosync.prototype.init=function(){
  3110. var e=new AjxListener(this,this.init2);
  3111. ZmZimbraMail.addListener(ZmAppEvent.PRE_STARTUP,e);
  3112. ZmZimbraMail.addListener(ZmAppEvent.POST_STARTUP,e)
  3113. };
  3114. Comcast_plaxosync.prototype.init2=function(){
  3115. if(!this._init2run){
  3116. this._init2run=true;
  3117. if(Comcast_plaxosync.DISPLAY_IFRAME){
  3118. this._createIframeView()
  3119. }
  3120. this.requestmgr.init()
  3121. }};
  3122. Comcast_plaxosync.PLAXO_URL_SHOW_ALL=window.PLAXO_URL_BASE+"/ab/contactList/?skin=none";
  3123. Comcast_plaxosync.PLAXO_URL_SHOW_CONTACT=window.PLAXO_URL_BASE+"/ab/home/contactView/{0}?skin=none";
  3124. Comcast_plaxosync.PLAXO_URL_SHOW_SEARCH=window.PLAXO_URL_BASE+"/ab/contactList?skin=none&src=addressBookSearch#query={0}";
  3125. Comcast_plaxosync.PLAXO_URL_NEW_CONTACT=window.PLAXO_URL_BASE+"/ab/home/contactAdd/?skin=none&name={0}&email={1}&phone={2}";
  3126. Comcast_plaxosync.PLAXO_URL_EDIT_CONTACT=window.PLAXO_URL_BASE+"/xfc/editContact?e={1}&n={0}&skin=none";
  3127. Comcast_plaxosync.PLAXO_URL_NEW_GROUP=window.PLAXO_URL_BASE+"/ab/contactList?skin=none#createGroup=1";
  3128. Comcast_plaxosync.prototype._createIframeView=function(){
  3129. if(Comcast_plaxosync.DISPLAY_IFRAME){
  3130. this.viewName="PlaxoFrame";
  3131. this._iframeView=new ZmUpsellView({
  3132. parent:appCtxt.getShell(),posStyle:Dwt.ABSOLUTE_STYLE,className:"ZmUpsellView"}
  3133. );
  3134. var o=this._iframeView.getHtmlElement();
  3135. var t=[];
  3136. var e=0;
  3137. t[e++]="<iframe id='iframe_";
  3138. t[e++]=this._iframeView.getHTMLElId();
  3139. t[e++]="' ";
  3140. if(this._iframeSrc){
  3141. t[e++]="src='";
  3142. t[e++]="'"
  3143. }
  3144. t[e++]=" width='100%' height='100%' frameborder='0'>";
  3145. o.innerHTML=t.join("");
  3146. var s={};
  3147. s[ZmAppViewMgr.C_APP_CONTENT_FULL]=this._iframeView;
  3148. var n={};
  3149. n[ZmAppViewMgr.CB_POST_SHOW]=new AjxCallback(this,this.displayIframeView);
  3150. appCtxt.getAppViewMgr().createView({
  3151. viewId:this.viewName,appName:"Contacts",elements:s,isTransient:false,callbacks:n}
  3152. );
  3153. var a=this.getIframe();
  3154. a.onload=null
  3155. }};
  3156. Comcast_plaxosync.prototype.displayIframeView=function(e){
  3157. if(Comcast_plaxosync.DISPLAY_IFRAME){
  3158. var t=[ZmMsg.zimbraTitle,"Address Book"].join(": ");
  3159. Dwt.setTitle(t)
  3160. }};
  3161. Comcast_plaxosync.prototype.getIframe=function(){
  3162. if(!this._iframe){
  3163. this._iframe=document.getElementById("iframe_"+this._iframeView.getHTMLElId())
  3164. }
  3165. return this._iframe
  3166. };
  3167. Comcast_plaxosync.prototype.getIframeView=function(){
  3168. return this._iframeView
  3169. };
  3170. Comcast_plaxosync.prototype.setIframeUrl=function(t,n){
  3171. if(Comcast_plaxosync.DISPLAY_IFRAME){
  3172. if(t){
  3173. this._iframeSrc=t
  3174. }
  3175. if(this._iframeView){
  3176. var o=this.getIframe();
  3177. if(o){
  3178. var e=appCtxt.getAppViewMgr();
  3179. if(n&&e.getCurrentViewId()!=this.viewName){
  3180. appCtxt.getAppChooser().setSelected("Contacts");
  3181. if(t){
  3182. var a=AjxCallback.simpleClosure(this.displayIframe,this);
  3183. if(AjxEnv.isIE){
  3184. o.attachEvent("onload",a)
  3185. }else{
  3186. Dwt.setHandler(o,"onload",a)
  3187. }
  3188. this._displayLoading()
  3189. }}else{
  3190. Dwt.clearHandler(o,"onload")
  3191. }
  3192. if(t){
  3193. o.src=t
  3194. }}}}};
  3195. Comcast_plaxosync.prototype.displayIframe=function(){
  3196. var e=appCtxt.getAppViewMgr();
  3197. e.popView(ZmId.VIEW_LOADING,true);
  3198. e.pushView(this.viewName);
  3199. appCtxt.getAppChooser().setSelected("Contacts")
  3200. };
  3201. Comcast_plaxosync.prototype._displayLoading=function(){
  3202. if(!appCtxt.inStartup){
  3203. appCtxt.getAppViewMgr().pushView(ZmId.VIEW_LOADING,true)
  3204. }};
  3205. Comcast_plaxosync.prototype.add=function(a,t,o){
  3206. o=o||this[t];
  3207. if(o){
  3208. var e=a[t];
  3209. a[t]=function(){
  3210. var n=arguments;
  3211. n.push(e.apply(this,arguments));
  3212. return o.apply(this,n)
  3213. };
  3214. a[t].func=e
  3215. }};
  3216. Comcast_plaxosync.parseQuery=function(e){
  3217. locFound=/.*:.*/.test(e);
  3218. match=locFound&&/(.*)\(.*:(.*)\)$/.exec(e);
  3219. return{
  3220. location:(match&&AjxStringUtil.trim(match[2]))||(locFound&&e)||"",searchfor:(match&&AjxStringUtil.trim(match[1]))||(!locFound&&e)||""}
  3221. };
  3222. Comcast_plaxosync.getFirstAttr=function(e,n,o){
  3223. for(var a=0;
  3224. a<n.length;
  3225. a++){
  3226. var t=n[a];
  3227. if(e[t]){
  3228. return e[t]
  3229. }}
  3230. return o
  3231. };
  3232. VelodromeSkin.prototype.sendRequest=function(n){
  3233. var a=n.jsonObj;
  3234. var e;
  3235. if(a){
  3236. var o=window.plaxosync.requestmgr;
  3237. var r=new AjxCallback(this,this._handleDataReturn,n);
  3238. if(a.CreateContactRequest){
  3239. o.createContactRequest(a.CreateContactRequest,r);
  3240. delete a.CreateContactRequest
  3241. }
  3242. if(a.ModifyContactRequest){
  3243. o.modifyContactRequest(a.ModifyContactRequest,r);
  3244. delete a.ModifyContactRequest
  3245. }
  3246. if(a.ContactActionRequest){
  3247. o.contactActionRequest(a.ContactActionRequest,r);
  3248. delete a.ContactActionRequest
  3249. }
  3250. for(var t in a){
  3251. if(a[t]&&(t!="SearchRequest"||!e)){
  3252. return this.sendRequest.func.call(this,n)
  3253. }}}else{
  3254. return this.sendRequest.func.call(this,n)
  3255. }};
  3256. VelodromeSkin.prototype._handleDataReturn=function(a,e){
  3257. var t=a.jsonObj;
  3258. if(t){
  3259. if(t.SearchRequest){
  3260. if(t.SearchRequest.types){
  3261. a.callback=new AjxCallback(this,function(n,o){
  3262. o._data.SearchResponse.cn=e.Body.SearchResponse.cn;
  3263. n.run(o)
  3264. }
  3265. ,a.callback);
  3266. this.sendRequest.func.call(this,a);
  3267. return
  3268. }}
  3269. a.response=e;
  3270. this.sendRequest.func.call(this,a)
  3271. }};
  3272. VelodromeSkin.prototype.load=function(o,e,t){
  3273. this.isCanonical=true;
  3274. var a=new AjxCallback(this,this._handleResponseLoad,[o]);
  3275. window.plaxosync.requestmgr.getContacts(new AjxCallback(this,this._handleResponseLoad,[o]))
  3276. };
  3277. VelodromeSkin.prototype._handleResponseLoad=function(h,o){
  3278. for(var r in o){
  3279. var e=o[r];
  3280. var n={}
  3281. ,s={};
  3282. for(var t in e){
  3283. var a=e[t];
  3284. if(ZmContactList.IS_CONTACT_FIELD[t]){
  3285. n[t]=a
  3286. }else{
  3287. s[t]=a
  3288. }}
  3289. n._attrs=s;
  3290. n.id=r;
  3291. this._addContact(n)
  3292. }
  3293. this._finishLoading();
  3294. if(h){
  3295. h.run()
  3296. }};
  3297. VelodromeSkin.prototype._show=function(e,r){
  3298. if(Comcast_plaxosync.DISPLAY_IFRAME){
  3299. if(e){
  3300. if(e.type==ZmItem.GROUP){
  3301. var n=Comcast_plaxosync.PLAXO_URL_NEW_GROUP
  3302. }else{
  3303. var o=[e.attr.firstName||"",e.attr.middleName||"",e.attr.lastName||""].join(" ").replace(/\s+/g," ");
  3304. o=o.replace(/^\s+|\s+$/g,"");
  3305. o=AjxStringUtil.urlComponentEncode(o);
  3306. var s=["email","workEmail1"];
  3307. var a=Comcast_plaxosync.getFirstAttr(e.attr,s,"");
  3308. a=AjxStringUtil.urlComponentEncode(a);
  3309. var t=Comcast_plaxosync.getFirstAttr(e.attr,ZmContact.PHONE_FIELDS,"");
  3310. t=AjxStringUtil.urlComponentEncode(t);
  3311. var n=(e.id)?AjxMessageFormat.format(Comcast_plaxosync.PLAXO_URL_EDIT_CONTACT,[o,a]):AjxMessageFormat.format(Comcast_plaxosync.PLAXO_URL_NEW_CONTACT,[o,a,t])
  3312. }
  3313. window.plaxosync.setIframeUrl(n,true)
  3314. }}else{
  3315. arguments.callee.func.apply(this,arguments)
  3316. }};
  3317. VelodromeSkin.prototype._Portalshow=function(t,a){
  3318. try{
  3319. if(appCtxt.inStartup&&AjxStringUtil.parseQueryString()&&AjxStringUtil.parseQueryString().app=="sms"){
  3320. return
  3321. }
  3322. window.location="http://xfinityconnect.mail.comcast.net/connect/"
  3323. }
  3324. catch(o){
  3325. console.log(o)
  3326. }};
  3327. VelodromeSkin.prototype._doSearch=function(r,e,h,t){
  3328. var o=r.types||this.getTypes(r);
  3329. if(Comcast_plaxosync.DISPLAY_IFRAME&&((AjxUtil.isArray(o)&&o.length==1&&o[0]==ZmItem.CONTACT)||(o instanceof AjxVector&&o.size()==1&&o.get(0)==ZmItem.CONTACT))){
  3330. var n=r.query;
  3331. var s=n&&Comcast_plaxosync.parseQuery(n);
  3332. var a;
  3333. if(s&&s.searchfor){
  3334. window.plaxosync.setIframeUrl(AjxMessageFormat.format(Comcast_plaxosync.PLAXO_URL_SHOW_SEARCH,[s.searchfor]),true)
  3335. }else{
  3336. if(!window.plaxosync._iframeSrc){
  3337. window.plaxosync.setIframeUrl(Comcast_plaxosync.PLAXO_URL_SHOW_ALL,true)
  3338. }else{
  3339. window.plaxosync.displayIframe()
  3340. }}}
  3341. arguments.callee.func.apply(this,arguments)
  3342. };
  3343. VelodromeSkin.prototype._defaultView=function(){
  3344. if(Comcast_plaxosync.DISPLAY_IFRAME){
  3345. return window.plaxosync.viewName
  3346. }else{
  3347. return(appCtxt.get(ZmSetting.CONTACTS_VIEW)=="cards")?ZmId.VIEW_CONTACT_CARDS:ZmId.VIEW_CONTACT_SIMPLE
  3348. }};
  3349. VelodromeSkin.prototype.switchView=function(e,a,o,t){
  3350. if(Comcast_plaxosync.DISPLAY_IFRAME){
  3351. e=window.plaxosync.viewName;
  3352. o=true;
  3353. if(!this._appViews[e]){
  3354. this._appViews[e]=window.plaxosync.getIframeView()
  3355. }}
  3356. return arguments.callee.func.call(this,e,a,o,t)
  3357. };
  3358. VelodromeSkin.prototype.listShow=function(){
  3359. this.switchView(window.plaxosync.viewName)
  3360. };
  3361. VelodromeSkin.prototype._createNewView=function(e){
  3362. if(e==window.plaxosync.viewName){
  3363. return window.plaxosync.getIframeView()
  3364. }
  3365. return arguments.callee.func.apply(this,arguments)
  3366. };
  3367. VelodromeSkin.prototype._initializeListView=function(e){
  3368. if(e==window.plaxosync.viewName){
  3369. this._listView[e]=this._createNewView(e)
  3370. }else{
  3371. arguments.callee.func.apply(this,arguments)
  3372. }};
  3373. VelodromeSkin.prototype._handleContactsCoreLoad=function(){
  3374. this.overrideAPI(ZmContactList.prototype,"load",this.load);
  3375. this.overrideAPI(ZmContactList.prototype,"_handleResponseLoad",this._handleResponseLoad)
  3376. };
  3377. VelodromeSkin.prototype._handleContactsLoad=function(){
  3378. this.overrideAPI(ZmContactController.prototype,"show",this._show);
  3379. this.overrideAPI(ZmContactListController.prototype,"_defaultView",this._defaultView);
  3380. this.overrideAPI(ZmContactListController.prototype,"show",this.listShow);
  3381. this.overrideAPI(ZmContactListController.prototype,"_createNewView",this._createNewView);
  3382. this.overrideAPI(ZmContactListController.prototype,"_initializeListView",this._initializeListView);
  3383. this.overrideAPI(ZmContactListController.prototype,"switchView",this.switchView);
  3384. this.overrideAPI(ZmContactListController.prototype,"_setViewContents",AjxCallback.returnFalse);
  3385. this.overrideAPI(ZmContactListController.prototype,"_resetOperations",AjxCallback.returnFalse)
  3386. };
  3387. VelodromeSkin.prototype._handlePortalLoad=function(){
  3388. this.overrideAPI(ZmPortalController.prototype,"show",this._Portalshow)
  3389. };
  3390. VelodromeSkin.prototype._handleStartupLoad=function(){
  3391. window.plaxosync=new Comcast_plaxosync();
  3392. this.overrideAPI(ZmRequestMgr.prototype,"sendRequest",this.sendRequest);
  3393. this.overrideAPI(ZmRequestMgr.prototype,"_handleDataReturn",this._handleDataReturn);
  3394. this.overrideAPI(ZmSearchController.prototype,"_doSearch",this._doSearch);
  3395. window.plaxosync.init()
  3396. };
  3397. AjxDispatcher.addPackageLoadFunction("Contacts",new AjxCallback(skin,skin._handleContactsLoad));
  3398. AjxDispatcher.addPackageLoadFunction("Portal",new AjxCallback(skin,skin._handlePortalLoad));
  3399. AjxDispatcher.addPackageLoadFunction("Startup1_2",new AjxCallback(skin,skin._handleStartupLoad));
  3400. Comcast_plaxosync_requestmgr=function(){
  3401. this.session=null;
  3402. this.token=null;
  3403. this.clientId="cal"
  3404. };
  3405. Comcast_plaxosync_requestmgr.prototype.init=function(){
  3406. this._cimaQueue=[]
  3407. };
  3408. Comcast_plaxosync_requestmgr.PLAXO_CONTACT_JSON=window.PLAXO_URL_BASE+"/axis/json/contact";
  3409. Comcast_plaxosync_requestmgr.PLAXO_CONTACT_URL=window.PLAXO_URL_BASE+"/axis/contact";
  3410. Comcast_plaxosync_requestmgr.PLAXO_FOLDER_JSON=window.PLAXO_URL_BASE+"/axis/json/folder";
  3411. Comcast_plaxosync_requestmgr.SEARCH_FIELDS=["firstName","lastName","fullName"];
  3412. Comcast_plaxosync_requestmgr.PROMPT_IF_MISSING=true;
  3413. Comcast_plaxosync_requestmgr.prototype.getCIMAAccess=function(){
  3414. this._cimaQueue=[];
  3415. var t="/service/proxy?target="+AjxStringUtil.urlComponentEncode(window.CIMA_URL);
  3416. var e=AjxCookie.getCookie(document,"s_ticket")||(Comcast_plaxosync_requestmgr.PROMPT_IF_MISSING&&prompt("Please enter a valid comcast s_ticket cookie value",""));
  3417. if(e){
  3418. var a={
  3419. Authorization:"cima-session "+e,"Content-type":"application/x-www-form-urlencoded"};
  3420. var o=new AjxCallback(this,this._handleGetCIMAAccess);
  3421. AjxRpc.invoke("",t,a,o,false,0)
  3422. }else{
  3423. appCtxt.setStatusMsg("Login failed: nonexistent s_ticket",ZmStatusView.LEVEL_CRITICAL);
  3424. this._cimaQueue=null
  3425. }};
  3426. Comcast_plaxosync_requestmgr.findDescendant=function(n){
  3427. if(arguments.length<2){
  3428. return n
  3429. }
  3430. var e=AjxUtil.isArray(arguments[1])?arguments[1]:Array.prototype.slice.call(arguments,1);
  3431. for(var a=0;
  3432. a<e.length;
  3433. a++){
  3434. var t=e[a];
  3435. if(t instanceof RegExp){
  3436. for(var o in n){
  3437. if(t.test(o)){
  3438. n=n[o];
  3439. break
  3440. }}}else{
  3441. n=n[t]
  3442. }
  3443. if(!n){
  3444. return null
  3445. }}
  3446. return n
  3447. };
  3448. Comcast_plaxosync_requestmgr.prototype._handleGetCIMAAccess=function(e){
  3449. if(e.success){
  3450. var n=AjxXmlDoc.createFromDom(e.xml).toJSObject();
  3451. var o=Comcast_plaxosync_requestmgr.findDescendant(n,"cima:ServiceToken",/^[^:]+:GetSessionResponse/,"response","session","__msh_content");
  3452. if(o){
  3453. if(o.match(/^[\d:]+$/)){
  3454. this.session=o
  3455. }else{
  3456. this.token=o
  3457. }}
  3458. this.userid=Comcast_plaxosync_requestmgr.findDescendant(n,"cima:ServiceToken",/^[^:]+:GetSessionResponse/,"response","userId","__msh_content");
  3459. if(!this.token&&!this.session){
  3460. appCtxt.setStatusMsg("Login failed: invalid s_ticket",ZmStatusView.LEVEL_CRITICAL)
  3461. }else{
  3462. if(this._cimaQueue&&this._cimaQueue.length){
  3463. for(var a=0;
  3464. a<this._cimaQueue.length;
  3465. a++){
  3466. this._cimaQueue[a].run()
  3467. }}
  3468. this._cimaQueue=null
  3469. }}else{
  3470. appCtxt.setStatusMsg("Login failed: cannot connect to single-signon service",ZmStatusView.LEVEL_CRITICAL)
  3471. }};
  3472. Comcast_plaxosync_requestmgr.prototype.send=function(o,t,h,n,r){
  3473. var e=new AjxCallback(this,this.receive,[h||null]);
  3474. var a="/service/proxy?target="+AjxStringUtil.urlEncode(o);
  3475. if(AjxUtil.isObject(t)){
  3476. t=JSON.stringify(t)
  3477. }
  3478. var s={
  3479. "Content-Type":"application/json; charset=utf-8"};
  3480. if(AjxEnv.isIE6&&(location.protocol=="https:")){
  3481. s.Connection="Close"
  3482. }
  3483. if(r&&AjxUtil.isObject(r)){
  3484. s=Comcast_plaxosync_requestmgr.hashUpdate(s,r,true)
  3485. }
  3486. AjxRpc.invoke(t,a,s,e,n)
  3487. };
  3488. Comcast_plaxosync_requestmgr.prototype.receive=function(a,e){
  3489. if(e.success&&a){
  3490. var t=Comcast_plaxosync_requestmgr.evalJSON(AjxStringUtil.trim(e.text));
  3491. a.run(t)
  3492. }};
  3493. Comcast_plaxosync_requestmgr.prototype.createContactRequest=function(s,h){
  3494. if(this.isLoggedIn()){
  3495. var n=s.cn.a;
  3496. var r={};
  3497. var a={};
  3498. for(var o=0;
  3499. o<n.length;
  3500. o++){
  3501. var t=n[o];
  3502. a[t.n]=t._content
  3503. }
  3504. if(!a.firstName&&!a.containsKey.lastName&&!a.fullName&&!a.displayName){
  3505. if(a.email){
  3506. a.fullName=a.email
  3507. }}
  3508. var e={
  3509. AddContactRequest:{
  3510. authInfo:this.getAuthInfo(),contact:Comcast_plaxosync_map.map_z2p(a)}};
  3511. this.send(Comcast_plaxosync_requestmgr.PLAXO_CONTACT_JSON,e,new AjxCallback(this,this.createContactResponse,[s,h]),false)
  3512. }else{
  3513. if(this._cimaQueue!==null){
  3514. this._cimaQueue.push(new AjxCallback(this,this.createContactRequest,[s,h]))
  3515. }else{
  3516. this.createContactResponse(s,h,{}
  3517. )
  3518. }}};
  3519. Comcast_plaxosync_requestmgr.prototype.createContactResponse=function(s,m,r){
  3520. var d=r&&r.contact&&Comcast_plaxosync_map.map_p2z(r.contact);
  3521. var u,t,l,n;
  3522. if(d){
  3523. u=this.pruneAttrs(d);
  3524. t=d.itemId;
  3525. l=""+t;
  3526. n=ZmContact.computeFileAs(u)
  3527. }
  3528. var c=appCtxt.getActiveAccount().name;
  3529. var e=s.cn.l;
  3530. var a=new Date().getTime();
  3531. var h=40500;
  3532. var f=appCtxt.getRequestMgr()._highestNotifySeen+1;
  3533. var o={
  3534. Header:{
  3535. context:{
  3536. change:{
  3537. token:h}
  3538. ,notify:[{
  3539. seq:f,created:d?{
  3540. cn:[{
  3541. id:l,l:e,d:a,rev:h,fileAsStr:n,_attrs:u}
  3542. ]}
  3543. :{}
  3544. ,modified:d?{
  3545. folder:[{
  3546. id:e,n:8,s:0,i4ms:h,i4next:t+1}
  3547. ]}
  3548. :{}}
  3549. ],_jsns:"urn:zimbra"}}
  3550. ,Body:{
  3551. CreateContactResponse:{
  3552. cn:d?[{
  3553. id:l,l:e,d:a,rev:h,fileAsStr:n,_attrs:u}
  3554. ]:[],_jsns:"urn:zimbraMail"}}
  3555. ,_jsns:"urn:zimbraSoap"};
  3556. if(m){
  3557. m.run(o)
  3558. }
  3559. return o
  3560. };
  3561. Comcast_plaxosync_requestmgr.prototype.modifyContactRequest=function(n,u){
  3562. if(this.isLoggedIn()){
  3563. var e=n.cn.id;
  3564. var t=n.cn.a;
  3565. var o={};
  3566. var c={};
  3567. for(var s=0;
  3568. s<t.length;
  3569. s++){
  3570. var a=t[s];
  3571. c[a.n]=a._content
  3572. }
  3573. var d;
  3574. for(var s=0;
  3575. s<ZmContact.ADDRESS_FIELDS.length&&!d;
  3576. s++){
  3577. if(o[ZmContact.ADDRESS_FIELDS[s]]){
  3578. d=true
  3579. }}
  3580. if(!Comcast_plaxosync_requestmgr.NAME_FIELDS){
  3581. Comcast_plaxosync_requestmgr.NAME_FIELDS=[ZmContact.F_firstName,ZmContact.F_lastName,ZmContact.F_maidenName,ZmContact.F_middleName,ZmContact.F_namePrefix,ZmContact.F_nameSuffix]
  3582. }
  3583. var r;
  3584. for(var s=0;
  3585. s<Comcast_plaxosync_requestmgr.NAME_FIELDS.length&&!r;
  3586. s++){
  3587. if(c[Comcast_plaxosync_requestmgr.NAME_FIELDS[s]]){
  3588. r=true
  3589. }}
  3590. if(d||r){
  3591. var h=appCtxt.getById(e);
  3592. if(h){
  3593. if(d){
  3594. Comcast_plaxosync_requestmgr.hashUpdate(c,h.attr,true,null,ZmContact.ADDRESS_FIELDS)
  3595. }
  3596. if(r){
  3597. Comcast_plaxosync_requestmgr.hashUpdate(c,h.attr,true,null,Comcast_plaxosync_requestmgr.NAME_FIELDS)
  3598. }}}
  3599. c.itemId=e;
  3600. var l={
  3601. SetContactRequest:{
  3602. authInfo:this.getAuthInfo(),contact:Comcast_plaxosync_map.map_z2p(c)}};
  3603. this.send(Comcast_plaxosync_requestmgr.PLAXO_CONTACT_JSON,l,new AjxCallback(this,this.modifyContactResponse,[n,u]),false)
  3604. }else{
  3605. if(this._cimaQueue!==null){
  3606. this._cimaQueue.push(new AjxCallback(this,this.modifyContactRequest,[n,u]))
  3607. }else{
  3608. this.modifyContactResponse(n,u,{}
  3609. )
  3610. }}};
  3611. Comcast_plaxosync_requestmgr.hashUpdate=function(n,o,t,s,e){
  3612. for(var a in o){
  3613. if((t||!(a in n))&&(!s||AjxUtil.indexOf(s,a)==-1)&&(!e||AjxUtil.indexOf(e,a)!=-1)){
  3614. n[a]=o[a]
  3615. }}
  3616. return n
  3617. };
  3618. Comcast_plaxosync_requestmgr.prototype.modifyContactResponse=function(s,m,r){
  3619. var d=r&&r.contact&&Comcast_plaxosync_map.map_p2z(r.contact);
  3620. var u,n,t,l;
  3621. if(d){
  3622. u=this.pruneAttrs(d);
  3623. n=ZmContact.computeFileAs(u);
  3624. t=d.itemId;
  3625. l=""+t
  3626. }
  3627. var c=appCtxt.getActiveAccount().name;
  3628. var e=s.cn.l;
  3629. var a=new Date().getTime();
  3630. var h=41200;
  3631. var f=appCtxt.getRequestMgr()._highestNotifySeen+1;
  3632. var o={
  3633. Header:{
  3634. context:{
  3635. change:{
  3636. token:h}
  3637. ,notify:[{
  3638. seq:f,modified:d?{
  3639. folder:[{
  3640. id:e,n:12,s:0,i4ms:h,i4next:t+1}
  3641. ],cn:[{
  3642. id:t,f:"",d:a,rev:h,fileAsStr:n,_attrs:u}
  3643. ]}
  3644. :{}}
  3645. ],_jsns:"urn:zimbra"}}
  3646. ,Body:{
  3647. ModifyContactResponse:{
  3648. cn:d?[{
  3649. id:t,l:e,d:a,rev:h,fileAsStr:n,_attrs:u}
  3650. ]:[],_jsns:"urn:zimbraMail"}}
  3651. ,_jsns:"urn:zimbraSoap"};
  3652. if(m){
  3653. m.run(o)
  3654. }
  3655. return o
  3656. };
  3657. Comcast_plaxosync_requestmgr.prototype.contactActionRequest=function(t,n){
  3658. var o=t.action.id;
  3659. var e=t.action.l;
  3660. var a=t.action.op;
  3661. if(a=="delete"||(a=="move"&&e==3)||a=="trash"){
  3662. this.deleteContactRequest(new AjxCallback(this,this.contactActionResponse,[t,n]),o)
  3663. }};
  3664. Comcast_plaxosync_requestmgr.prototype.deleteContactRequest=function(t,e){
  3665. return this.deleteContactsRequest(t,[e])
  3666. };
  3667. Comcast_plaxosync_requestmgr.prototype.deleteContactsRequest=function(a,t){
  3668. if(this.isLoggedIn()){
  3669. var e={
  3670. DeleteContactsRequest:{
  3671. authInfo:this.getAuthInfo(),itemIds:{
  3672. delimited:{
  3673. data:t.join(",")}}}};
  3674. this.send(Comcast_plaxosync_requestmgr.PLAXO_CONTACT_JSON,e,new AjxCallback(this,this.deleteContactsResponse,[a]),false)
  3675. }else{
  3676. if(this._cimaQueue!==null){
  3677. this._cimaQueue.push(new AjxCallback(this,this.deleteContactsRequest,[a,t]))
  3678. }else{
  3679. this.deleteContactsResponse(a,{}
  3680. )
  3681. }}};
  3682. Comcast_plaxosync_requestmgr.prototype.deleteContactsResponse=function(o,t){
  3683. var a=t&&t.affected;
  3684. var e=t.response&&t.response["code"];
  3685. if(o){
  3686. o.run(t)
  3687. }};
  3688. Comcast_plaxosync_requestmgr.prototype.contactActionResponse=function(n,u,r){
  3689. var m=!!(r&&r.affected);
  3690. var d=appCtxt.getActiveAccount().name;
  3691. var e=n.action.id;
  3692. var p=appCtxt.getById(e);
  3693. var t=n.action.l;
  3694. var s=p.folderId;
  3695. var c=n.action.op;
  3696. var l=""+e;
  3697. var a=new Date().getTime();
  3698. var h=41200;
  3699. var f=appCtxt.getRequestMgr()._highestNotifySeen+1;
  3700. var o={
  3701. Header:{
  3702. context:{
  3703. change:{
  3704. token:h}
  3705. ,notify:[{
  3706. seq:f,modified:m?{
  3707. folder:[{
  3708. id:s,n:11,s:0,i4ms:h,i4next:5261}
  3709. ,{
  3710. id:t,n:167,s:491637,i4ms:h,i4next:5280}
  3711. ],cn:[{
  3712. id:l,l:t}
  3713. ]}
  3714. :{}}
  3715. ],_jsns:"urn:zimbra"}}
  3716. ,Body:{
  3717. ContactActionResponse:{
  3718. action:{
  3719. id:l,op:c}
  3720. ,_jsns:"urn:zimbraMail"}}
  3721. ,_jsns:"urn:zimbraSoap"};
  3722. if(u){
  3723. u.run(o)
  3724. }
  3725. return o
  3726. };
  3727. Comcast_plaxosync_requestmgr.prototype.search=function(T,h){
  3728. if(this.isLoggedIn()){
  3729. var o=T.query&&AjxStringUtil.trim(T.query)||"";
  3730. var r=T.fields;
  3731. var a,f,t,m;
  3732. var v=o&&Comcast_plaxosync.parseQuery(o);
  3733. var z=T.limit||0;
  3734. var d=T.offset||0;
  3735. var l=v&&v.searchfor;
  3736. if(l){
  3737. l=l.replace(/[^\w\d]/g,"")
  3738. }
  3739. var e=-1;
  3740. var q={};
  3741. var n={};
  3742. n.authInfo=this.getAuthInfo();
  3743. if(z>0){
  3744. var c={};
  3745. c.limit=z;
  3746. if(d>0){
  3747. c.offset=d
  3748. }
  3749. n.page=c
  3750. }
  3751. var w=(l&&l.length);
  3752. var u=(e>=0);
  3753. if(w||u){
  3754. var b={};
  3755. if(w){
  3756. var s={};
  3757. var k={};
  3758. var x=[];
  3759. for(var j=0;
  3760. j<Comcast_plaxosync_requestmgr.SEARCH_FIELDS.length;
  3761. j++){
  3762. var y={
  3763. field:Comcast_plaxosync_requestmgr.SEARCH_FIELDS[j],op:"StartsWith",value:l};
  3764. x.push(y)
  3765. }
  3766. k.byField=x;
  3767. s.fields=k;
  3768. s.op="Or";
  3769. b.byFields=s
  3770. }
  3771. if(u){
  3772. b.byFolderId=e
  3773. }
  3774. n.filters=b
  3775. }
  3776. if(r){
  3777. var g=[];
  3778. for(var j=0;
  3779. j<r.length;
  3780. j++){
  3781. g.push(r[j].toString())
  3782. }
  3783. n.fields={
  3784. field:g}
  3785. }
  3786. q.GetContactsRequest=n;
  3787. this.send(Comcast_plaxosync_requestmgr.PLAXO_CONTACT_JSON,q,new AjxCallback(this,this._handleSearch,[h,d]),false)
  3788. }else{
  3789. if(this._cimaQueue!==null){
  3790. this._cimaQueue.push(new AjxCallback(this,this.search,[T,h]))
  3791. }else{
  3792. this._handleSearch(h)
  3793. }}};
  3794. Comcast_plaxosync_requestmgr.prototype._handleSearch=function(s,n,o){
  3795. var a=o&&o.contacts&&o.contacts["contact"];
  3796. var t=o&&o.editCounter;
  3797. var e=o&&o.totalCount;
  3798. if(s){
  3799. s.run(a&&Comcast_plaxosync_map.map_p2z(a),t,e,n)
  3800. }};
  3801. Comcast_plaxosync_requestmgr.prototype.searchRequest=function(e,t){
  3802. this.search(e,new AjxCallback(this,this.searchResponse,[t]))
  3803. };
  3804. Comcast_plaxosync_requestmgr.prototype.searchResponse=function(m,a,d,f,n){
  3805. var h=41200;
  3806. a=a||[];
  3807. var r=[];
  3808. var t=new Date().getTime();
  3809. for(var s=0;
  3810. s<a.length;
  3811. s++){
  3812. var c=a[s];
  3813. var u=this.pruneAttrs(c);
  3814. var e={
  3815. id:c.itemId,f:"",d:t,rev:h,fileAsStr:ZmContact.computeFileAs(c),_attrs:u};
  3816. r.push(e)
  3817. }
  3818. r.sort(function(g,p){
  3819. return g.fileAsStr>p.fileAsStr
  3820. }
  3821. );
  3822. var l=appCtxt.getActiveAccount().name;
  3823. var t=new Date().getTime();
  3824. var o={
  3825. Header:{
  3826. context:{
  3827. change:{
  3828. token:h}
  3829. ,_jsns:"urn:zimbra"}}
  3830. ,Body:{
  3831. SearchResponse:{
  3832. sortBy:"com.zimbra.cs.index.LocalizedSortBy@a4f040",offset:n||0,cn:r,more:(a.length+n<f)?true:false,_jsns:"urn:zimbraMail"}}
  3833. ,_jsns:"urn:zimbraSoap"};
  3834. if(m){
  3835. m.run(o)
  3836. }
  3837. return o
  3838. };
  3839. Comcast_plaxosync_requestmgr.prototype.autoCompleteRequest=function(e,a){
  3840. var t={
  3841. query:e.name._content};
  3842. this.search(t,new AjxCallback(this,this.autoCompleteResponse,[e,a]))
  3843. };
  3844. Comcast_plaxosync_requestmgr.prototype.autoCompleteResponse=function(a,n,r){
  3845. var b=41200;
  3846. var o=a.name._content;
  3847. var y=[];
  3848. if(r){
  3849. var s=new Date().getTime();
  3850. for(var f=0;
  3851. f<r.length&&f<1000;
  3852. f++){
  3853. var t=r[f];
  3854. var d=this.pruneAttrs(t);
  3855. var w=this.getFirstMatching(o,[d.displayName,d.fullName,AjxUtil.collapseList([d.firstName,d.middleName,d.lastName]).join(" ")]);
  3856. var l=[d[ZmContact.F_email],d[ZmContact.F_workEmail1],d[ZmContact.F_email2],d[ZmContact.F_workEmail2],d[ZmContact.F_email3],d[ZmContact.F_workEmail3]];
  3857. var g=AjxUtil.uniq(AjxUtil.collapseList(l));
  3858. for(var m=0;
  3859. m<g.length;
  3860. m++){
  3861. var u=g[m];
  3862. var h=new AjxEmailAddress(u,null,w).toString();
  3863. var p=this.getMatchScore(o,w,u);
  3864. var c={
  3865. id:t.itemId,email:h,type:"contact",ranking:p};
  3866. y.push(c)
  3867. }}
  3868. y.sort(function(k,v){
  3869. return k.ranking&&k.ranking<v.ranking
  3870. }
  3871. )
  3872. }
  3873. var e={
  3874. Header:{
  3875. context:{
  3876. change:{
  3877. token:b}
  3878. ,_jsns:"urn:zimbra"}}
  3879. ,Body:{
  3880. AutoCompleteResponse:{
  3881. canBeCached:true,match:y,_jsns:"urn:zimbraMail"}}
  3882. ,_jsns:"urn:zimbraSoap"};
  3883. if(n){
  3884. n.run(e)
  3885. }
  3886. return e
  3887. };
  3888. Comcast_plaxosync_requestmgr.prototype.getContacts=function(e){
  3889. this.search({
  3890. fields:["NameFields","EmailFields","PhoneFields","HomePhotoURL","WorkPhotoURL"]}
  3891. ,new AjxCallback(this,this._handleGetContacts,[e]))
  3892. };
  3893. Comcast_plaxosync_requestmgr.prototype._handleGetContacts=function(o,e){
  3894. if(e){
  3895. var a={};
  3896. for(var t=0;
  3897. t<e.length;
  3898. t++){
  3899. a[e[t].itemId]=this.pruneAttrs(e[t])
  3900. }
  3901. if(o){
  3902. o.run(a)
  3903. }
  3904. return a
  3905. }};
  3906. Comcast_plaxosync_requestmgr.prototype.getFirstMatching=function(n,o,a){
  3907. var t=new RegExp(n,e);
  3908. for(var e=0;
  3909. e<o.length;
  3910. e++){
  3911. if(t.test(o[e])){
  3912. return o[e]
  3913. }}
  3914. if(!AjxUtil.isUndefined(a)){
  3915. return a
  3916. }
  3917. for(var e=0;
  3918. e<o.length;
  3919. e++){
  3920. if(o[e]){
  3921. return o[e]
  3922. }}
  3923. return o[o.length-1]
  3924. };
  3925. Comcast_plaxosync_requestmgr.prototype.getMatchScore=function(o,a,t){
  3926. var n=0;
  3927. if(o){
  3928. o=o.toLowerCase();
  3929. a=a&&a.toLowerCase();
  3930. t=t&&t.toLowerCase();
  3931. if(a){
  3932. var e=a.indexOf(o);
  3933. if(e!=-1){
  3934. n+=(a.length-e)/a.length
  3935. }}
  3936. if(t){
  3937. var e=t.indexOf(o);
  3938. if(e!=-1){
  3939. n+=(t.length-e)/t.length
  3940. }}}
  3941. return 0.5*n
  3942. };
  3943. Comcast_plaxosync_requestmgr.evalJSON=function(a){
  3944. try{
  3945. return JSON.parse(a)
  3946. }
  3947. catch(t){
  3948. return{}
  3949. }};
  3950. Comcast_plaxosync_requestmgr.prototype.pruneAttrs=function(a){
  3951. if(!this.validAttrs){
  3952. if(ZmContact&&ZmContact.DISPLAY_FIELDS&&window.VelodromeSkinOther){
  3953. this.validAttrs=AjxUtil.arrayAsHash(ZmContact.DISPLAY_FIELDS)
  3954. }else{
  3955. return Comcast_plaxosync_requestmgr.hashUpdate({}
  3956. ,a,true,["itemId"])
  3957. }}
  3958. var t={};
  3959. for(var o in a){
  3960. var e=o.replace(/\d+$/,"");
  3961. if(this.validAttrs[e]){
  3962. t[o]=a[o]
  3963. }}
  3964. return t
  3965. };
  3966. Comcast_plaxosync_requestmgr.prototype.urlFormat=function(o){
  3967. var e=[],a=0;
  3968. for(var t in o){
  3969. if(o[t]!==undefined){
  3970. e[a++]=t+"="+o[t]
  3971. }}
  3972. return e.join("&")
  3973. };
  3974. Comcast_plaxosync_requestmgr.prototype.getCommonParams=function(){
  3975. if(!this._commonParams){
  3976. this._commonParams={
  3977. u:appCtxt.getActiveAccount().getEmail()}
  3978. }
  3979. return this._commonParams
  3980. };
  3981. Comcast_plaxosync_requestmgr.prototype.isLoggedIn=function(){
  3982. return !!((this.userid&&this.token)||this.session)
  3983. };
  3984. Comcast_plaxosync_requestmgr.prototype.getSessionType=function(){
  3985. return"ShortSession"
  3986. };
  3987. Comcast_plaxosync_requestmgr.prototype.getClientInfo=function(){
  3988. var e={};
  3989. e.clientId=this.clientId;
  3990. return e
  3991. };
  3992. Comcast_plaxosync_requestmgr.prototype.getAuthInfo=function(){
  3993. var e={};
  3994. e.sessionType="NoSession";
  3995. if(this.clientId){
  3996. e.clientInfo=this.getClientInfo()
  3997. }
  3998. if(this.userid&&this.token){
  3999. e.authByToken=Comcast_plaxosync_requestmgr.getAuthByToken(this.userid,this.token)
  4000. }else{
  4001. if(this.session){
  4002. e.authBySession=Comcast_plaxosync_requestmgr.getAuthBySession(this.session)
  4003. }}
  4004. return e
  4005. };
  4006. Comcast_plaxosync_requestmgr.prototype.loginPlain=function(a,t){
  4007. var e={
  4008. GetSessionRequest:{
  4009. authInfo:{
  4010. sessionType:this.getSessionType(),clientInfo:this.getClientInfo(),authByEmail:Comcast_plaxosync_requestmgr.getAuthByEmail(a,t)}}};
  4011. this.send(Comcast_plaxosync_requestmgr.PLAXO_CONTACT_JSON,e,new AjxCallback(this,this._handleLoginResponse,[a]),false)
  4012. };
  4013. Comcast_plaxosync_requestmgr.prototype._handleLoginResponse=function(o,a){
  4014. if(a){
  4015. var e=a.response;
  4016. if(e){
  4017. var t=e.code;
  4018. if(t==200){
  4019. this.session=e.session;
  4020. this.username=o;
  4021. return
  4022. }else{
  4023. appCtxt.setStatusMsg("Login failed: "+e.message+" (Code "+e.code+")",ZmStatusView.LEVEL_CRITICAL);
  4024. return
  4025. }}}
  4026. appCtxt.setStatusMsg("Login failed: Plaxo server sent invalid response",ZmStatusView.LEVEL_CRITICAL)
  4027. };
  4028. Comcast_plaxosync_requestmgr.getAuthBySession=function(e){
  4029. return{
  4030. session:e}
  4031. };
  4032. Comcast_plaxosync_requestmgr.getAuthByUhid=function(e,t){
  4033. return{
  4034. userId:e,password:t}
  4035. };
  4036. Comcast_plaxosync_requestmgr.getAuthByEmail=function(t,e){
  4037. return{
  4038. email:t,password:e}
  4039. };
  4040. Comcast_plaxosync_requestmgr.getAuthByComcast=function(t,e){
  4041. return{
  4042. comcastUsername:t,password:e}
  4043. };
  4044. Comcast_plaxosync_requestmgr.getAuthByIdentity=function(e,t){
  4045. return{
  4046. identity:e,password:t}
  4047. };
  4048. Comcast_plaxosync_requestmgr.getAuthByToken=function(t,e){
  4049. return{
  4050. userId:t,token:e}
  4051. };
  4052. Comcast_preferences={
  4053. _iframeSrc:"http://prefs.connect.comcast.net/prefs/?skin=none"};
  4054. Comcast_preferences.init=function(){
  4055. var h=this.viewName="PreferenceFrame";
  4056. var r=this._iframeView=new ZmUpsellView({
  4057. parent:appCtxt.getShell(),posStyle:Dwt.ABSOLUTE_STYLE,className:"ZmUpsellView"}
  4058. );
  4059. var o=r.getHtmlElement();
  4060. o.style.top=0;
  4061. var t=[];
  4062. var e=0;
  4063. t[e++]="<iframe id='iframe_";
  4064. t[e++]=r.getHTMLElId();
  4065. t[e++]="' ";
  4066. if(this._iframeSrc){
  4067. t[e++]="src='";
  4068. t[e++]=this._iframeSrc;
  4069. t[e++]="'"
  4070. }
  4071. t[e++]=" width='100%' height='100%' frameborder='0'>";
  4072. o.innerHTML=t.join("");
  4073. var s={};
  4074. s[ZmAppViewMgr.C_APP_CONTENT_FULL]=r;
  4075. var n={};
  4076. n[ZmAppViewMgr.CB_POST_SHOW]=new AjxCallback(this,this.onShow);
  4077. appCtxt.getAppViewMgr().createView({
  4078. viewId:h,elements:s,isTransient:false,callbacks:n}
  4079. );
  4080. var a=this.getIframe();
  4081. a.onload=null
  4082. };
  4083. Comcast_preferences.getIframe=function(){
  4084. if(!this._iframe){
  4085. this._iframe=document.getElementById("iframe_"+this._iframeView.getHTMLElId())
  4086. }
  4087. return this._iframe
  4088. };
  4089. Comcast_preferences.onShow=function(){
  4090. appCtxt.getAppChooser().setSelected("Options");
  4091. var e=[ZmMsg.zimbraTitle,"Preferences"].join(": ");
  4092. Dwt.setTitle(e);
  4093. this._iframeView.setVisible(true)
  4094. };
  4095. Comcast_preferences.displayIframe=function(){
  4096. var e=appCtxt.getAppViewMgr();
  4097. e.pushView(this.viewName)
  4098. };
  4099. AjxDispatcher.addPackageLoadFunction("Startup1_2",new AjxCallback(function(){
  4100. var t=false;
  4101. var e=new AjxListener(function(){
  4102. if(!t){
  4103. t=true;
  4104. Comcast_preferences.init()
  4105. }}
  4106. );
  4107. ZmZimbraMail.addListener(ZmAppEvent.PRE_STARTUP,e);
  4108. ZmZimbraMail.addListener(ZmAppEvent.POST_STARTUP,e);
  4109. skin.overrideAPI(ZmPreferencesApp.prototype,"launch",function(a,o){
  4110. Comcast_preferences.displayIframe();
  4111. AjxDispatcher.require(["PreferencesCore","Preferences"],true,new AjxCallback(function(){
  4112. appCtxt.getSettings().loadPreferenceData(new AjxCallback(function(){
  4113. if(o){
  4114. o.run()
  4115. }
  4116. Comcast_preferences.displayIframe()
  4117. }
  4118. ))
  4119. }
  4120. ),null,true)
  4121. }
  4122. )
  4123. }
  4124. ));
  4125. Comcast_voice={
  4126. _iframeSrc:"http://vmail.connect.comcast.net/voice/?skin=none"};
  4127. Comcast_voice.init=function(){
  4128. var h=this.viewName="VoiceFrame";
  4129. var r=this._iframeView=new ZmUpsellView({
  4130. parent:appCtxt.getShell(),posStyle:Dwt.ABSOLUTE_STYLE,className:"ZmUpsellView"}
  4131. );
  4132. var o=r.getHtmlElement();
  4133. o.style.top=0;
  4134. var t=[];
  4135. var e=0;
  4136. t[e++]="<iframe id='iframe_";
  4137. t[e++]=r.getHTMLElId();
  4138. t[e++]="' ";
  4139. if(this._iframeSrc){
  4140. t[e++]="src='";
  4141. t[e++]=this._iframeSrc;
  4142. t[e++]="'"
  4143. }
  4144. t[e++]=" width='100%' height='100%' frameborder='0'>";
  4145. o.innerHTML=t.join("");
  4146. var s={};
  4147. s[ZmAppViewMgr.C_APP_CONTENT_FULL]=r;
  4148. var n={};
  4149. n[ZmAppViewMgr.CB_POST_SHOW]=new AjxCallback(this,this.onShow);
  4150. appCtxt.getAppViewMgr().createView({
  4151. viewId:h,elements:s,isTransient:false,callbacks:n}
  4152. );
  4153. var a=this.getIframe();
  4154. a.onload=null
  4155. };
  4156. Comcast_voice.getIframe=function(){
  4157. if(!this._iframe){
  4158. this._iframe=document.getElementById("iframe_"+this._iframeView.getHTMLElId())
  4159. }
  4160. return this._iframe
  4161. };
  4162. Comcast_voice.onShow=function(){
  4163. appCtxt.getAppChooser().setSelected("Voice");
  4164. var e=[ZmMsg.zimbraTitle,"Voice"].join(": ");
  4165. Dwt.setTitle(e);
  4166. this._iframeView.setVisible(true)
  4167. };
  4168. Comcast_voice.displayIframe=function(){
  4169. var e=appCtxt.getAppViewMgr();
  4170. e.pushView(this.viewName)
  4171. };
  4172. AjxDispatcher.addPackageLoadFunction("Startup1_2",new AjxCallback(function(){
  4173. var t=false;
  4174. var e=new AjxListener(function(){
  4175. if(!t){
  4176. t=true;
  4177. Comcast_voice.init()
  4178. }}
  4179. );
  4180. ZmZimbraMail.addListener(ZmAppEvent.PRE_STARTUP,e);
  4181. ZmZimbraMail.addListener(ZmAppEvent.POST_STARTUP,e);
  4182. skin.overrideAPI(ZmVoiceApp.prototype,"launch",function(a,o){
  4183. Comcast_voice.displayIframe();
  4184. AjxDispatcher.require(["Voicemail"],true,new AjxCallback(function(){
  4185. appCtxt.getSettings().loadPreferenceData(new AjxCallback(function(){
  4186. if(o){
  4187. o.run()
  4188. }
  4189. Comcast_voice.displayIframe()
  4190. }
  4191. ))
  4192. }
  4193. ),null,true)
  4194. }
  4195. )
  4196. }
  4197. ));
  4198. SkinLoadedZimlet=function(a,t,e){
  4199. if(!arguments.length){
  4200. return
  4201. }
  4202. this.name=a;
  4203. this.msgObj=t;
  4204. this.cfgObj=e;
  4205. this.isSkinLoadedZimlet=true
  4206. };
  4207. SkinLoadedZimlet.prototype.createApp=function(r,t,l,n){
  4208. var s=this.name;
  4209. var o=appCtxt.getAppController();
  4210. var a={
  4211. text:r,image:t,tooltip:l};
  4212. if(n!=null&&n>=0){
  4213. a.index=n
  4214. }
  4215. o.getAppChooser().addButton(s,a);
  4216. var h=this;
  4217. var e=new ZmApp(s,this,DwtShell.getShell(window));
  4218. e.launch=function(c,d){
  4219. h.getController().show();
  4220. ZmApp.prototype.launch.call(this,c);
  4221. if(h.appLaunch){
  4222. h.appLaunch(this.getName(),c)
  4223. }
  4224. if(d){
  4225. d.run()
  4226. }};
  4227. o.addApp(e);
  4228. return s
  4229. };
  4230. SkinLoadedZimlet.prototype.getMessage=function(e){
  4231. var t=this.msgObj[e];
  4232. if(AjxUtil.isUndefined(t)){
  4233. t="???"+this.name+".msg."+e+"???"
  4234. }
  4235. return t
  4236. };
  4237. SkinLoadedZimlet.prototype.getMessageF=function(e){
  4238. return this.msgObj[e]||null
  4239. };
  4240. SkinLoadedZimlet.prototype.getMsgObj=function(){
  4241. return this.msgObj
  4242. };
  4243. SkinLoadedZimlet.prototype.getConfig=function(e){
  4244. return this.cfgObj[e]
  4245. };
  4246. SkinLoadedZimlet.prototype.getResource=function(e){
  4247. return["/zimbra/skins/velodrome2/",this.name,"/",e].join("")
  4248. };
  4249. SkinLoadedZimlet.prototype.displayStatusMessage=function(e){
  4250. appCtxt.setStatusMsg(e)
  4251. };
  4252. if(!window.net_comcast_sms){
  4253. net_comcast_sms={}
  4254. }
  4255. net_comcast_sms.msg={
  4256. xtmTitle:"Text Messaging",xtmTooltip:"Read and send SMS messages",prefSectionTitle:"Text Messaging",prefGeneralSectionTitle:"General",prefPlanSectionTitle:"Plan options",prefShowSubjectLabel:"Subject field:",prefAutoForwardLabel:"Auto-forward:",prefAutoForwardToLabel:"Forward to:",prefPlanLabel:"Current plan:",prefUnsubscribe:"Unsubscribe",actionNew:"New",actionNewTooltip:"Compose a new text message",actionForward:"Forward",actionForwardTooltip:"Forward messages by SMS or Email",actionForwardEnd:"Cancel forwarding",actionForwardEndTooltip:"End forwarding mode",actionEdit:"Edit",actionEditTooltip:"Lock, unlock or delete messages",actionEditEnd:"Done editing",actionEditEndTooltip:"End editing mode",actionCancel:"Cancel",actionCancelTooltip:"Cancel composing",actionSend:"Send",actionSendTooltip:"Send the message",actionRefresh:"Get New Messages",actionRefreshTooltip:"Get New Messages",actionSave:"Save",newMessageCount:"{0} new messages",actionMore:"More",actionLock:"Lock",actionUnlock:"Unlock",actionDelete:"Delete",actionRestore:"Recover deleted message",processing:"Processing...",threadHeader:"{0}",quotaInReached:"You are over your maximum inbox quota",quotaInNear:"You are close to your maximum inbox quota",quotaOutReached:"We have detected excessive use of the messaging service. While you can still receive messages, you will not be able to send messages until midnight (PST).",quotaOutNear:"We have detected a potential excessive use problem. Continued use of the text messaging service at your current rate may cause your messaging service to be suspended until midnight (PST).",quotaDialogTitle:"Quota Warning",quotaError:"We have detected excessive use of the messaging service. While you can still receive messages, you will not be able to send messages until midnight (PST).",msgAnnotation:"{0} from {1}",composeHeader:"New Message",composeCancelButton:"Cancel",composeSendButton:"Send",composeToLabel:"To:",composeSubjectLabel:"Subject:",composeSendingStatus:"Sending message",composeErrorStatus:"Sorry, but there was a problem communicating with the server.<br/>Your message has not been sent. Please try again later.",composeSentStatus:"Message sent",composeExitNotification:"Your new SMS message has not been sent. Unsent SMS messages are not saved.",composeExitNotificationCancel:"Go back to message",composeExitNotificationOk:"Discard message",composeInvalidTN:"Please enter a telephone number between 5 to 14 digits.",composeEmptyError:"Please enter some text before you send a message",deleteThreadButton:"Delete Conversation",deleteThreadMsg:"{0} messages",deleteThreadWarning:"All unlocked messages in the conversation will be deleted. This cannot be undone.",forwardTextButton:"Forward as Text",forwardEmailButton:"Forward as Email",replySendButton:"Send",replySubjectLabel:"Subject:",threadMoreButton:"More",threadNone:"No Conversations",threadPleaseSelect:"No conversation selected.",provText1:"There are multiple available numbers associated with this account. Please choose the one to associate with this user ID.",provText2:"Once you associate a phone number with your user ID, you will be able to change this association online.",provComplete:"Welcome to xfinity Text Messaging! You will receive a new text message when your service is up and ready to use",provFailed:"Sorry, but there was a problem with Text Messaging for your account. Please wait a few minutes and try again. If this problem persists, please contact Customer Care and tell them the following message: [{0}].",provErrorTitle:"Sorry, there was a problem.",provErrorAlready:"An order is already pending on your account. Please try again later. (Error: {0})",provErrorGeneric:"We are unable to process your order. Please try again later or contact <a href='http://www.comcastsupport.com/' target='_blank'>Comcast Customer Care</a>. (Error: {0})",provPollWait:"Your request to add XFINITY Text Messaging has been received, and we are setting up your account. This process can take up to 10 minutes to complete, so we appreciate your patience. Please check back later to confirm that your set up has completed.<br/><br/>If your set up has not completed within 24 hours, please contact <a href='http://www.comcastsupport.com/' target='_blank'>Comcast Customer Care</a>.",provPollFinished:"Your Xfinity Text Messaging has been activated. We have sent a welcome text message to you.",provErrorHeader:"Server error",provErrorProfile:"Unable to retrieve profile; backend may be down.<br/><br/>Server response:<br/>{0}",provErrorVoicemail:"Unable to retrieve voicemail summary; backend may be down.<br/><br/>Server response:<br/>{0}",provErrorException:"There was an error with retrieving the account information<br/><br/>Server response:<br/>{0}",provCancel:"Cancel",provDecline:"Decline",provSignup:"Signup",provAccept:"Accept",provBack:"Back",provNext:"Next",provOK:"OK",loadFailedHead:"Sorry, we were unable to load your text messages.",loadFailedBody:"Please try refreshing your browser in a few minutes.",unsubscribe:"Unsubscribe",unsubscribeHead:"Are you sure you want to unsubscribe?",unsubscribeBody:"This will cancel your Text service and remove all messages from this device.",unsubscribeHeadProc:"Unsubscribing",unsubscribeBodyProc:"Cancelling your subscription...",unsubscribeHeadFinish:"Unsubscribe request sent",unsubscribeBodyFinish:"Thank you for interest in XFINITY Text Messaging. Your request to remove the Text Messaging feature has been received, and we are currently processing your request. This process can take up to 10 minutes to complete, so we appreciate your patience.<br/><br/>If this process has not completed within 24 hours, please contact <a href='http://www.comcastsupport.com/' target='_blank'>Comcast Customer Care</a>.",unsubscribeHeadFail:"Unsubscribe failed",unsubscribeBodyFail:"Sorry, there was a problem cancelling your subscription. Please wait a little bit and try again later."};
  4257. if(!window.net_comcast_sms){
  4258. net_comcast_sms={}
  4259. }
  4260. net_comcast_sms.config={
  4261. deeplinkRef:"sms",broadcloudBase:"https://secure.api.comcast.net/textmsg",pollTime:10*60*1000};
  4262. if(!net_comcast_sms){
  4263. net_comcast_sms={}
  4264. }
  4265. net_comcast_sms.TEMPLATE_BASE="net_comcast_sms";
  4266. AjxPackage.define(net_comcast_sms.TEMPLATE_BASE);
  4267. net_comcast_sms.SmsZimlet=function(){
  4268. SkinLoadedZimlet.call(this,"net_comcast_sms",ZmMsg,net_comcast_sms.config);
  4269. this._loadCallbacks=[];
  4270. this._settingsLoadCallbacks=[];
  4271. this._settings=["SMS_AUTO_FORWARD_EMAIL_ADDR","SMS_AUTO_FORWARD_EMAIL"];
  4272. net_comcast_sms.instance=this
  4273. };
  4274. net_comcast_sms.SmsZimlet.prototype=new SkinLoadedZimlet;
  4275. net_comcast_sms.SmsZimlet.prototype.constructor=net_comcast_sms.SmsZimlet;
  4276. net_comcast_sms.SmsZimlet.prototype.toString=function(){
  4277. return"net_comcast_sms.SmsZimlet"
  4278. };
  4279. net_comcast_sms.SmsZimlet.prototype.getSubscribed=function(e){
  4280. return net_comcast_sms.Provisioning.getSubscribed(e)
  4281. };
  4282. net_comcast_sms.SmsZimlet.prototype.signup=function(a,e,o,t){
  4283. return net_comcast_sms.Provisioning.signup(a,e,o,t)
  4284. };
  4285. net_comcast_sms.SmsZimlet.prototype.unsubscribe=function(t,e){
  4286. return net_comcast_sms.Provisioning.unsubscribe(new AjxCallback(this,function(){
  4287. caboUtil.run(t,new AjxCallback(function(){
  4288. appCtxt.getAppController().activateApp(ZmApp.PORTAL,true)
  4289. }
  4290. ))
  4291. }
  4292. ),e)
  4293. };
  4294. net_comcast_sms.SmsZimlet.prototype.getAvailableTNs=function(e){
  4295. net_comcast_sms.Provisioning.getAvailableTNs(e)
  4296. };
  4297. net_comcast_sms.SmsZimlet.prototype.isEntitled=function(){
  4298. return net_comcast_sms.Provisioning.isEntitled()
  4299. };
  4300. net_comcast_sms.SmsZimlet.prototype.loadVoiceData=function(e){
  4301. net_comcast_sms.Provisioning.load(e)
  4302. };
  4303. net_comcast_sms.SmsZimlet.prototype.init=function(){
  4304. var t=net_comcast_sms.Util.getCOSName();
  4305. if(t=="mail"||t=="mail-noad"||t=="combo-secondary"){}else{
  4306. var e="/zimbra/skins/velodrome2/public/";
  4307. net_comcast_sms.SmsZimlet.PROXY=e+"proxy.jsp?url=";
  4308. net_comcast_sms.SmsZimlet.TERMS=e+"getTerm.jsp";
  4309. net_comcast_sms.SmsZimlet.RECORDCONTRACT=e+"recordContract.jsp";
  4310. net_comcast_sms.SmsZimlet.ORDERADD=e+"orderAdd.jsp";
  4311. net_comcast_sms.SmsZimlet.COSTS_LIMITED=this.getMessageF("prov_costs_limited.")||this.getResource("html/costs_limited.html");
  4312. net_comcast_sms.SmsZimlet.COSTS_UNLIMITED=this.getMessageF("prov_costs_unlimited")||this.getResource("html/costs_unlimited.html");
  4313. net_comcast_sms.SmsZimlet.COSTS_NEITHER=this.getMessageF("prov_costs_neither")||this.getResource("html/costs_neither.html");
  4314. net_comcast_sms.SmsZimlet.MARKETING=this.getMessageF("prov_marketing")||this.getResource("html/marketing.html");
  4315. net_comcast_sms.SmsZimlet.NOT_ENTITLED=this.getMessageF("prov_secondary")||this.getResource("html/secondary.html");
  4316. net_comcast_sms.SmsZimlet.BUSINESS=this.getMessageF("prov_business")||this.getResource("html/business.html");
  4317. net_comcast_sms.SmsZimlet.NO_CPNI=this.getMessageF("prov_noCPNI")||this.getResource("html/noCPNI.html");
  4318. net_comcast_sms.SmsZimlet.PENDING=this.getMessageF("prov_pending")||this.getResource("html/pending.html");
  4319. net_comcast_sms.SmsZimlet.PRIMARY_CCENTRAL=this.getMessageF("prov_primary_cCentral")||this.getResource("html/primary_cCentral.html");
  4320. net_comcast_sms.SmsZimlet.PRIMARY_CCENTRAL_MUSTGO=this.getMessageF("prov_primary_cCentral_mustgo")||this.getResource("html/primary_cCentral_mustgo.html");
  4321. net_comcast_sms.SmsZimlet.SECONDARY=this.getMessageF("prov_secondary")||this.getResource("html/secondary.html");
  4322. net_comcast_sms.SmsZimlet.SECONDARY_CCENTRAL=this.getMessageF("prov_secondary_cCentral")||this.getResource("html/secondary_cCentral.html");
  4323. net_comcast_sms.SmsZimlet.SECONDARY_NOTASSIGNED=this.getMessageF("prov_secondary_notAssigned")||this.getResource("html/secondary_notAssigned.html");
  4324. net_comcast_sms.SmsZimlet.SNS_ENABLED=this.getMessageF("prov_snsEnabled")||this.getResource("html/snsEnabled.jsp");
  4325. net_comcast_sms.SmsZimlet.SYNCING=this.getMessageF("prov_syncing")||this.getResource("html/syncing.html");
  4326. net_comcast_sms.SmsZimlet.NO_ACCESS=this.getMessageF("prov_noAccess")||this.getResource("html/noAccess.html");
  4327. this._controller=new net_comcast_sms.Controller(DwtShell.getShell(window),this);
  4328. this._notificationClient=new net_comcast_sms.NotificationClient();
  4329. this._setupTab();
  4330. var o=this.getConfig("deeplinkRef")||"net_comcast_sms";
  4331. var a=caboUtil.urlParam("app")||"";
  4332. if(a.toLowerCase()==o.toLowerCase()){
  4333. appCtxt.getAppController().activateApp(this.app._name,true)
  4334. }}};
  4335. net_comcast_sms.SmsZimlet.prototype.load=function(t){
  4336. this._loadCallbacks.push(t);
  4337. if(!this._loadBegun){
  4338. this._loadBegun=true;
  4339. var e=net_comcast_sms.Provisioning.getMasterAccount(new AjxCallback(this,this._load2))
  4340. }else{
  4341. if(this._loadComplete){
  4342. this._finishLoad(t)
  4343. }}};
  4344. net_comcast_sms.SmsZimlet.prototype._load2=function(t){
  4345. if(!t){
  4346. this._controller.showError(this.getMsg("loadErrorMasterAccountNotFound"))
  4347. }else{
  4348. this._masterAccount=t;
  4349. var e=t.users[0];
  4350. this._load3(e)
  4351. }};
  4352. net_comcast_sms.SmsZimlet.prototype._load3=function(e){
  4353. this._controller.setUserAccount(e,new AjxCallback(this,this._finishLoad))
  4354. };
  4355. net_comcast_sms.SmsZimlet.prototype._finishLoad=function(){
  4356. var o=!this._loadComplete;
  4357. this._loadComplete=true;
  4358. this.loadSettings();
  4359. var a=[].concat(this._loadCallbacks);
  4360. this._loadCallbacks.length=0;
  4361. var t=this;
  4362. setTimeout(function(){
  4363. caboUtil.run(a)
  4364. }
  4365. ,0);
  4366. if(o){
  4367. this._notificationClient.start();
  4368. var e=this._controller.getUserAccount().getMessageStore();
  4369. this._notificationClient.addListener("notification",new AjxCallback(e,e.handleNotification))
  4370. }};
  4371. net_comcast_sms.SmsZimlet.prototype.getDisplayName=function(){
  4372. return this.getMsg("xtmTitle")
  4373. };
  4374. net_comcast_sms.SmsZimlet.prototype.getMsg=function(t){
  4375. var a=this.getMessage(t);
  4376. if(arguments.length>1){
  4377. var e=Array.prototype.slice.call(arguments,1);
  4378. a=AjxMessageFormat.format(a,e)
  4379. }
  4380. return a
  4381. };
  4382. net_comcast_sms.SmsZimlet.prototype._setupTab=function(){
  4383. var r=appCtxt.getAppChooser();
  4384. var a=AjxUtil.indexOf(r.getChildren(),r.getButton(ZmApp.PREFERENCES));
  4385. var e=this.createApp(this.getMsg("xtmTitle"),"Telephone",this.getMsg("xtmTooltip"),a);
  4386. var s=appCtxt.getAppChooser();
  4387. var t={};
  4388. for(var n=0;
  4389. n<s._children.size();
  4390. n++){
  4391. var o=s._children.get(n);
  4392. t[o.getData("_id_")]=o
  4393. }
  4394. s._buttons=t;
  4395. this.app=appCtxt.getApp(e);
  4396. this.app._controller=this._controller
  4397. };
  4398. net_comcast_sms.SmsZimlet.prototype.getAppController=function(){
  4399. return this.app.getController()
  4400. };
  4401. net_comcast_sms.SmsZimlet.prototype.getOverviewWidth=function(){
  4402. return window.skin.getTreeWidth()
  4403. };
  4404. net_comcast_sms.SmsZimlet.prototype.setOverviewWidth=function(t){
  4405. var e=this.getOverviewWidth();
  4406. appCtxt.getAppViewMgr()._appTreeSashCallback(t-e)
  4407. };
  4408. net_comcast_sms.SmsZimlet.prototype.getNotificationClient=function(){
  4409. return this._notificationClient
  4410. };
  4411. net_comcast_sms.SmsZimlet.prototype.getLocalConfig=function(e){
  4412. AjxRpc.invoke(null,"/zimbra/skins/velodrome2/public/getConfigValues.jsp",null,new AjxCallback(this,this._handleGetLocalConfig,[e]),true)
  4413. };
  4414. net_comcast_sms.SmsZimlet.prototype._handleGetLocalConfig=function(a,e){
  4415. if(e&&e.success){
  4416. var t=e.obj||JSON.gparse(e.text);
  4417. caboUtil.run(a,t)
  4418. }};
  4419. net_comcast_sms.SmsZimlet.prototype._registerSettings=function(){
  4420. appCtxt.getSettings().registerSetting("SMS_AUTO_FORWARD_EMAIL",{
  4421. type:ZmSetting.T_PREF,dataType:ZmSetting.D_BOOLEAN,defaultValue:false}
  4422. );
  4423. appCtxt.getSettings().registerSetting("SMS_AUTO_FORWARD_EMAIL_ADDR",{
  4424. type:ZmSetting.T_PREF,dataType:ZmSetting.D_STRING}
  4425. );
  4426. appCtxt.getSettings().registerSetting("SMS_UNSUBSCRIBE",{
  4427. type:ZmSetting.T_PREF}
  4428. )
  4429. };
  4430. net_comcast_sms.SmsZimlet.prototype._registerPrefs=function(){
  4431. var e=this;
  4432. caboUtil.onload("caboUtil.Preferences",function(){
  4433. if(!e._sectionRegistered){
  4434. e.getSubscribed(new AjxCallback(function(a){
  4435. if(a){
  4436. e.loadSettings();
  4437. ZmPref.registerPref("SMS_AUTO_FORWARD_EMAIL",{
  4438. displayContainer:ZmPref.TYPE_RADIO_GROUP,orientation:ZmPref.ORIENT_VERTICAL,displayOptions:[ZmMsg.on,ZmMsg.off],options:[true,false]}
  4439. );
  4440. ZmPref.registerPref("SMS_AUTO_FORWARD_EMAIL_ADDR",{
  4441. displayContainer:ZmPref.TYPE_INPUT,validationFunction:ZmPref.validateEmail,errorMessage:ZmMsg.invalidEmail,hint:ZmMsg.enterEmailAddress}
  4442. );
  4443. ZmPref.registerPref("SMS_UNSUBSCRIBE",{
  4444. displayContainer:ZmPref.TYPE_CUSTOM}
  4445. );
  4446. var t={
  4447. title:e.getMsg("prefSectionTitle"),icon:"Telephone",templateId:"net_comcast_sms#Preferences",priority:200,manageDirty:true,prefs:[ZmSetting.SMS_AUTO_FORWARD_EMAIL,ZmSetting.SMS_AUTO_FORWARD_EMAIL_ADDR,ZmSetting.SMS_UNSUBSCRIBE],createView:function(r,s,n){
  4448. var o=new net_comcast_sms.PrefController(e,r,n._app,n._prefsView,s,n);
  4449. AjxUtil.hashUpdate(o,n);
  4450. return new net_comcast_sms.PrefsView(r,s,o)
  4451. }};
  4452. ZmPref.registerPrefSection("SMS",t);
  4453. e._sectionRegistered=true
  4454. }}
  4455. ))
  4456. }}
  4457. )
  4458. };
  4459. net_comcast_sms.SmsZimlet.prototype.loadSettings=function(o){
  4460. if(!this._settingsLoadingBegun){
  4461. this._settingsLoadingBegun=true;
  4462. var a=this._settings.length;
  4463. var t=caboUtil.MultiCallback.simple(a,null,new AjxCallback(this,this._handleLoadSettings),true);
  4464. for(var e=0;
  4465. e<a;
  4466. e++){
  4467. this.loadSetting(this._settings[e],t.getCallback(e))
  4468. }}else{
  4469. if(this._settingsLoaded){
  4470. caboUtil.run(o)
  4471. }else{
  4472. this.addSettingsLoadListener(o)
  4473. }}};
  4474. net_comcast_sms.SmsZimlet.prototype.addSettingsLoadListener=function(e){
  4475. this._settingsLoadCallbacks.push(e)
  4476. };
  4477. net_comcast_sms.SmsZimlet.prototype._handleLoadSettings=function(){
  4478. this._settingsLoaded=true;
  4479. caboUtil.run(this._settingsLoadCallbacks);
  4480. this._settingsLoadCallbacks.length=0
  4481. };
  4482. net_comcast_sms.SmsZimlet.prototype.getSettingsLoaded=function(){
  4483. return this._settingsLoaded
  4484. };
  4485. net_comcast_sms.SmsZimlet.prototype.loadSetting=function(a,n){
  4486. var e=appCtxt.getSettings().getSetting(a);
  4487. if(e){
  4488. var t;
  4489. var o=new AjxCallback(this,function(s){
  4490. if(!AjxUtil.isUndefined(s)){
  4491. e.setValue(s.toString())
  4492. }
  4493. caboUtil.run(n)
  4494. }
  4495. );
  4496. switch(a){
  4497. case"SMS_AUTO_FORWARD_EMAIL":this._loadSmsFwdConfigSetting("email.enabled",o);
  4498. break;
  4499. case"SMS_AUTO_FORWARD_EMAIL_ADDR":this._loadSmsFwdConfigSetting("email.addr",o);
  4500. break;
  4501. default:caboUtil.run(o);
  4502. break
  4503. }}};
  4504. net_comcast_sms.SmsZimlet.prototype.saveSettings=function(o){
  4505. var a=caboUtil.MultiCallback.simple(this._settings.length,null,new AjxCallback(this,this._finalizeSettings,[o]),true);
  4506. for(var t=0,e=this._settings.length;
  4507. t<e;
  4508. t++){
  4509. this.saveSetting(this._settings[t],false,a.getCallback(t))
  4510. }};
  4511. net_comcast_sms.SmsZimlet.prototype._finalizeSettings=function(e){
  4512. this._finalizeSmsFwdConfigSetting(e)
  4513. };
  4514. net_comcast_sms.SmsZimlet.prototype.saveSetting=function(a,o,n){
  4515. var e=(a instanceof ZmSetting)?a:appCtxt.getSettings().getSetting(a);
  4516. if(e instanceof ZmSetting){
  4517. var t=e.getValue();
  4518. if(!AjxUtil.isUndefined(t)){
  4519. e.origValue=t;
  4520. switch(a){
  4521. case"SMS_AUTO_FORWARD_EMAIL":this._saveSmsFwdConfigSetting("email.enabled",t,o,n);
  4522. break;
  4523. case"SMS_AUTO_FORWARD_EMAIL_ADDR":this._saveSmsFwdConfigSetting("email.addr",t,o,n);
  4524. break;
  4525. default:caboUtil.run(n);
  4526. break
  4527. }}}};
  4528. net_comcast_sms.SmsZimlet.prototype._saveSmsFwdConfigSetting=function(e,t,a,o){
  4529. this._getLoadedSmsFwdConfig(function(n){
  4530. n.setConfigValue(e,t);
  4531. if(a){
  4532. n.put(o)
  4533. }else{
  4534. caboUtil.run(o)
  4535. }}
  4536. )
  4537. };
  4538. net_comcast_sms.SmsZimlet.prototype._loadSmsFwdConfigSetting=function(e,t){
  4539. this._getLoadedSmsFwdConfig(function(a){
  4540. caboUtil.run(t,a.getConfigValue(e))
  4541. }
  4542. )
  4543. };
  4544. net_comcast_sms.SmsZimlet.prototype._finalizeSmsFwdConfigSetting=function(e){
  4545. this._getLoadedSmsFwdConfig(function(t){
  4546. t.put(e)
  4547. }
  4548. )
  4549. };
  4550. net_comcast_sms.SmsZimlet.prototype._finalizeSmsConfigSetting=function(e){
  4551. caboUtil.run(e)
  4552. };
  4553. net_comcast_sms.SmsZimlet.prototype._getLoadedSmsConfig=function(e){
  4554. this.load(new AjxCallback(this,function(){
  4555. var t=this._controller.getUserAccount();
  4556. t.loadConfig(new AjxCallback(this,function(){
  4557. caboUtil.run(e,t)
  4558. }
  4559. ))
  4560. }
  4561. ))
  4562. };
  4563. net_comcast_sms.SmsZimlet.prototype._getLoadedSmsFwdConfig=function(e){
  4564. this.load(new AjxCallback(this,function(){
  4565. var t=this._controller.getUserAccount();
  4566. t.fwd.get(new AjxCallback(this,function(a){
  4567. caboUtil.run(e,a)
  4568. }
  4569. ))
  4570. }
  4571. ))
  4572. };
  4573. net_comcast_sms.SmsZimlet.prototype.getController=function(){
  4574. return this._controller
  4575. };
  4576. net_comcast_sms.SmsZimlet.prototype.composeToContact=function(e){
  4577. return this._controller.composeToContact(e)
  4578. };
  4579. net_comcast_sms.SmsZimlet.prototype.getHouseholdDialog=function(){
  4580. if(!this._householdDialog){
  4581. this._householdDialog=new net_comcast_sms.HouseholdDialog({
  4582. parent:appCtxt.getShell(),controller:this._controller}
  4583. )
  4584. }
  4585. return this._householdDialog
  4586. };
  4587. AjxTemplate.register("net_comcast_sms#ThreadViewList",function(t,s,n,e){
  4588. var o=Boolean(e);
  4589. n=(typeof n=="string"?{
  4590. id:n}
  4591. :n)||{};
  4592. e=e||[];
  4593. var a=e.length;
  4594. e[a++]="<table border=0 cellspacing=0 cellpadding=0 width='100%' height='100%'><tr><td class='ThreadViewList'><div id='";
  4595. e[a++]=n.id;
  4596. e[a++]="_none' style='height:100%'></div><div id='";
  4597. e[a++]=n.id;
  4598. e[a++]="_thread' style='height:100%'></div></td></tr><tr><td class='ThreadViewFooter'><div id='";
  4599. e[a++]=n.id;
  4600. e[a++]="_reply'></div><div id='";
  4601. e[a++]=n.id;
  4602. e[a++]="_forward'></div><div id='";
  4603. e[a++]=n.id;
  4604. e[a++]="_deleteThread'></div></td></tr></table>";
  4605. return o?e.length:e.join("")
  4606. }
  4607. ,{
  4608. id:"net_comcast_sms#ThreadViewList","class":"ZWidget"}
  4609. ,false);
  4610. AjxTemplate.register("net_comcast_sms",AjxTemplate.getTemplate("net_comcast_sms#ThreadViewList"),AjxTemplate.getParams("net_comcast_sms#ThreadViewList"));
  4611. AjxTemplate.register("net_comcast_sms#ThreadView",function(t,s,n,e){
  4612. var o=Boolean(e);
  4613. n=(typeof n=="string"?{
  4614. id:n}
  4615. :n)||{};
  4616. e=e||[];
  4617. var a=e.length;
  4618. e[a++]="<div id='";
  4619. e[a++]=n.id;
  4620. e[a++]="_header' class='ThreadViewHeader'></div><div id='";
  4621. e[a++]=n.id;
  4622. e[a++]="_more'></div><div id='";
  4623. e[a++]=n.id;
  4624. e[a++]="_thread' class='ThreadViewBody'></div>";
  4625. return o?e.length:e.join("")
  4626. }
  4627. ,{
  4628. id:"net_comcast_sms#ThreadView","class":"ZWidget"}
  4629. ,false);
  4630. AjxTemplate.register("net_comcast_sms#MessageViewIncoming",function(t,s,n,e){
  4631. var o=Boolean(e);
  4632. n=(typeof n=="string"?{
  4633. id:n}
  4634. :n)||{};
  4635. e=e||[];
  4636. var a=e.length;
  4637. e[a++]="<div id='";
  4638. e[a++]=n.id;
  4639. e[a++]="_message' class='IncomingMessage'><table cellpadding='0' cellspacing='0'><tr><td class='MessageLeftPadding' width='33px'><div style='width:33px'><div id='";
  4640. e[a++]=n.id;
  4641. e[a++]="_forward_buttons' class='MessageForwardButtons'><div id='";
  4642. e[a++]=n.id;
  4643. e[a++]="_check_forward' class='MessageForwardButton'></div></div></div></td><td class='MessageTableCell' id='";
  4644. e[a++]=n.id;
  4645. e[a++]="_balloon' width='400px'><table border='0' cellspacing=0 cellpadding=0 class='MessageTable'><tr><td class='MessageImage'><!--<img id='";
  4646. e[a++]=n.id;
  4647. e[a++]="_image'/>--></td><td class='MessageBodyCell'><div class='MessageBody'><div id='";
  4648. e[a++]=n.id;
  4649. e[a++]="_body'></div></div></td></tr><tr><td><div id='";
  4650. e[a++]=n.id;
  4651. e[a++]="_lock' class='MessageLock'></div></td><td><div id='";
  4652. e[a++]=n.id;
  4653. e[a++]="_annotation' class='MessageAnnotation'></div></td></tr></table></td><td class='ButtonTableCell' width='100%'><table><tr><td class='MessageButtons'><div id='";
  4654. e[a++]=n.id;
  4655. e[a++]="_edit_buttons' class='MessageEditButtons' style='float:left'><table><tr><td><div id='";
  4656. e[a++]=n.id;
  4657. e[a++]="_button_lock' class='MessageEditButton'></div></td><td><div id='";
  4658. e[a++]=n.id;
  4659. e[a++]="_button_unlock' class='MessageEditButton'></div></td><td><div id='";
  4660. e[a++]=n.id;
  4661. e[a++]="_button_delete' class='MessageEditButton'></div></td></tr></table></div><div id='";
  4662. e[a++]=n.id;
  4663. e[a++]="_processing_area' class='MessageProcessingArea' style='float:left'><div id='";
  4664. e[a++]=n.id;
  4665. e[a++]="_processing' class='MessageProcessing'></div></div></td></tr></table></td><td class='MessageRightPadding' width='33px'><div style='width:33px'></div></td></tr><tr><td class='MessageLeftPadding'></td><td colspan='3'><div class='tip'>&nbsp;</div></td></tr></table></div><div id='";
  4666. e[a++]=n.id;
  4667. e[a++]="_restore' class='MessageRestore'><div id='";
  4668. e[a++]=n.id;
  4669. e[a++]="_button_restore' class='MessageRestoreButton'></div><div id='";
  4670. e[a++]=n.id;
  4671. e[a++]="_restoring_area' class='MessageProcessingArea'><div id='";
  4672. e[a++]=n.id;
  4673. e[a++]="_restoring' class='MessageProcessing'></div></div></div>";
  4674. return o?e.length:e.join("")
  4675. }
  4676. ,{
  4677. id:"net_comcast_sms#MessageViewIncoming","class":"ZWidget"}
  4678. ,false);
  4679. AjxTemplate.register("net_comcast_sms#MessageViewOutgoing",function(t,s,n,e){
  4680. var o=Boolean(e);
  4681. n=(typeof n=="string"?{
  4682. id:n}
  4683. :n)||{};
  4684. e=e||[];
  4685. var a=e.length;
  4686. e[a++]="<div id='";
  4687. e[a++]=n.id;
  4688. e[a++]="_message' class='OutgoingMessage'><table cellpadding='0' cellspacing='0'><tr><td class='MessageLeftPadding' width='33px'><div style='width:33px'></div></td><td class='ButtonTableCell' width='100%' align=\"right\"><table><tr><td class='MessageButtons'><div id='";
  4689. e[a++]=n.id;
  4690. e[a++]="_edit_buttons' class='MessageEditButtons'><table><tr><td><div id='";
  4691. e[a++]=n.id;
  4692. e[a++]="_button_lock' class='MessageEditButton'></div></td><td><div id='";
  4693. e[a++]=n.id;
  4694. e[a++]="_button_unlock' class='MessageEditButton'></div></td><td><div id='";
  4695. e[a++]=n.id;
  4696. e[a++]="_button_delete' class='MessageEditButton'></div></td></tr></table></div><div id='";
  4697. e[a++]=n.id;
  4698. e[a++]="_forward_buttons' class='MessageForwardButtons' style='float:right'><div id='";
  4699. e[a++]=n.id;
  4700. e[a++]="_check_forward' class='MessageForwardButton'></div></div><div id='";
  4701. e[a++]=n.id;
  4702. e[a++]="_processing_area' class='MessageProcessingArea' style='float:right'><div id='";
  4703. e[a++]=n.id;
  4704. e[a++]="_processing' class='MessageProcessing'></div></div></td></tr></table></td><td class='MessageTableCell' id='";
  4705. e[a++]=n.id;
  4706. e[a++]="_balloon' width='400px'><table border='0' cellspacing=0 cellpadding=0 class='MessageTable'><tr><td class='MessageImage'></td><td class='MessageBodyCell'><div class='MessageBody'><div id='";
  4707. e[a++]=n.id;
  4708. e[a++]="_body'></div></div></td></tr><tr><td><div id='";
  4709. e[a++]=n.id;
  4710. e[a++]="_lock' class='MessageLock'></div></td><td><div id='";
  4711. e[a++]=n.id;
  4712. e[a++]="_annotation' class='MessageAnnotation'></div></td></tr></table></td><td class='MessageRightPadding' width='33px'><div style='width:33px'></div></td></tr><tr><td colspan='3'><div class='tip'>&nbsp;</div></td><td class='MessageRightPadding'></td></tr></table></div><div id='";
  4713. e[a++]=n.id;
  4714. e[a++]="_restore' class='MessageRestore'><div id='";
  4715. e[a++]=n.id;
  4716. e[a++]="_button_restore' class='MessageRestoreButton'></div><div id='";
  4717. e[a++]=n.id;
  4718. e[a++]="_restoring_area' class='MessageProcessingArea'><div id='";
  4719. e[a++]=n.id;
  4720. e[a++]="_restoring' class='MessageProcessing'></div></div></div>";
  4721. return o?e.length:e.join("")
  4722. }
  4723. ,{
  4724. id:"net_comcast_sms#MessageViewOutgoing","class":"ZWidget"}
  4725. ,false);
  4726. AjxTemplate.register("net_comcast_sms#Reply",function(t,s,n,e){
  4727. var o=Boolean(e);
  4728. n=(typeof n=="string"?{
  4729. id:n}
  4730. :n)||{};
  4731. e=e||[];
  4732. var a=e.length;
  4733. e[a++]="<table border=0 cellspacing=0 cellpadding=0 width='100%' height='100%'><tr id='";
  4734. e[a++]=n.id;
  4735. e[a++]="_groupRow'><td class='ReplyGroup' colspan='3'><div id=\"";
  4736. e[a++]=n.id;
  4737. e[a++]="_group\"></div></td></tr><!--<tr id='";
  4738. e[a++]=n.id;
  4739. e[a++]="_subjectRow'><td class='ReplySubject' colspan='3'><table border='0' cellspacing='0' cellpadding='0' width='100%'><tr><td class='ReplySubjectLabel'>\n";
  4740. e[a++]="\t\t\t\t\t\t\t";
  4741. e[a++]=n.msg["replySubjectLabel"];
  4742. e[a++]="\n";
  4743. e[a++]="\t\t\t\t\t\t</td><td class='ReplySubjectField'><div id='";
  4744. e[a++]=n.id;
  4745. e[a++]="_subject'></div></td></tr></table></td></tr>--><tr><td class='ReplyField' colspan='3'><div id='";
  4746. e[a++]=n.id;
  4747. e[a++]="_field'></div></td></tr><tr class='ReplyRow'><td class='ReplyLength'><div id='";
  4748. e[a++]=n.id;
  4749. e[a++]="_length'></div></td><td width='100%'></td><td class='ReplyButtons'><table><tr><td class='ReplyEmoticon'><div id='";
  4750. e[a++]=n.id;
  4751. e[a++]="_emoticon' class='EmoticonReplyButton'></div></td><td><div id='";
  4752. e[a++]=n.id;
  4753. e[a++]="_send'></div></td></tr></table></td></tr></table>";
  4754. return o?e.length:e.join("")
  4755. }
  4756. ,{
  4757. id:"net_comcast_sms#Reply","class":"ZWidget"}
  4758. ,false);
  4759. AjxTemplate.register("net_comcast_sms#DeleteThread",function(t,s,n,e){
  4760. var o=Boolean(e);
  4761. n=(typeof n=="string"?{
  4762. id:n}
  4763. :n)||{};
  4764. e=e||[];
  4765. var a=e.length;
  4766. e[a++]="<table><tr><td><div id='";
  4767. e[a++]=n.id;
  4768. e[a++]="_messageCount'></div></td><td><div id='";
  4769. e[a++]=n.id;
  4770. e[a++]="_deleteButton'></div></td></tr></table>";
  4771. return o?e.length:e.join("")
  4772. }
  4773. ,{
  4774. id:"net_comcast_sms#DeleteThread","class":"ZWidget"}
  4775. ,false);
  4776. AjxTemplate.register("net_comcast_sms#Forward",function(t,s,n,e){
  4777. var o=Boolean(e);
  4778. n=(typeof n=="string"?{
  4779. id:n}
  4780. :n)||{};
  4781. e=e||[];
  4782. var a=e.length;
  4783. e[a++]="<table class='ForwardTable'><tr><td><div id='";
  4784. e[a++]=n.id;
  4785. e[a++]="_sms'></div></td><td><div id='";
  4786. e[a++]=n.id;
  4787. e[a++]="_email'></div></td></tr></table>";
  4788. return o?e.length:e.join("")
  4789. }
  4790. ,{
  4791. id:"net_comcast_sms#Forward","class":"ZWidget"}
  4792. ,false);
  4793. AjxTemplate.register("net_comcast_sms#Compose",function(t,s,n,e){
  4794. var o=Boolean(e);
  4795. n=(typeof n=="string"?{
  4796. id:n}
  4797. :n)||{};
  4798. e=e||[];
  4799. var a=e.length;
  4800. e[a++]="<table border='0' cellspacing='0' cellpadding='0' width='100%'><tr id='";
  4801. e[a++]=n.id;
  4802. e[a++]="_headerRow'><td class='ComposeViewHeader' colspan='2'><div id='";
  4803. e[a++]=n.id;
  4804. e[a++]="_header'></div></td></tr><tr id='";
  4805. e[a++]=n.id;
  4806. e[a++]="_toRow'><td class='ComposeTo' colspan='2'><table border='0' cellspacing='0' cellpadding='0' width='100%'><tr><td class='ComposeToLabel'>";
  4807. e[a++]=n.msg["composeToLabel"];
  4808. e[a++]="</td><td class='ComposeToField'><div id='";
  4809. e[a++]=n.id;
  4810. e[a++]="_to'></div></td></tr></table></td></tr><!--<tr id='";
  4811. e[a++]=n.id;
  4812. e[a++]="_subjectRow'><td class='ComposeSubject' colspan='2'><table border='0' cellspacing='0' cellpadding='0' width='100%'><tr><td class='ComposeSubjectLabel'>";
  4813. e[a++]=n.msg["composeSubjectLabel"];
  4814. e[a++]="</td><td class='ComposeSubjectField'><div id='";
  4815. e[a++]=n.id;
  4816. e[a++]="_subject'></div></td></tr></table></td></tr>--><tr id='";
  4817. e[a++]=n.id;
  4818. e[a++]="_textRow'><td class='ComposeField' colspan='2'><div id='";
  4819. e[a++]=n.id;
  4820. e[a++]="_field'></div></td></tr><tr id='";
  4821. e[a++]=n.id;
  4822. e[a++]="_footerRow'><td class='ComposeLength'><div id='";
  4823. e[a++]=n.id;
  4824. e[a++]="_length'></div></td><td class='ComposeButtons'><table><tr><td><div id='";
  4825. e[a++]=n.id;
  4826. e[a++]="_emoticon'></div></td><td><div id='";
  4827. e[a++]=n.id;
  4828. e[a++]="_send'></div></td></tr></table></td></tr></table>";
  4829. return o?e.length:e.join("")
  4830. }
  4831. ,{
  4832. id:"net_comcast_sms#Compose","class":"ZWidget"}
  4833. ,false);
  4834. AjxTemplate.register("net_comcast_sms#EmoticonChooser",function(t,r,s,e){
  4835. var n=Boolean(e);
  4836. s=(typeof s=="string"?{
  4837. id:s}
  4838. :s)||{};
  4839. e=e||[];
  4840. var o=e.length;
  4841. e[o++]="<table border='0' cellspacing='3' cellpadding='0' height='100%'><tr>";
  4842. for(var a=0;
  4843. a<s.count;
  4844. a++){
  4845. e[o++]='<td><div id="';
  4846. e[o++]=s.id;
  4847. e[o++]="_btn";
  4848. e[o++]=a;
  4849. e[o++]='" class="ZButton"';
  4850. if(AjxEnv.isIE){
  4851. e[o++]=' style="width:20px;height:20px;"'
  4852. }
  4853. e[o++]='><div class="ZButtonBorder"><div id="';
  4854. e[o++]=s.id;
  4855. e[o++]="_emo";
  4856. e[o++]=a;
  4857. e[o++]='"></div></div></div></td>'
  4858. }
  4859. e[o++]="</tr></table>";
  4860. return n?e.length:e.join("")
  4861. }
  4862. ,{
  4863. id:"net_comcast_sms#EmoticonChooser","class":"ZWidget"}
  4864. ,false);
  4865. AjxTemplate.register("net_comcast_sms#UnsentView",function(t,s,n,e){
  4866. var o=Boolean(e);
  4867. n=(typeof n=="string"?{
  4868. id:n}
  4869. :n)||{};
  4870. e=e||[];
  4871. var a=e.length;
  4872. e[a++]="<table border='0' cellspacing='0' cellpadding='0' width='100%'><tr><td><div id='";
  4873. e[a++]=n.id;
  4874. e[a++]="_label'></div></td><td><div id='";
  4875. e[a++]=n.id;
  4876. e[a++]="_count'></div></td></tr></table>";
  4877. return o?e.length:e.join("")
  4878. }
  4879. ,{
  4880. id:"net_comcast_sms#UnsentView","class":"ZWidget"}
  4881. ,false);
  4882. AjxTemplate.register("net_comcast_sms#Preferences",function(t,s,n,e){
  4883. var o=Boolean(e);
  4884. n=(typeof n=="string"?{
  4885. id:n}
  4886. :n)||{};
  4887. e=e||[];
  4888. var a=e.length;
  4889. e[a++]="<div align=right style='margin-right: 20px; margin-bottom: 10px;'><div id='";
  4890. e[a++]=n.id;
  4891. e[a++]="_REVERT_PAGE' tabindex='10' style='margin-right: 25px;'></div></div><table border='0' cellspacing='0' cellpadding='0' width='100%'><tr class='ZOptionsHeaderRow'><td class='ZOptionsHeaderL'><div class='ImgPrefsHeader_L'></div></td><td class='ZOptionsHeader ImgPrefsHeader'>";
  4892. e[a++]=n.msg["prefGeneralSectionTitle"];
  4893. e[a++]="</td><td class='ZOptionsHeaderR'><div class='ImgPrefsHeader_R'></div></td></tr></table><table class='ZOptionsSectionTable' border='0' cellspacing='0' cellpadding='0' width='100%'><tr><td class='ZOptionsSectionMain'><table width=100%><tr><td class='ZOptionsLabelTop'>";
  4894. e[a++]=n.msg["prefAutoForwardLabel"];
  4895. e[a++]="</td><td class='ZOptionsField'><div id='";
  4896. e[a++]=n.id;
  4897. e[a++]="_SMS_AUTO_FORWARD_EMAIL' tabindex='36'></div></td><td class='ZOptionsLabelTop'>";
  4898. e[a++]=n.msg["prefAutoForwardToLabel"];
  4899. e[a++]="</td><td class='ZOptionsField' style='vertical-align:top'><div id='";
  4900. e[a++]=n.id;
  4901. e[a++]="_SMS_AUTO_FORWARD_EMAIL_ADDR' tabindex='37'></div></td></tr><tr><td></td><td class='ZOptionsField'><div id='";
  4902. e[a++]=n.id;
  4903. e[a++]="_SMS_UNSUBSCRIBE' tabindex='39'></div></td></tr></table></td></tr></table>";
  4904. return o?e.length:e.join("")
  4905. }
  4906. ,{
  4907. id:"net_comcast_sms#Preferences"}
  4908. ,false);
  4909. AjxTemplate.register("net_comcast_sms#Provisioning",function(t,s,n,e){
  4910. var o=Boolean(e);
  4911. n=(typeof n=="string"?{
  4912. id:n}
  4913. :n)||{};
  4914. e=e||[];
  4915. var a=e.length;
  4916. e[a++]="<table border='0' cellspacing='0' cellpadding='0' width='100%' height='100%'><tr><td class='ProvisioningHeader' colspan='2'><div id='";
  4917. e[a++]=n.id;
  4918. e[a++]="_header'></div></td></tr><tr><td><table border='0' cellspacing='0' cellpadding='0' width='100%' height='100%' class='ProvisioningBody'><tr><td height='100%' class='Content'><div id=\"";
  4919. e[a++]=n.id;
  4920. e[a++]='_notEntitled"></div><div id="';
  4921. e[a++]=n.id;
  4922. e[a++]='_marketing"></div><div id="';
  4923. e[a++]=n.id;
  4924. e[a++]='_accountChooser"></div><div id="';
  4925. e[a++]=n.id;
  4926. e[a++]='_terms"></div><div id="';
  4927. e[a++]=n.id;
  4928. e[a++]='_costs"></div><div id="';
  4929. e[a++]=n.id;
  4930. e[a++]="_congratulations\"></div></td></tr><tr><td align='center' class='Buttons'><table border='0' cellspacing='0' cellpadding='0'><tr><td><div id=\"";
  4931. e[a++]=n.id;
  4932. e[a++]='_backButton"></div></td><td><div id="';
  4933. e[a++]=n.id;
  4934. e[a++]='_declineButton"></div></td><td><div id="';
  4935. e[a++]=n.id;
  4936. e[a++]='_acceptButton"></div></td><td><div id="';
  4937. e[a++]=n.id;
  4938. e[a++]='_okButton"></div></td><td><div id="';
  4939. e[a++]=n.id;
  4940. e[a++]='_nextButton"></div></td><td><div id="';
  4941. e[a++]=n.id;
  4942. e[a++]='_signupButton"></div></td></tr></table></td></tr></table></td></tr></table>';
  4943. return o?e.length:e.join("")
  4944. }
  4945. ,{
  4946. id:"net_comcast_sms#Provisioning"}
  4947. ,false);
  4948. AjxTemplate.register("net_comcast_sms#Provisioning.AccountChooser",function(t,s,n,e){
  4949. var o=Boolean(e);
  4950. n=(typeof n=="string"?{
  4951. id:n}
  4952. :n)||{};
  4953. e=e||[];
  4954. var a=e.length;
  4955. e[a++]="<table border='0' cellspacing='0' cellpadding='0' width='100%' height='200' class='AccountChooser'><tr height='33%'><td><div id=\"";
  4956. e[a++]=n.id;
  4957. e[a++]="_text1\"></div></td></tr><tr height='34%'><td><div id=\"";
  4958. e[a++]=n.id;
  4959. e[a++]='_list" class="AccountChooserList"></div></td></tr><tr height=\'33%\'><td><div id="';
  4960. e[a++]=n.id;
  4961. e[a++]='_text2"></div></td></tr></table>';
  4962. return o?e.length:e.join("")
  4963. }
  4964. ,{
  4965. id:"net_comcast_sms#Provisioning.AccountChooser"}
  4966. ,false);
  4967. AjxTemplate.register("net_comcast_sms#Provisioning.AccountChooser.RadioButton",function(t,s,n,e){
  4968. var o=Boolean(e);
  4969. n=(typeof n=="string"?{
  4970. id:n}
  4971. :n)||{};
  4972. e=e||[];
  4973. var a=e.length;
  4974. e[a++]="<table cellpadding='2' cellspacing='0' border='0' width='100%'><tr><td><label id='";
  4975. e[a++]=n.id;
  4976. e[a++]="_text_left' for='";
  4977. e[a++]=n.id;
  4978. e[a++]="_input' class='Text' style='text-align:right'></label></td><td><input id='";
  4979. e[a++]=n.id;
  4980. e[a++]="_input' name='";
  4981. e[a++]=n.name;
  4982. e[a++]="' value='";
  4983. e[a++]=n.value;
  4984. e[a++]="' type='radio' ";
  4985. e[a++]=n.checked;
  4986. e[a++]="></td><td width='100%'><label id='";
  4987. e[a++]=n.id;
  4988. e[a++]="_text_right' for='";
  4989. e[a++]=n.id;
  4990. e[a++]="_input' class='Text' style='text-align:left'></label></td><td><div id='";
  4991. e[a++]=n.id;
  4992. e[a++]="_image_right' class='RadioButtonImage ImgCheck'></div></td></tr></table>";
  4993. return o?e.length:e.join("")
  4994. }
  4995. ,{
  4996. id:"net_comcast_sms#Provisioning.AccountChooser.RadioButton"}
  4997. ,false);
  4998. AjxTemplate.register("net_comcast_sms#ErrorView",function(t,s,n,e){
  4999. var o=Boolean(e);
  5000. n=(typeof n=="string"?{
  5001. id:n}
  5002. :n)||{};
  5003. e=e||[];
  5004. var a=e.length;
  5005. e[a++]="<table cellpadding='2' cellspacing='0' border='0'><tr><td><img src=\"";
  5006. e[a++]=n.img;
  5007. e[a++]='"/></td><td><h1 id="';
  5008. e[a++]=n.id;
  5009. e[a++]='_title">';
  5010. e[a++]=n.msg["loadFailedHead"];
  5011. e[a++]='</h1><p id="';
  5012. e[a++]=n.id;
  5013. e[a++]='_msg">';
  5014. e[a++]=n.msg["loadFailedBody"];
  5015. e[a++]="</p></td></tr></table>";
  5016. return o?e.length:e.join("")
  5017. }
  5018. ,{
  5019. id:"net_comcast_sms#ErrorView"}
  5020. ,false);
  5021. JSON=function(){};
  5022. (function(){
  5023. function e(t){
  5024. return t<10?"0"+t:t
  5025. }
  5026. if(typeof Date.prototype.toJSON!=="function"){
  5027. Date.prototype.toJSON=function(t){
  5028. return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+e(this.getUTCMonth()+1)+"-"+e(this.getUTCDate())+"T"+e(this.getUTCHours())+":"+e(this.getUTCMinutes())+":"+e(this.getUTCSeconds())+"Z":null
  5029. }
  5030. }
  5031. String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(t){
  5032. return this.valueOf()
  5033. }
  5034. }
  5035. )();
  5036. JSON.cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
  5037. JSON.escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
  5038. JSON.meta={
  5039. "\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};
  5040. JSON.rep;
  5041. JSON.quote=function(e){
  5042. JSON.escapable.lastIndex=0;
  5043. return JSON.escapable.test(e)?'"'+e.replace(JSON.escapable,function(t){
  5044. var o=JSON.meta[t];
  5045. return typeof o==="string"?o:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)
  5046. }
  5047. )+'"':'"'+e+'"'
  5048. };
  5049. JSON.str=function(h,n){
  5050. var a,t,l,e,s=JSON.gap,o,r=n[h];
  5051. if(r&&typeof r==="object"&&typeof r.toJSON==="function"){
  5052. r=r.toJSON(h)
  5053. }
  5054. if(typeof JSON.rep==="function"){
  5055. r=JSON.rep.call(n,h,r)
  5056. }
  5057. switch(typeof r){
  5058. case"string":return JSON.quote(r);
  5059. case"number":return isFinite(r)?String(r):"null";
  5060. case"boolean":case"null":return String(r);
  5061. case"object":if(!r){
  5062. return"null"
  5063. }
  5064. JSON.gap+=JSON.indent;
  5065. o=[];
  5066. if(Object.prototype.toString.apply(r)==="[object Array]"){
  5067. e=r.length;
  5068. for(a=0;
  5069. a<e;
  5070. a+=1){
  5071. o[a]=JSON.str(a,r)||"null"
  5072. }
  5073. l=o.length===0?"[]":JSON.gap?"[\n"+JSON.gap+o.join(",\n"+JSON.gap)+"\n"+s+"]":"["+o.join(",")+"]";
  5074. JSON.gap=s;
  5075. return l
  5076. }
  5077. if(JSON.rep&&typeof JSON.rep==="object"){
  5078. e=JSON.rep.length;
  5079. for(a=0;
  5080. a<e;
  5081. a+=1){
  5082. t=JSON.rep[a];
  5083. if(typeof t==="string"){
  5084. l=JSON.str(t,r);
  5085. if(l){
  5086. o.push(JSON.quote(t)+(JSON.gap?": ":":")+l)
  5087. }}}}else{
  5088. for(t in r){
  5089. if(Object.hasOwnProperty.call(r,t)){
  5090. l=JSON.str(t,r);
  5091. if(l){
  5092. o.push(JSON.quote(t)+(JSON.gap?": ":":")+l)
  5093. }}}}
  5094. l=o.length===0?"{}":JSON.gap?"{\n"+JSON.gap+o.join(",\n"+JSON.gap)+"\n"+s+"}":"{"+o.join(",")+"}";
  5095. JSON.gap=s;
  5096. return l
  5097. }};
  5098. JSON.stringify=function(o,t,a){
  5099. var e;
  5100. JSON.gap="";
  5101. JSON.indent="";
  5102. if(typeof a==="number"){
  5103. for(e=0;
  5104. e<a;
  5105. e+=1){
  5106. JSON.indent+=" "
  5107. }}else{
  5108. if(typeof a==="string"){
  5109. JSON.indent=a
  5110. }}
  5111. JSON.rep=t;
  5112. if(t&&typeof t!=="function"&&(typeof t!=="object"||typeof t.length!=="number")){
  5113. throw new Error("JSON.stringify")
  5114. }
  5115. return JSON.str("",{
  5116. "":o}
  5117. )
  5118. };
  5119. JSON.parse=function(text,reviver){
  5120. var j;
  5121. var walk=function walk(holder,key){
  5122. var k,v,value=holder[key];
  5123. if(value&&typeof value==="object"){
  5124. for(k in value){
  5125. if(Object.hasOwnProperty.call(value,k)){
  5126. v=walk(value,k);
  5127. if(v!==undefined){
  5128. value[k]=v
  5129. }else{
  5130. delete value[k]
  5131. }}}}
  5132. return reviver.call(holder,key,value)
  5133. };
  5134. text=String(text);
  5135. JSON.lastIndex=0;
  5136. if(JSON.cx.test(text)){
  5137. text=text.replace(JSON.cx,function(a){
  5138. return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)
  5139. }
  5140. )
  5141. }
  5142. if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){
  5143. j=eval("("+text+")");
  5144. return typeof reviver==="function"?walk({
  5145. "":j}
  5146. ,""):j
  5147. }
  5148. throw new SyntaxError("JSON.parse")
  5149. };
  5150. JSON.gparse=function(o,t){
  5151. try{
  5152. return JSON.parse(o,t)
  5153. }
  5154. catch(a){
  5155. return null
  5156. }};
  5157. if(!window.caboUtil){
  5158. window.caboUtil={
  5159. onload_listeners:{}
  5160. ,has_loaded:{}
  5161. ,namespace:function(e){
  5162. if(!this[e]){
  5163. this[e]={};
  5164. return true
  5165. }
  5166. return false
  5167. }
  5168. ,onload:function(e,t){
  5169. if(this.has_loaded[e]){
  5170. caboUtil.run(t)
  5171. }else{
  5172. if(!this.onload_listeners[e]){
  5173. this.onload_listeners[e]=[]
  5174. }
  5175. this.onload_listeners[e].push(t)
  5176. }}
  5177. ,fill:function(e,a){
  5178. var t=(AjxUtil.isObject(e)&&e)||(AjxUtil.isString(e)&&this[e])||null;
  5179. if(t){
  5180. AjxUtil.hashUpdate(t,a,true)
  5181. }}
  5182. ,fillProto:function(e,t){
  5183. if(this[e]&&this[e].prototype){
  5184. AjxUtil.hashUpdate(this[e].prototype,t,true)
  5185. }}
  5186. ,run:function(o){
  5187. if(o){
  5188. var e=Array.prototype.slice.call(arguments,1);
  5189. if(o instanceof AjxCallback){
  5190. return o.run.apply(o,e)
  5191. }else{
  5192. if(AjxUtil.isFunction(o)){
  5193. return o.apply(o,e)
  5194. }else{
  5195. if(AjxUtil.isArray(o)){
  5196. var n=[];
  5197. var s=[].concat(o);
  5198. for(var a=0,t=s.length;
  5199. a<t;
  5200. a++){
  5201. n[a]=this.run.apply(this,[s[a]].concat(e))
  5202. }
  5203. return n
  5204. }}}}}
  5205. ,apply:function(o,t){
  5206. var e=[o];
  5207. for(var a=0;
  5208. a<t.length;
  5209. a++){
  5210. e.push(t[a])
  5211. }
  5212. this.run.apply(this,e)
  5213. }
  5214. ,augment:function(n,o,e,t){
  5215. if(!n){
  5216. n=window
  5217. }
  5218. var a=n[o];
  5219. if(a){
  5220. n[o]=function(){
  5221. if(t){
  5222. var s=e.apply(this,arguments);
  5223. return a.apply(this,s)
  5224. }else{
  5225. var s=[a.apply(this,arguments)].concat(Array.prototype.slice.call(arguments,0));
  5226. return e.apply(this,s)
  5227. }}
  5228. }}
  5229. ,urlParam:function(e){
  5230. e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");
  5231. var a=new RegExp("[\\?&]"+e+"=([^&#]*)");
  5232. var t=a.exec(window.location.href);
  5233. return(t==null)?"":t[1]
  5234. }
  5235. ,log:function(){
  5236. if(window.console&&window.console.log){
  5237. if(AjxEnv.isIE){
  5238. console.log(Array.prototype.join.call(arguments,", "))
  5239. }else{
  5240. console.log.apply(console,arguments)
  5241. }}}
  5242. ,__load:function(t){
  5243. var e=this.onload_listeners[t];
  5244. this.run(e);
  5245. this.has_loaded[t]=true
  5246. }}
  5247. }
  5248. if(caboUtil.namespace("Coll")){
  5249. caboUtil.fill("Coll",{
  5250. collapseHashArray:function(t,a,n){
  5251. var e={};
  5252. for(var o=0;
  5253. o<t.length;
  5254. o++){
  5255. AjxUtil.hashUpdate(e,t[o],a,n)
  5256. }
  5257. return e
  5258. }
  5259. ,asHash:function(t,e){
  5260. if(AjxUtil.isObject(t)){
  5261. if(AjxUtil.isArray(t)){
  5262. return AjxUtil.arrayAsHash(t,e)
  5263. }else{
  5264. return t
  5265. }}else{
  5266. return AjxUtil.arrayAsHash([t],e)
  5267. }}
  5268. ,isEmpty:function(e){
  5269. if(AjxUtil.isObject(e)&&!AjxUtil.isArray(e)){
  5270. for(var t in e){
  5271. return false
  5272. }
  5273. return true
  5274. }else{
  5275. return AjxUtil.isEmpty(e)
  5276. }}
  5277. ,uniq:function(o){
  5278. var t=[];
  5279. for(var s=0,n=o.length;
  5280. s<n;
  5281. s++){
  5282. var e=o[s];
  5283. if(!e.___uniq_flag){
  5284. e.___uniq_flag=true;
  5285. t.push(e)
  5286. }}
  5287. for(var s=0,n=o.length;
  5288. s<n;
  5289. s++){
  5290. delete o[s].___uniq_flag
  5291. }
  5292. return t
  5293. }
  5294. ,range:function(n,o,t){
  5295. var e=[];
  5296. for(var a=n;
  5297. a<=o;
  5298. a++){
  5299. e.push(t?t(a):a)
  5300. }
  5301. return e
  5302. }
  5303. ,deref:function(a,l,r){
  5304. var s=(arguments.length>=3);
  5305. var n=l.split(".");
  5306. for(var o=0,e=n.length;
  5307. o<e;
  5308. o++){
  5309. var h=n[o];
  5310. var t=s&&(o+1==e);
  5311. if(s){
  5312. if(t){
  5313. a[h]=r;
  5314. return
  5315. }else{
  5316. if(!AjxUtil.isObject(a[h])){
  5317. a[h]={}
  5318. }}}else{
  5319. if(!AjxUtil.isObject(a)){
  5320. return undefined
  5321. }}
  5322. a=a[h]
  5323. }
  5324. return a
  5325. }
  5326. ,deepcopy:function(n){
  5327. if(AjxUtil.isObject(n)){
  5328. var e=AjxUtil.isArray(n)?[]:{};
  5329. for(var a in n){
  5330. var o=n[a];
  5331. if(AjxUtil.isArray(o)){
  5332. var s=e[a]=[];
  5333. for(var t=0;
  5334. t<o.length;
  5335. t++){
  5336. s[t]=this.deepcopy(o[t])
  5337. }}else{
  5338. if(AjxUtil.isObject(o)){
  5339. e[a]=this.deepcopy(o)
  5340. }else{
  5341. e[a]=o
  5342. }}}
  5343. return e
  5344. }else{
  5345. return n
  5346. }}
  5347. ,isHash:function(e){
  5348. return AjxUtil.isObject(e)&&!AjxUtil.isArray(e)
  5349. }
  5350. ,map:function(o,a){
  5351. if(AjxUtil.isFunction(a)){
  5352. return AjxUtil.map(o,a)
  5353. }else{
  5354. if(AjxUtil.isObject(a)){
  5355. var e=new Array(o.length);
  5356. for(var t=0;
  5357. t<o.length;
  5358. t++){
  5359. e[t]=a[o[t]]
  5360. }
  5361. return e
  5362. }}}
  5363. ,mapToHash:function(o,a){
  5364. var e={};
  5365. for(var t=0;
  5366. t<o.length;
  5367. t++){
  5368. e[a(o[t])]=o[t]
  5369. }
  5370. return e
  5371. }
  5372. ,flatten:function(o,a){
  5373. if(!AjxUtil.isObject(o)){
  5374. return[o]
  5375. }else{
  5376. if(AjxUtil.isObject(o)&&!AjxUtil.isArray(o)){
  5377. if(a&&o.constructor!==Object){
  5378. return[o]
  5379. }else{
  5380. o=AjxUtil.values(o)
  5381. }}}
  5382. var e=[];
  5383. for(var t=0;
  5384. t<o.length;
  5385. t++){
  5386. e=e.concat(this.flatten(o[t],a))
  5387. }
  5388. return e
  5389. }
  5390. ,getValues:function(o,a){
  5391. var e=[];
  5392. for(var t=0;
  5393. t<a.length;
  5394. t++){
  5395. e[t]=o[a[t]]
  5396. }
  5397. return e
  5398. }}
  5399. );
  5400. caboUtil.__load("caboUtil.Coll")
  5401. }
  5402. if(caboUtil.namespace("Preferences")){
  5403. AjxDispatcher.addPackageLoadFunction("Preferences",new AjxCallback(this,function(){
  5404. caboUtil.Preferences.View=function(t,a,e){
  5405. if(!arguments.length){
  5406. return
  5407. }
  5408. ZmPreferencesPage.call(this,t,a,e)
  5409. };
  5410. caboUtil.Preferences.View.prototype=new ZmPreferencesPage;
  5411. caboUtil.Preferences.View.prototype.constructor=caboUtil.Preferences.View;
  5412. caboUtil.Preferences.View.prototype.toString=function(){
  5413. return"caboUtil.Preferences.View"
  5414. };
  5415. caboUtil.Preferences.View.prototype.getMessage=function(e){
  5416. return this._handler.getMessage(e)
  5417. };
  5418. caboUtil.Preferences.View.prototype.addCommand=function(e){
  5419. e.add(new AjxCallback(this,this._save,[null]));
  5420. e.size=function(){
  5421. return this.curId||this._cmds.length
  5422. }
  5423. };
  5424. caboUtil.Preferences.View.prototype._save=function(t,e){
  5425. this._controller.savePref(t,e)
  5426. };
  5427. caboUtil.Preferences.Controller=function(o,t,a,n,s,e){
  5428. if(!arguments.length){
  5429. return
  5430. }
  5431. ZmPrefController.call(this,t,a);
  5432. this._parentController=e;
  5433. this._handler=o;
  5434. this._basePrefsView=n;
  5435. this._section=s
  5436. };
  5437. caboUtil.Preferences.Controller.prototype=new ZmPrefController;
  5438. caboUtil.Preferences.Controller.prototype.constructor=caboUtil.Preferences.Controller;
  5439. caboUtil.Preferences.Controller.prototype.toString=function(){
  5440. return"caboUtil.Preferences.Controller"
  5441. };
  5442. caboUtil.Preferences.Controller.prototype.getMessage=function(e){
  5443. return this._handler.getMessage(e)
  5444. };
  5445. caboUtil.Preferences.Controller.prototype.getHandler=function(){
  5446. return this._handler
  5447. };
  5448. caboUtil.Preferences.Controller.prototype._resetOperations=function(t,e){
  5449. t=t||this._parentController._toolbar;
  5450. ZmPrefController.prototype._resetOperations.call(this,t,e)
  5451. };
  5452. caboUtil.Preferences.Controller.prototype.getToolbar=function(){
  5453. return this._parentController._toolbar
  5454. };
  5455. caboUtil.Preferences.Controller.prototype.isDirty=function(e){
  5456. console.log("isDirty",e);
  5457. return ZmPrefController.prototype.isDirty.call(this,e)
  5458. };
  5459. caboUtil.Preferences.Controller.prototype.savePref=function(a,t){
  5460. if(t){
  5461. var e=AjxSoapDoc.create("NoOpRequest","urn:zimbraMail");
  5462. t.addRequestParams(e);
  5463. caboUtil.run(a)
  5464. }};
  5465. caboUtil.Preferences.Controller.prototype.getView=function(e){
  5466. if(!this._view){
  5467. this._view=this.__getPrefsView()
  5468. }
  5469. return this._view
  5470. };
  5471. caboUtil.__load("caboUtil.Preferences")
  5472. }
  5473. ))
  5474. }
  5475. if(caboUtil.namespace("MultiCallback")){
  5476. caboUtil.MultiCallback=function(t,e,o,a){
  5477. this.i=caboUtil.Coll.asHash(t);
  5478. this.e=e;
  5479. this.a=o;
  5480. this.r=AjxUtil.hashCopy(this.i);
  5481. this.v={};
  5482. this.o=a
  5483. };
  5484. caboUtil.MultiCallback.prototype._run=function(t){
  5485. if(this.i[t]){
  5486. if(this.r[t]){
  5487. delete this.r[t]
  5488. }else{
  5489. if(this.o){
  5490. return
  5491. }}
  5492. var e=this.v[t]=Array.prototype.slice.call(arguments,1);
  5493. caboUtil.run.apply(null,[this.e,t].concat(e));
  5494. if(caboUtil.Coll.isEmpty(this.r)){
  5495. caboUtil.run.apply(null,[this.a,this.v])
  5496. }}};
  5497. caboUtil.MultiCallback.prototype.getCallback=function(e){
  5498. return this.i[e]&&new AjxCallback(this,this._run,[e])||null
  5499. };
  5500. caboUtil.MultiCallback.simple=function(t,e,o,a){
  5501. return new caboUtil.MultiCallback(caboUtil.Coll.range(0,t-1),e,o,a)
  5502. };
  5503. caboUtil.__load("caboUtil.MultiCallback")
  5504. }
  5505. if(caboUtil.namespace("Dom")){
  5506. caboUtil.fill("Dom",{
  5507. getElementCssProperty:function(t,h){
  5508. var c,o=!AjxUtil.isArray(h);
  5509. if(o){
  5510. h=[h]
  5511. }
  5512. if(t.ownerDocument==null){
  5513. for(var r=t.parentNode;
  5514. r.parentNode!=null;
  5515. r=r.parentNode){}
  5516. var s=r
  5517. }else{
  5518. var s=t.ownerDocument
  5519. }
  5520. if(s.defaultView&&s.defaultView.getComputedStyle){
  5521. var e=s.defaultView.getComputedStyle(t,"");
  5522. if(e&&e.length>0){
  5523. c=caboUtil.Coll.map(h,AjxCallback.simpleClosure(e.getPropertyValue,e))
  5524. }}
  5525. if(!c){
  5526. var l=[];
  5527. for(var a=0;
  5528. a<h.length;
  5529. a++){
  5530. if(h[a]){
  5531. var n=h[a].split("-");
  5532. l.push(n.shift()+AjxUtil.map(n,AjxStringUtil.capitalize).join(""))
  5533. }}
  5534. if(t.currentStyle){
  5535. c=caboUtil.Coll.map(l,t.currentStyle)
  5536. }else{
  5537. if(t.style){
  5538. c=caboUtil.Coll.map(l,t.style)
  5539. }}}
  5540. return(o)?c[0]:c
  5541. }
  5542. ,getScrollBarWidth:function(){
  5543. if(!this.__scrollbarSize){
  5544. var a=document.createElement("p");
  5545. AjxUtil.hashUpdate(a.style,{
  5546. width:"100%",height:"200px"}
  5547. ,true);
  5548. var o=document.createElement("div");
  5549. AjxUtil.hashUpdate(o.style,{
  5550. position:"absolute",top:"0px",left:"0px",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}
  5551. ,true);
  5552. o.appendChild(a);
  5553. document.body.appendChild(o);
  5554. var t=a.offsetWidth;
  5555. o.style.overflow="scroll";
  5556. var e=a.offsetWidth;
  5557. if(t==e){
  5558. e=o.clientWidth
  5559. }
  5560. document.body.removeChild(o);
  5561. this.__scrollbarSize=(t-e)
  5562. }
  5563. return this.__scrollbarSize
  5564. }
  5565. ,isAncestor:Dwt.isAncestor||function(e,t){
  5566. if(e instanceof DwtControl){
  5567. e=e.getHtmlElement()
  5568. }
  5569. if(t instanceof DwtControl){
  5570. t=t.getHtmlElement()
  5571. }
  5572. if(e==t){
  5573. return true
  5574. }
  5575. while(t){
  5576. t=t.parentNode;
  5577. if(t==e){
  5578. return true
  5579. }}
  5580. return false
  5581. }
  5582. ,htmlToElement:function(t,e){
  5583. var a=document.createElement(e||"div");
  5584. a.innerHTML=t;
  5585. return a.childNodes
  5586. }
  5587. ,remove:function(t){
  5588. t=AjxUtil.toArray(t);
  5589. for(var e=0;
  5590. e<t.length;
  5591. e++){
  5592. var a=t[e];
  5593. if(a.parentNode){
  5594. a.parentNode.removeChild(a)
  5595. }}}
  5596. ,hasClass:function(t,e){
  5597. if(!t||!e||!t.className){
  5598. return false
  5599. }
  5600. return t.className.match(new RegExp("\\b"+e+"\\b"))
  5601. }
  5602. ,byClass:function(o,a){
  5603. a=a||document;
  5604. var n=[];
  5605. if(this.hasClass(a,o)){
  5606. n.push(a)
  5607. }
  5608. for(var t=0;
  5609. t<a.childNodes.length;
  5610. t++){
  5611. if(a.childNodes[t].nodeType==1){
  5612. var e=this.byClass(o,a.childNodes[t]);
  5613. if(e){
  5614. n=n.concat(e)
  5615. }}}
  5616. return n
  5617. }}
  5618. );
  5619. caboUtil.__load("caboUtil.Dom")
  5620. }
  5621. net_comcast_sms.Util={};
  5622. net_comcast_sms.Util.UI={};
  5623. net_comcast_sms.Util.UI.dialog=function(a,t){
  5624. var e=appCtxt.getMsgDialog();
  5625. e.reset();
  5626. e.setMessage(a,DwtMessageDialog.INFO_STYLE,t||"Informational");
  5627. e.popup(null,true)
  5628. };
  5629. net_comcast_sms.Util.showLoading=function(t,h,e,n){
  5630. var a=appCtxt.getAppViewMgr();
  5631. if(!net_comcast_sms.Util.__loading_ids){
  5632. net_comcast_sms.Util.__loading_ids={}
  5633. }
  5634. var o=net_comcast_sms.Util.__loading_ids;
  5635. var r=caboUtil.Coll.isEmpty(o);
  5636. if(t){
  5637. o[h]=true
  5638. }else{
  5639. if(o[h]){
  5640. delete o[h]
  5641. }}
  5642. var s=caboUtil.Coll.isEmpty(o);
  5643. if(s!=r){
  5644. if(!s){
  5645. a.pushView(ZmId.VIEW_LOADING,n)
  5646. }else{
  5647. a.popView(n,ZmId.VIEW_LOADING,true);
  5648. if(e){
  5649. a.pushView(e)
  5650. }}}};
  5651. net_comcast_sms.Util.UI.loadingIsShown=function(){
  5652. return appCtxt.getAppViewMgr().getCurrentViewId()==ZmId.VIEW_LOADING
  5653. };
  5654. net_comcast_sms.Util.DOM={};
  5655. net_comcast_sms.Util.DOM.isAncestor=Dwt.isAncestor||function(t,e){
  5656. if(t==e){
  5657. return true
  5658. }
  5659. var a=e;
  5660. while(a){
  5661. a=a.parentNode;
  5662. if(a==t){
  5663. return true
  5664. }}
  5665. return false
  5666. };
  5667. net_comcast_sms.Util.DOM.resetSize=function(t){
  5668. var e=t.getSize();
  5669. if(e.x&&e.y){
  5670. t.setSize(e.x,e.y)
  5671. }};
  5672. net_comcast_sms.Util.DOM.getElements=function(e,o,l,d){
  5673. var t=AjxUtil.isString(o)&&o||"*";
  5674. var n=(o instanceof RegExp)&&o||null;
  5675. d=d||document;
  5676. var c=(l instanceof RegExp)?l:new RegExp("\\b"+l+"\\b");
  5677. var s=[];
  5678. var h=d.getElementsByTagName(t);
  5679. for(var r=0,a=h.length;
  5680. r<a;
  5681. r++){
  5682. var u=h[r];
  5683. if(!e||u.id==e){
  5684. if(!n||u.tagName.match(n)){
  5685. if(!l||u.className.match(c)){
  5686. s.push(u)
  5687. }}}}
  5688. return s
  5689. };
  5690. net_comcast_sms.Util.DOM.convertHtml2Text=function(a,n,o){
  5691. var t=true;
  5692. if(t){
  5693. if(!a){
  5694. return null
  5695. }
  5696. if(n&&AjxUtil.isFunction(n._before)){
  5697. a=n._before(a)
  5698. }
  5699. this._convert={
  5700. convertor:n,onlyOneNewLinePerP:o}
  5701. }
  5702. var e=AjxStringUtil.convertHtml2Text.call(this,a,n,o);
  5703. if(t){
  5704. this._convert=null;
  5705. if(n&&AjxUtil.isFunction(n._after)){
  5706. e=n._after(e)
  5707. }}
  5708. return e
  5709. };
  5710. net_comcast_sms.Util.DOM._traverse=function(e,p,u,c,h,n,s,d,m){
  5711. var r=(AjxStringUtil._traverse.length<9);
  5712. if(r){
  5713. d=d||(this._convert&&this._convert.convertor);
  5714. m=m||(this._convert&&this._convert.onlyOneNewLinePerP);
  5715. var l=e.nodeName.toLowerCase();
  5716. var g=null;
  5717. if(d&&d[l]){
  5718. g=d[l](e,s)
  5719. }
  5720. if(g===null&&l=="p"){
  5721. g=m?"\n":"\n\n"
  5722. }
  5723. if(g!==null){
  5724. p[u++]=g;
  5725. var f=e.childNodes;
  5726. var o=f.length;
  5727. for(var a=0;
  5728. a<o;
  5729. a++){
  5730. var t=f[a];
  5731. if(t.nodeType==1&&t.tagName.toLowerCase()=="li"){
  5732. n++
  5733. }
  5734. u=this._traverse(t,p,u,c,h,n,s,d,m)
  5735. }
  5736. if(d&&d["/"+l]){
  5737. p[u++]=d["/"+l](e)
  5738. }
  5739. s.lastNode=l;
  5740. return u
  5741. }}
  5742. return AjxStringUtil._traverse.call(this,e,p,u,c,h,n,s,d,m)
  5743. };
  5744. net_comcast_sms.Util.DOM.scrollIntoView=Dwt.scrollIntoView||function(a,t){
  5745. if(!a||!t){
  5746. return
  5747. }
  5748. var e=Dwt.toWindow(a,0,0,null,null,DwtPoint.tmp).y;
  5749. var r=Dwt.toWindow(t,0,0,null,null,DwtPoint.tmp).y+t.scrollTop;
  5750. var s=e-r;
  5751. if(s<0){
  5752. t.scrollTop+=s
  5753. }else{
  5754. var n=Dwt.getSize(t,DwtPoint.tmp).y;
  5755. var o=Dwt.getSize(a,DwtPoint.tmp).y;
  5756. s=(e+o)-(r+n);
  5757. if(s>0){
  5758. t.scrollTop+=s
  5759. }}};
  5760. net_comcast_sms.Util.Date={};
  5761. net_comcast_sms.Util.Date.WEEKDAY_NAMES=[I18nMsg.weekdaySunLong,I18nMsg.weekdayMonLong,I18nMsg.weekdayTueLong,I18nMsg.weekdayWedLong,I18nMsg.weekdayThuLong,I18nMsg.weekdayFriLong,I18nMsg.weekdaySatLong];
  5762. net_comcast_sms.Util.Date.computeDateStr=function(a){
  5763. var s=function(h){
  5764. h.setHours(0);
  5765. h.setMinutes(0);
  5766. h.setSeconds(0);
  5767. h.setMilliseconds(0);
  5768. return h
  5769. };
  5770. var t=s(new Date());
  5771. var o=s(new Date(a));
  5772. var r=AjxDateUtil.computeTimeString(a).toLowerCase();
  5773. var e;
  5774. var n=Math.floor(t.getTime()/AjxDateUtil.MSEC_PER_DAY)-Math.floor(o.getTime()/AjxDateUtil.MSEC_PER_DAY);
  5775. if(n==0){}else{
  5776. if(n==1){
  5777. e=ZmMsg.yesterday||"Yesterday"
  5778. }else{
  5779. if(n<7){
  5780. e=this.WEEKDAY_NAMES[a.getDay()]
  5781. }else{
  5782. if(a.getYear()==t.getYear()){
  5783. e=AjxDateUtil._dateFormatNoYear.format(a)
  5784. }else{
  5785. AjxDateFormat.format(AjxDateFormat.SHORT,a)
  5786. }}}}
  5787. return e?(r+"\n"+e):r
  5788. };
  5789. net_comcast_sms.Util.TN={};
  5790. net_comcast_sms.Util.TN.INTL_PREFIX="011";
  5791. net_comcast_sms.Util.TN.format=function(e){
  5792. if(e.length==13){
  5793. var t=e.substring(0,3);
  5794. if(t=="001"||t=="011"){
  5795. e=e.substring(3)
  5796. }}
  5797. if(e.length==11&&e.charAt(0)=="1"){
  5798. e=e.substring(1)
  5799. }
  5800. return e
  5801. };
  5802. net_comcast_sms.Util.TN.strip=function(e){
  5803. return e.replace(/\D/g,"")
  5804. };
  5805. net_comcast_sms.Util.TN.normalize=function(e,a){
  5806. if(!AjxUtil.isString(e)){
  5807. return e
  5808. }
  5809. var t=this.format(this.strip(e));
  5810. if(t!=""){
  5811. if(t.length<5||t.length>14){
  5812. return a?null:e
  5813. }else{
  5814. return t
  5815. }}else{
  5816. return a?null:e
  5817. }};
  5818. net_comcast_sms.Util.TN.pretty=function(e){
  5819. var t=e&&this.normalize(e);
  5820. if(t&&t.length==10){
  5821. return["(",t.substring(0,3),") ",t.substring(3,6),"-",t.substring(6,10)].join("")
  5822. }
  5823. return e
  5824. };
  5825. net_comcast_sms.Util.Contact={
  5826. __loadListeners:[]};
  5827. net_comcast_sms.Util.Contact.getByTN=function(e,o){
  5828. var a=appCtxt.getApp(ZmApp.CONTACTS);
  5829. this.__loadListeners.push(new AjxCallback(this,function(){
  5830. var n=appCtxt.getActiveAccount().id;
  5831. if(a.contactsLoaded[n]&&a._contactList[n]){
  5832. return this._handleGetContactList(e,o,a.getContactList())
  5833. }else{
  5834. a.getContactList(new AjxCallback(this,this._handleGetContactList,[e,o]),new AjxCallback(this,this._handleGetContactListFail,[e,o]))
  5835. }}
  5836. ));
  5837. if(!this._loading){
  5838. this._loading=true;
  5839. AjxDispatcher.require(["ContactsCore","Contacts"],true,new AjxCallback(this,function(){
  5840. var n=[].concat(this.__loadListeners);
  5841. this.__loadListeners.length=0;
  5842. caboUtil.run(n);
  5843. this._loaded=true
  5844. }
  5845. ))
  5846. }else{
  5847. if(this._loaded){
  5848. var t=[].concat(this.__loadListeners);
  5849. this.__loadListeners.length=0;
  5850. return caboUtil.run(t)[0]
  5851. }}};
  5852. net_comcast_sms.Util.Contact._handleGetContactList=function(u,m,d){
  5853. u=net_comcast_sms.Util.TN.normalize(u);
  5854. var r=null;
  5855. if(!this._contactHash){
  5856. if(d.size()){
  5857. this._contactHash={};
  5858. for(var o=0,t=d.size();
  5859. o<t;
  5860. o++){
  5861. var n=d.get(o);
  5862. for(var s=0;
  5863. s<ZmContact.PHONE_FIELDS.length;
  5864. s++){
  5865. var c=ZmContact.PHONE_FIELDS[s];
  5866. for(var a=1;
  5867. true;
  5868. a++){
  5869. var l=ZmContact.getAttributeName(c,a);
  5870. var h=ZmContact.getAttr(n,l);
  5871. if(!h){
  5872. break
  5873. }
  5874. var e=d._getPhoneDigits(h);
  5875. if(e){
  5876. e=net_comcast_sms.Util.TN.normalize(e);
  5877. this._contactHash[e]={
  5878. contact:n,field:l};
  5879. if(e==u){
  5880. r=this._contactHash[e]
  5881. }}}}}}}else{
  5882. r=this._contactHash[u]
  5883. }
  5884. caboUtil.run(m,r);
  5885. return r
  5886. };
  5887. net_comcast_sms.Util.Contact._handleGetContactListFail=function(e,t){
  5888. caboUtil.run(t,null)
  5889. };
  5890. net_comcast_sms.Util.Contact.getImageUrl=function(e){
  5891. return(e&&e.getImageUrl&&e.getImageUrl())||(e&&ZmContact.getAttr(e,"image")&&"http://"+ZmContact.getAttr(e,"image"))||[appCtxt.get(ZmSetting.CSFE_MSG_FETCHER_URI),"&id=",e.id,"&part=",1,"&t=",(new Date()).getTime()].join("")
  5892. };
  5893. net_comcast_sms.Util.Contact.getName=function(e){
  5894. return e&&AjxUtil.isObject(e)&&((e.getFileAs&&e.getFileAs())||ZmContact.getAttr(e,"fileAsStr")||ZmContact.getAttr(e,"fullName")||AjxUtil.collapseList([ZmContact.getAttr(e,"firstName"),ZmContact.getAttr(e,"lastName")]).join(""))||null
  5895. };
  5896. net_comcast_sms.Util.Contact.getPhone=function(e){
  5897. return ZmContact.getAttr(e,ZmContact.F_mobilePhone)||ZmContact.getAttr(e,ZmContact.F_workPhone)||ZmContact.getAttr(e,ZmContact.F_homePhone)||ZmContact.getAttr(e,ZmContact.F_otherPhone)
  5898. };
  5899. net_comcast_sms.Util.EMOTICONS=[{
  5900. img:"ImgEmoticonHappy",chars:":)",regex:":-?\\)"}
  5901. ,{
  5902. img:"ImgEmoticonSad",chars:":(",regex:":-?\\("}
  5903. ,{
  5904. img:"ImgEmoticonMellow",chars:":|",regex:":-?\\|"}
  5905. ,{
  5906. img:"ImgEmoticonDry",chars:":/",regex:":-?/"}
  5907. ,{
  5908. img:"ImgEmoticonGrin",chars:":D",regex:":-?D"}
  5909. ,{
  5910. img:"ImgEmoticonTongue",chars:":P",regex:":-?P"}
  5911. ];
  5912. net_comcast_sms.Util.getUserName=function(){
  5913. return appCtxt.get(ZmSetting.DISPLAY_NAME)||appCtxt.accountList.activeAccount.name
  5914. };
  5915. net_comcast_sms.Util.getCOSName=function(){
  5916. return appCtxt.accountList.mainAccount.settings.getInfoResponse.cos.name
  5917. };
  5918. net_comcast_sms.Util.getZimletHandler=function(){
  5919. return net_comcast_sms.instance
  5920. };
  5921. net_comcast_sms.Util.plainComparator=function(t,e){
  5922. if(t==e){
  5923. return 0
  5924. }
  5925. if(!t&&t!==0){
  5926. return 1
  5927. }
  5928. if(!e&&e!==0){
  5929. return -1
  5930. }
  5931. return(t<e)?-1:1
  5932. };
  5933. net_comcast_sms.Util.unescape=function(e){
  5934. return e.replace(/%([\da-e][\da-e])/ig,function(a,t){
  5935. var o=window.parseInt(t,16);
  5936. return(!isNaN(o))?String.fromCharCode(o):"?"
  5937. }
  5938. )
  5939. };
  5940. net_comcast_sms.Util.sendMail=function(e,s,h,l,r){
  5941. var a=new ZmMailMsg(1234567890,new ZmMailList(ZmItem.MSG),true);
  5942. for(var n=0,o=e.length;
  5943. n<o;
  5944. n++){
  5945. if(e[n] instanceof AjxEmailAddress){
  5946. a.addAddress(e[n])
  5947. }}
  5948. if(h){
  5949. a.setSubject(h)
  5950. }
  5951. var t=new ZmMimePart();
  5952. t.setContent(s);
  5953. t.setContentType("text/plain");
  5954. t.setIsBody(true);
  5955. a.setTopPart(t);
  5956. a.send(false,l,r)
  5957. };
  5958. net_comcast_sms.Util.getObjectProxy=function(e){
  5959. var t=function(){};
  5960. t.prototype=e;
  5961. return new t
  5962. };
  5963. net_comcast_sms.Util.getProperty=function(e){
  5964. return this._getPropertiesObj(e,true)._content
  5965. };
  5966. net_comcast_sms.Util.setProperties=function(t,s){
  5967. var a=AjxSoapDoc.create("ModifyPropertiesRequest","urn:zimbraAccount");
  5968. for(var e in t){
  5969. var o=a.set("prop",t[e]);
  5970. o.setAttribute("zimlet","net_comcast_sms");
  5971. o.setAttribute("name",e)
  5972. }
  5973. var n={
  5974. soapDoc:a,callback:new AjxCallback(this,this._handleSetProperties,[t,s]),asyncMode:true,sensitive:true};
  5975. appCtxt.getAppController().sendRequest(n)
  5976. };
  5977. net_comcast_sms.Util._handleSetProperties=function(t,o){
  5978. for(var e in t){
  5979. var a=this._getPropertiesObj(e,true);
  5980. if(a){
  5981. a._content=String(t[e])
  5982. }}
  5983. caboUtil.run(o)
  5984. };
  5985. net_comcast_sms.Util._getPropertiesObj=function(t,o){
  5986. var n=appCtxt.accountList.mainAccount.settings.getInfoResponse.props;
  5987. var e=n.prop=n.prop||[];
  5988. for(var a=0;
  5989. a<e.length;
  5990. a++){
  5991. var s=e[a];
  5992. if(s&&s.zimlet=="net_comcast_sms"&&s.name==t){
  5993. return s
  5994. }}
  5995. if(o){
  5996. var s={
  5997. zimlet:"net_comcast_sms",name:t,_content:""};
  5998. e.push(s);
  5999. return s
  6000. }};
  6001. net_comcast_sms.Contact=function(e){
  6002. this.tn=e
  6003. };
  6004. net_comcast_sms.Contact.prototype.getDetails=function(e){
  6005. if(!this._hasDetails){
  6006. net_comcast_sms.Util.Contact.getByTN(this.tn,new AjxCallback(this,this._handleGetDetails,[e]))
  6007. }else{
  6008. caboUtil.run(e,this)
  6009. }};
  6010. net_comcast_sms.Contact.prototype._handleGetDetails=function(a,t){
  6011. if(t){
  6012. var e=this.contact=t.contact;
  6013. if(e){
  6014. this.name=net_comcast_sms.Util.Contact.getName(e)
  6015. }
  6016. this.field=t.field
  6017. }
  6018. this._hasDetails=true;
  6019. caboUtil.run(a,this)
  6020. };
  6021. net_comcast_sms.Model=function(){
  6022. this._listeners={}
  6023. };
  6024. net_comcast_sms.Model.USE_STATIC=0;
  6025. net_comcast_sms.Model.STATUS_OK=1;
  6026. net_comcast_sms.Model.prototype.getSessionId=function(){
  6027. return null
  6028. };
  6029. net_comcast_sms.Model.prototype.getBroadCloudDomain=function(){
  6030. return net_comcast_sms.Util.getZimletHandler().getConfig("broadcloudBase")
  6031. };
  6032. net_comcast_sms.Model.prototype.rest=function(t,l,n,o,s){
  6033. var h=net_comcast_sms.SmsZimlet.PROXY+AjxStringUtil.urlComponentEncode(t),r=n&&JSON.stringify(n)||null,e=new AjxCallback(this,this._handleRest,[l,t]),a={
  6034. "Content-type":"application/json"};
  6035. if(!AjxUtil.isUndefined(s)){
  6036. h+="&timeout="+s
  6037. }
  6038. if(net_comcast_sms.Model.USE_STATIC){
  6039. var c=this;
  6040. setTimeout(function(){
  6041. c._handleRest(l,t,{
  6042. success:true,obj:net_comcast_sms.Testdata[t]}
  6043. )
  6044. }
  6045. ,0)
  6046. }else{
  6047. AjxRpc.invoke(r,h,a,e,!!o)
  6048. }};
  6049. net_comcast_sms.Model.prototype._handleRest=function(o,t,e){
  6050. if(e&&e.success){
  6051. var a=e.obj||JSON.gparse(e.text);
  6052. caboUtil.run(o,a)
  6053. }else{
  6054. if(ZmZimbraMail._endSessionDone){}else{
  6055. caboUtil.run(o,new net_comcast_sms.ConnError(t,e))
  6056. }}};
  6057. net_comcast_sms.Model.prototype._copyParams=function(s,n,e,a){
  6058. a=a||this.acceptedParams||AjxUtil.keys(s);
  6059. if(e){
  6060. for(var t=0;
  6061. t<e.length;
  6062. t++){
  6063. var o=e[t];
  6064. if(AjxUtil.isUndefined(s[o])){
  6065. throw net_comcast_sms.ModelError.missingParameterInConstructor(o,this.toString())
  6066. }}}
  6067. for(var t=0;
  6068. t<a.length;
  6069. t++){
  6070. var o=a[t];
  6071. if(!AjxUtil.isUndefined(s[o])){
  6072. n[o]=s[o]
  6073. }}
  6074. return n
  6075. };
  6076. net_comcast_sms.Model.prototype.parseStatus=function(t){
  6077. var e=(t&&AjxUtil.isObject(t.status))?t.status:t;
  6078. if(AjxUtil.isArray(e)){
  6079. e=e[0]
  6080. }
  6081. return(e&&e.code==net_comcast_sms.Model.STATUS_OK)?true:new net_comcast_sms.RestError(e)
  6082. };
  6083. net_comcast_sms.Model.prototype.loginError=function(e){
  6084. throw net_comcast_sms.ModelError.notLoggedIn(this.toString()+"::"+e)
  6085. };
  6086. net_comcast_sms.Model.prototype.runCallback=function(e){
  6087. return caboUtil.run.apply(null,arguments)
  6088. };
  6089. net_comcast_sms.Model.prototype.addListener=function(e,t){
  6090. if(!this._listeners[e]){
  6091. this._listeners[e]=[]
  6092. }
  6093. if(AjxUtil.indexOf(this._listeners[e],t)==-1){
  6094. this._listeners[e].push(t)
  6095. }};
  6096. net_comcast_sms.Model.prototype.removeListener=function(e,t){
  6097. if(this._listeners[e]){
  6098. AjxUtil.arrayRemove(this._listeners[e],t)
  6099. }};
  6100. net_comcast_sms.Model.prototype.replaceListener=function(t,a,e){
  6101. this.removeListener(t,a);
  6102. this.addListener(t,e)
  6103. };
  6104. net_comcast_sms.Model.prototype.callListeners=function(t){
  6105. var a=this._listeners[t];
  6106. var e=Array.prototype.slice.call(arguments,1);
  6107. if(a){
  6108. caboUtil.apply(a,e)
  6109. }};
  6110. net_comcast_sms.Model.prototype.getUrl=function(){
  6111. var e=[];
  6112. for(var t=0;
  6113. t<arguments.length;
  6114. t++){
  6115. var a=arguments[t];
  6116. if(!AjxUtil.isUndefined(a)&&!AjxUtil.isNull(a)){
  6117. e.push(a)
  6118. }}
  6119. var o=this.getSessionId();
  6120. return e.join("/")+(o?(";JSESSIONID="+o):"")
  6121. };
  6122. net_comcast_sms.ModelError=function(e){
  6123. this.message=e
  6124. };
  6125. net_comcast_sms.ModelError.prototype.toString=function(){
  6126. return"ModelError: "+this.message
  6127. };
  6128. net_comcast_sms.ModelError.missingParameterInConstructor=function(e,t){
  6129. return new net_comcast_sms.ModelError('Required parameter "'+e+'" is undefined in '+t)
  6130. };
  6131. net_comcast_sms.ModelError.incorrectParameter=function(t,a,e){
  6132. return new net_comcast_sms.ModelError('Required parameter "'+t+'" must be of type "'+a+'" in '+e)
  6133. };
  6134. net_comcast_sms.ModelError.notLoggedIn=function(e){
  6135. return new net_comcast_sms.ModelError('The user must be logged in to access "'+e+'"')
  6136. };
  6137. net_comcast_sms.RestError=function(e){
  6138. if(!e||!e.message){
  6139. this.message="Empty response";
  6140. this.code=0
  6141. }else{
  6142. this.message=e.message||e.status;
  6143. this.code=e.code
  6144. }};
  6145. net_comcast_sms.RestError.prototype.toString=function(){
  6146. return"RestError: "+this.message
  6147. };
  6148. net_comcast_sms.ConnError=function(t,e){
  6149. this.message="Failed connection to "+t+"<br/>Response was:<br/>"+AjxStringUtil._escapeForHTML(JSON.stringify(e));
  6150. this.code=0
  6151. };
  6152. net_comcast_sms.ConnError.prototype.toString=function(){
  6153. return"ConnError: "+this.message
  6154. };
  6155. net_comcast_sms.FwdConfig=function(e){
  6156. net_comcast_sms.Model.call(this);
  6157. this.useraccount=e;
  6158. this._loading=false;
  6159. this._loaded=false;
  6160. this._loadListeners=[];
  6161. this._current={};
  6162. this._orig={}
  6163. };
  6164. net_comcast_sms.FwdConfig.prototype=new net_comcast_sms.Model;
  6165. net_comcast_sms.FwdConfig.prototype.constructor=net_comcast_sms.FwdConfig;
  6166. net_comcast_sms.FwdConfig.prototype.EMAIL="email";
  6167. net_comcast_sms.FwdConfig.prototype.SMS="sms";
  6168. net_comcast_sms.FwdConfig.prototype.acceptedParams=[net_comcast_sms.FwdConfig.prototype.EMAIL];
  6169. net_comcast_sms.FwdConfig.prototype.FLAG_OFF="off";
  6170. net_comcast_sms.FwdConfig.prototype.FLAG_ON="on";
  6171. net_comcast_sms.FwdConfig.prototype.toString=function(){
  6172. return"net_comcast_sms.FwdConfig"
  6173. };
  6174. net_comcast_sms.FwdConfig.prototype.getUAdomain=function(){
  6175. return this.useraccount.getUAdomain()
  6176. };
  6177. net_comcast_sms.FwdConfig.prototype.getUATN=function(){
  6178. return this.useraccount.getUATN()
  6179. };
  6180. net_comcast_sms.FwdConfig.prototype.setConfigValue=function(e,t){
  6181. caboUtil.Coll.deref(this._current,e,t)
  6182. };
  6183. net_comcast_sms.FwdConfig.prototype.getConfigValue=function(e){
  6184. return caboUtil.Coll.deref(this._current,e)
  6185. };
  6186. net_comcast_sms.FwdConfig.prototype.load=function(a){
  6187. if(this.useraccount.isLoggedIn()){
  6188. this._loading=true;
  6189. var t=this.getUrl(this.getUAdomain(),"ua","config","fwdinfo",this.getUATN());
  6190. var e=new AjxCallback(this,this._handleLoad,[a]);
  6191. this.rest(t,e,null,true)
  6192. }else{
  6193. this.loginError("getConfig")
  6194. }};
  6195. net_comcast_sms.FwdConfig.prototype._handleLoad=function(s,o){
  6196. var a=this.parseStatus(o);
  6197. if(a===true){
  6198. var n=this._current={
  6199. email:{}
  6200. ,sms:{}};
  6201. for(var e=0;
  6202. e<this.acceptedParams.length;
  6203. e++){
  6204. var t=this.acceptedParams[e];
  6205. n[t].enabled=o[t]&&(o[t].flag==this.FLAG_ON)||false;
  6206. n[t].addr=o[t]&&o[t].data
  6207. }
  6208. this._orig=caboUtil.Coll.deepcopy(n)
  6209. }
  6210. this._loading=false;
  6211. this._loaded=true;
  6212. caboUtil.run(s,a)
  6213. };
  6214. net_comcast_sms.FwdConfig.prototype.get=function(e){
  6215. this._loadListeners.push(e);
  6216. if(!this._loading&&!this._loaded){
  6217. this.load(new AjxCallback(this,this._handleGet))
  6218. }else{
  6219. if(this._loaded){
  6220. this._handleGet()
  6221. }}};
  6222. net_comcast_sms.FwdConfig.prototype._handleGet=function(){
  6223. caboUtil.run(this._loadListeners,this);
  6224. this._loadListeners.length=0
  6225. };
  6226. net_comcast_sms.FwdConfig.prototype.put=function(l){
  6227. if(this.useraccount.isLoggedIn()){
  6228. var c=[];
  6229. for(var a=0;
  6230. a<this.acceptedParams.length;
  6231. a++){
  6232. var n=this.acceptedParams[a];
  6233. var r=this._current[n];
  6234. var t=this._orig[n];
  6235. if(r&&t){
  6236. r.addr=AjxUtil.toArray(r.addr);
  6237. t.addr=AjxUtil.toArray(t.addr);
  6238. var h=(AjxUtil.isArray(r.addr)?r.addr[0]:r.addr)||"";
  6239. var e=this.getUrl(this.getUAdomain(),"ua","config","fwddetail",this.getUATN());
  6240. var o={
  6241. data:h,type:n};
  6242. c.push({
  6243. url:e,body:o}
  6244. );
  6245. var e=this.getUrl(this.getUAdomain(),"ua","config","fwd",this.getUATN());
  6246. var o={
  6247. flag:r.enabled,type:n};
  6248. c.push({
  6249. url:e,body:o}
  6250. )
  6251. }}
  6252. var s=function(u){
  6253. var d=(u<c.length-1)?new AjxCallback(this,s,[u+1]):l;
  6254. this.rest(c[u].url,d,c[u].body)
  6255. };
  6256. s.call(this,0)
  6257. }else{
  6258. this.loginError("putConfig")
  6259. }};
  6260. net_comcast_sms.FwdConfig.prototype._handlePut=function(a,t){
  6261. var e=this.parseStatus(t);
  6262. if(e===true){
  6263. this._orig=caboUtil.Coll.deepcopy(this._current)
  6264. }
  6265. caboUtil.run(a,e)
  6266. };
  6267. net_comcast_sms.MasterAccount=function(t){
  6268. net_comcast_sms.Model.call(this);
  6269. var e=["spcode","sppwd","mname","users"];
  6270. this._copyParams(t,this,e);
  6271. this._created=false;
  6272. this._activated=false;
  6273. this.enabled=false
  6274. };
  6275. net_comcast_sms.MasterAccount.prototype=new net_comcast_sms.Model;
  6276. net_comcast_sms.MasterAccount.prototype.constructor=net_comcast_sms.MasterAccount;
  6277. net_comcast_sms.MasterAccount.prototype.acceptedParams=["spcode","sppwd","mname","acctnum","hwmac","zipcode","users"];
  6278. net_comcast_sms.MasterAccount.prototype.toString=function(){
  6279. return"net_comcast_sms.MasterAccount"
  6280. };
  6281. net_comcast_sms.MasterAccount.prototype.toJSON=function(){
  6282. var t=this._copyParams(this,{}
  6283. );
  6284. for(var e=0;
  6285. e<t.users.length;
  6286. e++){
  6287. t.users[e]=t.users[e].toJSON()
  6288. }
  6289. return t
  6290. };
  6291. net_comcast_sms.MasterAccount.prototype.getUserAccounts=function(){
  6292. return this.users
  6293. };
  6294. net_comcast_sms.MasterAccount.prototype.getUAdomain=function(){
  6295. return this.ua_domain
  6296. };
  6297. net_comcast_sms.MasterAccount.prototype.setCreated=function(t){
  6298. this._created=!!t;
  6299. for(var e=0;
  6300. e<this.users.length;
  6301. e++){
  6302. this.users[e].setCreated(t)
  6303. }};
  6304. net_comcast_sms.MasterAccount.prototype.setHandler=function(e){
  6305. this._handler=e
  6306. };
  6307. net_comcast_sms.MasterAccount.prototype.getHandler=function(){
  6308. return this._handler
  6309. };
  6310. net_comcast_sms.MasterAccount.prototype.create=function(n){
  6311. if(!this._created&&!this._creating){
  6312. this._creating=true;
  6313. var o=["spcode","sppwd","mname","users"];
  6314. var t=this.getUrl(this.getBroadCloudDomain(),"ma","create");
  6315. var a=this._copyParams(this,{}
  6316. ,o,this.acceptedParams);
  6317. var e=new AjxCallback(this,this._handleCreate,[n]);
  6318. this.rest(t,e,a)
  6319. }};
  6320. net_comcast_sms.MasterAccount.prototype._handleCreate=function(a,t){
  6321. this._creating=false;
  6322. var e=this.parseStatus(t);
  6323. if(e===true){
  6324. this.setCreated(true)
  6325. }
  6326. if(a instanceof AjxCallback){
  6327. a.run(e)
  6328. }};
  6329. net_comcast_sms.MasterAccount.prototype.activate=function(n){
  6330. if(!this._activated&&!this._activating){
  6331. this._activating=true;
  6332. var t=this.getUrl(this.getBroadCloudDomain(),"ma","activate");
  6333. var o=["spcode","sppwd","mname"];
  6334. var a=this._copyParams(this,{}
  6335. ,o,o);
  6336. var e=new AjxCallback(this,this._handleActivate,[n]);
  6337. this.rest(t,e,a)
  6338. }};
  6339. net_comcast_sms.MasterAccount.prototype._handleActivate=function(a,t){
  6340. this._activating=false;
  6341. var e=this.parseStatus(t);
  6342. if(e===true){
  6343. this._activated=true
  6344. }
  6345. if(a instanceof AjxCallback){
  6346. a.run(e)
  6347. }};
  6348. net_comcast_sms.MasterAccount.prototype.enable=function(a,s){
  6349. if(!this._enabling){
  6350. this._enabling=true;
  6351. var t=this.getUrl(this.getBroadCloudDomain(),"ma",a?"enable":"disable");
  6352. var n=["spcode","sppwd","mname"];
  6353. var o=this._copyParams(this,{}
  6354. ,n,n);
  6355. var e=new AjxCallback(this,this._handleEnable,[a,s]);
  6356. this.rest(t,e,o)
  6357. }};
  6358. net_comcast_sms.MasterAccount.prototype._handleEnable=function(e,o,a){
  6359. this._enabling=false;
  6360. var t=this.parseStatus(a);
  6361. if(t===true){
  6362. this.enabled=e
  6363. }
  6364. if(o instanceof AjxCallback){
  6365. o.run(t)
  6366. }};
  6367. net_comcast_sms.MasterAccount.prototype.remove=function(n){
  6368. if(!this._deleting){
  6369. this._deleting=true;
  6370. var t=this.getUrl(this.getBroadCloudDomain(),"ma","delete");
  6371. var o=["spcode","sppwd","mname"];
  6372. var a=this._copyParams(this,{}
  6373. ,o,o);
  6374. var e=new AjxCallback(this,this._handleRemove,[n]);
  6375. this.rest(t,e,a)
  6376. }};
  6377. net_comcast_sms.MasterAccount.prototype._handleRemove=function(a,t){
  6378. this._deleting=false;
  6379. var e=this.parseStatus(t);
  6380. if(e===true){
  6381. this.setCreated(false)
  6382. }
  6383. if(a instanceof AjxCallback){
  6384. a.run(e)
  6385. }};
  6386. net_comcast_sms.MasterAccount.prototype.info=function(a){
  6387. var t=this.getUrl(this.getBroadCloudDomain(),"ma","info",this.spcode,this.sppwd,this.mname);
  6388. var e=new AjxCallback(this,this._handleInfo,[a]);
  6389. this.rest(t,e,null,true)
  6390. };
  6391. net_comcast_sms.MasterAccount.prototype._handleInfo=function(n,a){
  6392. var t=this.parseStatus(a);
  6393. if(t===true){
  6394. var o=["enabled","mname","acctnum","ua_domain","hw_mac"];
  6395. this._copyParams(a,this,null,o);
  6396. this.users=[];
  6397. for(var e=0;
  6398. e<a.users.length;
  6399. e++){
  6400. this.users.push(new net_comcast_sms.UserAccount(this,a.users[e]))
  6401. }
  6402. this.setCreated(true)
  6403. }
  6404. if(n instanceof AjxCallback){
  6405. n.run(t)
  6406. }};
  6407. net_comcast_sms.MasterAccount.get=function(e,s,o,t,n){
  6408. var a=new net_comcast_sms.MasterAccount({
  6409. spcode:e,sppwd:s,mname:o,users:[]}
  6410. );
  6411. a.setHandler(t);
  6412. a.info(new AjxCallback(net_comcast_sms.MasterAccount._handleGet,[n,a]));
  6413. return a
  6414. };
  6415. net_comcast_sms.MasterAccount._handleGet=function(a,t,e){
  6416. caboUtil.run(a,t)
  6417. };
  6418. net_comcast_sms.UserAccount=function(a,t){
  6419. net_comcast_sms.Model.call(this);
  6420. this.masteraccount=a;
  6421. var e=["name","parameters"];
  6422. this._copyParams(t,this,e);
  6423. this._created=false;
  6424. this._loggedIn=false;
  6425. this._configLoadListeners=[];
  6426. this._messageStore=new net_comcast_sms.MessageStore(this);
  6427. this.fwd=new net_comcast_sms.FwdConfig(this)
  6428. };
  6429. net_comcast_sms.UserAccount.prototype=new net_comcast_sms.Model;
  6430. net_comcast_sms.UserAccount.prototype.constructor=net_comcast_sms.UserAccount;
  6431. net_comcast_sms.UserAccount.prototype.acceptedParams=["tn","name","email","displayname","parameters"];
  6432. net_comcast_sms.UserAccount.prototype.toString=function(){
  6433. return"net_comcast_sms.UserAccount"
  6434. };
  6435. net_comcast_sms.UserAccount.prototype.getClientId=function(){
  6436. return"12345678"
  6437. };
  6438. net_comcast_sms.UserAccount.prototype.toJSON=function(){
  6439. return this._copyParams(this,{}
  6440. )
  6441. };
  6442. net_comcast_sms.UserAccount.prototype.setCreated=function(e){
  6443. this._created=!!e
  6444. };
  6445. net_comcast_sms.UserAccount.prototype.setMasterAccount=function(e){
  6446. this.masteraccount=e
  6447. };
  6448. net_comcast_sms.UserAccount.prototype.getMasterAccount=function(){
  6449. return this.masteraccount
  6450. };
  6451. net_comcast_sms.UserAccount.prototype.getUAdomain=function(){
  6452. return this.masteraccount.getUAdomain()
  6453. };
  6454. net_comcast_sms.UserAccount.prototype.getUATN=function(){
  6455. return this.tn
  6456. };
  6457. net_comcast_sms.UserAccount.prototype.isLoggedIn=function(){
  6458. return this._loggedIn
  6459. };
  6460. net_comcast_sms.UserAccount.prototype.getMessageStore=function(){
  6461. return this._messageStore
  6462. };
  6463. net_comcast_sms.UserAccount.prototype.getHandler=function(){
  6464. return this.masteraccount.getHandler()
  6465. };
  6466. net_comcast_sms.UserAccount.prototype.getSessionId=function(){
  6467. return this.sessionid||null
  6468. };
  6469. net_comcast_sms.UserAccount.prototype.login=function(e,n,s){
  6470. if(!this._loggedIn){
  6471. var a=this.getUrl(this.getUAdomain(),"ua","login"),o={
  6472. uname:e,pwd:n,clientid:this.getClientId()}
  6473. ,t=new AjxCallback(this,this._handleLogin,[n,s]);
  6474. this.rest(a,t,o)
  6475. }};
  6476. net_comcast_sms.UserAccount.prototype._handleLogin=function(a,n,t){
  6477. var e=this.parseStatus(t);
  6478. if(e===true){
  6479. this._loggedIn=true;
  6480. var o=["enabled","serverid","sessionid","apiversion","expiry","pushurl","parameters"];
  6481. this._copyParams(t,this,null,o);
  6482. this._pwd=a
  6483. }else{
  6484. this._pwd=null;
  6485. this._loggedIn=false
  6486. }
  6487. if(n instanceof AjxCallback){
  6488. n.run(e)
  6489. }};
  6490. net_comcast_sms.UserAccount.prototype.logout=function(a){
  6491. if(this._loggedIn){
  6492. var t="https://"+[this.getUAdomain(),"ua","logout"].join("/"),e=new AjxCallback(this,this._handleLogout,[a]);
  6493. this.rest(t,e)
  6494. }};
  6495. net_comcast_sms.UserAccount.prototype._handleLogout=function(a,t){
  6496. var e=this.parseStatus(t);
  6497. if(e===true){
  6498. this._loggedIn=false
  6499. }
  6500. if(a instanceof AjxCallback){
  6501. a.run(e)
  6502. }};
  6503. net_comcast_sms.UserAccount.prototype.setupPush=function(o,a,s){
  6504. if(this._loggedIn){
  6505. var t=this.getUrl(this.getUAdomain(),"ua","push",a?"enable":"disable",this.tn),n={
  6506. deviceid:o}
  6507. ,e=new AjxCallback(this,this._handleSetupPush,[s]);
  6508. this.rest(t,e,n)
  6509. }else{
  6510. this.loginError("setupPush")
  6511. }};
  6512. net_comcast_sms.UserAccount.prototype._handleSetupPush=function(a,t){
  6513. var e=this.parseStatus(t);
  6514. if(a instanceof AjxCallback){
  6515. a.run(e)
  6516. }};
  6517. net_comcast_sms.UserAccount.prototype.setPassword=function(a,n){
  6518. if(this._loggedIn&&this._pwd){
  6519. var t=this.getUrl(this.getUAdomain(),"ua","config","pwd",this.tn);
  6520. var o={
  6521. curpwd:this._pwd,newpwd:a};
  6522. var e=new AjxCallback(this,this._handleSetPassword,[n]);
  6523. this.rest(t,e,o)
  6524. }else{
  6525. this.loginError("setPassword")
  6526. }};
  6527. net_comcast_sms.UserAccount.prototype._handleSetPassword=function(a,t){
  6528. var e=this.parseStatus(t);
  6529. if(a instanceof AjxCallback){
  6530. a.run(e)
  6531. }};
  6532. net_comcast_sms.Message=function(t,e,a){
  6533. if(!arguments.length){
  6534. return
  6535. }
  6536. net_comcast_sms.Model.call(this);
  6537. this.useraccount=t;
  6538. this.thread=e;
  6539. this._copyParams(a,this,this.requiredParams);
  6540. this.body=net_comcast_sms.Util.unescape(this.body);
  6541. this.body=AjxStringUtil.htmlEncode(this.body)
  6542. };
  6543. net_comcast_sms.Message.prototype=new net_comcast_sms.Model;
  6544. net_comcast_sms.Message.prototype.constructor=net_comcast_sms.Message;
  6545. net_comcast_sms.Message.prototype.requiredParams=["mid","status","type","body","tn"];
  6546. net_comcast_sms.Message.prototype.acceptedParams=["mid","status","type","time","stime","name","stype","body","dir","tn","long","lat","murl"];
  6547. net_comcast_sms.Message.prototype.toString=function(){
  6548. return"net_comcast_sms.Message"
  6549. };
  6550. net_comcast_sms.Message.STATUS={
  6551. N:1,U:2,R:3,L:4,D:5};
  6552. net_comcast_sms.Message.STATUSINDEX={
  6553. N:3,U:3,R:2,L:2,D:1};
  6554. net_comcast_sms.Message.TYPE_SMS="sms";
  6555. net_comcast_sms.Message.TYPE_GROUP="group";
  6556. net_comcast_sms.Message.TYPE_VMAIL="vmail";
  6557. net_comcast_sms.Message.DIR_INCOMING="I";
  6558. net_comcast_sms.Message.DIR_OUTGOING="O";
  6559. net_comcast_sms.Message.STATUS_NEW="N";
  6560. net_comcast_sms.Message.STATUS_UNREAD="U";
  6561. net_comcast_sms.Message.STATUS_READ="R";
  6562. net_comcast_sms.Message.STATUS_LOCKED="L";
  6563. net_comcast_sms.Message.STATUS_DELETED="D";
  6564. net_comcast_sms.Message.acceptedType=function(e){
  6565. return e&&(e==net_comcast_sms.Message.TYPE_SMS||e=="group"||e=="vmail")
  6566. };
  6567. net_comcast_sms.Message.acceptedStatus=function(e){
  6568. return e&&!!net_comcast_sms.Message.STATUS[e]
  6569. };
  6570. net_comcast_sms.Message.prototype.getUAdomain=function(){
  6571. return this.useraccount.getUAdomain()
  6572. };
  6573. net_comcast_sms.Message.prototype.getUATN=function(){
  6574. return this.useraccount.getUATN()
  6575. };
  6576. net_comcast_sms.Message.prototype.isLoggedIn=function(){
  6577. return this.useraccount.isLoggedIn()
  6578. };
  6579. net_comcast_sms.Message.prototype.getHandler=function(){
  6580. return this.useraccount.getHandler()
  6581. };
  6582. net_comcast_sms.Message.prototype.getSessionId=function(){
  6583. return this.useraccount.getSessionId()
  6584. };
  6585. net_comcast_sms.Message.prototype.getUSTN=function(){
  6586. return net_comcast_sms.Util.TN.normalize(this.tn)
  6587. };
  6588. net_comcast_sms.Message.prototype.getID=function(){
  6589. return this.mid
  6590. };
  6591. net_comcast_sms.Message.prototype.setStatus=function(e,s,o){
  6592. if(net_comcast_sms.Message.acceptedStatus(e)){
  6593. if(!o){
  6594. if(e==net_comcast_sms.Message.STATUS_DELETED){
  6595. return this.remove(s)
  6596. }
  6597. if(this.isLoggedIn()){
  6598. var a=this.getUrl(this.getUAdomain(),"ua","msg",this.type,"status",this.mid,this.getUATN()),n={
  6599. status:e}
  6600. ,t=new AjxCallback(this,this._handleSetStatus,[e,s]);
  6601. this.rest(a,t,n,false)
  6602. }else{
  6603. this.loginError("setStatus")
  6604. }}}else{}};
  6605. net_comcast_sms.Message.prototype.setEditStatus=function(e){
  6606. this.editstatus=e;
  6607. this.thread.onChangeMessageEditStatus(this);
  6608. this.callListeners("editstatus")
  6609. };
  6610. net_comcast_sms.Message.prototype.getEditStatus=function(){
  6611. return this.editstatus
  6612. };
  6613. net_comcast_sms.Message.prototype.getContact=function(e){
  6614. if(this._contact){
  6615. caboUtil.run(e,this._contact);
  6616. return this._contact
  6617. }
  6618. net_comcast_sms.Util.Contact.getByTN(this.tn,new AjxCallback(this,this._handleGetContact,[e]))
  6619. };
  6620. net_comcast_sms.Message.prototype._handleGetContact=function(t,e){
  6621. this._contact=e;
  6622. caboUtil.run(t,e)
  6623. };
  6624. net_comcast_sms.Message.prototype.setForwardStatus=function(e){
  6625. this.forwardstatus=!!e;
  6626. this.thread.onChangeMessageForwardStatus(this);
  6627. this.callListeners("forwardstatus")
  6628. };
  6629. net_comcast_sms.Message.prototype.canDelete=function(){
  6630. var e=this.status;
  6631. return(e==net_comcast_sms.Message.STATUS_NEW||e==net_comcast_sms.Message.STATUS_UNREAD||e==net_comcast_sms.Message.STATUS_READ)
  6632. };
  6633. net_comcast_sms.Message.prototype._handleSetStatus=function(e,o,a){
  6634. var t=this.parseStatus(a);
  6635. if(t===true){
  6636. this.localSetStatus(e)
  6637. }else{
  6638. this._clearEditStatus();
  6639. if(t instanceof net_comcast_sms.RestError){}}
  6640. caboUtil.run(o,t)
  6641. };
  6642. net_comcast_sms.Message.prototype.localSetStatus=function(t){
  6643. var e=this.status;
  6644. this.status=t;
  6645. this._clearEditStatus();
  6646. this.thread.onChangeMessageStatus(this,e,t);
  6647. this.thread.store.onChangeMessageStatus(this,e,t);
  6648. this.callListeners("status")
  6649. };
  6650. net_comcast_sms.Message.prototype._clearEditStatus=function(){
  6651. if(this.editstatus){
  6652. this.editstatus=null;
  6653. this.callListeners("editstatus")
  6654. }};
  6655. net_comcast_sms.Message.prototype.setRead=function(e){
  6656. if(this.status==net_comcast_sms.Message.STATUS_NEW||this.status==net_comcast_sms.Message.STATUS_UNREAD){
  6657. this.setStatus(net_comcast_sms.Message.STATUS_READ,e)
  6658. }else{
  6659. caboUtil.run(e)
  6660. }};
  6661. net_comcast_sms.Message.prototype.setUnread=function(e){
  6662. if(this.status==net_comcast_sms.Message.STATUS_READ){
  6663. this.setStatus(net_comcast_sms.Message.STATUS_UNREAD,e)
  6664. }else{
  6665. caboUtil.run(e)
  6666. }};
  6667. net_comcast_sms.Message.prototype.getStatusIndex=function(){
  6668. return this.status&&net_comcast_sms.Message.STATUSINDEX[this.status]
  6669. };
  6670. net_comcast_sms.Message.prototype.getAnnotation=function(){
  6671. return[net_comcast_sms.Util.Date.computeDateStr(new Date(this.time)).replace(/\n/g," ")].join("")
  6672. };
  6673. net_comcast_sms.Message.prototype.getBody=function(){
  6674. return this.body
  6675. };
  6676. net_comcast_sms.Message.prototype.remove=function(o){
  6677. if(this.isLoggedIn()){
  6678. var t=this.getUrl(this.getUAdomain(),"ua","msg",this.type,"delete",this.getUATN()),a={
  6679. mids:[this.mid]}
  6680. ,e=new AjxCallback(this,this._handleSetStatus,["D",o]);
  6681. this.rest(t,e,a,false)
  6682. }else{
  6683. this.loginError("remove")
  6684. }};
  6685. net_comcast_sms.Message.dateComparator=function(t,e){
  6686. return net_comcast_sms.Util.plainComparator(t&&t.time,e&&e.time)
  6687. };
  6688. net_comcast_sms.Message.statusComparator=function(t,e){
  6689. return net_comcast_sms.Util.plainComparator(t&&t.getStatusIndex(),e&&e.getStatusIndex())
  6690. };
  6691. net_comcast_sms.MessageStore=function(e){
  6692. net_comcast_sms.Model.call(this);
  6693. this.useraccount=e;
  6694. this.messages_byId={};
  6695. this.messages_byType={};
  6696. this.messages_byType[net_comcast_sms.Message.TYPE_SMS]={};
  6697. this.messages_byType[net_comcast_sms.Message.TYPE_GROUP]={};
  6698. this.messages_byType[net_comcast_sms.Message.TYPE_VMAIL]={};
  6699. this.messages_byStatus={
  6700. N:{}
  6701. ,U:{}
  6702. ,R:{}
  6703. ,L:{}
  6704. ,D:{}};
  6705. this.messages_byDir={
  6706. I:{}
  6707. ,O:{}};
  6708. this.threads={};
  6709. this._hasMoreThreads=false;
  6710. window.messagestore=this
  6711. };
  6712. net_comcast_sms.MessageStore.prototype=new net_comcast_sms.Model;
  6713. net_comcast_sms.MessageStore.prototype.constructor=net_comcast_sms.MessageStore;
  6714. net_comcast_sms.MessageStore.prototype.toString=function(){
  6715. return"net_comcast_sms.MessageStore"
  6716. };
  6717. net_comcast_sms.MessageStore.prototype.getUAdomain=function(){
  6718. return this.useraccount.getUAdomain()
  6719. };
  6720. net_comcast_sms.MessageStore.prototype.getUATN=function(){
  6721. return this.useraccount.getUATN()
  6722. };
  6723. net_comcast_sms.MessageStore.prototype.isLoggedIn=function(){
  6724. return this.useraccount.isLoggedIn()
  6725. };
  6726. net_comcast_sms.MessageStore.prototype.getHandler=function(){
  6727. return this.useraccount.getHandler()
  6728. };
  6729. net_comcast_sms.MessageStore.prototype.getSessionId=function(){
  6730. return this.useraccount.getSessionId()
  6731. };
  6732. net_comcast_sms.MessageStore.prototype.getById=function(e){
  6733. if(AjxUtil.isArray(e)){
  6734. var a=[];
  6735. for(var t=0;
  6736. t<e.length;
  6737. t++){
  6738. a[t]=this.getById(e[t])
  6739. }
  6740. return a
  6741. }
  6742. return this.messages_byId[e]
  6743. };
  6744. net_comcast_sms.MessageStore.prototype.getByType=function(a){
  6745. if(AjxUtil.isArray(a)){
  6746. var t=[];
  6747. for(var e=0;
  6748. e<a.length;
  6749. e++){
  6750. t[e]=this.getByType(a[e])
  6751. }
  6752. return t
  6753. }
  6754. return this.messages_byType[a]
  6755. };
  6756. net_comcast_sms.MessageStore.prototype.getByStatus=function(e){
  6757. if(AjxUtil.isArray(e)){
  6758. var a=[];
  6759. for(var t=0;
  6760. t<e.length;
  6761. t++){
  6762. a[t]=this.getByStatus(e[t])
  6763. }
  6764. return a
  6765. }
  6766. return this.messages_byStatus[e]
  6767. };
  6768. net_comcast_sms.MessageStore.prototype.getByDir=function(e){
  6769. if(AjxUtil.isArray(e)){
  6770. var a=[];
  6771. for(var t=0;
  6772. t<e.length;
  6773. t++){
  6774. a[t]=this.getByDir(e[t])
  6775. }
  6776. return a
  6777. }
  6778. return this.messages_byDir[e]
  6779. };
  6780. net_comcast_sms.MessageStore.prototype.putCache=function(a){
  6781. var e=a.mid;
  6782. this.messages_byId[e]=a;
  6783. if(this.messages_byType[a.type]){
  6784. this.messages_byType[a.type][e]=a
  6785. }
  6786. if(this.messages_byStatus[a.status]){
  6787. var t=(this.messages_byStatus[a.status][e]!=a);
  6788. this.messages_byStatus[a.status][e]=a;
  6789. if(t){
  6790. this.callListeners("status")
  6791. }}
  6792. if(this.messages_byDir[a.dir]){
  6793. this.messages_byDir[a.dir][e]=a
  6794. }};
  6795. net_comcast_sms.MessageStore.prototype.delCache=function(o){
  6796. if(AjxUtil.isArray(o)){
  6797. for(var t=0;
  6798. t<o.length;
  6799. t++){
  6800. this.delCache(o[t])
  6801. }}
  6802. if(o instanceof net_comcast_sms.Message){
  6803. var e=o.mid;
  6804. delete this.messages_byId[e];
  6805. if(this.messages_byType[o.type]){
  6806. delete this.messages_byType[o.type][e]
  6807. }
  6808. if(this.messages_byStatus[o.status]){
  6809. var a=(this.messages_byStatus[o.status][e]==o);
  6810. delete this.messages_byStatus[o.status][e];
  6811. if(a){
  6812. this.callListeners("status")
  6813. }}
  6814. if(this.messages_byDir[o.dir]){
  6815. delete this.messages_byDir[o.dir][e]
  6816. }}};
  6817. net_comcast_sms.MessageStore.sortByType=function(n){
  6818. var a={};
  6819. for(var t=0,e=n.length;
  6820. t<e;
  6821. t++){
  6822. var o=n[t];
  6823. if(o){
  6824. if(!a[o.type]){
  6825. a[o.type]=[]
  6826. }
  6827. a[o.type].push(o)
  6828. }}
  6829. return a
  6830. };
  6831. net_comcast_sms.MessageStore.getMid=function(a){
  6832. if(AjxUtil.isArray(a)){
  6833. var o=[];
  6834. for(var t=0,e=a.length;
  6835. t<e;
  6836. t++){
  6837. o[t]=a[t].mid
  6838. }
  6839. return o
  6840. }
  6841. return a&&a.mid
  6842. };
  6843. net_comcast_sms.MessageStore.prototype.onChangeMessageStatus=function(o,e,t){
  6844. var a=o.mid;
  6845. if(o==this.messages_byStatus[e][a]){
  6846. delete this.messages_byStatus[e][a];
  6847. this.messages_byStatus[t][a]=o;
  6848. this.callListeners("status")
  6849. }};
  6850. net_comcast_sms.MessageStore.prototype.refreshThreadHeaders=function(t){
  6851. var e=20;
  6852. this.loadThreadHeaders(t,e,null,e)
  6853. };
  6854. net_comcast_sms.MessageStore.prototype.moreThreadHeaders=function(t,e){
  6855. e=e||this.getNextLoadSize();
  6856. this.loadThreadHeaders(t,e,this.getOldestThread().getNewest().time,this.getThreadCount()+e)
  6857. };
  6858. net_comcast_sms.MessageStore.prototype.loadThreadHeaders=function(s,n,e,o){
  6859. if(this.isLoggedIn()){
  6860. var a=this.getUrl(this.getUAdomain(),"ua","msg","sms","thread","headers",n||null,e||(n?0:null),this.getUATN()),t=new AjxCallback(this,this._handleLoadThreadHeaders,[s,o]);
  6861. this.rest(a,t,null,true)
  6862. }else{
  6863. this.loginError("loadThreadHeaders")
  6864. }};
  6865. net_comcast_sms.MessageStore.prototype._handleLoadThreadHeaders=function(s,e,n){
  6866. var a=this.parseStatus(n);
  6867. if(a===true||a.code=="0030006"){
  6868. var o;
  6869. if(n.messages){
  6870. o=n.messages.length;
  6871. for(var t=0;
  6872. t<n.messages.length;
  6873. t++){
  6874. this._createMessage(n.messages[t])
  6875. }}else{
  6876. o=this.getThreadCount()
  6877. }
  6878. if(e){
  6879. if(o<e){
  6880. this._hasMoreThreads=false
  6881. }else{
  6882. this._hasMoreThreads=true
  6883. }}
  6884. a=true
  6885. }else{
  6886. this._hasMoreThreads=false
  6887. }
  6888. caboUtil.run(s,a);
  6889. this.callListeners("threads");
  6890. this.callListeners("status")
  6891. };
  6892. net_comcast_sms.MessageStore.prototype.getNextLoadSize=function(){
  6893. var e=this.getThreadCount();
  6894. return(e<=40)?20:Math.ceil(e*0.5)
  6895. };
  6896. net_comcast_sms.MessageStore.prototype._createMessage=function(t){
  6897. var a=new net_comcast_sms.Message(this.useraccount,null,t),e=this.threads[a.tn]||this.threads["001"+a.tn];
  6898. if(e){
  6899. e.update(a,true)
  6900. }else{
  6901. this.threads[a.tn]=new net_comcast_sms.Thread(this.useraccount,this,a);
  6902. this.callListeners("threads")
  6903. }
  6904. this.putCache(a);
  6905. return a
  6906. };
  6907. net_comcast_sms.MessageStore.prototype.getThread=function(e){
  6908. if(e instanceof net_comcast_sms.Message){
  6909. if(!(this.threads[e.tn]||this.threads["001"+e])){
  6910. this.threads[e.tn]=new net_comcast_sms.Thread(this.useraccount,this,e);
  6911. this.callListeners("threads")
  6912. }
  6913. return this.threads[e.tn]
  6914. }else{
  6915. if(AjxUtil.isNumber(e)||AjxUtil.isString(e)){
  6916. return this.threads[e]||this.threads["001"+e]
  6917. }}};
  6918. net_comcast_sms.MessageStore.prototype.getThreads=function(){
  6919. return this.threads
  6920. };
  6921. net_comcast_sms.MessageStore.prototype.getNonDeletedThreads=function(a){
  6922. var t=[];
  6923. a=a||this.threads;
  6924. if(AjxUtil.isArray(a)){}else{
  6925. if(a instanceof AjxVector){
  6926. a=a.getArray()
  6927. }else{
  6928. if(AjxUtil.isObject(a)){
  6929. a=AjxUtil.values(a)
  6930. }else{
  6931. return t
  6932. }}}
  6933. for(var e=0;
  6934. e<a.length;
  6935. e++){
  6936. if(a[e].getNonDeletedCount()>0){
  6937. t.push(a[e])
  6938. }}
  6939. return t
  6940. };
  6941. net_comcast_sms.MessageStore.prototype.getThreadCount=function(){
  6942. return AjxUtil.keys(this.threads).length
  6943. };
  6944. net_comcast_sms.MessageStore.prototype.getOldestThread=function(){
  6945. var a,o;
  6946. for(var t in this.threads){
  6947. var e=this.threads[t],n=e.getNewest().time;
  6948. if(!o||n<o){
  6949. a=e;
  6950. o=n
  6951. }}
  6952. return a
  6953. };
  6954. net_comcast_sms.MessageStore.prototype.getNewestThread=function(){
  6955. var a,o;
  6956. for(var t in this.threads){
  6957. var e=this.threads[t],n=e.getNewest().time;
  6958. if(!o||n>o){
  6959. a=e;
  6960. o=n
  6961. }}
  6962. return a
  6963. };
  6964. net_comcast_sms.MessageStore.prototype.hasMoreThreads=function(){
  6965. return this._hasMoreThreads
  6966. };
  6967. net_comcast_sms.MessageStore.prototype.getMessage=function(a,o,s){
  6968. var n=this.getById(a);
  6969. if(n){
  6970. caboUtil.run(s,n)
  6971. }else{
  6972. if(this.isLoggedIn()){
  6973. var t=this.getUrl(this.getUAdomain(),"ua","msg",o,a,this.getUATN()),e=new AjxCallback(this,this._handleGetMessage,[a,s]);
  6974. this.rest(t,e,null,true)
  6975. }else{
  6976. this.loginError("getMessage")
  6977. }}};
  6978. net_comcast_sms.MessageStore.prototype._handleGetMessage=function(e,o,a){
  6979. var t=this.parseStatus(a);
  6980. if(t===true){
  6981. t=new net_comcast_sms.Message(this.useraccount,null,a.messages[0]);
  6982. t.thread=this.getThread(t);
  6983. this.putCache(t)
  6984. }
  6985. caboUtil.run(o,t)
  6986. };
  6987. net_comcast_sms.MessageStore.prototype.getMessageCounts=function(a){
  6988. if(this.isLoggedIn()){
  6989. var t=this.getUrl(this.getUAdomain(),"ua","msg","sms","msgcounts",this.getUATN()),e=new AjxCallback(this,this._handleGetMessageCounts,[a]);
  6990. this.rest(t,e,null,true)
  6991. }else{
  6992. this.loginError("getMessageCounts")
  6993. }};
  6994. net_comcast_sms.MessageStore.prototype._handleGetMessageCounts=function(o,t){
  6995. var e=this.parseStatus(t);
  6996. if(e===true){
  6997. var a=["smsnew","smsunread","smstotal","smsmax","smsquota","smsquotamax","family","group","vmail"];
  6998. e=this._copyParams(t,{}
  6999. ,null,a)
  7000. }
  7001. caboUtil.run(o,e)
  7002. };
  7003. net_comcast_sms.MessageStore.prototype.getMessagesSince=function(a,o){
  7004. if(this.isLoggedIn()){
  7005. var t=this.getUrl(this.getUAdomain(),"ua","msg","sms","all","statuschange",a,this.getUATN()),e=new AjxCallback(this,this._handleGetMessagesSince,[o]);
  7006. this.rest(t,e,null,true)
  7007. }else{
  7008. this.loginError("getMessageCounts")
  7009. }};
  7010. net_comcast_sms.MessageStore.prototype._handleGetMessagesSince=function(n,a){
  7011. var t=this.parseStatus(a);
  7012. if(t===true){
  7013. for(var e=0;
  7014. e<a.messages.length;
  7015. e++){
  7016. var o=new net_comcast_sms.Message(this.useraccount,null,a.messages[e]);
  7017. this.getThread(o).update(o,true);
  7018. this.putCache(o)
  7019. }}
  7020. caboUtil.run(n,t)
  7021. };
  7022. net_comcast_sms.MessageStore.prototype.remove=function(o,h){
  7023. if(this.isLoggedIn()){
  7024. var c=net_comcast_sms.Message.TYPE_SMS,t=net_comcast_sms.Message.TYPE_GROUP,r=net_comcast_sms.Message.TYPE_VMAIL,e=this.getById(o),n=net_comcast_sms.MessageStore.sortByType(e),a={}
  7025. ,l=new AjxCallback(this,this._handleRemove,[o,h]);
  7026. a[c]=!!n[c];
  7027. a[t]=!!n[t];
  7028. a[r]=!!n[r];
  7029. if(a[c]){
  7030. this.removeByType(c,net_comcast_sms.MessageStore.getMid(n[c]),new AjxCallback(this,this._handleRemoveOne,[c,a,n[c],l]))
  7031. }
  7032. if(a[t]){
  7033. this.removeByType(t,net_comcast_sms.MessageStore.getMid(n[t]),new AjxCallback(this,this._handleRemoveOne,[t,a,n[t],l]))
  7034. }
  7035. if(a[r]){
  7036. this.removeByType(r,net_comcast_sms.MessageStore.getMid(n[r]),new AjxCallback(this,this._handleRemoveOne,[r,a,n[r],l]))
  7037. }}else{
  7038. this.loginError("remove")
  7039. }};
  7040. net_comcast_sms.MessageStore.prototype._handleRemoveOne=function(a,t,o,r,n){
  7041. t[a]=false;
  7042. var s=true;
  7043. for(var e in t){
  7044. if(t[e]){
  7045. s=false;
  7046. break
  7047. }}
  7048. if(s){
  7049. caboUtil.run(r,true)
  7050. }};
  7051. net_comcast_sms.MessageStore.prototype._handleRemove=function(t,a,e){
  7052. caboUtil.run(a,e)
  7053. };
  7054. net_comcast_sms.MessageStore.prototype.removeByType=function(o,r,h){
  7055. if(this.isLoggedIn()){
  7056. var n=this._copyParams(this.getByType(o),{}
  7057. ,null,r),t=AjxUtil.map(AjxUtil.values(n),function(l){
  7058. return l.mid
  7059. }
  7060. );
  7061. if(t.length){
  7062. var a=this.getUrl(this.getUAdomain(),"ua","msg",o,"delete",this.getUATN()),s={
  7063. mids:t}
  7064. ,e=new AjxCallback(this,this._handleRemoveByType,[n,h]);
  7065. this.rest(a,e,s)
  7066. }else{
  7067. if(h instanceof AjxCallback){
  7068. caboUtil.run(h,true)
  7069. }}}else{
  7070. this.loginError("remove")
  7071. }};
  7072. net_comcast_sms.MessageStore.prototype._handleRemoveByType=function(a,n,o){
  7073. var t=this.parseStatus(o);
  7074. if(t===true||t.code=="0030003"){
  7075. for(var e in a){
  7076. a[e].localSetStatus("D")
  7077. }}
  7078. caboUtil.run(n,t)
  7079. };
  7080. net_comcast_sms.MessageStore.prototype.sendMessage=function(t,e,s){
  7081. if(this.isLoggedIn()){
  7082. t=AjxUtil.toArray(t);
  7083. if(t&&t.length){
  7084. t=AjxUtil.map(t,function(r){
  7085. return net_comcast_sms.Util.TN.normalize(r,true)
  7086. }
  7087. );
  7088. t=AjxUtil.uniq(t);
  7089. var o=this.getUrl(this.getUAdomain(),"ua","msg","sms","send",this.getUATN()),n={
  7090. desttnarray:t,body:e}
  7091. ,a=new AjxCallback(this,this._handleSendMessage,[n,s]);
  7092. this.rest(o,a,n)
  7093. }else{
  7094. caboUtil.run(s,false)
  7095. }}else{
  7096. this.loginError("sendMessage")
  7097. }};
  7098. net_comcast_sms.MessageStore.prototype._handleSendMessage=function(t,l,s){
  7099. var e=this.parseStatus(s);
  7100. if(e===true){
  7101. var n=[];
  7102. for(var r=0,a=s.message.length;
  7103. r<a;
  7104. r++){
  7105. var o=s.message[r];
  7106. o.body=t.body;
  7107. var c=this._createMessage(o);
  7108. n.push(c)
  7109. }
  7110. e=n
  7111. }
  7112. var h=this.useraccount.getHandler().getController();
  7113. h._handleTestQuota(true,true,null,s);
  7114. caboUtil.run(l,e)
  7115. };
  7116. net_comcast_sms.MessageStore.prototype.handleNotification=function(e){
  7117. if(e&&e.id=="comcast_SMS"){
  7118. var t=e.sms.id;
  7119. this.getMessage(t,"sms",function(a){
  7120. if(a instanceof net_comcast_sms.Message){
  7121. a.thread.update(a,true)
  7122. }}
  7123. )
  7124. }};
  7125. net_comcast_sms.Thread=function(t,e,a){
  7126. if(!arguments.length){
  7127. return
  7128. }
  7129. net_comcast_sms.Model.call(this);
  7130. this.useraccount=t;
  7131. this.store=e;
  7132. this._byIndex=new AjxVector();
  7133. this._byId={};
  7134. this._resetStatusCount();
  7135. this._hasMore=true;
  7136. this._nonloadedNewMsgs=0;
  7137. this._refreshListeners=[];
  7138. if(a&&!this.addSingle(a)){
  7139. throw net_comcast_sms.ModelError.incorrectParameter("headerMsg","net_comcast_sms.Message or raw hash",this.toString())
  7140. }};
  7141. net_comcast_sms.Thread.prototype=new net_comcast_sms.Model;
  7142. net_comcast_sms.Thread.prototype.constructor=net_comcast_sms.Thread;
  7143. net_comcast_sms.Thread.prototype.toString=function(){
  7144. return"net_comcast_sms.Thread"
  7145. };
  7146. net_comcast_sms.Thread.PINNED="pinned";
  7147. net_comcast_sms.Thread.DEFAULT_COUNT=20;
  7148. net_comcast_sms.Thread.prototype.getUAdomain=function(){
  7149. return this.useraccount.getUAdomain()
  7150. };
  7151. net_comcast_sms.Thread.prototype.getUATN=function(){
  7152. return this.useraccount.getUATN()
  7153. };
  7154. net_comcast_sms.Thread.prototype.isLoggedIn=function(){
  7155. return this.useraccount.isLoggedIn()
  7156. };
  7157. net_comcast_sms.Thread.prototype.getMessageStore=function(){
  7158. return this.useraccount.getMessageStore()
  7159. };
  7160. net_comcast_sms.Thread.prototype.getHandler=function(){
  7161. return this.useraccount.getHandler()
  7162. };
  7163. net_comcast_sms.Thread.prototype.getSessionId=function(){
  7164. return this.useraccount.getSessionId()
  7165. };
  7166. net_comcast_sms.Thread.prototype.isPinned=function(){
  7167. return this.pinned
  7168. };
  7169. net_comcast_sms.Thread.prototype.togglePinned=function(){
  7170. this.pinned=!this.pinned;
  7171. return this.pinned
  7172. };
  7173. net_comcast_sms.Thread.prototype.isHouseholdThread=function(){
  7174. return false
  7175. };
  7176. net_comcast_sms.Thread.prototype.getContact=function(e){
  7177. if(!this._contact){
  7178. this._contact=new net_comcast_sms.Contact(this.getTN())
  7179. }
  7180. this._contact.getDetails(e);
  7181. return this._contact
  7182. };
  7183. net_comcast_sms.Thread.prototype.refresh=function(t){
  7184. var e=net_comcast_sms.Thread.DEFAULT_COUNT;
  7185. this._refreshListeners.push(t);
  7186. if(!this._loading){
  7187. this._load(new AjxCallback(this,this._handleRefresh),e,null,true,e)
  7188. }};
  7189. net_comcast_sms.Thread.prototype._handleRefresh=function(t){
  7190. this.setNonloadedNewMsgs(0);
  7191. var e=[].concat(this._refreshListeners);
  7192. this._refreshListeners.length=0;
  7193. caboUtil.run(e,t)
  7194. };
  7195. net_comcast_sms.Thread.prototype.more=function(t,e){
  7196. e=e||this.getNextLoadSize();
  7197. this._load(t,e,this.getOldest().time,true,this.size()+e)
  7198. };
  7199. net_comcast_sms.Thread.prototype._load=function(r,o,s,n,a){
  7200. if(this.isLoggedIn()){
  7201. this._loading=true;
  7202. o=o||net_comcast_sms.Thread.DEFAULT_COUNT;
  7203. s=s||(net_comcast_sms.Model.USE_STATIC_DATA?0:new Date().getTime());
  7204. var t=this.getUrl(this.getUAdomain(),"ua","msg","sms","thread",this.getUSTN(),o,s,this.getUATN()),e=new AjxCallback(this,this._handleLoad,[r,n,a]);
  7205. this.rest(t,e,null,true)
  7206. }else{
  7207. this.loginError("_load")
  7208. }};
  7209. net_comcast_sms.Thread.prototype._handleLoad=function(n,a,e,o){
  7210. var t=this.parseStatus(o);
  7211. if(t===true||t.code=="0030006"){
  7212. if(o.messages){
  7213. this.update(o.messages,a)
  7214. }
  7215. t=this;
  7216. this._loaded=true;
  7217. this._loading=false;
  7218. if(e&&(this.size()<e)){
  7219. this._hasMore=false
  7220. }}
  7221. caboUtil.run(n,t)
  7222. };
  7223. net_comcast_sms.Thread.prototype.hasMore=function(){
  7224. return this._hasMore
  7225. };
  7226. net_comcast_sms.Thread.prototype.update=function(h,t){
  7227. var r=false,s=AjxUtil.toArray(this._getMessage(h));
  7228. for(var l=0,o=s.length;
  7229. l<o;
  7230. l++){
  7231. r=this.addSingle(s[l],true)||r
  7232. }
  7233. if(!t){
  7234. var e=[];
  7235. for(var l=0,o=this.size();
  7236. l<o;
  7237. l++){
  7238. var u=false,a=this.getByIndex(l),d=a.mid;
  7239. for(var n=0,c=s.length;
  7240. n<c;
  7241. n++){
  7242. if(s[n].mid==d){
  7243. u=true;
  7244. break
  7245. }}
  7246. if(!u){
  7247. e.push(a)
  7248. }}
  7249. for(var l=0,o=e.length;
  7250. l<o;
  7251. l++){
  7252. r=this.removeSingle(e[l],true)||r
  7253. }}
  7254. if(r){
  7255. if(this.size()>1){
  7256. this._byIndex.sort(net_comcast_sms.Message.dateComparator)
  7257. }
  7258. this.onChangeMessageCount()
  7259. }
  7260. return r
  7261. };
  7262. net_comcast_sms.Thread.prototype._getMessage=function(a){
  7263. if(AjxUtil.isArray(a)){
  7264. var t=[];
  7265. for(var e=0;
  7266. e<a.length;
  7267. e++){
  7268. var o=this._getMessage(a[e]);
  7269. if(o instanceof net_comcast_sms.Message){
  7270. t.push(o)
  7271. }}
  7272. return t
  7273. }else{
  7274. if(a instanceof net_comcast_sms.Message){
  7275. a.thread=this;
  7276. return a
  7277. }else{
  7278. if(AjxUtil.isObject(a)&&net_comcast_sms.Message.acceptedType(a.type)){
  7279. return new net_comcast_sms.Message(this.useraccount,this,a)
  7280. }}}};
  7281. net_comcast_sms.Thread.prototype.addSingle=function(t,e){
  7282. var a=this._getMessage(t);
  7283. if(a&&!this.getById(a.mid)){
  7284. if(net_comcast_sms.Message.acceptedStatus(a.status)){
  7285. this._statusCount[a.status]++
  7286. }
  7287. this._byIndex.add(a);
  7288. this._byId[a.mid]=a;
  7289. this.store.putCache(a);
  7290. if(!e){
  7291. this.callListeners("messages",a)
  7292. }
  7293. return true
  7294. }else{
  7295. return false
  7296. }};
  7297. net_comcast_sms.Thread.prototype.removeSingle=function(t,e){
  7298. if(t instanceof net_comcast_sms.Message){
  7299. this._byIndex.remove(t);
  7300. delete this._byId[t.mid];
  7301. this.store.delCache(t);
  7302. if(!e){
  7303. this.callListeners("messages",t)
  7304. }
  7305. return true
  7306. }};
  7307. net_comcast_sms.Thread.prototype.deleteThread=function(n){
  7308. if(this.isLoggedIn()){
  7309. var e=net_comcast_sms.Util.TN.normalize(this.getTN());
  7310. var a=this.getUrl(this.getUAdomain(),"ua","msg","sms","thread","delete",e,this.getUATN());
  7311. var o={
  7312. tn:e};
  7313. var t=new AjxCallback(this,this._handleDeleteThread,[n]);
  7314. this.rest(a,t,o,false)
  7315. }else{
  7316. this.loginError("setStatus")
  7317. }};
  7318. net_comcast_sms.Thread.prototype._handleDeleteThread=function(s,e){
  7319. var o=this.parseStatus(e);
  7320. if(o===true){
  7321. for(var a=0,t=this.size();
  7322. a<t;
  7323. a++){
  7324. var n=this.getByIndex(a);
  7325. if(n.status!=net_comcast_sms.Message.STATUS_LOCKED){
  7326. n.localSetStatus(net_comcast_sms.Message.STATUS_DELETED)
  7327. }}}
  7328. caboUtil.run(s)
  7329. };
  7330. net_comcast_sms.Thread.prototype.getTN=function(){
  7331. var e=this.getNewest();
  7332. return e&&e.tn
  7333. };
  7334. net_comcast_sms.Thread.prototype.getUSTN=function(){
  7335. var e=this.getTN();
  7336. return e&&net_comcast_sms.Util.TN.normalize(e)
  7337. };
  7338. net_comcast_sms.Thread.prototype.getById=function(e){
  7339. return this._byId[e]||null
  7340. };
  7341. net_comcast_sms.Thread.prototype.getNewest=function(){
  7342. return this._byIndex.getLast()
  7343. };
  7344. net_comcast_sms.Thread.prototype.getNewestNonDeleted=function(){
  7345. for(var e=this._byIndex.size()-1;
  7346. e>-1;
  7347. e--){
  7348. var t=this._byIndex.get(e);
  7349. if(t.status!=net_comcast_sms.Message.STATUS_DELETED){
  7350. return t
  7351. }}
  7352. return null
  7353. };
  7354. net_comcast_sms.Thread.prototype.getOldest=function(){
  7355. return this._byIndex.get(0)||null
  7356. };
  7357. net_comcast_sms.Thread.prototype.getMessages=function(){
  7358. return this._byIndex
  7359. };
  7360. net_comcast_sms.Thread.prototype.getByIndex=function(e,t){
  7361. if(!t){
  7362. return this._byIndex.get(e)
  7363. }else{
  7364. if(t>0){
  7365. return this._byIndex.slice(e,t)
  7366. }else{
  7367. return this._byIndex.slice(e)
  7368. }}};
  7369. net_comcast_sms.Thread.prototype.size=function(){
  7370. return this._byIndex.size()
  7371. };
  7372. net_comcast_sms.Thread.prototype.getNextLoadSize=function(){
  7373. var e=this.size();
  7374. return(e<=40)?20:Math.ceil(e*0.5)
  7375. };
  7376. net_comcast_sms.Thread.prototype.isLoaded=function(){
  7377. return !!this._loaded
  7378. };
  7379. net_comcast_sms.Thread.prototype.isLoading=function(){
  7380. return !!this._loading
  7381. };
  7382. net_comcast_sms.Thread.prototype.setNonloadedNewMsgs=function(e){
  7383. this._nonloadedNewMsgs=e;
  7384. this.callListeners("newmessages")
  7385. };
  7386. net_comcast_sms.Thread.prototype.getNonloadedNewMsgs=function(){
  7387. return this._nonloadedNewMsgs
  7388. };
  7389. net_comcast_sms.Thread.prototype.getStatusCount=function(e){
  7390. if(this._statusCount[e]!==null){
  7391. return this._statusCount[e]
  7392. }
  7393. this._statusCount={
  7394. N:0,U:0,R:0,L:0,D:0};
  7395. for(var a=0,t=this.size();
  7396. a<t;
  7397. a++){
  7398. var o=this.getByIndex(a).status;
  7399. if(net_comcast_sms.Message.acceptedStatus(o)){
  7400. this._statusCount[o]++
  7401. }}
  7402. return this._statusCount[e]
  7403. };
  7404. net_comcast_sms.Thread.prototype._resetStatusCount=function(){
  7405. this._statusCount={
  7406. N:null,U:null,R:null,L:null,D:null}
  7407. };
  7408. net_comcast_sms.Thread.prototype.onChangeMessageStatus=function(o,e,a){
  7409. if(this.getById(o.mid)===o&&e!=a){
  7410. var t=AjxUtil.hashCopy(this._statusCount);
  7411. if(this._statusCount[e]){
  7412. this._statusCount[e]--
  7413. }
  7414. if(this._statusCount[a]!==null){
  7415. this._statusCount[a]++
  7416. }
  7417. this.callListeners("status")
  7418. }};
  7419. net_comcast_sms.Thread.prototype.onChangeMessageCount=function(){
  7420. var e=AjxUtil.hashCopy(this._statusCount);
  7421. this._resetStatusCount();
  7422. this.getStatusCount("N");
  7423. if(!AjxUtil.hashCompare(e,this._statusCount)){
  7424. this.callListeners("status")
  7425. }
  7426. this.callListeners("messages")
  7427. };
  7428. net_comcast_sms.Thread.prototype.onChangeMessageEditStatus=function(e){
  7429. this.callListeners("editstatus")
  7430. };
  7431. net_comcast_sms.Thread.prototype.onChangeMessageForwardStatus=function(e){
  7432. this.callListeners("forwardstatus")
  7433. };
  7434. net_comcast_sms.Thread.prototype.getNewMessageCount=function(){
  7435. return this.getStatusCount(net_comcast_sms.Message.STATUS_NEW)
  7436. };
  7437. net_comcast_sms.Thread.prototype.getUnreadMessageCount=function(){
  7438. return this.getStatusCount(net_comcast_sms.Message.STATUS_UNREAD)+this.getNewMessageCount()
  7439. };
  7440. net_comcast_sms.Thread.prototype.getDeletedCount=function(){
  7441. return this.getStatusCount(net_comcast_sms.Message.STATUS_DELETED)
  7442. };
  7443. net_comcast_sms.Thread.prototype.getNonDeletedCount=function(){
  7444. return this.size()-this.getDeletedCount()
  7445. };
  7446. net_comcast_sms.Thread.prototype.getID=function(){
  7447. return this.getTN()
  7448. };
  7449. net_comcast_sms.Thread.prototype.setStatus=function(e,n){
  7450. if(this.isLoggedIn()){
  7451. var a=this.getUrl(this.getUAdomain(),"ua","msg","sms","thread","status",this.getUATN());
  7452. var o={
  7453. tn:this.getTN(),status:e};
  7454. var t=new AjxCallback(this,this._handleSetStatus,[e,n]);
  7455. this.rest(a,t,o,true)
  7456. }else{
  7457. this.loginError("setStatus")
  7458. }};
  7459. net_comcast_sms.Thread.prototype._handleSetStatus=function(e,r,n){
  7460. var o=this.parseStatus(n);
  7461. if(o===true){
  7462. for(var a=0,t=this.size();
  7463. a<t;
  7464. a++){
  7465. var s=this.getByIndex(a);
  7466. this.onChangeMessageStatus(s,s.status,e);
  7467. s.status=e
  7468. }}
  7469. caboUtil.run(r,o)
  7470. };
  7471. net_comcast_sms.Thread.dateComparator=function(t,e){
  7472. return net_comcast_sms.Message.dateComparator(t.getNewest(),e.getNewest())
  7473. };
  7474. net_comcast_sms.Thread.unreadComparator=function(t,e){
  7475. return net_comcast_sms.Util.plainComparator(t.getUnreadMessageCount()+t.getNewMessageCount(),e.getUnreadMessageCount()+e.getNewMessageCount())
  7476. };
  7477. net_comcast_sms.Thread.statusComparator=function(t,e){
  7478. return net_comcast_sms.Util.plainComparator(t.getNewest().getStatusIndex(),e.getNewest().getStatusIndex())||net_comcast_sms.Thread.unreadComparator(t,e)||net_comcast_sms.Thread.dateComparator(t,e)
  7479. };
  7480. AjxDispatcher.addPackageLoadFunction("ContactsCore",new AjxCallback(this,function(){
  7481. net_comcast_sms.Autocomplete=function(e){
  7482. if(!arguments.length){
  7483. return
  7484. }
  7485. this._aa=Dwt.getNextId();
  7486. ZmAutocomplete.call(this,e);
  7487. this.enabled=e.enabled||{
  7488. name:true,phone:true,email:false};
  7489. this._searchFields=[].concat(this.enabled.name?net_comcast_sms.Autocomplete.NAME_FIELDS:[],this.enabled.phone?net_comcast_sms.Autocomplete.PHONE_FIELDS:[],this.enabled.email?net_comcast_sms.Autocomplete.EMAIL_FIELDS:[]);
  7490. this._outTextFunc=e.outTextFunc
  7491. };
  7492. net_comcast_sms.Autocomplete.prototype=new ZmAutocomplete;
  7493. net_comcast_sms.Autocomplete.prototype.constructor=net_comcast_sms.Autocomplete;
  7494. net_comcast_sms.Autocomplete.prototype.toString=function(){
  7495. return"net_comcast_sms.Autocomplete"
  7496. };
  7497. net_comcast_sms.Autocomplete.PHONE_FIELDS=[ZmContact.F_mobilePhone].concat(AjxUtil.complement([ZmContact.F_mobilePhone],ZmContact.PHONE_FIELDS));
  7498. net_comcast_sms.Autocomplete.EMAIL_FIELDS=ZmContact.EMAIL_FIELDS;
  7499. net_comcast_sms.Autocomplete.NAME_FIELDS=[ZmContact.F_firstName,ZmContact.F_middleName,ZmContact.F_lastName];
  7500. net_comcast_sms.Autocomplete.DATA_FIELDS=net_comcast_sms.Autocomplete.PHONE_FIELDS;
  7501. net_comcast_sms.Autocomplete.SEARCH_FIELDS=net_comcast_sms.Autocomplete.NAME_FIELDS.concat(net_comcast_sms.Autocomplete.DATA_FIELDS);
  7502. net_comcast_sms.Autocomplete.counter=0;
  7503. net_comcast_sms.Autocomplete.prototype._doSearch=net_comcast_sms.Autocomplete.prototype._doAutocomplete=function(l,r,m,t,d,h){
  7504. l=l.replace(/[()]/,"");
  7505. var o=l.split(/\s+/);
  7506. var a=[];
  7507. for(var s=0,e=o.length;
  7508. s<e;
  7509. s++){
  7510. var c="("+AjxUtil.map(this._searchFields,function(f){
  7511. return"FIELD["+f+"]:*"+o[s]+"*"
  7512. }
  7513. ).join(" || ")+")";
  7514. a.push(c)
  7515. }
  7516. var n=a.join(" && ");
  7517. var u=new ZmSearch({
  7518. query:n,types:AjxVector.fromArray([ZmItem.CONTACT]),accountName:h&&h.name,expandDL:appCtxt.get(ZmSetting.GAL_AUTOCOMPLETE),sortBy:ZmSearch.SCORE_DESC,attrs:[ZmContact.F_fileAs].concat(ZmContact.PHONE_FIELDS)}
  7519. );
  7520. this._currentStr=l;
  7521. this._current=net_comcast_sms.Autocomplete.counter++;
  7522. u.execute({
  7523. callback:new AjxCallback(this,this._handleResponseDoAutocomplete,[l,r,m,t,d,h,this._current]),timeout:ZmAutocomplete.AC_TIMEOUT}
  7524. )
  7525. };
  7526. net_comcast_sms.Autocomplete.prototype._handleResponseDoAutocomplete=function(b,c,t,n,a,e,h,l){
  7527. if(h==this._current){
  7528. if(c){
  7529. c.setWaiting(false)
  7530. }
  7531. var W,g=false,w=(f&&f.search&&f.search.isGalAutocompleteSearch);
  7532. var f=l.getResponse();
  7533. var r=f.getResults(ZmItem.CONTACT);
  7534. W=(r&&r.getArray())||[];
  7535. g=true;
  7536. if(!window.ZmResource){
  7537. window.ZmResource={
  7538. F_type:"zimbraCalResType"}
  7539. }
  7540. var T=[];
  7541. for(var q=0;
  7542. q<W.length;
  7543. q++){
  7544. var s=new ZmAutocompleteMatch(W[q],t,g||W[q] instanceof ZmContact,b);
  7545. if(s.acType==n){
  7546. if(s.type==ZmAutocomplete.AC_TYPE_GAL){
  7547. w=true
  7548. }
  7549. var x=s.item;
  7550. var p={};
  7551. var u=net_comcast_sms.Autocomplete.DATA_FIELDS;
  7552. for(var k=0,v=u.length;
  7553. k<v;
  7554. k++){
  7555. var y=x.getAttr(u[k]);
  7556. if(y||y===0){
  7557. p[u[k]]=y
  7558. }}
  7559. var O=net_comcast_sms.Autocomplete._contactHasValueInField(x,net_comcast_sms.Autocomplete.NAME_FIELDS,b);
  7560. var z=O||net_comcast_sms.Autocomplete._contactHasValueInField(x,net_comcast_sms.Autocomplete.PHONE_FIELDS,b);
  7561. for(var A in p){
  7562. var y=p[A];
  7563. if(O||(z&&AjxUtil.indexOf(ZmContact.PHONE_FIELDS,A)!=-1&&y.indexOf(b)!=-1)){
  7564. var o=AjxUtil.createProxy(s);
  7565. o.text=this._outTextFunc(A,s);
  7566. o.field=A;
  7567. o.value=y;
  7568. o.matches=net_comcast_sms.Autocomplete.Match_matches;
  7569. T.push(o)
  7570. }}}}
  7571. var d=!(f&&f.getAttribute("more"));
  7572. var m=this;
  7573. setTimeout(function(){
  7574. caboUtil.run(a,T);
  7575. m._cacheResults(b,n,T,w,d&&f._respEl.canBeCached,null,e)
  7576. }
  7577. ,0)
  7578. }};
  7579. net_comcast_sms.Autocomplete._contactHasValueInField=function(r,o,l){
  7580. var s=l.toLowerCase().split(/\s+/);
  7581. var e=AjxUtil.collapseList(AjxUtil.map(o,function(d){
  7582. var u=r.getAttr(d);
  7583. return u&&u.toLowerCase()
  7584. }
  7585. ));
  7586. for(var a=0,h=s.length;
  7587. a<h;
  7588. a++){
  7589. var c=false;
  7590. for(var t=0,n=e.length;
  7591. t<n;
  7592. t++){
  7593. if(e[t].indexOf(s[a])!=-1){
  7594. c=true;
  7595. break
  7596. }}
  7597. if(!c){
  7598. return false
  7599. }}
  7600. return true
  7601. };
  7602. net_comcast_sms.Autocomplete.Match_matches=function(s){
  7603. s=s.toLowerCase();
  7604. if(this.name&&!this._nameParsed){
  7605. var n=this.name.split(/\s+/,3);
  7606. var a=n[0];
  7607. this._lastName=n[n.length-1];
  7608. this._firstLast=[a,this._lastName].join(" ");
  7609. this._nameParsed=true
  7610. }
  7611. var e=[this.value,this.name,this._lastName,this._firstLast];
  7612. for(var t=0;
  7613. t<e.length;
  7614. t++){
  7615. var o=e[t];
  7616. var o=o&&o.toLowerCase();
  7617. if(o&&(o.indexOf(s)==0)){
  7618. return true
  7619. }}
  7620. return false
  7621. };
  7622. net_comcast_sms.Autocomplete.prototype.quickComplete=function(e){
  7623. return null
  7624. }
  7625. }
  7626. ));
  7627. net_comcast_sms.NotificationClient=function(){
  7628. this._url="http://195.41.32.235:8080/test/GetNotifications.php";
  7629. this._pollCallback=new AjxCallback(this,this._handlePoll);
  7630. this._running=false
  7631. };
  7632. net_comcast_sms.NotificationClient.prototype=new net_comcast_sms.Model;
  7633. net_comcast_sms.NotificationClient.prototype.constructor=net_comcast_sms.NotificationClient;
  7634. net_comcast_sms.NotificationClient.prototype.TIMEOUT=300000;
  7635. net_comcast_sms.NotificationClient.prototype.WHITESPACE_RE=/^\s+$/;
  7636. net_comcast_sms.NotificationClient.prototype.toString=function(){
  7637. return"net_comcast_sms.NotificationClient"
  7638. };
  7639. net_comcast_sms.NotificationClient.prototype.start=function(){
  7640. if(!this._running){
  7641. this._running=true;
  7642. this._poll()
  7643. }};
  7644. net_comcast_sms.NotificationClient.prototype.stop=function(){
  7645. this._running=false
  7646. };
  7647. net_comcast_sms.NotificationClient.prototype._createSession=function(){};
  7648. net_comcast_sms.NotificationClient.prototype._handleCreateSession=function(e){};
  7649. net_comcast_sms.NotificationClient.prototype._destroySession=function(){};
  7650. net_comcast_sms.NotificationClient.prototype._handleDestroySession=function(e){};
  7651. net_comcast_sms.NotificationClient.prototype._poll=function(){};
  7652. net_comcast_sms.NotificationClient.prototype._handlePoll=function(e){
  7653. if(this._running){
  7654. if(e.status==504){
  7655. this._poll()
  7656. }else{
  7657. if(e.success){
  7658. this._poll();
  7659. var t=AjxXmlDoc.createFromXml(e.text);
  7660. if(t.getDoc().documentElement.nodeName=="parsererror"){}else{
  7661. var n=t.toJSObject(true,false,true);
  7662. var o=AjxUtil.toArray(n.tuple);
  7663. for(var a=0;
  7664. a<o.length;
  7665. a++){
  7666. this._handleTuple(this._parse(o[a]))
  7667. }}}}}};
  7668. net_comcast_sms.NotificationClient.prototype._parse=function(o){
  7669. var a={};
  7670. for(var e in o){
  7671. if(o.hasOwnProperty(e)){
  7672. var t=o[e];
  7673. if(AjxUtil.isFunction(t)){}else{
  7674. if(e=="__msh_content"){
  7675. if(!this.WHITESPACE_RE.test(t)){
  7676. a.value=AjxStringUtil.trim(t)
  7677. }}else{
  7678. if(AjxUtil.isObject(t)){
  7679. a[e]=this._parse(t)
  7680. }else{
  7681. a[e]=t
  7682. }}}}}
  7683. return a
  7684. };
  7685. net_comcast_sms.NotificationClient.prototype._handleRest=function(t,e){
  7686. if(e&&e.success||e.status==504){
  7687. caboUtil.run(t,e)
  7688. }else{
  7689. net_comcast_sms.Model.prototype._handleRest.call(this,t,e)
  7690. }};
  7691. net_comcast_sms.NotificationClient.prototype._handleTuple=function(e){
  7692. this.callListeners("notification",e)
  7693. };
  7694. net_comcast_sms.Provisioning={
  7695. _loadListeners:[],_loaded:false,_loading:false};
  7696. net_comcast_sms.Provisioning.STATENAME="subscribeState";
  7697. net_comcast_sms.Provisioning.STATE_UNKNOWN="";
  7698. net_comcast_sms.Provisioning.STATE_WAITING_REC_CONTRACT="1";
  7699. net_comcast_sms.Provisioning.STATE_WAITING_ORDERADD="2";
  7700. net_comcast_sms.Provisioning.STATE_WAITING_POLL="3";
  7701. net_comcast_sms.Provisioning.STATE_SUBSCRIBED="4";
  7702. net_comcast_sms.Provisioning.STATE_WAITING_UNSUBSCRIBE="5";
  7703. net_comcast_sms.Provisioning.STATE_UNSUBSCRIBED="6";
  7704. net_comcast_sms.Provisioning.VOICE_LIMITED="voice-limited";
  7705. net_comcast_sms.Provisioning.ACTIVATED="A";
  7706. net_comcast_sms.Provisioning.setState=function(t,e,o){
  7707. var a=e||{};
  7708. a[this.STATENAME]=t;
  7709. net_comcast_sms.Util.setProperties(a,o)
  7710. };
  7711. net_comcast_sms.Provisioning.getState=function(e){
  7712. caboUtil.run(e,net_comcast_sms.Util.getProperty(this.STATENAME))
  7713. };
  7714. net_comcast_sms.Provisioning.load=function(o,t){
  7715. this._loadListeners.push(o);
  7716. var a;
  7717. if((this._loaded||this.error)&&!t){
  7718. this._handleLoad()
  7719. }else{
  7720. if(!this._loading||t){
  7721. var e=appCtxt.accountList.mainAccount;
  7722. if(this.isEntitled()){
  7723. if(net_comcast_sms.Model.USE_STATIC){
  7724. var a=net_comcast_sms.voiceapp
  7725. }else{
  7726. var a=appCtxt.getApp("Voice")
  7727. }
  7728. this._loading=true;
  7729. a.getVoiceInfo(new AjxCallback(this,function(){
  7730. this._tn=this._availTNs=null;
  7731. this._loading=false;
  7732. this._phones={};
  7733. this._isSNSEnabled=false;
  7734. var s=[],h=this._availTNs=[],l=appCtxt.getActiveAccount()&&appCtxt.getActiveAccount().name&&appCtxt.getActiveAccount().name.split("@")[0].toLowerCase(),r=a.phones.length;
  7735. for(var c=0;
  7736. c<r;
  7737. c++){
  7738. var u=a.phones[c],n=u.id,d=u.hasTextMessaging?s:h;
  7739. this._phones[u.id]=u;
  7740. d.push(n);
  7741. if(u.textmsg_users&&u.textmsg_users.toLowerCase()==l){
  7742. this._tn=n
  7743. }
  7744. if(u.sns){
  7745. this._isSNSEnabled=true
  7746. }}
  7747. if(!this._tn){
  7748. for(var n in this._phones){
  7749. var u=this._phones[n];
  7750. if(u.textmsg_users){
  7751. this._tn=n
  7752. }}}
  7753. if(!this._tn){
  7754. for(var n in this._phones){
  7755. var u=this._phones[n];
  7756. if(u.hasTextMessaging){
  7757. this._tn=n
  7758. }}}
  7759. if(this._tn){
  7760. var u=this._phones[this._tn];
  7761. this._isSNSEnabled=u.sns;
  7762. this._assignedUser=u.textmsg_users;
  7763. this._isAssignedUser=this._assignedUser&&this._assignedUser.toLowerCase()==l.toLowerCase()
  7764. }
  7765. var m=a._storeprincipal;
  7766. this._uid=m.accountNumber;
  7767. this._acctNum=m.accountNumber;
  7768. this._name=m.name;
  7769. this._isPrimary=m.is_primary;
  7770. this._accountType=m.accountType;
  7771. this._isCommercial=!!m.accountType;
  7772. this._productDesc=m.productDesc;
  7773. this._isLimited=m.productDesc===this.VOICE_LIMITED;
  7774. this._isNeither=!m.productDesc;
  7775. this._dvs=m.digitalVoiceService;
  7776. this._isActivated=m.digitalVoiceService===this.ACTIVATED;
  7777. this._loaded=true;
  7778. this.getState(new AjxCallback(this,function(f){
  7779. var p=null;
  7780. if(this._tn&&(f==this.STATE_WAITING_ORDERADD||f==this.STATE_WAITING_REC_CONTRACT||f==this.STATE_UNKNOWN||f==this.STATE_WAITING_POLL)){
  7781. p=this.STATE_SUBSCRIBED
  7782. }else{
  7783. if(!this._tn&&(f==this.STATE_WAITING_UNSUBSCRIBE||f==this.STATE_SUBSCRIBED)){
  7784. p=this.STATE_UNSUBSCRIBED
  7785. }}
  7786. if(p!==null){
  7787. this.setState(p,null,new AjxCallback(this,this._handleLoad))
  7788. }else{
  7789. this._handleLoad()
  7790. }}
  7791. ))
  7792. }
  7793. ),new AjxCallback(this,function(n){
  7794. this.error=n||true;
  7795. this._handleLoad();
  7796. return true
  7797. }
  7798. ),true,t)
  7799. }else{
  7800. this._handleLoad()
  7801. }}else{}}};
  7802. net_comcast_sms.Provisioning._handleLoad=function(){
  7803. var e=[].concat(this._loadListeners);
  7804. this._loadListeners.length=0;
  7805. caboUtil.run(e,this.error)
  7806. };
  7807. net_comcast_sms.Provisioning.get=function(t,a,e){
  7808. t=AjxUtil.toArray(t);
  7809. this.load(new AjxCallback(this,function(){
  7810. caboUtil.apply(a,caboUtil.Coll.getValues(this,t))
  7811. }
  7812. ))
  7813. };
  7814. net_comcast_sms.Provisioning.getSubscribed=function(e){
  7815. this.load(new AjxCallback(this,function(){
  7816. var t=this.error?null:!!(this._tn);
  7817. this.getState(new AjxCallback(this,function(a){
  7818. setTimeout(function(){
  7819. caboUtil.run(e,t&&a==net_comcast_sms.Provisioning.STATE_SUBSCRIBED)
  7820. }
  7821. ,0)
  7822. }
  7823. ))
  7824. }
  7825. ))
  7826. };
  7827. net_comcast_sms.Provisioning.isPrimary=function(){
  7828. return this._isPrimary
  7829. };
  7830. net_comcast_sms.Provisioning.isTextMsgEnabled=function(){
  7831. return !!this._tn
  7832. };
  7833. net_comcast_sms.Provisioning.isSNSEnabled=function(){
  7834. return this._isSNSEnabled
  7835. };
  7836. net_comcast_sms.Provisioning.getAccountType=function(){
  7837. return this._accountType
  7838. };
  7839. net_comcast_sms.Provisioning.isCommercial=function(){
  7840. return this._isCommercial
  7841. };
  7842. net_comcast_sms.Provisioning.isLimited=function(){
  7843. return this._isLimited
  7844. };
  7845. net_comcast_sms.Provisioning.isNeitherLimitedOrUnlimited=function(){
  7846. return this._isNeither
  7847. };
  7848. net_comcast_sms.Provisioning.isActivated=function(){
  7849. return this._isActivated
  7850. };
  7851. net_comcast_sms.Provisioning.hasAssignedUser=function(){
  7852. return this._assignedUser
  7853. };
  7854. net_comcast_sms.Provisioning.isAssignedUser=function(){
  7855. return this._isAssignedUser
  7856. };
  7857. net_comcast_sms.Provisioning.isEntitled=function(){
  7858. var e=appCtxt.accountList.mainAccount;
  7859. return net_comcast_sms.Model.USE_STATIC||!!(e.isMain&&appCtxt.get(ZmSetting.VOICE_ENABLED,null,e)&&appCtxt.getApp("Voice")&&net_comcast_sms.Util.getCOSName()!="combo-secondary")
  7860. };
  7861. net_comcast_sms.Provisioning.signup=function(t,e,o,a){
  7862. this.getState(new AjxCallback(this,function(n){
  7863. var s=new AjxCallback(this,this._orderAdd,[e,t,new AjxCallback(this,this._handleSignup,[t,o]),a,60000]);
  7864. if(t&&n!=this.STATE_WAITING_ORDERADD){
  7865. this._recordContract(e,s,a)
  7866. }else{
  7867. caboUtil.run(s)
  7868. }}
  7869. ))
  7870. };
  7871. net_comcast_sms.Provisioning._handleSignup=function(e,t){
  7872. this.setState(e?this.STATE_WAITING_POLL:this.STATE_UNSUBSCRIBED);
  7873. caboUtil.run(t)
  7874. };
  7875. net_comcast_sms.Provisioning.unsubscribe=function(t,e){
  7876. this.signup(false,this._tn,t,e)
  7877. };
  7878. net_comcast_sms.Provisioning._recordContract=function(e,a,t){
  7879. this.getAcctNum(new AjxCallback(this,function(o){
  7880. this.setState(this.STATE_WAITING_REC_CONTRACT,{
  7881. tn:e}
  7882. ,new AjxCallback(this,function(){
  7883. var n=[net_comcast_sms.SmsZimlet.RECORDCONTRACT,"?tn=",e,"&acctNum=",o,"&uid=",this._name].join("");
  7884. AjxRpc.invoke(null,n,null,new AjxCallback(this,this._handleRecordContract,[a,t,e]),true)
  7885. }
  7886. ))
  7887. }
  7888. ))
  7889. };
  7890. net_comcast_sms.Provisioning._handleRecordContract=function(n,a,e,t){
  7891. var o=t.obj||JSON.gparse(t.text);
  7892. if(t.success&&o&&o.recordContractReturn){
  7893. this._tn=e;
  7894. caboUtil.run(n)
  7895. }else{
  7896. caboUtil.run(a,o&&o.__fault_messagetext)
  7897. }};
  7898. net_comcast_sms.Provisioning._orderAdd=function(e,t,n,a,o){
  7899. this.getAcctNum(new AjxCallback(this,function(s){
  7900. this.setState(t?this.STATE_WAITING_ORDERADD:this.STATE_WAITING_UNSUBSCRIBE,null,new AjxCallback(this,function(d){
  7901. var c=!this._isLimited!=!d;
  7902. var l=[net_comcast_sms.SmsZimlet.ORDERADD,"?tn=",e,"&acctNum=",s,"&action=",t?"ADD":"DISCONNECT","&limited=",c?"1":"0"].join("");
  7903. var r=new AjxCallback(this,this._handleOrderAdd,[t,e,n,a]);
  7904. if(!t&&!d){
  7905. var u=arguments.callee;
  7906. var h=new AjxCallback(this,function(m){
  7907. var p=m.obj||JSON.gparse(m.text),f=p&&p.__fault_messagecode;
  7908. if(f=="FAULT"){
  7909. u(true)
  7910. }else{
  7911. caboUtil.run(r,m)
  7912. }}
  7913. )
  7914. }
  7915. AjxRpc.invoke(null,l,null,h||r,true,o)
  7916. }
  7917. ))
  7918. }
  7919. ))
  7920. };
  7921. net_comcast_sms.Provisioning._handleOrderAdd=function(t,h,l,r,o){
  7922. var n=o.obj||JSON.gparse(o.text),e=n&&n.__fault_messagecode;
  7923. if(n&&(o.success&&n.orderAddReturn)||(t&&e=="307")||(!t&&e=="OO-1037")||(!t&&e=="OO-1020")){
  7924. this._tn=t&&h;
  7925. this.setState(t?this.STATE_WAITING_POLL:this.STATE_UNSUBSCRIBED,null,l)
  7926. }else{
  7927. var s,d,c=net_comcast_sms.Util.getZimletHandler();
  7928. switch(e){
  7929. case"10072":case"OO-1019":case"OO-1037":s="provErrorAlready";
  7930. break;
  7931. case undefined:case null:e="No error code";
  7932. default:s="provErrorGeneric";
  7933. break
  7934. }
  7935. d="provErrorTitle";
  7936. var a=function(){
  7937. caboUtil.run(r,c.getMsg(s,e),c.getMsg(d))
  7938. };
  7939. if(!t){
  7940. this.setState(this.STATE_SUBSCRIBED,null,a)
  7941. }else{
  7942. a()
  7943. }}};
  7944. net_comcast_sms.Provisioning.getAvailableTNs=function(e){
  7945. this.get(["_availTNs","_tn"],e)
  7946. };
  7947. net_comcast_sms.Provisioning.getSelectedTN=function(t){
  7948. var e=this;
  7949. setTimeout(function(){
  7950. caboUtil.run(t,e._tn||null)
  7951. }
  7952. ,0)
  7953. };
  7954. net_comcast_sms.Provisioning.getUserId=function(e){
  7955. this.get("_uid",e)
  7956. };
  7957. net_comcast_sms.Provisioning.getAcctNum=function(e){
  7958. this.get("_acctNum",e)
  7959. };
  7960. net_comcast_sms.Provisioning.getMasterAccount=function(e){
  7961. this.load(new AjxCallback(this,function(){
  7962. var a=net_comcast_sms.Util.getZimletHandler(),o;
  7963. if(this.error){
  7964. o=null
  7965. }else{
  7966. o=new net_comcast_sms.MasterAccount({
  7967. spcode:"spcode",sppwd:"sppwd",mname:"mname",users:[]}
  7968. );
  7969. AjxUtil.hashUpdate(o,{
  7970. mname:null,hwmac:null,enabled:true}
  7971. ,true);
  7972. o.setHandler(a);
  7973. o.ua_domain=a.getConfig("broadcloudBase");
  7974. var t=new net_comcast_sms.UserAccount(o,{
  7975. name:this._name,tn:this._tn,parameters:{
  7976. sms_enable:true,sms_international:true,sms_max_total_msgs:1000,sms_max_sent_msgs:1000}}
  7977. );
  7978. t._loggedIn=true;
  7979. o.users.push(t)
  7980. }
  7981. caboUtil.run(e,o)
  7982. }
  7983. ))
  7984. };
  7985. net_comcast_sms.Provisioning.poll=function(e,n,a,o){
  7986. var t=function(s){
  7987. caboUtil.run(a,new AjxCallback(this,function(r,l){
  7988. if(l){
  7989. setTimeout(function(){
  7990. caboUtil.run(e)
  7991. }
  7992. ,0)
  7993. }else{
  7994. var h=r+1;
  7995. if(h>=o.length){
  7996. setTimeout(function(){
  7997. caboUtil.run(n)
  7998. }
  7999. ,0)
  8000. }else{
  8001. setTimeout(function(){
  8002. t.call(this,h)
  8003. }
  8004. ,(!isNaN(o[h])?o[h]:10)*1000)
  8005. }}}
  8006. ,[s]))
  8007. };
  8008. t.call(this,0)
  8009. };
  8010. net_comcast_sms.Controller=function(e,t){
  8011. if(!arguments.length){
  8012. return
  8013. }
  8014. ZmController.call(this,this.toString(),e,t);
  8015. this._container=e;
  8016. this._handler=t;
  8017. this._registerOperations();
  8018. this._refreshListener=new AjxCallback(this,this._updateRefreshButton);
  8019. this._popdownListener=new AjxListener(this,this.popdownChoosers);
  8020. this._lastPoll=0;
  8021. this._canResizeOverview=true
  8022. };
  8023. net_comcast_sms.Controller.prototype=new ZmController;
  8024. net_comcast_sms.Controller.prototype.constructor=net_comcast_sms.Controller;
  8025. net_comcast_sms.Controller.prototype.toString=function(){
  8026. return"net_comcast_sms.Controller"
  8027. };
  8028. net_comcast_sms.Controller.VIEW_COMPOSE="net_comcast_VIEW_COMPOSE";
  8029. net_comcast_sms.Controller.VIEW_MAILCOMPOSE="net_comcast_VIEW_MAILCOMPOSE";
  8030. net_comcast_sms.Controller.VIEW_THREADS="net_comcast_VIEW_THREADS";
  8031. net_comcast_sms.Controller.INCOMING_QUOTA_WARN_LIMIT=0.95;
  8032. net_comcast_sms.Controller.OUTGOING_QUOTA_WARN_LIMIT=0.95;
  8033. net_comcast_sms.Controller.prototype.getHandler=function(){
  8034. return this._handler
  8035. };
  8036. net_comcast_sms.Controller.prototype.getMsg=function(){
  8037. return this._handler.getMsg.apply(this._handler,arguments)
  8038. };
  8039. net_comcast_sms.Controller.prototype.getMsgObj=function(){
  8040. return this._handler.getMsgObj()
  8041. };
  8042. net_comcast_sms.Controller.prototype.getMainView=function(){
  8043. if(!this._mainView){
  8044. var a=this._handler.app;
  8045. var e={};
  8046. e[ZmAppViewMgr.CB_POST_SHOW]=new AjxCallback(this,this._postShowCallback);
  8047. e[ZmAppViewMgr.CB_PRE_HIDE]=new AjxCallback(this,this._preHideCallback);
  8048. this._mainView=new net_comcast_sms.MainView({
  8049. parent:this._container,controller:this}
  8050. );
  8051. net_comcast_sms.Controller.__hack_clean_tabgroups(appCtxt.getRootTabGroup());
  8052. appCtxt.getRootTabGroup().addMember(this._mainView.getTabGroupMember());
  8053. var t={};
  8054. t[ZmAppViewMgr.C_TOOLBAR_TOP]=this.getToolbar();
  8055. t[ZmAppViewMgr.C_APP_CONTENT]=this._mainView;
  8056. a.createView({
  8057. viewId:this.getViewId(),elements:t,callbacks:e,isAppView:true,isTransient:false}
  8058. );
  8059. this.loadThreads()
  8060. }
  8061. return this._mainView
  8062. };
  8063. net_comcast_sms.Controller.__hack_clean_tabgroups=function(a){
  8064. if(a instanceof DwtTabGroup){
  8065. a.__members._array=caboUtil.Coll.uniq(a.__members._array);
  8066. for(var t=0,e=a.__members.length;
  8067. t<e;
  8068. t++){
  8069. net_comcast_sms.Controller.__hack_clean_tabgroups(a.__members[t])
  8070. }}};
  8071. net_comcast_sms.Controller.prototype._getOverview=function(){
  8072. var t=this._handler.app;
  8073. t.getOverviewPanelContent();
  8074. var e=t.getOverview();
  8075. if(!this._overviewHasBeenCleared){
  8076. e.clear();
  8077. this._overviewHasBeenCleared=true
  8078. }
  8079. return e
  8080. };
  8081. net_comcast_sms.Controller.prototype.getListView=function(){
  8082. if(!this._listView){
  8083. var t=this._getOverview();
  8084. var e=this._listView=new net_comcast_sms.ThreadListView({
  8085. parent:t,controller:this}
  8086. );
  8087. e.addSelectionListener(new AjxListener(this,this._handleSelectThread));
  8088. e.set(new AjxVector());
  8089. var a=t.getSize();
  8090. e.setSize(a.x,a.y);
  8091. caboUtil.augment(t,"setSize",function(n,o,s){
  8092. e.setSize(o,s)
  8093. }
  8094. )
  8095. }
  8096. return this._listView
  8097. };
  8098. net_comcast_sms.Controller.prototype.getToolbar=function(){
  8099. if(!this._toolbar){
  8100. var a=Dwt.byId("skin_main_toolbar_container")||Dwt.byId("skin_td_main"),l=this._toolbar=new ZmButtonToolBar({
  8101. parent:this._container,buttons:this.getToolbarOps(),className:"ZmToolBar ImgSkin_Toolbar MessageToolbar",refElementId:a&&a.id}
  8102. );
  8103. for(var n=0;
  8104. n<l.opList.length;
  8105. n++){
  8106. var h=l.opList[n],s=l.getOp(h);
  8107. if(s){
  8108. var d=ZmOperation.getProp(h,"text"),e=ZmOperation.getProp(h,"textKey"),u=ZmOperation.getProp(h,"tooltip"),r=ZmOperation.getProp(h,"tooltipKey"),o=ZmOperation.getProp(h,"action"),t=e&&this.getMsg(e);
  8109. if(AjxUtil.isString(t)){
  8110. s.setText(t)
  8111. }else{
  8112. if(d&&AjxUtil.isString(d)){
  8113. s.setText(d)
  8114. }}
  8115. t=r&&this.getMsg(r);
  8116. if(AjxUtil.isString(t)){
  8117. s.setToolTipContent(t)
  8118. }else{
  8119. if(u&&AjxUtil.isString(u)){
  8120. s.setToolTipContent(u)
  8121. }}
  8122. if(o instanceof AjxListener){
  8123. s.addSelectionListener(o)
  8124. }
  8125. if(s instanceof DwtButton&&h!="SMS_COMPOSEEMOTICON"){
  8126. s.addSelectionListener(this._popdownListener)
  8127. }}}
  8128. l._createPrecedenceList();
  8129. var c=this._newCount=l.getOp(ZmOperation.TEXT);
  8130. c.addClassName("itemCountText");
  8131. l.addListener(DwtEvent.ONMOUSEUP,this._popdownListener);
  8132. l.setSize(Dwt.DEFAULT,Dwt.CLEAR);
  8133. this._showToolbarItems(this.getToolbarOps(),false)
  8134. }
  8135. return this._toolbar
  8136. };
  8137. net_comcast_sms.Controller.prototype.getCurrentToolbar=function(){
  8138. return this.getToolbar()
  8139. };
  8140. net_comcast_sms.Controller.prototype.updateNewMessageCount=function(){
  8141. var t=this.getMessageStore().messages_byStatus;
  8142. var e=AjxUtil.keys(t[net_comcast_sms.Message.STATUS_NEW]).length+AjxUtil.keys(t[net_comcast_sms.Message.STATUS_UNREAD]).length;
  8143. if(this._newCountVal!==e){
  8144. this._newCountVal=e;
  8145. this._newCount.setText(this.getMsg("newMessageCount",e))
  8146. }};
  8147. net_comcast_sms.Controller.prototype.getUserAccount=function(){
  8148. return this._userAccount
  8149. };
  8150. net_comcast_sms.Controller.prototype.setUserAccount=function(e,t){
  8151. this._userAccount=e;
  8152. this.loadThreads(t,false)
  8153. };
  8154. net_comcast_sms.Controller.prototype.getMessageStore=function(){
  8155. return this._userAccount&&this._userAccount.getMessageStore()
  8156. };
  8157. net_comcast_sms.Controller.prototype.loadThreads=function(a,t){
  8158. var e=net_comcast_sms.Provisioning;
  8159. e.getState(new AjxCallback(this,function(o){
  8160. if(this._userAccount&&o==e.STATE_SUBSCRIBED){
  8161. this.getMessageStore().refreshThreadHeaders(new AjxCallback(this,this._handleLoadThreads,[a]))
  8162. }}
  8163. ))
  8164. };
  8165. net_comcast_sms.Controller.prototype._handleLoadThreads=function(s,n){
  8166. if(n instanceof net_comcast_sms.ConnError||n instanceof net_comcast_sms.RestError||n instanceof net_comcast_sms.ModelError){
  8167. this.showLoading(false,"show");
  8168. var a=net_comcast_sms.Provisioning;
  8169. if(n.code=="0040005"&&a.isTextMsgEnabled()&&!a.hasAssignedUser()&&a.isPrimary()&&a.isSNSEnabled()){
  8170. this.showError(this.getMsg("accountNotActiveError"),this.getMsg("accountNotActiveErrorHeader"))
  8171. }else{
  8172. this.showError(this.getMsg("loadFailedBody")+"<br/>"+n.toString(),this.getMsg("loadFailedHead"))
  8173. }
  8174. caboUtil.run(s)
  8175. }else{
  8176. var t=this.getMessageStore();
  8177. var o=this.getMessageStore().getNonDeletedThreads();
  8178. var e=this.getListView();
  8179. if(!this._lastIsCompose()&&!this._showingIframe){
  8180. this.getMainView().getThreadView().setVisible(true)
  8181. }
  8182. e.set(AjxVector.fromArray(AjxUtil.values(o)),ZmItem.F_STATUS);
  8183. t.addListener("threads",new AjxCallback(e,e.reset));
  8184. caboUtil.run(s)
  8185. }};
  8186. net_comcast_sms.Controller.prototype.showLoading=function(e,s){
  8187. var t=appCtxt.getAppViewMgr();
  8188. if(!this.__loading_ids){
  8189. this.__loading_ids={}
  8190. }
  8191. var a=this.__loading_ids;
  8192. var n=caboUtil.Coll.isEmpty(a);
  8193. if(e){
  8194. a[s]=true
  8195. }else{
  8196. if(a[s]){
  8197. delete a[s]
  8198. }}
  8199. var o=caboUtil.Coll.isEmpty(a);
  8200. if(o!=n){
  8201. if(!o){
  8202. this.getMainView().getLoadingView().setVisible(true)
  8203. }else{
  8204. this.getMainView().getLoadingView().setVisible(false)
  8205. }}};
  8206. net_comcast_sms.Controller.prototype.showError=function(t,e){
  8207. this.showLoading(false,"show");
  8208. this.showLoading(false,"load");
  8209. this._showingError=true;
  8210. if(this._mainView){
  8211. this._showToolbarItems(this.getMarketingToolbarOps(),true);
  8212. this._enableToolbarItems(this.getToolbarOps(),false,true);
  8213. this.getMainView().showErrorView(t,e);
  8214. if(this._showingIframe){
  8215. this.showIframe()
  8216. }}};
  8217. net_comcast_sms.Controller.prototype.showStatic=function(e){
  8218. this.showIframe(this._handler.getResource("html/"+e),true)
  8219. };
  8220. net_comcast_sms.Controller.prototype.showIframe=function(t,e){
  8221. this.showLoading(false,"show");
  8222. this.showLoading(false,"load");
  8223. if(this._mainView){
  8224. if(e){
  8225. this._showToolbarItems(this.getToolbarOps(),false)
  8226. }
  8227. this.getMainView().showIframeView(t);
  8228. this._showingIframe=true
  8229. }};
  8230. net_comcast_sms.Controller.prototype._resetToolbarOperations=function(){};
  8231. net_comcast_sms.Controller.prototype.getAutocompleter=function(){
  8232. if(!this._autoCompleter){
  8233. this._autoCompleter=new net_comcast_sms.Autocomplete({
  8234. enabled:{
  8235. name:true,phone:true}
  8236. ,outTextFunc:function(t,e){
  8237. return e.text+"[ "+(ZmContact._AB_FIELD[t]||AjxStringUtil.capitalizeWords(AjxStringUtil.fromMixed(t))||t)+"]"
  8238. }}
  8239. )
  8240. }
  8241. return this._autoCompleter
  8242. };
  8243. net_comcast_sms.Controller.prototype.show=function(a){
  8244. var t=this.getMainView();
  8245. var e=net_comcast_sms.Provisioning;
  8246. this.showLoading(true,"load");
  8247. e.load(new AjxCallback(this,function(n){
  8248. var o,s;
  8249. this._doShow();
  8250. if(n){
  8251. caboUtil.log("Error in GetVoiceInfoExtRequest: ",n.code);
  8252. switch(n.code){
  8253. case"voice.ACCOUNT_NOT_CPNI_COMPLIANT":case"2070":case"ACCOUNT_CPNI_NOT_AVAILABLE":case"voice.ACCOUNT_CPNI_NOT_AVAILABLE":case"2071":this.showIframe(net_comcast_sms.SmsZimlet.NO_CPNI,true);
  8254. break;
  8255. case"voice.UNABLE_TO_RETRIEVE_PROFILE_SUMMARY":this.showError(this.getMsg("provErrorProfile",n.msg),this.getMsg("provErrorHeader"));
  8256. break;
  8257. case"voice.UNABLE_TO_RETRIEVE_VOICEMAIL_SUMMARY":this.showError(this.getMsg("provErrorVoicemail",n.msg),this.getMsg("provErrorHeader"));
  8258. break;
  8259. case"voice.SECONDARY_NOT_ALLOWED":case"2051":this.showIframe(net_comcast_sms.SmsZimlet.SECONDARY_NOTASSIGNED,true);
  8260. break;
  8261. default:this.showError(this.getMsg("provErrorException",n.msg),this.getMsg("provErrorHeader"));
  8262. break
  8263. }}else{
  8264. if(e.isCommercial()){
  8265. caboUtil.log("Account is BCDV");
  8266. this.showIframe(net_comcast_sms.SmsZimlet.BUSINESS,true)
  8267. }else{
  8268. if(!e.isActivated()){
  8269. caboUtil.log("Account is syncing");
  8270. this.showIframe(net_comcast_sms.SmsZimlet.SYNCING,true)
  8271. }else{
  8272. if(e.isTextMsgEnabled()){
  8273. if(e.hasAssignedUser()){
  8274. if(e.isAssignedUser()){
  8275. o=true
  8276. }else{
  8277. if(e.isPrimary()){
  8278. if(e.isSNSEnabled()){
  8279. caboUtil.log("Provisioning case 1");
  8280. this.showIframe(net_comcast_sms.SmsZimlet.PRIMARY_CCENTRAL,true)
  8281. }else{
  8282. caboUtil.log("Provisioning case 2");
  8283. this.showIframe(net_comcast_sms.SmsZimlet.NO_ACCESS,true)
  8284. }}else{
  8285. if(e.isSNSEnabled()){
  8286. caboUtil.log("Provisioning case 3a");
  8287. this.showIframe(net_comcast_sms.SmsZimlet.SECONDARY_NOTASSIGNED,true)
  8288. }else{
  8289. caboUtil.log("Provisioning case 3b");
  8290. this.showIframe(net_comcast_sms.SmsZimlet.SECONDARY,true)
  8291. }}}}else{
  8292. if(e.isPrimary()){
  8293. if(e.isSNSEnabled()){
  8294. caboUtil.log("Provisioning case 4");
  8295. o=s=true
  8296. }else{
  8297. o=true
  8298. }}else{
  8299. if(e.isSNSEnabled()){
  8300. caboUtil.log("Provisioning case 5a");
  8301. this.showIframe(net_comcast_sms.SmsZimlet.SECONDARY_NOTASSIGNED,true)
  8302. }else{
  8303. caboUtil.log("Provisioning case 5b");
  8304. this.showIframe(net_comcast_sms.SmsZimlet.SECONDARY,true)
  8305. }}}}else{
  8306. if(e.isSNSEnabled()){
  8307. if(e.isPrimary()){
  8308. caboUtil.log("Provisioning case 6");
  8309. this.showIframe(net_comcast_sms.SmsZimlet.SNS_ENABLED,true)
  8310. }else{
  8311. caboUtil.log("Provisioning case 7");
  8312. this.showIframe(net_comcast_sms.SmsZimlet.SECONDARY_NOTASSIGNED,true)
  8313. }}else{
  8314. if(e.isPrimary()){
  8315. if(e.isNeitherLimitedOrUnlimited()){
  8316. caboUtil.log("Account is neither limited or unlimited");
  8317. this.showIframe(net_comcast_sms.SmsZimlet.COSTS_NEITHER,true)
  8318. }else{
  8319. o=true
  8320. }}else{
  8321. caboUtil.log("Provisioning case 8");
  8322. this.showIframe(net_comcast_sms.SmsZimlet.SECONDARY,true)
  8323. }}}}}}
  8324. if(o){
  8325. e.getState(new AjxCallback(this,function(c){
  8326. this.showLoading(false,"load");
  8327. switch(c){
  8328. case e.STATE_UNKNOWN:case e.STATE_UNSUBSCRIBED:this._showMarketing();
  8329. caboUtil.run(a);
  8330. break;
  8331. case e.STATE_WAITING_REC_CONTRACT:case e.STATE_WAITING_ORDERADD:var r=net_comcast_sms.Util.getProperty("tn");
  8332. t.getProvisioningView().signup(r);
  8333. break;
  8334. case e.STATE_WAITING_POLL:this._poll(new AjxCallback(this,this.show,[a]));
  8335. break;
  8336. case e.STATE_SUBSCRIBED:this._updateRefreshButton();
  8337. if(this._lastIsCompose()){
  8338. this.showCompose()
  8339. }else{
  8340. if(s){
  8341. this.getMainView().getThreadView().setVisible(false);
  8342. var l=net_comcast_sms.SmsZimlet.SNS_ENABLED;
  8343. this.showIframe(l+(l.indexOf("?")==-1?"?":"&")+"xtmCallback=net_comcast_sms.instance.getController().showThreadList()",true)
  8344. }else{
  8345. this.showThreadList()
  8346. }}
  8347. this._hasInited=true;
  8348. var h=this;
  8349. setTimeout(function(){
  8350. h.showLoading(true,"load");
  8351. h.getHandler().load(new AjxCallback(h,function(){
  8352. this.showLoading(false,"show");
  8353. this.showLoading(false,"load");
  8354. caboUtil.run(a);
  8355. this.getHandler().getNotificationClient().start();
  8356. var m=this.getMessageStore();
  8357. if(m){
  8358. this.testQuota(true,true);
  8359. m.addListener("status",new AjxCallback(this,this.updateNewMessageCount));
  8360. this.updateNewMessageCount()
  8361. }}
  8362. ))
  8363. }
  8364. ,5);
  8365. break;
  8366. case e.STATE_WAITING_UNSUBSCRIBE:var u=new net_comcast_sms.UnsubscribeDialog({
  8367. parent:appCtxt.getShell(),handler:this._handler}
  8368. ,null);
  8369. var d=new AjxCallback(this,function(){
  8370. this.show(a)
  8371. }
  8372. );
  8373. u._unsubscribe(new AjxCallback(this._handler,this._handler.unsubscribe,[new AjxCallback(u,u._finish),new AjxCallback(u,u._fail,[d])]));
  8374. u.popup();
  8375. break
  8376. }}
  8377. ))
  8378. }}
  8379. ))
  8380. };
  8381. net_comcast_sms.Controller.prototype.__continueShow=function(){
  8382. this.show(null,true)
  8383. };
  8384. net_comcast_sms.Controller.prototype._doShow=function(){
  8385. this._setThread(this._thread||null);
  8386. var e=appCtxt.getAppViewMgr();
  8387. if(net_comcast_sms.Util.UI.loadingIsShown()){
  8388. e.stageView(this.getViewId())
  8389. }else{
  8390. e.pushView(this.getViewId())
  8391. }};
  8392. net_comcast_sms.Controller.prototype._showMarketing=function(e){
  8393. this._showingIframe=false;
  8394. this.getMainView().showProvisioningView(e);
  8395. this._showToolbarItems(this.getMarketingToolbarOps(),true);
  8396. this._enableToolbarItems(this.getToolbarOps(),false,true)
  8397. };
  8398. net_comcast_sms.Controller.prototype._poll=function(t){
  8399. this.showIframe(net_comcast_sms.SmsZimlet.PENDING,true);
  8400. var e=this;
  8401. setTimeout(function(){
  8402. net_comcast_sms.Provisioning.load(new AjxCallback(this,function(a){
  8403. caboUtil.run(t)
  8404. }
  8405. ),true)
  8406. }
  8407. ,this._handler.getConfig("pollTime"))
  8408. };
  8409. net_comcast_sms.Controller.prototype.showThreadList=function(e,s,a){
  8410. var t=this;
  8411. this._showingIframe=false;
  8412. if(this._showingError){
  8413. this.showError()
  8414. }else{
  8415. var n=function(){
  8416. var r=t.getMainView();
  8417. if(t._lastIsCompose()){
  8418. t._latestView=net_comcast_sms.Controller.VIEW_THREADS;
  8419. t.unmoveMailComposeToolbar();
  8420. r.getComposeView().endMailComposeView()
  8421. }
  8422. r.showThreadView();
  8423. t._showToolbarItems(t.getThreadToolbarOps(),true);
  8424. t._updateToolbarThreadButtons();
  8425. caboUtil.run(s)
  8426. };
  8427. if(!e&&this._lastIsCompose()){
  8428. var o=this._composeExitDialog;
  8429. if(!o){
  8430. o=this._composeExitDialog=new DwtMessageDialog({
  8431. parent:appCtxt.getShell(),buttons:[DwtDialog.YES_BUTTON,DwtDialog.NO_BUTTON]}
  8432. );
  8433. o._button[DwtDialog.YES_BUTTON].setText(this.getMsg("composeExitNotificationOk"));
  8434. o._button[DwtDialog.NO_BUTTON].setText(this.getMsg("composeExitNotificationCancel"))
  8435. }else{
  8436. o.reset()
  8437. }
  8438. o.setMessage(this.getMsg("composeExitNotification"));
  8439. o.registerCallback(DwtDialog.YES_BUTTON,new AjxCallback(this,function(){
  8440. o.popdown();
  8441. n()
  8442. }
  8443. ));
  8444. o.registerCallback(DwtDialog.NO_BUTTON,new AjxCallback(this,function(){
  8445. o.popdown();
  8446. caboUtil.run(a)
  8447. }
  8448. ));
  8449. o.popup()
  8450. }else{
  8451. n()
  8452. }}};
  8453. net_comcast_sms.Controller.prototype.showCompose=function(){
  8454. this._showingIframe=false;
  8455. if(!this._lastIsCompose()){
  8456. this._latestView=net_comcast_sms.Controller.VIEW_COMPOSE
  8457. }
  8458. this.getMainView().showComposeView();
  8459. this._oldVisibleToolbarItems=this._getVisibleToolbarItems();
  8460. this._oldEnabledToolbarItems=this._getEnabledToolbarItems();
  8461. this._showToolbarItems(this.getComposeToolbarOps(),true);
  8462. this._enableToolbarItems(this.getComposeToolbarOps(),true)
  8463. };
  8464. net_comcast_sms.Controller.prototype.send=function(){
  8465. var e=this._getFirstComposeView();
  8466. if(e){
  8467. this._enableToolbarItems(this.getComposeToolbarOps(),false);
  8468. e.send()
  8469. }};
  8470. net_comcast_sms.Controller.prototype.cancelCompose=function(){
  8471. var e=this._getFirstComposeView();
  8472. if(e){
  8473. e.cancel()
  8474. }
  8475. this.hideCompose()
  8476. };
  8477. net_comcast_sms.Controller.prototype.hideCompose=function(t){
  8478. var e=this;
  8479. return this.showThreadList(true,function(){
  8480. e._showToolbarItems(e._oldVisibleToolbarItems||e.getThreadToolbarOps(),true);
  8481. e._enableToolbarItems(e._oldEnabledToolbarItems||e.getThreadToolbarOps(),true)
  8482. }
  8483. )
  8484. };
  8485. net_comcast_sms.Controller.prototype._getFirstComposeView=function(){
  8486. var e=this.getMainView().getComposeView().getVisibleViews();
  8487. if(e&&e.length){
  8488. return e[0]
  8489. }};
  8490. net_comcast_sms.Controller.prototype.showMailCompose=function(e){
  8491. AjxPackage.require({
  8492. name:"Mail",callback:new AjxCallback(this,function(){
  8493. AjxDispatcher.setLoaded("Mail",true);
  8494. if(e.inNewWindow){
  8495. AjxDispatcher.run("GetComposeController").doAction(e)
  8496. }else{
  8497. this.getMainView().getComposeView().clear();
  8498. this._showToolbarItems(this.getMailComposeToolbarOps(),true);
  8499. if(!e){
  8500. e={
  8501. action:ZmId.OP_NEW_MESSAGE}
  8502. }
  8503. this._latestView=net_comcast_sms.Controller.VIEW_MAILCOMPOSE;
  8504. this.setCanResizeOverview(false);
  8505. var t=this.getMainView().showMailComposeView(e);
  8506. this.setCanResizeOverview(true);
  8507. this.moveMailComposeToolbar(t._controller)
  8508. }}
  8509. )}
  8510. )
  8511. };
  8512. net_comcast_sms.Controller.prototype.moveMailComposeToolbar=function(t){
  8513. if(this._movedToolbarButtons&&this._movedToolbarButtons.length){
  8514. this.unmoveMailComposeToolbar()
  8515. }
  8516. var e=t&&t._toolbar;
  8517. var s=this._toolbar;
  8518. var o=this._movedToolbarButtons=[];
  8519. var a=e&&e._buttons;
  8520. if(a){
  8521. for(var n in a){
  8522. o.push(a[n])
  8523. }
  8524. this.moveToolbarButtons(e,s,o);
  8525. e.getButton=function(r){
  8526. return s.getButton(r)
  8527. }
  8528. }};
  8529. net_comcast_sms.Controller.prototype.unmoveMailComposeToolbar=function(){
  8530. this.moveToolbarButtons(this._toolbar,null,this._movedToolbarButtons);
  8531. this._movedToolbarButtons=null
  8532. };
  8533. net_comcast_sms.Controller.prototype.moveToolbarButtons=function(e,s,o){
  8534. if(o&&o.length){
  8535. for(var a=0;
  8536. a<o.length;
  8537. a++){
  8538. var t=o[a];
  8539. var n=t.getData("_buttonId");
  8540. if(!t.textPrecedence){
  8541. t.textPrecedence=a
  8542. }
  8543. if(s){
  8544. t.reparent(s,a);
  8545. s._buttons[n]=t
  8546. }else{
  8547. if(e){
  8548. e.removeChild(t)
  8549. }}
  8550. if(e){
  8551. delete e._buttons[n]
  8552. }}
  8553. if(s){
  8554. s._createPrecedenceList()
  8555. }}};
  8556. net_comcast_sms.Controller.prototype._lastIsCompose=function(){
  8557. return(this._lastIsTextCompose()||this._lastIsMailCompose())
  8558. };
  8559. net_comcast_sms.Controller.prototype._lastIsTextCompose=function(){
  8560. return(this._latestView==net_comcast_sms.Controller.VIEW_COMPOSE)
  8561. };
  8562. net_comcast_sms.Controller.prototype._lastIsMailCompose=function(){
  8563. return(this._latestView==net_comcast_sms.Controller.VIEW_MAILCOMPOSE)
  8564. };
  8565. net_comcast_sms.Controller.prototype._postShowCallback=function(){
  8566. if(this._canResizeOverview){
  8567. this._priorWidth=this._handler.getOverviewWidth();
  8568. this._handler.setOverviewWidth(this._overviewWidth||net_comcast_sms.ThreadListView.DEFAULT_SIZE)
  8569. }
  8570. return true
  8571. };
  8572. net_comcast_sms.Controller.prototype._preHideCallback=function(){
  8573. if(this._canResizeOverview&&this._listView){
  8574. this._overviewWidth=this._listView.getSize().x;
  8575. this._handler.setOverviewWidth(this._priorWidth)
  8576. }
  8577. this.popdownChoosers();
  8578. return true
  8579. };
  8580. net_comcast_sms.Controller.prototype.popdownChoosers=function(){
  8581. net_comcast_sms.EmoticonChooser.popdown()
  8582. };
  8583. net_comcast_sms.Controller.prototype._saveUnsentMessage=function(){
  8584. this.setUnsentMessages(this.getMainView().getComposeView().getUnsentMessages())
  8585. };
  8586. net_comcast_sms.Controller.prototype._loadUnsentMessages=function(e){
  8587. this.getMainView().getComposeView().setUnsentMessages(e)
  8588. };
  8589. net_comcast_sms.Controller.prototype.isEntitled=function(){
  8590. return this._handler.isEntitled()
  8591. };
  8592. net_comcast_sms.Controller.prototype.loadVoiceData=function(e){
  8593. this._handler.loadVoiceData(e)
  8594. };
  8595. net_comcast_sms.Controller.prototype.getAvailableTNs=function(e){
  8596. this._handler.getAvailableTNs(e)
  8597. };
  8598. net_comcast_sms.Controller.prototype.signup=function(e,t){
  8599. this._handler.signup(true,e,new AjxCallback(this,this._handleSignup,[t]),new AjxCallback(this,this._handleSignupError,[t]))
  8600. };
  8601. net_comcast_sms.Controller.prototype._handleSignup=function(e){
  8602. this.showLoading(false,"signup");
  8603. this._poll(new AjxCallback(this,function(){
  8604. caboUtil.run(e,true);
  8605. this._handler._registerPrefs();
  8606. this.show()
  8607. }
  8608. ))
  8609. };
  8610. net_comcast_sms.Controller.prototype._handleSignupError=function(a,t,e){
  8611. caboUtil.run(a,false,t,e);
  8612. this.showError(t,e)
  8613. };
  8614. net_comcast_sms.Controller.prototype.getViewId=function(){
  8615. return"net_comcast_sms_VIEW"
  8616. };
  8617. net_comcast_sms.Controller.prototype._getThreadViewType=function(){
  8618. return this.toString()+"_thread"
  8619. };
  8620. net_comcast_sms.Controller.prototype._getComposeViewType=function(){
  8621. return this.toString()+"_compose"
  8622. };
  8623. net_comcast_sms.Controller.prototype.handleKeyAction=function(e){
  8624. if(e==ZmKeyMap.CANCEL){
  8625. this.popdownChoosers()
  8626. }
  8627. return ZmController.prototype.handleKeyAction.call(this,e)
  8628. };
  8629. net_comcast_sms.Controller.prototype._registerOperations=function(){
  8630. ZmOperation.registerOp("SMS_NEW",{
  8631. text:this.getMsg("actionNew"),tooltip:this.getMsg("actionNewTooltip"),action:new AjxListener(this,this.compose),textPrecedence:11}
  8632. );
  8633. ZmOperation.registerOp("SMS_FORWARD",{
  8634. text:this.getMsg("actionForward"),tooltip:this.getMsg("actionForwardTooltip"),action:new AjxListener(this,this.forward),textPrecedence:10,style:DwtButton.TOGGLE_STYLE}
  8635. );
  8636. ZmOperation.registerOp("SMS_EDIT",{
  8637. text:this.getMsg("actionEdit"),tooltip:this.getMsg("actionEditTooltip"),action:new AjxListener(this,this.edit),textPrecedence:9,style:DwtButton.TOGGLE_STYLE}
  8638. );
  8639. ZmOperation.registerOp("SMS_REFRESH",{
  8640. text:this.getMsg("actionRefresh"),tooltip:this.getMsg("actionRefreshTooltip"),action:new AjxListener(this,this.refresh),textPrecedence:8}
  8641. );
  8642. ZmOperation.registerOp("SMS_SEND",{
  8643. text:this.getMsg("actionSend"),tooltip:this.getMsg("actionSendTooltip"),action:new AjxListener(this,this.send),textPrecedence:7}
  8644. );
  8645. ZmOperation.registerOp("SMS_COMPOSECANCEL",{
  8646. text:this.getMsg("actionCancel"),tooltip:this.getMsg("actionCancelTooltip"),action:new AjxListener(this,this.cancelCompose),textPrecedence:6}
  8647. );
  8648. ZmOperation.registerOp("SMS_COMPOSEEMOTICON",{
  8649. image:"HappyEmoticon",textPrecedence:5}
  8650. )
  8651. };
  8652. net_comcast_sms.Controller.prototype.getToolbarOps=function(){
  8653. var e=[ZmOperation.SMS_NEW,ZmOperation.SMS_FORWARD,ZmOperation.SMS_EDIT,ZmOperation.SMS_SEND,ZmOperation.SMS_COMPOSECANCEL,ZmOperation.SMS_COMPOSEEMOTICON,ZmOperation.FILLER,ZmOperation.SMS_REFRESH,ZmOperation.TEXT];
  8654. return e
  8655. };
  8656. net_comcast_sms.Controller.prototype.getStartToolbarOps=net_comcast_sms.Controller.prototype.getMarketingToolbarOps=net_comcast_sms.Controller.prototype.getThreadToolbarOps=function(){
  8657. return[ZmOperation.SMS_NEW,ZmOperation.SMS_FORWARD,ZmOperation.SMS_EDIT,ZmOperation.FILLER,ZmOperation.SMS_REFRESH,ZmOperation.TEXT]
  8658. };
  8659. net_comcast_sms.Controller.prototype.getComposeToolbarOps=function(){
  8660. return[ZmOperation.SMS_SEND,ZmOperation.SMS_COMPOSECANCEL,ZmOperation.SMS_COMPOSEEMOTICON,ZmOperation.FILLER,ZmOperation.SMS_REFRESH,ZmOperation.TEXT]
  8661. };
  8662. net_comcast_sms.Controller.prototype.getMailComposeToolbarOps=function(){
  8663. return[]
  8664. };
  8665. net_comcast_sms.Controller.prototype.setThread=function(e){
  8666. this._listView.setSelection(e)
  8667. };
  8668. net_comcast_sms.Controller.prototype._handleSelectThread=function(t){
  8669. var e=t.item;
  8670. if(e=="more"){
  8671. this.getMessageStore().moreThreadHeaders()
  8672. }else{
  8673. this._setThread(e)
  8674. }};
  8675. net_comcast_sms.Controller.prototype._setThread=function(e){
  8676. if(e){
  8677. var t=this.getMainView().getThreadView();
  8678. this.showThreadList(false,new AjxCallback(this,function(){
  8679. this._mainView.getThreadView().getReplyView().setVisible(true);
  8680. if(this._thread==e){
  8681. t.getThreadView().reset()
  8682. }else{
  8683. if(this._thread){
  8684. this._thread.removeListener("newmessages",this._refreshListener);
  8685. this._clearStatus();
  8686. this.popdownChoosers()
  8687. }
  8688. t.set(e);
  8689. e.addListener("newmessages",this._refreshListener)
  8690. }
  8691. this._thread=e;
  8692. this._updateRefreshButton();
  8693. this._showToolbarItems(this.getThreadToolbarOps(),true);
  8694. this._updateToolbarThreadButtons()
  8695. }
  8696. ))
  8697. }else{
  8698. this._showToolbarItems(this.getThreadToolbarOps(),true);
  8699. this._updateToolbarThreadButtons();
  8700. this._mainView.getThreadView().getReplyView().setVisible(false)
  8701. }};
  8702. net_comcast_sms.Controller.prototype.getThread=function(){
  8703. return this._thread
  8704. };
  8705. net_comcast_sms.Controller.prototype.refresh=function(){
  8706. var t=this.getMessageStore();
  8707. var e=t.getNewestThread();
  8708. var a=e&&e.getNewest().time||1;
  8709. t.getMessagesSince(a,new AjxCallback(this,this._handleRefresh))
  8710. };
  8711. net_comcast_sms.Controller.prototype._handleRefresh=function(e){
  8712. this._lastPoll=new Date().getTime();
  8713. this._updateRefreshButton()
  8714. };
  8715. net_comcast_sms.Controller.prototype._updateRefreshButton=function(){
  8716. var a=new Date().getTime()-this._lastPoll;
  8717. var t=a>60000;
  8718. var e=this._toolbar.getButton(ZmOperation.SMS_REFRESH);
  8719. e.setEnabled(t);
  8720. if(!t){
  8721. window.setTimeout(AjxCallback.simpleClosure(this._updateRefreshButton,this),(60000-a+1))
  8722. }};
  8723. net_comcast_sms.Controller.prototype.testQuota=function(e,a,t){
  8724. if(e||a){
  8725. this.getInfo(new AjxCallback(this,this._handleTestQuota,[e,a,t]))
  8726. }else{
  8727. caboUtil.run(t)
  8728. }};
  8729. net_comcast_sms.Controller.prototype._handleTestQuota=function(t,n,o,e){
  8730. if(e&&!this._hasWarnedQuota){
  8731. var a=[];
  8732. if(t){
  8733. if(e.smstotal>=e.smsmax){
  8734. a.push(this.getMsg("quotaInReached"))
  8735. }else{
  8736. if(!this._hasWarnedInbox&&((e.smstotal/e.smsmax)>=net_comcast_sms.Controller.INCOMING_QUOTA_WARN_LIMIT)){
  8737. a.push(this.getMsg("quotaInNear"));
  8738. this._hasWarnedInbox=true
  8739. }}}
  8740. if(n){
  8741. if(e.smsquota>=e.smsquotamax){
  8742. a.push(this.getMsg("quotaOutReached"))
  8743. }else{
  8744. if(!this._hasWarnedOutbox&&((e.smsquota/e.smsquotamax)>=net_comcast_sms.Controller.OUTGOING_QUOTA_WARN_LIMIT)){
  8745. a.push(this.getMsg("quotaOutNear"));
  8746. this._hasWarnedOutbox=true
  8747. }}}
  8748. if(a.length){
  8749. net_comcast_sms.Util.UI.dialog(a.join("<br/>"),this.getMsg("quotaDialogTitle"));
  8750. this._hasWarnedQuota=true
  8751. }}
  8752. caboUtil.run(o)
  8753. };
  8754. net_comcast_sms.Controller.prototype.getInfo=function(e){
  8755. this.getMessageStore().getMessageCounts(new AjxCallback(this,this._handleGetInfo,[e]))
  8756. };
  8757. net_comcast_sms.Controller.prototype._handleGetInfo=function(t,e){
  8758. caboUtil.run(t,e)
  8759. };
  8760. net_comcast_sms.Controller.prototype._enableToolbarItems=function(t,a,o){
  8761. a=a!==false;
  8762. var e=[ZmOperation.FILLER,ZmOperation.SMS_REFRESH,ZmOperation.TEXT];
  8763. var n=AjxUtil.complement(t,this._toolbar.opList);
  8764. this._toolbar.enable(o?this._toolbar.opList:AjxUtil.complement(e,this._toolbar.opList),a);
  8765. this._toolbar.enable(o?n:AjxUtil.complement(e,n),!a)
  8766. };
  8767. net_comcast_sms.Controller.prototype._getEnabledToolbarItems=function(t){
  8768. t=t!==false;
  8769. var e=[];
  8770. var n=this._toolbar.opList;
  8771. for(var o=0,a=n.length;
  8772. o<a;
  8773. o++){
  8774. var s=this._toolbar.getButton(n[o]);
  8775. if(s&&s.getEnabled()==t){
  8776. e.push(n[o])
  8777. }}
  8778. return e
  8779. };
  8780. net_comcast_sms.Controller.prototype._getVisibleToolbarItems=function(n){
  8781. n=n!==false;
  8782. var e=[];
  8783. var o=this._toolbar.opList;
  8784. for(var a=0,t=o.length;
  8785. a<t;
  8786. a++){
  8787. var s=this._toolbar.getButton(o[a]);
  8788. if(s&&s.getVisible()==n){
  8789. e.push(o[a])
  8790. }}
  8791. return e
  8792. };
  8793. net_comcast_sms.Controller.prototype._showToolbarItems=function(t,n){
  8794. n=n!==false;
  8795. var e=AjxUtil.arrayAsHash(t);
  8796. for(var o=0;
  8797. o<this._toolbar.opList.length;
  8798. o++){
  8799. var s=this._toolbar.opList[o];
  8800. var a=this._toolbar.getButton(s);
  8801. if(a){
  8802. a.setVisible(e[s]==n)
  8803. }}};
  8804. net_comcast_sms.Controller.prototype.compose=function(){
  8805. this.showCompose();
  8806. var t=this.getMainView().getComposeView();
  8807. t.reset();
  8808. var e=t.add();
  8809. this._updateSendButton(false);
  8810. e.addUpdateSendListener(new AjxCallback(this,this._updateSendButton));
  8811. return e
  8812. };
  8813. net_comcast_sms.Controller.prototype.forward=function(){
  8814. this.setForwarding(!this._forwarding)
  8815. };
  8816. net_comcast_sms.Controller.prototype.setForwarding=function(e){
  8817. this._forwarding=e;
  8818. this.getMainView().getThreadView().setForwarding(e);
  8819. this.getMainView().showThreadView();
  8820. this._updateToolbarThreadButtons()
  8821. };
  8822. net_comcast_sms.Controller.prototype.edit=function(){
  8823. this.setEditing(!this._editing)
  8824. };
  8825. net_comcast_sms.Controller.prototype.setEditing=function(t){
  8826. this._editing=t;
  8827. this.getMainView().getThreadView().setEditing(t);
  8828. this.getListView().setEditing(t);
  8829. this._updateToolbarThreadButtons();
  8830. if(!t){
  8831. var e=this._thread;
  8832. if(e){
  8833. for(var n=0,o=e.size();
  8834. n<o;
  8835. n++){
  8836. var s=e.getByIndex(n);
  8837. var a=s.getEditStatus();
  8838. if(a){
  8839. s.setStatus(a)
  8840. }}}}};
  8841. net_comcast_sms.Controller.prototype._updateToolbarThreadButtons=function(){
  8842. var s=this.getToolbar(),n=!!this.getThread(),o=[],t=this._editing,e=this._forwarding;
  8843. if(!t&&!e){
  8844. o.push(ZmOperation.SMS_NEW)
  8845. }
  8846. if(!e&&n){
  8847. o.push(ZmOperation.SMS_EDIT)
  8848. }
  8849. if(!t&&n){
  8850. o.push(ZmOperation.SMS_FORWARD)
  8851. }
  8852. this._enableToolbarItems(o,true);
  8853. var r=s.getOp(ZmOperation.SMS_EDIT);
  8854. r.setText(this.getMsg(t?"actionEditEnd":"actionEdit"));
  8855. r.setToolTipContent(this.getMsg(t?"actionEditEndTooltip":"actionEditTooltip"));
  8856. var a=s.getOp(ZmOperation.SMS_FORWARD);
  8857. a.setText(this.getMsg(e?"actionForwardEnd":"actionForward"));
  8858. a.setToolTipContent(this.getMsg(e?"actionForwardEndTooltip":"actionForwardTooltip"))
  8859. };
  8860. net_comcast_sms.Controller.prototype._updateSendButton=function(t,e,a){
  8861. this.getToolbar().enable(ZmOperation.SMS_SEND,t||(e&&a))
  8862. };
  8863. net_comcast_sms.Controller.prototype._clearStatus=function(){
  8864. this._forwarding=true;
  8865. this.forward();
  8866. this._editing=true;
  8867. this.edit()
  8868. };
  8869. net_comcast_sms.Controller.prototype.doForwardAsText=function(o){
  8870. var h=this._forwarding=!this._forwarding;
  8871. this.getMainView().getThreadView().setForwarding(h);
  8872. this._updateToolbarThreadButtons();
  8873. var s=[];
  8874. for(var n=0,t=o.length;
  8875. n<t;
  8876. n++){
  8877. var e=o[n];
  8878. s[n]=e.mid
  8879. }
  8880. var r=function(){
  8881. var u="<br/>";
  8882. var c=[];
  8883. for(var f=0,m=o.length;
  8884. f<m;
  8885. f++){
  8886. var p=o[f];
  8887. var g;
  8888. c[f]=p.body+u+p.getAnnotation()
  8889. }
  8890. var d=this.compose();
  8891. d.setContent(c.join(u+u))
  8892. };
  8893. var l=new caboUtil.MultiCallback(s,null,new AjxCallback(this,r));
  8894. for(var n=0,t=o.length;
  8895. n<t;
  8896. n++){
  8897. var e=o[n];
  8898. var a=l.getCallback(e.mid);
  8899. if(e.dir==net_comcast_sms.Message.DIR_INCOMING){
  8900. e.getContact(a)
  8901. }else{
  8902. caboUtil.run(a)
  8903. }}};
  8904. net_comcast_sms.Controller.prototype.doForwardAsEmail=function(o){
  8905. var t=this._forwarding=!this._forwarding;
  8906. this.getMainView().getThreadView().setForwarding(t);
  8907. this._updateToolbarThreadButtons();
  8908. var a=(appCtxt.get(ZmSetting.COMPOSE_AS_FORMAT)==ZmSetting.COMPOSE_HTML);
  8909. var e=(o&&o.length)?this._getForwardBody(o).join(a?"<br/>":"\n"):"";
  8910. var n={
  8911. action:ZmId.OP_NEW_MESSAGE,extraBodyText:e,inNewWindow:appCtxt.get(ZmSetting.NEW_WINDOW_COMPOSE)};
  8912. this.showMailCompose(n);
  8913. this._handler.app.pushView(this.getViewId())
  8914. };
  8915. net_comcast_sms.Controller.prototype._getForwardBody=function(h){
  8916. if(h&&h.length){
  8917. var t=[];
  8918. for(var n=0,o=h.length;
  8919. n<o;
  8920. n++){
  8921. var r=h[n];
  8922. var a,s,e;
  8923. s=r.body;
  8924. e=r.getAnnotation();
  8925. t.push(s,e,"\n")
  8926. }
  8927. return t
  8928. }};
  8929. net_comcast_sms.Controller.prototype.composeToContact=function(e){
  8930. var t=this;
  8931. this._latestView=net_comcast_sms.Controller.VIEW_COMPOSE;
  8932. this.show(function(){
  8933. var a=t.getMainView().getComposeView();
  8934. a.clear();
  8935. a.add().addRecipient(e)
  8936. }
  8937. )
  8938. };
  8939. net_comcast_sms.Controller.prototype.setCanResizeOverview=function(e){
  8940. this._canResizeOverview=e
  8941. };
  8942. AjxDispatcher.addPackageLoadFunction("Mail",new AjxCallback(function(){
  8943. net_comcast_sms.ComposeController=function(t,a){
  8944. if(!arguments.length){
  8945. return
  8946. }
  8947. this._handler=a;
  8948. var o=net_comcast_sms.Util.getObjectProxy(appCtxt.getApp(ZmApp.MAIL));
  8949. this._parentView=t;
  8950. var e=this._view=new DwtComposite({
  8951. parent:t,posStyle:Dwt.ABSOLUTE_STYLE}
  8952. );
  8953. this.viewId="net_comcast_sms_MAIL_"+Dwt.getNextId();
  8954. ZmComposeController.call(this,e,o)
  8955. };
  8956. net_comcast_sms.ComposeController.prototype=net_comcast_sms.Util.getObjectProxy(ZmComposeController.prototype);
  8957. net_comcast_sms.ComposeController.prototype.constructor=net_comcast_sms.ComposeController;
  8958. net_comcast_sms.ComposeController.prototype.toString=function(){
  8959. return"net_comcast_sms.ComposeController"
  8960. };
  8961. net_comcast_sms.ComposeController.prototype.getView=function(){
  8962. return this._view
  8963. };
  8964. net_comcast_sms.ComposeController.prototype.getMsg=function(){
  8965. return this._handler.getMsg.apply(this._handler,arguments)
  8966. };
  8967. net_comcast_sms.ComposeController.prototype.initComposeView=function(s,t){
  8968. if(this._composeView){
  8969. return
  8970. }
  8971. this.sessionId="_sms_"+Dwt.getNextId();
  8972. var e=this._container;
  8973. var a=this._composeView=new ZmComposeView(e,this,t);
  8974. this._initializeToolBar();
  8975. var n=this._toolbar;
  8976. n.setVisible(false);
  8977. if(this._newButton){
  8978. this._newButton.setVisible(false)
  8979. }
  8980. this._view.setSize=function(c,d){
  8981. DwtComposite.prototype.setSize.call(this,c,d);
  8982. a.setSize(c,d-n.getSize().y)
  8983. };
  8984. a.setLocation(0,n.getSize().y);
  8985. var l=this._view.getSize();
  8986. this._view.setSize(l.x,l.y);
  8987. if(this._composeView.identitySelect){
  8988. this._composeView.identitySelect.addChangeListener(new AjxListener(this,this._identityChangeListener,[true]))
  8989. }
  8990. var h=this._parentView;
  8991. var o=this._view;
  8992. var r=this;
  8993. this._app.popView=function(d,c){
  8994. h._controller.showThreadList(d);
  8995. return false
  8996. }
  8997. };
  8998. net_comcast_sms.ComposeController.prototype._cancelCompose=function(){
  8999. var t=this._composeView.isDirty();
  9000. var e=t||(this._draftType==ZmComposeController.DRAFT_TYPE_AUTO);
  9001. if(!e){
  9002. this._composeView.reset(true)
  9003. }else{
  9004. this._composeView.enableInputs(false)
  9005. }
  9006. this._composeView.reEnableDesignMode();
  9007. this._app.popView(!e)
  9008. };
  9009. net_comcast_sms.ComposeController.prototype._setComposeTabGroup=function(){
  9010. ZmComposeController.prototype._setComposeTabGroup.apply(this,arguments);
  9011. var t=this._tabGroup;
  9012. var e=t.__parent;
  9013. if(!e.contains(t)){
  9014. e.addMember(t)
  9015. }};
  9016. net_comcast_sms.ComposeController.prototype._getOptionsMenu=function(e){
  9017. return this._toolbar.getButton(ZmOperation.COMPOSE_OPTIONS).getMenu()||this._optionsMenu[e]
  9018. };
  9019. net_comcast_sms.ComposeController.prototype._getSignatureButton=function(){
  9020. var e=this._getOptionsMenu(ZmOperation.ADD_SIGNATURE);
  9021. return e&&e.getItemById(ZmPopupMenu.MENU_ITEM_ID_KEY,ZmOperation.ADD_SIGNATURE)
  9022. };
  9023. net_comcast_sms.ComposeController.prototype._switchInclude=function(o){
  9024. var t=this._curIncOptions.what;
  9025. var e=this._optionsMenu[this._action];
  9026. if(o==ZmOperation.USE_PREFIX||o==ZmOperation.INCLUDE_HEADERS){
  9027. var n=e.getOp(o);
  9028. if(n){
  9029. if(o==ZmOperation.USE_PREFIX){
  9030. this._curIncOptions.prefix=n.getChecked()
  9031. }else{
  9032. this._curIncOptions.headers=n.getChecked()
  9033. }}}else{
  9034. if(ZmComposeController.INC_MAP[o]){
  9035. this._curIncOptions.what=ZmComposeController.INC_MAP[o]
  9036. }}
  9037. var h=(t==ZmSetting.INC_BODY||t==ZmSetting.INC_SMART);
  9038. var a=this._composeView;
  9039. var s="";
  9040. if(o!=ZmOperation.FORMAT_HTML&&o!=ZmOperation.FORMAT_TEXT){
  9041. if(a._preface||!h){
  9042. var c=this._getBodyContent();
  9043. if(a._preface){
  9044. var l=c.indexOf(a._preface);
  9045. if(l>0){
  9046. s=c.substr(0,l)
  9047. }}else{
  9048. s=c
  9049. }}
  9050. if(a._composeMode==DwtHtmlEditor.TEXT){
  9051. AjxTimedAction.scheduleAction(new AjxTimedAction(this,function(){
  9052. a.getHtmlEditor().moveCaretToTop()
  9053. }
  9054. ),200)
  9055. }}else{
  9056. if(!this._msg){
  9057. s=this._getBodyContent()
  9058. }}
  9059. var r=this._curIncOptions.what;
  9060. if(this._action==ZmOperation.FORWARD_INLINE&&r==ZmSetting.INC_ATTACH){
  9061. this._action=ZmOperation.FORWARD_ATT
  9062. }
  9063. if(this._action==ZmOperation.FORWARD_ATT&&r!=ZmSetting.INC_ATTACH){
  9064. this._action=ZmOperation.FORWARD_INLINE
  9065. }
  9066. a.resetBody(this._action,this._msg,s)
  9067. }
  9068. }
  9069. ));
  9070. caboUtil.onload("caboUtil.Preferences",function(){
  9071. net_comcast_sms.PrefController=function(o,e,t,n,s,a){
  9072. if(!arguments.length){
  9073. return
  9074. }
  9075. caboUtil.Preferences.Controller.call(this,o,a._container,t,n,s,a)
  9076. };
  9077. net_comcast_sms.PrefController.prototype=new caboUtil.Preferences.Controller;
  9078. net_comcast_sms.PrefController.prototype.constructor=net_comcast_sms.PrefController;
  9079. net_comcast_sms.PrefController.prototype.toString=function(){
  9080. return"net_comcast_sms.PrefController"
  9081. };
  9082. net_comcast_sms.PrefController.prototype.__getPrefsView=function(){
  9083. return new net_comcast_sms.PrefsView(this._basePrefsView,this._section,this)
  9084. };
  9085. net_comcast_sms.PrefController.prototype.savePref=function(a,t){
  9086. var e=caboUtil.MultiCallback.simple(2,null,a,true);
  9087. caboUtil.Preferences.Controller.prototype.savePref.call(this,e.getCallback(0),t);
  9088. this._handler.saveSettings(e.getCallback(1))
  9089. }
  9090. }
  9091. );
  9092. net_comcast_sms.MainView=function(e){
  9093. if(!arguments.length){
  9094. return
  9095. }
  9096. this._controller=e.controller;
  9097. DwtComposite.call(this,{
  9098. parent:e.parent,className:"DwtComposite",posStyle:Dwt.ABSOLUTE_STYLE,noMaximize:false,controller:e.controller}
  9099. );
  9100. this._threadViewList=new net_comcast_sms.ThreadViewList({
  9101. parent:this,controller:this._controller}
  9102. );
  9103. this._composeViewList=new net_comcast_sms.ComposeViewList({
  9104. parent:this,controller:this._controller}
  9105. );
  9106. this._provisioningView=new net_comcast_sms.ProvisioningView({
  9107. parent:this,controller:this._controller}
  9108. );
  9109. this._errorView=new net_comcast_sms.ErrorView({
  9110. parent:this,controller:this._controller}
  9111. );
  9112. this._iframeView=new DwtIframe({
  9113. parent:this,html:"",className:"SmsIframe"}
  9114. );
  9115. this._loadingView=this.getLoadingView();
  9116. this._hideViews()
  9117. };
  9118. net_comcast_sms.MainView.prototype=new DwtComposite;
  9119. net_comcast_sms.MainView.prototype.constructor=net_comcast_sms.MainView;
  9120. net_comcast_sms.MainView.prototype.getTitle=function(){
  9121. return ZmMsg.zimbraTitle+": "+this._controller.getMsg("xtmTitle")
  9122. };
  9123. net_comcast_sms.MainView.prototype.getThreadView=function(){
  9124. return this._threadViewList
  9125. };
  9126. net_comcast_sms.MainView.prototype.getComposeView=function(){
  9127. return this._composeViewList
  9128. };
  9129. net_comcast_sms.MainView.prototype.getMailComposeController=function(){
  9130. return this._composeListView._mailController
  9131. };
  9132. net_comcast_sms.MainView.prototype.getController=function(){
  9133. return this._controller
  9134. };
  9135. net_comcast_sms.MainView.prototype.getProvisioningView=function(){
  9136. return this._provisioningView
  9137. };
  9138. net_comcast_sms.MainView.prototype._hideViews=function(){
  9139. this._provisioningView.setVisible(false);
  9140. this._composeViewList.setVisible(false);
  9141. this._threadViewList.setVisible(false);
  9142. this._errorView.setVisible(false);
  9143. this._iframeView.setVisible(false)
  9144. };
  9145. net_comcast_sms.MainView.prototype.showIframeView=function(e){
  9146. this._hideViews();
  9147. if(e){
  9148. this._iframeView.setSrc(e)
  9149. }
  9150. this._iframeView.setVisible(true)
  9151. };
  9152. net_comcast_sms.MainView.prototype.showThreadView=function(){
  9153. this._hideViews();
  9154. this._threadViewList.setVisible(true)
  9155. };
  9156. net_comcast_sms.MainView.prototype.showComposeView=function(){
  9157. this._hideViews();
  9158. this._composeViewList.setVisible(true)
  9159. };
  9160. net_comcast_sms.MainView.prototype.showErrorView=function(t,e){
  9161. this._hideViews();
  9162. this._errorView.setVisible(true);
  9163. if(t){
  9164. this._errorView.setMsg(t)
  9165. }
  9166. if(e){
  9167. this._errorView.setTitle(e)
  9168. }};
  9169. net_comcast_sms.MainView.prototype.showProvisioningView=function(e){
  9170. this._hideViews();
  9171. this._provisioningView.setVisible(true);
  9172. if(e){
  9173. this._provisioningView.setLoadedCallback(e)
  9174. }};
  9175. net_comcast_sms.MainView.prototype.showMailComposeView=function(t){
  9176. this._hideViews();
  9177. this._composeViewList.setVisible(true);
  9178. this._composeViewList.clear();
  9179. var e=this._composeViewList.addMail(t);
  9180. return e
  9181. };
  9182. net_comcast_sms.MainView.prototype.setSize=function(e,t){
  9183. this._threadViewList.setSize(e,t);
  9184. this._composeViewList.setSize(e,t);
  9185. this._provisioningView.setSize(e,t);
  9186. this._loadingView.setSize(e,t);
  9187. DwtComposite.prototype.setSize.call(this,e,t)
  9188. };
  9189. net_comcast_sms.MainView.prototype.getTabGroupMember=function(){
  9190. if(!this._tabGroup){
  9191. this._tabGroup=new DwtTabGroup(this.toString());
  9192. this._tabGroup.addMember(this._composeViewList.getTabGroupMember());
  9193. this._tabGroup.toString=function(){
  9194. return"SMS Mainview"
  9195. }
  9196. }
  9197. return this._tabGroup
  9198. };
  9199. net_comcast_sms.MainView.prototype.showCustomView=function(e){};
  9200. net_comcast_sms.MainView.prototype.getLoadingView=function(){
  9201. if(!this._loadingView){
  9202. this._loadingView=new DwtControl({
  9203. parent:this,className:"DwtListView",posStyle:Dwt.ABSOLUTE_STYLE}
  9204. );
  9205. this._loadingView.setSize("100%","100%");
  9206. var e=this._loadingView.getHtmlElement();
  9207. e.innerHTML=AjxTemplate.expand("share.App#Loading",this._htmlElId);
  9208. e.style.top="0px";
  9209. e.style.zIndex="300"
  9210. }
  9211. return this._loadingView
  9212. };
  9213. net_comcast_sms.ThreadListView=function(e){
  9214. if(!arguments.length){
  9215. return
  9216. }
  9217. this._controller=e.controller;
  9218. ZmListView.call(this,{
  9219. view:"net_comcast_sms_THREADLIST",parent:e.parent,className:"ThreadListView DwtListView",posStyle:Dwt.STATIC_STYLE,headerList:this._getHeaderList(),noMaximize:false,controller:e.controller}
  9220. );
  9221. this._statusCallbacks={};
  9222. this._messageCallbacks={}
  9223. };
  9224. net_comcast_sms.ThreadListView.prototype=new ZmListView;
  9225. net_comcast_sms.ThreadListView.prototype.constructor=net_comcast_sms.ThreadListView;
  9226. net_comcast_sms.ThreadListView.prototype.toString=function(){
  9227. return"net_comcast_sms.ThreadListView"
  9228. };
  9229. net_comcast_sms.ThreadListView.DEFAULT_SIZE=300;
  9230. net_comcast_sms.ThreadListView.prototype.set=function(n,a){
  9231. if(this._list){
  9232. for(var r=0,s=this._list.size();
  9233. r<s;
  9234. r++){
  9235. var h=this._list.get(r);
  9236. if(h!="more"){
  9237. var t=this._messageCallbacks[h.getID()];
  9238. if(t){
  9239. h.removeListener("messages",t);
  9240. h.removeListener("status",t)
  9241. }}}}
  9242. for(var r=0,s=n.size();
  9243. r<s;
  9244. r++){
  9245. var h=n.get(r),t=this._messageCallbacks[h.getID()]=new AjxCallback(this,this._updateThread,[h]);
  9246. h.addListener("messages",t);
  9247. h.addListener("status",t)
  9248. }
  9249. if(n){
  9250. n=AjxVector.fromArray(this._controller.getMessageStore().getNonDeletedThreads(n))
  9251. }
  9252. var o=this._controller.getMessageStore();
  9253. if(o&&o.hasMoreThreads()){
  9254. n.add("more")
  9255. }
  9256. a=a||(this._headerIdHash&&this._headerIdHash[this._currentColId]&&this._headerIdHash[this._currentColId]._field)||ZmItem.F_STATUS;
  9257. if(a){
  9258. this._sortItems(n,a,this._bSortAsc)
  9259. }
  9260. var e=this._parentEl.scrollTop;
  9261. ZmListView.prototype.set.call(this,n,a);
  9262. this._focus();
  9263. this._parentEl.scrollTop=e
  9264. };
  9265. net_comcast_sms.ThreadListView.prototype.reset=function(){
  9266. var t=this._controller.getMessageStore().getThreads(),e=AjxVector.fromArray(AjxUtil.values(t));
  9267. this.set(e)
  9268. };
  9269. net_comcast_sms.ThreadListView.prototype._getHeaderList=function(e){
  9270. var t=[];
  9271. t.push(new DwtListHeaderItem({
  9272. field:ZmItem.F_STATUS,icon:"ThreadStatus",width:40,resizeable:false,sortable:true,align:"center",noSortArrow:true}
  9273. ));
  9274. t.push(new DwtListHeaderItem({
  9275. field:ZmItem.F_FROM,text:ZmMsg.sender,resizeable:false,sortable:true,noRemove:true}
  9276. ));
  9277. t.push(new DwtListHeaderItem({
  9278. field:ZmItem.F_DATE,text:ZmMsg.date,width:60,resizeable:true,sortable:true}
  9279. ));
  9280. return t
  9281. };
  9282. net_comcast_sms.ThreadListView.prototype._getCellId=function(e,t){
  9283. return"sms_list_"+((e instanceof net_comcast_sms.Thread)?e.getTN():"more")+"_"+t
  9284. };
  9285. net_comcast_sms.ThreadListView.prototype._getItemId=function(e,t){
  9286. return DwtId.getListViewItemId(DwtId.WIDGET_ITEM,this._view,(e instanceof net_comcast_sms.Thread)?e.getTN():"more")
  9287. };
  9288. net_comcast_sms.ThreadListView.prototype._getCellContents=function(h,r,l,s,n,o){
  9289. var a;
  9290. if(l instanceof net_comcast_sms.Thread){
  9291. var e=this._getFieldId(l,s),t=this._getCellId(l,s);
  9292. switch(s){
  9293. case ZmItem.F_STATUS:a=this.getStatusCellContents(t,l);
  9294. break;
  9295. case ZmItem.F_FROM:a=this.getBodyCellContents(t,l);
  9296. break;
  9297. case ZmItem.F_DATE:a=this.getDateCellContents(t,l);
  9298. break
  9299. }}else{
  9300. if(l=="more"){
  9301. a="<div class='MoreThreadsCell'>"+this._controller.getMsg("actionMore")+"</div>"
  9302. }}
  9303. if(a){
  9304. h[r++]=a
  9305. }
  9306. return r
  9307. };
  9308. net_comcast_sms.ThreadListView.prototype._getCell=function(m,u,p,c,o,a){
  9309. if(p=="more"){
  9310. if(!o){
  9311. var t=this._getCellId(p,c,a),d=t?[" id=","'",t,"'"].join(""):"",r=(" width='100%'"),h=this._getCellClass(p,c,a),n=h?[" class=",h].join(""):"",f=this._getCellAlign(o,a),l=f?[" align=",f].join(""):"",e=(this._getCellAttrText(p,c,a))||"",s=[d,r,n,l,e].join(" ");
  9312. m[u++]="<td";
  9313. m[u++]=s?(" "+s):"";
  9314. m[u++]=">";
  9315. u=this._getCellContents(m,u,p,c,o,a);
  9316. m[u++]="</td>"
  9317. }
  9318. return u
  9319. }else{
  9320. return ZmListView.prototype._getCell.apply(this,arguments)
  9321. }};
  9322. net_comcast_sms.ThreadListView.prototype._getDivClass=function(a,t,o){
  9323. var e=DwtListView.prototype._getDivClass.apply(this,arguments);
  9324. return t=="more"?e+" MoreThreadsRow":e
  9325. };
  9326. net_comcast_sms.ThreadListView.prototype._resetList=function(){
  9327. ZmListView.prototype._resetList.call(this);
  9328. this._statusCallbacks={}
  9329. };
  9330. net_comcast_sms.ThreadListView.prototype.getMinSize=function(){
  9331. return 200
  9332. };
  9333. net_comcast_sms.ThreadListView.prototype._sortColumn=function(e,t){
  9334. if(this._list){
  9335. if(this._sortItems(this._list,e._field,t)){
  9336. this._renderList(this._list)
  9337. }}
  9338. this._controller.popdownChoosers()
  9339. };
  9340. net_comcast_sms.ThreadListView.prototype._sortThreads=function(t,e,a){
  9341. if(e){
  9342. t.sort(e);
  9343. if(!a){
  9344. t.reverse()
  9345. }}};
  9346. net_comcast_sms.ThreadListView.prototype._sortItems=function(t,a,o){
  9347. var n=t.remove("more");
  9348. var e=net_comcast_sms.ThreadListView.COMPARATOR[a];
  9349. this._sortThreads(t,e,o);
  9350. if(n){
  9351. t.add("more")
  9352. }
  9353. return !!e
  9354. };
  9355. net_comcast_sms.ThreadListView.prototype._getNoResultsMessage=function(){
  9356. return this._controller.getMsg("threadNone")
  9357. };
  9358. net_comcast_sms.ThreadListView.prototype.getStatusCellContents=function(t,e){
  9359. var a=new AjxCallback(this,this._updateStatusCell,[t,e]);
  9360. if(e.isLoaded()){
  9361. contents=a.run()
  9362. }else{
  9363. contents=a.run(true);
  9364. e.refresh(a)
  9365. }
  9366. if(!this._statusCallbacks[t]){
  9367. this._statusCallbacks[t]=a;
  9368. e.addListener("status",a)
  9369. }
  9370. return contents
  9371. };
  9372. net_comcast_sms.ThreadListView.prototype.redrawItem=function(e){
  9373. DwtListView.prototype.redrawItem.apply(this,arguments)
  9374. };
  9375. net_comcast_sms.ThreadListView.prototype._updateStatusCell=function(n,t,s){
  9376. if(n&&t){
  9377. var a=t.getUnreadMessageCount(),e=Dwt.byId(n),o=["<div class='",(a?"MessageUnreadBalloon":"MessageReadBalloon"),"'>",(s!==true&&a||""),"</div>"].join("");
  9378. if(e){
  9379. Dwt.setInnerHtml(e,o)
  9380. }
  9381. return o
  9382. }};
  9383. net_comcast_sms.ThreadListView.prototype.getBodyCellContents=function(a,t){
  9384. if(t instanceof net_comcast_sms.Thread){
  9385. var e=t.getContact(new AjxCallback(this,this._updateBodyCell,[a,t]));
  9386. return this._updateBodyCell(a,t,e)
  9387. }};
  9388. net_comcast_sms.ThreadListView.prototype._updateBodyCell=function(n,a,t){
  9389. var s=a.getNewestNonDeleted();
  9390. if(s){
  9391. var o=t.name||null;
  9392. tn=net_comcast_sms.Util.TN.pretty(t.tn),field=t.field,contents=["<div class='MessageSender'>",o?(o+"<br/>"):"",tn,field?(" ("+ZmMsg["AB_FIELD_"+field]+")"):"","</div>","<div class='MessageBody'>",AjxStringUtil.clipByLength(s.getBody(),30),"</div>"].join("");
  9393. if(n){
  9394. var e=Dwt.byId(n);
  9395. if(e){
  9396. Dwt.setInnerHtml(e,contents)
  9397. }}
  9398. return contents
  9399. }
  9400. return""
  9401. };
  9402. net_comcast_sms.ThreadListView.prototype.setEditing=function(t){
  9403. this._editing=t;
  9404. for(var o=0,a=this._list.size();
  9405. o<a;
  9406. o++){
  9407. var e=this._list.get(o),n=this._getCellId(e,ZmItem.F_FROM);
  9408. this.getBodyCellContents(n,e)
  9409. }};
  9410. net_comcast_sms.ThreadListView.prototype.getDateCellContents=function(t,e){
  9411. var a=e.getNewest();
  9412. return["<div class='MessageDate'>",a.time&&net_comcast_sms.Util.Date.computeDateStr(new Date(a.time)).replace(/\n/g,"<br/>")||"","</div>"].join("")
  9413. };
  9414. net_comcast_sms.ThreadListView.prototype._updateThread=function(e){
  9415. if(!e.getNonDeletedCount()){
  9416. if(this._controller.getThread()==e){
  9417. this._selectNextItem(true,false,true,e)
  9418. }
  9419. this.removeItem(e)
  9420. }else{
  9421. var t=this.getSelection();
  9422. if(this._list.indexOf(e)==-1){
  9423. this.addItem(e)
  9424. }else{
  9425. this.redrawItem(e)
  9426. }
  9427. this.setSelectedItems(t)
  9428. }};
  9429. net_comcast_sms.ThreadListView.prototype._selectNextItem=function(o,t,s,e){
  9430. if(!this.size()){
  9431. return
  9432. }
  9433. var a=this._getElFromItem(e),n=(a)?this._getSiblingElement(a,o):this._parentEl.firstChild;
  9434. this._scrollList(n);
  9435. this._emulateSingleClick({
  9436. target:n,button:DwtMouseEvent.LEFT,shiftKey:t,kbNavEvent:s}
  9437. )
  9438. };
  9439. net_comcast_sms.ThreadListView.senderComparator=function(t,e){
  9440. return net_comcast_sms.Util.plainComparator(t.getTN(),e.getTN())
  9441. };
  9442. net_comcast_sms.ThreadListView.COMPARATOR={};
  9443. net_comcast_sms.ThreadListView.COMPARATOR[ZmItem.F_STATUS]=net_comcast_sms.Thread.statusComparator;
  9444. net_comcast_sms.ThreadListView.COMPARATOR[ZmItem.F_FROM]=net_comcast_sms.ThreadListView.senderComparator;
  9445. net_comcast_sms.ThreadListView.COMPARATOR[ZmItem.F_DATE]=net_comcast_sms.Thread.dateComparator;
  9446. net_comcast_sms.ThreadView=function(e){
  9447. if(!arguments.length){
  9448. return
  9449. }
  9450. this._controller=e.controller;
  9451. DwtComposite.call(this,{
  9452. parent:e.parent,className:"ThreadView DwtComposite",posStyle:Dwt.STATIC_STYLE,controller:e.controller}
  9453. );
  9454. this.setScrollStyle(Dwt.SCROLL);
  9455. this._messageViews=[];
  9456. this._messageListener=new AjxCallback(this,this.updateMessages);
  9457. this._createHtml();
  9458. this._initialize()
  9459. };
  9460. net_comcast_sms.ThreadView.prototype=new DwtComposite;
  9461. net_comcast_sms.ThreadView.prototype.constructor=net_comcast_sms.ThreadView;
  9462. net_comcast_sms.ThreadView.prototype.toString=function(){
  9463. return"net_comcast_sms.ThreadView"
  9464. };
  9465. net_comcast_sms.ThreadView.prototype.TEMPLATE=net_comcast_sms.TEMPLATE_BASE+"#ThreadView";
  9466. net_comcast_sms.ThreadView.prototype._createHtml=function(){
  9467. this._createHtmlFromTemplate(this.TEMPLATE,{
  9468. id:this.getHTMLElId()}
  9469. )
  9470. };
  9471. net_comcast_sms.ThreadView.prototype._initialize=function(){
  9472. var a=this.getHTMLElId();
  9473. var e=this._contactLabel=new DwtLabel({
  9474. parent:this,className:"ThreadLabel DwtLabel overviewHeader"}
  9475. );
  9476. e.replaceElement(a+"_header");
  9477. e.setVisible(false);
  9478. this._messageArea=Dwt.byId(a+"_thread");
  9479. var t=this._moreButton=new DwtButton({
  9480. parent:this,className:"ThreadMore ZButton"}
  9481. );
  9482. t.replaceElement(a+"_more");
  9483. t.addSelectionListener(new AjxListener(this,this.getMore));
  9484. t.setText(this._controller.getMsg("threadMoreButton"));
  9485. t.setVisible(false)
  9486. };
  9487. net_comcast_sms.ThreadView.prototype.dispose=function(){
  9488. this.clear(true);
  9489. DwtComposite.prototype.dispose.call(this)
  9490. };
  9491. net_comcast_sms.ThreadView.prototype.setSize=function(e,t){
  9492. DwtComposite.prototype.setSize.call(this,e,t)
  9493. };
  9494. net_comcast_sms.ThreadView.prototype.setVisible=function(a){
  9495. DwtComposite.prototype.setVisible.call(this,a);
  9496. if(this._pendingScroll){
  9497. var t=this._pendingScroll,e=this.getHtmlElement();
  9498. setTimeout(function(){
  9499. net_comcast_sms.Util.DOM.scrollIntoView(t,e)
  9500. }
  9501. ,1);
  9502. this._pendingScroll=null
  9503. }};
  9504. net_comcast_sms.ThreadView.prototype.getMsg=function(){
  9505. return this._controller.getMsg.apply(this._controller,arguments)
  9506. };
  9507. net_comcast_sms.ThreadView.prototype.setContact=function(e){
  9508. var t=this._controller.getMsg("threadHeader",[e.name?(e.name+" "):"",net_comcast_sms.Util.TN.pretty(e.tn),e.field?(" ("+ZmMsg["AB_FIELD_"+e.field]+")"):""].join(""));
  9509. this._contactLabel.setText(t)
  9510. };
  9511. net_comcast_sms.ThreadView.prototype.set=function(a){
  9512. if(a){
  9513. this._moreButton.setVisible(false);
  9514. var t=a.getTN();
  9515. var e=a.getContact(new AjxCallback(this,this.setContact));
  9516. this.setContact(e);
  9517. if(a!=this._thread){
  9518. this._sorted=false;
  9519. this.clear(false);
  9520. this._thread=a;
  9521. this._thread.addListener("messages",this._messageListener);
  9522. this._thread.addListener("status",this._messageListener)
  9523. }
  9524. this._updateList(a);
  9525. var o=this;
  9526. setTimeout(function(){
  9527. o._moreButton.setVisible(true);
  9528. o._updateMoreButton()
  9529. }
  9530. ,0)
  9531. }
  9532. this._contactLabel.setVisible(!!a)
  9533. };
  9534. net_comcast_sms.ThreadView.prototype.reset=function(){
  9535. this.set(this._thread);
  9536. this.setEditing(this._editing);
  9537. this.setForwarding(this._forwarding)
  9538. };
  9539. net_comcast_sms.ThreadView.prototype._updateList=function(e){
  9540. if(e instanceof net_comcast_sms.Thread){
  9541. this.setMessages(e.getMessages().getArray())
  9542. }};
  9543. net_comcast_sms.ThreadView.prototype.addMessage=function(a){
  9544. if(a.status!==net_comcast_sms.Message.STATUS_DELETED&&!this.getMessageView(a)){
  9545. var e=new net_comcast_sms.MessageView({
  9546. parent:this,controller:this._controller,message:a}
  9547. );
  9548. var t=this._messageViews;
  9549. var o;
  9550. t.push(e);
  9551. if(t.length>1){
  9552. t.sort(function(s,n){
  9553. return net_comcast_sms.Message.dateComparator(s.getMessage(),n.getMessage())
  9554. }
  9555. );
  9556. o=AjxUtil.indexOf(t,e)
  9557. }else{
  9558. o=0
  9559. }
  9560. e.reparentHtmlElement(this._messageArea,o);
  9561. a.setRead()
  9562. }};
  9563. net_comcast_sms.ThreadView.prototype.setMessages=function(a){
  9564. var t=this._messageViews;
  9565. var r=t.length&&t[t.length-1];
  9566. for(var n=0;
  9567. n<a.length;
  9568. n++){
  9569. var l=a[n];
  9570. var h=this.getMessageView(l);
  9571. if(!h){
  9572. h=new net_comcast_sms.MessageView({
  9573. parent:this,controller:this._controller,message:l}
  9574. );
  9575. t.push(h)
  9576. }
  9577. l.setRead()
  9578. }
  9579. t.sort(function(d,c){
  9580. return net_comcast_sms.Message.dateComparator(d.getMessage(),c.getMessage())
  9581. }
  9582. );
  9583. for(var n=0;
  9584. n<t.length;
  9585. n++){
  9586. t[n].reparentHtmlElement(this._messageArea,n)
  9587. }
  9588. var s=t.length&&t[t.length-1];
  9589. if(s&&r!=s){
  9590. var e=this.getHtmlElement(),o=s.getHtmlElement();
  9591. if(this.getVisible()&&this.parent.getVisible()){
  9592. setTimeout(function(){
  9593. net_comcast_sms.Util.DOM.scrollIntoView(o,e)
  9594. }
  9595. ,1)
  9596. }else{
  9597. this._pendingScroll=o
  9598. }}};
  9599. net_comcast_sms.ThreadView.prototype.getMessageView=function(o){
  9600. var e=this._messageViews;
  9601. for(var a=0,t=e.length;
  9602. a<t;
  9603. a++){
  9604. if(e[a].getMessage()==o){
  9605. return e[a]
  9606. }}
  9607. return null
  9608. };
  9609. net_comcast_sms.ThreadView.prototype.clear=function(e){
  9610. if(this._thread){
  9611. this._thread.removeListener("messages",this._messageListener);
  9612. this._thread.removeListener("status",this._messageListener)
  9613. }
  9614. while(this._messageViews.length){
  9615. this.removeChild(this._messageViews.pop())
  9616. }
  9617. this._controller.setEditing(false);
  9618. if(e){
  9619. this.parent.set(null)
  9620. }};
  9621. net_comcast_sms.ThreadView.prototype.getMore=function(e){
  9622. this._thread.more(new AjxCallback(this,this._updateMoreButton,[e]))
  9623. };
  9624. net_comcast_sms.ThreadView.prototype._updateMoreButton=function(e){
  9625. this._moreButton.setVisible(this._thread.hasMore());
  9626. caboUtil.run(e)
  9627. };
  9628. net_comcast_sms.ThreadView.prototype.setEditing=function(e){
  9629. this._editing=e;
  9630. for(var a=0,t=this._messageViews.length;
  9631. a<t;
  9632. a++){
  9633. this._messageViews[a].setEditing(e)
  9634. }};
  9635. net_comcast_sms.ThreadView.prototype.setForwarding=function(e){
  9636. this._forwarding=e;
  9637. for(var a=0,t=this._messageViews.length;
  9638. a<t;
  9639. a++){
  9640. this._messageViews[a].setForwarding(e)
  9641. }};
  9642. net_comcast_sms.ThreadView.prototype.getMessagesForForwarding=function(){
  9643. var o=[];
  9644. for(var a=0,t=this._messageViews.length;
  9645. a<t;
  9646. a++){
  9647. var e=this._messageViews[a];
  9648. if(e.isSelectedForForwarding()){
  9649. o.push(e.getMessage())
  9650. }}
  9651. return o
  9652. };
  9653. net_comcast_sms.ThreadView.prototype.updateMessages=function(){
  9654. var e=this._thread.getNonDeletedCount();
  9655. if(!e){
  9656. this.clear(true)
  9657. }else{
  9658. if(e!=this._messageViews.length){
  9659. this.reset()
  9660. }}};
  9661. net_comcast_sms.ThreadViewList=function(e){
  9662. if(!arguments.length){
  9663. return
  9664. }
  9665. this._controller=e.controller;
  9666. DwtComposite.call(this,{
  9667. parent:e.parent,className:"ThreadViewList DwtComposite",posStyle:Dwt.ABSOLUTE_STYLE,noMaximize:false,controller:e.controller}
  9668. );
  9669. this.setScrollStyle(DwtControl.CLIP);
  9670. this._createHtml();
  9671. this._initialize()
  9672. };
  9673. net_comcast_sms.ThreadViewList.prototype=new DwtComposite;
  9674. net_comcast_sms.ThreadViewList.prototype.constructor=net_comcast_sms.ThreadViewList;
  9675. net_comcast_sms.ThreadViewList.prototype.toString=function(){
  9676. return"net_comcast_sms.ThreadViewList"
  9677. };
  9678. net_comcast_sms.ThreadViewList.prototype.TEMPLATE=net_comcast_sms.TEMPLATE_BASE+"#ThreadViewList";
  9679. net_comcast_sms.ThreadViewList.prototype._createHtml=function(){
  9680. this._createHtmlFromTemplate(this.TEMPLATE,{
  9681. id:this.getHTMLElId()}
  9682. )
  9683. };
  9684. net_comcast_sms.ThreadViewList.prototype._initialize=function(){
  9685. var s=this.getHTMLElId();
  9686. var n=this._noneView=new DwtControl({
  9687. parent:this}
  9688. );
  9689. n.replaceElement(s+"_none");
  9690. n.setContent(AjxTemplate.expand("dwt.Widgets#DwtListView-NoResults",{
  9691. message:this._controller.getMsg("threadPleaseSelect")}
  9692. ));
  9693. n.setVisible(true);
  9694. var a=this._threadView=new net_comcast_sms.ThreadView({
  9695. parent:this,controller:this._controller}
  9696. );
  9697. a.replaceElement(s+"_thread");
  9698. a.setVisible(false);
  9699. var o=this._replyView=new net_comcast_sms.ReplyView({
  9700. parent:this,controller:this._controller}
  9701. );
  9702. o.replaceElement(s+"_reply");
  9703. o.setEnabled(false);
  9704. var t=this._deleteThreadView=new net_comcast_sms.DeleteThreadView({
  9705. parent:this,controller:this._controller}
  9706. );
  9707. t.replaceElement(s+"_deleteThread");
  9708. var e=this._forwardView=new net_comcast_sms.ForwardView({
  9709. parent:this,controller:this._controller}
  9710. );
  9711. e.replaceElement(s+"_forward");
  9712. this.setEditing(false);
  9713. this.setForwarding(false);
  9714. this.setVisible(false)
  9715. };
  9716. net_comcast_sms.ThreadViewList.prototype.setSize=function(e,o){
  9717. DwtComposite.prototype.setSize.call(this,e,o);
  9718. var a=(this._replyView.getVisible()&&this._replyView)||(this._deleteThreadView.getVisible()&&this._deleteThreadView)||(this._forwardView.getVisible()&&this._forwardView);
  9719. var t=o-(a&&a.getSize().y||0);
  9720. this._threadView.setSize(e,t)
  9721. };
  9722. net_comcast_sms.ThreadViewList.prototype.setVisible=function(e){
  9723. DwtComposite.prototype.setVisible.call(this,e);
  9724. this._threadView.setVisible(e);
  9725. if(e){
  9726. net_comcast_sms.Util.DOM.resetSize(this)
  9727. }};
  9728. net_comcast_sms.ThreadViewList.prototype.clear=function(){
  9729. this._threadView.clear();
  9730. this.set(null)
  9731. };
  9732. net_comcast_sms.ThreadViewList.prototype.set=function(e){
  9733. var t=!!e;
  9734. this._noneView.setVisible(!t);
  9735. this._threadView.setVisible(!!t);
  9736. this._threadView.set(e);
  9737. this._deleteThreadView.set(e);
  9738. this._thread=e;
  9739. net_comcast_sms.Util.DOM.resetSize(this);
  9740. this._replyView.setEnabled(t);
  9741. this._threadView.setVisible(t)
  9742. };
  9743. net_comcast_sms.ThreadViewList.prototype.getThreadView=function(){
  9744. return this._threadView
  9745. };
  9746. net_comcast_sms.ThreadViewList.prototype.setEditing=function(e){
  9747. this._editing=e;
  9748. this._threadView.setEditing(e);
  9749. this._replyView.setVisible(!e&&!this._forwarding);
  9750. this._deleteThreadView.setVisible(e&&!this._forwarding);
  9751. this._deleteThreadView.set();
  9752. this._forwardView.setVisible(!e&&this._forwarding);
  9753. if(!e&&this._forwarding){
  9754. this._forwardView.setThread(this._thread)
  9755. }
  9756. net_comcast_sms.Util.DOM.resetSize(this)
  9757. };
  9758. net_comcast_sms.ThreadViewList.prototype.setForwarding=function(e){
  9759. this._forwarding=e;
  9760. this._threadView.setForwarding(e);
  9761. this._replyView.setVisible(!e&&!this._editing);
  9762. this._deleteThreadView.setVisible(!e&&this._editing);
  9763. this._forwardView.setVisible(e&&!this._editing);
  9764. if(e&&!this._editing){
  9765. this._forwardView.setThread(this._thread)
  9766. }
  9767. net_comcast_sms.Util.DOM.resetSize(this)
  9768. };
  9769. net_comcast_sms.ThreadViewList.prototype.popdownChoosers=function(){
  9770. this._replyView.popdownChoosers()
  9771. };
  9772. net_comcast_sms.ThreadViewList.prototype.getReplyView=function(){
  9773. return this._replyView
  9774. };
  9775. net_comcast_sms.MessageView=function(e){
  9776. if(!arguments.length){
  9777. return
  9778. }
  9779. this._controller=e.controller;
  9780. DwtComposite.call(this,{
  9781. parent:e.parent,className:"MessageView DwtComposite",controller:e.controller}
  9782. );
  9783. this._message=e.message;
  9784. this._noImage=this._controller.getHandler().getResource("img/none.png");
  9785. this._statusListener=new AjxCallback(this,this.updateStatus);
  9786. this._createHtml();
  9787. this._initialize();
  9788. this._setMouseEvents();
  9789. this.addListener(DwtEvent.ONMOUSEUP,new AjxListener(this,this._mouseUpListener));
  9790. this._updateStatusCallback=new AjxCallback(this,this.updateStatus)
  9791. };
  9792. net_comcast_sms.MessageView.prototype=new DwtComposite;
  9793. net_comcast_sms.MessageView.prototype.constructor=net_comcast_sms.MessageView;
  9794. net_comcast_sms.MessageView.prototype.toString=function(){
  9795. return"net_comcast_sms.MessageView"
  9796. };
  9797. net_comcast_sms.MessageView.prototype.TEMPLATE={};
  9798. net_comcast_sms.MessageView.prototype.TEMPLATE[0]=net_comcast_sms.MessageView.prototype.TEMPLATE[net_comcast_sms.Message.DIR_INCOMING]=net_comcast_sms.TEMPLATE_BASE+"#MessageViewIncoming";
  9799. net_comcast_sms.MessageView.prototype.TEMPLATE[net_comcast_sms.Message.DIR_OUTGOING]=net_comcast_sms.TEMPLATE_BASE+"#MessageViewOutgoing";
  9800. net_comcast_sms.MessageView.prototype.NO_CONTACT_IMAGE=(window.ZmEditContactViewImage&&ZmEditContactViewImage.NO_IMAGE_URL)||(appContextPath+"/img/large/ImgPerson_48.png");
  9801. net_comcast_sms.MessageView.prototype.NO_CONTACT_IMAGE_CLASS="ImgPerson_48";
  9802. net_comcast_sms.MessageView.prototype._createHtml=function(){
  9803. if(!net_comcast_sms.MessageView.LOCKED_HTML){
  9804. net_comcast_sms.MessageView.LOCKED_HTML="<img src='"+this._controller.getHandler().getResource("img/locked.png")+"'/>"
  9805. }
  9806. this._createHtmlFromTemplate(this.TEMPLATE[this._message.dir]||this.TEMPLATE[0],{
  9807. id:this.getHTMLElId(),msg:this._controller.getHandler().getMsgObj()}
  9808. )
  9809. };
  9810. net_comcast_sms.MessageView.prototype._initialize=function(){
  9811. var e=this.getHTMLElId();
  9812. var a=this._message;
  9813. var h=this._controller;
  9814. this._img=Dwt.byId(e+"_image");
  9815. if(a.dir==net_comcast_sms.Message.DIR_INCOMING){
  9816. net_comcast_sms.Util.Contact.getByTN(a.tn,new AjxCallback(this,this._setContactImage))
  9817. }else{
  9818. this._clearContactImage()
  9819. }
  9820. this._body=Dwt.byId(e+"_body");
  9821. this._body.innerHTML=this.replaceEmoticons(a.getBody());
  9822. this._balloon=Dwt.byId(e+"_balloon");
  9823. this._annotation=Dwt.byId(e+"_annotation");
  9824. this._lock=Dwt.byId(e+"_lock");
  9825. var n=this._lockButton=new DwtButton({
  9826. parent:this}
  9827. );
  9828. n.replaceElement(e+"_button_lock",true,true);
  9829. n.setText(h.getMsg("actionLock"));
  9830. n.addSelectionListener(new AjxListener(this,this.lock,[true]));
  9831. var t=this._unlockButton=new DwtButton({
  9832. parent:this}
  9833. );
  9834. t.replaceElement(e+"_button_unlock",true,true);
  9835. t.setText(h.getMsg("actionUnlock"));
  9836. t.addSelectionListener(new AjxListener(this,this.unlock,[true]));
  9837. var l=this._deleteButton=new DwtButton({
  9838. parent:this}
  9839. );
  9840. l.replaceElement(e+"_button_delete",true,true);
  9841. l.setText(h.getMsg("actionDelete"));
  9842. l.addSelectionListener(new AjxListener(this,this.remove,[true]));
  9843. var s=this._restoreButton=new DwtButton({
  9844. parent:this}
  9845. );
  9846. s.replaceElement(e+"_button_restore",true,true);
  9847. s.setText(h.getMsg("actionRestore"));
  9848. s.addSelectionListener(new AjxListener(this,this.restore,[true]));
  9849. var r=this._forwardCheckbox=new DwtCheckbox({
  9850. parent:this}
  9851. );
  9852. r.replaceElement(e+"_check_forward",true,true);
  9853. r.addSelectionListener(new AjxListener(this,this._handleForwardSelect));
  9854. var o=this._processing=new DwtLabel({
  9855. parent:this}
  9856. );
  9857. o.replaceElement(e+"_processing");
  9858. o.setText(h.getMsg("processing"));
  9859. var d=this._restoring=new DwtLabel({
  9860. parent:this}
  9861. );
  9862. d.replaceElement(e+"_restoring");
  9863. d.setText(h.getMsg("processing"));
  9864. this._messageDiv=Dwt.byId(e+"_message");
  9865. this._restoreDiv=Dwt.byId(e+"_restore");
  9866. this.setVisible(false);
  9867. var c=this;
  9868. setTimeout(function(){
  9869. c.updateStatus();
  9870. c.setVisible(true)
  9871. }
  9872. ,0);
  9873. a.addListener("status",this._statusListener)
  9874. };
  9875. net_comcast_sms.MessageView.prototype.dispose=function(){
  9876. this._message.removeListener("status",this._statusListener);
  9877. DwtComposite.prototype.dispose.call(this)
  9878. };
  9879. net_comcast_sms.MessageView.prototype._setContactImage=function(t){
  9880. var a=this._img;
  9881. this._clearContactImage();
  9882. if(t&&a){
  9883. var e=new Image();
  9884. e.onload=function(){
  9885. a.src=e.src;
  9886. a.className=""
  9887. };
  9888. e.src=net_comcast_sms.Util.Contact.getImageUrl(t)
  9889. }};
  9890. net_comcast_sms.MessageView.prototype._clearContactImage=function(){
  9891. var e=this._img;
  9892. if(e){
  9893. e.src=this._noImage;
  9894. e.className=this.NO_CONTACT_IMAGE_CLASS
  9895. }};
  9896. net_comcast_sms.MessageView.prototype.setEditing=function(e){
  9897. this._editing=e;
  9898. this.condClassName(e,"editing","");
  9899. this.updateStatus()
  9900. };
  9901. net_comcast_sms.MessageView.prototype.setForwarding=function(e){
  9902. this._forwarding=e;
  9903. this.condClassName(e,"forwarding","");
  9904. if(!e){
  9905. this._forwardCheckbox.setSelected(false);
  9906. this._handleForwardSelect()
  9907. }};
  9908. net_comcast_sms.MessageView.prototype.setProcessing=function(e){
  9909. this.condClassName(e,"processing","")
  9910. };
  9911. net_comcast_sms.MessageView.prototype.isSelectedForForwarding=function(){
  9912. return this._forwardCheckbox.isSelected()
  9913. };
  9914. net_comcast_sms.MessageView.prototype._handleForwardSelect=function(){
  9915. this._message.setForwardStatus(this._forwardCheckbox.isSelected())
  9916. };
  9917. net_comcast_sms.MessageView.prototype.updateStatus=function(){
  9918. this.setProcessing(false);
  9919. var a=this._getStatus();
  9920. var t=(a==net_comcast_sms.Message.STATUS_LOCKED);
  9921. var e=(a==net_comcast_sms.Message.STATUS_DELETED);
  9922. if(this._editing){
  9923. this._setButtonVisible(this._lockButton,!t);
  9924. this._setButtonVisible(this._unlockButton,t);
  9925. this._setButtonVisible(this._deleteButton,!t&&!e)
  9926. }
  9927. Dwt.setVisible(this._restoreDiv,e);
  9928. Dwt.setVisible(this._messageDiv,!e);
  9929. this._lock.innerHTML=(a==net_comcast_sms.Message.STATUS_LOCKED)?net_comcast_sms.MessageView.LOCKED_HTML:"";
  9930. this._annotation.innerHTML=this._message.getAnnotation();
  9931. this.condClassName(e,"deleted","");
  9932. this._setActionEnabled("lock",!t);
  9933. this._setActionEnabled("unlock",t);
  9934. this._setActionEnabled("delete",!t&&!e);
  9935. this._setActionEnabled("forward",!e&&!this._editing)
  9936. };
  9937. net_comcast_sms.MessageView.prototype._setButtonVisible=function(e,t){
  9938. if(e.getVisible()!=t){
  9939. e.setVisible(t)
  9940. }};
  9941. net_comcast_sms.MessageView.prototype._setPendingStatus=function(e){
  9942. this._message.setEditStatus(e)
  9943. };
  9944. net_comcast_sms.MessageView.prototype._getStatus=function(e){
  9945. return(!e&&this._message.getEditStatus())||this._message.status
  9946. };
  9947. net_comcast_sms.MessageView.prototype._applyStatus=function(e){
  9948. this._message.setStatus(this._getStatus(false),e)
  9949. };
  9950. net_comcast_sms.MessageView.prototype.getMessage=function(){
  9951. return this._message
  9952. };
  9953. net_comcast_sms.MessageView.prototype.lock=function(e){
  9954. this._setPendingStatus(net_comcast_sms.Message.STATUS_LOCKED);
  9955. this._handleChangeStatus(e);
  9956. return true
  9957. };
  9958. net_comcast_sms.MessageView.prototype.unlock=function(e){
  9959. this._setPendingStatus(net_comcast_sms.Message.STATUS_READ);
  9960. this._handleChangeStatus(e);
  9961. return true
  9962. };
  9963. net_comcast_sms.MessageView.prototype.remove=function(e){
  9964. if(this._getStatus()!=net_comcast_sms.Message.STATUS_LOCKED){
  9965. this._setPendingStatus(net_comcast_sms.Message.STATUS_DELETED);
  9966. this._handleChangeStatus(e);
  9967. return true
  9968. }};
  9969. net_comcast_sms.MessageView.prototype.restore=function(e){
  9970. this._setPendingStatus(net_comcast_sms.Message.STATUS_READ);
  9971. this._handleChangeStatus(e);
  9972. return true
  9973. };
  9974. net_comcast_sms.MessageView.prototype._handleChangeStatus=function(e){
  9975. if(e){
  9976. this.setProcessing(true);
  9977. this._applyStatus(this._updateStatusCallback)
  9978. }else{
  9979. this.updateStatus()
  9980. }};
  9981. net_comcast_sms.MessageView.prototype.forward=function(){
  9982. this._controller.setForwarding(true);
  9983. this._forwardCheckbox.setSelected(true);
  9984. this._handleForwardSelect()
  9985. };
  9986. net_comcast_sms.MessageView.prototype._mouseUpListener=function(e){
  9987. if(e.button==DwtMouseEvent.RIGHT){
  9988. if(!this._editing&&!this._forwarding&&caboUtil.Dom.isAncestor(this._balloon,e.target)){
  9989. var t=this._getActionMenu();
  9990. if(t&&t instanceof DwtMenu){
  9991. this.updateStatus();
  9992. t.popup(0,e.docX,e.docY)
  9993. }}}
  9994. this._controller.popdownChoosers()
  9995. };
  9996. net_comcast_sms.MessageView.prototype._getActionMenu=function(){
  9997. if(!this._actionMenu){
  9998. var t=this._controller;
  9999. var o=[{
  10000. id:"lock",text:t.getMsg("actionLock"),listener:new AjxListener(this,this.lock,[true])}
  10001. ,{
  10002. id:"unlock",text:t.getMsg("actionUnlock"),listener:new AjxListener(this,this.unlock,[true])}
  10003. ,{
  10004. id:"delete",text:t.getMsg("actionDelete"),listener:new AjxListener(this,this.remove,[true])}
  10005. ,{
  10006. id:"forward",text:t.getMsg("actionForward"),listener:new AjxListener(this,this.forward)}
  10007. ];
  10008. var h=this._actionMenu=new ZmPopupMenu(this);
  10009. for(var s=0,n=o.length;
  10010. s<n;
  10011. s++){
  10012. var r=o[s];
  10013. var e="lock";
  10014. var a=h.createMenuItem(r.id,{
  10015. text:r.text}
  10016. );
  10017. h.addSelectionListener(r.id,r.listener)
  10018. }}
  10019. return this._actionMenu
  10020. };
  10021. net_comcast_sms.MessageView.prototype._setActionEnabled=function(o,e){
  10022. var a=this._getActionMenu();
  10023. var t=a.getItemById("menuItemId",o);
  10024. if(t){
  10025. t.setVisible(e)
  10026. }};
  10027. net_comcast_sms.MessageView.prototype.replaceEmoticons=function(e){
  10028. var o=net_comcast_sms.Util.EMOTICONS;
  10029. for(var a=0,t=o.length;
  10030. a<t;
  10031. a++){
  10032. var s=o[a];
  10033. var n=new RegExp(s.regex,"g");
  10034. e=e.replace(n,"<span class='"+s.img+"'></span>")
  10035. }
  10036. return e
  10037. };
  10038. net_comcast_sms.MessageView.prototype.reparentHtmlElement=function(a,e){
  10039. if(typeof a=="string"){
  10040. a=document.getElementById(a)
  10041. }
  10042. if(!a){
  10043. return
  10044. }
  10045. var t=this.getHtmlElement();
  10046. if(t){
  10047. if(e==null){
  10048. a.appendChild(t)
  10049. }else{
  10050. if(typeof e=="object"){
  10051. a.insertBefore(t,e)
  10052. }else{
  10053. if(a.childNodes[e]){
  10054. if(a.childNodes[e]!=t){
  10055. a.insertBefore(t,a.childNodes[e])
  10056. }}else{
  10057. a.appendChild(t)
  10058. }}}}};
  10059. net_comcast_sms.ComposeView=function(e){
  10060. if(!arguments.length){
  10061. return
  10062. }
  10063. this._controller=e.controller;
  10064. DwtComposite.call(this,{
  10065. parent:e.parent,className:e.className||"ComposeView DwtComposite",posStyle:e.posStyle||Dwt.ABSOLUTE_STYLE,noMaximize:false,controller:e.controller}
  10066. );
  10067. this.resetCachedBodyText();
  10068. this._recipients={};
  10069. this._maxHeight=100;
  10070. this._minHeight=100;
  10071. this._keyEventListened="keydown";
  10072. this._subjectSettingListener=new AjxListener(this,this._updateSubjectVisibility);
  10073. this._updateSendListeners=[];
  10074. this.setVisible(true);
  10075. this._setKeyPressEventHdlr(false)
  10076. };
  10077. net_comcast_sms.ComposeView.prototype=new DwtComposite;
  10078. net_comcast_sms.ComposeView.prototype.constructor=net_comcast_sms.ComposeView;
  10079. net_comcast_sms.ComposeView.prototype.toString=function(){
  10080. return"net_comcast_sms.ComposeView"
  10081. };
  10082. net_comcast_sms.ComposeView.prototype.getMsg=function(){
  10083. return this._controller.getMsg.apply(this._controller,arguments)
  10084. };
  10085. net_comcast_sms.ComposeView.prototype.TEMPLATE=net_comcast_sms.TEMPLATE_BASE+"#Compose";
  10086. net_comcast_sms.ComposeView.RECIPIENT_SEP=/\s*[;,]+\s*/g;
  10087. net_comcast_sms.ComposeView.SUBJECT_SEP=". ";
  10088. net_comcast_sms.ComposeView.prototype.getTabGroupMember=function(){
  10089. if(!this._tabGroup){
  10090. this._tabGroup=new DwtTabGroup(this.toString())
  10091. }
  10092. this._tabGroup.toString=function(){
  10093. return"SMS Compose View"
  10094. };
  10095. return this._tabGroup
  10096. };
  10097. net_comcast_sms.ComposeView.prototype._createHtml=function(){
  10098. this._createHtmlFromTemplate(this.TEMPLATE,{
  10099. id:this.getHTMLElId(),msg:this._controller.getHandler().getMsgObj()}
  10100. )
  10101. };
  10102. net_comcast_sms.ComposeView.prototype._initialize=function(){
  10103. var e=this.getHTMLElId();
  10104. var a=this.getTabGroupMember();
  10105. var h=this._contactLabel=new DwtLabel({
  10106. parent:this,className:"ComposeLabel DwtLabel overviewHeader"}
  10107. );
  10108. h.replaceElement(e+"_header");
  10109. h.setText(this.getMsg("composeHeader"));
  10110. var s=this._toField=new DwtInputField({
  10111. parent:this}
  10112. );
  10113. s.replaceElement(e+"_to");
  10114. a.addMember(s.getTabGroupMember());
  10115. var t=this._acList=new ZmAutocompleteListView({
  10116. dataClass:this._controller.getAutocompleter(),matchValue:"text",compCallback:new AjxCallback(this,this._acComplete),keyUpCallback:new AjxCallback(this,this._acKeyUp),options:{
  10117. addrBubbles:false,needItem:true}}
  10118. );
  10119. t.handle(s.getInputElement());
  10120. t.setActiveAccount(appCtxt.accountList.activeAccount);
  10121. t._acInterval=700;
  10122. var n=this._textField=new DwtHtmlEditor({
  10123. parent:this,mode:DwtHtmlEditor.HTML}
  10124. );
  10125. n.replaceElement(e+"_field");
  10126. n.setSize("100%",100);
  10127. caboUtil.augment(n,"_handleEditorEvent",AjxCallback.simpleClosure(this._handleEditorEvent,this),false);
  10128. a.addMember(n);
  10129. n.replaceNodeContent=net_comcast_sms.ComposeView.__override_replaceNodeContent(this);
  10130. var r=this._lengthLabel=new DwtLabel({
  10131. parent:this}
  10132. );
  10133. r.replaceElement(e+"_length");
  10134. var l=this._controller._toolbar.getButton(ZmOperation.SMS_COMPOSEEMOTICON);
  10135. var o=this._emoChooser=new net_comcast_sms.EmoticonChooser({
  10136. button:l,callback:new AjxCallback(this,this._applyEmoticon)}
  10137. );
  10138. this._loadEmoticons();
  10139. this.updateLength()
  10140. };
  10141. net_comcast_sms.ComposeView.prototype.dispose=function(){
  10142. this.popdownChoosers();
  10143. DwtComposite.prototype.dispose.call(this)
  10144. };
  10145. net_comcast_sms.ComposeView.prototype._handleEditorEvent=function(a,t){
  10146. if(t.type==this._keyEventListened){
  10147. var e=this,o;
  10148. if(t.keyCode==13){
  10149. a=false;
  10150. o=true
  10151. }
  10152. if(t.keyCode==90&&t.ctrlKey){
  10153. a=false
  10154. }
  10155. if(t.keyCode==89&&t.ctrlKey){
  10156. a=false
  10157. }
  10158. window.setTimeout(function(){
  10159. e.resetCachedBodyText();
  10160. e.updateLength();
  10161. if(o&&e._canSend()){
  10162. e.send()
  10163. }}
  10164. ,0)
  10165. }
  10166. if(t.type=="mousedown"){
  10167. this._controller.popdownChoosers();
  10168. if(this._acList){
  10169. this._acList.show(false)
  10170. }}
  10171. if(!this.getEnabled()){
  10172. a=false
  10173. }
  10174. if(!a){
  10175. DwtUiEvent.setDhtmlBehaviour(t,true,false)
  10176. }
  10177. return a
  10178. };
  10179. net_comcast_sms.ComposeView.prototype.addUpdateSendListener=function(e){
  10180. this._updateSendListeners.push(e)
  10181. };
  10182. net_comcast_sms.ComposeView.prototype._updateSend=function(){
  10183. caboUtil.run(this._updateSendListeners,this._canSend(),this._hasInvalidTNs(),!!this.getBodyText().length)
  10184. };
  10185. net_comcast_sms.ComposeView.prototype.setVisible=function(e){
  10186. if(e&&!this._initialized){
  10187. this._createHtml();
  10188. this._initialize();
  10189. this._initialized=true
  10190. }
  10191. DwtComposite.prototype.setVisible.call(this,e);
  10192. if(e){
  10193. this.updateMaxHeight();
  10194. this.updateHeight();
  10195. if(this._toField){
  10196. this._toField.focus()
  10197. }}
  10198. if(!e){
  10199. this.popdownChoosers()
  10200. }};
  10201. net_comcast_sms.ComposeView.prototype.popdownChoosers=function(){
  10202. if(this._emoChooser){
  10203. this._emoChooser.popdown()
  10204. }};
  10205. net_comcast_sms.ComposeView.prototype.setSize=function(e,t){
  10206. DwtComposite.prototype.setSize.apply(this,arguments);
  10207. this.updateMaxHeight();
  10208. this.updateHeight()
  10209. };
  10210. net_comcast_sms.ComposeView.prototype.setContent=function(a){
  10211. this._textField.setContent(a);
  10212. this.resetCachedBodyText();
  10213. var e=this;
  10214. var t=function(){
  10215. if(e._textField._pendingContent){
  10216. setTimeout(t,10)
  10217. }else{
  10218. e.updateLength()
  10219. }};
  10220. t()
  10221. };
  10222. net_comcast_sms.ComposeView.prototype.addRecipient=function(h,s){
  10223. if(h){
  10224. var o;
  10225. if(h instanceof ZmContact){
  10226. if(!s){
  10227. var r=ZmContact.PHONE_FIELDS;
  10228. for(var t=0;
  10229. t<r.length;
  10230. t++){
  10231. s=r[t];
  10232. if(h.getAttr(s)){
  10233. break
  10234. }}}
  10235. if(s){
  10236. var a=h.getAttr(s);
  10237. var n=ZmContact._AB_FIELD[s];
  10238. o=h.getFileAs()+" ["+n+"]";
  10239. this._recipients[o]={
  10240. field:s,value:a}
  10241. }}else{
  10242. if(AjxUtil.isString(h)){
  10243. var e=net_comcast_sms.Util.TN.pretty(h,true);
  10244. if(e){
  10245. o=e
  10246. }}}
  10247. if(o){
  10248. this._toField.setValue(this._toField.getValue()+o+"; ");
  10249. return true
  10250. }}
  10251. return false
  10252. };
  10253. net_comcast_sms.ComposeView.prototype._acComplete=function(a,o,t){
  10254. var e=this;
  10255. if(t&&t.value){
  10256. setTimeout(function(){
  10257. e._recipients[t.text]={
  10258. field:t.field,value:t.value&&t.value.address||t.value};
  10259. e._updateSend()
  10260. }
  10261. ,100)
  10262. }};
  10263. net_comcast_sms.ComposeView.prototype._acKeyUp=function(){
  10264. var e=this;
  10265. setTimeout(function(){
  10266. e._updateSend()
  10267. }
  10268. ,200)
  10269. };
  10270. net_comcast_sms.ComposeView.prototype.cancel=function(){
  10271. this.parent.endMailComposeView(this);
  10272. this._controller.setForwarding(false)
  10273. };
  10274. net_comcast_sms.ComposeView.prototype.reset=function(){
  10275. this._toField.setValue("");
  10276. this._recipients={};
  10277. this.setContent("")
  10278. };
  10279. net_comcast_sms.ComposeView.prototype.getRecipients=function(d,n){
  10280. var o=this._toField.getValue().split(net_comcast_sms.ComposeView.RECIPIENT_SEP);
  10281. var e=[];
  10282. var r=[];
  10283. var h=!d||!!(AjxUtil.intersection(d,ZmContact.PHONE_FIELDS).length);
  10284. d=(AjxUtil.isObject(d)&&(AjxUtil.isArray(d)?AjxUtil.arrayAsHash(d):d))||null;
  10285. for(var a=0,t=o.length;
  10286. a<t;
  10287. a++){
  10288. var s=o[a]&&AjxStringUtil.trim(o[a]);
  10289. if(s){
  10290. var c=this._recipients[s];
  10291. if(c){
  10292. if(!d){
  10293. e.push(c)
  10294. }else{
  10295. if(d[c.field]){
  10296. e.push(c.value)
  10297. }}}else{
  10298. if(AjxUtil.isString(s)&&h){
  10299. var l=net_comcast_sms.Util.TN.normalize(s,true);
  10300. if(l){
  10301. e.push(l)
  10302. }else{
  10303. r.push(s)
  10304. }}}
  10305. if(n&&e.length){
  10306. break
  10307. }}}
  10308. return{
  10309. invalid:r,valid:e}
  10310. };
  10311. net_comcast_sms.ComposeView.prototype.getPhoneRecipients=function(){
  10312. var e=this;
  10313. return AjxUtil.collapseList(AjxUtil.map(this.getRecipients(ZmContact.PHONE_FIELDS).valid,function(t){
  10314. return net_comcast_sms.Util.TN.normalize(t,true)
  10315. }
  10316. ))
  10317. };
  10318. net_comcast_sms.ComposeView.prototype.CONVERTOR={
  10319. _before:function(e){
  10320. this.__ff_hasIgnoredBR=false;
  10321. return e
  10322. }
  10323. ,"#text":function(t,e){
  10324. var a=t.nodeValue;
  10325. if(a.search(AjxStringUtil._NON_WHITESPACE)!=-1){
  10326. if(e&&(e.lastNode=="ol"||e.lastNode=="ul")){
  10327. return"\n"
  10328. }
  10329. return(e&&e.isPreformatted)?a:a.replace(AjxStringUtil._LF," ")
  10330. }
  10331. return a
  10332. }
  10333. ,br:function(t,e){
  10334. if(!this.__ff_hasIgnoredBR){
  10335. this.__ff_hasIgnoredBR=true;
  10336. return""
  10337. }
  10338. return null
  10339. }
  10340. ,img:function(t,e){
  10341. var a=Dwt.getObjectFromElement(t,"emoticon");
  10342. if(a&&a.chars){
  10343. return a.chars
  10344. }
  10345. return null
  10346. }};
  10347. net_comcast_sms.ComposeView.prototype.CONVERTOR.p=net_comcast_sms.ComposeView.prototype.CONVERTOR.br;
  10348. net_comcast_sms.ComposeView.prototype.CONVERTOR_NOEMO={
  10349. _before:net_comcast_sms.ComposeView.prototype.CONVERTOR._before,"#text":net_comcast_sms.ComposeView.prototype.CONVERTOR["#text"],br:net_comcast_sms.ComposeView.prototype.CONVERTOR.br,p:net_comcast_sms.ComposeView.prototype.CONVERTOR.p,img:function(t,e){
  10350. var a=Dwt.getObjectFromElement(t,"emoticon");
  10351. if(a){
  10352. return"@"
  10353. }
  10354. return null
  10355. }};
  10356. net_comcast_sms.ComposeView.prototype.resetCachedBodyText=function(){
  10357. return this._bodyValue=null
  10358. };
  10359. net_comcast_sms.ComposeView.prototype.getBodyText=function(){
  10360. if(this._bodyValue===null){
  10361. var t=this._textField._getIframeDoc();
  10362. var e=t&&t.body;
  10363. this._bodyValue=net_comcast_sms.Util.DOM.convertHtml2Text(e,this.CONVERTOR,true)
  10364. }
  10365. return this._bodyValue||""
  10366. };
  10367. net_comcast_sms.ComposeView.prototype.getRawBodyText=function(){
  10368. var t=this._textField._getIframeDoc();
  10369. var e=t&&t.body&&t.body.innerHTML;
  10370. e=e&&e.replace(/<[^>]+>/g,"");
  10371. return e
  10372. };
  10373. net_comcast_sms.ComposeView.prototype.getFullText=function(){
  10374. return this.getBodyText()
  10375. };
  10376. net_comcast_sms.ComposeView.prototype.updateLength=function(){
  10377. if(this.getEnabled()){
  10378. if(this._emoticonElements&&this._hasUnconvertedEmoticons()){
  10379. this._replaceEmoticons()
  10380. }
  10381. var o=this._textField;
  10382. var s=this.getFullText();
  10383. var t=s.length;
  10384. if(t!==this._lastCharCount){
  10385. var n=Math.ceil(t/160)||1;
  10386. var a=t%160;
  10387. this._lengthLabel.setText([a,"/",160,n>1?(" ("+n+")"):""].join(""));
  10388. this._lastCharCount=t;
  10389. this._updateSend()
  10390. }
  10391. var e=s.replace(/[^\n]/g,"").length+1;
  10392. if(e!==this._lastLineCount){
  10393. this.updateHeight();
  10394. this._lastLineCount=e
  10395. }}};
  10396. net_comcast_sms.ComposeView.prototype.updateMaxHeight=function(){
  10397. var o=0;
  10398. var s=this.getHtmlElement().firstChild;
  10399. if(s){
  10400. var e=Dwt.byId(this.getHTMLElId()+"_textRow");
  10401. for(var a=0,t=s.rows.length;
  10402. a<t;
  10403. a++){
  10404. var r=s.rows[a];
  10405. if(r!=e){
  10406. var n=r.clientHeight;
  10407. o+=n
  10408. }}
  10409. this._maxHeight=this.getSize().y-o
  10410. }};
  10411. net_comcast_sms.ComposeView.prototype.updateHeight=function(){
  10412. if(this._textField){
  10413. var a=this._maxHeight;
  10414. var o=Math.min(this._minHeight,a);
  10415. var t=this._textField._getIframeDoc().body;
  10416. var s=0;
  10417. if(t){
  10418. try{
  10419. s=t.scrollHeight||(Dwt.getSize(t).y+(parseInt(caboUtil.Dom.getElementCssProperty(t,"margin-top"))||0)+(parseInt(caboUtil.Dom.getElementCssProperty(t,"margin-bottom"))))
  10420. }
  10421. catch(n){}
  10422. this._textField.setSize(Dwt.DEFAULT,Math.max(Math.min(s,a),o))
  10423. }}};
  10424. net_comcast_sms.ComposeView.prototype._canSend=function(){
  10425. return !!(this.getBodyText().length&&this.getRecipients(null,true).valid.length)
  10426. };
  10427. net_comcast_sms.ComposeView.prototype._hasInvalidTNs=function(){
  10428. return !!(this.getRecipients(null,false).invalid.length)
  10429. };
  10430. net_comcast_sms.ComposeView.prototype.send=function(r){
  10431. if(this._hasInvalidTNs()){
  10432. this._controller.getHandler().displayStatusMessage({
  10433. msg:this.getMsg("composeInvalidTN"),level:ZmStatusView.LEVEL_CRITICAL}
  10434. );
  10435. this._updateSend()
  10436. }else{
  10437. if(!AjxStringUtil.trim(this.getFullText()).length){
  10438. this._controller.getHandler().displayStatusMessage({
  10439. msg:this.getMsg("composeEmptyError"),level:ZmStatusView.LEVEL_WARNING}
  10440. );
  10441. this._updateSend()
  10442. }else{
  10443. var o="sms";
  10444. var t=this._controller.getMessageStore();
  10445. var s=this.getPhoneRecipients();
  10446. var n=[];
  10447. if(s&&s.length){
  10448. n.push(o)
  10449. }
  10450. if(n.length){
  10451. this._controller.getHandler().displayStatusMessage(this.getMsg("composeSendingStatus"));
  10452. var e=new caboUtil.MultiCallback(n,null,new AjxCallback(this,this._handleSend,[s,r]),true);
  10453. if(s&&s.length){
  10454. for(var a=0;
  10455. a<s.length;
  10456. a++){
  10457. s[a]=s[a].replace(/^\+1/,"").replace(/^\+/,net_comcast_sms.Util.TN.INTL_PREFIX)
  10458. }
  10459. t.sendMessage(s,this.getFullText(),e.getCallback(o))
  10460. }}}}};
  10461. net_comcast_sms.ComposeView.prototype._handleSend=function(t,h,e){
  10462. var a="sms";
  10463. if(e){
  10464. var o=this._controller;
  10465. var l=o.getHandler();
  10466. var c=e[a];
  10467. if(c&&c[0] instanceof net_comcast_sms.RestError){
  10468. l.displayStatusMessage(this.getMsg((c[0].code=="0030009")?"quotaError":"composeErrorStatus",[c[0].message]));
  10469. return
  10470. }}
  10471. l.displayStatusMessage(this.getMsg("composeSentStatus"));
  10472. this.reset();
  10473. var r=t&&t.length&&t[0];
  10474. var s=this._controller.getMessageStore();
  10475. var n=s.getThread(r);
  10476. if(n){
  10477. n.refresh(new AjxCallback(this,this._handleLoadThread,[n,h]))
  10478. }else{
  10479. s.refreshThreadHeaders(new AjxCallback(this,this._handleLoadHeaders,[r,h]))
  10480. }};
  10481. net_comcast_sms.ComposeView.prototype._handleLoadHeaders=function(t,o){
  10482. var a=this._controller.getMessageStore();
  10483. var e=a.getThread(t);
  10484. if(e){
  10485. e.load(new AjxCallback(this,this._handleLoadThread,[e,o]))
  10486. }else{
  10487. this._controller.hideCompose();
  10488. caboUtil.run(o)
  10489. }};
  10490. net_comcast_sms.ComposeView.prototype._handleLoadThread=function(e,t){
  10491. this._controller.hideCompose();
  10492. this._controller.setThread(e);
  10493. caboUtil.run(t)
  10494. };
  10495. net_comcast_sms.ComposeView.prototype._hasUnconvertedEmoticons=function(e){
  10496. e=e||this.getRawBodyText();
  10497. var o=net_comcast_sms.Util.EMOTICONS;
  10498. for(var a=0,t=o.length;
  10499. a<t;
  10500. a++){
  10501. if(new RegExp(o[a].regex).test(e)){
  10502. return true
  10503. }}
  10504. return false
  10505. };
  10506. net_comcast_sms.ComposeView.prototype._applyEmoticon=function(t){
  10507. var n=this._textField,a=n._getIframeDoc();
  10508. n.focus();
  10509. var o=a.createTextNode(t);
  10510. n._insertNodeAtSelection(o,true);
  10511. if(AjxEnv.isIE){
  10512. n._currInsPt=a.selection.createRange();
  10513. if(a.selection.type=="None"){
  10514. n._currInsPt.collapse(false)
  10515. }}else{
  10516. var e=n._getRange();
  10517. e.selectNode(o);
  10518. e.collapse(false)
  10519. }
  10520. this.resetCachedBodyText();
  10521. this.updateLength()
  10522. };
  10523. net_comcast_sms.ComposeView.prototype._loadEmoticons=function(){
  10524. this._emoticonElements=[];
  10525. var l=net_comcast_sms.Util.EMOTICONS;
  10526. for(var r=0,o=l.length;
  10527. r<o;
  10528. r++){
  10529. var a=l[r];
  10530. var t=this._emoticonElements[r]=document.createElement("img");
  10531. t.src=this._controller.getHandler().getResource("img/none.png");
  10532. t.className=a.img;
  10533. document.body.appendChild(t);
  10534. var d=["background-color","background-image","background-repeat","background-attachment","width","height"];
  10535. if(AjxEnv.isIE){
  10536. d.push("background-position-x","background-position-y")
  10537. }else{
  10538. d.push("background-position")
  10539. }
  10540. for(var n=0;
  10541. n<d.length;
  10542. n++){
  10543. var s=d[n];
  10544. var u=s.replace(/-(\w)/g,function(e,m){
  10545. return m.toUpperCase()
  10546. }
  10547. );
  10548. var c=caboUtil.Dom.getElementCssProperty(t,s);
  10549. if(!AjxUtil.isUndefined(c)){
  10550. t.style[u]=c
  10551. }}
  10552. t.style.display="inline-block";
  10553. t.className="__emoticon__";
  10554. Dwt.associateElementWithObject(t,a,"emoticon");
  10555. try{
  10556. document.body.removeChild(t)
  10557. }
  10558. catch(h){}}};
  10559. net_comcast_sms.ComposeView.prototype._replaceEmoticons=function(){
  10560. var h=this._textField,u=net_comcast_sms.Util.EMOTICONS,r=net_comcast_sms.Util.DOM.getElements(null,"img","__emoticon__",h._getIframeDoc());
  10561. if(AjxEnv.isIE){
  10562. var d=h._getIframeDoc().selection.createRange();
  10563. var a=d.getBookmark()
  10564. }else{
  10565. var d=h._getRange();
  10566. d.collapse(false);
  10567. var s=document.createElement("span");
  10568. d.insertNode(s)
  10569. }
  10570. for(var c=0,n=u.length;
  10571. c<n;
  10572. c++){
  10573. var t=this._emoticonElements[c],o=u[c];
  10574. if(AjxEnv.isIE){
  10575. h.range_findnreplace={
  10576. findText:true}
  10577. }
  10578. var l=h.searchnReplace({
  10579. searchstring:o.regex,replacestring:t,replacemode:"all"}
  10580. )
  10581. }
  10582. if(AjxEnv.isIE){
  10583. d.moveToBookmark(a)
  10584. }else{
  10585. d.selectNode(s);
  10586. d.collapse(false);
  10587. var e=h._getIframeWin().getSelection();
  10588. e.removeAllRanges();
  10589. e.addRange(d);
  10590. s.parentNode.removeChild(s)
  10591. }};
  10592. net_comcast_sms.ComposeView.__override_replaceNodeContent=function(e){
  10593. return function(l,s,x,m,g){
  10594. var p=this,q=e;
  10595. if(!AjxEnv.isIE||(x&&(x.nodeType!=1))){
  10596. for(var k=0;
  10597. k<l.childNodes.length;
  10598. k++){
  10599. var w=l.childNodes[k];
  10600. if(w.nodeType==3){
  10601. if(x&&(x.nodeType==1)){
  10602. if(s.test(w.nodeValue)){
  10603. var b=w.nodeValue.split(s);
  10604. var o=w.nextSibling;
  10605. for(var v=0;
  10606. v<b.length;
  10607. v++){
  10608. var t=(v==0)?w:w.cloneNode(false);
  10609. t.nodeValue=b[v];
  10610. if(v>0){
  10611. var r=x.cloneNode(false);
  10612. var y=Dwt.getObjectFromElement(x,"emoticon");
  10613. if(y){
  10614. Dwt.associateElementWithObject(r,AjxUtil.hashCopy(y),"emoticon")
  10615. }
  10616. if(o){
  10617. l.insertBefore(r,o);
  10618. l.insertBefore(t,o)
  10619. }else{
  10620. l.appendChild(r);
  10621. l.appendChild(t)
  10622. }
  10623. g++;
  10624. if(m!="all"){
  10625. return g
  10626. }}}}
  10627. s.lastIndex=0
  10628. }else{
  10629. var u=w.nodeValue.replace(s,x);
  10630. if(w.nodeValue!=u){
  10631. w.nodeValue=u;
  10632. g++;
  10633. if(m!="all"){
  10634. return g
  10635. }}}}
  10636. this.replaceNodeContent(w,s,x,m,g);
  10637. if((m!="all")&&(g>0)){
  10638. return g
  10639. }}}else{
  10640. var c=100;
  10641. do{
  10642. var f=p._getIframeDoc().selection.createRange();
  10643. f.moveToElementText(l);
  10644. var a=f.text,h=s.exec(a);
  10645. if(h){
  10646. s.lastIndex=0;
  10647. var n=h[0].length,z=f.duplicate();
  10648. f.collapse(true);
  10649. f.moveEnd("character",n);
  10650. for(var k=0,d=-1;
  10651. k<100&&d<0;
  10652. k++){
  10653. if(k>0){
  10654. f.moveStart("character",1);
  10655. f.moveEnd("character",1)
  10656. }
  10657. d=f.compareEndPoints("EndToEnd",z);
  10658. if(s.test(f.text)){
  10659. f.pasteHTML(x.outerHTML);
  10660. g++;
  10661. if(m!="all"){
  10662. return g
  10663. }
  10664. break
  10665. }
  10666. s.lastIndex=0
  10667. }}}
  10668. while(h&&c--)
  10669. }
  10670. return g
  10671. }
  10672. };
  10673. net_comcast_sms.ComposeViewList=function(e){
  10674. if(!arguments.length){
  10675. return
  10676. }
  10677. this._controller=e.controller;
  10678. DwtComposite.call(this,{
  10679. parent:e.parent,className:"ComposeViewList DwtComposite",posStyle:Dwt.ABSOLUTE_STYLE,noMaximize:false,controller:e.controller}
  10680. );
  10681. this._composeViews=[];
  10682. this.setScrollStyle(Dwt.SCROLL)
  10683. };
  10684. net_comcast_sms.ComposeViewList.prototype=new DwtComposite;
  10685. net_comcast_sms.ComposeViewList.prototype.constructor=net_comcast_sms.ComposeViewList;
  10686. net_comcast_sms.ComposeViewList.prototype.toString=function(){
  10687. return"net_comcast_sms.ComposeViewList"
  10688. };
  10689. net_comcast_sms.ComposeViewList.MIN_COMPOSE_SIZE=250;
  10690. net_comcast_sms.ComposeViewList.prototype.setSize=function(r,s){
  10691. DwtComposite.prototype.setSize.call(this,r,s);
  10692. var c=this.getVisibleViews();
  10693. var t=c.length;
  10694. if(t){
  10695. var o=s;
  10696. var h=Math.floor(o/t);
  10697. var l=0;
  10698. if(h<net_comcast_sms.ComposeViewList.MIN_COMPOSE_SIZE){
  10699. h=net_comcast_sms.ComposeViewList.MIN_COMPOSE_SIZE;
  10700. r-=caboUtil.Dom.getScrollBarWidth()
  10701. }else{
  10702. l=o-t*h
  10703. }
  10704. var u=[];
  10705. var n=0;
  10706. for(var a=0,e=c.length;
  10707. a<e;
  10708. a++){
  10709. var d=h+((l-->0)?1:0);
  10710. c[a].setSize(r,d);
  10711. c[a].setLocation(Dwt.DEFAULT,n);
  10712. n+=d
  10713. }}};
  10714. net_comcast_sms.ComposeViewList.prototype.setVisible=function(o){
  10715. DwtComposite.prototype.setVisible.call(this,o);
  10716. for(var a=0,t=this._composeViews.length;
  10717. a<t;
  10718. a++){
  10719. var e=this._composeViews[a];
  10720. e.setVisible(o&&!e._forceHide)
  10721. }
  10722. if(o){
  10723. net_comcast_sms.Util.DOM.resetSize(this)
  10724. }};
  10725. net_comcast_sms.ComposeViewList.prototype.getVisibleViews=function(){
  10726. var o=[];
  10727. for(var a=0,t=this._composeViews.length;
  10728. a<t;
  10729. a++){
  10730. var e=this._composeViews[a];
  10731. if(e.getVisible()){
  10732. o.push(e)
  10733. }}
  10734. return o
  10735. };
  10736. net_comcast_sms.ComposeViewList.prototype.clear=function(){
  10737. for(var a=0,t=this._composeViews.length;
  10738. a<t;
  10739. a++){
  10740. var e=this._composeViews[a];
  10741. this._tabGroup.removeMember(e.getTabGroupMember());
  10742. e._forceHide=true;
  10743. e.setVisible(false)
  10744. }};
  10745. net_comcast_sms.ComposeViewList.prototype.reset=function(){
  10746. this.clear()
  10747. };
  10748. net_comcast_sms.ComposeViewList.prototype.add=function(){
  10749. var e=new net_comcast_sms.ComposeView({
  10750. parent:this,controller:this._controller}
  10751. );
  10752. this._composeViews.push(e);
  10753. this._tabGroup.addMember(e.getTabGroupMember());
  10754. net_comcast_sms.Util.DOM.resetSize(this);
  10755. return e
  10756. };
  10757. net_comcast_sms.ComposeViewList.prototype.addMail=function(a){
  10758. if(!a){
  10759. a={
  10760. action:ZmId.OP_NEW_MESSAGE}
  10761. }
  10762. var t=new net_comcast_sms.ComposeController(this,this._controller._handler);
  10763. var e=t.getView();
  10764. e._controller=t;
  10765. this._composeViews.push(e);
  10766. net_comcast_sms.Util.DOM.resetSize(this);
  10767. t.doAction(a);
  10768. return e
  10769. };
  10770. net_comcast_sms.ComposeViewList.prototype.endMailComposeView=function(t){
  10771. t=t&&AjxUtil.toArray(t)||this._composeViews;
  10772. for(var a=0;
  10773. a<t.length;
  10774. a++){
  10775. var e=t[a];
  10776. this._controller.unmoveMailComposeToolbar(e._controller);
  10777. AjxUtil.arrayRemove(this._composeViews,e);
  10778. DwtControl.prototype.dispose.call(e)
  10779. }};
  10780. net_comcast_sms.ComposeViewList.prototype.get=function(e){
  10781. return this._composeViews[e]
  10782. };
  10783. net_comcast_sms.ComposeViewList.prototype.getFirst=function(){
  10784. return this._composeViews[0]||null
  10785. };
  10786. net_comcast_sms.ComposeViewList.prototype.getTabGroupMember=function(){
  10787. if(!this._tabGroup){
  10788. this._tabGroup=new DwtTabGroup(this.toString());
  10789. for(var t=0,e=this._composeViews.length;
  10790. t<e;
  10791. t++){
  10792. this._tabGroup.addMember(this._composeViews[t].getTabGroupMember())
  10793. }
  10794. this._tabGroup.toString=function(){
  10795. return"SMS Compose View List"
  10796. }
  10797. }
  10798. return this._tabGroup
  10799. };
  10800. net_comcast_sms.ReplyView=function(e){
  10801. if(!arguments.length){
  10802. return
  10803. }
  10804. this._controller=e.controller;
  10805. net_comcast_sms.ComposeView.call(this,{
  10806. parent:e.parent,className:e.className||"ReplyView DwtComposite",controller:e.controller,posStyle:Dwt.STATIC_STYLE}
  10807. );
  10808. this._createHtml();
  10809. this._initialize()
  10810. };
  10811. net_comcast_sms.ReplyView.prototype=new net_comcast_sms.ComposeView;
  10812. net_comcast_sms.ReplyView.prototype.constructor=net_comcast_sms.ReplyView;
  10813. net_comcast_sms.ReplyView.prototype.toString=function(){
  10814. return"net_comcast_sms.ReplyView"
  10815. };
  10816. net_comcast_sms.ReplyView.prototype.TEMPLATE=net_comcast_sms.TEMPLATE_BASE+"#Reply";
  10817. net_comcast_sms.ReplyView.prototype._createHtml=function(){
  10818. this._createHtmlFromTemplate(this.TEMPLATE,{
  10819. id:this.getHTMLElId(),msg:this._controller.getHandler().getMsgObj()}
  10820. )
  10821. };
  10822. net_comcast_sms.ReplyView.prototype._initialize=function(){
  10823. var r=this.getHTMLElId();
  10824. var o=this._textField=new DwtHtmlEditor({
  10825. parent:this,mode:DwtHtmlEditor.HTML}
  10826. );
  10827. o.replaceElement(r+"_field");
  10828. if(!AjxEnv.isIE){
  10829. o.addListener(DwtEvent.ONKEYUP,new AjxListener(this,this.updateLength))
  10830. }else{
  10831. var n=AjxCallback.simpleClosure(this.updateLength,this);
  10832. setTimeout(function(){
  10833. var l=o._getIframeDoc();
  10834. var h=l&&l.body;
  10835. if(h){
  10836. h.attachEvent(DwtEvent.ONKEYUP,n)
  10837. }}
  10838. ,0)
  10839. }
  10840. o.setSize("100%",64);
  10841. caboUtil.augment(o,"_handleEditorEvent",AjxCallback.simpleClosure(this._handleEditorEvent,this),false);
  10842. o.replaceNodeContent=net_comcast_sms.ComposeView.__override_replaceNodeContent(this);
  10843. var e=this._lengthLabel=new DwtLabel({
  10844. parent:this}
  10845. );
  10846. e.replaceElement(r+"_length");
  10847. var s=this._emoButton=new DwtButton({
  10848. parent:this}
  10849. );
  10850. s.setImage("HappyEmoticon");
  10851. s.replaceElement(r+"_emoticon");
  10852. var a=this._emoChooser=new net_comcast_sms.EmoticonChooser({
  10853. button:s,callback:new AjxCallback(this,this._applyEmoticon)}
  10854. );
  10855. var t=this._sendButton=new DwtButton({
  10856. parent:this}
  10857. );
  10858. t.setText(this.getMsg("replySendButton"));
  10859. t.replaceElement(r+"_send");
  10860. t.addSelectionListener(new AjxListener(this,this.send));
  10861. this.addUpdateSendListener(new AjxCallback(this,this._updateSendButton));
  10862. this._updateSendButton(false);
  10863. this._loadEmoticons();
  10864. this.updateLength()
  10865. };
  10866. net_comcast_sms.ReplyView.prototype.reset=function(){
  10867. this.setContent("")
  10868. };
  10869. net_comcast_sms.ReplyView.prototype.setVisible=function(e){
  10870. DwtComposite.prototype.setVisible.call(this,e);
  10871. if(this._textField){
  10872. this._textField.setVisible(e);
  10873. this._textField.setVisibility(e)
  10874. }
  10875. if(this._emoButton){
  10876. this._emoButton.setVisible(e);
  10877. this._emoButton.setVisibility(e)
  10878. }
  10879. if(this._sendButton){
  10880. this._sendButton.setVisible(e);
  10881. this._sendButton.setVisibility(e)
  10882. }
  10883. if(!e){
  10884. this.popdownChoosers()
  10885. }};
  10886. net_comcast_sms.ReplyView.prototype.popdownChoosers=function(){
  10887. net_comcast_sms.ComposeView.prototype.popdownChoosers.call(this)
  10888. };
  10889. net_comcast_sms.ReplyView.prototype.setEnabled=function(e){
  10890. DwtComposite.prototype.setEnabled.call(this,e);
  10891. this._textField.setEnabled(e);
  10892. this._emoButton.setEnabled(e)
  10893. };
  10894. net_comcast_sms.ReplyView.prototype._updateSendButton=function(e){
  10895. this._sendButton.setEnabled(e)
  10896. };
  10897. net_comcast_sms.ReplyView.prototype.updateHeight=function(){};
  10898. net_comcast_sms.ReplyView.prototype._canSend=function(){
  10899. return !!(this.getBodyText().length)
  10900. };
  10901. net_comcast_sms.ReplyView.prototype._hasInvalidTNs=function(){
  10902. return false
  10903. };
  10904. net_comcast_sms.ReplyView.prototype.send=function(a){
  10905. if(!AjxStringUtil.trim(this.getFullText()).length){
  10906. this._controller.getHandler().displayStatusMessage({
  10907. msg:this.getMsg("composeEmptyError"),level:ZmStatusView.LEVEL_WARNING}
  10908. );
  10909. this._updateSend()
  10910. }else{
  10911. var t=this._controller.getMessageStore();
  10912. var e=this._controller.getThread();
  10913. t.sendMessage(e.getTN(),this.getFullText(),new AjxCallback(this,this._handleSend,[a||null]));
  10914. this.reset()
  10915. }};
  10916. net_comcast_sms.ReplyView.prototype._handleSend=function(o,a){
  10917. var e=this._controller;
  10918. var t=e.getHandler();
  10919. if(a instanceof net_comcast_sms.RestError){
  10920. t.displayStatusMessage(this.getMsg((a.code=="0030009")?"quotaError":"composeErrorStatus",[a.message]));
  10921. return
  10922. }
  10923. this._textField.focus();
  10924. caboUtil.run(o)
  10925. };
  10926. net_comcast_sms.ForwardView=function(e){
  10927. if(!arguments.length){
  10928. return
  10929. }
  10930. this._controller=e.controller;
  10931. DwtComposite.call(this,{
  10932. parent:e.parent,className:"ForwardView DwtComposite",controller:e.controller}
  10933. );
  10934. this._updateListener=new AjxListener(this,this.updateButtons);
  10935. this._createHtml();
  10936. this._initialize();
  10937. this._thread=null
  10938. };
  10939. net_comcast_sms.ForwardView.prototype=new DwtComposite;
  10940. net_comcast_sms.ForwardView.prototype.constructor=net_comcast_sms.ForwardView;
  10941. net_comcast_sms.ForwardView.prototype.toString=function(){
  10942. return"net_comcast_sms.ForwardView"
  10943. };
  10944. net_comcast_sms.ForwardView.prototype.TEMPLATE=net_comcast_sms.TEMPLATE_BASE+"#Forward";
  10945. net_comcast_sms.ForwardView.prototype._createHtml=function(){
  10946. this._createHtmlFromTemplate(this.TEMPLATE,{
  10947. id:this.getHTMLElId()}
  10948. )
  10949. };
  10950. net_comcast_sms.ForwardView.prototype._initialize=function(){
  10951. var a=this.getHTMLElId();
  10952. var t=this._smsButton=new DwtButton({
  10953. parent:this}
  10954. );
  10955. t.setText(this._controller.getMsg("forwardTextButton"));
  10956. t.replaceElement(a+"_sms");
  10957. t.addSelectionListener(new AjxListener(this,this._fwdAsSms));
  10958. var e=this._emailButton=new DwtButton({
  10959. parent:this}
  10960. );
  10961. e.setText(this._controller.getMsg("forwardEmailButton"));
  10962. e.replaceElement(a+"_email");
  10963. e.addSelectionListener(new AjxListener(this,this._fwdAsEmail));
  10964. if(!appCtxt.get(ZmSetting.MAIL_ENABLED)){
  10965. e.setVisible(false)
  10966. }
  10967. this.updateButtons()
  10968. };
  10969. net_comcast_sms.ForwardView.prototype.dispose=function(){
  10970. if(this._thread){
  10971. this._thread.removeListener("forwardstatus",this._updateListener)
  10972. }
  10973. DwtComposite.prototype.dispose.call(this)
  10974. };
  10975. net_comcast_sms.ForwardView.prototype.setThread=function(e){
  10976. if(this._thread){
  10977. this._thread.removeListener("forwardstatus",this._updateListener)
  10978. }
  10979. if(e){
  10980. e.addListener("forwardstatus",this._updateListener)
  10981. }
  10982. this._thread=e
  10983. };
  10984. net_comcast_sms.ForwardView.prototype._getSelectedMessages=function(){
  10985. var e=this.parent.getThreadView();
  10986. return e&&e.getMessagesForForwarding()||[]
  10987. };
  10988. net_comcast_sms.ForwardView.prototype._fwdAsSms=function(){
  10989. this._controller.doForwardAsText(this._getSelectedMessages())
  10990. };
  10991. net_comcast_sms.ForwardView.prototype._fwdAsEmail=function(){
  10992. this._controller.doForwardAsEmail(this._getSelectedMessages())
  10993. };
  10994. net_comcast_sms.ForwardView.prototype.updateButtons=function(){
  10995. var t=this._getSelectedMessages();
  10996. var e=!!(t&&t.length);
  10997. this._smsButton.setEnabled(e);
  10998. this._emailButton.setEnabled(e)
  10999. };
  11000. net_comcast_sms.DeleteThreadView=function(e){
  11001. if(!arguments.length){
  11002. return
  11003. }
  11004. this._controller=e.controller;
  11005. DwtComposite.call(this,{
  11006. parent:e.parent,className:"DeleteThreadView DwtComposite",controller:e.controller}
  11007. );
  11008. this._deleteListener=new AjxListener(this,this._doDelete);
  11009. this._updateListener=new AjxCallback(this,this.update);
  11010. this._createHtml();
  11011. this._initialize()
  11012. };
  11013. net_comcast_sms.DeleteThreadView.prototype=new DwtComposite;
  11014. net_comcast_sms.DeleteThreadView.prototype.constructor=net_comcast_sms.DeleteThreadView;
  11015. net_comcast_sms.DeleteThreadView.prototype.toString=function(){
  11016. return"net_comcast_sms.DeleteThreadView"
  11017. };
  11018. net_comcast_sms.DeleteThreadView.prototype.TEMPLATE=net_comcast_sms.TEMPLATE_BASE+"#DeleteThread";
  11019. net_comcast_sms.DeleteThreadView.prototype._createHtml=function(){
  11020. this._createHtmlFromTemplate(this.TEMPLATE,{
  11021. id:this.getHTMLElId()}
  11022. )
  11023. };
  11024. net_comcast_sms.DeleteThreadView.prototype._initialize=function(){
  11025. var a=this.getHTMLElId();
  11026. var e=this._countLabel=new DwtLabel({
  11027. parent:this}
  11028. );
  11029. e.replaceElement(a+"_messageCount");
  11030. var t=this._deleteButton=new DwtButton({
  11031. parent:this}
  11032. );
  11033. t.setText("<nobr>"+this._controller.getMsg("deleteThreadButton")+"</nobr>");
  11034. t.replaceElement(a+"_deleteButton");
  11035. t.setEnabled(false);
  11036. t.addSelectionListener(new AjxListener(this,this._deleteThread))
  11037. };
  11038. net_comcast_sms.DeleteThreadView.prototype.dispose=function(){
  11039. if(this._thread){
  11040. this._thread.removeListener("editstatus",this._updateListener);
  11041. this._thread.removeListener("status",this._updateListener);
  11042. this._thread.removeListener("messages",this._updateListener)
  11043. }
  11044. DwtComposite.prototype.dispose.call(this)
  11045. };
  11046. net_comcast_sms.DeleteThreadView.prototype.set=function(e){
  11047. if(e){
  11048. if(this._thread){
  11049. this._thread.removeListener("editstatus",this._updateListener);
  11050. this._thread.removeListener("status",this._updateListener);
  11051. this._thread.removeListener("messages",this._updateListener)
  11052. }
  11053. this._thread=e;
  11054. e.addListener("editstatus",this._updateListener);
  11055. e.addListener("status",this._updateListener);
  11056. e.addListener("messages",this._updateListener)
  11057. }
  11058. this.update()
  11059. };
  11060. net_comcast_sms.DeleteThreadView.prototype._updateCount=function(){
  11061. if(this._thread instanceof net_comcast_sms.Thread){
  11062. this._countLabel.setText(this._controller.getMsg("deleteThreadMsg",[this._thread.getNonDeletedCount()]))
  11063. }};
  11064. net_comcast_sms.DeleteThreadView.prototype._deleteThread=function(){
  11065. var e=this._dialog=appCtxt.getOkCancelMsgDialog();
  11066. e.reset();
  11067. e.setMessage(this._controller.getMsg("deleteThreadWarning"));
  11068. e.setButtonListener(DwtDialog.OK_BUTTON,this._deleteListener);
  11069. e.popup()
  11070. };
  11071. net_comcast_sms.DeleteThreadView.prototype._doDelete=function(){
  11072. this._dialog.popdown();
  11073. this._thread.deleteThread()
  11074. };
  11075. net_comcast_sms.DeleteThreadView.prototype._handleDelete=function(){
  11076. this.update()
  11077. };
  11078. net_comcast_sms.DeleteThreadView.prototype.update=function(){
  11079. var e=this._thread;
  11080. var o=false;
  11081. if(e){
  11082. for(var a=0,t=e.size();
  11083. a<t&&!o;
  11084. a++){
  11085. var n=e.getByIndex(a);
  11086. if(n.canDelete()&&n.getEditStatus()!=net_comcast_sms.Message.STATUS_LOCKED){
  11087. o=true
  11088. }}
  11089. this._deleteButton.setEnabled(o);
  11090. this._updateCount()
  11091. }};
  11092. net_comcast_sms.EmoticonChooser=function(t){
  11093. if(!arguments.length){
  11094. return
  11095. }
  11096. this._emoticons=net_comcast_sms.Util.EMOTICONS;
  11097. DwtToolTip.call(this,appCtxt.getShell(),"EmoticonChooser DwtToolTip");
  11098. var a=this.id=this._div.id=Dwt.getNextId();
  11099. var e="dwt.Widgets#"+this._borderStyle;
  11100. this._div.innerHTML=AjxTemplate.expand(e,a+"_");
  11101. this._contentDiv=document.getElementById(a+"_Contents");
  11102. this._button=t.button;
  11103. t.button.addSelectionListener(new AjxListener(this,this.toggle));
  11104. this._callback=t.callback;
  11105. this._createHtml();
  11106. this._initialize();
  11107. net_comcast_sms.EmoticonChooser.instances.push(this)
  11108. };
  11109. net_comcast_sms.EmoticonChooser.prototype=new DwtToolTip;
  11110. net_comcast_sms.EmoticonChooser.prototype.constructor=net_comcast_sms.EmoticonChooser;
  11111. net_comcast_sms.EmoticonChooser.prototype.toString=function(){
  11112. return"net_comcast_sms.EmoticonChooser"
  11113. };
  11114. net_comcast_sms.EmoticonChooser.prototype.TEMPLATE=net_comcast_sms.TEMPLATE_BASE+"#EmoticonChooser";
  11115. net_comcast_sms.EmoticonChooser.instances=[];
  11116. net_comcast_sms.EmoticonChooser.prototype.charsToImg=function(o){
  11117. for(var a=0,t=this._emoticons.length;
  11118. a<t;
  11119. a++){
  11120. var n=this._emoticons[a];
  11121. if(n.chars==o){
  11122. return n.img
  11123. }}};
  11124. net_comcast_sms.EmoticonChooser.prototype._createHtml=function(){
  11125. this.setContent(AjxTemplate.expand(this.TEMPLATE,{
  11126. id:this.id,count:this._emoticons.length}
  11127. ),true)
  11128. };
  11129. net_comcast_sms.EmoticonChooser.prototype._initialize=function(){
  11130. this._emos=[];
  11131. var e=this.id+"_emo";
  11132. var s=this.id+"_btn";
  11133. for(var o=0,a=this._emoticons.length;
  11134. o<a;
  11135. o++){
  11136. var n=this._emos[o]=Dwt.byId(e+o);
  11137. if(n){
  11138. n.className=this._emoticons[o].img;
  11139. Dwt.setHandler(n,DwtEvent.ONCLICK,AjxCallback.simpleClosure(this._choose,this,this._emoticons[o].chars))
  11140. }
  11141. var t=Dwt.byId(s+o);
  11142. if(t){
  11143. Dwt.setHandler(t,DwtEvent.ONMOUSEOVER,net_comcast_sms.EmoticonChooser.btnOver);
  11144. Dwt.setHandler(t,DwtEvent.ONMOUSEOUT,net_comcast_sms.EmoticonChooser.btnOut)
  11145. }}};
  11146. net_comcast_sms.EmoticonChooser.prototype.toggle=function(){
  11147. if(this._poppedUp){
  11148. this.popdown()
  11149. }else{
  11150. var n=this._button.getLocation();
  11151. var t=this._button.getSize();
  11152. var e=n.x+0.5*t.x;
  11153. var o=n.y+t.y;
  11154. var a=(o+8+Dwt.getSize(Dwt.byId(this.id+"_TopPointer")).y-this._borderHeight+Dwt.getSize(this._div).y<DwtShell.getShell(window).getSize().y-5);
  11155. if(!a){
  11156. o=n.y
  11157. }
  11158. this.popup(e,o,true)
  11159. }};
  11160. net_comcast_sms.EmoticonChooser.prototype._choose=function(e){
  11161. this.popdown();
  11162. caboUtil.run(this._callback,e)
  11163. };
  11164. net_comcast_sms.EmoticonChooser.popdown=function(e){
  11165. var o=net_comcast_sms.EmoticonChooser.instances;
  11166. for(var a=0,t=o.length;
  11167. a<t;
  11168. a++){
  11169. if(!e||!net_comcast_sms.Util.DOM.isAncestor(o[a]._contentDiv,e)){
  11170. o[a].popdown()
  11171. }}};
  11172. (function(){
  11173. var e=document.onmousedown;
  11174. document.onmousedown=function(t){
  11175. if(!t){
  11176. t=window.event
  11177. }
  11178. net_comcast_sms.EmoticonChooser.popdown(t&&(t.target||t.srcElement)||null);
  11179. caboUtil.apply(e,arguments)
  11180. }
  11181. }
  11182. ());
  11183. net_comcast_sms.EmoticonChooser.btnOver=function(t){
  11184. if(!t){
  11185. t=window.event
  11186. }
  11187. var e=(t.target)?t.target:t.srcElement;
  11188. Dwt.addClass(e,"ZHover")
  11189. };
  11190. net_comcast_sms.EmoticonChooser.btnOut=function(t){
  11191. if(!t){
  11192. t=window.event
  11193. }
  11194. var e=(t.target)?t.target:t.srcElement;
  11195. Dwt.delClass(e,"ZHover")
  11196. };
  11197. net_comcast_sms.EmoticonChooser.prototype._positionElement=function(T,z){
  11198. this._popupAction=null;
  11199. var n=this._div;
  11200. var m=this.id+"_";
  11201. var j=this._dialog;
  11202. var q=5;
  11203. var c=8;
  11204. var h=8;
  11205. var e=document.getElementById(m+"TopPointer");
  11206. e.style.display="block";
  11207. var y=Dwt.getSize(e),v=y.x,a=y.y;
  11208. var s=document.getElementById(m+"BottomPointer");
  11209. s.style.display="block";
  11210. y=Dwt.getSize(s),bottomPointerWidth=y.x,bottomPointerHeight=y.y;
  11211. var k=e;
  11212. var r=DwtShell.getShell(window).getSize(),B=r.x,f=r.y;
  11213. var W=Dwt.getSize(n),x=W.x,d=W.y;
  11214. var u=this._borderHeight,C=this._borderHeight,g=this._borderWidth,w=this._borderWidth;
  11215. var A=T-x/2-c,O;
  11216. var t,o,b;
  11217. if(z+h+a-u+d<f-q){
  11218. s.style.display="none";
  11219. O=z+h+a-u;
  11220. t=u-a;
  11221. b=v;
  11222. k=e
  11223. }else{
  11224. e.style.display="none";
  11225. O=z-h-bottomPointerHeight+C-d;
  11226. t=d-C;
  11227. b=bottomPointerWidth;
  11228. k=s
  11229. }
  11230. var l=document.getElementById(m+"Contents");
  11231. if(x-g-w<b){
  11232. l.width=b;
  11233. l.style.width=String(b)+"px"
  11234. }else{
  11235. l.width="auto";
  11236. l.style.width="auto"
  11237. }
  11238. if(A<q){
  11239. A=q
  11240. }else{
  11241. if(A+x>B-q){
  11242. A=B-q-x
  11243. }}
  11244. o=T-A-b/2;
  11245. if(o+b>x-w){
  11246. o=x-w-b
  11247. }
  11248. if(o<g){
  11249. o=g
  11250. }
  11251. k.style.left=o;
  11252. k.style.top=t;
  11253. Dwt.setLocation(n,A,O);
  11254. var p=j?j.getZIndex()+Dwt._Z_INC:Dwt.Z_TOOLTIP;
  11255. Dwt.setZIndex(n,p);
  11256. this._poppedUp=true
  11257. };
  11258. caboUtil.onload("caboUtil.Preferences",function(){
  11259. net_comcast_sms.PrefsView=function(t,a,e){
  11260. if(!arguments.length){
  11261. return
  11262. }
  11263. caboUtil.Preferences.View.call(this,t,a,e)
  11264. };
  11265. net_comcast_sms.PrefsView.prototype=new caboUtil.Preferences.View;
  11266. net_comcast_sms.PrefsView.prototype.constructor=net_comcast_sms.PrefsView;
  11267. net_comcast_sms.PrefsView.prototype.toString=function(){
  11268. return"net_comcast_sms.PrefsView"
  11269. };
  11270. net_comcast_sms.PrefsView.prototype.showMe=function(){
  11271. var e=this._controller.getHandler().getSubscribed(new AjxCallback(this,this._doShow));
  11272. this._doShow(e)
  11273. };
  11274. net_comcast_sms.PrefsView.prototype._doShow=function(t){
  11275. if(AjxUtil.isUndefined(t)){
  11276. this.showLoading()
  11277. }else{
  11278. if(!t){
  11279. this.showUnsubscribed()
  11280. }else{
  11281. this.showChildren(true);
  11282. this.showLoading(false);
  11283. ZmPreferencesPage.prototype.showMe.apply(this,arguments);
  11284. if(!this._isShown){
  11285. this._isShown=true;
  11286. var e=this._controller.getHandler();
  11287. if(!e.getSettingsLoaded()){
  11288. this.showLoading(true);
  11289. e.loadSettings(new AjxCallback(this,this._handleSettingsLoaded))
  11290. }
  11291. this._dwtObjects[ZmSetting.SMS_AUTO_FORWARD_EMAIL].addSelectionListener(new AjxListener(this,this._handleForwardChanged));
  11292. this._handleForwardChanged()
  11293. }}}};
  11294. net_comcast_sms.PrefsView.prototype.showLoading=function(e){
  11295. if(!this._loadingView){
  11296. var t=this._loadingView=new DwtComposite({
  11297. parent:this}
  11298. );
  11299. t.setContent("Loading ...")
  11300. }
  11301. this.showChildren(!e);
  11302. this._loadingView.setVisible(e)
  11303. };
  11304. net_comcast_sms.PrefsView.prototype.showUnsubscribed=function(){
  11305. if(!this._unsubscribedView){
  11306. var e=this._unsubscribedView=new DwtComposite({
  11307. parent:this}
  11308. );
  11309. e.setContent("You are not subscribed to XTM")
  11310. }
  11311. this.showChildren(false);
  11312. this._unsubscribedView.setVisible(true)
  11313. };
  11314. net_comcast_sms.PrefsView.prototype.showChildren=function(e){
  11315. for(var t=0;
  11316. t<this._children.size();
  11317. t++){
  11318. this._children.get(t).setVisible(e)
  11319. }};
  11320. net_comcast_sms.PrefsView.prototype._setupCustom=function(o,e,a){
  11321. if(o=="SMS_UNSUBSCRIBE"){
  11322. var t=this._addButton(Dwt.byId(this.getHTMLElId()+"_SMS_UNSUBSCRIBE"),this._controller.getMsg("unsubscribe"),110,new AjxListener(this,this._unsubscribe));
  11323. this.setFormObject("SMS_UNSUBSCRIBE",t)
  11324. }else{
  11325. return ZmPreferencesPage.prototype._setupCustom.call(this,o,e,a)
  11326. }};
  11327. net_comcast_sms.PrefsView.prototype._handleSettingsLoaded=function(){
  11328. var e=appCtxt.getSettings();
  11329. this._dwtObjects[ZmSetting.SMS_AUTO_FORWARD_EMAIL].setSelectedValue(e.getSetting("SMS_AUTO_FORWARD_EMAIL").value);
  11330. this._dwtObjects[ZmSetting.SMS_AUTO_FORWARD_EMAIL_ADDR].setValue(e.getSetting("SMS_AUTO_FORWARD_EMAIL_ADDR").value);
  11331. this.showLoading(false)
  11332. };
  11333. net_comcast_sms.PrefsView.prototype._handleForwardChanged=function(){
  11334. var e=this._dwtObjects[ZmSetting.SMS_AUTO_FORWARD_EMAIL].getSelectedValue();
  11335. this._dwtObjects[ZmSetting.SMS_AUTO_FORWARD_EMAIL_ADDR].setEnabled(e&&e!="false")
  11336. };
  11337. net_comcast_sms.PrefsView.prototype._unsubscribe=function(){
  11338. var e=this._controller.getHandler();
  11339. var t=this._getUnsubscribeDialog();
  11340. t.reset();
  11341. t.popup()
  11342. };
  11343. net_comcast_sms.PrefsView.prototype._doUnsubscribe=function(a,e){
  11344. var t=this._controller.getHandler();
  11345. t.unsubscribe(a,e)
  11346. };
  11347. net_comcast_sms.PrefsView.prototype._getUnsubscribeDialog=function(){
  11348. if(!this._unsubscribeDialog){
  11349. var e=this._controller.getHandler();
  11350. var t=this._unsubscribeDialog=new net_comcast_sms.UnsubscribeDialog({
  11351. parent:appCtxt.getShell(),handler:e}
  11352. ,new AjxCallback(this,this._doUnsubscribe))
  11353. }
  11354. return this._unsubscribeDialog
  11355. };
  11356. net_comcast_sms.PrefsView.prototype._getTemplateData=function(){
  11357. var e=caboUtil.Preferences.View.prototype._getTemplateData.call(this);
  11358. e.msg=this._controller.getHandler().getMsgObj();
  11359. return e
  11360. }
  11361. }
  11362. );
  11363. net_comcast_sms.ProvisioningView=function(t){
  11364. if(!arguments.length){
  11365. return
  11366. }
  11367. var e=this._controller=t.controller;
  11368. t.className="ProvisioningView";
  11369. DwtComposite.call(this,t);
  11370. this._createHtmlFromTemplate(this.TEMPLATE,{
  11371. id:this.getHTMLElId()}
  11372. );
  11373. this._initialize();
  11374. if(e.isEntitled()){
  11375. e.loadVoiceData(new AjxCallback(this,function(a){
  11376. if(a){
  11377. if(a.code=="voice.SECONDARY_NOT_ALLOWED"){
  11378. this.showNotEntitled()
  11379. }else{
  11380. e.showError(this.getMsg("provErrorException",JSON.stringify(a)),this.getMsg("provErrorHeader"))
  11381. }}else{
  11382. this.showMarketing()
  11383. }}
  11384. ))
  11385. }else{
  11386. this.showNotEntitled()
  11387. }
  11388. this._loaded=true;
  11389. caboUtil.run(this._loadedCallback)
  11390. };
  11391. net_comcast_sms.ProvisioningView.prototype=new DwtComposite();
  11392. net_comcast_sms.ProvisioningView.prototype.constructor=net_comcast_sms.ProvisioningView;
  11393. net_comcast_sms.ProvisioningView.prototype.TEMPLATE=net_comcast_sms.TEMPLATE_BASE+"#Provisioning";
  11394. net_comcast_sms.ProvisioningView.prototype.toString=function(){
  11395. return"net_comcast_sms.ProvisioningView"
  11396. };
  11397. net_comcast_sms.ProvisioningView.prototype.getMsg=function(){
  11398. return this._controller.getMsg.apply(this._controller,arguments)
  11399. };
  11400. net_comcast_sms.ProvisioningView.prototype.setLoadedCallback=function(e){
  11401. if(this._loaded){
  11402. caboUtil.run(e)
  11403. }else{
  11404. this._loadedCallback=e
  11405. }};
  11406. net_comcast_sms.ProvisioningView.prototype._initialize=function(){
  11407. var t=this.getHTMLElId();
  11408. var c=[];
  11409. var p=this._nameLabel=new DwtLabel({
  11410. parent:this,className:"ProvisioningLabel DwtLabel overviewHeader"}
  11411. );
  11412. p.replaceElement(t+"_header");
  11413. p.setText(appCtxt.get(ZmSetting.DISPLAY_NAME)||appCtxt.getUsername());
  11414. var d=this._notEntitled=new DwtIframe({
  11415. parent:this,html:""}
  11416. );
  11417. d.replaceElement(t+"_notEntitled");
  11418. c.push(d);
  11419. var l=this._marketing=new DwtIframe({
  11420. parent:this,html:""}
  11421. );
  11422. l.replaceElement(t+"_marketing");
  11423. c.push(l);
  11424. var u=this._signupButton=new DwtButton({
  11425. parent:this}
  11426. );
  11427. u.replaceElement(t+"_signupButton");
  11428. u.setText(this.getMsg("provSignup"));
  11429. var h=this._terms=new DwtIframe({
  11430. parent:this,html:"",onload:"net_comcast_sms.ProvisioningView.handleShowTerms(this)"}
  11431. );
  11432. Dwt.associateElementWithObject(h.getIframe(),this,"provisioningView");
  11433. h.replaceElement(t+"_terms");
  11434. c.push(h);
  11435. var e=this._costs=new DwtIframe({
  11436. parent:this,html:"",onload:"net_comcast_sms.ProvisioningView.handleShowCosts(this)"}
  11437. );
  11438. Dwt.associateElementWithObject(e.getIframe(),this,"provisioningView");
  11439. e.replaceElement(t+"_costs");
  11440. c.push(e);
  11441. var a=this._congratulations=new DwtIframe({
  11442. parent:this,html:""}
  11443. );
  11444. a.replaceElement(t+"_congratulations");
  11445. c.push(a);
  11446. var y=this._backButton=new DwtButton({
  11447. parent:this}
  11448. );
  11449. y.replaceElement(t+"_backButton");
  11450. y.setText(this.getMsg("provBack"));
  11451. var o=this._declineButton=new DwtButton({
  11452. parent:this}
  11453. );
  11454. o.replaceElement(t+"_declineButton");
  11455. o.setText(this.getMsg("provDecline"));
  11456. var m=this._acceptButton=new DwtButton({
  11457. parent:this}
  11458. );
  11459. m.replaceElement(t+"_acceptButton");
  11460. m.setText(this.getMsg("provAccept"));
  11461. var f=this._okButton=new DwtButton({
  11462. parent:this}
  11463. );
  11464. f.replaceElement(t+"_okButton");
  11465. f.setText(this.getMsg("provOK"));
  11466. var g=this._nextButton=new DwtButton({
  11467. parent:this}
  11468. );
  11469. g.replaceElement(t+"_nextButton");
  11470. g.setText(this.getMsg("provNext"));
  11471. for(var r=0;
  11472. r<c.length;
  11473. r++){
  11474. var s=c[r];
  11475. var n=s.getIframe();
  11476. n.width=n.height="100%"
  11477. }};
  11478. net_comcast_sms.ProvisioningView.prototype.hideAll=function(){
  11479. var e=false;
  11480. this._backButton.setVisible(e);
  11481. this._okButton.setVisible(e);
  11482. this._declineButton.setVisible(e);
  11483. this._acceptButton.setVisible(e);
  11484. this._nextButton.setVisible(e);
  11485. this._signupButton.setVisible(e);
  11486. this._notEntitled.setVisible(e);
  11487. this._marketing.setVisible(e);
  11488. if(this._accountChooser){
  11489. this._accountChooser.setVisible(e)
  11490. }else{
  11491. Dwt.setVisible(Dwt.byId(this.getHTMLElId()+"_accountChooser"),e)
  11492. }
  11493. this._terms.setVisible(e);
  11494. this._costs.setVisible(e);
  11495. this._congratulations.setVisible(e)
  11496. };
  11497. net_comcast_sms.ProvisioningView.prototype._setSelectionListener=function(e,t){
  11498. e.removeSelectionListeners();
  11499. e.addSelectionListener(t)
  11500. };
  11501. net_comcast_sms.ProvisioningView.prototype._hasMultipleTNs=function(){
  11502. return this._tns&&this._tns.length>1
  11503. };
  11504. net_comcast_sms.ProvisioningView.prototype.showMarketing=function(){
  11505. this.hideAll();
  11506. if(!this.__showingMarketing){
  11507. this.__showingMarketing=true;
  11508. this._marketing.setSrc(net_comcast_sms.SmsZimlet.MARKETING)
  11509. }
  11510. this._signupButton.setVisible(true);
  11511. this._setSelectionListener(this._signupButton,new AjxListener(this,this.showCost));
  11512. this._marketing.setVisible(true)
  11513. };
  11514. net_comcast_sms.ProvisioningView.prototype.showNotEntitled=function(){
  11515. this.hideAll();
  11516. this._notEntitled.setSrc(net_comcast_sms.SmsZimlet.NOT_ENTITLED);
  11517. this._notEntitled.setVisible(true)
  11518. };
  11519. net_comcast_sms.ProvisioningView.prototype.showTNChooser=function(e){
  11520. this.hideAll();
  11521. this._controller.showLoading(true,"tns");
  11522. this._controller.getAvailableTNs(new AjxCallback(this,this._handleGetTNs,[e]))
  11523. };
  11524. net_comcast_sms.ProvisioningView.prototype._handleGetTNs=function(e,t,n){
  11525. this._tns=t||[n];
  11526. if(this._hasMultipleTNs()){
  11527. var a=this._backButton,s=this._nextButton;
  11528. if(!this._accountChooser){
  11529. var o=this._accountChooser=new net_comcast_sms.ProvisioningView.AccountChooser({
  11530. parent:this,tns:t,controller:this._controller}
  11531. );
  11532. o.replaceElement(this.getHTMLElId()+"_accountChooser")
  11533. }else{
  11534. var o=this._accountChooser
  11535. }
  11536. this._setSelectionListener(a,new AjxListener(this,this.showMarketing));
  11537. this._setSelectionListener(s,new AjxListener(this,this.showTerms));
  11538. a.setVisible(true);
  11539. s.setVisible(true);
  11540. o.setVisible(true)
  11541. }else{
  11542. if(e){
  11543. this.showMarketing()
  11544. }else{
  11545. this.showTerms()
  11546. }}
  11547. this._controller.showLoading(false,"tns")
  11548. };
  11549. net_comcast_sms.ProvisioningView.prototype.showCost=function(){
  11550. var t=this._acceptButton,n=this._declineButton,s=this._okButton,a=this._costs,e=net_comcast_sms.Provisioning.isLimited();
  11551. this.hideAll();
  11552. if(!this.__showingCosts){
  11553. this._controller.showLoading(true,"costs");
  11554. this.__showingCosts=true;
  11555. var o=e?net_comcast_sms.SmsZimlet.COSTS_LIMITED:net_comcast_sms.SmsZimlet.COSTS_UNLIMITED;
  11556. a.setSrc(o)
  11557. }else{
  11558. this._handleShowCosts()
  11559. }
  11560. this._setSelectionListener(n,new AjxListener(this,this.showMarketing,[true]));
  11561. this._setSelectionListener(t,new AjxListener(this,this.showTNChooser,[false]));
  11562. this._setSelectionListener(s,new AjxListener(this,this.showTNChooser,[false]));
  11563. if(e){
  11564. n.setEnabled(true);
  11565. n.setVisible(true);
  11566. t.setEnabled(true);
  11567. t.setVisible(true)
  11568. }else{
  11569. s.setVisible(true);
  11570. s.setEnabled(true)
  11571. }
  11572. a.setVisible(true)
  11573. };
  11574. net_comcast_sms.ProvisioningView.handleShowCosts=function(t){
  11575. var e=Dwt.getObjectFromElement(t,"provisioningView");
  11576. if(e&&e.__showingCosts){
  11577. e._handleShowCosts()
  11578. }};
  11579. net_comcast_sms.ProvisioningView.prototype._handleShowCosts=function(){
  11580. this._controller.showLoading(false,"costs")
  11581. };
  11582. net_comcast_sms.ProvisioningView.prototype.showTerms=function(){
  11583. var t=this._acceptButton,a=this._declineButton,e=this._terms;
  11584. this.hideAll();
  11585. if(!this.__showingTerms){
  11586. this._controller.showLoading(true,"terms");
  11587. this.__showingTerms=true;
  11588. e.setSrc(net_comcast_sms.SmsZimlet.TERMS)
  11589. }else{
  11590. this._handleShowTerms()
  11591. }
  11592. e.setVisible(true)
  11593. };
  11594. net_comcast_sms.ProvisioningView.handleShowTerms=function(t){
  11595. var e=Dwt.getObjectFromElement(t,"provisioningView");
  11596. if(e&&e.__showingTerms){
  11597. e._handleShowTerms()
  11598. }};
  11599. net_comcast_sms.ProvisioningView.prototype._handleShowTerms=function(){
  11600. var e=this._acceptButton,t=this._declineButton;
  11601. this._setSelectionListener(t,new AjxListener(this,this.showCost));
  11602. this._setSelectionListener(e,new AjxListener(this,this.signup,[null]));
  11603. e.setEnabled(true);
  11604. e.setVisible(true);
  11605. t.setEnabled(true);
  11606. t.setVisible(true);
  11607. this._controller.showLoading(false,"terms")
  11608. };
  11609. net_comcast_sms.ProvisioningView.prototype.signup=function(e){
  11610. this._declineButton.setEnabled(false);
  11611. this._acceptButton.setEnabled(false);
  11612. this._controller.showLoading(true,"signup");
  11613. if(e){
  11614. this._tns=[e]
  11615. }
  11616. this._controller.signup(this._hasMultipleTNs()?this._accountChooser.getSelectedValue():this._tns[0],new AjxCallback(this,this._handleSignup))
  11617. };
  11618. net_comcast_sms.ProvisioningView.prototype._handleSignup=function(t,e){
  11619. this._controller.showLoading(false,"signup");
  11620. if(t){
  11621. this.showCongratulations()
  11622. }else{
  11623. net_comcast_sms.Util.UI.dialog(this.getMsg("provFailed",e),this.getMsg("provErrorTitle"));
  11624. this._declineButton.setEnabled(true);
  11625. this._acceptButton.setEnabled(true)
  11626. }};
  11627. net_comcast_sms.ProvisioningView.prototype.showCongratulations=function(){
  11628. var t=this._okButton;
  11629. this.hideAll();
  11630. var e=net_comcast_sms.SmsZimlet.CONGRATULATIONS;
  11631. this._congratulations.setSrc(e);
  11632. t.setVisible(true);
  11633. t.setEnabled(true);
  11634. this._setSelectionListener(t,new AjxListener(this,this.close))
  11635. };
  11636. net_comcast_sms.ProvisioningView.prototype.close=function(){
  11637. this.setVisible(false)
  11638. };
  11639. net_comcast_sms.ProvisioningView.AccountChooser=function(e){
  11640. if(!arguments.length){
  11641. return
  11642. }
  11643. this._controller=e.controller;
  11644. this._tns=e.tns;
  11645. DwtComposite.call(this,e);
  11646. this._createHtmlFromTemplate(this.TEMPLATE,{
  11647. id:this.getHTMLElId()}
  11648. );
  11649. this._initialize()
  11650. };
  11651. net_comcast_sms.ProvisioningView.AccountChooser.prototype=new DwtComposite();
  11652. net_comcast_sms.ProvisioningView.AccountChooser.prototype.constructor=net_comcast_sms.ProvisioningView.AccountChooser;
  11653. net_comcast_sms.ProvisioningView.AccountChooser.prototype.TEMPLATE="net_comcast_sms#Provisioning.AccountChooser";
  11654. net_comcast_sms.ProvisioningView.AccountChooser.prototype.toString=function(){
  11655. return"net_comcast_sms.ProvisioningView"
  11656. };
  11657. net_comcast_sms.ProvisioningView.AccountChooser.prototype._initialize=function(){
  11658. var r=this.getHTMLElId();
  11659. var s=new DwtLabel({
  11660. parent:this,className:"AccountChooserText"}
  11661. );
  11662. s.replaceElement(r+"_text1");
  11663. s.setText(this._controller.getMsg("provText1"));
  11664. var t=this._radioButtons=[];
  11665. var n=Dwt.byId(r+"_list");
  11666. for(var e=0;
  11667. e<this._tns.length;
  11668. e++){
  11669. var o=new net_comcast_sms.ProvisioningView.AccountChooser.RadioButton({
  11670. parent:this,style:DwtCheckbox.ALIGN_LEFT|DwtCheckbox.TEXT_LEFT,name:"tnChooser",value:this._tns[e],checked:e==0}
  11671. );
  11672. o.setText(this._tns[e]);
  11673. o.reparentHtmlElement(n);
  11674. o.addSelectionListener(new AjxListener(this,this._updateRadioClass));
  11675. t.push(o)
  11676. }
  11677. this._updateRadioClass();
  11678. var a=new DwtLabel({
  11679. parent:this,className:"AccountChooserText"}
  11680. );
  11681. a.replaceElement(r+"_text2");
  11682. a.setText(this._controller.getMsg("provText2"))
  11683. };
  11684. net_comcast_sms.ProvisioningView.AccountChooser.prototype._updateRadioClass=function(){
  11685. for(i=0;
  11686. i<this._radioButtons.length;
  11687. i++){
  11688. var e=this._radioButtons[i];
  11689. e.condClassName(e.isSelected(),"ZSelected","")
  11690. }};
  11691. net_comcast_sms.ProvisioningView.AccountChooser.prototype.getSelectedValue=function(){
  11692. for(i=0;
  11693. i<this._radioButtons.length;
  11694. i++){
  11695. var e=this._radioButtons[i];
  11696. if(e.isSelected()){
  11697. return e.getValue()
  11698. }}};
  11699. AjxPackage.require({
  11700. name:"Ajax",callback:new AjxCallback(this,function(){
  11701. AjxDispatcher.setLoaded("Ajax",true);
  11702. net_comcast_sms.ProvisioningView.AccountChooser.RadioButton=function(e){
  11703. if(!arguments.length){
  11704. return
  11705. }
  11706. DwtRadioButton.call(this,e);
  11707. this._image=Dwt.byId(this.getHTMLElId()+"_image_right")
  11708. };
  11709. net_comcast_sms.ProvisioningView.AccountChooser.RadioButton.prototype=new DwtRadioButton;
  11710. net_comcast_sms.ProvisioningView.AccountChooser.RadioButton.prototype.constructor=net_comcast_sms.ProvisioningView.AccountChooser.RadioButton;
  11711. net_comcast_sms.ProvisioningView.AccountChooser.RadioButton.prototype.TEMPLATE="net_comcast_sms#Provisioning.AccountChooser.RadioButton"
  11712. }
  11713. )}
  11714. );
  11715. net_comcast_sms.ErrorView=function(e){
  11716. if(!arguments.length){
  11717. return
  11718. }
  11719. this._controller=e.controller;
  11720. DwtComposite.call(this,{
  11721. parent:e.parent,className:e.className||"ErrorView DwtComposite",posStyle:e.posStyle||Dwt.ABSOLUTE_STYLE,noMaximize:false,controller:e.controller}
  11722. )
  11723. };
  11724. net_comcast_sms.ErrorView.prototype=new DwtComposite;
  11725. net_comcast_sms.ErrorView.prototype.constructor=net_comcast_sms.ErrorView;
  11726. net_comcast_sms.ErrorView.prototype.toString=function(){
  11727. return"net_comcast_sms.ErrorView"
  11728. };
  11729. net_comcast_sms.ErrorView.prototype.TEMPLATE=net_comcast_sms.TEMPLATE_BASE+"#ErrorView";
  11730. net_comcast_sms.ErrorView.prototype.setVisible=function(e){
  11731. if(e&&!this.created){
  11732. this._createHtml()
  11733. }
  11734. DwtComposite.prototype.setVisible.call(this,e)
  11735. };
  11736. net_comcast_sms.ErrorView.prototype._createHtml=function(){
  11737. var e=this.getHTMLElId();
  11738. this._createHtmlFromTemplate(this.TEMPLATE,{
  11739. id:e,img:this._controller.getHandler().getResource("img/error.gif"),msg:this._controller.getHandler().getMsgObj()}
  11740. );
  11741. this._titleEl=Dwt.byId(e+"_title");
  11742. this._msgEl=Dwt.byId(e+"_msg");
  11743. this._created=true;
  11744. if(this._msg){
  11745. this.setMsg(this._msg)
  11746. }
  11747. if(this._title){
  11748. this.setTitle(this._title)
  11749. }};
  11750. net_comcast_sms.ErrorView.prototype.setMsg=function(e){
  11751. this._msg=e;
  11752. if(this._created){
  11753. this._msgEl.innerHTML=e
  11754. }};
  11755. net_comcast_sms.ErrorView.prototype.setTitle=function(e){
  11756. this._title=e;
  11757. if(this._created){
  11758. this._titleEl.innerHTML=e
  11759. }};
  11760. AjxDispatcher.addPackageLoadFunction("Ajax",new AjxCallback(function(){
  11761. net_comcast_sms.UnsubscribeDialog=function(t,a){
  11762. var e=this._handler=t.handler;
  11763. t.buttons=[DwtDialog.OK_BUTTON,DwtDialog.CANCEL_BUTTON];
  11764. t.extraButtons=[new DwtDialog_ButtonDescriptor("UNSUBSCRIBE",e.getMsg("unsubscribe"),DwtDialog.ALIGN_RIGHT)];
  11765. t.id="smsUnsubscribe";
  11766. DwtMessageDialog.call(this,t);
  11767. this.setButtonListener("UNSUBSCRIBE",new AjxListener(this,this._unsubscribe,[a]));
  11768. this.reset()
  11769. };
  11770. net_comcast_sms.UnsubscribeDialog.prototype=new DwtMessageDialog;
  11771. net_comcast_sms.UnsubscribeDialog.prototype.constructor=net_comcast_sms.UnsubscribeDialog;
  11772. net_comcast_sms.UnsubscribeDialog.prototype.reset=function(){
  11773. this.setMessage(this._handler.getMsg("unsubscribeBody"),DwtMessageDialog.WARNING_STYLE,this._handler.getMsg("unsubscribeHead"));
  11774. this.setButtonVisible(DwtDialog.OK_BUTTON,false);
  11775. this.setButtonVisible(DwtDialog.CANCEL_BUTTON,true);
  11776. this.setButtonVisible("UNSUBSCRIBE",true)
  11777. };
  11778. net_comcast_sms.UnsubscribeDialog.prototype._unsubscribe=function(e){
  11779. appCtxt.getShell().setBusy(true,this.getHTMLElId(),false,30000);
  11780. this.setMessage(this._handler.getMsg("unsubscribeBodyProc"),DwtMessageDialog.INFO_STYLE,this._handler.getMsg("unsubscribeHeadProc"));
  11781. this.setButtonVisible("UNSUBSCRIBE",false);
  11782. this.setButtonVisible(DwtDialog.CANCEL_BUTTON,false);
  11783. caboUtil.run(e,new AjxCallback(this,this._finish),new AjxCallback(this,this._fail))
  11784. };
  11785. net_comcast_sms.UnsubscribeDialog.prototype._finish=function(e){
  11786. appCtxt.getShell().setBusy(false,this.getHTMLElId());
  11787. this.setMessage(this._handler.getMsg("unsubscribeBodyFinish"),DwtMessageDialog.INFO_STYLE,this._handler.getMsg("unsubscribeHeadFinish"));
  11788. this.setButtonVisible(DwtDialog.OK_BUTTON,true);
  11789. this.setButtonListener(DwtDialog.OK_BUTTON,new AjxListener(this,this._end,[e]))
  11790. };
  11791. net_comcast_sms.UnsubscribeDialog.prototype._fail=function(e){
  11792. appCtxt.getShell().setBusy(false,this.getHTMLElId());
  11793. this.setMessage(this._handler.getMsg("unsubscribeBodyFail"),DwtMessageDialog.INFO_STYLE,this._handler.getMsg("unsubscribeHeadFail"));
  11794. this.setButtonVisible(DwtDialog.OK_BUTTON,true);
  11795. this.setButtonListener(DwtDialog.OK_BUTTON,new AjxListener(this,this._end,[e]))
  11796. };
  11797. net_comcast_sms.UnsubscribeDialog.prototype._end=function(e){
  11798. this.popdown();
  11799. caboUtil.run(e)
  11800. }
  11801. }
  11802. ));
  11803. skin.overrideAPI(VelodromeSkin.prototype,"show",function(){
  11804. arguments.callee.func.apply(this,arguments);
  11805. if(!this._hasRun){
  11806. this._hasRun=true;
  11807. setTimeout(function(){
  11808. appCtxt.getAppController().addPostRenderCallback(new AjxCallback({}
  11809. ,function(){
  11810. window.Net_Comcast_Sms=new net_comcast_sms.SmsZimlet();
  11811. window.Net_Comcast_Sms.init()
  11812. }
  11813. ))
  11814. }
  11815. ,0)
  11816. }}
  11817. );
  11818. </script>
  11819.  
  11820. <script type="text/javascript" src="/zimbra/js/skin.js?client=advanced&skin=velodrome2&locale=en_US&debug=false&compress=true&templates=only&v=110527090709"></script>
  11821.  
  11822. <script>
  11823. // compile locale specific templates
  11824. for (var pkg in window.AjxTemplateMsg) {
  11825. var text = AjxTemplateMsg[pkg];
  11826. AjxTemplate.compile(pkg, true, true, text);
  11827. }
  11828. </script>
  11829.  
  11830. <script>
  11831. var cacheKillerVersion = "110527090709";
  11832. function launch() {
  11833. // quit if this function has already been called
  11834. if (arguments.callee.done) {return;}
  11835.  
  11836. // flag this function so we don't do the same thing twice
  11837. arguments.callee.done = true;
  11838.  
  11839. // kill the timer
  11840. if (_timer) {
  11841. clearInterval(_timer);
  11842. _timer = null;
  11843. }
  11844.  
  11845. var prodMode = true;
  11846. var debugLevel = "";
  11847. if (!prodMode || debugLevel) {
  11848. AjxDispatcher.require("Debug");
  11849. DBG = new AjxDebug(AjxDebug.NONE, null, false);
  11850. // figure out the debug level
  11851. if (debugLevel == 't') {
  11852. DBG.showTiming(true);
  11853. } else {
  11854. DBG.setDebugLevel(debugLevel);
  11855. }
  11856. }
  11857.  
  11858. AjxHistoryMgr.BLANK_FILE = "/zimbra/public/blankHistory.html";
  11859. var noSplashScreen = "";
  11860. var protocolMode = "http";
  11861.  
  11862.  
  11863. var batchInfoResponse = {"Header":{"context":{"session":{"id":"14023552","_content":"14023552"},"refresh":{"version":"6.0.13_GA_2944 20111101161122 20111101-1613 NETWORK","mbx":[{"s":35500633}],"folder":[{"id":"1","name":"USER_ROOT","l":"11","rev":1,"ms":1,"n":0,"s":0,"i4ms":1,"i4next":2,"folder":[{"id":"16","name":"Briefcase","l":"1","view":"document","rev":1,"ms":1,"n":0,"s":0,"i4ms":1,"i4next":17},{"id":"10","name":"Calendar","l":"1","f":"#","view":"appointment","rev":1,"ms":1,"n":0,"s":0,"i4ms":1,"i4next":11},{"id":"14","name":"Chats","l":"1","view":"message","rev":1,"ms":1,"n":0,"s":0,"i4ms":1,"i4next":15},{"id":"7","name":"Contacts","l":"1","view":"contact","rev":1,"ms":1,"n":1,"s":0,"i4ms":867,"i4next":1122},{"id":"6","name":"Drafts","l":"1","view":"message","rev":1,"ms":3,"n":1,"s":45190,"i4ms":424312,"i4next":83407},{"id":"13","name":"Emailed Contacts","l":"1","view":"contact","rev":1,"ms":1,"n":0,"s":0,"i4ms":1,"i4next":14},{"id":"2","name":"Inbox","l":"1","f":"u","u":325,"view":"message","rev":1,"ms":861,"n":1131,"s":35455313,"i4ms":1310800,"i4next":248221},{"id":"4","name":"Junk","l":"1","view":"message","rev":1,"ms":862,"n":0,"s":0,"i4ms":278700,"i4next":54582},{"id":"12","name":"Notebook","l":"1","view":"wiki","rev":1,"ms":1,"n":0,"s":0,"i4ms":1,"i4next":13},{"id":"5","name":"Sent","l":"1","view":"message","rev":1,"ms":863,"n":0,"s":0,"i4ms":1205217,"i4next":228376},{"id":"15","name":"Tasks","l":"1","f":"#","view":"task","rev":1,"ms":1,"n":0,"s":0,"i4ms":1,"i4next":16},{"id":"3","name":"Trash","l":"1","rev":1,"ms":864,"n":0,"s":0,"i4ms":1205218,"i4next":228378}]}]},"change":{"token":1310899},"_jsns":"urn:zimbra"}},"Body":{"BatchResponse":{"GetInfoResponse":[{"version":"6.0.13_GA_2944 20111101161122 20111101-1613 NETWORK","id":"e150e9f7-465d-4759-a68d-258b42c273d1","name":"armada15@comcast.net","crumb":"23f436aeb5d05d4b218b0d2e5c51b376","lifetime":43196401,"docSizeLimit":36700160,"attSizeLimit":36700160,"rest":"http://sz0133.wc.mail.comcast.net:80/home/armada15@comcast.net","used":35500633,"prevSession":1329989027000,"accessed":1329989027000,"recent":1133,"cos":{"id":"5589aa3c-b8cd-4fc3-8d34-8d60bb1d3496","name":"combo-secondary"},"prefs":{"_attrs":{"zimbraPrefSentLifetime":"30d","zimbraPrefShowSelectionCheckbox":"TRUE","zimbraPrefReadingPaneEnabled":"FALSE","zimbraPrefGroupMailBy":"message","zimbraPrefDeleteInviteOnReply":"TRUE","zimbraPrefSentMailFolder":"sent","zimbraPrefGalAutoCompleteEnabled":"FALSE","zimbraPrefMailDefaultCharset":"UTF-8","zimbraPrefForwardIncludeOriginalText":"includeBody","zimbraPrefShowFragments":"FALSE","zimbraPrefImapSearchFoldersEnabled":"FALSE","zimbraPrefHtmlEditorDefaultFontFamily":"Arial","zimbraPrefInboxReadLifetime":"0d","zimbraPrefVoiceItemsPerPage":"25","zimbraPrefShowSearchString":"FALSE","zimbraPrefAutoAddAddressEnabled":"FALSE","zimbraPrefComposeFormat":"html","zimbraPrefForwardReplyInOriginalFormat":"FALSE","zimbraPrefAutoSaveDraftInterval":"0","zimbraPrefIMNotifyPresence":"TRUE","zimbraPrefOpenMailInNewWindow":"FALSE","zimbraPrefHtmlEditorDefaultFontColor":"#000000","zimbraPrefContactsInitialView":"list","zimbraPrefOutOfOfficeReplyEnabled":"FALSE","zimbraPrefCalendarAlwaysShowMiniCal":"TRUE","zimbraPrefClientType":"advanced","zimbraPrefTimeZoneId":"(GMT-05.00) Eastern Time (US &amp; Canada)","zimbraPrefReadingPaneLocation":"off","zimbraPrefCalendarApptReminderWarningTime":"5","zimbraPrefInboxUnreadLifetime":"45d","zimbraPrefContactsPerPage":"25","zimbraPrefWarnOnExit":"FALSE","zimbraPrefIMInstantNotify":"FALSE","zimbraPrefOutOfOfficeCacheDuration":"7d","zimbraPrefIncludeTrashInSearch":"FALSE","zimbraPrefHtmlEditorDefaultFontSize":"12pt","zimbraPrefComposeInNewWindow":"FALSE","zimbraPrefIncludeSpamInSearch":"FALSE","zimbraPrefMailItemsPerPage":"25","zimbraPrefCalendarDayHourStart":"8","zimbraPrefUseKeyboardShortcuts":"TRUE","zimbraPrefUseRfc2231":"FALSE","zimbraPrefReplyIncludeOriginalText":"includeBody","zimbraPrefDedupeMessagesSentToSelf":"dedupeNone","zimbraPrefSaveToSent":"FALSE","zimbraPrefSkin":"velodrome2","zimbraPrefCalendarFirstDayOfWeek":"0","zimbraPrefMailInitialSearch":"in:inbox","zimbraPrefCalendarInitialView":"workWeek","zimbraPrefUseTimeZoneListInCalendar":"FALSE","zimbraPrefMailPollingInterval":"5m","zimbraPrefIMNotifyStatus":"TRUE","zimbraPrefTrashLifetime":"1d","zimbraPrefDisplayExternalImages":"TRUE","zimbraPrefJunkLifetime":"3d","zimbraPrefCalendarDayHourEnd":"18","zimbraPrefForwardReplyPrefixChar":"\u003E","zimbraPrefCalendarNotifyDelegatedChanges":"FALSE","zimbraPrefMailSignatureStyle":"outlook","zimbraPrefIMAutoLogin":"FALSE","zimbraPrefMessageViewHtmlPreferred":"TRUE","zimbraPrefIMFlashIcon":"TRUE","zimbraPrefCalendarUseQuickAdd":"TRUE"}},"attrs":{"_attrs":{"zimbraFeatureNotebookEnabled":"FALSE","zimbraFeatureSkinChangeEnabled":"FALSE","zimbraFeatureConversationsEnabled":"TRUE","zimbraZimletAvailableZimlets":["+comcast_promo","+com_zimbra_gm","+comcast_html","+comcast_newsfeed","+comcast_accounts","+comcast_search","+com_zimbra_url","+com_zimbra_email","+comcast_msgcenterad","+comcast_omniture","+comcast_msgcontact","+comcast_contactactions","+comcast_adsrvc","+comcast_voice","+comcast_hello"],"zimbraPrefReadingPaneEnabled":"FALSE","zimbraFeatureOutOfOfficeReplyEnabled":"TRUE","zimbraFeatureFlaggingEnabled":"FALSE","zimbraAllowAnyFromAddress":"FALSE","zimbraFeatureContactsEnabled":"TRUE","zimbraFeatureInitialSearchPreferenceEnabled":"FALSE","zimbraLocale":"en_US","zimbraFeatureMailForwardingEnabled":"TRUE","zimbraFeatureIMEnabled":"FALSE","zimbraFeatureVoiceEnabled":"TRUE","zimbraFeatureReadReceiptsEnabled":"FALSE","zimbraSignatureMaxNumEntries":"3","zimbraFeatureMailPollingIntervalPreferenceEnabled":"FALSE","zimbraFeatureCalendarEnabled":"FALSE","zimbraPrefReadingPaneLocation":"off","zimbraFeatureTaggingEnabled":"FALSE","zimbraFeaturePortalEnabled":"TRUE","zimbraFeatureMobileSyncEnabled":"FALSE","zimbraFeaturePop3DataSourceEnabled":"TRUE","zimbraFeatureNewMailNotificationEnabled":"FALSE","zimbraMailTrashLifetime":"0","uid":"armada15","zimbraFeatureOptionsEnabled":"TRUE","zimbraId":"e150e9f7-465d-4759-a68d-258b42c273d1","zimbraFeatureSharingEnabled":"FALSE","zimbraMailQuota":"10737418240","zimbraFeatureTasksEnabled":"FALSE","zimbraFeatureCalendarUpsellURL":"http://calendar.comcast.net/calendar/?skin=none","zimbraFeatureAdvancedSearchEnabled":"FALSE","zimbraFeatureGalAutoCompleteEnabled":"FALSE","zimbraFeatureShortcutAliasesEnabled":"FALSE","zimbraFeatureCalendarUpsellEnabled":"TRUE","zimbraFeatureGalEnabled":"FALSE","zimbraFeatureImapDataSourceEnabled":"TRUE","zimbraFeatureChangePasswordEnabled":"FALSE","zimbraMailSignatureMaxLength":"5120","zimbraFeatureMailEnabled":"TRUE","zimbraFeatureViewInHtmlEnabled":"FALSE","zimbraFeatureHtmlComposeEnabled":"TRUE","cn":"102535030029112006Comcast.USR8JR","zimbraFeatureVoiceUpsellEnabled":"FALSE","zimbraPortalName":"velodrome2","zimbraFeatureSavedSearchesEnabled":"FALSE","zimbraFeatureIdentitiesEnabled":"TRUE","zimbraContactMaxNumEntries":"10000","zimbraFeatureFiltersEnabled":"TRUE","zimbraSignatureMinNumEntries":"3","zimbraFeatureNewAddrBookEnabled":"FALSE","displayName":"armada15"}},"zimlets":{"zimlet":[{"zimletContext":[{"baseUrl":"/service/zimlet/com_zimbra_email/","priority":0,"presence":"enabled"}],"zimlet":[{"description":"Highlights and previews associated contact for an email address.","name":"com_zimbra_email","target":"main view-window","version":"2.0_6.0.13.20110802.033552","include":[{"_content":"email.js"}],"handlerObject":[{"_content":"Com_Zimbra_Email"}],"contentObject":[{"type":"email","matchOn":[{"regex":[{"attrs":"ig","_content":"\\b(mailto:[ ]*)?([0-9a-zA-Z]+[.&#!$%'*+-/=?^_`{}|~])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}([\\w/_\\.]*(\\?\\S+)?)\\b"}]}],"contextMenu":[{"menuItem":[{"id":"SEARCH","icon":"Search","label":"${msg.search}"},{"id":"SEARCHBUILDER","icon":"SearchBuilder","label":"${msg.advancedSearch}"},{"id":"NEWEMAIL","icon":"NewMessage","label":"${msg.newEmail}"},{"id":"NEWIM","icon":"ImAvailable","label":"${msg.newIM}"},{"id":"NEWCONTACT","icon":"Edit","label":"${msg.newContact}"},{"id":"ADDTOFILTER","icon":"AddFilter","label":"${msg.addToFilter}"},{"id":"GOTOURL","icon":"URL","label":"${msg.goToUrl}"}]}]}]}],"zimletConfig":[{"name":"com_zimbra_email","version":"1.0","global":[{"property":[{"name":"yahooSocialEnabled","_content":"false"}]}]}]},{"zimletContext":[{"baseUrl":"/service/zimlet/com_zimbra_url/","priority":1,"presence":"enabled"}],"zimlet":[{"description":"Highlights and links URLs.","name":"com_zimbra_url","target":"main view-window","version":"2.0_6.0.13.20111101.043516","include":[{"_content":"url.js"}],"resource":[{"_content":"blank_pixel.gif"}],"handlerObject":[{"_content":"Com_Zimbra_Url"}],"serverExtension":[{"extensionClass":"com.zimbra.cs.zimlet.handler.RegexHandler","hasKeyword":"url"}],"contentObject":[{"type":"url","matchOn":[{"regex":[{"attrs":"ig","_content":"((telnet:)|((https?|ftp|gopher|news|file):\\/\\/)|(www\\.[\\w\\.\\_\\-]+))[^\\s\\xA0\\(\\)\\\u003C\\\u003E\\[\\]\\{\\}\\'\\\"]*"}]}]}]}],"zimletConfig":[{"name":"com_zimbra_url","version":"1.0","global":[{"property":[{"name":"ZIMLET_CONFIG_REGEX_VALUE","_content":"((telnet:)|((https?|ftp|gopher|news|file):\\/\\/)|(www\\.[\\w\\.\\_\\-]+))[^\\s\\\u003C\\\u003E\\[\\]\\{\\}\\'\\\"]*"},{"name":"ZIMLET_UNC_REGEX_VALUE","_content":"\\s*\\\\\\\\[a-zA-Z0-9.-_]+.*\\s*"},{"name":"stripUrls","_content":"true"},{"name":"disablePreview","_content":"true"},{"name":"supportUNC","_content":"true"}]}]}]},{"zimletContext":[{"baseUrl":"/service/zimlet/comcast_contactactions/","priority":2,"presence":"enabled"}],"zimlet":[{"description":"Adds actions to contact views","name":"comcast_contactactions","version":"1.0","include":[{"_content":"contactactions.js"},{"_content":"templates/ContactActions.template.js"}],"includeCSS":[{"_content":"contactactions.css"}],"handlerObject":[{"_content":"ComcastContactActions"}]}],"zimletConfig":[{"name":"comcast_contactactions","version":"1.0","global":[{}]}]},{"zimletContext":[{"baseUrl":"/service/zimlet/comcast_hello/","priority":3,"presence":"enabled"}],"zimlet":[{"description":"Hello","name":"comcast_hello","version":"1.0","include":[{"_content":"hello.js"},{"_content":"templates/Hello.template.js"}],"includeCSS":[{"_content":"hello.css"}],"handlerObject":[{"_content":"ComcastHello"}],"portlet":[{}]}],"zimletConfig":[{"name":"comcast_hello","version":"1.0","global":[{}]}]},{"zimletContext":[{"baseUrl":"/service/zimlet/comcast_html/","priority":4,"presence":"enabled"}],"zimlet":[{"description":"HTML","name":"comcast_html","version":"1.0","include":[{"_content":"html.js"}],"handlerObject":[{"_content":"ComcastHtml"}],"portlet":[{}]}],"zimletConfig":[{"name":"comcast_html","version":"1.0","global":[{}]}]},{"zimletContext":[{"baseUrl":"/service/zimlet/comcast_msgcontact/","priority":5,"presence":"enabled"}],"zimlet":[{"description":"Adds contact data to message view","name":"comcast_msgcontact","target":"main view-window","version":"1.0","include":[{"_content":"msgcontact.js"},{"_content":"templates/MsgContact.template.js"}],"includeCSS":[{"_content":"msgcontact.css"}],"handlerObject":[{"_content":"ComcastMsgContact"}]}],"zimletConfig":[{"name":"comcast_msgcontact","version":"1.0","global":[{"property":[{"name":"SZheaderName","_content":"X-SmartZone-Brand"},{"name":"CCheaderValue","_content":"comcast"},{"name":"GMheaderName","_content":"X-GoodmailSystems-Isp"},{"name":"GMheaderValue","_content":"goodmail"},{"name":"headerName","_content":"X-GoodmailSystems-Isp"},{"name":"headerValue","_content":"comcast"},{"name":"GoodmailUrl","_content":"http://www.comcast.net/certifiedemail"},{"name":"ComcastUrl","_content":"http://customer.comcast.com/Pages/FAQViewer.aspx?seoid=branded-mail"}]}]}]},{"zimletContext":[{"baseUrl":"/service/zimlet/comcast_newsfeed/","priority":6,"presence":"enabled"}],"zimlet":[{"description":"News Feeds","name":"comcast_newsfeed","version":"1.0","include":[{"_content":"newsfeed.js"}],"includeCSS":[{"_content":"newsfeed.css"}],"handlerObject":[{"_content":"ComcastNewsFeed"}],"portlet":[{}]}],"zimletConfig":[{"name":"comcast_newsfeed","version":"1.0","global":[{"property":[{"name":"allowedDomains","_content":"*.comcast.net"}]}]}]},{"zimletContext":[{"baseUrl":"/service/zimlet/comcast_promo/","priority":7,"presence":"enabled"}],"zimlet":[{"description":"Promotions","name":"comcast_promo","version":"1.0","include":[{"_content":"promotions.js"},{"_content":"templates/Promotions.template.js"}],"includeCSS":[{"_content":"promotions.css"}],"handlerObject":[{"_content":"ComcastPromotions"}],"portlet":[{}]}],"zimletConfig":[{"name":"comcast_promo","version":"1.0","global":[{"property":[{"name":"allowedDomains","_content":"*.comcast.net"}]}]}]},{"zimletContext":[{"baseUrl":"/service/zimlet/comcast_search/","priority":8,"presence":"enabled"}],"zimlet":[{"description":"Search","name":"comcast_search","version":"1.0","include":[{"_content":"search.js"}],"handlerObject":[{"_content":"ComcastSearch"}]}],"zimletConfig":[{"name":"comcast_search","version":"1.0","global":[{}]}]},{"zimletContext":[{"baseUrl":"/service/zimlet/comcast_omniture/","priority":9,"presence":"enabled"}],"zimlet":[{"description":"Tracks Zimbra Web Client usage.","name":"comcast_omniture","version":"1.0_6.0.5.20100216.112139","include":[{"_content":"comcast_omniture.js"},{"_content":"s_code.js"}],"handlerObject":[{"_content":"Comcast_Omniture"}]}],"zimletConfig":[{"name":"comcast_omniture","version":"1.0","global":[{}]}]},{"zimletContext":[{"baseUrl":"/service/zimlet/com_zimbra_gm/","priority":10,"presence":"enabled"}],"zimlet":[{"description":"Allows message list badging of subsidized spam","name":"com_zimbra_gm","version":"20110407.00","include":[{"_content":"com_zimbra_gm.js"}],"includeCSS":[{"_content":"com_zimbra_gm.css"}],"handlerObject":[{"_content":"com_zimbra_gm"}]}]},{"zimletContext":[{"baseUrl":"/service/zimlet/comcast_accounts/","priority":11,"presence":"enabled"}],"zimlet":[{"description":"Accounts","name":"comcast_accounts","version":"1.0","include":[{"_content":"accounts.js"},{"_content":"templates/Accounts.template.js"}],"includeCSS":[{"_content":"accounts.css"}],"handlerObject":[{"_content":"ComcastAccounts"}],"portlet":[{}]}],"zimletConfig":[{"name":"comcast_accounts","version":"1.0","global":[{}]}]},{"zimletContext":[{"baseUrl":"/service/zimlet/comcast_adsrvc/","priority":12,"presence":"enabled"}],"zimlet":[{"description":"AdService","name":"comcast_adsrvc","version":"2.0","include":[{"_content":"adsrvc.js"}],"includeCSS":[{"_content":"adsrvc.css"}],"handlerObject":[{"_content":"Comcast_Adsrvc"}]}],"zimletConfig":[{"name":"comcast_adsrvc","version":"2.0","global":[{"property":[{"name":"refreshCount","_content":"3"},{"name":"comcast-skyscraperad","_content":"\n \u003Ciframe src=\"http://pn2.adserver.yahoo.com/a?f=yahoo_ad_space_id&pn=comcast&p=com-mail&l=SKY&c=sh&bg=f5f5f5&no_expandable=1\"\n marginwidth=\"0\"\n marginheight=\"0\"\n width=\"160\"\n height=\"100%\"\n border=\"0\"\n frameborder=\"0\"\n style=\"border:none;\"\n scrolling=\"no\" align=\"center\"\u003E\u003C/iframe\u003E\n \n "},{"name":"comcast-skyscraperad-view","_content":"\n \u003Ciframe src=\"/h/msgviewAds\"\n marginwidth=\"0\"\n marginheight=\"0\"\n width=\"160\"\n height=\"100%\"\n border=\"0\"\n frameborder=\"0\"\n style=\"border:none;\"\n scrolling=\"no\" align=\"center\"\u003E\u003C/iframe\u003E\n \n "},{"name":"comcast-skyscraperad-list","_content":"\n \u003Ciframe src=\"/h/msglistAds\"\n marginwidth=\"0\"\n marginheight=\"0\"\n width=\"160\"\n height=\"100%\"\n border=\"0\"\n frameborder=\"0\"\n style=\"border:none;\"\n scrolling=\"no\" align=\"center\"\u003E\u003C/iframe\u003E\n \n "},{"name":"comcastAdInfo","_content":"http://www.comcast.net/adinformation/"},{"name":"comcastAdFeedback","_content":"https://www.surveymonkey.com/s.aspx?sm=FyNNVDhj_2f2FNc2KVOHQ4eg_3d_3d"},{"name":"autoExpandSideBarAd","_content":"false"},{"name":"hideSideBarAd","_content":"false"},{"name":"list_ad_space_id","_content":"2142030097"},{"name":"msg_ad_space_id","_content":"2142030098"}]}]}]},{"zimletContext":[{"baseUrl":"/service/zimlet/comcast_msgcenterad/","priority":13,"presence":"enabled"}],"zimlet":[{"description":"MsgCenter Ad","name":"comcast_msgcenterad","version":"1.0","include":[{"_content":"msgcenterad.js"}],"includeCSS":[{"_content":"msgcenterad.css"}],"handlerObject":[{"_content":"ComcastMsgCenterAd"}],"portlet":[{}]}],"zimletConfig":[{"name":"comcast_msgcenterad","version":"1.0","global":[{"property":[{"name":"comcast_msgcenterad","_content":"\n \u003Ciframe src=\"\"\n marginwidth=\"0\"\n marginheight=\"0\"\n width=\"300\"\n height=\"264\"\n border=\"0\"\n frameborder=\"0\"\n style=\"border:none;\"\n scrolling=\"no\" align=\"center\"\u003E\u003C/iframe\u003E\n "},{"name":"comcast_msgcenterad_url","_content":"http://pn2.adserver.yahoo.com/a?f=2022363872&pn=comcast&p=com-mail&l=LREC&c=sh&bg=ffffff&no_expandable=1"},{"name":"comcast_msgcenterad_hurl","_content":"/h/msgcenterAds"},{"name":"comcastAdInfo","_content":"http://www.comcast.net/adinformation/"},{"name":"comcastAdFeedback","_content":"https://www.surveymonkey.com/s.aspx?sm=FyNNVDhj_2f2FNc2KVOHQ4eg_3d_3d"}]}]}]},{"zimletContext":[{"baseUrl":"/service/zimlet/comcast_voice/","priority":14,"presence":"enabled"}],"zimlet":[{"description":"Comcast Voice Preferences","name":"comcast_voice","version":"1.1","include":[{"_content":"voice.js"},{"_content":"controller/ComcastVoiceListController.js"},{"_content":"controller/ComcastCallListController.js"},{"_content":"controller/ComcastVoicemailListController.js"},{"_content":"controller/ComcastVoicePrefsController.js"},{"_content":"controller/ComcastVoicePrefsGeneralController.js"},{"_content":"controller/ComcastVoicePrefsNotificationController.js"},{"_content":"controller/ComcastVoicePrefsForwardingController.js"},{"_content":"controller/ComcastVoicePrefsRejectionController.js"},{"_content":"view/ComcastVoicePrefsView.js"},{"_content":"view/list/ComcastVoicePhoneList.js"},{"_content":"view/list/ComcastVoiceBufferList.js"},{"_content":"view/list/ComcastVoicePhoneBufferList.js"},{"_content":"view/page/ComcastVoicePrefsPage.js"},{"_content":"view/page/ComcastVoiceGeneralPage.js"},{"_content":"view/page/ComcastVoiceNotificationPage.js"},{"_content":"view/page/ComcastVoiceForwardingPage.js"},{"_content":"view/page/ComcastVoiceRejectionPage.js"},{"_content":"view/UI/ComcastVoiceFeatureUI.js"},{"_content":"view/UI/ComcastVoiceSendToVoicemailAfterRingsUI.js"},{"_content":"view/UI/ComcastVoiceAnnounceDateTimeUI.js"},{"_content":"view/UI/ComcastVoiceAnonymousCallRejectionUI.js"},{"_content":"view/UI/ComcastVoiceLanguageUI.js"},{"_content":"view/UI/ComcastVoiceAnsweringLanguageUI.js"},{"_content":"view/UI/ComcastVoiceUserLanguageUI.js"},{"_content":"view/UI/ComcastVoiceAutoplayUI.js"},{"_content":"view/UI/ComcastVoicePromptUI.js"},{"_content":"view/UI/ComcastVoiceRequirePinUI.js"},{"_content":"view/UI/ComcastVoiceNotificationUI.js"},{"_content":"view/UI/ComcastVoiceNotificationTranscriptUI.js"},{"_content":"view/UI/ComcastVoiceNotificationAttachmentUI.js"},{"_content":"view/UI/ComcastVoiceCallForwardingUI.js"},{"_content":"view/UI/ComcastVoiceSelectiveCallForwardingUI.js"},{"_content":"view/UI/ComcastVoiceSelectiveCallRejectionUI.js"},{"_content":"view/UI/ComcastVoiceSelectiveCallAcceptanceUI.js"},{"_content":"view/UI/ComcastABBuilderUI.js"},{"_content":"model/ComcastCallFeature.js"},{"_content":"model/ComcastPhone.js"},{"_content":"templates/voice.template.js"}],"includeCSS":[{"_content":"voice.css"}],"handlerObject":[{"_content":"ComcastVoice"}]}],"zimletConfig":[{"name":"comcast_voice","version":"1.0","global":[{}]}]}]},"props":{},"identities":{"identity":[{"name":"DEFAULT","id":"e150e9f7-465d-4759-a68d-258b42c273d1","_attrs":{"zimbraPrefIdentityId":"e150e9f7-465d-4759-a68d-258b42c273d1","zimbraPrefForwardReplyPrefixChar":"\u003E","zimbraPrefSaveToSent":"FALSE","zimbraPrefSentMailFolder":"sent","zimbraPrefForwardIncludeOriginalText":"includeBody","zimbraPrefForwardReplyFormat":"html","zimbraPrefMailSignatureStyle":"outlook","zimbraPrefIdentityName":"DEFAULT","zimbraPrefReplyIncludeOriginalText":"includeBody","zimbraPrefFromAddress":"armada15@comcast.net"}}]},"signatures":{},"dataSources":{},"childAccounts":{},"soapURL":"http://sz0133.wc.mail.comcast.net:80/service/soap/","publicURL":"http://sz0133.wc.mail.comcast.net:80","_jsns":"urn:zimbraAccount"}],"SearchResponse":[{"sortBy":"dateDesc","offset":0,"m":[{"s":83216,"d":1341115873000,"l":"2","cid":"-248220","f":"u","rev":1310800,"id":"248220","e":[{"a":"eBay@reply1.ebay.com","d":"eBay","p":"eBay Insider","t":"f"}],"su":"famoussas15: Get great selling tips for Back to School","fr":"Hurry! List by July 5 for a chance to win View this message in your browser. ==\u003E http://mail.ebay.com/r/mail/267feaII909a56II18087365a1e eBay ==\u003E ...","score":1.0,"cm":true,"sf":"1341115873000"},{"s":43499,"d":1341090166000,"l":"2","cid":"-248200","f":"u","rev":1310700,"id":"248200","e":[{"a":"eBay@reply1.ebay.com","d":"eBay","p":"eBay","t":"f"}],"su":"famoussas15, it's your eBay anniversary","fr":"Happy anniversary. eBay ==\u003E ...","score":1.0,"cm":true,"sf":"1341090166000"},{"s":83728,"d":1341070951000,"l":"2","cid":"-248180","f":"u","rev":1310600,"id":"248180","e":[{"a":"reminder@e.gilt.com","d":"Gilt","p":"Gilt","t":"f"}],"su":"Swim Shop, Summer Style Guide, Weekend Wear, Make a Statement: Horizon Rugs, Maroon 5 ‘Overexposed’ Digital Download, Charles Jourdan & Mark + James Shoes and more Starts Today at Noon ET","fr":"If you are unable to see this message, http://click.e.gilt.com/?qs=59998bbe5b1437ad0d0f55a638801341641f6689f3f52c6babca3199371abd925734f99012c3e240 ...","score":1.0,"cm":true,"sf":"1341070951000"},{"s":49963,"d":1341029084000,"l":"2","cid":"-248160","f":"u","rev":1310500,"id":"248160","e":[{"a":"do_not_reply@itunes.com","d":"iTunes","p":"iTunes Store","t":"f"}],"su":"My Alerts for this week: Maroon 5, Elvis Presley, Muse and more","fr":"iTunes artist alert Maroon 5 Overexposed Release Date: Jun 26, 2012 Genre: Pop Total Songs: 12 (P) ℗ 2012 A&M/Octone Records ...","score":1.0,"cm":true,"sf":"1341029084000"},{"s":7672,"d":1340995082000,"l":"2","cid":"-248140","f":"u","rev":1310400,"id":"248140","e":[{"a":"gcarpino@ravensclawgolfclub.com","d":"Raven's","p":"Raven's Claw Golf Club","t":"f"}],"su":"Beat the Heat Afternoon Special- Book Now!","fr":"[Don't Get Beat by the Heat] Another Raven's Claw Advantage! Beat the Heat Special! This Weekend Only! (Saturday, June 30th & Sunday July 1st) $50 ...","score":1.0,"cm":true,"sf":"1340995082000"},{"s":13702,"d":1340993857000,"l":"2","cid":"-248120","f":"u","rev":1310300,"id":"248120","e":[{"a":"Offers@offers.dominos.com","d":"Domino's","p":"Domino's Pizza","t":"f"}],"su":"Want to know our secret ingredient?","fr":"Domino&#8217s Pizza Choose any 2 or more Oven Baked Sandwiches, Medium 2-Topping Pizzas or Stuffed Cheesy Breads for just $5.99 each. 2-item minimum. ...","score":1.0,"cm":true,"sf":"1340993857000"},{"s":82931,"d":1340984530000,"l":"2","cid":"-248100","f":"u","rev":1310200,"id":"248100","e":[{"a":"reminder@e.gilt.com","d":"Gilt","p":"Gilt","t":"f"}],"su":"American Apparel, Garrett Leight, T-Shirts in Your Size, Summer Staples: Polos, Oliberté, Best Bets Under $50, Brian Atwood Shoes & Handbags, La Fée Verte and more Starts Today at Noon ET","fr":"If you are unable to see this message, http://click.e.gilt.com/?qs=c1ae0a17831adfc5724c433fbe422417721cfce7b17522992f301b77d4538c0a6511858ac0bdf8a8 ...","score":1.0,"cm":true,"sf":"1340984530000"},{"s":14393,"d":1340979701000,"l":"2","cid":"-248080","f":"u","rev":1310100,"id":"248080","e":[{"a":"golflink@mail.golflink.com","d":"GolfLink","p":"GolfLink Newsletter","t":"f"}],"su":"Start 'Em Young: Teach Your Kids How To Golf This Summer","fr":"GolfLink Newsletter Instructional Video Start 'Em Young: Teaching Your Kids How To Golf It’s summer--the perfect opportunity to get the kids out of ...","score":1.0,"cm":true,"sf":"1340979701000"},{"s":99691,"d":1340976376000,"l":"2","cid":"-248060","f":"u","rev":1310000,"id":"248060","e":[{"a":"movies@mkt.fandango.com","d":"Fandango","p":"Fandango FanMail","t":"f"}],"su":"Magic Mike tickets on sale now!","fr":"Fandango Newsletter Countdown to Spider-Man View web version. | View mobile version. Add movies@mkt.fandango.com to your address book. More Details . ...","score":1.0,"cm":true,"sf":"1340976376000"},{"s":6302,"d":1340954686000,"l":"2","cid":"-248040","f":"u","rev":1309900,"id":"248040","e":[{"a":"gcarpino@ravensclawgolfclub.com","d":"Raven's","p":"Raven's Claw Golf Club","t":"f"}],"su":"Tee times Specials available for this Weekend!","fr":"Another Raven's Claw Advantage! Friday (6/29), Saturday (6/30) & Sunday (7/1) We still have open Tee Times for this Weekend! The weekends weather ...","score":1.0,"cm":true,"sf":"1340954686000"},{"s":156413,"d":1340945402000,"l":"2","cid":"-248020","f":"u","rev":1309800,"id":"248020","e":[{"a":"newsletter@reply.ticketmaster.com","d":"Ticketmaster","p":"Ticketmaster","t":"f"}],"su":"James, See it Live: Tickets on Sale & Special Offers This Week","fr":"TicketMaster: TicketAlert [Ticketmaster] Ticket Alert ® June 28, 2012 Music | Sports | Arts & Theater | Family View your cart & shop for events [My ...","score":1.0,"cm":true,"sf":"1340945402000"},{"s":25755,"d":1340899014000,"l":"2","cid":"-248000","f":"u","rev":1309700,"id":"248000","e":[{"a":"GQ_Daily@email.GQ.com","d":"GQ","p":"GQ","t":"f"}],"su":"The Tank Tops You Need this Summer, The Smaht Man's Guide to Cambridge, and More ","fr":"GQ Daily Newsletter [SMART + SHARP] Thursday 06.28.12 A Higher Bar When you think \"Tank top,\" do you immediately think of Jersey Shore meatheads? ...","score":1.0,"cm":true,"sf":"1340899014000"},{"s":102735,"d":1340898340000,"l":"2","cid":"-247980","f":"u","rev":1309600,"id":"247980","e":[{"a":"reminder@e.gilt.com","d":"Gilt","p":"Gilt","t":"f"}],"su":"Façonnable, Get Ready for the 4th, J.D. Fisk, kai fragrance, VBN, Pantherella Socks, Suede Shoes, Belts, Get the Look: Paris Fashion Week, Incotex & Incotex Ivory and more Starts Today at Noon ET","fr":"If you are unable to see this message, http://click.e.gilt.com/?qs=8f54054517c2122aea5501573a0502e814ee8fc40068e15f0e605feedfc37f8d79f0bfa0e0f8d646 ...","score":1.0,"cm":true,"sf":"1340898340000"},{"s":11748,"d":1340897330000,"l":"2","cid":"-247960","f":"u","rev":1309500,"id":"247960","e":[{"a":"Bear_Creek_Mountain_Resort@mail.vresp.com","d":"Bear","p":"Bear Creek Mountain Resort","t":"f"}],"su":"Music Under The Stars Tonight from 7-10PM","fr":"Music Under The Stars A Free Community Concert Series 6.28.12 7.26.12 8.23.12 9.27.12 - Tonight 6.28.12 7-10Pm featuring the sounds of Tavern Tan - ...","score":1.0,"cm":true,"sf":"1340897330000"},{"s":12311,"d":1340887296000,"l":"2","cid":"-247940","f":"u","rev":1309400,"id":"247940","e":[{"a":"golflink@mail.golflink.com","d":"GolfLink","p":"GolfLink Tee Time Alert","t":"f"}],"su":"This Week’s Tee Time Hot Deals in Your Area","fr":"Tee Times Newsletter Hot Tee Time Deals in Quakertown, PA Thursday, Jun 28 to Tuesday, Jul 03 Lederach Golf Course » From $25.00 (save 36%) Spring ...","score":1.0,"cm":true,"sf":"1340887296000"},{"s":36775,"d":1340885793000,"l":"2","cid":"-247920","f":"u","rev":1309300,"id":"247920","e":[{"a":"cs@email.zappos.com","d":"Zappos.com","p":"Zappos.com","t":"f"}],"su":"Who Says Travel Has To Be Stressful...","fr":"\u003Cimg src=\"https://track.zappos.com/email.cgi?ref=int_mkt_zappos_120628_casual\" width=\"1\" height=\"1\" /\u003E You pay for your ticket; we pay for your ...","score":1.0,"cm":true,"sf":"1340885793000"},{"s":42757,"d":1340881242000,"l":"2","cid":"-247900","f":"u","rev":1309100,"id":"247900","e":[{"a":"foundation@bucks.edu","d":"Bucks","p":"Bucks County Community College Foundation","t":"f"}],"su":"New Alumni Benefit! BCCC's Early Learning Center Now Enrolling for Fall","fr":"Having trouble viewing this email? Click here ...","score":1.0,"cm":true,"sf":"1340881242000"},{"s":53629,"d":1340844428000,"l":"2","cid":"-247880","f":"u","rev":1309000,"id":"247880","e":[{"a":"reminder@e.parkandbond.com","d":"Park","p":"Park & Bond","t":"f"}],"su":"The key shapes for summer sunglasses, our tribute to America’s stylish best, and more substance & style","fr":"Park & Bond If you are unable to see this message, ...","score":1.0,"cm":true,"sf":"1340844428000"},{"s":26425,"d":1340842952000,"l":"2","cid":"-247860","f":"u","rev":1308900,"id":"247860","e":[{"a":"n-neznqn15=pbzpnfg.arg-262c0@postmaster.twitter.com","d":"Twitter","p":"Twitter","t":"f"}],"su":"Jake Ferrara(@JakeFerrara) mentioned you on Twitter!","fr":"Jake Ferrara @JakeFerrara Had an excellent time with my buhls in Long Island #AlotOfLaughs #AlotOfMemories @JamesSoGaughan @TonyLatronica @effdock ...","score":1.0,"cm":true,"sf":"1340842952000"},{"s":34111,"d":1340837471000,"l":"2","cid":"-247840","f":"u","rev":1308800,"id":"247840","e":[{"a":"GQ_Weekly@email.GQ.com","d":"GQ","p":"GQ","t":"f"}],"su":"New Kate Upton Video, the Latest From Men's Fashion Week, and More","fr":"GQ Weekly Newsletter [Your Weekly GQ - What not to miss this week on GQ.com] This Week's Big Story Model Tee Here, Avenger and rising star Chris ...","score":1.0,"cm":true,"sf":"1340837471000"},{"s":25550,"d":1340837101000,"l":"2","cid":"-247820","f":"u","rev":1308700,"id":"247820","e":[{"a":"GQ_Daily@email.GQ.com","d":"GQ","p":"GQ","t":"f"}],"su":"The Ultimate Guide to Watches, Avenger Chris Hemsworth in the Best Tees of Summer, and More","fr":"GQ Daily Newsletter [SMART + SHARP] Wednesday 06.27.12 The GQ Guide to Watches Whether you're looking for an inexpensive time-teller or a solid-gold ...","score":1.0,"cm":true,"sf":"1340837101000"},{"s":17074,"d":1340830582000,"l":"2","cid":"-247800","f":"u","rev":1308600,"id":"247800","e":[{"a":"TheNorthFace@mail.thenorthface.com","d":"The","p":"The North Face","t":"f"}],"su":"Get Outdoors. Take Someone With You.","fr":"Spark a connection to nature, or better yet inspire the next generation of outdoor enthusiasts, explorers and conservationists to Never Stop ...","score":1.0,"cm":true,"sf":"1340830582000"},{"s":20135,"d":1340821145000,"l":"2","cid":"-247780","f":"u","rev":1308500,"id":"247780","e":[{"a":"info@oldehomesteadgolfclub.com","d":"Olde","p":"Olde Homestead Golf Club","t":"f"}],"su":"Membership Extravaganza","fr":"-- Olde Homestead News and Events! June 27th, 2012 TABLE OF CONTENTS Fourth of July Membership Special! 3-Day July Junior Camp Club Championship ...","score":1.0,"cm":true,"sf":"1340821145000"},{"s":7210,"d":1340819037000,"l":"2","cid":"-247760","f":"u","rev":1308400,"id":"247760","e":[{"a":"gcarpino@ravensclawgolfclub.com","d":"Raven's","p":"Raven's Claw Golf Club","t":"f"}],"su":"One Day $35 Golf Special - Tomorrow Only!","fr":"[Don't Get Beat by the Heat] Another Raven's Claw Advantage! Tomorrow Only! (Thursday, June 27th) $35 Green fee w/ cart - 7AM - 4PM $25 Green fee w/ ...","score":1.0,"cm":true,"sf":"1340819037000"},{"s":19783,"d":1340816923000,"l":"2","cid":"-247740","f":"u","rev":1308300,"id":"247740","e":[{"a":"dividendmiles@myusairways.com","d":"US","p":"US Airways - Dividend Miles","t":"f"}],"su":"Enough miles for an award ticket","fr":"Enough miles for an award ticket Earn more miels with a US Airways Premier World MasterCard JAMES GAUGHAN | Dividend Miles #: 50019631360 [US Airways ...","score":1.0,"cm":true,"sf":"1340816923000"},{"s":98338,"d":1340811721000,"l":"2","cid":"-247720","f":"u","rev":1308200,"id":"247720","e":[{"a":"reminder@e.gilt.com","d":"Gilt","p":"Gilt","t":"f"}],"su":"Grenson, Puma Apparel, Vanishing Elephant, A Tranquil Bedroom, PRO-Keds, Up to 75% Off: White Sale, Summer Staples: Shorts, Dolce & Gabbana, SmoothCo. and more Starts Today at Noon ET","fr":"If you are unable to see this message, http://click.e.gilt.com/?qs=470b23f27ac790570b7ac6514d329c2b40133f5f610f959f17fe21f9db17a4583ae2709676d9c31f ...","score":1.0,"cm":true,"sf":"1340811721000"},{"s":34743,"d":1340803770000,"l":"2","cid":"-247700","f":"u","rev":1308100,"id":"247700","e":[{"a":"movies@mkt.fandango.com","d":"Fandango","p":"Fandango FanMail","t":"f"}],"su":"Just in time for summer","fr":"Introducing a new and improved Fandango . View web version | View mobile version Add movies@mkt.fandango.com to your address book. More Details . ...","score":1.0,"cm":true,"sf":"1340803770000"},{"s":95651,"d":1340782102000,"l":"2","cid":"-247680","f":"u","rev":1308000,"id":"247680","e":[{"a":"ebay@ebay.com","d":"eBay","p":"eBay","t":"f"}],"su":"eBay Watched Item Reminder: Scotty Cameron Newport 2.6 HEAVY 20glike new condition 34 in (270993497217)","fr":"-- eBay sent this message to James Gaughan (famoussas15). Your registered name is included to show this message originated from eBay. Learn more at ...","score":1.0,"cm":true,"sf":"1340782102000"},{"s":14206,"d":1340734674000,"l":"2","cid":"-247660","f":"u","rev":1307800,"id":"247660","e":[{"a":"Offers@offers.dominos.com","d":"Domino's","p":"Domino's Pizza","t":"f"}],"su":"Peace of mind for $7.99.","fr":"Domino's Pizza Monday thru Wednesday get any large 3-topping pizza for $7.99 each. Carryout only. ORDER ONLINE . Order Domino’s anywhere now using ...","score":1.0,"cm":true,"sf":"1340734674000"},{"s":30484,"d":1340733798000,"l":"2","cid":"-247640","f":"u","rev":1307700,"id":"247640","e":[{"a":"wb@email.whistlerblackcomb.com","d":"Whistler","p":"Whistler Blackcomb","t":"f"}],"su":"Last chance - Whistler summer 3rd night free offer ends June 30","fr":"View this e-mail with images ...","score":1.0,"cm":true,"sf":"1340733798000"}],"more":true,"_jsns":"urn:zimbraMail"}],"_jsns":"urn:zimbra"}},"_jsns":"urn:zimbraSoap"};
  11864.  
  11865.  
  11866.  
  11867. // NOTE: Domain info settings moved into launch function to
  11868. // prevent sloppy code from accessing extraneous window
  11869. // scoped variable.
  11870.  
  11871. var settings = {
  11872. "dummy":1,
  11873. "zimbraPrefMailItemsPerPage":"25",
  11874. "zimbraPrefGroupMailBy":"message",
  11875. "zimbraPrefSkin":"velodrome2",
  11876. "zimbraPrefClientType":"advanced",
  11877. "zimbraFeatureTasksEnabled":"FALSE",
  11878. "zimbraFeatureNotebookEnabled":"FALSE",
  11879. "zimbraFeatureIMEnabled":"FALSE",
  11880. "zimbraFeatureVoiceEnabled":"TRUE",
  11881. "zimbraFeatureContactsEnabled":"TRUE",
  11882. "zimbraFeatureConversationsEnabled":"TRUE",
  11883. "zimbraFeaturePortalEnabled":"TRUE",
  11884. "zimbraFeatureVoiceUpsellEnabled":"FALSE",
  11885. "zimbraFeatureOptionsEnabled":"TRUE",
  11886. "zimbraFeatureMailEnabled":"TRUE",
  11887. "zimbraFeatureCalendarUpsellEnabled":"TRUE",
  11888. "zimbraFeatureCalendarEnabled":"FALSE",
  11889. "zimbraWebClientLogoutURL":"https://login.comcast.net/logout?s=smartzone&continue=http://www.comcast.net",
  11890. "zimbraWebClientLoginURL":"https://login.comcast.net/logout?s=portal&continue=http://xfinity.comcast.net/?cid=xfinityconnecttocomcastnet"
  11891. };
  11892.  
  11893. var params = {
  11894. app:"",
  11895. settings:settings, batchInfoResponse:batchInfoResponse,
  11896. offlineMode:false, devMode:false,
  11897. protocolMode:protocolMode, httpPort:"80", httpsPort:"443",
  11898. noSplashScreen:noSplashScreen
  11899. };
  11900. ZmZimbraMail.run(params);
  11901. }
  11902.  
  11903. // START DOMContentLoaded
  11904. // Mozilla and Opera 9 expose the event we could use
  11905. if (document.addEventListener) {
  11906. document.addEventListener("DOMContentLoaded", launch, null);
  11907.  
  11908. // mainly for Opera 8.5, won't be fired if DOMContentLoaded fired already.
  11909. document.addEventListener("load", launch, null);
  11910. }
  11911.  
  11912. // for Internet Explorer. readyState will not be achieved on init call
  11913. if (AjxEnv.isIE && AjxEnv.isWindows) {
  11914. document.attachEvent("onreadystatechange", function(e) {
  11915. if (document.readyState == "complete") {
  11916. launch();
  11917. }
  11918. });
  11919. }
  11920.  
  11921. if (/(WebKit|khtml)/i.test(navigator.userAgent)) { // sniff
  11922. var _timer = setInterval(function() {
  11923. if (/loaded|complete/.test(document.readyState)) {
  11924. launch();
  11925. // call the onload handler
  11926. }
  11927. }, 10);
  11928. }
  11929. // END DOMContentLoaded
  11930.  
  11931. AjxCore.addOnloadListener(launch);
  11932. AjxCore.addOnunloadListener(ZmZimbraMail.unload);
  11933. </script>
  11934. </div>
  11935. </body>
  11936. </html>
  11937.  
  11938. EMAIL RESPONSE TIMED OUT
  11939. HTTP/1.0 200 OK
  11940. Date: Sun, 01 Jul 2012 09:29:10 GMT
  11941. Content-Type: text/javascript; charset=utf-8
  11942. Content-Length: 209
  11943.  
  11944. {"Header":{"context":{"session":{"id":"13756433","_content":"13756433"},"change":{"token":187599},"_jsns":"urn:zimbra"}},"Body":{"SendMsgResponse":{"m":[{}],"_jsns":"urn:zimbraMail"}},"_jsns":"urn:zimbraSoap"}
  11945. 1ST REDIRECT TIMED OUT
  11946. HTTP/1.1 302 Moved Temporarily
  11947. Date: Sun, 01 Jul 2012 09:29:12 GMT
  11948. Server: Apache
  11949. Cache-Control: no-cache="Set-Cookie"
  11950. Location: http://wnamp.mail.comcast.net/istp/LandingPage/
  11951. Set-Cookie: tg_ticket=VEdUAQEAABSTtgaCj6t9xCjw_3W0EBE-IrCskhDrK99fl5vSjiLpMeP-M4NVAAAA4D_3N6Y9ZIXu3hH6r0cfiSyx62M5Hh8fBPfH3XETO-fj35NlE92ak-snepKL3BhQTnDEd_OHnBP_MEPLIjpESMUQXg8UnmkGOSihYGNVks7VtLDQY1wnpK3yijLXcWiG1aDL9JdqSV7RrNUILfy3tGO88t_4Qw_zy6mChZYUUKvS_9Ed7JnmsCjZEPEhaUCRP3SRMimI0v6c7-H640Ad79PZ_LCKOvpF6ZMtZF3bh5jW6_aUNqNlCl-WsGbCu8KW6_-7oLpesZLFkS4UXYNB7FzXoMvdI5TuJFDVCXNMlbLq; domain=login.comcast.net; path=/; secure
  11952. Set-Cookie: MYPORTAL=em=atruestar&gt=Stephanie&guid=028533111715062006Comcast.USR1JR&auto=0&ipr=0&cdvs=0&wid=98446&zip=98446&tid=4354cf501c1df6b38f07-5903c09d58cb0a4af43a91b51692a0a879822ce6; domain=comcast.net; path=/
  11953. Set-Cookie: s_ticket=TFNUAQECAIA4GKR649skuNmP94R2gUFV0BZyRypMYOYzAG_H4GvjW8H80PAtw9yqpigp4d4uaxtl5-XfYb1FXQ12nGDj2kqaOTkPGmBpl0_rBJncFh5C429EGsj1rMJDDXyIro8H_N-g0utBEuPjAQWU3a0G-li9pY_Bg67Y5LmdRAqyXtLIuxDeKDIS5oOKPLd_Xywvu5AVAAAA8OotbTnUQkzarug2KPcCe0vluhECtxOlN8dZlsZpWPNhWr1c9xyUEthQ2-rNV5NCI3BWw9H6tUzx_LqQigyu3KuhejTiX8z6OzMP8jgrko5JylgE_6jhWaev4h9-K6Ue7WkcsU1biFY-ii-_nG_Qluc1S7LuTMyFwG26pYqQRXhkRw0ZzpGOiAEyc1JyRndNThBi3kJr62BaPDYPh5WtOtR372Q95g4ZcxvMajXpFrPgdnzTwRaE0ysC-0uRdLIwUeZ-ZhcZyCDuVztrUixDC_52iLthqVwD5mvXvx4BRLwUee7lLOMn-MAorKSDkE7Txg**; domain=comcast.net; path=/
  11954. Set-Cookie: tls_s_ticket=TFNUAQECAIBMMkPBihbn75yBRCks4gncFMHXmnuI9Fwy1GACKGADjF4U8B3-RcVcdgD7n6MrYFhUNdgqGaykwtDZHaxrgi_QjaMNNdS6m0l_UXYP3O6zYW6MYXwpqm8qEmIaPDq0WCnGOV2OS6KxHX28NWKdcvfY_pPV3XHpjZYwe3vUBOsSGBBN9qqvwtR_x3nkvzYGFZVAAAAA8Mh7NXAYPoqdGosdJn2w_RKG0OHnpO9Nd2-AwCyPikSmOYC9_rV5wkhXaEsPBnBiu07UQGnaL98waUDUNbaxm_BJPqa3nqQwum9LvpyI2UiSv052xI1JEGXgKHBzGod89f0XaFyv1YhwlCfJyysAY9FeX1Ewo8cZgnZrd9M24LNUIiPAF9FIoyGAOPO3A097CPJHkDqn0SOWT_nzZlhoFIzHek84tNjSQ__7TT7K1McIGiACjCM2nkfl8UOgo1W6LpefhIZjClL2Sl2iupi35e9VI4pI3Z3n8JwdKcp_rJCvSvsGv8k2bKMc6fwX5B1XFQ**; domain=comcast.net; path=/; secure
  11955. Set-Cookie: session@comcast.net=TFNUAQECAIA4GKR649skuNmP94R2gUFV0BZyRypMYOYzAG_H4GvjW8H80PAtw9yqpigp4d4uaxtl5-XfYb1FXQ12nGDj2kqaOTkPGmBpl0_rBJncFh5C429EGsj1rMJDDXyIro8H_N-g0utBEuPjAQWU3a0G-li9pY_Bg67Y5LmdRAqyXtLIuxDeKDIS5oOKPLd_Xywvu5AVAAAA8OotbTnUQkzarug2KPcCe0vluhECtxOlN8dZlsZpWPNhWr1c9xyUEthQ2-rNV5NCI3BWw9H6tUzx_LqQigyu3KuhejTiX8z6OzMP8jgrko5JylgE_6jhWaev4h9-K6Ue7WkcsU1biFY-ii-_nG_Qluc1S7LuTMyFwG26pYqQRXhkRw0ZzpGOiAEyc1JyRndNThBi3kJr62BaPDYPh5WtOtR372Q95g4ZcxvMajXpFrPgdnzTwRaE0ysC-0uRdLIwUeZ-ZhcZyCDuVztrUixDC_52iLthqVwD5mvXvx4BRLwUee7lLOMn-MAorKSDkE7Txg**; domain=comcast.net; path=/
  11956. X-Powered-By: Servlet/2.5 JSP/2.1
  11957. Vary: Accept-Encoding
  11958. Content-Encoding: gzip
  11959. Connection: close
  11960. Content-Type: text/html
  11961. Set-Cookie: BIGipServerrs_cima-web=306798668.36895.0000; path=/
  11962.  
  11963. <html><head><title>302 Moved Temporarily</title></head>
  11964. <body bgcolor="#FFFFFF">
  11965. <p>This document you requested has moved temporarily.</p>
  11966. <p>It's now at <a href="http://wnamp.mail.comcast.net/istp/LandingPage/">http://wnamp.mail.comcast.net/istp/LandingPage/</a>.</p>
  11967. </body></html>
  11968.  
  11969. LOGIN TIMED OUT
  11970. HTTP/1.0 200 OK
  11971. Date: Sun, 01 Jul 2012 09:29:14 GMT
  11972. Content-Type: text/javascript; charset=utf-8
  11973. Content-Length: 210
  11974. Connection: keep-alive
  11975.  
  11976. {"Header":{"context":{"session":{"id":"11358783","_content":"11358783"},"change":{"token":1137902},"_jsns":"urn:zimbra"}},"Body":{"SendMsgResponse":{"m":[{}],"_jsns":"urn:zimbraMail"}},"_jsns":"urn:zimbraSoap"}
  11977. CONTACT FETCH TIMED OUT
  11978. HTTP/1.0 302 Moved Temporarily
  11979. Date: Sun, 01 Jul 2012 09:29:10 GMT
  11980. Server: Apache
  11981. Cache-Control: no-cache, must-revalidate
  11982. Expires: Mon, 26 Jul 1997 05:00:00 GMT
  11983. Location: http://www.comcast.net/errors/unauthorized
  11984. Content-Length: 0
  11985. Content-Type: text/html
  11986. Connection: keep-alive
  11987.  
  11988.  
  11989. COMPOSE PAGE TIMED OUT
  11990. HTTP/1.0 302 Moved Temporarily
  11991. Date: Sun, 01 Jul 2012 09:31:12 GMT
  11992. Content-Type: text/html; charset=utf-8
  11993. Expires: Tue, 24 Jan 2000 20:46:50 GMT
  11994. Cache-Control: no-store, no-cache, must-revalidate, max-age=0
  11995. Pragma: no-cache
  11996. Content-Language: en-US
  11997. Location: http://sz0093.wc.mail.comcast.net/zimbra/h/search?view=compose&view=compose&mesg=welcome&initial=true&app=
  11998. Content-Length: 0
  11999. Connection: keep-alive
  12000.  
  12001.  
  12002. COMPOSE PAGE TIMED OUT
  12003. HTTP/1.0 302 Moved Temporarily
  12004. Date: Sun, 01 Jul 2012 09:33:20 GMT
  12005. Content-Type: text/html; charset=utf-8
  12006. Expires: Tue, 24 Jan 2000 20:46:50 GMT
  12007. Cache-Control: no-store, no-cache, must-revalidate, max-age=0
  12008. Pragma: no-cache
  12009. Content-Language: en-US
  12010. Location: http://sz0093.wc.mail.comcast.net/zimbra/h/search?view=compose&view=compose&mesg=welcome&initial=true&app=
  12011. Content-Length: 0
  12012. Connection: keep-alive
  12013.  
  12014.  
  12015. CONTACT FETCH TIMED OUT
  12016. HTTP/1.0 302 Moved Temporarily
  12017. Date: Sun, 01 Jul 2012 09:33:47 GMT
  12018. Server: Apache
  12019. Cache-Control: no-cache, must-revalidate
  12020. Expires: Mon, 26 Jul 1997 05:00:00 GMT
  12021. Location: http://www.comcast.net/errors/unauthorized
  12022. Content-Length: 0
  12023. Content-Type: text/html
  12024. Connection: keep-alive
  12025.  
  12026.  
  12027. EMAIL RESPONSE TIMED OUT
  12028. HTTP/1.0 200 OK
  12029. Date: Sun, 01 Jul 2012 09:37:03 GMT
  12030. Content-Type: text/javascript; charset=utf-8
  12031. Content-Length: 208
  12032. Connection: keep-alive
  12033.  
  12034. {"Header":{"context":{"session":{"id":"11185526","_content":"11185526"},"change":{"token":30899},"_jsns":"urn:zimbra"}},"Body":{"SendMsgResponse":{"m":[{}],"_jsns":"urn:zimbraMail"}},"_jsns":"urn:zimbraSoap"}
  12035. EMAIL RESPONSE TIMED OUT
  12036. HTTP/1.0 200 OK
  12037. Date: Sun, 01 Jul 2012 09:37:13 GMT
  12038. Content-Type: text/javascript; charset=utf-8
  12039. Content-Length: 210
  12040. Connection: keep-alive
  12041.  
  12042. {"Header":{"context":{"session":{"id":"13390199","_content":"13390199"},"change":{"token":1250901},"_jsns":"urn:zimbra"}},"Body":{"SendMsgResponse":{"m":[{}],"_jsns":"urn:zimbraMail"}},"_jsns":"urn:zimbraSoap"}
  12043. CONTACT FETCH TIMED OUT
  12044. HTTP/1.0 302 Moved Temporarily
  12045. Date: Sun, 01 Jul 2012 09:40:28 GMT
  12046. Server: Apache
  12047. Cache-Control: no-cache, must-revalidate
  12048. Expires: Mon, 26 Jul 1997 05:00:00 GMT
  12049. Location: http://www.comcast.net/errors/unauthorized
  12050. Content-Length: 0
  12051. Content-Type: text/html
  12052. Connection: close
  12053.  
  12054.  
  12055. CONTACT FETCH TIMED OUT
  12056. HTTP/1.0 302 Moved Temporarily
  12057. Date: Sun, 01 Jul 2012 09:43:13 GMT
  12058. Server: Apache
  12059. Cache-Control: no-cache, must-revalidate
  12060. Expires: Mon, 26 Jul 1997 05:00:00 GMT
  12061. Location: http://www.comcast.net/errors/unauthorized
  12062. Content-Length: 0
  12063. Content-Type: text/html
Add Comment
Please, Sign In to add comment