var SIMAD={VERSION:"2.2.2",config:function(a){return this.CmsAdapter.config(a)},init:function(){return this.CmsAdapter.init()},preInit:function(){return this.CmsAdapter.preInit()},postInit:function(){return this.CmsAdapter.postInit()},doAd:function(a,b){return this.CmsAdapter.doAd(a,b)},finalize:function(){return this.CmsAdapter.finalize()},reloadAds:function(a){return this.CmsAdapter.reloadAds(a)},getVideoAdRequest:function(a){return this.CmsAdapter.getVideoAdRequest(a)},getAd:function(a){return this.CmsAdapter.getAd(a)},getAds:function(a){return this.CmsAdapter.getAds(a)},addAd:function(a){return this.CmsAdapter.addAd(a)},updateConfig:function(a){return this.CmsAdapter.updateConfig(a)},getConfig:function(){return this.CmsAdapter.getConfig()},hideAds:function(){return this.CmsAdapter.hideAds()},showAds:function(){return this.CmsAdapter.showAds()},newSession:function(a){return SIMAD.CmsAdapter.newSession(a)},closeSession:function(a){return SIMAD.CmsAdapter.closeSession(a)},bindEvent:function(a,c,b){return SIMAD.CmsAdapter.bindEvent(a,c,b)},unbindEvent:function(a,b){return SIMAD.CmsAdapter.unbindEvent(a,b)},debug:function(a,b){switch(a){case"warn":SIMAD.Log.warn(b);break;case"error":SIMAD.Log.error(b);break;case"log":default:SIMAD.Log.log("log",b);break}},error:function(a){this.debug("error",a)},getAdInIFrame:function(){return SIMAD.CmsAdapter.getAdInIFrame()},pre:function(){return this.preInit()},post:function(){if(!this.__postSteps){this.__postSteps=[];this.__postStepCounter=0;var h=SIMAD.Core.$s;var e=0;for(var g in h.adServerAdapters){if(h.adServerAdapters[g].settings.initFunctions){var n=[];for(var f in h.adServerAdapters[g].settings.initFunctions){n.push(h.adServerAdapters[g].settings.initFunctions[f].length)}e=e+SIMAD.Util.max(n)}}for(var c=0;c<e;c++){this.__postSteps.push({func:this.postInit})}var b=SIMAD.Core.getAds();b=SIMAD.Core.sortAds(b);for(var d=0;d<b.length;d++){this.__postSteps.push({func:SIMAD.doAd,args:[b[d].getId(),SIMAD.Rendering.OUTOFSLOT_BEGIN]});this.__postSteps.push({func:SIMAD.doAd,args:[b[d].getId(),SIMAD.Rendering.OUTOFSLOT_END]})}this.__postSteps.push({func:this.finalize})}if(typeof(this.__postSteps[this.__postStepCounter])!=="undefined"){var a=this.__postSteps[this.__postStepCounter];var m=a.args||[];if(typeof(a.func)==="function"){a.func.apply(this,m)}this.__postStepCounter++}}};if(typeof SIMAD==="undefined"){SIMAD={}}SIMAD.Util={extend:function(){var f=arguments[0]||{},d=1,e=arguments.length,a=false,c;if(typeof f==="boolean"){a=f;f=arguments[1]||{};d=2}if(typeof f!=="object"&&typeof f!=="function"){f={}}if(e==d){f=this;--d}for(;d<e;d++){if((c=arguments[d])!=null){for(var b in c){var g=f[b],h=c[b];if(f===h){continue}if(a&&h&&typeof h==="object"&&!h.nodeType){f[b]=SIMAD.Util.extend(a,g||(h.length!=null?[]:{}),h)}else{if(h!==undefined){f[b]=h}}}}}return f},unique:function(g){var b=[],a={};try{for(var c=0,d=g.length;c<d;c++){if(!a[g[c]]){a[g[c]]=true;b.push(g[c])}}}catch(f){b=g}return b},max:function(c){var a;for(var b=0;b<c.length;b++){if(a===undefined||c[b]>a){a=c[b]}}return a},filter:function(d,c){var a=[];for(var b in d){if(d.hasOwnProperty(b)){if(typeof(c)==="function"){if(c(d[b])){a.push(d[b])}}else{a.push(d[b])}}}return a},includeJS:function(b,c){var a='<script src="'+b+'" type="text/javascript"><\/script>';if(!c){document.write(a)}return a},inArray:function(c,b){for(var a=0;a<c.length;a++){if(b==c[a]){return true}}return false},indexInArray:function(c,b){for(var a=0;a<c.length;a++){if(b===c[a]){return a}}return -1},wrapScript:function(a){return'<script language="JavaScript" type="text/javascript">'+a+"<\/script>"},getLength:function(e){var c=0;for(var d in e){if(e.hasOwnProperty(d)){c++}}return c},joinObjects:function(d,h,g,f){var e=true;var a=[];if(d&&h){for(var b=0;b<d.length;b++){var c;if(typeof d[b][h]==="function"){c=d[b][h]()}else{c=d[b][h]}if(typeof f==="function"){c=f(c)}if(c){a.push(c)}}}return a.join(g)},browser:{version:(navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(navigator.userAgent.toLowerCase()),opera:/opera/.test(navigator.userAgent.toLowerCase()),msie:/msie/.test(navigator.userAgent.toLowerCase())&&!/opera/.test(navigator.userAgent.toLowerCase()),mozilla:/mozilla/.test(navigator.userAgent.toLowerCase())&&!/(compatible|webkit)/.test(navigator.userAgent.toLowerCase())},htmlEntities:function(a){if(typeof a==="string"){return a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}return a},toJSON:function(c){var m=typeof(c);if(c===null){return"null"}if(m=="undefined"){return undefined}if(m=="number"||m=="boolean"){return c+""}if(m=="string"){return this.quoteString(c)}if(m=="object"){if(c.constructor===Date){var l=c.getUTCMonth()+1;if(l<10){l="0"+l}var p=c.getUTCDate();if(p<10){p="0"+p}var n=c.getUTCFullYear();var q=c.getUTCHours();if(q<10){q="0"+q}var f=c.getUTCMinutes();if(f<10){f="0"+f}var r=c.getUTCSeconds();if(r<10){r="0"+r}var h=c.getUTCMilliseconds();if(h<100){h="0"+h}if(h<10){h="0"+h}return'"'+n+"-"+l+"-"+p+"T"+q+":"+f+":"+r+"."+h+'Z"'}if(c.constructor===Array){var j=[];for(var g=0;g<c.length;g++){j.push(this.toJSON(c[g])||"null")}return"["+j.join(",")+"]"}var b=[];for(var e in c){var a;var m=typeof e;if(m=="number"){a='"'+e+'"'}else{if(m=="string"){a=this.quoteString(e)}else{continue}}if(typeof c[e]=="function"){continue}var d=this.toJSON(c[e]);b.push(a+":"+d)}return"{"+b.join(", ")+"}"}},quoteString:function(b){var a={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};var c=/["\\\x00-\x1f\x7f-\x9f]/g;if(b.match(this.__escapeable)){return'"'+b.replace(c,function(d){var e=a[d];if(typeof e==="string"){return e}e=d.charCodeAt();return"\\u00"+Math.floor(e/16).toString(16)+(e%16).toString(16)})+'"'}return'"'+b+'"'},strToBool:function(a){switch(a.toLowerCase()){case"true":return true;case"false":return false;default:return Boolean(a)}},getLocationParams:function(){var b=window.location.search;var a={};if(b){b=b.substring(1);b.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(d,c,e){if(c){a[c]=e}})}return a}};if(typeof SIMAD!=="undefined"){SIMAD.Loading={INSTREAM:"INSTREAM",POSTSTREAM:"POSTSTREAM",ONEVENT:"ONEVENT",INDIVIDUAL:"INDIVIDUAL"};SIMAD.Format={FULLBANNER:"FULLBANNER",SKYSCRAPER:"SKYSCRAPER",MEDIUMRECTANGLE:"RECTANGLE",POPUP:"POPUP",PERFORMANCEBOX1:"PERFORMANCEBOX1",ADSENSETEXT:"ADSENSETEXT",MAXIAD:"MAXIAD",WALLPAPER:"WALLPAPER",POWERLAYER:"POWERLAYER",POWERBANNER:"POWERBANNER",POWERRECTANGLE:"POWERRECTANGLE",POPUP_WINDOW:"POPUP_WINDOW"};SIMAD.AdTag=SIMAD.Format;SIMAD.ContentType={DEFAULT:"DEFAULT",HOME:"HOME",PAGE:"PAGE",VIDEO_OVERVIEW:"VIDEO_OVERVIEW",VIDEO:"VIDEO",RICH_VIDEO:"RICH_VIDEO",GALLERY:"GALLERY",GALLERY_IMAGE:"GALLERY_IMAGE",GAME:"GAME",SHOP:"SHOP",RAFFLE:"RAFFLE",COMMUNITY:"COMMUNITY",ERROR:"ERROR",MCCONTENT:"VIDEO_OVERVIEW",MCPLAYER:"RICH_VIDEO",CPPLAYER:"VIDEO"};SIMAD.Rendering={INSLOT_BEGIN:"inSlotBegin",INSLOT_END:"inSlotEnd",OUTOFSLOT_BEGIN:"outOfSlotBegin",OUTOFSLOT_END:"outOfSlotEnd"}}if(typeof(SIMAD)!=="undefined"){SIMAD.Core={$s:null,defaults:{adServers:[],adServerAdapters:{},adFree:false,brand:"",subchannel1:"",subchannel2:"",subchannel3:"",subchannel4:"",subchannel5:"",breadcrumb:"",adServerSpecific:{},cmsSpecific:{},ads:{},dynamicAds:{},isSingleAdSession:false,debug:{all:false}},data:{sessions:[]},inIFrame:false,adInIFrame:null,__locationParams:null,__loadingOrder:[],__initializingOrder:[],__initBlockCompleted:false,__reloadAdsRotation:{ads:[],running:false,currentIndex:-1},__domCheck:{containerId:"SIMAD_domSafe",containerRendered:false},__eventListener:{onAdReloadFinished:[],onConfigFinished:[]},config:function(c){this.newSession(c);if(this.getLocationParams().simad_debug_all!==undefined){this.$s.debug.all=SIMAD.Util.strToBool(this.getLocationParams().simad_debug_all)}if(this.getLocationParams().simad_adfree!==undefined){this.$s.adFree=this.getLocationParams().simad_adfree}if(this.$s.adServers===undefined){this.$s.adServers=[]}var b=this.getUsedAdServersFor(this.getAds());this.$s.adServers=SIMAD.Util.unique(b.concat(this.$s.adServers));for(var a=0;a<this.$s.adServers.length;a++){if(SIMAD.AdServerAdapter[this.$s.adServers[a]]){this.$s.adServerAdapters[this.$s.adServers[a]]=SIMAD.AdServerAdapter[this.$s.adServers[a]].config()}else{SIMAD.Log.error("The adserver adapter "+this.$s.adServers[a]+" is not available")}}this.triggerEvent("onConfigFinished");return true},configInIFrame:function(){if(parent.SIMAD){this.data=parent.SIMAD.Core.data;this.$s=parent.SIMAD.Core.$s;this.inIFrame=true;this.adInIFrame=this.getAd(this.getLocationParams().ad_id);if(this.adInIFrame){var a=this.getAdServerAdapterFor(this.adInIFrame);if(a){a.config()}else{SIMAD.Log.error("The adserver adapter for the ad "+this.adInIFrame.getId()+" is not available")}}else{SIMAD.Log.error("The ad in iframe can't be found. ad_id in location is "+this.getLocationParams().ad_id)}}else{SIMAD.Log.error("The configInIFrame was called but the master in undefined...")}},preInit:function(){this.init("pre")},postInit:function(){this.init("post")},init:function(c){if(SIMAD.Util.browser.msie&&!this.__domCheck.containerRendered){if(!document.getElementById(this.__domCheck.containerId)){document.write('<div id="'+this.__domCheck.containerId+'" style="display:none"></div>')}this.__domCheck.containerRendered=true}if(!this.$s.adFree){if(!this.inIFrame){for(var a in this.$s.adServerAdapters){this.$s.adServerAdapters[a].init(c)}}else{var b=this.getAdServerAdapterFor(this.adInIFrame);if(b){b.init(c)}}}},reloadAds:function(d){d=SIMAD.Util.extend({ads:[],force:true},d);if(!this.$s.adFree){if(!(d.ads.length>0&&this.__reloadAdsRotation.running)&&!(this.__reloadAdsRotation.running&&!d.force)){SIMAD.Log.log("Adreload","Start the reload rotation");var g=this.isDOMSafe();var m=this;if(g===-1){SIMAD.Log.error("Impossible to reload the ads. The DOM is not ready.");return}else{if(g===0){setTimeout(function(){m.reloadAds(d)},50);return}}SIMAD.Log.log("Adreload","DOM is ready");var l=[];if(d.ads.length>0){var h=[];for(var k=0;k<d.ads.length;k++){if(this.getAd(d.ads[k])){h.push(this.getAd(d.ads[k]))}else{SIMAD.Log.warn("Ad with the id "+d.ads[k]+" doesn't exist.")}}this.newSession();for(var f=0;f<h.length;f++){this.addAd(h[f])}var m=this;this.bindEvent("onAdReloadFinished","groupAdReload",function(a){SIMAD.closeSession(true);SIMAD.unbindEvent("onAdReloadFinished","groupAdReload")})}l=this.getAds(function(a){return a.isActive()});l=this.sortAds(l);this.$s.sessionId=this.getSessionId(true);SIMAD.Log.log("Adreload","Set new session");var b=this.getUsedAdServersFor(l);for(var f=0;f<b.length;f++){if(this.$s.adServerAdapters[b[f]]&&typeof(this.$s.adServerAdapters[b[f]].reloadAds)==="function"){l=this.$s.adServerAdapters[b[f]].reloadAds(l)}}SIMAD.Log.log("Adreload","Reload following ads",l);for(var e=0;e<l.length;e++){var c=this.getReloaderFor(l[e]);if(c){c.clean(l[e])}else{SIMAD.Log.warn("Can't find the reloader for the ad",l[e].getId())}}if(this.__reloadAdsRotation.running){SIMAD.Log.warn("reloadAd() is called while one reload rotation is still running.")}this.__reloadAdsRotation={ads:l,running:true,currentIndex:-1};this.reloadNextAd()}}else{this.triggerEvent("onAdReloadFinished")}},reloadNextAd:function(){if(!this.$s.adFree){if(this.__reloadAdsRotation.running&&this.__reloadAdsRotation.ads[this.__reloadAdsRotation.currentIndex+1]){this.__reloadAdsRotation.currentIndex++;var b=this.__reloadAdsRotation.ads[this.__reloadAdsRotation.currentIndex];var a=this.getReloaderFor(b);a.reloadAd(b);return true}else{this.__finishAdReload()}return false}},addAd:function(b){if(!this.$s.ads){this.$s.ads={}}if(b){if(this.getAd(b.getId())!==undefined){SIMAD.Log.warn("The ad with id "+b.getId()+" is already exists.");return this.getAd(b.getId())}else{this.$s.ads[b.getId()]=b;this.__initializingOrder.push(b);SIMAD.Util.unique(this.__initializingOrder);var a=this;b.bindEvent("onRendered","core",function(c){a.__completeAd(c.calledFromAd)});return b}}return undefined},getAd:function(a){if(this.$s.ads){if(a!==undefined){return this.$s.ads[a]}else{SIMAD.Log.error("The id passed to function getAd() is not valid.")}}else{SIMAD.Log.warn("Trying to rich the ad with the id "+a+", but the ads array is not yet initialized. How can it be?")}return undefined},getAds:function(a){return SIMAD.Util.filter(this.$s.ads,a)},sortAds:function(b){if(b&&b.length>0){var a=this;b.sort(function(e,d){return SIMAD.Util.indexInArray(a.__initializingOrder,e)-SIMAD.Util.indexInArray(a.__initializingOrder,d)});b.sort(function(e,d){return SIMAD.Util.indexInArray(a.__loadingOrder,e)-SIMAD.Util.indexInArray(a.__loadingOrder,d)});for(var c in this.$s.adServerAdapters){b=this.$s.adServerAdapters[c].sortAds(b)}}return b},getConfig:function(){var a=SIMAD.Util.extend({},this.$s);delete a.adServerAdapters;delete a.ads;delete a.sessionId;delete a.isSingleAdSession;return a},updateConfig:function(a){if(a){if(a.adServerAdapters){delete a.adServerAdapters}if(a.ads){delete a.ads}if(a.sessionId){delete a.sessionId}if(a.isSingleAdSession){delete a.isSingleAdSession}if(this.$s){if(a.video){delete this.$s.video}if(a.dynamicAds&&a.dynamicAds.exceptOf){delete this.$s.dynamicAds.exceptOf}if(a.channel){var c=["channel","subchannel1","subchannel2","subchannel3","subchannel4","subchannel5"];for(var b=0;b<c.length;b++){if(a[c[b]]){this.$s[c[b]]=a[c[b]]}else{this.$s[c[b]]=undefined}}}SIMAD.Util.extend(true,this.$s,a)}else{SIMAD.Log.error("The updateConfig() function can't be called until the SIMAD is initializied with config() call.")}}return SIMAD},getVideoAdRequest:function(b){var a;if(this.$s.video.__adServer!==undefined&&this.$s.adServerAdapters[this.$s.video.__adServer]){a=this.$s.adServerAdapters[this.$s.video.__adServer].getVideoAdRequest(b)}else{a=""}return a},hideAd:function(a){if(a&&a.getWrapper()&&a.getWrapper()!==null&&typeof(a.getWrapper())==="object"){a.getWrapper().style.display="none"}a.setVisibility(false);return a},showAd:function(a){if(a&&a.getWrapper()&&a.getWrapper()!==null&&typeof(a.getWrapper())==="object"){a.getWrapper().style.display="inline"}a.setVisibility(true);return a},hideAds:function(){var b=this.getAds();for(var a=0;a<b.length;a++){b[a].hide()}return SIMAD},showAds:function(){var b=this.getAds();for(var a=0;a<b.length;a++){b[a].show()}return SIMAD},clearAd:function(b){if(b){if(b.isReloaded()){var a=this.getReloaderFor(b);if(a){a.clean(b)}else{SIMAD.Log.warn("Can't find the reloader for the ad ",b.getId())}}else{var c=b.getWrapper();if(c){c.innerHTML=""}}}return this},deleteAd:function(d,c){c=c||false;var b=this.getAd(d.getId());if(b){var a=b.getId();if(!c){this.clearAd(b)}if(this.$s.ads[a]){delete this.$s.ads[a]}if(this.$s.isSingleAdSession){this.$s.isSingleAdSession=false;this.closeSession();if(this.getAd(a)){this.deleteAd(this.getAd(a))}}}return this},newSession:function(e){var b={};var a={};if(this.$s!==null){b=this.getConfig();a=this.$s.adServerAdapters}b=SIMAD.Util.extend(true,b,e);var d=(typeof(b.ads)!=="undefined"&&typeof(b.ads.length)==="number")?b.ads.slice():[];delete b.ads;if(this.__abortAdReload()){SIMAD.Log.warn("Adreload was aborded by the new session")}this.data.sessions.push(SIMAD.Util.extend(true,{},this.defaults,b));this.$s=this.data.sessions[this.data.sessions.length-1];if(d){for(var c=0;c<d.length;c++){this.addAd(new SIMAD.Ad(d[c]))}}this.$s.sessionId=this.getSessionId(true);this.$s.adServerAdapters=a;return this},closeSession:function(c){SIMAD.Log.log("Core","close the session with ID"+this.getSessionId());if(this.data.sessions.length>1){var b=this.getAds();if(!c){for(var a=0;a<b.length;a++){b[a].del()}}if(this.__abortAdReload()){SIMAD.Log.warn("Aborting the Adreload before closing the session")}this.data.sessions.pop();this.$s=this.data.sessions[this.data.sessions.length-1]}return this},loadAd:function(c){var a;var b=this.getAd(c.getId());if(b){a=b;this.newSession();this.addAd(a);this.$s.isSingleAdSession=true;this.reloadAds()}return this},bindEvent:function(a,e,d){SIMAD.Log.log("Core Event","binding event "+a+" with id="+e+" to the core");if(typeof(this.__eventListener[a])!=="undefined"){if(typeof(d)==="function"&&typeof(e)==="string"){var g=SIMAD.Util.filter(this.__eventListener[a],function(h){h.eventId===e});var f={eventId:e,eventFunction:d,caller:SIMAD};if(g.length>0){var b=0;for(var c=0;c<this.__eventListener[a].length;c++){if(this.__eventListener[a][c].eventId===e){b=c}}this.__eventListener[a][b]=f}else{this.__eventListener[a].push(f)}}else{SIMAD.Log.warn("Core Event: to bind event function: "+d+" with the eventId="+e+"   is impossible. Please Check datatypes.")}}else{SIMAD.Log.warn("Core Event: the event  "+a+" is not supported in core.")}},unbindEvent:function(a,d){SIMAD.Log.log("Core Event","unbind event "+a+" with eventId="+d+" from the core");if(typeof(this.__eventListener[a])!=="undefined"&&typeof(d)==="string"){var c=-1;for(var b=0;b<this.__eventListener[a].length;b++){if(this.__eventListener[a][b].eventId===d){c=b}}if(c>=0){this.__eventListener[a].splice(c,1)}else{SIMAD.Log.info("Core Event","event "+a+" with the eventId="+d+" dosn't exist and cannot be unbinded");return false}}else{SIMAD.Log.warn("Core Event: unbinding the event "+a+" with the eventId: "+d+" in core is not possible. Please check datatypes.");return false}return true},triggerEvent:function(a){SIMAD.Log.log("Core Event","triggerEvent "+a+" for the core");if(typeof this.__eventListener[a]!=="undefined"){var c=this.__eventListener[a].slice();for(var b=0;b<c.length;b++){if(typeof(c[b].eventFunction)==="function"){c[b].eventFunction(c[b])}}}else{SIMAD.Log.warn("the event "+a+" in core is not supported");return false}return true},getSessionId:function(a){if(!this.$s.sessionId||a){this.$s.sessionId=String(Math.random()).substring(2,11);SIMAD.Log.log("Core","Generated new session id",this.$s.sessionId)}return this.$s.sessionId},getTLD:function(){if(typeof(this.$s.domain==="string")){var a=this.$s.domain.split(".");return a[a.length-1]}return undefined},getCurrentSession:function(){return this.$s},getLocationParams:function(){if(!this.__locationParams){this.__locationParams=SIMAD.Util.getLocationParams()}return this.__locationParams},getRendererFor:function(b){var c=undefined;if(b){var a={};a[SIMAD.Loading.POSTSTREAM]=SIMAD.Renderer.PoststreamRenderer;a[SIMAD.Loading.INSTREAM]=SIMAD.Renderer.InstreamRenderer;if(this.inIFrame){if(!b.isActive()){SIMAD.Log.warn("Trying to render inactive ad in the frame. The inactive ads must be ignored at the ad reload.")}c=SIMAD.Renderer.IFrameRenderer}else{if(!b.isActive()){c=SIMAD.Renderer.OnEventRenderer}else{c=a[b.getLoading()]}}if(!c){SIMAD.Log.error("The render for the method "+b.getLoading()+" in the mapping of the function getRendererFor() (in the Core) is not defined")}}return c},getReloaderFor:function(c){var a;var b=this.getAdServerAdapterFor(c);if(b&&typeof(b.getReloaderFor)==="function"){a=b.getReloaderFor(c)}if(a===undefined){return SIMAD.Reloader.ReplacementFrameReloader}return a},getAdServerAdapterFor:function(b){var a;if(this.inIFrame&&b===this.adInIFrame&&b){a=SIMAD.AdServerAdapter[b.getAdServer()]}else{if(b){a=this.$s.adServerAdapters[b.getAdServer()];if(!a){SIMAD.Log.warn("The adserver "+b.getAdServer()+" for the ad "+b.getId()+" is not initialized.")}}}return a},getUsedAdServersFor:function(c){var b=[];if(c){for(var a=0;a<c.length;a++){b.push(c[a].getAdServer())}b=SIMAD.Util.unique(b)}return b},getWrapperId:function(a){return"SIMAD_wrapper_"+a.getId()},isDOMSafe:function(){if(SIMAD.Util.browser.msie){if(!this.__domCheck.counter){this.__domCheck.container=document.getElementById(this.__domCheck.containerId);this.__domCheck.counter=0}if(this.__domCheck.container&&this.__domCheck.container.doScroll){try{this.__domCheck.container.doScroll("right");return 1}catch(a){this.__domCheck.counter++;return(this.__domCheck.counter>40)?-1:0}}else{SIMAD.Log.error("The dom check is impossible.");return -1}}return 1},allowDynamicAd:function(c){var b=false;if(this.$s.dynamicAds){b=(this.$s.dynamicAds.include==="all");if(this.$s.dynamicAds.exceptOf){if(c===undefined&&this.$s.dynamicAds.include==="none"&&this.$s.dynamicAds.exceptOf.length>0){b=true}else{if(c!==undefined){for(var a=0;a<this.$s.dynamicAds.exceptOf.length;a++){if(this.$s.dynamicAds.exceptOf[a]===c){b=!b;break}}}}}}return b},__doAd:function(a,f){if(!this.__initBlockCompleted){this.__onInitBlockCompleted()}if(!this.$s.adFree){var d=this.getAd(a);if(d){var c=this.getAdServerAdapterFor(d);if(c){var e=undefined;if(typeof(c.getRendererFor)==="function"){e=c.getRendererFor(d)}if(e===undefined){e=this.getRendererFor(d)}if(e){if(f==="inSlotBegin"){this.__loadingOrder.push(d)}var b={inSlotBegin:0,inSlotEnd:1,outOfSlotBegin:2,outOfSlotEnd:3};if(d.getRenderStatus()===b[f]||d.getPlaceholder()!==null){if(typeof(e[f])==="function"){d.incRenderStatus();e[f](d)}else{SIMAD.Log.error("The render function "+f+"is not defined in renderer "+e.getName())}}else{SIMAD.Log.warn("doAd() at "+f+" is called not in place for the ad "+d.getId())}}else{SIMAD.Log.error("The render for the ad "+d.getId()+" isn't found.")}}else{SIMAD.Log.error("The ad "+d.getId()+" can't be rendered, because the corresponding adserver is not initialized.")}}else{SIMAD.Log.warn("Ad with the id "+a+" does not exist.")}}},__finalize:function(){if(this.inIFrame){if(this.adInIFrame){this.adInIFrame.triggerEvent("onIFrameAdFinished")}}for(var a in this.$s.adServerAdapters){if(typeof this.$s.adServerAdapters[a].finalize==="function"){this.$s.adServerAdapters[a].finalize()}}if(this.$s.onFinished!==undefined){if(typeof(this.$s.onFinished)==="string"&&typeof(window[this.$s.onFinished])==="function"){window[this.$s.onFinished]()}else{if(typeof(this.$s.onFinished)==="function"){this.$s.onFinished()}}}},__onInitBlockCompleted:function(){this.__initBlockCompleted=true;for(var a in this.$s.adServerAdapters){this.$s.adServerAdapters[a].onInitBlockCompleted()}},__completeAd:function(b){if(b){var a=this.getAdServerAdapterFor(b);if(a){var c=a.getDimensions(b);if(c&&c.length>=2){b.setDimensions(c)}else{SIMAD.Log.warn("Can't set dimensions for the ad "+b.getId())}if(typeof(a.isDelivered)==="function"){b.setDelivered(a.isDelivered(b))}}b.triggerEvent("onLoad")}},__finishAdReload:function(){if(this.__reloadAdsRotation.running){this.__reloadAdsRotation={ads:[],running:false,currentIndex:-1};this.triggerEvent("onAdReloadFinished")}},__abortAdReload:function(){if(this.__reloadAdsRotation.running){this.__finishAdReload();return true}return false}};if(SIMAD.Renderer===undefined){SIMAD.Renderer={}}SIMAD.Renderer.Base={__name:"Base",getName:function(){return this.__name},inSlotBegin:function(a){},inSlotEnd:function(a){},outOfSlotBegin:function(a){},outOfSlotEnd:function(a){}};SIMAD.Renderer.InstreamRenderer=SIMAD.Util.extend({},SIMAD.Renderer.Base,{__name:"InstreamRenderer",inSlotBegin:function(b){document.write('<span id="'+SIMAD.Core.getWrapperId(b)+'">');var a=SIMAD.Core.getAdServerAdapterFor(b);if(a){a.renderAd(b)}},inSlotEnd:function(e){var d=SIMAD.Core.getAdServerAdapterFor(e);if(d){document.write(d.styleAd(e))}document.write("</span>");e.setWrapper(document.getElementById(SIMAD.Core.getWrapperId(e)));if(e.getPlaceholder()){var c=document.createElement("div");e.getPlaceholder().appendChild(c);var a=e.getWrapper().getElementsByTagName("script");for(var b=0;b<a.length;b++){if(a[b].src){a[b].removeAttribute("src")}}c.parentNode.replaceChild(e.getWrapper(),c)}e.triggerEvent("onRendered")}});SIMAD.Renderer.PoststreamRenderer=SIMAD.Util.extend({},SIMAD.Renderer.Base,{__name:"PoststreamRenderer",inSlotBegin:function(a){document.write('<span id="'+SIMAD.Core.getWrapperId(a)+'_target"></span>')},outOfSlotBegin:function(b){document.write('<span id="'+SIMAD.Core.getWrapperId(b)+'" style="display: none">');var a=SIMAD.Core.getAdServerAdapterFor(b);if(a){a.renderAd(b)}},outOfSlotEnd:function(e){var d=SIMAD.Core.getAdServerAdapterFor(e);if(d){document.write(d.styleAd(e))}document.write("</span>");var f=document.getElementById(SIMAD.Core.getWrapperId(e));var g=document.getElementById(SIMAD.Core.getWrapperId(e)+"_target");if(!g){if(e.getPlaceholder()){document.write('<span id="'+SIMAD.Core.getWrapperId(e)+'_target"></span>');g=document.getElementById(SIMAD.Core.getWrapperId(e)+"_target")}else{SIMAD.Log.error("No wrapper/target was rendered for "+e.getId()+" and no placeholder is defined. Dont't know where to render the ad...");return}}if(!f||!g){return}var a=f.getElementsByTagName("script");for(var c=0;c<a.length;c++){if(a[c].src){a[c].removeAttribute("src")}}g.parentNode.replaceChild(f,g);f.style.display="inline";e.setWrapper(f);if(e.getPlaceholder()){var b=document.createElement("div");e.getPlaceholder().appendChild(b);b.parentNode.replaceChild(e.getWrapper(),b)}e.triggerEvent("onRendered")}});SIMAD.Renderer.OnEventRenderer=SIMAD.Util.extend({},SIMAD.Renderer.Base,{__name:"OnEventRenderer",inSlotBegin:function(a){document.write('<span id="'+SIMAD.Core.getWrapperId(a)+'"></span>');a.setWrapper(document.getElementById(SIMAD.Core.getWrapperId(a)))}});SIMAD.Renderer.IFrameRenderer=SIMAD.Util.extend({},SIMAD.Renderer.InstreamRenderer,{__name:"IFrameRenderer",inSlotEnd:function(a){document.write("</span>");a.setWrapper(parent.document.getElementById(SIMAD.Core.getWrapperId(a)));SIMAD.Core.__completeAd(a)}});if(SIMAD.Reloader===undefined){SIMAD.Reloader={}}SIMAD.Reloader.ReplacementFrameReloader={__name:"ReplacementFrameReloader",__syncVarsUpdated:{},getName:function(){return this.__name},reloadAd:function(j){if(j){SIMAD.Log.log("Adreload",this.getName()+" gets the ad "+j.getId()+" to reload",j);j.triggerEvent("beforeReload");if(SIMAD.Core.__reloadAdsRotation.currentIndex===0){this.__syncVarsUpdated={}}var b=SIMAD.Core.getAdServerAdapterFor(j);if(this.__syncVarsUpdated[j.getAdServer()]!==true){b.resetSyncVars()}j.reset();var c=this.__getURL(j);var f=this.__getIFrame(j);if(j.getWrapper()===null&&j.getPlaceholder()!==null){var i=j.getPlaceholder();if(i&&i.nodeName){var g=document.createElement("div");g.id=SIMAD.Core.getWrapperId(j);i.appendChild(g);j.setWrapper(g)}}var a=j.getWrapper()||j.getPlaceholder();if(f&&c&&a){a.innerHTML="";a.appendChild(f);a.style.display="inline";j.bindEvent("onIFrameAdStarted","__onIFrameInitCompleted",this.__onIFrameInitCompleted);j.bindEvent("onIFrameAdFinished","__onIFrameAdRendered",this.__onIFrameAdRendered);var d=this.__getIFrameWindow(f);try{d.location.replace(c)}catch(h){f.src=c}}else{SIMAD.Log.warn("Trying to reload the ad "+j.getId()+" which is not yet presented in DOM (has neither wrapper nor placeholder)");SIMAD.Core.reloadNextAd()}}else{SIMAD.Log.error("A SIMAD.Ad object must be passed to the reloadAd function of the "+this.getName())}return j},clean:function(a){try{a.getWrapper().innerHTML=""}catch(b){}},__onIFrameInitCompleted:function(c){var b=c.calledFromAd;if(b){b.unbindEvent("onIFrameAdStarted","__onIFrameInitCompleted");var a=SIMAD.Core.getAdServerAdapterFor(b);if(a&&SIMAD.Reloader.ReplacementFrameReloader.__syncVarsUpdated[b.getAdServer()]===true){var d=SIMAD.Reloader.ReplacementFrameReloader.__getIFrameWindow(SIMAD.Reloader.ReplacementFrameReloader.__getIFrame(b));if(d){a.syncVars(window,d)}}}},__onIFrameAdRendered:function(c){var b=c.calledFromAd;SIMAD.Log.log("AdReload","__onIFrameAdRendered() called for "+b.getId());if(b){b.unbindEvent("onIFrameAdFinished","__onIFrameAdRendered");var a=SIMAD.Core.getAdServerAdapterFor(b);var d=SIMAD.Reloader.ReplacementFrameReloader.__getIFrameWindow(SIMAD.Reloader.ReplacementFrameReloader.__getIFrame(b));if(a&&d){a.syncVars(d,window);SIMAD.Reloader.ReplacementFrameReloader.__syncVarsUpdated[b.getAdServer()]=true}SIMAD.Reloader.ReplacementFrameReloader.__resizeIFrame(b);b.setReloaded(true);b.triggerEvent("afterReload");SIMAD.Core.reloadNextAd()}},__getURL:function(a){return SIMAD.Core.$s.staticIFrameLocation+"?ad_id="+a.getId()},__getIFrame:function(b){var a=document.getElementById(this.__getIFrameId(b));if(!a){a=document.createElement("iframe");a.id=this.__getIFrameId(b);a.style.width=a.style.height="0px";a.width=a.height=0;a.frameBorder=a.border=0;a.scrolling="no";a.src="about:blank"}return a},__getIFrameId:function(a){return"SIMAD_iframe_"+a.getId()},__getIFrameWindow:function(b){var d;if(b){try{d=b.contentWindow;if(!d){try{d=b.contentDocument.defaultView}catch(c){try{d=window.frames[b.id]}catch(a){}}}}catch(c){}}return d},__resizeIFrame:function(c,a){var b=this.__getIFrame(c);var d=a||c.getDimensions();if(b&&d){SIMAD.Log.log("Reloader","Resizing the ad "+c.getId()+" to",d);if(d[0]!==undefined&&d[1]!==undefined){b.style.width=d[0]+"px";b.style.height=d[1]+"px"}}}}}if(typeof SIMAD!=="undefined"){SIMAD.Ad=function(a){this.__init(a)};SIMAD.Ad.prototype={__id:undefined,__format:undefined,__adServerFormat:undefined,__loading:SIMAD.Loading.POSTSTREAM,__onLoadCallback:null,__onRenderCallback:null,__adServer:undefined,__placeholder:null,__wrapper:null,__renderStatus:0,__active:true,__visible:false,__dimensions:[0,0],__delivered:false,__reloaded:false,__adServerSpecific:undefined,__init:function(a){SIMAD.Log.log("Ads","new Ad with",a);if(a){a=SIMAD.Util.extend({loading:SIMAD.Loading.POSTSTREAM,active:true},a);if(a.id&&a.id!==""){this.__id=a.id}else{SIMAD.Log.error("The parameter 'id' must be defined for a new SIMAD.Ad creation.");return}this.__eventListener={beforeReload:[],afterReload:[],onRendered:[],onLoad:[],onIFrameAdStarted:[],onIFrameAdFinished:[]};if(a.format){this.setFormat(a.format);if(!this.getFormat()){SIMAD.Log.error("The format "+a.format+" does not exists.")}}else{SIMAD.Log.error("The parameter 'format' must be defined for a new SIMAD.Ad creation.");return}if(a.loading){this.setLoading(a.loading)}if(a.onLoadCallback){this.setOnLoadCallback(a.onLoadCallback)}if(a.onRenderCallback){this.setOnRenderCallback(a.onRenderCallback)}if(a.placeholder){this.setPlaceholder(a.placeholder)}if(a.active){this.activate()}else{this.deactivate()}this.__adServer=a.adServer||SIMAD.Core.getConfig().adServers[0]||undefined;this.__adServerSpecific=a.adServerSpecific||undefined}else{SIMAD.Log.error("Trying to create a new SIMAD.Ad object without passing the arguments");return}return this},bindEvent:function(a,e,c){SIMAD.Log.log("Ad Event","bindEvent "+a+" with Identifier: "+e+" to Ad: "+this.__id);if(typeof(this.__eventListener[a])!=="undefined"){if(typeof(c)==="string"&&typeof(window[c])==="function"){c=window[c]}if(typeof(c)==="function"&&typeof(e)==="string"){var d=true;for(var b=0;b<this.__eventListener[a].length;b++){if(this.__eventListener[a][b].eventIdentifier===e){d=false}}if(d){this.__eventListener[a].push({eventIdentifier:e,eventFunction:c,calledFromAd:this})}}else{SIMAD.Log.warn("bindEvent: the function: "+c+" with the Identifier: "+e+"  to Ad: "+this.__id+" is not possible, check datatypes")}}else{SIMAD.Log.warn("bindEvent: the Event: "+a+"  from Ad: "+this.__id+" is not supported")}},triggerEvent:function(a){SIMAD.Log.log("Ad Event","triggerEvent: "+a+" for Ad "+this.__id);if(typeof this.__eventListener[a]!=="undefined"){var c=this.__eventListener[a].slice();for(var b=0;b<c.length;b++){if(typeof(c[b].eventFunction)==="function"){c[b].eventFunction(c[b])}}}else{SIMAD.Log.warn("triggerEvent: the Event "+a+"  on Ad: "+this.__id+" is not supported")}},unbindEvent:function(a,d){SIMAD.Log.log("Ad Event","unbindEvent: "+a+" with Identifier: "+d+" from Ad: "+this.__id);if(typeof(this.__eventListener[a])!=="undefined"&&typeof d==="string"){var c=-1;for(var b=0;b<this.__eventListener[a].length;b++){if(this.__eventListener[a][b].eventIdentifier===d){c=b}}if(c>=0){this.__eventListener[a].splice(c,1)}else{SIMAD.Log.info("Ad Event","unbindEvent: Event: "+a+" with the eventIdentifier:"+d+" dosen't exist and cannot be unbinded")}}else{SIMAD.Log.warn("unbindEvent: unbinding the Event "+a+" with the Identifier: "+d+" from Ad: "+this.__id+" is not possible, check datatypes")}},getId:function(){return this.__id},getLoading:function(){return this.__loading},setLoading:function(c){if(this.__loading!==c){var a=false;for(var b in SIMAD.Loading){if(SIMAD.Loading[b]===c){a=true}}if(a){this.__loading=c}}return this},getFormat:function(){return this.__format},setFormat:function(c){if(this.__format!==c){var a=false;for(var b in SIMAD.Format){if(SIMAD.Format[b]===c){a=true}}if(a){this.__format=c}}return this},getAdServerFormat:function(){if(!this.__adServerFormat){var a=SIMAD.Core.getAdServerAdapterFor(this);if(a){this.__adServerFormat=a.getMappedAdFormat(this.getFormat())}}return this.__adServerFormat},getOnLoadCallback:function(){return this.__onLoadCallback},setOnLoadCallback:function(a){if(a===null){this.__onLoadCallback=a}else{if(typeof(a)==="string"&&typeof(window[a])==="function"){this.__onLoadCallback=window[a]}else{if(typeof(a)==="function"){this.__onLoadCallback=a}}}return this},getOnRenderCallback:function(){return this.__onRenderCallback},setOnRenderCallback:function(a){if(a===null){this.__onRenderCallback=a}else{if(typeof(a)==="string"&&typeof(window[a])==="function"){this.__onRenderCallback=window[a]}else{if(typeof(a)==="function"){this.__onRenderCallback=a}}}return this},getAdServer:function(){return this.__adServer},getRenderStatus:function(){return this.__renderStatus},incRenderStatus:function(){this.__renderStatus++;return this},getPlaceholder:function(){var b;if(typeof(this.__placeholder)==="object"){b=this.__placeholder}else{if(typeof(this.__placeholder)==="string"){var a=document.getElementById(this.__placeholder);if(a){b=a}else{SIMAD.Log.warn("The placeholder with id "+this.__placeholder+" for the ad "+this.getId()+" is not found.")}}}return b},setPlaceholder:function(a){if(a!==undefined){this.__placeholder=a}return this},getWrapper:function(){return this.__wrapper},setWrapper:function(a){if(typeof(a)==="object"){this.__wrapper=a}return this},activate:function(){this.__active=true;return this},deactivate:function(){this.__active=false;return this},isActive:function(){return this.__active},hide:function(){SIMAD.Core.hideAd(this);return this},show:function(){SIMAD.Core.showAd(this);return this},setVisibility:function(a){if(typeof(a)!=="undefined"){this.__visible=a}return this},isVisible:function(){return this.__visible},reset:function(){this.__renderStatus=0;this.__visible=false;this.__dimensions=[0,0];this.__delivered=false;this.__reloaded=false;return this},setDimensions:function(a){if(a&&typeof(a)!=="string"&&a.length>1){this.__dimensions=a}return this},getDimensions:function(){return this.__dimensions},setDelivered:function(a){this.__delivered=a;return this},isDelivered:function(){return this.__delivered},clear:function(){SIMAD.Core.clearAd(this);return this},del:function(a){SIMAD.Core.deleteAd(this,a);return this},isReloaded:function(){return this.__reloaded},setReloaded:function(a){if(typeof(a)==="boolean"){this.__reloaded=a}return this},load:function(){SIMAD.Core.loadAd(this);return this},reload:function(){SIMAD.reloadAds();return this},swap:function(){return},getAdServerSpecific:function(){return this.__adServerSpecific},setAdServerSpecific:function(a){if(a){this.__adServerSpecific=a}return this},addAdServerSpecific:function(a){if(a){this.__adServerSpecific=SIMAD.Util.extend(true,this.__adServerSpecific,a)}return this}}}if(typeof SIMAD==="undefined"){SIMAD={}}SIMAD.Log={__loggers:[],__startTime:new Date(),__log:[],getLogList:function(){return this.__log},register:function(a){SIMAD.Log.__loggers.push(a)},log:function(c,b,a){this.__doLog("log",c,b,a)},info:function(c,b,a){this.__doLog("info",c,b,a)},warn:function(b,a){this.__doLog("warn","warn",b,a)},error:function(b,a){this.__doLog("error","error",b,a)},__doLog:function(c,g,i,f){var a=SIMAD.Core.getCurrentSession();if(a!==null&&typeof a!=="undefined"&&a.debug.all){var j=true;if(typeof SIMAD.Core==="object"){j=!SIMAD.Core.inIFrame}else{j=(window===parent)}if(j){if(!i&&i!==""){SIMAD.Log.warn("missuse","the Functoin SIMAD.Log."+c+"() muss be used with tow parameter, ..(prefix,message)")}var e=new Date();var d=e.getTime()-this.__startTime.getTime();if(!c){c="log"}var b={level:c,message:i,time:(d/1000).toFixed(3),prefix:g,object:f};this.__log.push(b);for(var h=0;h<this.__loggers.length;h++){this.__loggers[h].log(b)}}else{parent.SIMAD.Log.__doLog(c,"         IFrame: "+g,i,f)}}},getUsedPrefixes:function(){var b=[];for(var a=0;a<this.__log.length;a++){if(!SIMAD.Util.inArray(b,this.__log[a].prefix)){b.push(this.__log[a].prefix)}}return b},getUsedLogLevels:function(){var b=[];for(var a=0;a<this.__log.length;a++){if(!SIMAD.Util.inArray(b,this.__log[a].level)){b.push(this.__log[a].level)}}return b},getLastError:function(){var a=SIMAD.Util.filter(this.__log,function(b){return b.level==="error"});if(a.length>0){return a[a.length-1]}return undefined},clear:function(){this.__log=[]},ConsoleLogger:{log:function(a){if(window.console){var b=a.time+": SIMAD: ";switch(a.level){default:case"log":console.log(b+a.prefix+": "+a.message,a.object?a.object:"");break;case"info":console.info(b+a.message,a.object?a.object:"");break;case"warn":console.warn(b+a.message,a.object?a.object:"");break;case"error":console.error(b+a.message,a.object?a.object:"");break}}}},OperaLogger:{log:function(a){if("object"===typeof(window.opera)){if("function"===typeof(window.opera.postError)){var b=a.time+": SIAMD: "+a.prefix+": "+a.message+(a.object?": "+SIMAD.Util.toJSON(a.object):"");window.opera.postError(a.level+"| "+b)}}}}};SIMAD.Log.register(SIMAD.Log.ConsoleLogger);SIMAD.Log.register(SIMAD.Log.OperaLogger);if(typeof SIMAD!=="undefined"){if(typeof SIMAD.AdServerAdapter==="undefined"){SIMAD.AdServerAdapter={}}SIMAD.AdServerAdapter.Base={__name:"Base",__initStarted:false,__initMode:SIMAD.Loading.POSTSTREAM,__initInstreamCompleted:false,__initCounter:0,settings:{},config:function(){this.data=SIMAD.Core.data;this.$s=SIMAD.Core.$s;return this},init:function(c){if(!this.__initStarted){if(!SIMAD.Core.inIFrame){for(var b in this.$s.ads){if(this.$s.ads[b].getLoading()===SIMAD.Loading.INSTREAM&&this.$s.ads[b].isActive()){this.__initMode=SIMAD.Loading.INSTREAM}}}else{this.__initMode=SIMAD.Loading.INSTREAM}this.__initStarted=true}if(c===undefined){c=(this.__initInstreamCompleted)?"post":"pre"}if(this.__initMode===SIMAD.Loading.INSTREAM&&c==="pre"||this.__initMode===SIMAD.Loading.POSTSTREAM&&c==="post"){if(this.settings.initFunctions){var a=(SIMAD.Core.inIFrame)?this.settings.initFunctions.iFrameInit:this.settings.initFunctions.defaultInit;if(a&&typeof(a[this.__initCounter])==="function"){a[this.__initCounter].call(this);this.__initCounter++}}}return this},renderAd:function(a){return this},finalize:function(){return this},onInitBlockCompleted:function(){this.__initInstreamCompleted=true;return this},getName:function(){return this.__name},getDimensions:function(a){if(a){return[0,0]}return undefined},isDelivered:function(a){var b=a.getDimensions();return(b[0]>1&&b[1]>1)},reloadAds:function(a){return a},sortAds:function(a){return a},styleAd:function(a){return""},getMappedAdFormat:function(a){return a},getSyncVars:function(){return[]},resetSyncVars:function(){SIMAD.Log.log("SIMAD.AdServerAdapter."+this.getName(),"Reset global sync variables");var a=this.getSyncVars();for(var b=0;b<a.length;b++){window[a[b]]=undefined}},syncVars:function(d,c){SIMAD.Log.log("SIMAD.AdServerAdapter."+this.getName(),"Sync global variables");var a=this.getSyncVars();if(a&&d&&c){SIMAD.Log.log("SIMAD.AdServerAdapter."+this.getName(),"Syncing global variables from "+d.toString()+" to "+c.toString());for(var b=0;b<a.length;b++){c[a[b]]=d[a[b]]}}}}}if(typeof SIMAD!=="undefined"&&typeof SIMAD.AdServerAdapter!=="undefined"&&typeof SIMAD.AdServerAdapter.Base!=="undefined"){SIMAD.AdServerAdapter.OAS=SIMAD.Util.extend({},SIMAD.AdServerAdapter.Base,{__name:"OAS",__initFunctionLoadScripts:function(){SIMAD.Log.log("init OAS","OAS AdServerAdapter initialisation: LoadScripts");var b=this;var a=SIMAD.getAds(function(f){return f.getAdServer()===b.getName()&&f.isActive()});if(a.length>0){var e={method:"mjx",taxonomie:this.__getTaxonomyString(),info:{content_type:this.__mapContentType(this.$s.contentType),no_sowefo:this.__checkNoSowefoFlag(),agofid:this.$s.agofCode||""}};var d=this.__getOasScriptList(e);SIMAD.Log.log("init OAS","load script with URLs",d);for(var c=0;c<d.length;c++){SIMAD.Util.includeJS(d[c])}}},__init_inIFrameJMXVideoAds:function(){SIMAD.Log.log("init OAS","__init_inIFrameJMXVideoAds bulk load of Video Ads");if(SIMAD.Core.adInIFrame){if(parent.SIMAD.Core.__reloadAdsRotation.currentIndex===0){var c={method:"jxm",taxonomie:this.__getTaxonomyString(),info:{content_type:this.__mapContentType(this.$s.contentType),no_sowefo:1,agofid:this.$s.agofCode||""}};var b=this.__getOasScriptListVideoJMX(c);SIMAD.Log.log("init OAS","load video ad script with URL",b);for(var a=0;a<b.length;a++){SIMAD.Util.includeJS(b[a])}}}},__init_inIFrameInitVideoAdRequest:function(){if(SIMAD.Core.adInIFrame){if(parent.SIMAD.Core.__reloadAdsRotation.currentIndex===0){var b=this.__getOasJMXVideoAdList(this.$s.video);SIMAD.Log.log("init OAS","__init_inIFrameInitVideoAdRequest init bulk loaded Videoads",b);for(var a=0;a<b.length;a++){if(typeof(window.OAS_RICH)==="function"){window.OAS_RICH(b[a])}}}}},__init_inIFrameAfter:function(){SIMAD.Core.adInIFrame.triggerEvent("onIFrameAdStarted")},__getTaxonomyString:function(){var c=this.$s.adServerSpecific.OAS.domainId;if(typeof this.$s.cmsSpecific!=="undefined"&&this.$s.cmsSpecific.marketingCluster){c+="/"+this.$s.cmsSpecific.marketingCluster}var a=[this.$s.channel,this.$s.subchannel1,this.$s.subchannel2,this.$s.subchannel3,this.$s.subchannel4,this.$s.subchannel5];var d=false;for(var b=0;b<a.length;b++){if(!d){if(typeof a[b]!=="undefined"&&a[b]!==""){c+="/"+a[b]}else{if(b===0){c+="/home"}d=true}}}if(typeof SIMAD.CmsAdapter.__getOASTaxonomyString==="function"){c=SIMAD.CmsAdapter.__getOASTaxonomyString(c)}return c},__checkNoSowefoFlag:function(){var a=1;if(this.$s.dynamicAds){if(this.$s.dynamicAds.include==="all"&&this.$s.dynamicAds.exceptOf.length===0){a=0}}return a},renderAd:function(b){if(b.getFormat()!==SIMAD.Format.PERFORMANCEBOX1){if(SIMAD.Core.adInIFrame){var d={method:"jx",taxonomie:this.__getTaxonomyString(),info:{content_type:this.__mapContentType(this.$s.contentType),no_sowefo:1,agofid:this.$s.agofCode||""},ad:b};var c=this.__getOasScriptList(d);SIMAD.Log.log("output OAS","rendering the ad "+b.getId()+" load url ",c);for(var a=0;a<c.length;a++){SIMAD.Util.includeJS(c[a])}}else{if(typeof(window.OAS_RICH)==="function"){window.OAS_RICH(b.getAdServerFormat())}}}return this},reloadAds:function(h){var c=this;h=SIMAD.Util.filter(h,function(i){return !(SIMAD.Format.PERFORMANCEBOX1===i.getFormat()&&i.getAdServer()===c.getName())});if(h.length>0&&h[0].getFormat()!==SIMAD.Format.POPUP){var d=SIMAD.Util.filter(h,function(i){return i.getFormat()===SIMAD.Format.POPUP&&i.getAdServer()===c.getName()});if(d.length===0){var g=this.__getPopupFromDS();if(!g){var b=this.__createPopupAd();SIMAD.Core.addAd(b);h.unshift(b)}else{g.activate();h.unshift(g)}}else{var f=-1;for(var e=0;e<h.length;e++){if(h[e].getFormat()===SIMAD.Format.POPUP&&h[e].getAdServer()===c.getName()){f=e}}if(f>-1){var a=h[f];h.splice(f,1);h.unshift(a)}else{SIMAD.Log.warn("Can't find popup in the list to reload")}}}return h},__getPopupFromDS:function(){for(var b=this.data.sessions.length-1;b>=0;b--){for(var a in this.data.sessions[b].ads){if(this.data.sessions[b].ads[a].getFormat()===SIMAD.Format.POPUP&&this.data.sessions[b].ads[a].getAdServer()===this.getName()){if(b<this.data.sessions.length-1){return SIMAD.Core.addAd(this.data.sessions[b].ads[a])}return this.data.sessions[b].ads[a]}}}return undefined},__createPopupAd:function(){SIMAD.Log.log("output OAS","__createPopupAd");var a=document.getElementsByTagName("body")[0];var d=document.createElement("div");var c="popup"+Math.round(Math.random()*9999);d.id="SIMAD_placeholder_"+c;a.appendChild(d);var b=this;return new SIMAD.Ad({id:c,loading:SIMAD.Loading.INSTREAM,format:SIMAD.Format.POPUP,adServer:b.getName(),active:true,placeholder:d.id})},getVideoAdRequest:function(a){var f=this.__mapVideoAdFormat(a.video_ad_id);SIMAD.Log.log("output OAS"," getVideoAdRequestvideo_ad_id= "+f,a);var c="";if(typeof(a)!=="object"){a={}}c=window["OAS_"+f];if(typeof this.$s.video.AdRequestLog==="undefined"){this.$s.video.AdRequestLog={}}this.$s.video.AdRequestLog[f]=c;if(c){if(typeof(a.industries)==="object"){var e="";for(var b in a.industries){if(a.industries[b].indtarget){var d=a.industries[b].industry;if(typeof(d)!=="undefined"||String(d).length){if(e){e+="&"}e+="ind="+d}}}if(e){ad_request+="&"+e}}this.__writeCounterPixel("oas_videoad_pixel","OAS_"+f+"_counter")}SIMAD.Log.log("OAS: Video","getVideoAdRequest for "+f+" tools/ videoXmlUrl: "+c);return c},__writeCounterPixel:function(d,b){var c=window[b];if(c){var a=document.getElementById(d);if(!a){a=document.createElement("img");a.src="/images/blind.gif";a.id=d;document.getElementsByTagName("body")[0].appendChild(a)}SIMAD.Log.log("output OAS","__writeCounterPixel for "+b+" with uri: "+c);a.src=c}},__getOasScriptURLParameter:function(g){var a="";for(var b in g){var d=g[b];if(typeof(d)==="undefined"||!String(d).length){continue}if(a){a+="&"}a+=[escape(b),escape(g[b])].join("=")}if(a){a="?"+a}var c;try{c=top.location.search.match(/(showroom)=([a-zA-Z0-9_-]*)/)}catch(f){SIMAD.Log.log("OAS Showroom","try to get the url from top went wrong")}if(c){if(a){a+="&"}a+=[c[1],c[2]||"standard"].join("=")}return a},__getOasJMXVideoAdList:function(a){var b=[];if(typeof(a)!=="undefined"&&typeof(a.adFilter)!=="undefined"){if(a.adFilter.all){if(a.adFilter.overlay){b=b.concat(this.__getRollTypeFormatList("overlay"))}if(a.adFilter.midroll){b=b.concat(this.__getRollTypeFormatList("midroll"));b=b.concat(this.__getRollTypeFormatList("presplit"));b=b.concat(this.__getRollTypeFormatList("postsplit"))}if(a.adFilter.postroll){b=b.concat(this.__getRollTypeFormatList("postroll"))}}}return b},__getOasScriptListVideoJMX:function(c){var e=[];if(typeof(c)==="object"&&c.taxonomie){if(typeof(this.$s.video)!=="undefined"&&typeof(this.$s.video.adFilter)!=="undefined"){var d=c.taxonomie;var a=this.__getOasScriptURLParameter(c.info);var f=this.__getOasJMXVideoAdList(this.$s.video);if(f.length>0){var b=this.settings.AdserverBaseUrl+"/adstream_mjx.ads/"+d+"/1"+this.$s.sessionId+"@"+f.join(",")+a;e.push(b)}}}else{SIMAD.Log.warn("OAS init __getOasScriptListVidoeJMX called with unexpected parameter set",c)}return e},__getOasScriptList:function(j){var b=[];if(typeof(j)==="object"&&j.taxonomie&&j.method){var c=j.taxonomie;var a=j.method;var m=this.__getOasScriptURLParameter(j.info);var n=this;var e=SIMAD.Core.getAds(function(o){return o.getFormat()!==SIMAD.Format.PERFORMANCEBOX1&&o.getAdServer()===n.getName()&&o.isActive()});var l=SIMAD.Util.joinObjects(e,"getAdServerFormat",",");var f=[];if(typeof(this.$s.video)!=="undefined"&&typeof(this.$s.video.adFilter)!=="undefined"){if(this.$s.video.adFilter.all){if(this.$s.video.adFilter.preroll){f=f.concat(this.__getRollTypeFormatList("preroll"))}if(this.$s.video.adFilter.sponsor){f=f.concat(this.__getRollTypeFormatList("sponsor"))}}}var k=this.settings.AdserverBaseUrl+"/adstream_"+a+".ads/"+c+"/1"+this.$s.sessionId+"@";switch(a){case"mjx":if(l){var d=k+l+m;b.push(d)}break;case"jx":if(l){var i="";if(f){i=f.join(",")}if(j.ad){var h=k+l+","+i+"!"+j.ad.getAdServerFormat()+m;b.push(h);if(SIMAD.Core.inIFrame){if(parent.SIMAD.Core.__reloadAdsRotation.currentIndex===0){for(var g=0;g<f.length;g++){h=k+l+","+i+"!"+f[g]+m;b.push(h)}}}}else{SIMAD.Log.error("OAS __getOasScriptList: the argument.ad is not set")}}break}}else{SIMAD.Log.warn("OAS init __getOasScriptList called with unexpected parameter set",j)}return b},getDimensions:function(c){var e=document.getElementById("oasinfo_"+c.getAdServerFormat());var b,a;if(e){b=parseInt(e.style.width);a=parseInt(e.style.height)}if(!b){b=0}if(!a){a=0}if(c.getFormat===SIMAD.Format.FULLBANNER){if(b>728){b=728}if(a>90){a=90}}else{if(c.getFormat===SIMAD.Format.SKYSCRAPER){if(b>160){b=160}if(a>600){a=600}}}var d=[b,a];return d},isDelivered:function(a){var c=document.getElementById("oasinfo_"+a.getAdServerFormat());var b=false;if(c){b=true}return b},__mapContentType:function(b){var a=[];a[SIMAD.ContentType.HOME]="home";a[SIMAD.ContentType.VIDEO_OVERVIEW]="MCcontent";a[SIMAD.ContentType.RICH_VIDEO]="MCplayer";a[SIMAD.ContentType.VIDEO]="CPplayer";a[SIMAD.ContentType.COMMUNITY]="ugc";a[SIMAD.ContentType.GALLERY]="gallery";a[SIMAD.ContentType.GALLERY_IMAGE]="gallery_zoom";a[SIMAD.ContentType.GAME]="games";a[SIMAD.ContentType.SHOP]="shop";a[SIMAD.ContentType.RAFFLE]="raffle";a[SIMAD.ContentType.DEFAULT]="content";a[SIMAD.ContentType.ERROR]="error";return(a[b]!==undefined)?a[b]:"content"},getMappedAdFormat:function(c){var a={};a[SIMAD.Format.FULLBANNER]="Top";a[SIMAD.Format.SKYSCRAPER]="Right1";a[SIMAD.Format.MEDIUMRECTANGLE]="Middle1";a[SIMAD.Format.POPUP]="Popup";a[SIMAD.Format.MAXIAD]="Middle2";a[SIMAD.Format.PERFORMANCEBOX1]="";var b=a[c];return b||""},getVideoAdInitiationAdFormat:function(a){return SIMAD.Format.POPUP},__getRollTypeFormatList:function(c){var a=this.settings.VideoFormatMap[c];var d=[];for(var b in a){d.push(a[b])}return d},__mapVideoAdFormat:function(d){var c={};for(var a in this.settings.VideoFormatMap){c=SIMAD.Util.extend(c,this.settings.VideoFormatMap[a])}var b="";if(typeof c[d]==="string"){b=c[d]}return b},getSyncVars:function(){var f={};var d=[];for(var c in this.settings.VideoFormatMap){f=SIMAD.Util.extend(f,this.settings.VideoFormatMap[c])}for(var e in f){d.push("OAS_"+f[e]);d.push("OAS_"+f[e]+"_counter")}var a=this.settings.VideoFormatMap.overlay;for(var b in a){d.push("OAS_"+a[b]+"b");d.push("OAS_"+a[b]+"b_counter")}return d}});SIMAD.AdServerAdapter.OAS.settings={initFunctions:{defaultInit:[SIMAD.AdServerAdapter.OAS.__initFunctionLoadScripts],iFrameInit:[SIMAD.AdServerAdapter.OAS.__init_inIFrameAfter,SIMAD.AdServerAdapter.OAS.__init_inIFrameJMXVideoAds,SIMAD.AdServerAdapter.OAS.__init_inIFrameInitVideoAdRequest]},AdserverBaseUrl:"http://austria1.adverserve.net/RealMedia/ads",VideoFormatMap:{preroll:{preroll1:"Video1",preroll1b:"Video1b"},midroll:{midroll1:"Video3",midroll1b:"Video3b",midroll2:"Video4",midroll2b:"Video4b",midroll3:"Video5",midroll3b:"Video5b",midroll4:"Video6",midroll4b:"Video6b",midroll5:"Video7",midroll5b:"Video7b"},sponsor:{sponsor1:"Sponsor1",sponsor1b:"Sponsor1b"},presplit:{presplit1:"Presplit1",presplit2:"Presplit2",presplit3:"Presplit3",presplit4:"Presplit4",presplit5:"Presplit5"},postroll:{postroll1:"Video2",postroll1b:"Video2b"},overlay:{overlay1:"Overlay1",overlay2:"Overlay2",overlay3:"Overlay3",overlay4:"Overlay4",overlay5:"Overlay5"}}}}if(typeof SIMAD!=="undefined"&&typeof SIMAD.AdServerAdapter!=="undefined"&&typeof SIMAD.AdServerAdapter.Base!=="undefined"){SIMAD.AdServerAdapter.SOI=SIMAD.Util.extend({},SIMAD.AdServerAdapter.Base,{__name:"SOI",__init_SOIVars:function(){SIMAD.Log.log("init SOI","SOI AdServerAdapter initialisation: set SOI variables");window.SOI_GLOBALV="V6";window.SOI_WERBUNG=!this.$s.adFree;window.SOI_AGOFID=this.$s.agofCode;window.SOI_BREADCRUMBS=this.$s.breadcrumb;window.SOI_FRA=SIMAD.Core.inIFrame;window.SOI_SUBSITE=this.$s.channel;window.SOI_SUB2SITE=this.$s.subchannel1;window.SOI_SUB3SITE=this.$s.subchannel2;window.SOI_SUB4SITE=this.$s.subchannel3;window.SOI_SUB5SITE=this.$s.subchannel4;window.SOI_SUB6SITE=this.$s.subchannel5;window.SOI_CONTENT=this.__mapContentType(this.$s.contentType);window.SOI_SOWEFO=SIMAD.Core.allowDynamicAd();window.SOI_PU=SIMAD.Core.allowDynamicAd(SIMAD.Format.POPUP_WINDOW);window.SOI_WP=SIMAD.Core.allowDynamicAd(SIMAD.Format.WALLPAPER);window.SOI_PL=SIMAD.Core.allowDynamicAd(SIMAD.Format.POWERLAYER);window.SOI_PB=SIMAD.Core.allowDynamicAd(SIMAD.Format.POWERBANNER);window.SOI_PR=SIMAD.Core.allowDynamicAd(SIMAD.Format.POWERRECTANGLE);var b=this;window.SOI_FB2=SIMAD.Core.getAds(function(e){return e.isActive()&&e.getAdServer()===b.getName()&&e.getFormat()===SIMAD.Format.FULLBANNER}).length>0;window.SOI_RT1=SIMAD.Core.getAds(function(e){return e.isActive()&&e.getAdServer()===b.getName()&&e.getFormat()===SIMAD.Format.MEDIUMRECTANGLE}).length>0;window.SOI_SC1=SIMAD.Core.getAds(function(e){return e.isActive()&&e.getAdServer()===b.getName()&&e.getFormat()===SIMAD.Format.SKYSCRAPER}).length>0;window.SOI_PU1=SIMAD.Core.getAds(function(e){return e.isActive()&&e.getAdServer()===b.getName()&&e.getFormat()===SIMAD.Format.POPUP}).length>0;window.SOI_TCLUSTER="";if(this.$s.contentType===SIMAD.ContentType.HOME){var a=["SOI_SUBSITE","SOI_SUB2SITE","SOI_SUB3SITE","SOI_SUB4SITE","SOI_SUB5SITE","SOI_SUB6SITE"];var d=false;for(var c=0;c<a.length;c++){if((!window[a[c]]||window[a[c]]==="")&&!d){window[a[c]]="home";d=true}}}if(this.$s.adServerSpecific){window.SOI_SITE=this.$s.adServerSpecific.SOI.domainId;window.SOI_UPC=this.$s.adServerSpecific.SOI.UPC}window.SOI_MARKETINGCLUSTER=(this.$s.cmsSpecific)?this.$s.cmsSpecific.marketingCluster:"";if(typeof(this.$s.cmsSpecific.contentCluster)!=="undefined"){window.SOI_CLUSTER=this.$s.cmsSpecific.contentCluster}if(typeof(this.$s.video)!=="undefined"&&typeof(this.$s.video.adFilter)!=="undefined"){window.SOI_VP=this.$s.video.adFilter.all;window.SOI_LPY=(this.$s.video.type==="full")?true:false;window.SOI_NPY=(this.$s.video.player!=="video")?true:false;window.SOI_VA1=this.$s.video.adFilter.preroll;window.SOI_VA2=this.$s.video.adFilter.postroll;window.SOI_VA3=this.$s.video.adFilter.midroll;window.SOI_VA4=this.$s.video.adFilter.overlay;window.SOI_VA5=this.$s.video.adFilter.sponsor}if(!SIMAD.Core.adInIFrame){if(!SIMAD.Core.getAds(function(e){return e.isActive()&&e.getAdServer()===b.getName()}).length>0){window.SOI_INIT_DONE=true}}},__init_inIFrame:function(){window.SOI_INIT_DONE=(parent.SIMAD.Core.__reloadAdsRotation.currentIndex>0)?true:false;window.SOI_SOWEFO=false},__init_includeSiteSpecificJS:function(){SIMAD.Log.log("init SOI","SOI AdServerAdapter initialisation: include site specific JavaScript file");if(this.$s.adServerSpecific&&this.$s.adServerSpecific.SOI&&this.$s.adServerSpecific.SOI.siteSpecificJS!==undefined){SIMAD.Util.includeJS(this.$s.adServerSpecific.SOI.siteSpecificJS)}},__init_includeGlobalV6:function(){SIMAD.Log.log("init SOI","SOI AdServerAdapter initialisation: include the globalV6.js");SIMAD.Util.includeJS("http://adserver.71i.de/global_js/globalV6.js")},__init_inIFrameAfter:function(){if(SIMAD.Core.adInIFrame){SIMAD.Core.adInIFrame.triggerEvent("onIFrameAdStarted")}},getVideoAdRequest:function(c){var f=c.video_ad_id;SIMAD.Log.log("video SOI"," getVideoAdRequestvideo_ad_id= "+f,c);var e="";if(typeof(c)!=="object"){c=new Object}if(typeof(window.soi_VideoAdRequest)==="function"){var a=new Object;if(typeof(c.industries)==="object"){a.industries=c.industries}if(c.prefetch){a.prefetch=true}if(typeof(c.prefetch)==="undefined"&&(this.$s.contenType==="MCplayer"||this.$s.contenType==="CPplayer")){if(f.match(/^midroll/)){a.prefetch=true}}e=window.soi_VideoAdRequest(f,a)}if(e&&f.match(/(presplit|midroll)/)){var b=SIMAD.Core.getAds();for(var d=0;d<b.length;d++){b[d].clear()}}if(typeof this.$s.video.AdRequestLog==="undefined"){this.$s.video.AdRequestLog=[]}this.$s.video.AdRequestLog[f]=e;SIMAD.Log.log("video SOI","getVideoAdRequest for "+f+" tools/ videoXmlUrl: "+e);return e},renderAd:function(b){SIMAD.Log.log("render Ad SOI","rendering the ad ",b);var a="";if(b.getFormat()===SIMAD.Format.PERFORMANCEBOX1){window.SOI_SHOPPINGTIP=undefined}if(typeof(window.soi_Tagwriter)==="function"){a=window.soi_Tagwriter(b.getAdServerFormat())}SIMAD.Log.log("render Ad SOI","load script ",new Array(a));document.write(a);return this},styleAd:function(d){var c="";if(d.getFormat()===SIMAD.Format.PERFORMANCEBOX1){var a=window.SOI_SHOPPINGTIP;if(a&&this.isDelivered(d)){var b=d.getOnRenderCallback();if(typeof(b)==="function"){c=b(d,a)}}}return c},getDimensions:function(a){var b=[0,0];if(window.soi_dimension){b=window.soi_dimension[a.getAdServerFormat()]}if(b&&a.getFormat()===SIMAD.Format.FULLBANNER&&this.__isAdType(a,"PB2")){b[1]=180}return b},isDelivered:function(a){return this.__isAdType(a)&&!this.__isAdType(a,"Fallback")},reloadAds:function(h){var c=this;h=SIMAD.Util.filter(h,function(i){return !(SIMAD.Format.PERFORMANCEBOX1===i.getFormat()&&i.getAdServer()===c.getName())});if(h.length>0&&h[0].getFormat()!==SIMAD.Format.POPUP){var d=SIMAD.Util.filter(h,function(i){return i.getFormat()===SIMAD.Format.POPUP&&i.getAdServer()===c.getName()});if(d.length===0){var g=this.__getPopupFromDS();if(!g){var b=this.__createPopupAd();SIMAD.Core.addAd(b);h.unshift(b)}else{g.activate();h.unshift(g)}}else{var f=-1;for(var e=0;e<h.length;e++){if(h[e].getFormat()===SIMAD.Format.POPUP&&h[e].getAdServer()===c.getName()){f=e}}if(f>-1){var a=h[f];h.splice(f,1);h.unshift(a)}else{SIMAD.Log.warn("Can't find popup in the list to reload")}}}return h},sortAds:function(b){var c=[SIMAD.Format.POPUP,SIMAD.Format.FULLBANNER,SIMAD.Format.SKYSCRAPER,SIMAD.Format.MEDIUMRECTANGLE,SIMAD.Format.PERFORMANCEBOX1];var a=this;b.sort(function(e,d){if(e.getAdServer()===a.getName()&&d.getAdServer()===a.getName()){var g=SIMAD.Util.indexInArray(c,e.getFormat());var f=SIMAD.Util.indexInArray(c,d.getFormat());if(g<0){return 1}else{if(f<0){return -1}}return g-f}return 0});return b},__getPopupFromDS:function(){for(var b=this.data.sessions.length-1;b>=0;b--){for(var a in this.data.sessions[b].ads){if(this.data.sessions[b].ads[a].getFormat()===SIMAD.Format.POPUP&&this.data.sessions[b].ads[a].getAdServer()===this.getName()){if(b<this.data.sessions.length-1){return SIMAD.Core.addAd(this.data.sessions[b].ads[a])}return this.data.sessions[b].ads[a]}}}return undefined},__createPopupAd:function(){SIMAD.Log.log("output SOI","__createPopupAd");var a=document.getElementsByTagName("body")[0];var d=document.createElement("div");var c="popup"+Math.round(Math.random()*9999);d.id="SIMAD_placeholder_"+c;a.appendChild(d);var b=this;return new SIMAD.Ad({id:c,loading:SIMAD.Loading.INSTREAM,format:SIMAD.Format.POPUP,adServer:b.getName(),active:true,placeholder:d.id})},getVideoAdInitiationAdFormat:function(a){return SIMAD.Format.POPUP},getSyncVars:function(){return["soi_adtrace","soi_dimension","SoiSetPre","SoiSetSpon","SoiSetMid","SoiSetOva","SoiSetPost","forceSkyscraperInside","forceSkyscraperOutside","preferSkyscraperOutside","DFPSite","DFPZone","DFPTile","DFPOrd","DFPOid","SOI_SITE","SOI_SUBSITE","SOI_SUB2SITE","SOI_SUB3SITE","SOI_SUB4SITE","SOI_SUB5SITE","SOI_SUB6SITE","SOI_BREADCRUMBS","SOI_MARKETINGCLUSTER","SOI_CONTENT","SOI_WERBUNG","SOI_FB1","SOI_FB2","SOI_RT1","SOI_RT2","SOI_RT3","SOI_SC1","SOI_PU1","SOI_VP","SOI_VA1","SOI_VA2","SOI_VA3","SOI_VA4","SOI_VA5","SOI_LPY","SOI_NPY","SOI_SOWEFO","SOI_PU","SOI_WP","SOI_PW","SOI_PB","SOI_PC","SOI_PL","SOI_PR","SOI_UPC"]},resetSyncVars:function(){SIMAD.Log.log("SIMAD.AdServerAdapter."+this.getName(),"Reset global sync variables");soi_ResetVars()},syncVars:function(b,a){SIMAD.Log.log("SIMAD.AdServerAdapter."+this.getName(),"Sync global variables");soi_SyncVars(b,a)},getMappedAdFormat:function(c){var b="";var a=[];a[SIMAD.Format.FULLBANNER]="fullbanner2";a[SIMAD.Format.SKYSCRAPER]="skyscraper1";a[SIMAD.Format.MEDIUMRECTANGLE]="rectangle1";a[SIMAD.Format.POPUP]="popup1";a[SIMAD.Format.MAXIAD]="maxiad1";if(c===SIMAD.Format.PERFORMANCEBOX1){if(window.SOI_ZAHL==null){window.SOI_ZAHL=1}else{window.SOI_ZAHL+=1}if(window.SOI_place&&window.SOI_ZAHL){b=window.SOI_place[window.SOI_ZAHL]}}a[SIMAD.Format.PERFORMANCEBOX1]=b;return a[c]},__isAdType:function(c,b){var a=window.soi_adtrace?unescape(window.soi_adtrace):"";if(a&&c){b=b||"";typeTest=new RegExp(c.getAdServerFormat()+".+"+b,"i");return typeTest.test(a.toLowerCase().replace(new RegExp("\\n","g"),""))}return false},__mapContentType:function(b){var a=[];a[SIMAD.ContentType.HOME]="home";a[SIMAD.ContentType.VIDEO_OVERVIEW]="MCcontent";a[SIMAD.ContentType.RICH_VIDEO]="MCplayer";a[SIMAD.ContentType.VIDEO]="CPplayer";a[SIMAD.ContentType.COMMUNITY]="ugc";a[SIMAD.ContentType.GALLERY]="gallery";a[SIMAD.ContentType.GALLERY_IMAGE]="gallery_zoom";a[SIMAD.ContentType.GAME]="games";a[SIMAD.ContentType.SHOP]="shop";a[SIMAD.ContentType.RAFFLE]="raffle";a[SIMAD.ContentType.DEFAULT]="content";a[SIMAD.ContentType.ERROR]="error";return(a[b]!==undefined)?a[b]:"content"}});SIMAD.AdServerAdapter.SOI.settings={initFunctions:{defaultInit:[SIMAD.AdServerAdapter.SOI.__init_SOIVars,SIMAD.AdServerAdapter.SOI.__init_includeSiteSpecificJS,SIMAD.AdServerAdapter.SOI.__init_includeGlobalV6],iFrameInit:[SIMAD.AdServerAdapter.SOI.__init_SOIVars,SIMAD.AdServerAdapter.SOI.__init_inIFrame,SIMAD.AdServerAdapter.SOI.__init_includeSiteSpecificJS,SIMAD.AdServerAdapter.SOI.__init_includeGlobalV6,SIMAD.AdServerAdapter.SOI.__init_inIFrameAfter]}}}if(typeof SIMAD!=="undefined"&&typeof SIMAD.AdServerAdapter!=="undefined"&&typeof SIMAD.AdServerAdapter.Base!=="undefined"){SIMAD.AdServerAdapter.GoogleAdSense=SIMAD.Util.extend({},SIMAD.AdServerAdapter.Base,{__name:"GoogleAdSense",__googleAdsSum:0,__processedAd:undefined,getVideoAdRequest:function(a){return""},renderAd:function(a){if(a){if(this.__setGoogleAdParams(a)){this.__processedAd=a;window.google_ad_request_done=this.__googleAdRequestDone;document.write('<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"><\/script>')}}return this},styleAd:function(a){return""},getDimensions:function(a){var c=[0,0];if(a.getAdServerSpecific()&&a.getAdServerSpecific().GoogleAdSense&&a.getAdServerSpecific().GoogleAdSense.googleAds&&a.getAdServerSpecific().GoogleAdSense.googleAds.length>0){var b=a.getAdServerSpecific().GoogleAdSense.googleAds[0];if(b.type==="image"||b.type==="flash"){c[0]=b.image_width;c[1]=b.image_height}}return c},isDelivered:function(a){return(a.getAdServerSpecific()&&a.getAdServerSpecific().GoogleAdSense&&a.getAdServerSpecific().GoogleAdSense.googleAds&&a.getAdServerSpecific().GoogleAdSense.googleAds.length>0)},getReloaderFor:function(a){if(a.getAdServer()===this.getName()){return SIMAD.Reloader.GoogleAdSenseReloader}return undefined},__setGoogleAdParams:function(a){if(this.$s.adServerSpecific&&this.$s.adServerSpecific.GoogleAdSense){window.google_ad_client=this.$s.adServerSpecific.GoogleAdSense.google_ad_client;window.google_hints=this.$s.adServerSpecific.GoogleAdSense.google_hints||"";window.google_ad_output=this.$s.adServerSpecific.GoogleAdSense.google_ad_output;window.google_language=this.$s.adServerSpecific.GoogleAdSense.google_language||"de";window.google_encoding=this.$s.adServerSpecific.GoogleAdSense.google_encoding||"ISO-8859-1";window.google_feedback=this.$s.adServerSpecific.GoogleAdSense.google_feedback||"on";window.google_ad_section=this.$s.adServerSpecific.GoogleAdSense.google_ad_section||"default";window.google_ad_type=this.__getGoogleAdType(a)||"text";window.google_ad_channel=(typeof SIMAD.CmsAdapter.__getGoogleChannel==="function")?SIMAD.CmsAdapter.__getGoogleChannel(a):this.$s.adServerSpecific.GoogleAdSense.google_ad_channel;if(window.google_ad_type==="text"){if(a.getAdServerSpecific()&&a.getAdServerSpecific().GoogleAdSense&&a.getAdServerSpecific().GoogleAdSense.google_max_num_ads!==undefined){window.google_max_num_ads=a.getAdServerSpecific().GoogleAdSense.google_max_num_ads}else{SIMAD.Log.warn("GoogleAdSense parameter max_num_ads must be defined for ad "+a.getId())}}else{window.google_image_size=this.__getGoogleImageSize(a);window.google_max_num_ads=1}if(this.__googleAdsSum>0){window.google_skip=this.__googleAdsSum}return true}else{SIMAD.Log.error("No adServerSpecific configs for GoogleAdSense found.")}return false},__googleAdRequestDone:function(b){var c=SIMAD.AdServerAdapter.GoogleAdSense;if(b.length>0&&c.__processedAd){var a=c.__processedAd;a.addAdServerSpecific({GoogleAdSense:{googleAds:b}});var d=a.getOnRenderCallback()||c.__defaultOnRenderCallback;if(typeof(d)==="function"){document.write(d(a,b))}c.__googleAdsSum+=b.length}c.__processedAd=undefined},__getGoogleImageSize:function(a){var b=[];b[SIMAD.Format.FULLBANNER]="728x90";b[SIMAD.Format.SKYSCRAPER]="160x600";b[SIMAD.Format.MEDIUMRECTANGLE]="300x250";return(b[a.getFormat()]!==undefined)?b[a.getFormat()]:"728x90"},__getGoogleAdType:function(b){var a;if(b.getFormat()===SIMAD.Format.ADSENSETEXT){a="text"}else{a="image, flash"}return a},__defaultOnRenderCallback:function(d,c){SIMAD.Log.log("GoogleAdSense","Got following ad into the default onRenderCallback",{ad:d,googleAds:c});var b="";if(c.length>0){switch(c[0].type){case"text":for(var a=0;a<c.length;a++){b+='<div class="adword" style="border: 1px solid red; margin-bottom: 5px"><h4><a href="'+c[a].url+'" target="_top">'+c[a].line1+"</a></h4><p>"+c[a].line2+'</p><p><a href="'+c[a].url+'" target="_blank">'+c[a].visible_url+"</a></p></div>"}break;case"image":for(var a=0;a<c.length;a++){b+='<a href="'+c[a].url+'" target="_top" title="go to '+c[a].visible_url+'"><img border="0" src="'+c[a].image_url+'"width="'+c[a].image_width+'"height="'+c[a].image_height+'"></a>'}break;case"flash":for(var a=0;a<c.length;a++){b+='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="'+c[a].image_width+'" HEIGHT="'+c[a].image_height+'"> <PARAM NAME="movie" VALUE="'+c[a].image_url+'"><PARAM NAME="quality" VALUE="high"><PARAM NAME="AllowScriptAccess" VALUE="never"><EMBED src="'+c[a].image_url+'" WIDTH="'+c[a].image_width+'" HEIGHT="'+c[a].image_height+'" TYPE="application/x-shockwave-flash" AllowScriptAccess="never"  PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED></OBJECT>'}break;case"html":b+=c[a].snippet;break}}return b}})}if(SIMAD.Reloader&&SIMAD.Reloader.ReplacementFrameReloader){SIMAD.Reloader.GoogleAdSenseReloader=SIMAD.Util.extend({},SIMAD.Reloader.ReplacementFrameReloader);SIMAD.Reloader.GoogleAdSenseReloader.__name="GoogleAdSenseReloader";SIMAD.Reloader.GoogleAdSenseReloader.__onIFrameAdRendered=function(c){var b=c.calledFromAd;SIMAD.Log.log("AdReload","__onIFrameAdRendered() called for "+b.getId());if(b){b.unbindEvent("onIFrameAdFinished","__onIFrameAdRendered");SIMAD.Reloader.GoogleAdSenseReloader.clean(b);if(b.getWrapper()===null&&b.getPlaceholder()!==null){var e=b.getPlaceholder();if(e&&e.nodeName){var d=document.createElement("div");d.id=SIMAD.Core.getWrapperId(b);e.appendChild(d);b.setWrapper(d)}}if(b.getAdServerSpecific()&&b.getAdServerSpecific().GoogleAdSense&&b.getAdServerSpecific().GoogleAdSense.googleAds){var g=b.getOnRenderCallback()||SIMAD.AdServerAdapter.GoogleAdSense.__defaultOnRenderCallback;if(typeof(g)==="function"){var a=b.getAdServerSpecific().GoogleAdSense.googleAds;var f=b.getWrapper()||b.getPlaceholder();if(f){f.innerHTML=g(b,a)}}}b.setReloaded(true);b.triggerEvent("afterReload");SIMAD.Core.reloadNextAd()}}}if(typeof SIMAD!=="undefined"){SIMAD.CmsAdapter={config:function(a){return SIMAD.Core.config(a)},init:function(){return SIMAD.Core.init()},preInit:function(){return SIMAD.Core.preInit()},postInit:function(){return SIMAD.Core.postInit()},doAd:function(a,b){return SIMAD.Core.__doAd(a,b)},finalize:function(){return SIMAD.Core.__finalize()},reloadAds:function(a){return SIMAD.Core.reloadAds(a)},getVideoAdRequest:function(a){return SIMAD.Core.getVideoAdRequest(a)},getAd:function(a){return SIMAD.Core.getAd(a)},getAds:function(a){return SIMAD.Core.getAds(a)},addAd:function(a){return SIMAD.Core.addAd(a)},updateConfig:function(a){return SIMAD.Core.updateConfig(a)},getConfig:function(){return SIMAD.Core.getConfig()},hideAds:function(){return SIMAD.Core.hideAds()},showAds:function(){return SIMAD.Core.showAds()},newSession:function(a){return SIMAD.Core.newSession(a)},closeSession:function(a){return SIMAD.Core.closeSession(a)},bindEvent:function(a,c,b){return SIMAD.Core.bindEvent(a,c,b)},unbindEvent:function(a,b){return SIMAD.Core.unbindEvent(a,b)},__getTLD:function(c){if(!this.__tld){if(typeof(c.domain)==="string"){var a=c.domain.split(".");this.__tld=a[a.length-1]}var b=SIMAD.Core.getLocationParams();if(b&&b.simad_tld){this.__tld=b.simad_tld}}return this.__tld}}}if(typeof SIMAD!=="undefined"){SIMAD.CmsAdapter.doAdInstream=function(a){this.doAd(a,"inSlotBegin")};SIMAD.CmsAdapter.finishAdInstream=function(a){this.doAd(a,"inSlotEnd")};SIMAD.CmsAdapter.doAdPoststream=function(a){this.doAd(a,"outOfSlotBegin")};SIMAD.CmsAdapter.finishAdPoststream=function(a){this.doAd(a,"outOfSlotEnd")};SIMAD.CmsAdapter.setTaxonomy=function(a){return this.updateConfig(this.__normalizeJSON1G(a))};SIMAD.CmsAdapter.setProperty=function(e,c){var d={};if(typeof(e)==="object"){d=this.__normalizeJSON1G(e)}else{if(typeof(e)==="string"){switch(e){case"debugLog":d.debug={};d.debug.all=c;break;case"globalAdTagsLoading":var b=SIMAD.Core.getAds();switch(c){case SIMAD.Loading.INSTREAM:for(var a=0;a<b.length;a++){b[a].setLoading(SIMAD.Loading.INSTREAM);b[a].activate()}break;case SIMAD.Loading.POSTSTREAM:for(var a=0;a<b.length;a++){b[a].setLoading(SIMAD.Loading.POSTSTREAM);b[a].activate()}break;case SIMAD.Loading.ONEVENT:for(var a=0;a<b.length;a++){b[a].deactivate()}break;case SIMAD.Loading.INDIVIDUAL:for(var a=0;a<b.length;a++){b[a].activate()}break}break;case"includedAdTypes":if(typeof(c)==="object"){d=this.__normalizeJSON1G({includedAdTypes:c})}break;default:d[e]=c;break}}}return this.updateConfig(d)};SIMAD.CmsAdapter.getProperty=function(h){switch(h){case"globalAdTagsLoading":var g=this.getAds(function(i){return i.isActive()});if(this.getAds(function(i){return i.isActive()}).length===0&&this.getAds().length>0){return SIMAD.Loading.ONEVENT}if(this.getAds(function(i){return i.getLoading()===SIMAD.Loading.POSTSTREAM}).length===this.getAds().length&&this.getAds().length>0){return SIMAD.Loading.POSTSTREAM}if(this.getAds(function(i){return i.getLoading()===SIMAD.Loading.INSTREAM}).length===this.getAds().length&&this.getAds().length>0){return SIMAD.Loading.INSTREAM}return SIMAD.Loading.INDIVIDUAL;break;case"includedAdTypes":var e=this.getConfig().dynamicAds;if(e.include==="none"&&e.exceptOf&&e.exceptOf.length===0){return{sowefo:false,popup:false,wallpaper:false,powerbanner:false,powerlayer:false,powerrectangle:false}}else{if(e.include==="none"&&e.exceptOf&&e.exceptOf.length>0){var a={sowefo:true};var f={popup:SIMAD.Format.POPUP_WINDOW,wallpaper:SIMAD.Format.WALLPAPER,powerlayer:SIMAD.Format.POWERLAYER,powerbanner:SIMAD.Format.POWERBANNER,powerrectangle:SIMAD.Format.POWERRECTANGLE};var b;var d;for(var c in f){d=false;for(b=0;b<e.exceptOf.length;b++){if(f[c]===e.exceptOf[b]){d=true}}a[c]=d}return a}else{if(e.include==="all"){var a={sowefo:true};var f={popup:SIMAD.Format.POPUP_WINDOW,wallpaper:SIMAD.Format.WALLPAPER,powerlayer:SIMAD.Format.POWERLAYER,powerbanner:SIMAD.Format.POWERBANNER,powerrectangle:SIMAD.Format.POWERRECTANGLE};var b;var d;for(var c in f){d=true;for(b=0;b<e.exceptOf.length;b++){if(f[c]===e.exceptOf[b]){d=false}}a[c]=d}return a}else{return undefined}}}break;case"debugLog":return SIMAD.Core.$s.debug.all;break}return this.getConfig()[h]};SIMAD.CmsAdapter.setAdProperty=function(a,d,c){var b=this.getAd(a);if(b){switch(d){case"loading":if(c===SIMAD.Loading.ONEVENT){b.deactivate();b.setLoading(SIMAD.Loading.INSTREAM)}else{b.activate();b.setLoading(c)}break;case"adTag":b.setFormat(c);break;case"onLoadCallback":b.setOnLoadCallback(c);break;case"onRenderCallback":b.setOnRenderCallback(c);break;case"placeholder":b.setPlaceholder(c);break}return b}return undefined};SIMAD.CmsAdapter.getAdProperty=function(a,c){var b=this.getAd(a);if(b){switch(c){case"loading":if(!b.isActive()){return SIMAD.Loading.ONEVENT}return b.getLoading();break;case"adTag":return b.getFormat();break;case"onLoadCallback":return b.getOnLoadCallback();break;case"onRenderCallback":return b.getOnRenderCallback();break;case"placeholder":return b.getPlaceholder();break}}return undefined};SIMAD.CmsAdapter.addAdTag=function(a){SIMAD.Log.log("input","addAdTag() was called with",a);return this.addAd(a)};SIMAD.CmsAdapter.addAd=function(a){var b={adTagList:[a]};b=this.__normalizeJSON1G(b);var c;if(b.ads&&b.ads[0]){if(SIMAD.Util.filter(SIMAD.Core.getAds(),function(d){return !d.isActive()}).length===SIMAD.Core.getAds().length&&SIMAD.Core.getAds().length>0){b.ads[0].active=false}c=SIMAD.Core.addAd(new SIMAD.Ad(b.ads[0]));c.bindEvent("onLoad","CMSonLoadCallback",this.__callOnloadCallbackFunction)}return c};SIMAD.CmsAdapter.__callOnloadCallbackFunction=function(a){var b=a.calledFromAd;var c=b.getOnLoadCallback();if(typeof(c)==="function"){var d=b;if(d.isActive()){d.loading=b.getLoading()}else{d.loading=SIMAD.Loading.ONEVENT}d.id=b.getId();d.adTag=b.getFormat();c(d);delete d.id;delete d.adTag;delete d.loading}};SIMAD.CmsAdapter.__normalizeJSON1G=function(c){if(c){c=SIMAD.Util.extend({},c);if(typeof(c.adTagList)!=="undefined"){c.ads=c.adTagList.slice();delete c.adTagList}if(typeof(c.debugLog)!=="undefined"){c.debug={all:c.debugLog};delete c.debugLog}if(typeof(c.ads)!=="undefined"){for(var b=0;b<c.ads.length;b++){if(typeof(c.ads[b].adTag)!=="undefined"){c.ads[b].format=c.ads[b].adTag;delete c.ads[b].adTag}if(typeof(c.ads[b].active)==="undefined"){c.ads[b].active=true}if(c.ads[b].loading===SIMAD.Loading.ONEVENT){c.ads[b].loading=SIMAD.Loading.POSTSTREAM;c.ads[b].active=false}}}if(typeof(c.includedAdTypes)!=="undefined"){if(c.includedAdTypes.sowefo===false){c.dynamicAds={include:"none",exceptOf:[]}}else{if(!c.dynamicAds){c.dynamicAds={include:"all",exceptOf:[]}}var d={popup:SIMAD.Format.POPUP_WINDOW,wallpaper:SIMAD.Format.WALLPAPER,powerlayer:SIMAD.Format.POWERLAYER,powerbanner:SIMAD.Format.POWERBANNER,powerrectangle:SIMAD.Format.POWERRECTANGLE};for(var b in c.includedAdTypes){var e=false;if(d[b]&&c.includedAdTypes[b]===false){c.dynamicAds.exceptOf.push(d[b])}}}delete c.includedAdTypes}if(typeof(c.globalAdTagsLoading)!=="undefined"){switch(c.globalAdTagsLoading){case SIMAD.Loading.INSTREAM:case SIMAD.Loading.POSTSTREAM:for(var b=0;b<c.ads.length;b++){c.ads[b].loading=c.globalAdTagsLoading}break;case SIMAD.Loading.ONEVENT:for(var b=0;b<c.ads.length;b++){c.ads[b].active=false}break}delete c.globalAdTagsLoading}if(typeof(c.video)!=="undefined"&&typeof(c.video.availableAdTags)!=="undefined"){c.video.adFilter=SIMAD.Util.extend(true,{},c.video.availableAdTags);c.video.adFilter.all=c.video.adFilter.videoAds;delete c.video.availableAdTags;delete c.video.adFilter.videoAds}if(typeof(c.adserverSpecific)!=="undefined"){c.adServerSpecific={};var a=this.__getUsedAdServer(c);if(a){c.adServerSpecific[a]=SIMAD.Util.extend(true,{},c.adserverSpecific)}else{SIMAD.Log.warn("No used adserver found.")}delete c.adserverSpecific}}return c};SIMAD.CmsAdapter.getAdInIFrame=function(){var a=SIMAD.Core.adInIFrame;if(!a){a={getId:function(){return""}}}return a};SIMAD.CmsAdapter.configIFrame=function(){return SIMAD.Core.configInIFrame()}}if(typeof SIMAD!=="undefined"&&typeof(SIMAD.CmsAdapter)!=="undefined"){SIMAD.CmsAdapter.config=function(e){SIMAD.Log.log("config CMS","config() was called with",e);e=this.__normalizeJSON1G(e);e.contentType=this.__mapContentType(e.contentType);if(!e.adServerSpecific){e.adServerSpecific={}}if(!e.adServerSpecific[this.__getUsedAdServer(e)]){e.adServerSpecific[this.__getUsedAdServer(e)]={}}switch(this.__getTLD(e)){case"at":e.adServerSpecific[this.__getUsedAdServer(e)].domainId="pro7at";break;case"ch":e.adServerSpecific[this.__getUsedAdServer(e)].domainId="pro7ch";e.adServerSpecific[this.__getUsedAdServer(e)].siteSpecificJS="http://adserver.71i.de/global_js/Sites/wcms_pro7ch.js";break;case"de":default:e.adServerSpecific[this.__getUsedAdServer(e)].domainId="pro7de";e.adServerSpecific[this.__getUsedAdServer(e)].siteSpecificJS="http://adserver.71i.de/global_js/Sites/wcms_pro7de.js";break}if(e.cmsSpecific){e.cmsSpecific.marketingCluster=this.__mapMarketingCluster(e.cmsSpecific.marketingCluster)}if(!e.adServers){e.adServers=[]}e.adServers.push(this.__getUsedAdServer(e));if(e.video){e.video.__setByCMS=true;if(e.video.__adServer===undefined){e.video.__adServer=this.__getUsedAdServer(e)}if(e.video.adFilter&&e.contentType===SIMAD.ContentType.VIDEO){e.video.adFilter=SIMAD.Util.extend({all:true,preroll:true,postroll:true,midroll:true,overlay:true,sponsor:true},e.video.adFilter);if(e.video.type==="short"){e.video.adFilter.midroll=false}}else{SIMAD.Log.warn("The content type of the page with inline video metadata is not CPplayer")}}e.adServers.push("GoogleAdSense");e.adServerSpecific.GoogleAdSense={google_ad_client:"ca-pub-1038447960997101",google_ad_output:"js",google_feedback:"on"};for(var c=0;c<e.ads.length;c++){if(e.ads[c].format===SIMAD.Format.ADSENSETEXT&&e.ads[c].adServer===undefined){e.ads[c].adServer="GoogleAdSense"}}if(e.staticIFrameLocation===undefined){e.staticIFrameLocation="/adserver/staticiframe.html"}var d=SIMAD.Core.config(e);var b=SIMAD.getAds();for(var a=0;a<b.length;a++){b[a].bindEvent("onLoad","CMSonLoadCallback",this.__callOnloadCallbackFunction)}return d};SIMAD.CmsAdapter.__getGoogleChannel=function(b){var a=SIMAD.Core.getConfig();var e=["stromberg","popstars","germanys_next_topmodel","taff","galileo"];var c=[];var d;if(SIMAD.Util.inArray(e,a.subchannel1)){d=a.subchannel1+"_AdSense_"}else{d=a.cmsSpecific.marketingCluster+"_AdSense_"}d=d.slice(0,1).toUpperCase()+d.slice(1);c.push(d+"Gesamt");c.push(d+b.getId());c.push("Gesamt_"+b.getId());return c.join(",")};SIMAD.CmsAdapter.__getOASTaxonomyString=function(a){if(a==="pro7at/lifestyle/sendungen/germanys_next_topmodel"){a=a+"/home"}return a};SIMAD.CmsAdapter.reloadAds=function(d){if(d===undefined){d={}}else{if(d.length!==undefined){d={ads:d}}}switch(SIMAD.Core.getConfig().contentType){case SIMAD.ContentType.VIDEO:case SIMAD.ContentType.RICH_VIDEO:var c=SIMAD.Core.getAds(function(e){return e.getFormat()===SIMAD.Format.SKYSCRAPER||e.getFormat()===SIMAD.Format.FULLBANNER});for(var b=0;b<c.length;b++){c[b].activate()}break;case SIMAD.ContentType.VIDEO_OVERVIEW:var a=SIMAD.Core.getAds(function(e){return e.getFormat()===SIMAD.Format.SKYSCRAPER});for(var b=0;b<a.length;b++){a[b].deactivate().clear();a[b].triggerEvent("onLoad")}var c=SIMAD.Core.getAds(function(e){return e.getFormat()===SIMAD.Format.FULLBANNER});for(var b=0;b<c.length;b++){c[b].activate()}break;case SIMAD.ContentType.GALLERY_IMAGE:d.force=false;break}SIMAD.Core.reloadAds(d)};SIMAD.CmsAdapter.updateConfig=function(a){if(a.cmsSpecific){a.cmsSpecific.marketingCluster=this.__mapMarketingCluster(a.cmsSpecific.marketingCluster)}if(typeof a.contentType==="string"){a.contentType=this.__mapContentType(a.contentType)}return SIMAD.Core.updateConfig(a)};SIMAD.CmsAdapter.getConfig=function(){var a=SIMAD.Core.getConfig();a.contentType=this.__mapContentType(a.contentType,true);return a};SIMAD.CmsAdapter.__mapMarketingCluster=function(b){if(typeof b==="string"){var a=b.split(".");b=a[a.length-1]}return b};SIMAD.CmsAdapter.__mapContentType=function(d,a){var c=[];c["np.cat.mediatyp.home"]=SIMAD.ContentType.HOME;c["np.catdimension.mediatyp.teaserhome"]=SIMAD.ContentType.HOME;c.MCcontent=SIMAD.ContentType.VIDEO_OVERVIEW;c["np.cat.mediatyp.mediacenter.video"]=SIMAD.ContentType.RICH_VIDEO;c.MCplayer=SIMAD.ContentType.RICH_VIDEO;c["np.cat.mediatyp.videopage"]=SIMAD.ContentType.VIDEO;c.CPplayer=SIMAD.ContentType.VIDEO;c["np.cat.mediatyp.ugc"]=SIMAD.ContentType.COMMUNITY;c["np.cat.mediatyp.gallery"]=SIMAD.ContentType.GALLERY;c.gallery_zoom=SIMAD.ContentType.GALLERY_IMAGE;c["np.catdimension.mediatyp.game"]=SIMAD.ContentType.GAME;c["np.catdimension.mediatyp.shop"]=SIMAD.ContentType.SHOP;c["np.catdimension.mediatyp.gewinnspiel"]=SIMAD.ContentType.RAFFLE;c.error=SIMAD.ContentType.ERROR;if(a){for(var b in c){if(c[b]===d){return b}}return"np.catdimension.mediatyp.content"}else{return(typeof c[d]!=="undefined")?c[d]:SIMAD.ContentType.DEFAULT}};SIMAD.CmsAdapter.__getUsedAdServer=function(a){if(!this.__usedAdServer){switch(this.__getTLD(a).toLowerCase()){case"at":this.__usedAdServer="OAS";break;case"ch":case"de":default:this.__usedAdServer="SOI";break}}return this.__usedAdServer}}if(typeof SIMAD==="undefined"){SIMAD={}}if(typeof SIMAD.VideoAdapter==="undefined"){SIMAD.VideoAdapter={}}SIMAD.VideoAdapter.AdBridge={__mapAdBrideJsonToSIMADJson:function(c){var a={video:{}};if(c){if(c.triggered_for){a.contentType=c.triggered_for;switch(a.contentType){case"MCplayer":case"CPplayer":a.video.availableAdTags={videoAds:true,preroll:true,postroll:true,midroll:true,overlay:true,sponsor:true};break;case"MCcontent":a.video.availableAdTags={videoAds:false,preroll:false,postroll:false,midroll:false,overlay:false,sponsor:false};break}a.video.player=c.triggered_for}if(c.path){a.video.path=c.path;var b=c.path.split("/");if(b.length>0&&b[0]===""){b.shift()}var e=["channel","subchannel1","subchannel2","subchannel3","subchannel4","subchannel5"];for(var d=0;(d<b.length&&d<e.length);d++){a[e[d]]=b[d]}}if(c.marketingCluster){a.cmsSpecific={};a.cmsSpecific.marketingCluster=c.marketingCluster}if(c.video_type){a.video.type=c.video_type}if(a.contentType==="CPplayer"||a.contentType==="MCplayer"){a.video.availableAdTags={};if(c.ad_exclude_all===1||c.ad_exclude_all==="1"||c.ad_exclude_all===true){a.video.availableAdTags.videoAds=false;a.video.availableAdTags.preroll=false;a.video.availableAdTags.postroll=false;a.video.availableAdTags.sponsor=false}else{a.video.availableAdTags.videoAds=true;a.video.availableAdTags.preroll=true;a.video.availableAdTags.postroll=true;a.video.availableAdTags.sponsor=true}if(c.ad_exclude_midroll===1||c.ad_exclude_midroll==="1"||c.ad_exclude_midroll===true||a.video.availableAdTags.videoAds===false){a.video.availableAdTags.midroll=false}else{a.video.availableAdTags.midroll=true}if(c.ad_exclude_overlays===1||c.ad_exclude_overlays==="1"||c.ad_exclude_overlays===true||a.video.availableAdTags.videoAds===false){a.video.availableAdTags.overlay=false}else{a.video.availableAdTags.overlay=true}if(c.video_type==="short"){a.video.availableAdTags.midroll=false}}a.video.__adServer=SIMAD.CmsAdapter.__getUsedAdServer();a=SIMAD.Util.extend(true,a,this.__mapCallbackFunctionToSIMADJson(c))}return a},__mapCallbackFunctionToSIMADJson:function(b){var a={video:{}};a.video.onLoadCallback=b.callback_function;a.video.objectForOnLoadCallback=(b.callback_id)?document.getElementById(b.callback_id):undefined;return a},updateAds:function(e){SIMAD.Log.log("Video","updateAds called in video adapter with",e);var b=SIMAD.getConfig();if(b.video&&b.video.__setByCMS){SIMAD.CmsAdapter.setTaxonomy(SIMAD.Util.extend(true,{video:b.video},this.__mapCallbackFunctionToSIMADJson(e)));this.doAdBridgeCallback()}else{if(e){var c=this.__mapAdBrideJsonToSIMADJson(e);SIMAD.CmsAdapter.setTaxonomy(c);if(!b.adFree){var d=SIMAD.AdServerAdapter[c.video.__adServer].getVideoAdInitiationAdFormat();var a=SIMAD.CmsAdapter.getAds(function(f){return f.getFormat()===d&&f.getAdServer()===c.video.__adServer});if(a[0]){a[0].bindEvent("afterReload","VideoAdInit",SIMAD.VideoAdapter.AdBridge.doAdBridgeCallback)}else{SIMAD.Log.warn("Video: the AdBridge callback function couldn't be bound to the a object")}SIMAD.CmsAdapter.reloadAds()}}if(b.adFree){this.doAdBridgeCallback()}}return this},doAdBridgeCallback:function(){var f=SIMAD.getConfig();var a;try{a=(f.adFree||!f.video.adFilter.all)?0:1}catch(g){SIMAD.Log.warn("Can't access the video settings in doAdBridgeCallback function")}var d=f.video.onLoadCallback;if(!d){return}var c=f.video.objectForOnLoadCallback;if(!c){c=window}var b={init:a,ad_type:f.video.__adServer,tld:SIMAD.Core.getTLD()};try{SIMAD.Log.log("Video","doAdBridgeCallback for "+d+" called with arguments:",b);c[d](b)}catch(g){SIMAD.Log.warn("doAdBridgeCallback for "+d+" FAILED with arguments:",b);return}return true},__allowVideoAdRequest:function(c){var b=false;var a=SIMAD.getConfig();if(!a.adFree){if(typeof a.video!=="undefined"&&typeof a.video.adFilter!="undefined"){if(a.video.adFilter.all){if(c.match(/^preroll/)&&a.video.adFilter.preroll){b=true}else{if(c.match(/^postroll/)&&a.video.adFilter.postroll){b=true}else{if(c.match(/^(presplit|midroll|postsplit)/)&&a.video.adFilter.midroll){b=true}else{if(c.match(/^overlay/)&&a.video.adFilter.overlay){b=true}else{if(c.match(/^sponsor/)&&a.video.adFilter.sponsor){b=true}}}}}}}}return b},getVideoAdRequest:function(c,b){SIMAD.Log.log("Video","getVideoAdRequest called in video adapter for "+c,b);var a="";if(this.__allowVideoAdRequest(c)){b.video_ad_id=c;a=SIMAD.CmsAdapter.getVideoAdRequest(b)}else{SIMAD.Log.log("Video","getVideoAdRequest sciped for "+c)}return a},handleEvent:function(a){if(typeof a==="object"){SIMAD.Log.log("Video","handle event called",a);switch(a.screen_mode){case"normal":SIMAD.CmsAdapter.showAds();break;case"fullsize":SIMAD.CmsAdapter.hideAds();break}}else{SIMAD.Log.warn("VideoAdapter.AdBridge.handleEvent() was called with wrong parametes")}},getTLD:function(){return SIMAD.Core.getTLD()}};