var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); /* Apple Global JavaScript Application Bootstrap */ var defaultGlobalConfig = (function(){ var milli = 1, second = 1000, minute = 60000, hour = 3600000, day = 86400000; return { enabled: true, //default enabled. If disabled, clicking the application in the dock will bring up a dialog telling a user the application is not available. pollStyle: "exponential-decay", //default pollStyle. Options are "linear" or "exponential-decay" - This determines whether autonomous polling will occur a set number of times on an interval, or whether it will decay exponentially. pollMin: 5*minute, //default pollMin time. Respected only by exponential polling style. Ignored by linear polling style. pollMax: 1*hour, //default pollMax time. Respected only by exponential polling style. Ignored by linear polling style. pollInterval: 5*minute, //default pollInterval. Respected only by linear polling style. Ignored by exponential polling style. maxPollCount: 4, //default maxPollCount. Respected only by linear polling style. Ignored by exponential polling style. focusPollMin: 1*second, //default focusPollMin. This is the minimum amount of time required after a refresh for a window onfocus to trigger a new refresh. serverErrorRetryDelay: 1*second, //default multiple for random time to wait between bout of multiple retry requests after receiving a 307 error. serverErrorPauseDelay: 1*minute, //default time to wait after initial bout of retry requests after 307 error before trying final request(s). serverErrorRetryCount: 3, //default number of tries in initial bout of retry requests after 307 error. serverErrorFinalRetryCount: 1, //default number of final tries after waiting the serverErrorPauseDelay time after the initial bout of tries. imageDownerThreadCount: 4, //default number of threads in the image downloader (currently only used in Gallery). Increase this if using multi-domaining to allow more than 2 open HTTP connections. imageDownerThreadDelay: 0*milli, //amount of forced delay in between image requests in the image downloader (currently only used in Gallery). Increase this if you're... desperate to the point of not caring about user experience. Good to keep it at zero. newsURL: { en: "http://web.archive.org/web/20081113214614/http://www.apple.com/mobileme/news/", // News URL fr: "http://web.archive.org/web/20081113214614/http://www.apple.com/fr/mobileme/news/", de: "http://web.archive.org/web/20081113214614/http://www.apple.com/de/mobileme/news/", ja: "http://web.archive.org/web/20081113214614/http://www.apple.com/jp/mobileme/news/", chooseLoc: true } };})(); // handle missing console if (!window.console) { var Console = function() { this.error = this.info = this.warn = this.log = function(it) { if (window.jash) jash.print(it, false); } ; }; window.console = new Console() ; }; window._loadStartTime = new Date().getTime(); String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g,""); }; var _env = null; //this will be set to bootstrap.env, which will contain all information for all applications var bootstrap = (function() { var knownExistentApplications = ['mail','contacts','calendar','gallery','idisk','account']; var app = window.location.pathname; if(app.match(/\/$/)) app = app.substring(0, app.length - 1); // PRIVATE HELPERS // Browser detections var Browser = { IE: navigator.userAgent.indexOf('MSIE') > -1, Opera: navigator.userAgent.indexOf('Opera') > -1, WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1, Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1, MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/), Safari:navigator.userAgent.indexOf('Safari') > -1, Firefox:navigator.userAgent.indexOf('Firefox') > -1 } ; // Base64 Decoding from http://www.webtoolkit.info/javascript-base64.html // private method for UTF-8 encoding var _utf8_encode = function (string) { string = string.replace(/\r\n/g,"\n"); var utftext = ""; for (var n = 0; n < string.length; n++) { var c = string.charCodeAt(n); if (c < 128) { utftext += String.fromCharCode(c); } else if((c > 127) && (c < 2048)) { utftext += String.fromCharCode((c >> 6) | 192); utftext += String.fromCharCode((c & 63) | 128); } else { utftext += String.fromCharCode((c >> 12) | 224); utftext += String.fromCharCode(((c >> 6) & 63) | 128); utftext += String.fromCharCode((c & 63) | 128); } } return utftext; }; // private method for UTF-8 decoding var _utf8_decode = function(utftext) { var string = ""; var i = 0; var c = c1 = c2 = 0; while ( i < utftext.length ) { c = utftext.charCodeAt(i); if (c < 128) { string += String.fromCharCode(c); i++; } else if((c > 191) && (c < 224)) { c2 = utftext.charCodeAt(i+1); string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); i += 2; } else { c2 = utftext.charCodeAt(i+1); c3 = utftext.charCodeAt(i+2); string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); i += 3; } } return string; } ; // private property var _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" ; // Check for supported browser and redirect if necessary. var bootstrap = { Browser: Browser, env: {}, isRedirecting: false, restricted: false, checkBrowserCompatibility: function() { var ua= navigator.userAgent.toLowerCase(); var version = navigator.appVersion; var versionMinor; var language = (navigator.language) ? navigator.language : navigator.userLanguage; var isMac = (ua.indexOf('mac') != -1); var isWin = (ua.indexOf('win') != -1); var isVista = (ua.indexOf('nt 6') != -1); var isWinXP = (ua.indexOf('nt 5') != -1); var isOldWin = (isWin && !isVista && !isWinXP) ? true:false; var isLinux = (ua.indexOf('linux') != -1); if (this.readCookie('browser') != null) return true; if (Browser.IE) { version = parseFloat( ua.substring( ua.indexOf('msie ') + 5 ) ); } else if (Browser.Safari) { version = parseFloat( ua.match(/AppleWebKit\/(\d+[.]*\d*)/i)[1] ); } else if (Browser.Firefox) { versionMinor = parseFloat( ua.substring( ua.lastIndexOf('/') + 1 ) ); version = parseInt(versionMinor,10); } var destination_page = (Browser.MobileSafari) ? 'iphone_welcome' : 'unsupported_browser'; if ((Browser.IE && version > 8) || (Browser.IE && version < 7) || (Browser.Safari && version < 500 ) || (Browser.Firefox && version < 2 ) || (Browser.Firefox && version >= 2 && (isOldWin || isLinux) ) || (Browser.Opera) || (Browser.WebKit && !Browser.Safari) || (Browser.MobileSafari)) { var langCode = language.substring(0, 2) ; switch(langCode) { case 'en': case 'ja': case 'fr': case 'de': window.location.href = "http://web.archive.org/web/20081113214614/http://www.me.com/"+destination_page+"/"+langCode+"/"; this.isRedirecting = true; break; default: window.location.href = "http://web.archive.org/web/20081113214614/http://www.me.com/"+destination_page+"/"; this.isRedirecting = true; break; } return false ; } return true ; }, // Cookie support readCookie: function(c_name) { var c_start, c_end, c_name; if (document.cookie.length>0) { c_start=document.cookie.indexOf(c_name + "="); if (c_start!=-1) { c_start=c_start + c_name.length+1 ; c_end=document.cookie.indexOf(";",c_start); if (c_end==-1) c_end=document.cookie.length; return unescape(document.cookie.substring(c_start,c_end)); } } return null; }, deleteCookie: function(c_name) { // get the value... var value = this.readCookie(c_name) ; if (value == null) return; // nothing to delete. document.cookie = c_name + "=;path=/;domain=." + window.location.hostname + ";expires=Thu, 01-Jan-1970 00:00:01 GMT" ; }, readCacheCookie: function(username) { var cacheValues = {}; if ((cache = this.readCookie("badgeCache_" + username)) !== null) { var appName, valuePair; var storedBadges = cache.split("&"); for (i=0; i < storedBadges.length; i++) { valuePair = storedBadges[i].split('='); appName = valuePair[0]; cacheValues[appName] = parseInt(valuePair[1],0); } return cacheValues; } return false; }, encodeBase64: function(input) { var output = ""; var chr1, chr2, chr3, enc1, enc2, enc3, enc4; var i = 0; input = _utf8_encode(input); while (i < input.length) { chr1 = input.charCodeAt(i++); chr2 = input.charCodeAt(i++); chr3 = input.charCodeAt(i++); enc1 = chr1 >> 2; enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); enc4 = chr3 & 63; if (isNaN(chr2)) { enc3 = enc4 = 64; } else if (isNaN(chr3)) { enc4 = 64; } output = output + _keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4); } return output; }, decodeBase64: function(input) { var output = ""; var chr1, chr2, chr3; var enc1, enc2, enc3, enc4; var i = 0; input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); while (i < input.length) { enc1 = _keyStr.indexOf(input.charAt(i++)); enc2 = _keyStr.indexOf(input.charAt(i++)); enc3 = _keyStr.indexOf(input.charAt(i++)); enc4 = _keyStr.indexOf(input.charAt(i++)); chr1 = (enc1 << 2) | (enc2 >> 4); chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); chr3 = ((enc3 & 3) << 6) | enc4; output = output + String.fromCharCode(chr1); if (enc3 != 64) { output = output + String.fromCharCode(chr2); } if (enc4 != 64) { output = output + String.fromCharCode(chr3); } } output = _utf8_decode(output); return output; }, // collects information about application. setup: function() { if (!this.checkBrowserCompatibility()) return false; // will exit... // bring config in... add global if not already there... var config = this.systemConfig = (window.systemConfig) ? window.systemConfig : {}; this.defaultGlobalConfig = (window.defaultGlobalConfig) ? window.defaultGlobalConfig : {}; if (window.systemConfig) window.systemConfig = null ; if (window.defaultGlobalConfig) window.defaultGlobalConfig = null ; if (!config.global) config.global = {} ; if (config.global.enabled === undefined) config.global.enabled = true ; // find all configured applications. var configuredApplications = this.configuredApplications ; for(var key in config) { if (config.hasOwnProperty(key) && key !== 'global') { configuredApplications.push(key) ; } } // collect cookie info... var aic = this.readCookie('aic') ; var global = config.global ; if (aic) { this.hasLoginCookie = true; aic = this.decodeBase64(aic).trim().split("\n"); global.username = aic[0]; global.firstName = aic[1] ; global.lastName = aic[2] ; global.lang = aic[3]; // collect user account enabled apps var enabled = [] ; var idx = aic.length ; while(--idx >= 4) { var appName = aic[idx] ; if (appName && appName.length > 0) enabled.push(appName) ; } // enable/disable apps... if (enabled.length > 0) { this.restricted = {}; var idx = configuredApplications.length; while(--idx >= 0) { var thisDisabledAppName = configuredApplications[idx]; if(!config[thisDisabledAppName]) config[thisDisabledAppName] = {}; config[thisDisabledAppName].enabled = false; } idx = enabled.length ; while(--idx >= 0) { config[enabled[idx]].enabled = true ; this.restricted[enabled[idx]] = true; } } } else this.hasLoginCookie = false ; // find the login url for this hostname... if (global && global.SSOLoginURL) { this.loginUrl = global.SSOLoginURL[window.location.hostname.toString()] + '&destinationUrl=' + app + ((window.location.hash.length >= 2) ? '&destinationAnchor=' + window.location.hash.substring(1, window.location.hash.length) : '') ; } if (window.location.hostname.toString().indexOf('secure.me') == 0) { this.loginUrl += "&cancelUrl=" + document.referrer; } this.logoutUrl = (global) ? global.SSOLogoutURL : null ; var ret = this.checkPreferredLanguage(); this.prepareEnv(); return ret; }, prepareEnv: function() { var prepareStart = new Date().getTime(); for(var i=0; i 0) { var badgeType; if (badgeCache['mail'] > 0 && badgeCache['mail'] < 10) badgeType = 'single'; else if (badgeCache['mail'] > 9 && badgeCache['mail'] < 100) badgeType = 'double'; else if (badgeCache['mail'] > 99 && badgeCache['mail'] <1000) badgeType = 'triple'; else if (badgeCache['mail'] > 999) badgeType = 'quadruple'; else badgeType = false; if (badgeType) { document.write('
' + badgeCache['mail'] + '<\/div>'); } } }, setupCalendarIcon: function(dateIconSrc) { var calendarIcon = document.getElementById('calendar-icon'); var today = new Date(); var day = today.getDay(); var weekday; switch (day) { case 0: weekday = 'sunday'; break; case 1: weekday = 'monday'; break; case 2: weekday = 'tuesday'; break; case 3: weekday = 'wednesday'; break; case 4: weekday = 'thursday'; break; case 5: weekday = 'friday'; break; case 6: default: weekday = 'saturday'; break; } dateIconSrc = dateIconSrc.replace(/\d\.png/i, today.getDate() + ".png"); calendarIcon.className = calendarIcon.className + " " + weekday; calendarIcon.lastChild.setAttribute('src', dateIconSrc); } } ; return bootstrap ; })() ; } /* FILE ARCHIVED ON 21:46:14 Nov 13, 2008 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 03:15:47 May 04, 2024. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ /* playback timings (ms): captures_list: 0.942 exclusion.robots: 0.097 exclusion.robots.policy: 0.081 cdx.remote: 0.064 esindex: 0.012 LoadShardBlock: 92.532 (3) PetaboxLoader3.datanode: 88.819 (4) PetaboxLoader3.resolve: 73.413 (2) load_resource: 284.404 */