/*
 Adform.Bootstrap.js, version 2.1.69

 Copyright Adform
 http://www.adform.com

 Date: 2015-06-18
*/
(function(a,b,c){function n(a,b){(b?9==b.nodeType?b:b.document:c).write('<script type="text/javascript" src="'+a+'"><\/script>')}function q(c){for(var i=a._prepareBannerDataCB,j={},g="ADFVideoCDN,ADFDomainCDN,ADFDomain,VideoCDN,ADFVideoCDNList,ADFcmpgnID,ADFmembID,ADFtagID,ADFafbanID,ADFBanVer,ADFBanVerBak,ADFbanID,ADFbanPlacID,ADFUnloadID,ADFClientSiteId,ADFGeoData,ADFGroupId,ADFTemplateVersion,ADFTemplateId,ADF_ClickEvent".split(","),h=g.length-1;0<=h;h--)g[h]in b&&(j[g[h]]=b[g[h]]);var l=a.RMBData=
{clicktags:""};a._prepareBannerDataCB=function(){for(var h=g.length-1;0<=h;h--)g[h]in j&&(b[g[h]]=j[g[h]]);a.prepareBannerData(c);for(h in l)a.RMBData[h]="clicktags"!=h?l[h]:a.RMBData[h]+l[h];i&&i()};i||n(a.scriptBase+"bootstrap/Adform.BannerData.js?v="+a.cache)}a.loadResource=a.loadResource||n;a.prepareBannerData=a.prepareBannerData||q})(Adform=window.Adform||{},window,document);
(function(a,b){var c="https:"==b.location.protocol?"https://":"http://";a.host&&(ADFDynamicDomain=a.host+"/banners/");a.shost&&(ADFTemplateDomain=a.shost+"/banners/");a.ENV={dynamicHost:a.host||c+"track.adform.net",staticHost:a.shost||c+"s1.adform.net",akamaiHost:c+"adformvod-vh.akamaihd.net/i/Banners",level:Math.random(),levels:{StubFile:0.1,StubFileError:1},hooks:[function(a,c){-1<c.indexOf("cloudfront.net")&&a.push("CloudFrontNetFailure")},function(a,c){-1<c.indexOf("message: script failed to load")&&
a.push("OldTemplates")},function(a){({Adbox:1,AdContent:1})[a[0]]&&a.push("BannerFailure")}]}})(Adform=window.Adform||{},document);
(function(a,b,c){if(!a.Log){a.SendQueue||(a.SendQueue=[]);var n;a.Log={timeout:5E3,url:a.ENV.dynamicHost+"/jslog/",sender:a.ENV.staticHost+"/banners/scripts/bootstrap/Adform.Sender."+(!b.JSON?"JSON.":"")+"js?"+(a.cache?"version="+a.cache:"rand="+Math.random()),sendMessage:function(a,n,i){try{var j=[];j.push(this.url);j.push("?src=");j.push(encodeURIComponent(a));j.push("&severity=");j.push(encodeURIComponent(n));j.push("&msg=");j.push(encodeURIComponent(i));(b.Image?new Image(1,1):c.createElement("img")).src=
j.join("")}catch(g){}},sendEvent:function(a,c,b){this.pushMessage([],b,{source:a})},pushMessage:function(b,r,i){var j=a.ENV;if(j){var g=j.hooks;if(g&&(h=g.length))for(;h-- >0;)g[h](b,r,i);for(var g=[],h=b.length,j=j.levels,l;h-- >0;)(l=j[b[h]])&&a.ENV.level<l&&g.push(b[h]);if(g.length){a.SendQueue.push([g,r,i]);if(!(location.protocol.indexOf("https")>-1||a.Log.Sender||n)){n=true;b=c.createElement("script");b.type="text/javascript";b.async=true;b.src=a.Log.sender;r=c.getElementsByTagName("script")[0];
r.parentNode.insertBefore(b,r)}}}}}}})(Adform=window.Adform||{},window,document);
(function(a){function b(a){var b={random:c,int32:function(){var a,b,c=[0,r];if(o>=n)for(b=o=0;b<n;b++)a=m[b]&i|m[(b+1)%n]&j,m[b]=m[(b+q)%n]^a>>>1^c[a&1];a=m[o++];a^=a>>>11;a^=a<<7&2636928640;a^=a<<15&4022730752;return(a^a>>>18)>>>0}},m=[],o;a||(a=Math.round(1E5*((new Date).getTime()+Math.random())));m[0]=a>>>0;for(o=1;a=o-1,o<n;o++)a=m[a]^m[a]>>>30,m[o]=(((a&g)>>>t)*l<<t)+(a&h)*u+o,m[o]>>>=0;return b}function c(){return Math.floor(this.int32()/2)}var n=624,q=397,r=2567483615,i=2147483648,j=2147483647,
g=4294901760,h=65535,l=1812433253,u=1812433253,t=16;a.random=function(a){return b(a).random()}})(Adform=window.Adform||{});
(function(a,b,c){function n(){if(z)return z;if(this instanceof n){this.banners={};this.compoundBanners={};try{c.body||c.write("<html><body></body></html>")}catch(e){}var f=navigator,a=screen,b=f.browserLanguage||f.language||0,f=f.systemLanguage||b,h=a?a.width+"X"+a.height:0,a=a?a.colorDepth:0,d=this.getFlashVersion(),g=this.getJSVersion(),j=this.getCT(),l=this.getCPU(),i=this.getWin(),m=50*Math.round(i.w/50),i=50*Math.round(i.h/50),o=this.hasIframeSanbox();this.settings=[escape(f),escape(b),h,d,m,
i,a,g,j,l,o].join("|")}else return z=new n}function q(e,f,a){var a=a||c,b=a.createElement("div");b.innerHTML='<iframe src="'+e+'" allowtransparency="true" webkitallowfullscreen mozallowfullscreen allowfullscreen marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" style="'+(f||"")+'"></iframe>';a.body.appendChild(b.removeChild(b.firstChild))}function r(e){var f=a.ADFIframe&&{src:b.location.href.replace(/cpjs=2/,"cpjs=0")},k,B,h,d=/\/adfscript/;if(!f){k=c.getElementsByTagName("script");
for(B=k.length;B--&&!f;)if((h=k[B]).src&&h.src.match(d)&&-1<h.src.indexOf(e))f=h}return f||{}}function i(e){var f,a,c=b._adform&&b._adform.tagFrame;f=e;if("undefined"!=typeof e.URL){try{a=b.top.location.href.split("#")[0]}catch(h){a=(c||b).document.referrer}a=a?v(a):e.CREFURL;f=new l(e.URL);f.append.push("&CREFURL="+a);f.CREFURL=a;f.BN=e.BN;f.ROTSEQ=e.ROTSEQ}return f}function j(e,a){if(e){(a=a||[]).push(e);for(var k=0;k<e.frames.length;k++)j(e.frames[k],a);return a}}function g(e){return a.random(e+
this.id)}function h(e){try{return e.Adform&&e.Adform.ADFUtilInstance}catch(a){}}function l(e){var e=(e||"").split(";OOBClickTrack="),a=e.shift().split("?");this._base=a.shift();this._parts=a.join("?").split(";");e.length&&(this.tracks=e);this.append=[];for(var a=0,k=e.length;a<k;a++)this.append.push(";OOBClickTrack="+v(e[a]))}function u(e,a,k){var b=e.length,a=a+"=",c,h=a.length;for(k||(a=a.toLowerCase());b--&&!(c=e[b].slice(0,h),k||(c=c.toLowerCase()),c===a););return b}if(!a.ADFBannerUtils){var t=
Object.prototype.hasOwnProperty,x=a.loadResource,v=b.encodeURIComponent,m=b.decodeURIComponent,o=function(e){var a;try{a=m(e)}catch(k){a=e}return a},p=null,A=null,d={webkitVisibilityState:"webkitvisibilitychange",mozVisibilityState:"mozvisibilitychange",msVisibilityState:"msvisibilitychange",visibilityState:"visibilitychange"},w;for(w in d)w in c&&(p=w,A=d[w]);var D=a.cache,C=-1,z,s,d=n.prototype;d.getCompoundBannerInfo=function(e){return this.compoundBanners["c"+e]||null};d.createBanner=function(e){function f(e){var f=
e.url;if(!("stubFileExists"in d)){if(e.helper)try{a.Log.pushMessage(["StubFileError"],"StubFile service is down",{CREFURL:y,BN:l,adfserveURL:w})}catch(k){}(d.stubFileExists=e.exists)?(f=o(f),q(a.scriptBase+"iframe/recache.html?bv="+D,"position:absolute;width:10px;height:10px;left:-9999px;top:-9999px"),q(f+"#"+D+"#"+r(l).src,"position:absolute;top:0;left:0;width:100%;height:100%",b._adform&&b._adform.tagFrame&&b.parent.document)):x(w)}}var k=this,h=k.getTagID(),d=k.addNewBanner(h,"undefined"==typeof a.ADFIframe?
0:1),e=d.params=i(e,k),g=e.get("compoundSeqNo");e.tracks&&(d.msn=1,d.OOBClickTracks=e.tracks);e.get("singleTag")&&(d.singleTag=!0,g=g||1,e.set("compoundSeqNo",g));d.compoundSeqNo=g;"prerender"==c[p]&&(e.set("hid",2),d.prerender=!0,c.addEventListener(A,function(){if(c[p]!="prerender"&&d.prerender){c.removeEventListener(A,arguments.callee,false);k.registerImpression(d)}},!1));var j=Math.floor(11E3*Math.random())+";set",l=e.BN,m=k.getCompoundBannerInfo(l),n=k.getPropByBn("smid",l),u=e.ROTSEQ,t=!1,s=
!1;g&&(g=k.getRotSeed(),t=g.gen(l),g.compound[l]?s=g.compound[l]:u&&(g.compound[l]=u));e.set("js",1);e.set("adfxid",h);e.set(j,k.settings);t&&e.set("rotseed",t);s&&e.set("rotseq",v(s));m&&e.set("rotseqno",m.replace("r",""));n&&e.set("smid",n);a.CDNHost&&e.set("cdnhost",v(a.CDNHost));var w=d.params.toString(),y=d.params.CREFURL;if(y&&k.needStubFile()&&!a.ADF_STUB)y=o(y).replace(/(:\/\/[^\/]+\/).*/,"$1"),a.stubFile=f,x(a.host+"/adfstub/?bn="+l+"&CREFURL="+v(y)),x(a.scriptBase+"extra/StubHelper.js?bv="+
a.cache);else{if(a.ADF_STUB)try{a.Log.pushMessage(["StubFile"],"Banner loaded using stubFile")}catch(z){}x(w)}return d};d.addNewBanner=function(e,f){delete a._beforeScript;return this.banners[e]={id:e,type:f,adfserveLoadTime:this.now()}};d.copyBanner=function(e,a){var k=this.banners[e];if(!k||!k.params)return null;var k=k.params.copy(),b;for(b in a)t.call(a,b)&&k.set(b,a[b]);return this.createBanner(k)};d.wipeOutBanner=function(e){var f=this.banners[e];f&&(s&&(s.id=a.random(),s.compound&&delete s.compound[f.bn]),
delete this.compoundBanners["c"+f.bn],delete this.banners[e])};d.addBannerAttribute=function(e,a,b){(e=this.banners[e])&&(e[a]=b)};d.getTagID=function(){var e=this.getRotSeed();e.xId||(e.xId=0);return++e.xId+"x"};d.getRotSeed=function(){var e,f,k,c,d;if(!s){try{e=j(b.top);f=0;for(k=e.length;f<k;f++)if(c=e[f],c!=b&&(d=h(c))&&d.getRotSeed){s=d.getRotSeed();break}}catch(l){}s?s.gen=g:s={compound:{},id:a.random(),gen:g}}return s};d.getJSVersion=function(){try{c.write('<span id="ADFtemp"></span>');for(var e=
1;10>e;e++){var a=c.createElement("script");a.setAttribute("language","javascript1."+e);a.text="ADFJSVersion="+(e+1)+";";try{c.getElementById("ADFtemp").appendChild(a)}catch(b){}}try{c.getElementById("ADFtemp").parentNode.removeChild(c.getElementById("ADFtemp"))}catch(d){}return"undefined"!=typeof ADFJSVersion?ADFJSVersion:1}catch(h){}};d.getFlashVersion=function(){if(-1==C){var a=navigator.plugins,f=navigator.mimeTypes,k=b.ActiveXObject,c=16,d,a=a&&a["Shockwave Flash"]&&(!f||!f["application/x-shockwave-flash"]||
f["application/x-shockwave-flash"].enabledPlugin)&&a["Shockwave Flash"].description||"";if(!a&&k)for(;6<=c--;)try{d=new k("ShockwaveFlash.ShockwaveFlash."+c);6==c&&(d.AllowScriptAccess="always",a="WIN 6.0.21.0");try{a=d.GetVariable("$version").replace(/,/g,".")}catch(h){}break}catch(g){}C=parseFloat(a.replace(/^.*?(\d+[\.,].*$)/,"$1"))||0}return C};d.getWin=function(){var a=c.documentElement,f=c.body;return{w:b.innerWidth||a&&a.clientWidth||f&&f.clientWidth,h:b.innerHeight||a&&a.clientHeight||f&&
f.clientHeight}};d.getCT=function(){var a={lan:"1",modem:"2"},f="3";try{c.body.addBehavior&&(c.body.addBehavior("#default#clientCaps"),f=c.body.connectionType.toLowerCase(),f="undefined"!=typeof a[f]?a[f]:f)}catch(b){}return f};d.getCPU=function(){return navigator.cpuClass?{x86:1,"68k":2,PPC:3,Alpha:4,Arm:5,Other:6}[navigator.cpuClass]||8:7};d.getSettings=function(){return this.settings};d.firePixel=function(a){("undefined"==typeof Image?c.createElement("img"):new Image).src=a};d.fireTargAdPixel=
function(a){var f=this.TargAd||{};f[a]||((this.TargAd=f)[a]=!0,a=a.replace("{gmtr}",Math.floor(9999999999*Math.random())).replace("{gmttzd}",(new Date).getTimezoneOffset()),this.firePixel(a))};d.registerImpression=function(a){if(a&&a.prerender){var f=a.params.copy();f.set("hid",1);a.rotseqno&&f.set("rotseqno",a.rotseqno);var b=c.createElement("script");b.src=f.toString();b.type="text/javascript";c.body.appendChild(b);delete a.prerender}};d.addCompoundBannerInfo=function(a,f){this.compoundBanners["c"+
a]="r"+f};d.setBannerRegisteredStatus=function(e){var f=this.banners[e],b=this.now(),c=b-f.adfserveLoadTime,d=parseInt(f.serverTime,10);this.addBannerAttribute(e,"adfserveLoadTime",c);d&&(d+=Math.round(0.5*c),this.addBannerAttribute(e,"serverTime",d),this.addBannerAttribute(e,"timeDiff",d-b));this.addBannerAttribute(e,"registered",1);try{var h=a.ADFEventsInstance;h&&h.register(f);for(var e=E,f=0,g=e.length;f<g;f++)e[f].call(this)}catch(l){}};d.onBannerRegisteredStatus=function(a){E.push(a)};d.hasIframeSanbox=
function(){var a=this._sandbox;if("number"!=typeof a){a=1;try{b.top.document.getElementById,a=0}catch(f){}this._sandbox=a}return a};d.getPropByBn=function(a,f){var b,c,d=this.banners;for(b in d)if(c=d[b],c.bn==f&&a in c)return c[a]};d.now=function(){return(new Date).getTime()};d.needStubFile=function(){var a=b.$sf,f=b.parent,c=this._stub,d=b._adform&&b._adform.tagFrame;if(null==c){c=!(b==f||b.inDapMgrIf||b.inDapIF||b.inFIF||a&&a.ext);!c&&d&&(c=!0,f=d.parent);if(c)try{f.document.getElementById,c=!1}catch(h){}this._stub=
c}return c};d.getAdfscript=r;d.getUnloadId=function(a){try{for(var f=j(b.top),c=f.length,d,g,l,i;c--;)for(l in d=(g=h(f[c]))&&g.banners,d)if(i=d[l],i.bn==a&&1==i.compoundSeqNo)return i.unloadID}catch(m){}};a.ADFBannerUtils=n.getInstance=n;a.ADFUtilInstance=n();var E=[];d.ADFCreateObjectCallback=function(a,f){return function(){f.apply(a,arguments)}};d.eventRegister=function(a,f,b,c){b.addEventListener?b.addEventListener(a,this.ADFCreateObjectCallback(eval(c),eval(f)),!1):b.attachEvent&&b.attachEvent("on"+
a,this.ADFCreateObjectCallback(eval(c),eval(f)),!1)};d.getPosition=function(a){try{var f={};f.y=a.offsetTop;f.x=a.offsetLeft;for(var b;null!=a.offsetParent;)b=a.offsetParent,f.y+=b.offsetTop,f.x+=b.offsetLeft,a=b;return f}catch(c){}};d.getScrollXY=function(){try{var a={x:0,y:0};if("number"==typeof b.pageYOffset)a.y=b.pageYOffset,a.x=b.pageXOffset;else if(c.body&&(c.body.scrollLeft||c.body.scrollTop))a.y=c.body.scrollTop,a.x=c.body.scrollLeft;else if(c.documentElement&&(c.documentElement.scrollLeft||
c.documentElement.scrollTop))a.y=c.documentElement.scrollTop,a.x=c.documentElement.scrollLeft;return a}catch(f){}};d.getBrowser=function(){try{if(-1!=navigator.appVersion.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Opera"))return"MSIE";if(-1!=navigator.userAgent.indexOf("Safari"))return"Safari";if(-1!=navigator.userAgent.indexOf("Opera"))return"Opera";if(-1!=navigator.appName.indexOf("Netscape"))return-1!=navigator.product.indexOf("Gecko")&&(-1!=navigator.vendor.indexOf("Firefox")||-1!=navigator.userAgent.indexOf("Firefox"))?
"Firefox":"Netscape"}catch(a){}};d=l.prototype;d.copy=function(){var a=new l,b;for(b in this)t.call(this,b)&&(a[b]=this[b]&&this[b].slice?this[b].slice(0):this[b]);return a};d.get=function(a,b){var c=this._parts,d=u(c,a,b);if(~d)return c[d].slice(a.length+1)};d.set=function(a,b,c){var d=this._parts,c=u(d,a,c);~c?d[c]=d[c].slice(0,a.length+1)+b:d.push(a+"="+b);return this};d.unset=function(a,b){var c=this._parts,d=u(c,a,b);~d&&c.splice(d,1);return this};d.toString=function(){return this._base+"?"+
this._parts.join(";")+this.append.join("")}}})(Adform=window.Adform||{},window,document);
(function(a,b,c){var n=a.ADFUtilInstance,q=a.host;(a.ADFBanner=function(){var b=q+"/jslog/?src=ADFBanner&severity=4&msg=",i=a.ADFBannerParams&&a.ADFBannerParams.length?a.ADFBannerParams.shift():a.ADFBannerData;try{n.createBanner(i)}catch(j){if((new Image).src=b+(i?"data:":"error:")+encodeURIComponent(""+(j.stack||j)),i)try{var g=i.URL,h=i.BN,l=n.getAdfscript(h),u=c.createElement("div"),i=l,t,x,v,m,g=g.split(";");g[0]+=";srctype=4";for(g=g.join(";");i;)t="BODY"==i.nodeName,x="HEAD"==i.nodeName,i=!(t||
x)&&i.parentNode;t?(v=l.parentNode,m=l):v=c.body;u.innerHTML='<a href="'+q+"/C/?bn="+h+';C=0"><img src="'+g+'"></a>';v.insertBefore(u.firstChild,m||null)}catch(o){(new Image).src=b+"fallback:"+encodeURIComponent(""+(o.stack||o))}}})()})(Adform=window.Adform||{},window,document);
(function(a,b,c){function n(h,g,i,j,n){try{this.notifyAboutEvent.apply(this,arguments)}catch(r){}var m=(new Date).getTime()-this.InitTime,m=0<m?Math.round(m/1E3):0,m=Math.min(m,3600),o=a.ADFBannerUtils&&a.ADFBannerUtils.getInstance(),p=o&&o.banners&&o.banners[h],q=a.adRegister&&a.adRegister[h];if(!p&&q)return q.sendEvent(g,i,j,n);if(p&&p.isEventsEnabled){q=p.bn;!p._imprID&&1<p.compoundSeqNo&&(p._imprID=o.getUnloadId(q)||p.unloadID);for(var m=["bn",q,"event",g,"time",m,"banner",p.ban,"innerbanner",
p.innerban,"asset",i,"name",j,"imprid",p._imprID||p.unloadID,"icid",p.cookieID,"rnd",Math.floor(1E9*Math.random())],o=[],p=0,q=m.length,d;p<q;p+=2)(d=m[p+1])&&!isNaN(d)&&o.push(m[p]+"="+d);o=this.Host+"/Serving/Event/?"+o.join("&")+(n||"");return(b.Image?new b.Image(1,1):c.createElement("img")).src=o}}var q=Object.prototype.hasOwnProperty,r=a.ADFBannerUtils&&a.ADFBannerUtils.getInstance(),i={Initialized:!1,InitTime:(new Date).getTime(),Host:a.host||("https:"==c.location.protocol?"https://":"http://")+
"track.adform.net",callbacks:[],sendEvent:n,Initialize:function(){this.Initialized=!0;var a=this.Host+"/jslog/?src=ADFBanner&severity=4&msg=";(new Image).src=a+"initEvents"},registerCallback:function(a,b){"function"==typeof a&&this.callbacks.push([a,b])},unregisterCallback:function(a){var b=this.callbacks,c=b.length;if("function"==typeof a)for(;c--;)b[c][0]==a&&b.splice(c,1)},notifyAboutEvent:function(){for(var a=this.callbacks.slice(),b=0,c=a.length;b<c;b++)a[b][0].apply(a[b][1]||this,arguments)}},
j=a.Events;if(j){for(var g in i)q.call(i,g)&&!q.call(j,g)&&(j[g]=i[g]);j.sendEvent=n}else j=a.Events=i;a.ADFEvents2||(a.ADFEvents2=j);r.onBannerRegisteredStatus(function(){var c=r.banners,g,i;for(g in c){i="FSCommandID"+g;b[i]!="function"&&function(c,g){b[g]=function(b,g){a.Events.sendEvent(c,g.split("#|#")[1])}}(g,i)}})})(Adform=window.Adform||{},window,document);