/**
 * Adversitement mbox.js
 * Created by:			Stefan Leever
 * Created on:			07-01-2011
 * Last modified: 		$Date: 2012/01/11 16:39:46 $
 * Last modified by: 	$Author: salehe $
 * Version:				2.0.1
 */
var mboxCopyright = "Copyright 1996-2010. Adobe Systems Incorporated. All rights reserved";mboxUrlBuilder = function(a, b) { this.a = a; this.b = b; this.c = new Array(); this.d = function(e) { return e; }; this.f = null;};mboxUrlBuilder.prototype.addParameter = function(g, h) { var i = new RegExp('(\'|")'); if (i.exec(g)) { throw "Parameter '" + g + "' contains invalid characters"; } for (var j = 0; j < this.c.length; j++) { var k = this.c[j]; if (k.name == g) { k.value = h; return this; } } var l = new Object(); l.name = g; l.value = h; this.c[this.c.length] = l; return this;};mboxUrlBuilder.prototype.addParameters = function(c) { if (!c) { return this; } for (var j = 0; j < c.length; j++) { var m = c[j].indexOf('='); if (m == -1 || m == 0) { continue; } this.addParameter(c[j].substring(0, m), c[j].substring(m + 1, c[j].length)); } return this;};mboxUrlBuilder.prototype.setServerType = function(n) { this.o = n;};mboxUrlBuilder.prototype.setBasePath = function(f) { this.f = f;};mboxUrlBuilder.prototype.setUrlProcessAction = function(p) { this.d = p;};mboxUrlBuilder.prototype.buildUrl = function() { var q = this.f ? this.f : '/m2/' + this.b + '/mbox/' + this.o; var r = document.location.protocol == 'file:' ? 'http:' : document.location.protocol; var e = r + "//" + this.a + q; var s = e.indexOf('?') != -1 ? '&' : '?'; for (var j = 0; j < this.c.length; j++) { var k = this.c[j]; e += s + encodeURIComponent(k.name) + '=' + encodeURIComponent(k.value); s = '&'; } return this.t(this.d(e));};mboxUrlBuilder.prototype.getParameters = function() { return this.c;};mboxUrlBuilder.prototype.setParameters = function(c) { this.c = c;};mboxUrlBuilder.prototype.clone = function() { var u = new mboxUrlBuilder(this.a, this.b); u.setServerType(this.o); u.setBasePath(this.f); u.setUrlProcessAction(this.d); for (var j = 0; j < this.c.length; j++) { u.addParameter(this.c[j].name, this.c[j].value); } return u;};mboxUrlBuilder.prototype.t = function(v) { return v.replace(/\"/g, '&quot;').replace(/>/g, '&gt;');};mboxStandardFetcher = function() { };mboxStandardFetcher.prototype.getType = function() { return 'standard';};mboxStandardFetcher.prototype.fetch = function(w) { w.setServerType(this.getType()); document.write('<' + 'scr' + 'ipt src="' + w.buildUrl() + '" language="JavaScript"><' + '\/scr' + 'ipt>');};mboxStandardFetcher.prototype.cancel = function() { };mboxAjaxFetcher = function() { };mboxAjaxFetcher.prototype.getType = function() { return 'ajax';};mboxAjaxFetcher.prototype.fetch = function(w) { w.setServerType(this.getType()); var e = w.buildUrl(); this.x = document.createElement('script'); this.x.src = e; document.body.appendChild(this.x);};mboxAjaxFetcher.prototype.cancel = function() { };mboxMap = function() { this.y = new Object(); this.z = new Array();};mboxMap.prototype.put = function(A, h) { if (!this.y[A]) { this.z[this.z.length] = A; } this.y[A] = h;};mboxMap.prototype.get = function(A) { return this.y[A];};mboxMap.prototype.remove = function(A) { this.y[A] = undefined;};mboxMap.prototype.each = function(p) { for (var j = 0; j < this.z.length; j++ ) { var A = this.z[j]; var h = this.y[A]; if (h) { var B = p(A, h); if (B === false) { break; } } }};mboxFactory = function(C, b, D) { this.E = false; this.C = C; this.D = D; this.F = new mboxList(); mboxFactories.put(D, this); this.G = typeof document.createElement('div').replaceChild != 'undefined' && (function() { return true; })() && typeof document.getElementById != 'undefined' && typeof (window.attachEvent || document.addEventListener || window.addEventListener) != 'undefined' && typeof encodeURIComponent != 'undefined'; this.H = this.G && mboxGetPageParameter('mboxDisable') == null; var I = D == 'default'; this.J = new mboxCookieManager( 'mbox' + (I ? '' : ('-' + D)), (function() { return mboxCookiePageDomain(); })()); this.H = this.H && this.J.isEnabled() && (this.J.getCookie('disable') == null); if (this.isAdmin()) { this.enable(); } this.K(); this.L = mboxGenerateId(); this.M = mboxScreenHeight(); this.N = mboxScreenWidth(); this.O = mboxBrowserWidth(); this.P = mboxBrowserHeight(); this.Q = mboxScreenColorDepth(); this.R = mboxBrowserTimeOffset(); this.S = new mboxSession(this.L, 'mboxSession', 'session', 31 * 60, this.J); this.T = new mboxPC('PC', 1209600, this.J); this.w = new mboxUrlBuilder(C, b); this.U(this.w, I); this.V = new Date().getTime(); this.W = this.V; var X = this; this.addOnLoad(function() { X.W = new Date().getTime(); }); if (this.G) { this.addOnLoad(function() { X.E = true; X.getMboxes().each(function(Y) { Y.setFetcher(new mboxAjaxFetcher()); Y.finalize(); }); }); this.limitTraffic(100, 10368000); if (this.H) { this.Z(); this._ = new mboxSignaler(function(ab, c) { return X.create(ab, c); }, this.J); } }};mboxFactory.prototype.isEnabled = function() { return this.H;};mboxFactory.prototype.getDisableReason = function() { return this.J.getCookie('disable');};mboxFactory.prototype.isSupported = function() { return this.G;};mboxFactory.prototype.disable = function(bb, cb) { if (typeof bb == 'undefined') { bb = 60 * 60; } if (typeof cb == 'undefined') { cb = 'unspecified'; } if (!this.isAdmin()) { this.H = false; this.J.setCookie('disable', cb, bb); }};mboxFactory.prototype.enable = function() { this.H = true; this.J.deleteCookie('disable');};mboxFactory.prototype.isAdmin = function() { return document.location.href.indexOf('mboxEnv') != -1;};mboxFactory.prototype.limitTraffic = function(db, bb) { if (db == 100) { return; } var eb = false; if (this.J.getCookie('traffic') == 'true' || this.isAdmin()) { eb = true; } else if ( parseInt(this.J.getCookie('level')) != db) { eb = (Math.random() * 100) <= db; } this.J.setCookie('level', db, bb); this.J.setCookie('traffic', eb, bb); if (eb) { this.enable(); } else { this.disable(60 * 60, 'limited by traffic'); }};mboxFactory.prototype.addOnLoad = function(fb) { if (this.isDomLoaded()) { fb(); } else { var gb = false; var hb = function() { if (gb) { return; } gb = true; fb(); }; this.ib.push(hb); if (this.isDomLoaded() && !gb) { hb(); } }};mboxFactory.prototype.getEllapsedTime = function() { return this.W - this.V;};mboxFactory.prototype.getEllapsedTimeUntil = function(jb) { return jb - this.V;};mboxFactory.prototype.getMboxes = function() { return this.F;};mboxFactory.prototype.get = function(ab, kb) { return this.F.get(ab).getById(kb || 0);};mboxFactory.prototype.update = function(ab, c) { if (!this.isEnabled()) { return; } if (!this.isDomLoaded()) { var X = this; this.addOnLoad(function() { X.update(ab, c); }); return; } if (this.F.get(ab).length() == 0) { throw "Mbox " + ab + " is not defined"; } this.F.get(ab).each(function(Y) { Y.getUrlBuilder() .addParameter('mboxPage', mboxGenerateId()); Y.load(c); });};mboxFactory.prototype.create = function( ab, c, lb) { if (!this.isSupported()) { return null; } var e = this.w.clone(); e.addParameter('mboxCount', this.F.length() + 1); e.addParameters(c); var kb = this.F.get(ab).length(); var mb = this.D + '-' + ab + '-' + kb; var nb; if (lb) { nb = new mboxLocatorNode(lb); } else { if (this.E) { throw 'The page has already been loaded, can\'t write marker'; } nb = new mboxLocatorDefault(mb); } try { var X = this; var ob = 'mboxImported-' + mb; var Y = new mbox(ab, kb, e, nb, ob); if (this.H) { Y.setFetcher( this.E ? new mboxAjaxFetcher() : new mboxStandardFetcher()); } Y.setOnError(function(pb, n) { Y.setMessage(pb); Y.activate(); if (!Y.isActivated()) { X.disable(60 * 60, pb); window.location.reload(false); } }); this.F.add(Y); } catch (qb) { this.disable(); throw 'Failed creating mbox "' + ab + '", the error was: ' + qb; } var rb = new Date(); e.addParameter('mboxTime', rb.getTime() - (rb.getTimezoneOffset() * 60000)); return Y;};mboxFactory.prototype.getCookieManager = function() { return this.J;};mboxFactory.prototype.getPageId = function() { return this.L;};mboxFactory.prototype.getPCId = function() { return this.T;};mboxFactory.prototype.getSessionId = function() { return this.S;};mboxFactory.prototype.getSignaler = function() { return this._;};mboxFactory.prototype.getUrlBuilder = function() { return this.w;};mboxFactory.prototype.U = function(e, I) { e.addParameter('mboxHost', document.location.hostname) .addParameter('mboxSession', this.S.getId()); if (!I) { e.addParameter('mboxFactoryId', this.D); } if (this.T.getId() != null) { e.addParameter('mboxPC', this.T.getId()); } e.addParameter('mboxPage', this.L); e.addParameter('screenHeight', this.M); e.addParameter('screenWidth', this.N); e.addParameter('browserWidth', this.O); e.addParameter('browserHeight', this.P); e.addParameter('browserTimeOffset', this.R); e.addParameter('colorDepth', this.Q); e.setUrlProcessAction(function(e) { e += '&mboxURL=' + encodeURIComponent(document.location); var sb = encodeURIComponent(document.referrer); if (e.length + sb.length < 2000) { e += '&mboxReferrer=' + sb; } e += '&mboxVersion=' + mboxVersion; return e; });};mboxFactory.prototype.tb = function() { return "";};mboxFactory.prototype.Z = function() { document.write('<style>.' + 'mboxDefault' + ' { visibility:hidden; }</style>');};mboxFactory.prototype.isDomLoaded = function() { return this.E;};mboxFactory.prototype.K = function() { if (this.ib != null) { return; } this.ib = new Array(); var X = this; (function() { var ub = document.addEventListener ? "DOMContentLoaded" : "onreadystatechange"; var vb = false; var wb = function() { if (vb) { return; } vb = true; for (var i = 0; i < X.ib.length; ++i) { X.ib[i](); } }; if (document.addEventListener) { document.addEventListener(ub, function() { document.removeEventListener(ub, arguments.callee, false); wb(); }, false); window.addEventListener("load", function(){ document.removeEventListener("load", arguments.callee, false); wb(); }, false); } else if (document.attachEvent) { if (self !== self.top) { document.attachEvent(ub, function() { if (document.readyState === 'complete') { document.detachEvent(ub, arguments.callee); wb(); } }); } else { var xb = function() { try { document.documentElement.doScroll('left'); wb(); } catch (yb) { setTimeout(xb, 13); } }; xb(); } } if (document.readyState === "complete") { wb(); } })();};mboxSignaler = function(zb, J) { this.J = J; var Ab = J.getCookieNames('signal-'); for (var j = 0; j < Ab.length; j++) { var Bb = Ab[j]; var Cb = J.getCookie(Bb).split('&'); var Y = zb(Cb[0], Cb); Y.load(); J.deleteCookie(Bb); }};mboxSignaler.prototype.signal = function(Db, ab ) { this.J.setCookie('signal-' + Db, mboxShiftArray(arguments).join('&'), 45 * 60);};mboxList = function() { this.F = new Array();};mboxList.prototype.add = function(Y) { if (Y != null) { this.F[this.F.length] = Y; }};mboxList.prototype.get = function(ab) { var B = new mboxList(); for (var j = 0; j < this.F.length; j++) { var Y = this.F[j]; if (Y.getName() == ab) { B.add(Y); } } return B;};mboxList.prototype.getById = function(Eb) { return this.F[Eb];};mboxList.prototype.length = function() { return this.F.length;};mboxList.prototype.each = function(p) { if (typeof p != 'function') { throw 'Action must be a function, was: ' + typeof(p); } for (var j = 0; j < this.F.length; j++) { p(this.F[j]); }};mboxLocatorDefault = function(g) { this.g = 'mboxMarker-' + g; document.write('<div id="' + this.g + '" style="visibility:hidden;display:none">&nbsp;</div>');};mboxLocatorDefault.prototype.locate = function() { var Fb = document.getElementById(this.g); while (Fb != null) { if (Fb.nodeType == 1) { if (Fb.className == 'mboxDefault') { return Fb; } } Fb = Fb.previousSibling; } return null;};mboxLocatorDefault.prototype.force = function() { var Gb = document.createElement('div'); Gb.className = 'mboxDefault'; var Hb = document.getElementById(this.g); Hb.parentNode.insertBefore(Gb, Hb); return Gb;};mboxLocatorNode = function(Ib) { this.Fb = Ib;};mboxLocatorNode.prototype.locate = function() { return typeof this.Fb == 'string' ? document.getElementById(this.Fb) : this.Fb;};mboxLocatorNode.prototype.force = function() { return null;};mboxCreate = function(ab ) { var Y = mboxFactoryDefault.create( ab, mboxShiftArray(arguments)); if (Y) { Y.load(); } return Y;};mboxDefine = function(lb, ab ) { var Y = mboxFactoryDefault.create(ab, mboxShiftArray(mboxShiftArray(arguments)), lb); return Y;};mboxUpdate = function(ab ) { mboxFactoryDefault.update(ab, mboxShiftArray(arguments));};mbox = function(g, Jb, w, Kb, ob) { this.Lb = null; this.Mb = 0; this.nb = Kb; this.ob = ob; this.Nb = null; this.Ob = new mboxOfferContent(); this.Gb = null; this.w = w; this.message = ''; this.Pb = new Object(); this.Qb = 0; this.Jb = Jb; this.g = g; this.Rb(); w.addParameter('mbox', g) .addParameter('mboxId', Jb); this.Sb = function() {}; this.Tb = function() {}; this.Ub = null;};mbox.prototype.getId = function() { return this.Jb;};mbox.prototype.Rb = function() { if (this.g.length > 250) { throw "Mbox Name " + this.g + " exceeds max length of " + "250 characters."; } else if (this.g.match(/^\s+|\s+$/g)) { throw "Mbox Name " + this.g + " has leading/trailing whitespace(s)."; }};mbox.prototype.getName = function() { return this.g;};mbox.prototype.getParameters = function() { var c = this.w.getParameters(); var B = new Array(); for (var j = 0; j < c.length; j++) { if (c[j].name.indexOf('mbox') != 0) { B[B.length] = c[j].name + '=' + c[j].value; } } return B;};mbox.prototype.setOnLoad = function(p) { this.Tb = p; return this;};mbox.prototype.setMessage = function(pb) { this.message = pb; return this;};mbox.prototype.setOnError = function(Sb) { this.Sb = Sb; return this;};mbox.prototype.setFetcher = function(Vb) { if (this.Nb) { this.Nb.cancel(); } this.Nb = Vb; return this;};mbox.prototype.getFetcher = function() { return this.Nb;};mbox.prototype.load = function(c) { if (this.Nb == null) { return this; } this.setEventTime("load.start"); this.cancelTimeout(); this.Mb = 0; var w = (c && c.length > 0) ? this.w.clone().addParameters(c) : this.w; this.Nb.fetch(w); var X = this; this.Wb = setTimeout(function() { X.Sb('browser timeout', X.Nb.getType()); }, 15000); this.setEventTime("load.end"); return this;};mbox.prototype.loaded = function() { this.cancelTimeout(); if (!this.activate()) { var X = this; setTimeout(function() { X.loaded(); }, 100); }};mbox.prototype.activate = function() { if (this.Mb) { return this.Mb; } this.setEventTime('activate' + ++this.Qb + '.start'); if (this.show()) { this.cancelTimeout(); this.Mb = 1; } this.setEventTime('activate' + this.Qb + '.end'); return this.Mb;};mbox.prototype.isActivated = function() { return this.Mb;};mbox.prototype.setOffer = function(Ob) { if (Ob && Ob.show && Ob.setOnLoad) { this.Ob = Ob; } else { throw 'Invalid offer'; } return this;};mbox.prototype.getOffer = function() { return this.Ob;};mbox.prototype.show = function() { this.setEventTime('show.start'); var B = this.Ob.show(this); this.setEventTime(B == 1 ? "show.end.ok" : "show.end"); return B;};mbox.prototype.showContent = function(Xb) { if (Xb == null) { return 0; } if (this.Gb == null || !this.Gb.parentNode) { this.Gb = this.getDefaultDiv(); if (this.Gb == null) { return 0; } } if (this.Gb != Xb) { this.Yb(this.Gb); this.Gb.parentNode.replaceChild(Xb, this.Gb); this.Gb = Xb; } this.Zb(Xb); this.Tb(); return 1;};mbox.prototype.hide = function() { this.setEventTime('hide.start'); var B = this.showContent(this.getDefaultDiv()); this.setEventTime(B == 1 ? 'hide.end.ok' : 'hide.end.fail'); return B;};mbox.prototype.finalize = function() { this.setEventTime('finalize.start'); this.cancelTimeout(); if (this.getDefaultDiv() == null) { if (this.nb.force() != null) { this.setMessage('No default content, an empty one has been added'); } else { this.setMessage('Unable to locate mbox'); } } if (!this.activate()) { this.hide(); this.setEventTime('finalize.end.hide'); } this.setEventTime('finalize.end.ok');};mbox.prototype.cancelTimeout = function() { if (this.Wb) { clearTimeout(this.Wb); } if (this.Nb != null) { this.Nb.cancel(); }};mbox.prototype.getDiv = function() { return this.Gb;};mbox.prototype.getDefaultDiv = function() { if (this.Ub == null) { this.Ub = this.nb.locate(); } return this.Ub;};mbox.prototype.setEventTime = function(_b) { this.Pb[_b] = (new Date()).getTime();};mbox.prototype.getEventTimes = function() { return this.Pb;};mbox.prototype.getImportName = function() { return this.ob;};mbox.prototype.getURL = function() { return this.w.buildUrl();};mbox.prototype.getUrlBuilder = function() { return this.w;};mbox.prototype.ac = function(Gb) { return Gb.style.display != 'none';};mbox.prototype.Zb = function(Gb) { this.bc(Gb, true);};mbox.prototype.Yb = function(Gb) { this.bc(Gb, false);};mbox.prototype.bc = function(Gb, cc) { Gb.style.visibility = cc ? "visible" : "hidden"; Gb.style.display = cc ? "block" : "none";};mboxOfferContent = function() { this.Tb = function() {};};mboxOfferContent.prototype.show = function(Y) { var B = Y.showContent(document.getElementById(Y.getImportName())); if (B == 1) { this.Tb(); } return B;};mboxOfferContent.prototype.setOnLoad = function(Tb) { this.Tb = Tb;};mboxOfferAjax = function(Xb) { this.Xb = Xb; this.Tb = function() {};};mboxOfferAjax.prototype.setOnLoad = function(Tb) { this.Tb = Tb;};mboxOfferAjax.prototype.show = function(Y) { var dc = document.createElement('div'); dc.id = Y.getImportName(); dc.innerHTML = this.Xb; var B = Y.showContent(dc); if (B == 1) { this.Tb(); } return B;};mboxOfferDefault = function() { this.Tb = function() {};};mboxOfferDefault.prototype.setOnLoad = function(Tb) { this.Tb = Tb;};mboxOfferDefault.prototype.show = function(Y) { var B = Y.hide(); if (B == 1) { this.Tb(); } return B;};mboxCookieManager = function mboxCookieManager(g, ec) { this.g = g; this.ec = ec == '' || ec.indexOf('.') == -1 ? '' : '; domain=' + ec; this.fc = new mboxMap(); this.loadCookies();};mboxCookieManager.prototype.isEnabled = function() { this.setCookie('check', 'true', 60); this.loadCookies(); return this.getCookie('check') == 'true';};mboxCookieManager.prototype.setCookie = function(g, h, bb) { if (typeof g != 'undefined' && typeof h != 'undefined' && typeof bb != 'undefined') { var gc = new Object(); gc.name = g; gc.value = escape(h); gc.expireOn = Math.ceil(bb + new Date().getTime() / 1000); this.fc.put(g, gc); this.saveCookies(); }};mboxCookieManager.prototype.getCookie = function(g) { var gc = this.fc.get(g); return gc ? unescape(gc.value) : null;};mboxCookieManager.prototype.deleteCookie = function(g) { this.fc.remove(g); this.saveCookies();};mboxCookieManager.prototype.getCookieNames = function(hc) { var ic = new Array(); this.fc.each(function(g, gc) { if (g.indexOf(hc) == 0) { ic[ic.length] = g; } }); return ic;};mboxCookieManager.prototype.saveCookies = function() { var jc = new Array(); var kc = 0; this.fc.each(function(g, gc) { jc[jc.length] = g + '#' + gc.value + '#' + gc.expireOn; if (kc < gc.expireOn) { kc = gc.expireOn; } }); var lc = new Date(kc * 1000); document.cookie = this.g + '=' + jc.join('|') + '; expires=' + lc.toGMTString() + '; path=/' + this.ec;};mboxCookieManager.prototype.loadCookies = function() { this.fc = new mboxMap(); var mc = document.cookie.indexOf(this.g + '='); if (mc != -1) { var nc = document.cookie.indexOf(';', mc); if (nc == -1) { nc = document.cookie.indexOf(',', mc); if (nc == -1) { nc = document.cookie.length; } } var oc = document.cookie.substring( mc + this.g.length + 1, nc).split('|'); var pc = Math.ceil(new Date().getTime() / 1000); for (var j = 0; j < oc.length; j++) { var gc = oc[j].split('#'); if (pc <= gc[2]) { var qc = new Object(); qc.name = gc[0]; qc.value = gc[1]; qc.expireOn = gc[2]; this.fc.put(qc.name, qc); } } }};mboxSession = function(rc, sc, Bb, tc, J) { this.sc = sc; this.Bb = Bb; this.tc = tc; this.J = J; this.uc = false; this.Jb = typeof mboxForceSessionId != 'undefined' ? mboxForceSessionId : mboxGetPageParameter(this.sc); if (this.Jb == null || this.Jb.length == 0) { this.Jb = J.getCookie(Bb); if (this.Jb == null || this.Jb.length == 0) { this.Jb = rc; this.uc = true; } } J.setCookie(Bb, this.Jb, tc);};mboxSession.prototype.getId = function() { return this.Jb;};mboxSession.prototype.forceId = function(vc) { this.Jb = vc; this.J.setCookie(this.Bb, this.Jb, this.tc);};mboxPC = function(Bb, tc, J) { this.Bb = Bb; this.tc = tc; this.J = J; this.Jb = typeof mboxForcePCId != 'undefined' ? mboxForcePCId : J.getCookie(Bb); if (this.Jb != null) { J.setCookie(Bb, this.Jb, tc); }};mboxPC.prototype.getId = function() { return this.Jb;};mboxPC.prototype.forceId = function(vc) { if (this.Jb != vc) { this.Jb = vc; this.J.setCookie(this.Bb, this.Jb, this.tc); return true; } return false;};mboxGetPageParameter = function(g) { var B = null; var wc = new RegExp(g + "=([^\&]*)"); var xc = wc.exec(document.location); if (xc != null && xc.length >= 2) { B = xc[1]; } return B;};mboxSetCookie = function(g, h, bb) { return mboxFactoryDefault.getCookieManager().setCookie(g, h, bb);};mboxGetCookie = function(g) { return mboxFactoryDefault.getCookieManager().getCookie(g);};mboxCookiePageDomain = function() { var ec = (/([^:]*)(:[0-9]{0,5})?/).exec(document.location.host)[1]; var yc = /[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/; if (!yc.exec(ec)) { var zc = (/([^\.]+\.[^\.]{3}|[^\.]+\.[^\.]+\.[^\.]{2})$/).exec(ec); if (zc) { ec = zc[0]; } } return ec ? ec: "";};mboxShiftArray = function(Ac) { var B = new Array(); for (var j = 1; j < Ac.length; j++) { B[B.length] = Ac[j]; } return B;};mboxGenerateId = function() { return (new Date()).getTime() + "-" + Math.floor(Math.random() * 999999);};mboxScreenHeight = function() { return screen.height;};mboxScreenWidth = function() { return screen.width;};mboxBrowserWidth = function() { return (window.innerWidth) ? window.innerWidth : document.documentElement ? document.documentElement.clientWidth : document.body.clientWidth;};mboxBrowserHeight = function() { return (window.innerHeight) ? window.innerHeight : document.documentElement ? document.documentElement.clientHeight : document.body.clientHeight;};mboxBrowserTimeOffset = function() { return -new Date().getTimezoneOffset();};mboxScreenColorDepth = function() { return screen.pixelDepth;};if (typeof mboxVersion == 'undefined') { var mboxVersion = 40; var mboxFactories = new mboxMap(); var mboxFactoryDefault = new mboxFactory('vodafonenetherlands.tt.omtrdc.net', 'vodafonenetherlands', 'default');};if (mboxGetPageParameter("mboxDebug") != null || mboxFactoryDefault.getCookieManager() .getCookie("debug") != null) { setTimeout(function() { if (typeof mboxDebugLoaded == 'undefined') { alert('Could not load the remote debug.\nPlease check your connection' + ' to Test&amp;Target servers'); } }, 60*60); document.write('<' + 'scr' + 'ipt language="Javascript1.2" src=' + '"http://admin16.testandtarget.omniture.com/admin/mbox/mbox_debug.jsp?mboxServerHost=vodafonenetherlands.tt.omtrdc.net' + '&clientCode=vodafonenetherlands"><' + '\/scr' + 'ipt>');};mboxScPluginFetcher = function(b, Bc) { this.b = b; this.Bc = Bc;};mboxScPluginFetcher.prototype.Cc = function(w) { w.setBasePath('/m2/' + this.b + '/sc/standard'); this.Dc(w); var e = w.buildUrl(); e += '&scPluginVersion=1'; return e;};mboxScPluginFetcher.prototype.Dc = function(w) { var Ec = [ "visitorID","transactionID","purchaseID","campaign","events", "products" ]; for (var j = 0; j < Ec.length; j++) { this.Fc(Ec[j], w); } for (var j = 1; j <= 75; j++) { this.Fc('prop' + j, w); if(j!=38 && j!= 39) this.Fc('eVar' + j, w); this.Fc('hier' + j, w); }};mboxScPluginFetcher.prototype.Fc = function(g, w) { var h = this.Bc[g]; if (typeof(h) === 'undefined' || h === null || h === '') { return; } w.addParameter(g, h);};mboxScPluginFetcher.prototype.cancel = function() { };mboxStandardScPluginFetcher = function(b, Bc) { mboxScPluginFetcher.call(this, b, Bc);};mboxStandardScPluginFetcher.prototype = new mboxScPluginFetcher;mboxStandardScPluginFetcher.prototype.getType = function() { return 'standard';};mboxStandardScPluginFetcher.prototype.fetch = function(w) { w.setServerType(this.getType()); var e = this.Cc(w); document.write('<' + 'scr' + 'ipt src="' + e + '" language="JavaScript"><' + '\/scr' + 'ipt>');};mboxAjaxScPluginFetcher = function(b, Bc) { mboxScPluginFetcher.call(this, b, Bc);};mboxAjaxScPluginFetcher.prototype = new mboxScPluginFetcher;mboxAjaxScPluginFetcher.prototype.fetch = function(w) { w.setServerType(this.getType()); var e = this.Cc(w); this.x = document.createElement('script'); this.x.src = e; document.body.appendChild(this.x);};mboxAjaxScPluginFetcher.prototype.getType = function() { return 'ajax';};function mboxLoadSCPlugin(Bc) { if (!Bc) { return null; } Bc.m_tt = function(Bc) { var Gc = Bc.m_i('tt'); Gc.H = true; Gc.b = 'vodafonenetherlands'; Gc['_t'] = function() { if (!this.isEnabled()) { return; } var Y = this.Ic(); if (Y) { var Vb = mboxFactoryDefault.isDomLoaded() ? new mboxAjaxScPluginFetcher(this.b, this.s) : new mboxStandardScPluginFetcher(this.b, this.s); Y.setFetcher(Vb); Y.load(); } }; Gc.isEnabled = function() { return this.H && mboxFactoryDefault.isEnabled(); }; Gc.Ic = function() { var ab = this.Jc(); var Gb = document.createElement('DIV'); return mboxFactoryDefault.create(ab, new Array(), Gb); }; Gc.Jc = function() { var Kc = this.s.events && this.s.events.indexOf('purchase') != -1; return 'SiteCatalyst: ' + (Kc ? 'purchase' : 'event'); }; }; return Bc.loadModule('tt');};
/* Floating Elements v2.0.0 <http://www.adversitement.nl> - (C) 2011 Adversitement */
function FloatingElement() {
	/* Sly v1.0rc2 <http://sly.digitarald.com> - (C) 2009 Harald Kirschner <http://digitarald.de> - Open source under MIT License */
	var Sly=(function(){var q={};var b=function(E,D,C,i){E=(typeof(E)=="string")?E.replace(/^\s+|\s+$/,""):"";var e=q[E]||(q[E]=new b.initialize(E));return(D==null)?e:e.search(D,C,i)};b.initialize=function(e){this.text=e};var t=b.initialize.prototype=b.prototype;b.implement=function(i,e){for(var C in e){b[i][C]=e[C]}};var k=b.support={};(function(){var i=document.createElement("div"),C=(new Date()).getTime();i.innerHTML='<a name="'+C+'" class="Ã¢â€šÂ¬ b"></a>';i.appendChild(document.createComment(""));k.byTagAddsComments=(i.getElementsByTagName("*").length>1);k.hasQsa=!!(i.querySelectorAll&&i.querySelectorAll(".Ã¢â€šÂ¬").length);k.hasByClass=(function(){if(!i.getElementsByClassName||!i.getElementsByClassName("b").length){return false}i.firstChild.className="c";return(i.getElementsByClassName("c").length==1)})();var e=document.documentElement;e.insertBefore(i,e.firstChild);k.byIdAddsName=!!(document.getElementById(C));e.removeChild(i)})();var r=function(){return true};t.search=function(D,O,E){E=E||{};var H,T,W;if(!D){D=document}else{if(D.nodeType!=1&&D.nodeType!=9){if(typeof(D)=="string"){D=b.search(D);H=true}else{if(Object.prototype.toString.call(D)=="[object Array]"||(typeof(D.length)=="number"&&D.item)){var I=[];for(T=0;(W=D[T]);T++){if(W.nodeType==1||W.nodeType==9){I.push(W)}}H=(I.length>1);D=(H)?I:(I[0]||document)}}}}var M,J,P,C={},F={};var N=C;var U=b.getUid;var X=function(i){var e=U(i);return(N[e])?null:(N[e]=true)};if(O&&O.length){for(T=0;(W=O[T]);T++){X(W)}}if(k.hasQsa&&!H&&D.nodeType==9&&!(/\[/).test(this.text)){try{var G=D.querySelectorAll(this.text)}catch(V){}if(G){if(!O){return b.toArray(G)}for(T=0;(W=G[T]);T++){if(X(W)){O.push(W)}}if(!E.unordered){O.sort(b.compare)}return O}}var K=this.parse();if(!K.length){return[]}for(var T=0,S;(S=K[T]);T++){var L=X;if(S.first){if(!O){L=r}else{M=true}if(H){P=D}else{if(S.combinator){P=[D]}}}if(S.last&&O){N=C;J=O}else{N={};J=[]}if(!S.combinator&&!H){J=S.combine(J,D,S,F,L,!(J.length))}else{for(var R=0,Q=P.length;R<Q;R++){J=S.combine(J,P[R],S,F,L)}}if(S.last){if(J.length){O=J}}else{P=J}}if(!E.unordered&&M&&O){O.sort(b.compare)}return O||[]};t.find=function(C,i,e){return this.search(C,i,e)[0]};t.match=function(E,D){var e=this.parse();if(e.length==1){return !!(this.parse()[0].match(E,{}))}if(!D){D=E;while(D.parentNode){D=D.parentNode}}var F=this.search(D),C=F.length;if(!C--){return false}while(C--){if(F[C]==E){return true}}return false};t.filter=function(e){var E=[],C=this.parse()[0].match;for(var D=0,F;(F=e[D]);D++){if(C(F)){E.push(F)}}return E};var z;b.recompile=function(){var i,e=[","],C=["!"];for(i in o){if(i!=" "){e[(i.length>1)?"unshift":"push"](b.escapeRegExp(i))}}for(i in v){C.push(i)}z=new RegExp("[\\w\\u00a1-\\uFFFF][\\w\\u00a1-\\uFFFF-]*|[#.](?:[\\w\\u00a1-\\uFFFF-]|\\\\:|\\\\.)+|[ \\t\\r\\n\\f](?=[\\w\\u00a1-\\uFFFF*#.[:])|[ \\t\\r\\n\\f]*("+e.join("|")+")[ \\t\\r\\n\\f]*|\\[([\\w\\u00a1-\\uFFFF-]+)[ \\t\\r\\n\\f]*(?:(["+C.join("")+"]?=)[ \\t\\r\\n\\f]*(?:\"([^\"]*)\"|'([^']*)'|([^\\]]*)))?]|:([-\\w\\u00a1-\\uFFFF]+)(?:\\((?:\"([^\"]*)\"|'([^']*)'|([^)]*))\\))?|\\*|(.+)","g")};var l=function(e){return{ident:[],classes:[],attributes:[],pseudos:[],combinator:e}};var g=function(e){return e};t.parse=function(I){var E=(I)?"plain":"parsed";if(this[E]){return this[E]}var J=this.text;var H=(I)?g:this.compute;var G=[],D=l(null);D.first=true;var F=function(K){G.push(H(D));D=l(K)};z.lastIndex=0;var C,i;while((C=z.exec(J))){if(C[11]){if(b.verbose){throw SyntaxError('Syntax error, "'+i+'" unexpected at #'+z.lastIndex+' in "'+J+'"')}return(this[E]=[])}i=C[0];switch(i.charAt(0)){case".":D.classes.push(i.slice(1).replace(/\\/g,""));break;case"#":D.id=i.slice(1).replace(/\\/g,"");break;case"[":D.attributes.push({name:C[2],operator:C[3]||null,value:C[4]||C[5]||C[6]||null});break;case":":D.pseudos.push({name:C[7],value:C[8]||C[9]||C[10]||null});break;case" ":case"\t":case"\r":case"\n":case"\f":C[1]=C[1]||" ";default:var e=C[1];if(e){if(e==","){D.last=true;F(null);D.first=true;continue}if(D.first&&!D.ident.length){D.combinator=e}else{F(e)}}else{if(i!="*"){D.tag=i}}}D.ident.push(i)}D.last=true;G.push(H(D));return(this[E]=G)};function u(C,i,e,D){return(C)?((D)?function(E,F){return i(E,e,F)&&C(E,F)}:function(E,F){return C(E,F)&&i(E,e,F)}):function(E,F){return i(E,e,F)}}var j=function(){return true};var B=function(e,i){return(e.id==i)};var c=function(i,e){return(i.nodeName.toUpperCase()==e)};var h=function(e){return(new RegExp("(?:^|[ \\t\\r\\n\\f])"+e+"(?:$|[ \\t\\r\\n\\f])"))};var f=function(e,i){return e.className&&i.test(e.className)};var p=function(e){e.getter=b.lookupAttribute(e.name)||b.getAttribute;if(!e.operator||!e.value){return e}var i=v[e.operator];if(i){e.escaped=b.escapeRegExp(e.value);e.pattern=new RegExp(i(e.value,e.escaped,e))}return e};var s=function(i,e){var C=e.getter(i,e.name);switch(e.operator){case null:return C;case"=":return(C==e.value);case"!=":return(C!=e.value)}if(!C&&e.value){return false}return e.pattern.test(C)};t.compute=function(H){var I,N,J,O,F,D,P=H.tag,C=H.id,G=H.classes;var K=(P)?P.toUpperCase():null;if(C){D=true;F=u(null,B,C);O=function(Q){if(Q.getElementById){var R=Q.getElementById(C);return(R&&(!K||R.nodeName.toUpperCase()==K)&&(!k.getIdAdds||R.id==C))?[R]:[]}var T=Q.getElementsByTagName(P||"*");for(var i=0,S;(S=T[i]);i++){if(S.id==C){return[S]}}return[]}}if(G.length>0){if(!O&&k.hasByClass){for(I=0;(N=G[I]);I++){F=u(F,f,h(N))}var M=G.join(" ");O=function(i){return i.getElementsByClassName(M)}}else{if(!O&&G.length==1){D=true;var L=h(G[0]);F=u(F,f,L);O=function(R){var U=R.getElementsByTagName(P||"*");var T=[];for(var Q=0,S;(S=U[Q]);Q++){if(S.className&&L.test(S.className)){T.push(S)}}return T}}else{for(I=0;(N=G[I]);I++){J=u(J,f,h(N))}}}}if(P){if(!O){F=u(F,c,K);O=function(i){return i.getElementsByTagName(P)}}else{if(!D){J=u(J,c,K)}}}else{if(!O){O=function(R){var U=R.getElementsByTagName("*");if(!k.byTagAddsComments){return U}var T=[];for(var Q=0,S;(S=U[Q]);Q++){if(S.nodeType===1){T.push(S)}}return T}}}for(I=0;(N=H.pseudos[I]);I++){if(N.name=="not"){var E=b(N.value);J=u(J,function(Q,i){return !i.match(Q)},(E.parse().length==1)?E.parsed[0]:E)}else{var e=d[N.name];if(e){J=u(J,e,N.value)}}}for(I=0;(N=H.attributes[I]);I++){J=u(J,s,p(N))}if((H.simple=!(J))){H.matchAux=j}else{H.matchAux=J;F=u(F,J)}H.match=F||j;H.combine=b.combinators[H.combinator||" "];H.search=O;return H};var o=b.combinators={" ":function(H,D,G,e,K,J){var C=G.search(D);if(J&&G.simple){return b.toArray(C)}for(var I=0,F,E=G.matchAux;(F=C[I]);I++){if(K(F)&&E(F,e)){H.push(F)}}return H},">":function(F,E,e,I,G){var C=e.search(E);for(var D=0,H;(H=C[D]);D++){if(H.parentNode==E&&G(H)&&e.matchAux(H,I)){F.push(H)}}return F},"+":function(C,i,e,E,D){while((i=i.nextSibling)){if(i.nodeType==1){if(D(i)&&e.match(i,E)){C.push(i)}break}}return C},"~":function(C,i,e,E,D){while((i=i.nextSibling)){if(i.nodeType==1){if(!D(i)){break}if(e.match(i,E)){C.push(i)}}}return C}};var d=b.pseudos={"first-child":function(e){return d.index(e,0)},"last-child":function(e){while((e=e.nextSibling)){if(e.nodeType===1){return false}}return true},"only-child":function(C){var i=C;while((i=i.previousSibling)){if(i.nodeType===1){return false}}var e=C;while((e=e.nextSibling)){if(e.nodeType===1){return false}}return true},"nth-child":function(E,G,F){var i=b.parseNth(G||"n");if(i.special!="n"){return d[i.special](E,i.a,F)}F=F||{};F.positions=F.positions||{};var C=b.getUid(E);if(!F.positions[C]){var D=0;while((E=E.previousSibling)){if(E.nodeType!=1){continue}D++;var e=F.positions[b.getUid(E)];if(e!=undefined){D=e+D;break}}F.positions[C]=D}return(F.positions[C]%i.a==i.b)},empty:function(e){return !(e.innerText||e.textContent||"").length},contains:function(e,i){return(e.innerText||e.textContent||"").indexOf(i)!=-1},index:function(C,e){var i=1;while((C=C.previousSibling)){if(C.nodeType==1&&++i>e){return false}}return(i==e)},even:function(e,C,i){return d["nth-child"](e,"2n+1",i)},odd:function(e,C,i){return d["nth-child"](e,"2n",i)}};d.first=d["first-child"];d.last=d["last-child"];d.nth=d["nth-child"];d.eq=d.index;var v=b.operators={"*=":function(e,i){return i},"^=":function(e,i){return"^"+i},"$=":function(e,i){return e+"$"},"~=":function(e,i){return"(?:^|[ \\t\\r\\n\\f])"+i+"(?:$|[ \\t\\r\\n\\f])"},"|=":function(e,i){return"(?:^|\\|)"+i+"(?:$|\\|)"}};var n={"class":"className"};b.lookupAttribute=function(i){var C=n[i];if(C){return function(D){return D[C]}}var e=/^(?:src|href|action)$/.test(i)?2:0;return function(D){return D.getAttribute(i,e)}};b.getAttribute=function(i,e){return i.getAttribute(e)};var x=Array.slice||function(e){return Array.prototype.slice.call(e)};try{x(document.documentElement.childNodes)}catch(A){x=function(e){if(e instanceof Array){return e}var D=e.length,C=new Array(D);while(D--){C[D]=e[D]}return C}}b.toArray=x;b.compare=(document.compareDocumentPosition)?function(i,e){return(3-(i.compareDocumentPosition(e)&6))}:function(i,e){return(i.sourceIndex-e.sourceIndex)};var w=1;b.getUid=(window.ActiveXObject)?function(e){return(e.$slyUid||(e.$slyUid={id:w++})).id}:function(e){return e.$slyUid||(e.$slyUid=w++)};var m={};b.parseNth=function(D){if(m[D]){return m[D]}var C=D.match(/^([+-]?\d*)?([a-z]+)?([+-]?\d*)?$/);if(!C){return false}var i=parseInt(C[1],10),e=(parseInt(C[3],10)||0)-1;if((i=(isNaN(i))?1:i)){while(e<1){e+=i}while(e>=i){e-=i}}switch(C[2]){case"n":C={a:i,b:e,special:"n"};break;case"odd":C={a:2,b:0,special:"n"};break;case"even":C={a:2,b:1,special:"n"};break;case"first":C={a:0,special:"index"};break;case"last":C={special:"last-child"};break;case"only":C={special:"only-child"};break;default:C={a:(i)?(i-1):e,special:"index"}}return(m[D]=C)};b.escapeRegExp=function(e){return e.replace(/[-.*+?^${}()|[\]\/\\]/g,"\\$&")};b.generise=function(e){b[e]=function(C){var i=b(C);return i[e].apply(i,Array.prototype.slice.call(arguments,1))}};var a=["parse","search","find","match","filter"];for(var y=0;a[y];y++){b.generise(a[y])}b.recompile();return b})();
	/* End of Sly MIT license */
	return {
		// Insert CSS into the page. This can be used to make objects invisible before the change and visible again after the change.
		css : function(def) {
		  var ss = document.createElement('style');
		  ss.setAttribute("type", "text/css");
		  if (ss.textContent) {    
		      ss.textContent = def;
		      var head = document.getElementsByTagName('head')[0];
		      head.appendChild(ss);
		  } else if(ss.styleSheet) {
		      ss.styleSheet.cssText = def;
		      var head = document.getElementsByTagName('head')[0];
		      head.appendChild(ss);
		  } else {
		     var style = document.createElement('style');
			 style.setAttribute("type", "text/css");
		     style.innerHTML = def;
			 var head = document.getElementsByTagName('head')[0];
		     head.appendChild(style);
		  }
		},
		// Return the selector object so that you can use the full potential:
		selector : function() {
			return Sly;
		},
		// Search for a element on the webpage and execute the function when it finds the element (ff) or execute a function before it has been found (pf)
		findAndExecute : function(str, ff, pf) {
			if (typeof(pf) != "undefined") {
				pf();
			}
			var l=0,fn=false;
			var iID = setInterval(
				(function(o,f,s){return function() {
					var el=Sly.search(s),len=el.length,els=new Array(),j=0;
					for (var i=0;i<len;i++) {
						if (typeof(el[i]) != "undefined") {
							els[j]=el[i];
							j++;
						}
					}
					if (typeof(els) != "undefined" && els.length>0) {
						clearInterval(iID);
						f(els);
					}
					if (l>=20 || fn) {
						clearInterval(iID);
						l = 0;
					}
					l++;
			}})(this.Sly,ff,str), 100);
		}
	}
};
var advCookie = {
  set: function(name, value, daysToExpire) {
    var expire = '';
    var domein = '';
    var path = '';
    var host = advCookie.getHost();
    if (daysToExpire != undefined) {
      var d = new Date();
      d.setTime(d.getTime() + (86400000 * parseFloat(daysToExpire)));
      expire = '; expires=' + d.toGMTString();
    }
    path = '; path=/';
    domein = '; domain='+host;
    
    return (document.cookie = name + '=' + (value || '') + path + domein + expire);
  },
  
  get: function(name) {
    var cookie = document.cookie.match(new RegExp('(^|;)\\s*' + escape(name) + '=([^;\\s]*)'));
    return (cookie ? unescape(cookie[2]) : null);
  },
                    
  getHost: function() {
    var newHost = "";
    try {
      var host = document.location.host;
      var values = host.split('.');
      if(!isNaN(values[(values.length-1)])) {
         return host;
      }
      if(values.length > 1) {
        if((values[values.length-2] == 'co' || values[values.length-2] == 'com') && values.length >= 3) {
          newHost = '.' + values[values.length-3] + '.' + values[values.length-2] + '.' + values[values.length-1];
        } else {
          newHost = '.' + values[values.length-2] + '.' + values[values.length-1];
        }
      }
    } catch(e) {}
    return newHost;
  }
};
var oldMboxCreate = mboxCreate;
mboxCreate = function(T, p) {
 if(T=='aanbiedingenpage' || T=='baselinepage' || T=='SiteCatalyst: event' || T=='SiteCatalyst: purchase') {
    if(T=='aanbiedingenpage' || T=='baselinepage') {
      advCookie.set("advMbox1", "1", 9);
      if(p) {
        oldMboxCreate(T, p);
      } else {
        oldMboxCreate(T);
      }
    }
    mboxFactoryDefault.isDomLoaded = mboxFactory.prototype.isDomLoaded = function() {
      return true;
    };
    mboxFactoryDefault.E=true;
  } else {
    mboxFactoryDefault.isDomLoaded = mboxFactory.prototype.isDomLoaded = function() {
      return true;
    };
    mboxFactoryDefault.E=true;
    return;
  }
};
var oldMboxSC = mboxLoadSCPlugin;     
mboxLoadSCPlugin = function(lc) {
  mboxFactoryDefault.isDomLoaded = function() {
    return true;
  };
  mboxFactoryDefault.E=true; 
  if(advCookie.get("advMbox1")) {
    oldMboxSC(lc); 
  }
};
if(document.URL.indexOf("//www.vodafone.nl/shop/mobiel_bellen/aanbiedingen/") != -1) {
  document.write('<div class="mboxDefault"></div>');
  mboxCreate('aanbiedingenpage');
} else if(document.URL.indexOf("//www.vodafone.nl/internet/internet_op_je_laptop/prepaid/") != -1) {
  document.write('<div class="mboxDefault"></div>');
  mboxCreate('baselinepage');
}
