(function(){var u=("https:"==document.location.protocol?"https:":"http:")+"//imp.nowinteract.com/logserver/ResponseService.ashx?",v=[],w=[],m=0,i=document,B=window,j=B.encodeURIComponent||escape,J=B.decodeURIComponent||unescape,K=i.location.href,C="",r,s,D,E,F,x,t,y,G,H,I,k,z="",z=function(){var a=document.location.hostname,b=a.lastIndexOf(".");-1<b&&(b=a.lastIndexOf(".",b-1),-1<b&&(a=a.substr(b+1)));return a}();r=function(a,b,c,d,e,h){var f;c&&(f=new Date,f.setTime(f.getTime()+864E5*c));z&&(e=z);
i.cookie=a+"="+j(b)+(c?";expires="+f.toGMTString():"")+";path="+(d?d:"/")+(e?";domain="+e:"")+(h?";secure":"")};s=function(a){return(a=RegExp("(^|;)[ ]*"+a+"=([^;]*)").exec(i.cookie))?J(a[2]):0};D=function(){var a=s("IMPloggcookie");a||(a=x());r("IMPloggcookie",a,300);return a};E=function(){var a=s("IMPSession");a||(a=x());r("IMPSession",a);return a};F=function(){var a="";try{a=top.document.referrer}catch(b){if(parent)try{a=parent.document.referrer}catch(c){a=""}}if(""===a)a=i.referrer;return a};
x=function(){for(var a=[],b=0;32>b;b++)a[b]="0123456789ABCDEF".substr(Math.floor(16*Math.random()),1);a[12]="4";a[16]="0123456789ABCDEF".substr(a[16]&3|8,1);return a.join("")};t=function(){var a;a="siteid="+C+"&url="+j(K)+"&urlref="+j(F())+"&userkey="+j(D())+"&impsess="+j(E())+"&rand="+Math.random();for(keyIndex=0;keyIndex<m;keyIndex++)a+="&KeyValue="+j(v[keyIndex])+":"+j(w[keyIndex]);return u+a};k=function(a){return isNaN(a)?0:a};G=function(){r("IMPDispcookie",1)};H=function(){return s("IMPDispcookie")?
!1:!0};getImagePath=function(a){var b="",b=a.lastIndexOf("/");-1<b?b=a.substr(0,b+1):(b=u.lastIndexOf("/"),b=-1<b?u.substr(0,b+1):"");return b};y=function(a,b,c,d,e,h,f,g,j){if(H()||g){(g=document.getElementById("imp_container"))&&g.parentNode.removeChild(g);g=document.createElement("div");g.id="imp_container";body=document.getElementsByTagName("body")[0];body.appendChild(g);var A="",l="absolute";0<=d.indexOf("fixed")&&(l="fixed");var m="absolute";0<=d.indexOf("relative")&&(m="relative");var k="left";
0<=d.indexOf("right")&&(k="right");var i="top";0<=d.indexOf("bottom")&&(i="bottom");var n=h+"px",o=e+"px",p="0px",q="0px";"relative"==m&&(n="50%",o=e+"px",p=0>b/2-h?h-b/2+"px":"-"+(b/2-h)+"px",q="0px");"center"==d&&(o=n="50%",p="-"+b/2+"px",q="-"+c/2+"px");A||(A="top"==i&&"right"==k?"position:"+l+"; right: "+n+"; margin-right: "+p+"; width: "+b+"px; top: "+o+"; margin-top: "+q+"; height: "+c+"px;":"bottom"==i&&"right"==k?"position:"+l+"; right: "+n+"; margin-right: "+p+"; width: "+b+"px; bottom: "+
o+"; margin-bottom: "+q+"; height: "+c+"px;":"bottom"==i&&"left"==k?"position:"+l+"; left: "+n+"; margin-left: "+p+"; width: "+b+"px; bottom: "+o+"; margin-bottom: "+q+"; height: "+c+"px;":"position:"+l+"; left: "+n+"; margin-left: "+p+"; width: "+b+"px; top: "+o+"; margin-top: "+q+"; height: "+c+"px;");g.style.cssText=A+" z-index:9999; background:  transparent;";fill_container("imp_container",g,a,b,c,f,j);IMP.trackDisplay(f)}};fill_container=function(a,b,c,d,e,h,f){add_iframe_container(a,b,c,e,d);
c=getImagePath(c)+"close.png";f||(f="position: absolute; right: 0px; padding:10px; top:0px; cursor: pointer");add_button_container(a,b,c,f,"St\ufffdng","St\ufffdng","IMP.hide_IMPiframe",h)};add_iframe_container=function(a,b,c,d,e){b.innerHTML+='<iframe id="'+(a+"Frame")+'"  src="'+c+'"  scrolling="no"  frameborder="no"  style="background: transparent; height:'+d+"px; width: "+e+'px; "  ALLOWTRANSPARENCY="true"></iframe>'};add_button_container=function(a,b,c,d,e,h,f,g){d&&(a=a+"_"+e,b.innerHTML+='<div style="'+
d+'"><img id="'+a+'" class="'+h+'" title="'+e+'" src="'+c+'" alt="" id="'+a+'" onclick="'+(f+"("+g+")")+'"></div>')};I=function(a){var b,c,d,e,h,f,g,i,j,l;b=a.DisplayUrl;c=k(a.Width);d=k(a.Height);e=a.Position;h=a.DelaySek;f=k(a.TopPos);g=k(a.LeftPos);l=a.BgStyle;i=a.InteractionLogId;j=a.OverrideClosedMessage;0<h?setTimeout(function(){y(b,c,d,e,f,g,i,j,l)},1E3*h):y(b,c,d,e,f,g,i,j,l)};return IMP={hide_IMPiframe:function(a){var b=document.getElementById("imp_container");b&&b.parentNode.removeChild(b);
G();IMP.trackCloseBox(a)},initsite:function(a){C=a},clearSiteProp:function(){v=[];w=[];m=0},appendSiteProp:function(a,b){v[m]=a;w[m]=b;m++},appendMetaProp:function(a){a:{for(var b=document.getElementsByTagName("meta"),c=0;c<b.length;c++){if(b[c].getAttribute("property")==a||b[c].getAttribute("name")==a){a=b[c].content;break a}if(25<=c)break}a=""}a&&IMP.appendSiteProp("impmeta",a)},appendEventProp:function(a){a&&IMP.appendSiteProp("impevent",a)},trackInteract:function(){dojo.require("dojo.io.script");
dojo.ready(function(){dojo.io.script.get({url:t(),callbackParamName:"callback",load:function(a){a.HasNormalMessage&&I(a)},error:function(){}});IMP.clearSiteProp()})},trackLogging:function(){dojo.require("dojo.io.script");dojo.ready(function(){dojo.io.script.get({url:t(),callbackParamName:"callback",load:function(){}});IMP.clearSiteProp()})},trackSystemEvent:function(a,b){IMP.clearSiteProp();IMP.appendSiteProp("sysevent",a);IMP.appendSiteProp("interactionlogid",b);dojo.require("dojo.io.script");dojo.ready(function(){dojo.io.script.get({url:t(),
callbackParamName:"callback",load:function(){}});IMP.clearSiteProp()})},trackCloseBox:function(a){IMP.trackSystemEvent(2,a)},trackDisplay:function(a){IMP.trackSystemEvent(5,a)}}})();

