/* * See http://www.JSON.org/js.html */ var JSON;JSON||(JSON={}),function(){function str(a,b){var c,d,e,f,g=gap,h,i=b[a];i&&typeof i=="object"&&typeof i.toJSON=="function"&&(i=i.toJSON(a)),typeof rep=="function"&&(i=rep.call(b,a,i));switch(typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";gap+=indent,h=[];if(Object.prototype.toString.apply(i)==="[object Array]"){f=i.length;for(c=0;c self.progress) { self.add(3); } }, 500); }; Bar.prototype.stopAddInterval = function () { window.clearInterval(this.addInterval); this.addInterval = 0; }; Bar.prototype.build = function () { if (null === this.el) { var oTargetElement = document.querySelector('body'); if (oTargetElement) { this.el = document.createElement('div'); this.el.className = 'simple-pace simple-pace-active'; this.el.innerHTML = '
'; if (oTargetElement.firstChild) { oTargetElement.insertBefore(this.el, oTargetElement.firstChild); } else { oTargetElement.appendChild(this.el); } } } return this.el; }; Bar.prototype.reset = function () { this.progress = 0; return this.render(); }; Bar.prototype.update = function (iProg) { var iP = window.parseInt(iProg, 10); if (iP > this.progress) { this.progress = iP; this.progress = 100 < this.progress ? 100 : this.progress; this.progress = 0 > this.progress ? 0 : this.progress; } return this.render(); }; Bar.prototype.add = function (iProg) { this.progress += window.parseInt(iProg, 10); this.progress = 100 < this.progress ? 100 : this.progress; this.progress = 0 > this.progress ? 0 : this.progress; return this.render(); }; Bar.prototype.render = function () { var oEl = this.build(); if (oEl && oEl.children && oEl.children[0]) { oEl.children[0].setAttribute('style', 'width:' + this.progress + '%'); } if (100 === this.progress && !this.done) { this.done = true; this.stopAddInterval(); oEl.className = oEl.className.replace('simple-pace-active', ''); oEl.className += ' simple-pace-inactive'; } else if (100 > this.progress && this.done) { this.done = false; this.startAddInterval(); oEl.className = oEl.className.replace('simple-pace-inactive', ''); oEl.className += ' simple-pace-inactive'; } else if (100 > this.progress && !this.done && 0 === this.addInterval) { this.startAddInterval(); } }; if (!window.SimplePace) { var oBar = new Bar(); window.SimplePace = { 'set': function (iValue) { oBar.update(iValue); }, 'add': function (iValue) { oBar.add(iValue); } }; } }(window)); function CRLTopDriver() {} CRLTopDriver.prototype.sess = window.sessionStorage; CRLTopDriver.prototype.top = window.top || window; CRLTopDriver.prototype.getHash = function() { var mR = null; if (this.sess) { mR = this.sess.getItem('__rlA') || null; } else if (this.top) { var mData = this.top.name && JSON && '{' === this.top.name.toString().substr(0, 1) ? JSON.parse(this.top.name) : null; mR = mData ? (mData['__rlA'] || null) : null; } return mR; }; CRLTopDriver.prototype.setHash = function() { if (this.sess) { this.sess.setItem('__rlA', window.rainloopAppData && window.rainloopAppData['AuthAccountHash'] ? window.rainloopAppData['AuthAccountHash'] : ''); } else if (this.top) { this.top.name = JSON.stringify({ '__rlA': window.rainloopAppData && window.rainloopAppData['AuthAccountHash'] ? window.rainloopAppData['AuthAccountHash'] : '' }); } }; CRLTopDriver.prototype.clearHash = function() { if (this.sess) { this.sess.setItem('__rlA', ''); } else if (this.top) { this.top.name = ''; } }; window._topRLDriver = new CRLTopDriver(); function __rlah() { return window._topRLDriver ? window._topRLDriver.getHash() : null; } function __rlah_set() { if (window._topRLDriver) { window._topRLDriver.setHash(); } } function __rlah_clear() { if (window._topRLDriver) { window._topRLDriver.clearHash(); } } if (window.SimplePace) { window.SimplePace.add(10); }