if(!window.GoaAdvertisement){var GoaAdvertisement=function(J,E,M){this.COOKIE_SPLITCHAR="-";
this.COOKIE_EXPIRE=15724800000;
this.DEFAULT_TARGET="_blank";
this.DEFAULT_TITLE="Kattintson a hirdetésre!";
this.DEFAULT_WMODE="window";
this.DEFAULT_QUALITY="autohigh";
this.DEFAULT_TITLETEXT="Hirdetés";
this.DEFAULT_IMGHOME="http://imgs.adverticum.net";
this.CLOSETYPE_IMG="img";
this.CLOSETYPE_FLASH="flash";
this.CLOSETYPE_TITLE="title";
this.zone=M;
this.goa=M.goa;
this.util=M.goa.util;
this.doc=document;
this.w=window;
this.c=document.cookie;
this.b=this.doc.getElementsByTagName("body")[0];
var N={};
this.util.importObject(J,N);
var L={};
this.util.importObject(E,L);
this.goalID=N.kampany_id;
this.bannerID=N.banner_id;
this.id="goAc_id"+N.banner_id;
this.type=N.type;
this.width=this.goa.pxValue(N.width,false);
this.height=this.goa.pxValue(N.height,true);
this.marginTop=N.banner_up?this.goa.pxValue(N.banner_up,true):0;
this.marginBottom=N.banner_down?this.goa.pxValue(N.banner_down,true):0;
this.marginLeft=N.banner_left?this.goa.pxValue(N.banner_left,false):0;
this.marginRight=N.banner_right?this.goa.pxValue(N.banner_right,false):0;
this.totalWidth=this.width+this.marginLeft+this.marginRight;
this.totalHeight=this.height+this.marginBottom+this.marginTop;
this.isLayer=(L.forceLayer||L.layerOnly);
this.isPop=(typeof L.d!=="undefined")&&!L.layerOnly;
this.dhtml=this.isLayer||this.isPop;
this.imghome=N.imghome?N.imghome:this.DEFAULT_IMGHOME;
if(this.doc.location.protocol=="https:"){this.imghome=this.imghome.replace(/^http:/,"https:")
}this.trackingURL=this.imghome+"/external/"+this.bannerID+"_tr.html";
var P=L.dhtmlHeight?this.goa.pxValue(L.dhtmlHeight,true):this.totalHeight;
var A=L.dhtmlWidth?this.goa.pxValue(L.dhtmlWidth,false):this.totalWidth;
var K=(typeof L.bannerLeft!=="number")?Math.floor((this.goa.env.width-this.goa.pxValue(A,false))/2):L.bannerLeft>=0?this.goa.pxValue(L.bannerLeft,false):this.goa.env.width-A+L.bannerLeft;
var C=(typeof L.bannerTop!=="number")?Math.floor((this.goa.env.height-this.goa.pxValue(P,true))/2):L.bannerTop>=0?this.goa.pxValue(L.bannerTop,true):this.goa.env.height-P+L.bannerTop;
this.pop={width:this.totalWidth,height:this.totalHeight,posLeft:C>=0?C:0,posTop:K>=0?K:0,title:L.titleText?L.titleText:this.DEFAULT_TITLETEXT,backgroundColor:L.popupBackground?L.popupBackground:"#ffffff",aggressive:L.popUp?L.popUp:false};
var I=L.titleHeight?L.titleHeight:15;
var O=L.closeWidth?L.closeWidth:10;
var G=(typeof L.layerLeft!=="number")?Math.floor((this.goa.env.width-this.goa.pxValue(A,false))/2):L.layerLeft>=0?this.goa.pxValue(L.layerLeft,false):this.goa.env.width-A+L.layerLeft;
var H=(typeof L.layerTop!=="number")?Math.floor((this.goa.env.height-this.goa.pxValue(P,true))/2):L.layerTop>=0?this.goa.pxValue(L.layerTop,true):this.goa.env.height-P+L.layerTop;
var B=(typeof L.titleFontBold!=="undefined")?L.titleFontBold:true;
var D=(typeof L.titleFontItalic!=="undefined")?true:false;
var F;
if(L.layerBorderWidth||L.layerBorderStyle||L.layerBorderColor){F=(L.layerBorderWidth?L.layerBorderWidth:1)+"px "+(L.layerBorderStyle?L.layerBorderStyle:"solid ")+(L.layerBorderColor?L.layerBorderColor:"blue")
}else{F=null
}this.layer={id:"goAdverticumDhtmlContainer"+this.bannerID,style:{position:"absolute",width:A+"px",height:this.goa.pxValue((L.closeType===this.CLOSETYPE_TITLE)?P+I:P,true)+"px",top:(H>=0?H:0)+"px",left:(G>=0?G:0)+"px",border:F?F:"","z-index":L.layerZIndex?L.layerZIndex:110,"background-color":L.layerBackground?L.layerBackground:""},closeType:L.closeType?L.closeType:"title",closeFunction:new Function("window.___goa.closeLayer('"+this.zone.id+"');return false;"),title:L.titleText?L.titleText:this.DEFAULT_TITLETEXT,titleBarStyle:{width:this.width+"px",height:I+"px",background:L.titleBackground?L.titleBackground:"#0000a0","font-family":L.titleFontFamily?L.titleFontFamily:"Veradana, Arial, sans-serif","font-size":(L.titleFontSize?L.titleFontSize:10)+"px","font-weight":B?"bold":"normal","font-style":D?"italic":"normal",color:L.titleColor?L.titleColor:"#ffffff","line-height":(L.titleLineHeight?L.titleLineHeight:12)+"px"},closeImgSrc:L.closeImgSrc?L.closeImgSrc:this.imghome+"/Hide.gif",closeWidth:O,closeHeight:L.closeHeight?L.closeHeight:10,closeImgLeft:this.goa.pxValue(A,false)-O+"px",stayAlive:L.stayAlive?L.stayAlive:0,openOnClose:L.openOnClose?true:false,openDelay:L.openDelay?L.openDelay:200};
if(L.layerStyle){this.util.importObject(this.util.createStyleObject(L.layerStyle),this.layer.style)
}if(L.titleStyle){this.util.importObject(this.util.createStyleObject(L.titleStyle),this.layer.titleBarStyle)
}if(L.flashCloseFunction){window[L.flashCloseFunction]=new Function("window.___goa.closeLayer('"+this.zone.id+"')")
}this.isExternalTracking=N.tracking;
this.bannerCentered=true;
this.doTracking=typeof this.zone.id==="number";
this.isFreqCapped=this.doTracking&&(L.maximumAVpT>0&&L.T>0);
this.isPresentable=!this.isFreqCapped||this._isAVSession(L.maximumAVpT,L.T);
if(!this.isPresentable){this.log("Frequency capping limitation.")
}this.a=N
};
GoaAdvertisement.prototype.getTemplate=function(){var B=[];
var A=this.a.type.toUpperCase();
if("CT"===A){B[0]=this._getTemplateCT()
}if("HTML"===A){B[0]=this._getTemplateExternal()
}if("FLASH"===A&&this.goa.env.pv[0]>=this.a.swfversion){B[0]=this._getTemplateFlash()
}else{if("FLASH"===A||"INNER_GIF"===A||"OUTER_GIF"===A){B[0]=this._getTemplateImage()
}}if(B.length===0){this.error("Invalid type "+A)
}this.log(B);
return{span:{children:B}}
};
GoaAdvertisement.prototype._getExternalUrl=function(){var A=this.a;
var B=A.externalUrl?A.externalUrl:A.imghome?A.imghome+"/external/"+this.bannerID+".html":this.imghome+"/external/"+this.bannerID+".html";
B+="?title=";
B+=this.pop.title?encodeURIComponent(this.pop.title):"";
B+="&v";
B+="&cthref="+encodeURIComponent(A.cthref);
B+="&zona="+A.zona;
if(this.pop.backgroundColor&&(this.pop.backgroundColor!=="")){B+="&b&background-color:";
B+=encodeURIComponent(this.pop.backgroundColor)
}if(this.goa.debugMode){B+="&goadebug"
}return B
};
GoaAdvertisement.prototype._isAVSession=function(A,C){if(!A||!C){return true
}var B=new Date();
if(A===0||((B.valueOf()-this._getLastAVTime())>=(C/A))){this.log("freq OK. ("+A+" times in "+C/1000/60+" minutes)");
return true
}else{this.log("freq LIMIT ("+A+" times in "+C/1000/60+" minutes)");
return false
}};
GoaAdvertisement.prototype.append=function(A){if(!this.isPresentable){return
}this.log("Showing campaign: "+this.goalID+", creative: "+this.bannerID);
if(this.isLayer||this.isPop){if(this.layer.openOnClose){this.util.setOnUnload(new Function("window.___goa.showDhtmlAd('"+this.zone.id+"')"));
this.log("scheduled on unload");
return
}else{if(this.layer.openDelay>0){setTimeout("window.___goa.showDhtmlAd('"+this.zone.id+"')",this.layer.openDelay);
this.log("scheduled with "+this.layer.openDelay+"ms delay");
return
}}this.showDhtmlAd()
}else{this.creative=this.util.buildObject(this.getTemplate());
if(!this.creative){return
}A.getDOMContainer().appendChild(this.creative);
A.show(this);
this._track(true,null,A.getDOMContainer());
this.log("creative added (dom)")
}};
GoaAdvertisement.prototype._getLastAVTime=function(){var A;
if((A=this.goa.getCookie(this.id))){return this._parseCookieData(A)[0]
}return null
};
GoaAdvertisement.prototype._parseCookieData=function(B){var A=B.split(this.COOKIE_SPLITCHAR);
A[0]=Math.round(parseInt(A[0],10));
A[1]=Math.round(parseInt(A[1],10));
return A
};
GoaAdvertisement.prototype.log=function(A){this.goa.Log({zone:"banner "+this.bannerID,msg:A})
};
GoaAdvertisement.prototype.error=function(A){this.goa.Error({zone:"banner "+this.bannerID,msg:A})
};
GoaAdvertisement.prototype._getTemplateImage=function(){return{a:{href:this.a.cthref,title:this.a.alt?this.a.alt:this.DEFAULT_TITLE,target:this.a.cttarget?this.a.cttarget:this.DEFAULT_TARGET,children:[{img:{alt:this.a.alt?this.a.alt:this.DEFAULT_TITLE,width:this.a.width,height:this.a.height,src:this.a.imgsrc,style:{"border-width":"0px",margin:this.marginTop+"px "+this.marginRight+"px "+this.marginBottom+"px "+this.marginLeft+"px",padding:"0px"}}}]}}
};
GoaAdvertisement.prototype._getTemplateFlash=function(){var A=this.a.imghome+"/loader.swf";
var B="path="+encodeURIComponent(this.a.swfsrc+"?clickTAG="+this.a.cthref+"&clickTag="+this.a.cthref+"&clickTARGET="+this.a.cttarget+"&clickTarget="+this.a.cttarget+"&cTRG="+this.a.cttarget+(this.a.flashvars?"&"+this.a.flashvars:""));
return{object:{type:"application/x-shockwave-flash",data:A,width:this.a.width,id:this.id,height:this.a.height,style:{margin:this.marginTop+"px "+this.marginRight+"px "+this.marginBottom+"px "+this.marginLeft+"px"},children:[{param:{name:"flashvars",value:B}},{param:{name:"wmode",value:this.a.wmode_type?this.a.wmode_type:this.DEFAULT_WMODE}},{param:{name:"allowScriptAccess",value:"always"}},{param:{name:"quality",value:this.a.quality_type?this.a.quality_type:this.DEFAULT_QUALITY}},{param:{name:"movie",value:A}}]}}
};
GoaAdvertisement.prototype._getTemplateLayer=function(){return{div:{id:this.id,style:this.layer.style}}
};
GoaAdvertisement.prototype._getTemplateLayerCloserImage=function(){return{div:{style:{position:"absolute",top:"0px",right:"4px"},children:[{a:{href:"#",title:"Bezár",onclick:this.layer.closeFunction,children:[{img:{alt:"Bezár",src:this.layer.closeImgSrc,style:{border:0}}}]}}]}}
};
GoaAdvertisement.prototype._getTemplateLayerCloserTitle=function(){return{div:{style:this.layer.titleBarStyle,children:[{a:{onclick:this.layer.closeFunction,href:"#",id:"closer"+this.bannerID,textnodes:["x"],style:{display:"block",clear:"none","float":"right",color:this.layer.titleBarStyle.color,"text-decoration":"none","font-family":"Verdana, Arial, sans-serif","font-weight":"bold","font-style":"normal","font-size":"100%"}}}],textnodes:[this.layer.title]}}
};
GoaAdvertisement.prototype._getTemplateCT=function(){return{a:{id:this.id,href:this.a.cthref,target:this.a.cttarget?this.a.cttarget:this.DEFAULT_TARGET,style:this.util.createStyleObject(this.a.style),title:this.a.alt?this.a.alt:this.DEFAULT_TITLE,textnodes:[this.a.alt]}}
};
GoaAdvertisement.prototype._getTemplateExternal=function(){return{iframe:{src:this._getExternalUrl(),scrolling:"no",id:this.id,frameBorder:0,noresize:"noresize",style:{width:this.width+"px",height:this.height+"px",border:0,margin:this.marginTop+"px "+this.marginRight+"px "+this.marginBottom+"px "+this.marginLeft+"px",padding:0}}}
};
GoaAdvertisement.prototype._getTemplateTracking=function(){return{iframe:{src:this.trackingURL,scrolling:"no",id:this.bannerID+"_tr",frameBorder:0,noresize:"noresize",style:{width:"1px",height:"1px",border:0,margin:0,padding:0,display:"none"}}}
};
GoaAdvertisement.prototype._track=function(H,E,G){if(!this.doTracking){return
}if(E){var A=this.doc.createElement("iframe");
A.id=this.bannerID+"_popcounter";
A.style.display="none";
A.src=this._getCountUrl(E);
G.appendChild(A)
}if(!H){return
}if(this.isExternalTracking){G.appendChild(this.util.buildObject(this._getTemplateTracking()));
this.log("added tracking script")
}if(this.isFreqCapped){var C=[],B="",F=new Date(),D;
if((B=this.goa.getCookie(this.id))){C=this._parseCookieData(B)
}else{C=[0,0]
}C[0]=F.valueOf();
C[1]++;
D=C.join(this.COOKIE_SPLITCHAR);
this.log("setting views in cookie");
this.goa.setCookie(this.id,D,this.COOKIE_EXPIRE)
}};
GoaAdvertisement.prototype._getCountUrl=function(A){if(A){this.log("logging campaign "+this.goalID);
return this.zone.reqParams.barbadosUrl+"/html.prm?zona="+this.zone.id+"&kampany="+this.goalID+"&banner="+this.bannerID+"&v="+A+"&pop&ord="+this.goa.ord
}else{this.log("logging campaign 1");
return this.zone.reqParams.barbadosUrl+"/html.prm?zona="+this.zone.id+"&kampany=1&ord="+this.goa.ord
}};
GoaAdvertisement.prototype.showDhtmlAd=function(){this.log("creating dhtml ad");
var C=false,D=null,B=this.b;
if(this.isPop){this.log("Banner is a popup");
if(this._createPopup(this.goa.env.opera?this.zone.reqParams.barbadosUrl+"/html.prm?zona="+this.id+"&ord="+this.goa.ord:("HTML"===this.type.toUpperCase())?this._getExternalUrl():"")){C=true;
D="p"
}}if(!C&&this.isLayer){this.log("Banner is a layer");
var A;
if((A=this._createLayer())){C=true;
D="l";
B=A
}}this._track(C,D,B)
};
GoaAdvertisement.prototype._createLayer=function(){if(!this.b){return null
}var A=this.util.buildObject(this._getTemplateLayer());
if(this.layer.closeType===this.CLOSETYPE_IMG){A.appendChild(this.util.buildObject(this._getTemplateLayerCloserImage()))
}else{if(this.layer.closeType!==this.CLOSETYPE_FLASH){A.appendChild(this.util.buildObject(this._getTemplateLayerCloserTitle()))
}}A.appendChild(this.util.buildObject(this.getTemplate()));
this.b.insertBefore(A,this.b.firstChild);
this.zone.hiddenObjects=this.goa.hideObjects(A,this.id);
if(this.layer.stayAlive>0){setTimeout("window.___goa.closeLayer('"+this.zone.id+"')",this.layer.stayAlive)
}this.zone.layer=A;
return A
};
GoaAdvertisement.prototype._createLayerCloser=function(){var A;
if(this.closeType==="img"){A=this.util.buildObject(this._getTemplateLayerCloserImage())
}else{A=this.util.buildObject(this._getTemplateLayerCloserTitle())
}return A
};
GoaAdvertisement.prototype._createPopup=function(B){var D="";
D+="width="+this.goa.pxValue(this.pop.width,false);
D+=",height="+this.goa.pxValue(this.pop.height,true);
D+=",top="+this.goa.pxValue(this.pop.posTop,true);
D+=",left="+this.goa.pxValue(this.pop.posLeft,true);
D+=",scrollbars=0";
D+=",resizable=0";
this.log("Opening window at "+B);
var C=window.open(B,"popup_"+this.banner_id,D);
if(!C){this.log("creating popup failed");
return false
}if(B===""){var F=C.document,A=F.getElementsByTagName("body")[0];
if(!A){this.error("Cannot access popup body!");
return false
}F.title=this.pop.title;
A.style.margin="0px";
A.style.padding="0px";
A.style.backgroundColor=this.pop.backgroundColor;
if(this.goa.env.ie&&this.type==="flash"){var E=this.util.buildObject(this.goa._templateScript({src:this.imghome+"/scripts/buildObject.js",type:"text/javascript",charset:"iso-8859-2"}),F);
C.creative=this.getTemplate();
A.appendChild(E)
}else{var G=this.util.buildObject(this.getTemplate(),F);
if(A&&G&&F){A.appendChild(G)
}}if(this.tracking){A.appendChild(this.util.buildObject(this._getTemplateTracking()));
this.log("added tracking script")
}}else{if(this.tracking){this.b.appendChild(this.util.buildObject(this._getTemplateTracking()));
this.log("added tracking script")
}}if(!this.pop.aggressive){window.focus()
}if(C){this.log("created popup");
return true
}this.log("creating popup failed");
return false
}
}if(!window.GoaRequestParams){var GoaRequestParams=function(B){var A=B.requestParams?B.requestParams:{};
this.invocationUrl=A.invocationUrl?A.invocationUrl:null;
this.barbadosUrl=A.barbadosUrl?A.barbadosUrl:"http://ad.adverticum.net/";
if(document.location.protocol=="https:"){this.barbadosUrl=this.barbadosUrl.replace(/^http:/,"https:")
}this.charset=A.charset?A.charset:"iso-8859-2"
}
}if(!window.GoAdverticumUtil){var GoAdverticumUtil=function(){};
GoAdverticumUtil.prototype.setOnload=function(B){var A=window.onload;
if(typeof(A)!="function"){window.onload=B
}else{window.onload=function(){A();
B()
}
}};
GoAdverticumUtil.prototype.setOnUnload=function(B){var A=window.onunload;
if(typeof(A)!="function"){window.onunload=B
}else{window.onunload=function(){A();
B()
}
}};
GoAdverticumUtil.prototype.importObject=function(C,B){if(!C||!B){return
}for(var A in C){if(C.hasOwnProperty(A)){B[A]=this.evalObj(C[A])
}}};
GoAdverticumUtil.prototype.evalObj=function(A){if(A==="false"){return false
}if(A==="true"){return true
}if(A==="null"){return null
}if(A==parseInt(A,10)){return parseInt(A,10)
}if(A.toString().match(/^\[A-Za-z0-9\]+$/)){return null
}return A
};
GoAdverticumUtil.prototype.createStyleObject=function(D){var F={};
if(!D){return F
}var B=D.split(";");
for(var C in B){if(B.hasOwnProperty(C)){var E=B[C].split(":");
if(E.length>1&&E[1]!==null){var A=E[0].replace(/^\s*/,"").replace(/\s*$/,"");
var G=E[1].replace(/^\s*/,"").replace(/\s*$/,"");
F[A]=G
}}}return F
};
GoAdverticumUtil.prototype.buildObject=function(E,L){var H,I="children",K="style",N="float",D="cssFloat",M="styleFloat",A="textnodes";
if(!L){L=document
}for(var G in E){if(E.hasOwnProperty(G)){var J=E[G];
var B=E[G][I]?E[G][I]:[];
H=L.createElement(G);
var F;
for(F=0;
F<B.length;
F++){H.appendChild(this.buildObject(B[F],L))
}for(F in J){if(F!=I){var C;
if(F==K){for(C in J[F]){if(C==N){H[F][D]=J[F][C];
H[F][M]=J[F][C]
}else{H[F][this._getJsStyleName(C)]=J[F][C]
}}}else{if(F==A){for(C=0;
C<J[F].length;
C++){H.appendChild(L.createTextNode(J[F][C]))
}}else{if(F.match(/^on/)!==null){H[F]=J[F]
}else{H.setAttribute(F,J[F])
}}}}}}}return H
};
GoAdverticumUtil.prototype._getJsStyleName=function(E){var A=E.split("-");
var D=A[0];
for(var C=1;
C<A.length;
C++){var B=A[C];
D+=B.substr(0,1).toUpperCase()+B.substr(1)
}return D
}
}if(!window.GoAdverticumZone){var GoAdverticumZone=function(A,C,B){this.goa=A;
this.util=this.goa.util;
this.d=document;
this.b=this.d.getElementsByTagName("body")[0];
this.c=document.cookie;
if(!C){this.error("Missing zoneID");
return false
}this.id=C;
this.reqParams=new GoaRequestParams(B);
this.dhtml=false;
this.displayOptions={container:"goAdverticumContainer"+this.id,labelID:"goAdverticumLabel"+this.id,displayContainer:"block",displayLabel:"block",noSpacing:false,containerClass:false,marginTop:0,marginRight:0,marginLeft:0,marginBottom:0,doSetHeight:true,doSetWidth:true};
this.marginLeft=0;
this.marginRight=0;
this.marginTop=0;
this.marginBottom=0;
this.serverRequest={};
if(B&&B.displayOptions){this.util.importObject(B.displayOptions,this.displayOptions)
}if(B&&B.elementAttributes){this.util.importObject(B.elementAttributes,this.elementAttributes)
}if(B&&B.serverRequest){this.util.importObject(B.serverRequest,this.serverRequest)
}if(B&&B.fwdParams){this.util.importObject(B.serverRequest,this.fwdParams)
}if(!this.displayOptions.container||!this.d.getElementById(this.displayOptions.container)){this.log("No zone container. Only layers/popups are available")
}else{this.log("Zone container: "+this.displayOptions.container);
this.log(this.getDOMContainer())
}this.ad=null;
this.log("zone added");
this._invocate()
};
GoAdverticumZone.prototype.log=function(A){this.goa.Log({zone:"zone "+this.id,msg:A})
};
GoAdverticumZone.prototype.error=function(B,A){this.goa.Error({zone:"zone "+this.id,msg:B})
};
GoAdverticumZone.prototype.closeLayer=function(){if(this.layer&&this.b){this.b.removeChild(this.layer);
this.goa.showObjects(this.hiddenObjects);
this.layer=null
}};
GoAdverticumZone.prototype._getInvocationUrl=function(){var B,C,A="";
if(this.reqParams.invocationUrl){return this.reqParams.invocationUrl
}B=this.reqParams.barbadosUrl+"/ad.js?zona="+this.id+"&ord="+this.goa.ord+"&re="+this.d.referrer;
for(C in this.serverRequest){if(this.serverRequest.hasOwnProperty(C)){B+="&"+C+"="+this.serverRequest[C]
}}for(C in this.fwdParams){if(this.fwdParams.hasOwnProperty(C)){A+="&"+C+"="+this.fwdParams[C]
}}if(A.length>0){B+="&fwdParams"+A
}return B
};
GoAdverticumZone.prototype._invocate=function(){if(this.displayOptions.invocateZone===false){return false
}var B={src:this._getInvocationUrl(),charset:this.reqParams.charset,type:"text/javascript"};
var A=this.util.buildObject(this.goa._templateScript(B));
this.d.getElementsByTagName("head")[0].appendChild(A);
this.log("invocated")
};
GoAdverticumZone.prototype.addBanner=function(C,B){if(!C){this.error("Missing ad data");
return
}var A=new GoaAdvertisement(C,B,this);
this.log(A);
this.marginLeft=A.a.zona_left?A.a.zona_left:0;
this.marginRight=A.a.zona_right?A.a.zona_right:0;
this.marginTop=A.a.zona_up?A.a.zona_up:0;
this.marginBottom=A.a.zona_down?A.a.zona_down:0;
A.append(this);
this.ad=A
};
GoAdverticumZone.prototype.show=function(C){this.setLabel();
var A=this.d.getElementById(this.displayOptions.container),B=A.style,D=this.displayOptions;
if(this.goa.debugMode){A.appendChild(this.util.buildObject(this.goa._templateZoneInfo({zoneID:this.id,kampany_id:C.goalID,creativeID:C.bannerID})))
}if(C.type==="ct"&&(!D.marginTop&&!D.marginLeft&&!D.marginBottom&&!D.marginRight&&!C.width&&!C.height)){B.display="inline";
return
}else{B.whiteSpace="nowrap"
}if(!D.noSpacing){if(D.marginTop){B.marginTop=D.marginTop+"px"
}if(D.marginRight){B.marginRight=D.marginRight+"px"
}if(D.marginBottom){B.marginBottom=D.marginBottom+"px"
}if(D.marginLeft){B.marginLeft=D.marginLeft+"px"
}}if(D.doSetWidth&&C.width){B.width=C.totalWidth+"px"
}if(D.doSetHeight&&C.height){B.height=C.totalHeight+"px"
}if(D.containerClass){A.className=D.containerClass
}B.display=this.displayOptions.displayContainer
};
GoAdverticumZone.prototype.setLabel=function(){if(this._getDOMLabel()){this._getDOMLabel().style.display=this.displayOptions.displayLabel
}};
GoAdverticumZone.prototype._getDOMLabel=function(){return this.d.getElementById(this.displayOptions.labelID)
};
GoAdverticumZone.prototype.getDOMContainer=function(){return this.d.getElementById(this.displayOptions.container)
};
GoAdverticumZone.prototype.showDhtmlAd=function(){this.ad.showDhtmlAd()
}
}if(!window.GoAdverticumClass){var GoAdverticumClass=function(){this.start=new Date();
this.buildID="___goa v107.b520";
this.w=window;
this.d=document;
this.b=this.d.getElementsByTagName("body")[0];
this.c=this.d.cookie;
this.util=new GoAdverticumUtil();
this.debugMode=this._isDebugMode();
if(this.debugMode){this.util.setOnload(new Function("window.___goa.showLog()"))
}this.ord=this._getOrd();
this.zones=[];
this.hiddenObjects=[];
this.logs=[];
this.errors=[];
this.env=this._getEnv();
this.log(this.buildID+" loaded")
};
GoAdverticumClass.prototype._getEnv=function(){var UNDEF="undefined",OBJECT="object",SHOCKWAVE_FLASH="Shockwave Flash",SHOCKWAVE_FLASH_AX="ShockwaveFlash.ShockwaveFlash",FLASH_MIME_TYPE="application/x-shockwave-flash",win=window,doc=this.d,nav=navigator,w3cdom=typeof doc.getElementById!=UNDEF&&typeof doc.getElementsByTagName!=UNDEF&&typeof doc.createElement!=UNDEF,playerVersion=[0,0,0],s=self,b=this.b,d=this.d.documentElement,frameWidth=s.innerWidth?s.innerWidth:d&&d.clientWidth?d.clientWidth:b?b.clientWidth:1024,frameHeight=s.innerHeight?s.innerHeight:d&&d.clientHeight?d.clientHeight:b?b.clientHeight:768;
if(typeof nav.plugins!=UNDEF&&typeof nav.plugins[SHOCKWAVE_FLASH]==OBJECT){d=nav.plugins[SHOCKWAVE_FLASH].description;
if(d&&!(typeof nav.mimeTypes!=UNDEF&&nav.mimeTypes[FLASH_MIME_TYPE]&&!nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)){d=d.replace(/^.*\s+(\S+\s+\S+$)/,"$1");
playerVersion[0]=parseInt(d.replace(/^(.*)\..*$/,"$1"),10);
playerVersion[1]=parseInt(d.replace(/^.*\.(.*)\s.*$/,"$1"),10);
playerVersion[2]=/r/.test(d)?parseInt(d.replace(/^.*r(.*)$/,"$1"),10):0
}}else{if(typeof win.ActiveXObject!=UNDEF){var a=null,fp6Crash=false;
try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".7")
}catch(e){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".6");
playerVersion=[6,0,21];
a.AllowScriptAccess="always"
}catch(e1){if(playerVersion[0]==6){fp6Crash=true
}}if(!fp6Crash){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX)
}catch(e2){}}}if(!fp6Crash&&a){try{d=a.GetVariable("$version");
if(d){d=d.split(" ")[1].split(",");
playerVersion=[parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10)]
}}catch(e3){}}}}var u=nav.userAgent.toLowerCase(),p=nav.platform.toLowerCase(),an=nav.appName.toLowerCase(),webkit=/webkit/.test(u)?parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,ie=false,windows=p?/win/.test(p):/win/.test(u),mac=p?/mac/.test(p):/mac/.test(u),opera=an?/opera/.test(an):false;
/*@cc_on
			ie = true;
			@if (@_win32)
				windows = true;
			@elif (@_mac)
				mac = true;
			@end
		@*/
