(function(d, w, currentOutage, cookieName, messages, i){ return; var date = { month : 6, day : 10, year : 2015 } currentOutage = w.currentOutage || 0; if (!currentOutage) return; cookieName = 'tnwOnz'; if (d.cookie.indexOf(cookieName) !== -1) return; function DOM(){ this.domain = w.location.host.split('.').pop(); this.localeMap = { 'com' : 'en-US', 'ca' : 'en-CA', 'uk' : 'en-GB', 'it' : 'it-IT', 'fr' : 'fr-FR', 'de' : 'de-DE', 'cn' : 'zh-CN', 'hk' : 'zh-HK', 'jp' : 'ja-JP' }; this.locale = (this.domain in this.localeMap) ? this.localeMap[this.domain] : 'en-US'; //unless locale set by preference if (typeof i18n !== 'undefined' && typeof i18n.lng === 'function'){ this.locale = i18n.lng(); } } // to format the date function formatDate(date, format, offset){ offset = offset || 0; // for days offset in different timezones return format.replace('DD',(date.day.toString().length == 1) ? '0' + (date.day + offset).toString() : date.day + offset).replace('M1',date.month).replace('MM', (date.month.toString().length == 1) ? '0' + date.month.toString() : date.month).replace('YYYY',date.year); } // schedule maintenace / upgrade notice messages = { 'en-US': 'Scheduled maintenance notice: The Terapeak application may be offline for up to two hours beginning MM/DD/YYYY at 6:00pm PDT (9:00pm EDT).', 'en-GB': 'Scheduled maintenance notice: The Terapeak application may be offline for up to two hours beginning MM/DD/YYYY at 2:00am GMT.', 'it-IT': 'Avviso di manutenzione programmata: L\'applicazione Terapeak potrà essere offline per un massimo di due ore a cominciare dal DD/MM/YYYY alle 03:00 ora italiana', 'fr-FR': 'Avis de maintenance programmée : Il se peut que l\'application Terapeak soit hors-ligne jusque pendant deux heures, commençant le DD/MM/YYYY à 03:00h CEST', 'de-DE': 'Planmäßige Wartungsarbeiten: Die Terapeak Anwendung wird Ihnen am DD.MM.YYYY ab 3 Uhr für 2 Stunden nicht zur Verfügung stehen.', 'zh-CN': '系统维护时间通知:Terapeak工具由于系统维护,可能会YYYY-M1-DD日早9点开始有2小时无法正常使用的时间', 'zh-HK': '系統維護時間通知:Terapeak工具由於系統維護,可能會YYYY-M1-DD日早9点開始有2小時無法正常使用的時間', 'ja-JP': 'メンテナンスのお知らせ: YYYY-M1-DD日午前10時より、メンテナンスのためTerapeakが2時間程度ご利用いただけなくなります。' }; // replace strings with correct dates messages['en-CA'] = messages['en-US']; messages['zh-TW'] = messages['zh-HK']; messages['ja'] = messages['ja-JP']; for (i in messages){ offset = (i !== 'en-CA' && i !== 'en-US') ? 1 : 0; messages[i] = formatDate(date, messages[i], offset); } var cssBody = 'body:after { top: 82px; } ', head = d.head || d.getElementsByTagName('head')[0], body = d.body || d.getElementsByTagName('body')[0], style = d.createElement('style'), div = d.createElement('div'), _dom = new DOM(); cssBody += '\ #noticeDowntime {\ font-family: \'Helvetica Neue\', Helvetica, Arial, sans-serif;\ line-height: 1.42857143; \ font-size: 14px; \ box-sizing: border-box; \ border: 1px solid transparent; \ text-align:center; \ color: #31708f; \ background-color: #d9edf7; \ border-color: #bce8f1; \ overflow-y:hidden; \ transition-property: all; \ transition-duration: .5s; \ transition-timing-function: cubic-bezier(0, 1, 0.5, 1); \ height:0px; \ width:100%; \ }\ #noticeDowntime.open { \ padding:15px; \ height: inherit; \ }\ #noticeDowntime.close { \ padding:0px; \ height:0px; \ }'; //insert css into the head style.type = 'text/css'; style.id = 'cssBodyNotice' if (style.styleSheet){ style.styleSheet.cssText = cssBody; } else {style.appendChild(d.createTextNode(cssBody));} head.appendChild(style); //insert the notice div into the body div.innerHTML = '\