return{w3cdom:w3cdom,pv:playerVersion,webkit:webkit,ie:ie,win:windows,mac:mac,opera:opera,width:frameWidth,height:frameHeight}
};
GoAdverticumClass.prototype._getOrd=function(){var A="";
for(var B=0;
B<6;
B++){A+=String.fromCharCode(Math.round(Math.random()*24)+97);
A+=Math.round(Math.random()*9);
A+=String.fromCharCode(Math.round(Math.random()*24)+65)
}return A
};
GoAdverticumClass.prototype._isDebugMode=function(){return("${goa.debugmode}"==="true"||(location.search&&location.search.toString().match(/goadebug/))||window.goAdverticumDebugMode)
};
GoAdverticumClass.prototype.closeLayer=function(B){var A=this._getZone(B);
A.closeLayer()
};
GoAdverticumClass.prototype.showDhtmlAd=function(B){var A=this._getZone(B);
if(A){A.showDhtmlAd()
}};
GoAdverticumClass.prototype.pxValue=function(B,A){if(null===B){return 0
}else{if(B.toString().match("%")){if(A){return Math.floor(this.env.height/100*parseInt(B,10))
}else{return Math.floor(this.env.width/100*parseInt(B,10))
}}else{return parseInt(B,10)
}}};
GoAdverticumClass.prototype.adData=function(A,B){this.log("got adData ("+A.type+"/"+A.banner_id+") for zone "+A.zona);
this.log(A);
this.log(B);
if(!A||!A.zona||!this._getZone(A.zona)){this.error("missing or bad zone");
return
}this._getZone(A.zona).addBanner(A,B);
return true
};
GoAdverticumClass.prototype._getZone=function(B){if(!this.zones||this.zones.length===0){this.log("No zones yet "+B);
return null
}for(var A=0;
A<this.zones.length;
A++){if(this.zones[A].id==B){return this.zones[A]
}}};
GoAdverticumClass.prototype._getZoneData=function(){var A=[],E,G,C,D,B;
var F=["goAdverticumZones","goAdverticumDhtmlZones","___goaZones"];
for(D=0;
D<F.length;
D++){if(typeof window[F[D]]==="object"){this.log("processing "+F[D]+" "+window[F[D]]);
E=window[F[D]].slice(0);
window[F[D]]=[];
for(B=0;
B<E.length;
B++){A[A.length]=E[B]
}}}this.log("all zones:"+A);
return A
};
GoAdverticumClass.prototype.processZoneData=function(){var B=this._getZoneData();
this.log("zones");
this.log(B);
if(!B||!(typeof(B)==="object")||!B.length===0){this.log("no cached zone to process");
return
}this.log("processing zones "+B);
var A;
while((A=B.shift())){if(A.length>1){this.addZone(A[0],A[1])
}else{this.addZone(A[0])
}}};
GoAdverticumClass.prototype.processAdData=function(B){this.log("processing data");
if(null===B){B=window.goAdverticumData
}var A;
while(typeof B==="object"&&(A=B.shift())){if(A.length>1){this.adData(A[0],A[1])
}else{this.adData(A[0])
}}};
GoAdverticumClass.prototype.addZone=function(D,C){for(var B=0;
B<this.zones.length;
B++){if(this.zones[B].id==D){this.Error({zone:"global",msg:"Duplicate zone: "+D});
return
}}if(!this._getZone(D)){var A=new GoAdverticumZone(this,D,C)
}else{this.log("Tried to add zones more than once")
}if(A){this.zones[this.zones.length]=A
}};
GoAdverticumClass.prototype.log=function(A){this.Log({msg:A})
};
GoAdverticumClass.prototype.error=function(A){this.Error({msg:A})
};
GoAdverticumClass.prototype.Error=function(A){this._log(A,"error")
};
GoAdverticumClass.prototype.appendLog=function(A){if(window.console){if(A.error){console.error("[",A.zone,"] ",A.time,"ms",A.msg)
}else{console.info("[",A.zone,"] ",A.time,"ms",A.msg)
}}else{this.logWindow.appendChild(this.util.buildObject(this._templateLogEntry(A),this.logD))
}};
GoAdverticumClass.prototype._log=function(A,D){if(!this.debugMode){return
}var B=new Date();
var C={zone:A.zone?A.zone:"",msg:A.msg,time:B.valueOf()-this.start.valueOf(),error:("error"===D)};
this.logs[this.logs.length]=C;
if(this._isLogVisible){this.appendLog(C)
}};
GoAdverticumClass.prototype.Log=function(A){this._log(A,"info")
};
GoAdverticumClass.prototype._createLog=function(){if(!this.debugMode){return
}if(window.console){return
}this.logWindow=this.util.buildObject(this._templateLogWindow());
this.b.appendChild(this.logWindow)
};
GoAdverticumClass.prototype.showLog=function(){this._isLogVisible=true;
if(!window.console){this._createLog()
}var A;
for(A=0;
A<this.logs.length;
A++){this.appendLog(this.logs[A])
}};
GoAdverticumClass.prototype.setCookie=function(E,D,C){var B=new Date();
var A=new Date();
if(C===null||C===0){C=36000
}A.setTime(B.getTime()+C);
this.log("Setting cookie");
this.log(D);
document.cookie=E+"="+encodeURIComponent(D)+";expires="+A.toGMTString()+";path=/";
this.log(document.cookie)
};
GoAdverticumClass.prototype.getCookie=function(B){var A=this.c.indexOf(B+"=");
if(A==-1){return null
}A=this.c.indexOf("=",A)+1;
var C=this.c.indexOf(";",A);
if(C==-1){C=this.c.length
}return decodeURIComponent(this.c.substring(A,C))
};
GoAdverticumClass.prototype.hideObjects=function(H,G){var C=[];
var D=["select","object","iframe","embed"];
for(var B=0;
B<D.length;
B++){var E=this.d.getElementsByTagName(D[B]);
for(var A=0;
A<E.length;
A++){var F=E[A];
if((F.id!=G&&this._isOverlapping(F,H))&&(F.style.display!="none")){this.hiddenObjects.push(F);
C.push(F);
F.style.visibility="hidden";
this.log("hid "+D[B]+" ("+F.id+")")
}}}return C
};
GoAdverticumClass.prototype.showObjects=function(C){for(var A=0;
A<C.length;
A++){var B=C[A];
if(this.findIn(B,this.hiddenObjects)==1){B.style.visibility="visible"
}this.removeFrom(B,1)
}};
GoAdverticumClass.prototype.removeFrom=function(B,E){var A=0;
var D=0;
var C=[];
while(this.hiddenObjects&&(A<this.hiddenObjects.length)&&(D<E)){if(this.hiddenObjects[A]==B){C.push(this.hiddenObjects.splice(A,1));
D++
}else{A++
}}return C
};
GoAdverticumClass.prototype.findIn=function(B,C){var D=0;
for(var A=0;
A<C.length;
A++){if(C[A]==B){D++
}}return D
};
GoAdverticumClass.prototype._isOverlapping=function(D,C){var B=[this.findPosX(D),this.findPosY(D),this.findPosX(D)+D.offsetWidth,this.findPosY(D)+D.offsetHeight];
var A=[this.findPosX(C),this.findPosY(C),this.findPosX(C)+C.offsetWidth,this.findPosY(C)+C.offsetHeight];
return this.checkBoxes(B,A)
};
GoAdverticumClass.prototype.checkBoxes=function(B,A){if(B[3]<=A[1]){return false
}if(B[2]<=A[0]){return false
}if(A[3]<=B[1]){return false
}if(A[2]<=B[0]){return false
}return true
};
GoAdverticumClass.prototype.findPosX=function(A){var B=0;
if(A.offsetParent){while(A.offsetParent){B+=A.offsetLeft;
A=A.offsetParent
}}else{if(A.x){B+=A.x
}}return Math.round(parseInt(B,10))
};
GoAdverticumClass.prototype.findPosY=function(B){var A=0;
if(B.offsetParent){while(B.offsetParent){A+=B.offsetTop;
B=B.offsetParent
}}else{if(B.y){A+=B.y
}}return Math.round(parseInt(A,10))
};
GoAdverticumClass.prototype._templateScript=function(A){return{script:{type:A.type,charset:A.charset,src:A.src}}
};
GoAdverticumClass.prototype._templateLogEntry=function(A){return{div:{style:{"padding-top":"3px","padding-bottom":"3px",margin:"5px","border-bottom":"1px dashed #FFAA55","background-color":A.error?"red":""},children:[{span:{style:{"margin-left":"5px",display:"block",clear:"none","float":"left"},textnodes:[A.time]}},{span:{style:{"margin-left":"5px",display:"block",clear:"none","float":"left"},textnodes:[A.zone]}},{span:{style:{"margin-left":"5px",display:"block",clear:"none","float":"left"},textnodes:[A.msg]}},{span:{style:{clear:"left",display:"block"},textnodes:[""]}}]}}
};
GoAdverticumClass.prototype._templateLogWindow=function(){return{div:{id:"goAdverticumLogWindow",style:{"font-family":"Lucida Console","font-size":"10px","background-color":"#FFF0E1",color:"#000000","z-index":"0"},children:[{div:{style:{color:"white","background-color":"black","line-height":"16px","padding-left":"5px"},textnodes:[this.buildID+" debug info ("+this.start+")"]}}]}}
};
GoAdverticumClass.prototype._templateZoneInfo=function(A){return{div:{style:{"background-color":"#FF870F","font-family":"Lucida Console","font-size":"10px",color:"#000000"},textnodes:["z:",A.zoneID,", c: ",A.kampany_id,", b: ",A.creativeID]}}
}
}if(!window.___goa){window.___goa=new GoAdverticumClass();
window.__goaRef="___goa";
window.___goa.processZoneData();
if(typeof window.goAdverticumZones!=="undefined"){window.goAdverticum=window.___goa;
window.___goa.processAdData(window.goAdverticumData)
}if(typeof window.goAdverticumDhtmlZones!=="undefined"){window.goAdverticumDhtml=window.___goa;
window.___goa.processAdData(window.goAdverticumDhtmlData)
}if(typeof window.___goaZones!=="undefined"){window.___goa.processAdData(window.___goaData)
}};
