function SIMAdHandler(_1,_2,_3,_4){
var _5=arguments.callee;
_5.VERSION="$Revision: 1.41 $Date: 2009/12/07 11:31:20 $";
this.__DOM_SAFE_ID="simadwriter-dom-safe";
this.__config=typeof (_4)=="object"?_4:{};
this.adType=this.adserver=_1&&typeof (_5.EXTENSIONS)=="object"&&typeof (_5.EXTENSIONS[_1])=="object"?_1:"DUMMY";
this.__window=(_3||window);
this.__start_time=(new Date()).getTime();
this.__adserver_call=_2;
this.__dimensions={};
this.__adtrace={};
this.__loading_starts={};
if(!this.__config.tld){
this.__config.tld="";
}
if(!this.__config.available_ad_ids){
this.__config.available_ad_ids=[];
}
if(!this.__config.available_video_ads){
this.__config.available_video_ads=[];
}
this.bannerAdRequests={};
this.videoAdRequests={};
if(!_5.__init_general){
_5.__init_general=1;
_5.prototype.__default_ad_iframe="./adtags.iframe.php";
_5.prototype.getAdtrace=function(_6){
var _7="";
if(arguments.length==0){
for(var _8 in this.__adtrace){
_7+=_8+" - "+this.__adtrace[_8]+"\n";
}
}else{
_7=this.__adtrace[_6]||"";
if(_7){
_7=_6+" - "+_7;
}
}
return _7;
};
_5.prototype.getAdDimensions=function(_9){
return this.__dimensions[_9]||[0,0];
};
_5.prototype.getOffsetDimensions=function(_a){
var _b=document.getElementById(this.getSelector("target",_a));
if(!_b){
return [];
}
return [_b.offsetWidth,_b.offsetHeight];
};
_5.prototype.getSelector=function(){
if(!arguments.length){
return "";
}
var s="";
for(var i=0;i<arguments.length;i++){
if(!arguments[i]){
continue;
}
if(s){
s+="_";
}
s+=arguments[i];
}
return s?(this.__getConfig("container_prefix")||"")+s:"";
};
_5.prototype.start=function(){
if(typeof (this.__start)=="function"){
this.__start();
}
};
_5.prototype.finish=function(_e){
var _f;
try{
_f=typeof (SIMAdLayoutHandler.adjust.finish)=="function"?true:false;
}
catch(e){
this.__logMsg("finish:\n"+this.__catchMe(e));
}
if(!_f){
return;
}
var f=function(){
SIMAdLayoutHandler.adjustLayoutFor("finish",_e);
};
this.__addOnloadEvent(f);
};
_5.prototype.finishAd=function(id,_12){
if(typeof (_12)!="object"){
_12={};
}
var pos=_12.pos||"";
var _14=id=="shoppingtipp"?id+pos:id;
var _15=_12.triggered_from_iframe?true:false;
var _16=this.__findMaster();
if(id=="shoppingtipps"){
if(_16||_15){
return;
}
try{
SIMAdDeliveryHandler.moveAd(_12.block_id);
}
catch(e){
this.__logMsg("finishAd for "+id+":\n"+this.__catchMe(e));
}
return;
}
if(_16){
this.setAdInfo(_14);
this.syncVars(window,parent,"after");
_16.finishAd(_14,{triggered_from_iframe:true});
}else{
try{
if(_15){
this.__finishIFrameAd(_14);
}else{
this.setAdInfo(_14);
}
var _17=SIMAdDeliveryHandler.isDelivered(_14);
if(id=="shoppingtipp"){
if(!_15){
var _18=_12.block_id;
var _19=_12.last||0;
if(_17){
SIMAdLayoutHandler.renderAd(id,{pos:pos,last:_19});
}
SIMAdDeliveryHandler.controlAdContainer(_14,this.getSelector(_18));
SIMAdLayoutHandler.adjustLayoutFor(id,{pos:pos,last:_19});
}
}else{
if(_17&&!_15){
SIMAdDeliveryHandler.moveAd(_14);
}
SIMAdDeliveryHandler.controlAdContainer(_14,this.getSelector(_14));
SIMAdLayoutHandler.adjustLayoutFor(_14);
}
}
catch(e){
this.__logMsg("finishAd for "+id+":\n"+this.__catchMe(e));
return;
}
}
var _1a="";
if(this.__loading_starts[_14]){
_1a=" [loading time: "+(((new Date()).getTime()-this.__loading_starts[_14])/1000)+" secs]";
}
this.__logMsg("finishAd for "+_14+_1a,{},2);
};
_5.prototype.isUpdateStart=function(){
return (this.__is_update_start||0);
};
_5.prototype.updateAds=function(_1b){
var _1c=this.__isDOMSafe();
if(_1c==0){
var _1d=this;
setTimeout(function(){
_1d.updateAds(_1b);
},50);
return;
}else{
if(_1c<0){
}
}
this.__logMsg("updateAds called with arguments:",_1b);
this.__initUpdateConfig(_1b);
if(this.adType=="DUMMY"){
this.__doCallback(0);
}else{
this.__startAdUpdate();
}
};
_5.prototype.handleEvent=function(_1e){
if(!_1e||typeof (_1e)!="object"){
return;
}
var _1f=_1e.event;
if(!_1f){
return;
}
var _20=this.__getUpdateConfig("content_type");
if(_1f=="screen"){
var _21;
if(_20=="MCcontent"){
_21=1;
}else{
if(_20=="MCplayer"||_20=="CPplayer"){
var _22=(_1e.screen_mode||"normal");
_21=_22=="fullsize"?0:1;
}else{
return;
}
}
this.__logMsg("handleEvent called with arguments:",_1e);
this.__setDisplayForAdIFrames(_21);
}
};
_5.prototype.loadNextIFrameAd=function(_23,_24){
if(!_23){
if(this.__getUpdateConfig("pausing")){
this.__logMsg("loadNextIFrameAd is pausing",{},3);
return;
}
var _25=this.__getUpdateConfig("pause_after");
if(typeof (_25)!="undefined"&&_25!=null){
if(_25===this.__getCurrentAdID()||_25===this.__getCurrentUpdateIndex()){
this.__setUpdateConfig("pausing",true);
this.__logMsg("loadNextIFrameAd: set pausing after "+this.__getCurrentAdID(),{},3);
return;
}
}
}
var _26=this.__getNextAdID(_23,_24);
if(!_26){
return;
}
var _27=this.__getUpdateConfig("ad_iframe")||this.__getConfig("ad_iframe")||this.__default_ad_iframe;
if(!_27){
return;
}
if(typeof (this.__update_config)!="object"){
this.updateAds();
return;
}
var _28=(this.__getUpdateConfig("content_type")||"");
var url=_27+"?ad_tld="+escape(this.getTLD())+"&path="+escape(this.__getUpdateConfig("path"))+"&ad_id="+escape(_26);
if(_28){
url+="&content_type="+escape(_28);
}
var _2a=this.__getUpdateConfig("available_ad_ids")||[];
if(_2a.length){
url+="&all_iframe_ads="+escape(_2a.join("-"));
}
if(_28.match(/^(video|CPplayer|MCplayer)$/)){
var _2b=this.__getUpdateConfig("video_type");
var _2c=this.__getUpdateConfig("screen_mode");
if(_2b){
url+="&video_type="+escape(_2b);
}
if(_2c&&_2c!="normal"){
url+="&video_screen_mode="+escape(_2c);
}
if(this.__getUpdateConfig("ad_exclude_all")){
url+="&video_no_ad=1";
}
if(this.__getUpdateConfig("ad_exclude_sponsor")){
url+="&video_no_sponsor=1";
}
if(this.__getUpdateConfig("ad_exclude_midroll")){
url+="&video_no_midroll=1";
}
if(this.__getUpdateConfig("ad_exclude_overlays")){
url+="&video_no_overlay=1";
}
}
var _2d=window.location.search;
if(_2d){
var _2e=_2d.match(/(?:[ios]+_[a-z]+_[a-z]+|[df][a-z]+_ads_?[a-z]*|ad_[a-z]+)=[a-zA-Z0-9_-]*/g);
if(_2e){
url+="&"+_2e.join("&");
}
}
var ok=false;
try{
ok=this.__getIFrameHandler().loadIFrame(_26,url);
this.__logMsg("loadNextIFrameAd for "+_26+" session id: "+this.getSessionID()+(ok?" successful":" failed"));
if(!ok){
ok=this.loadNextIFrameAd(_23,true);
}
}
catch(e){
this.__logMsg("loadNextIFrameAd for "+_26+":\n"+this.__catchMe(e));
}
return ok?true:false;
};
_5.prototype.resumeUpdate=function(){
var _30=this.__getUpdateConfig("pausing");
this.__logMsg(_30?"resumeUpdate started":"resumeUpdate impossible");
if(!_30){
return;
}
this.__setUpdateConfig("pausing",false);
this.__setUpdateConfig("pause_after",null);
this.loadNextIFrameAd();
};
_5.prototype.resizeIFrame=function(_31){
var _32=this.getAdDimensions(_31);
var x=_32[0];
var y=_32[1];
if(x==1&&y==1){
x=y=0;
}
try{
this.__getIFrameHandler().resizeIFrame(_31,[x,y]);
}
catch(e){
this.__logMsg("resizeIFrame for "+_31+":\n"+this.__catchMe(e));
return;
}
return true;
};
_5.prototype.syncVars=function(_35,to,_37){
if(typeof (_35)!="object"||typeof (to)!="object"){
return;
}
if(_35==to){
return;
}
var _38=(this.__sync_vars[_37]||[]);
for(var i=0;i<_38.length;i++){
to[_38[i]]=_35[_38[i]];
}
};
_5.prototype.hasVideoAds=function(){
if(arguments.length){
this.__setConfig("videoad",arguments[0]);
}
return this.__getConfig("videoad");
};
_5.prototype.getTLD=function(){
return this.__getConfig("tld");
};
_5.prototype.getSessionID=function(){
return this.__session_id||"";
};
_5.prototype.doLog=function(_3a){
if(typeof (_3a)!="undefined"){
this.__setConfig("do_log",parseInt(_3a));
}
return this.__getConfig("do_log");
};
_5.prototype.showLog=function(){
if(!this.__log){
return "";
}
var _3b=this.__log.join("\n\n");
if(_3b){
_3b="ALL TIMES ARE GIVEN IN SECS AFTER INIT OF SIMAdWriter\n\n"+_3b;
}
return _3b;
};
_5.prototype.clearLog=function(){
this.__log=[];
};
_5.prototype.__getProtocol=function(){
if(!this.__protocol){
if(typeof (this.__setProtocol)=="function"){
this.__setProtocol();
}else{
this.__protocol="http:";
}
}
return this.__protocol;
};
_5.prototype.__initInstance=function(){
try{
this.__extend();
}
catch(e){
this.__logMsg("__initInstance:\n"+this.__catchMe(e));
}
this.__setSessionID();
if(typeof (this.__setSpecialProperties)=="function"){
this.__setSpecialProperties();
}
if(typeof (this.__setSyncVars)=="function"){
this.__setSyncVars();
}
if(parent==window&&!document.getElementById(this.__DOM_SAFE_ID)){
document.write("<div id=\""+this.__DOM_SAFE_ID+"\" style=\"display:none\"></div>");
}
try{
var _3c=top.location.search.match(/simadwriter_debug=([0-9]+)/);
if(_3c){
this.doLog(_3c[1]);
}
}
catch(e){
this.__logMsg("__initInstance:\n"+this.__catchMe(e));
}
if(this.adType!="DUMMY"){
this.__logMsg("new\nadType: "+this.adType,this.__config);
}
};
_5.prototype.__addOnloadEvent=function(f){
if(window.addEventListener){
window.addEventListener("load",f,false);
}else{
if(window.attachEvent){
window.attachEvent("onload",f);
}else{
f();
}
}
};
_5.prototype.__extend=function(){
if(!_5.EXTENSIONS){
return;
}
var _3e=_5.EXTENSIONS[this.adType];
if(typeof (_3e)!="object"){
return;
}
for(var key in _3e){
this[key]=_3e[key];
}
};
_5.prototype.__setSessionID=function(){
var _40=this.__findMaster();
var _41=String(Math.random()).substring(2,11);
this.__session_id=_40?(_40.getSessionID()||_41):_41;
return this.__session_id;
};
_5.prototype.__getAdserverCall=function(){
var _42=this.__adserver_call;
var _43=typeof (_42);
if(_43=="string"){
_42=window[_42];
}
if(typeof (_42)!="function"){
_42=function(){
return "";
};
}
return _42;
};
_5.prototype.__startAdUpdate=function(){
this.__setSessionID();
this.__clearAdContainers();
this.__clearDebugPanel();
if(this.__sync_vars){
for(var key in this.__sync_vars){
var _45=(this.__sync_vars[key]||[]);
for(var i=0;i<_45.length;i++){
window[_45[i]]=undefined;
}
}
}
this.bannerAdRequests={};
this.videoAdRequests={};
this.__dimensions={};
this.__adtrace={};
this.__loading_starts={};
this.loadNextIFrameAd(true);
};
_5.prototype.__findMaster=function(key){
if(window==parent){
return;
}
if(!this.__master){
try{
if(parent.SIMAdWriter){
this.__master=parent.SIMAdWriter;
}
}
catch(e){
this.__logMsg("__findMaster:\n"+this.__catchMe(e));
}
}
return this.__master;
};
_5.prototype.__getConfig=function(key){
if(!key||typeof (this.__config)!="object"){
return;
}
return this.__config[key];
};
_5.prototype.__setConfig=function(key,_4a){
if(!key){
return;
}
if(typeof (this.__config)!="object"){
this.__config={};
}
this.__config[key]=_4a;
};
_5.prototype.__initUpdateConfig=function(_4b){
this.__update_config={};
this.__video_ads_skip={};
if(typeof (_4b)=="object"){
for(var key in _4b){
var _4d=_4b[key];
if(key=="pause_after"){
if(typeof (_4d)=="string"){
if(_4d.match(/^[0-9]+$/)){
_4d=Number(_4d);
}
}else{
if(typeof (_4d)!="number"){
continue;
}
}
}
this.__setUpdateConfig(key,_4d);
}
}
var _4e=(this.__getUpdateConfig("triggered_for")||"");
if(_4e=="CPplayer"){
this.__setUpdateConfig("content_type","CPplayer");
}else{
if(_4e=="MCplayer"){
this.__setUpdateConfig("content_type","MCplayer");
}else{
if(_4e=="MCcontent"){
this.__setUpdateConfig("content_type","MCcontent");
}else{
if(_4e=="video"){
this.__setUpdateConfig("content_type","video");
}else{
if(_4e=="contentgallery"){
this.__setUpdateConfig("content_type","gallery");
}
}
}
}
}
if(!this.__getUpdateConfig("available_ad_ids")){
this.__setUpdateConfig("available_ad_ids",(this.__getConfig("available_ad_ids")||[]));
}
if(!this.__getUpdateConfig("path")){
this.__setUpdateConfig("path",(this.__getConfig("path")||"/"));
}
if(!this.__getUpdateConfig("content_type")){
this.__setUpdateConfig("content_type",(this.__getConfig("content_type")||""));
}
if(!this.__getUpdateConfig("event")){
this.__setUpdateConfig("event","");
}
if(!this.__getUpdateConfig("screen_mode")){
this.__setUpdateConfig("screen_mode","normal");
}
var _4f=this.__getUpdateConfig("content_type");
var _50=this.__getUpdateConfig("screen_mode");
var _51=this.__getUpdateConfig("available_ad_ids");
var _52=this.__getUpdateConfig("callback_caller");
if(typeof (_52)!="undefined"&&String(_52).match(/^[0-9]+$/)&&_52<_51.length){
this.__setUpdateConfig("callback_caller",_51[_52]);
}
if(this.__getUpdateConfig("callback_function")){
if(!this.__getUpdateConfig("callback_caller")){
var _51=this.__getUpdateConfig("available_ad_ids");
if(_51.length){
this.__setUpdateConfig("callback_caller",_51[0]);
}
}else{
}
}
var _53=[];
for(var i=0;i<_51.length;i++){
var id=_51[i];
if(id=="skyscraper1"&&_4f=="MCcontent"){
continue;
}
if(id!="popup1"&&_50.match(/^(?:fullsize|fullscreen)$/)){
continue;
}
_53.push(id);
}
this.__setUpdateConfig("available_ad_ids",_53);
if(this.__getUpdateConfig("ad_exclude_all")){
this.__video_ads_skip.all=1;
}
if(this.__getUpdateConfig("ad_exclude_sponsor")){
this.__video_ads_skip.sponsor=1;
}
if(this.__getUpdateConfig("ad_exclude_midroll")){
this.__video_ads_skip.midroll=1;
}
if(this.__getUpdateConfig("ad_exclude_overlays")){
this.__video_ads_skip.overlay=1;
}
this.__logMsg("__initUpdateConfig",this.__update_config,3);
};
_5.prototype.__getUpdateConfig=function(key){
if(!key||typeof (this.__update_config)!="object"){
return;
}
return this.__update_config[key];
};
_5.prototype.__setUpdateConfig=function(key,_58){
if(!key){
return;
}
if(typeof (this.__update_config)!="object"){
this.__update_config={};
}
this.__update_config[key]=_58;
};
_5.prototype.__doCallback=function(_59){
var _5a=this.__getUpdateConfig("callback_function");
if(!_5a){
return;
}
var _5b=this.__getUpdateConfig("callback_object");
if(!_5b){
var _5c=this.__getUpdateConfig("callback_id");
_5b=_5c?document.getElementById(_5c):window;
}
if(!_5b){
return;
}
var _5d={init:_59?1:0,ad_type:this.adType,tld:this.getTLD()};
var _5e=(this.__getUpdateConfig("triggered_for")||"");
try{
_5b[_5a](_5d);
this.__logMsg("callback function "+_5a+" called with arguments:",_5d);
}
catch(e){
this.__logMsg("__doCallback:\n"+this.__catchMe(e)+"\n"+"callback function "+_5a+" FAILED with arguments:",_5d);
return;
}
return true;
};
_5.prototype.__finishIFrameAd=function(_5f){
if(this.__getUpdateConfig("callback_function")){
var _60=(this.__getUpdateConfig("callback_caller")||"");
if(_60==_5f){
this.__doCallback(1);
}
}
this.resizeIFrame(_5f);
this.__logMsg("__finishIFrameAd for "+_5f,{},2);
};
_5.prototype.__clearAdContainer=function(_61){
var _62=document.getElementById(this.getSelector(_61));
if(_62){
_62.style.display="none";
}
var _63=document.getElementById(this.getSelector("target",_61));
if(!_63){
return;
}
var _64=_63.childNodes;
if(!_64){
return;
}
for(var i=_64.length-1;i>=0;i--){
var _66=_64[i];
var id=_66.id||"";
if(id==this.getSelector("iframe",_61)){
this.__clearIFrameAd(_61);
}else{
_63.removeChild(_66);
}
}
};
_5.prototype.__clearAdContainers=function(){
var _68=this.__getConfig("available_ad_ids")||[];
for(var i=0;i<_68.length;i++){
var _6a=_68[i];
this.__clearAdContainer(_6a);
}
};
_5.prototype.__clearIFrameAd=function(_6b){
SIMAdLayoutHandler.setAttributeForElement(this.getSelector(_6b),"display","none");
var _6c=this.__getIFrameHandler();
_6c.resizeIFrame(_6b,[0,0]);
try{
_6c.loadIFrame(_6b,"about:blank");
}
catch(e){
this.__logMsg("__clearIFrameAd for "+_6b+":\n"+this.__catchMe(e));
return;
}
};
_5.prototype.__clearIFrameAds=function(){
var _6d=this.__getConfig("available_ad_ids")||[];
for(var i=0;i<_6d.length;i++){
var _6f=_6d[i];
this.__clearIFrameAd(_6f);
}
};
_5.prototype.__setDisplayForAdIFrames=function(_70){
var _71=this.__getUpdateConfig("available_ad_ids")||[];
if(!_71.length){
return;
}
for(var i=0;i<_71.length;i++){
var _73=_71[i];
try{
this.__getIFrameHandler().setIFrameDisplay(_73,_70);
}
catch(e){
this.__logMsg("__setDisplayForAdIFrames for "+_73+":\n"+this.__catchMe(e));
}
}
};
_5.prototype.__clearDebugPanel=function(){
var _74="sim_ad_debug";
var _75=document.getElementById(_74);
if(_75){
_75.innerHTML="";
}
};
_5.prototype.__getCurrentUpdateIndex=function(){
return this.__update_index;
};
_5.prototype.__getCurrentAdID=function(){
var _76=this.__getUpdateConfig("available_ad_ids")||[];
var _77=_76.length;
var _78=this.__getCurrentUpdateIndex();
return !_77||typeof (_78)!="number"||_78>=_77?"":_76[_78]||"";
};
_5.prototype.__getNextAdID=function(_79,_7a){
var _7b=this.__getUpdateConfig("available_ad_ids")||[];
var _7c=_7b.length;
if(!_7c){
this.__updating=false;
return;
}
if(!_79&&!this.__updating){
return;
}
if(_79){
this.__updating=true;
if(!_7a){
this.__update_index=0;
}else{
++this.__update_index;
}
this.__is_update_start=true;
}else{
++this.__update_index;
}
if(!_79||this.__update_index>=_7c){
this.__is_update_start=false;
if(this.__update_index>=_7c){
this.__updating=false;
this.__update_index=null;
return;
}
}
return _7b[this.__update_index];
};
_5.prototype.__getIFrameID=function(_7d){
return this.getSelector("iframe",_7d);
};
_5.prototype.__getIFrameHandler=function(){
if(!this.__ad_iframe_handler){
this.__ad_iframe_handler=new SIMAdIFrameHandler();
}
return this.__ad_iframe_handler;
};
_5.prototype.__skipVideoAdRequest=function(_7e){
if(!this.hasVideoAds()){
return true;
}
if(!this.__video_ads_skip){
return false;
}
if(this.__video_ads_skip.all){
return true;
}
if(_7e){
if(_7e.match(/^(presplit|midroll|postsplit)/)&&this.__video_ads_skip.midroll){
return true;
}
if(_7e.match(/^overlay/)&&this.__video_ads_skip.overlay){
return true;
}
if(_7e.match(/^sponsor/)&&this.__video_ads_skip.sponsor){
return true;
}
}
return false;
};
_5.prototype.__isDOMSafe=function(){
var _7f;
if(window!=top){
_7f=0;
}else{
if(!this.__dom_check){
var _80=document.getElementById(this.__DOM_SAFE_ID);
var _81=!/msie/.test(window.navigator.userAgent.toLowerCase())||window.opera?1:0;
var _82=_81||(_80&&_80.doScroll)?0:1;
this.__dom_check={counter:1,safe:_81,container:_80,hopeless:_82,max_rounds:_82?10:40};
}
if(this.__dom_check.safe){
_7f=1;
}else{
if(this.__dom_check.hopeless){
if(++this.__dom_check.counter>this.__dom_check.max_rounds){
_7f=-1;
}else{
_7f=0;
}
}else{
try{
this.__dom_check.container.doScroll("left");
_7f=1;
}
catch(e){
this.__logMsg("__isDOMSafe:\n"+this.__catchMe(e));
_7f=++this.__dom_check.counter>this.__dom_check.max_rounds?-1:0;
}
}
if(_7f!=0){
this.__dom_check.safe=1;
}
if(_7f<0&&this.__dom_check.safe){
this.__logMsg("__isDOMSafe check impossible. Considered safe in round "+this.__dom_check.counter);
}else{
if(_7f>0){
this.__logMsg("__isDOMSafe ok in round "+this.__dom_check.counter);
}
}
}
}
return _7f;
};
_5.prototype.__logMsg=function(msg,_84,_85){
if(!_85){
_85=0;
}
var _86=this.doLog()||0;
if(!_86||_85>_86){
return;
}
if(typeof (msg)=="undefined"){
msg="";
}
if(!this.__log){
this.__log=[];
}
if(typeof (_84)=="object"){
msg+="\n";
for(var k in _84){
msg+=[k,_84[k]].join(": ")+"\n";
}
msg=msg.replace(/\n+$/,"");
}
var _88=((new Date()).getTime()-this.__start_time)/1000;
var _89=this.__findMaster();
if(_89){
_89.__logMsg(msg+" from domino iframe");
}else{
this.__log.push("* "+_88+" secs\n"+msg);
}
};
_5.prototype.__catchMe=function(e){
return "<span style=\"color:red\">"+(typeof (e)=="string"?e:[e.name,e.message].join("\n"))+"</span>\n";
};
}
if(!_5.__init_ad_type){
if(this.adType!="DUMMY"){
_5.__init_ad_type=1;
}
var _8b=["doAd","getVideoAdRequest","setAdInfo","loadScripts"];
for(var i=0;i<_8b.length;++i){
var _8d=_8b[i];
if(!_5.prototype[_8d]){
_5.prototype[_8d]=function(){
return "";
};
}
}
}
this.__initInstance();
};
SIMAdHandler.EXTENSIONS={};
SIMAdHandler.EXTENSIONS.SHARED={doAd:function(_8e){
var _8f=this.__getMyAdID(_8e);
if(!_8f){
return;
}
this.__logMsg("doAd for "+_8e+" ("+_8f+")");
this.__loading_starts[_8e]=new Date();
var _90=this.__getAdserverCall();
_90(_8f,{session_id:this.getSessionID(),path:this.__getConfig("path")||"/",protocol:this.__getProtocol()});
},setAdInfo:function(_91,_92){
var _93=this.__getMyAdID(_91);
if(!_93){
return;
}
if(typeof (_92)=="undefined"){
_92={};
}
var _94=_92.info||"";
if(!_94){
_94="assume existence";
}
if(!_94){
_94="fallback";
}
var _95=_92.dimensions;
if(!_95&&this.__dimension_map){
_95=this.__dimension_map[_91];
}
if(!_95){
_95=[0,0];
}
this.__adtrace[_91]=_94+" "+_95.join("x")+" ("+_93+")";
this.__dimensions[_91]=_95;
var msg="setAdInfo for "+_91+" ("+_93+")";
var _97=this.__findMaster();
if(_97){
_97.setAdInfo(_91,{info:_94,dimensions:_95});
msg+=" - setting iframe and master info";
}
this.__logMsg(msg,{},3);
},__startAdUpdate:function(){
this.__doCallback(0);
},__setSyncVars:function(){
this.__sync_vars={after:[]};
},__getMyAdID:function(_98){
var _99=this.__SOI_to_MY[_98];
if(!_99){
_99="";
}
return _99;
}};
SIMAdHandler.EXTENSIONS.SOI={doAd:function(_9a){
this.__logMsg("doAd for "+_9a);
this.__loading_starts[_9a]=new Date();
var _9b=this.__getAdserverCall();
var _9c=_9b(_9a);
document.write(_9c);
var _9d=this.__findMaster();
var _9e=_9c.match(/src=["']?([^"'< ]+)/);
var src=_9e&&_9e[1]?_9e[1]:"";
this.bannerAdRequests[_9a]=src;
if(_9d){
_9d.bannerAdRequests[_9a]=src;
}
},getVideoAdRequest:function(_a0,_a1){
if(this.__skipVideoAdRequest(_a0)){
return "";
}
if(typeof (_a1)!="object"){
_a1={};
}
var _a2="";
if(typeof (window.soi_VideoAdRequest)=="function"){
var _a3={};
if(typeof (_a1.industries)=="object"){
_a3.industries=_a1.industries;
}
if(_a1.prefetch){
_a3.prefetch=true;
}
_a2=window.soi_VideoAdRequest(_a0,_a3);
}
this.videoAdRequests[_a0]=_a2;
this.__logMsg("getVideoAdRequest for "+_a0,_a1);
return _a2;
},setAdInfo:function(_a4,_a5){
if(typeof (_a5)=="undefined"){
_a5={};
}
var _a6=_a5.info||"";
if(!_a6&&window.soi_adtrace){
var _a7=unescape(window.soi_adtrace).match(new RegExp(_a4+"(?: *-? *)?(.*)"));
if(_a7){
_a6=_a7[1];
}
}
if(!_a6){
_a6="fallback";
}
var _a8=_a5.dimensions;
if(!_a8&&window.soi_dimension){
_a8=window.soi_dimension[_a4];
}
if(!_a8){
_a8=[0,0];
}
this.__adtrace[_a4]=_a6;
this.__dimensions[_a4]=_a8;
var msg="setAdInfo for "+_a4;
var _aa=this.__findMaster();
if(_aa){
_aa.setAdInfo(_a4,{info:_a6,dimensions:_a8});
msg+=" - setting iframe and master info";
}
this.__logMsg(msg,{},3);
},__setProtocol:function(){
this.__protocol="http:";
},__setSyncVars:function(){
this.__sync_vars={};
this.__sync_vars.after=["soi_adtrace","soi_dimension","SoiSetPre","SoiSetSpon","SoiSetMid","SoiSetOva","SoiSetPost","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"];
},__start:function(){
var _ab=this.__findMaster();
if(_ab){
if(_ab.isUpdateStart()){
_ab.hasVideoAds(this.hasVideoAds());
}else{
_ab.syncVars(parent,window,"after");
}
}
}};
SIMAdHandler.EXTENSIONS.OAS={doAd:SIMAdHandler.EXTENSIONS.SHARED.doAd,getVideoAdRequest:function(_ac,_ad){
if(this.__skipVideoAdRequest(_ac)){
return "";
}
if(typeof (_ad)!="object"){
_ad={};
}
var _ae=this.__getMyAdID(_ac);
var _af=window["OAS_"+_ae];
this.__logMsg("getVideoAdRequest for "+_ac);
this.videoAdRequests[_ac]=_af;
if(!_af){
return "";
}
if(typeof (_ad.industries)=="object"){
var _b0={};
var _b1="";
for(var key in _ad.industries){
var _b3=_ad.industries[key].industry||"";
_b3=_b3.replace(/^ +/,"").replace(/ +$/,"");
if(!_b3){
continue;
}
if(_b0[_b3]){
continue;
}
_b0[_b3]=1;
if(_b1){
_b1+="&";
}
_b1+="ind="+escape(_b3);
}
if(_b1){
_af+="&"+_b1;
}
}
this.__writeCounterPixel("OAS_"+_ae+"_counter");
return _af;
},loadScripts:function(_b4){
if(typeof (_b4)!="object"){
return;
}
var _b5=_b4.taxonomie;
if(!_b5){
return;
}
var _b6=_b4.method;
if(!_b6){
return;
}
var _b7;
if(_b6=="jx"){
ad_id=_b4.ad_id;
if(!ad_id){
return;
}
_b7=this.__getMyAdID(ad_id);
if(!_b7){
return;
}
}
var _b8=this.__getConfig("content_type");
var _b9="?content_type="+escape(_b8);
var _ba=_b4.info||{};
for(var key in _ba){
var _bc=_ba[key];
if(typeof (_bc)=="undefined"||!String(_bc).length){
continue;
}
if(_b9){
_b9+="&";
}
_b9+=[escape(key),escape(_ba[key])].join("=");
}
try{
var _bd=top.location.search.match(/(showroom)=([a-zA-Z0-9_-]*)/);
if(_bd){
if(_b9){
_b9+="&";
}
_b9+=[_bd[1],_bd[2]||"standard"].join("=");
}
}
catch(e){
this.__logMsg("loadScripts:\n"+this.__catchMe(e));
}
var _be=this.__getConfig("available_ad_ids")||[];
var _bf="";
for(var i=0;i<_be.length;i++){
var _c1=this.__getMyAdID(_be[i]);
if(!_c1){
continue;
}
if(_bf){
_bf+=",";
}
_bf+=_c1;
}
var _c2=this.__findMaster();
var _c3=_c2&&_c2.isUpdateStart();
var _c4=[];
var _c5="";
if(this.hasVideoAds()){
var _c6=this.__getConfig("available_video_ads")||[];
for(var k=0;k<_c6.length;k++){
var _c8=_c6[k];
if(!this.__canRolltype(_c8)){
continue;
}
if(_c8.match(/^(presplit|postsplit)$/)){
continue;
}
if(_b6=="jx"){
if(_c8.match(/^(preroll|sponsor)$/)){
var _c9=this.__getVideoBlockListPos(_c8);
if(_c9){
var _ca=_c9.split(",");
for(var i=0;i<_ca.length;i++){
_c4.push(_ca[i]);
}
if(_bf){
_bf+=",";
}
_bf+=_c9;
}
}else{
if(_c8.match(/^(midroll|overlay|postroll)$/)&&_c3){
var _c9=this.__getVideoBlockListPos(_c8);
if(_c9){
if(_c5){
_c5+=",";
}
_c5+=_c9;
}
}
}
}else{
if(_b6=="mjx"){
var _c9=this.__getVideoBlockListPos(_c8);
if(_c9){
if(_bf){
_bf+=",";
}
_bf+=_c9;
}
}
}
}
}
if(_bf){
var _cb=this.__adserver+"/adstream_"+_b6+".ads"+"/"+_b5+"/1"+this.getSessionID()+"@";
var src=_cb+_bf+(_b6=="jx"?"!"+_b7:"")+_b9;
document.write("<script src=\""+src+"\"></script>");
this.__logMsg("loadScripts:\n"+src);
}
if(_b6=="jx"&&this.hasVideoAds()){
if(_c3){
for(var i=0;i<_c4.length;i++){
src=_cb+_bf+"!"+_c4[i]+_b9;
document.write("<script src=\""+src+"\"></script>");
this.__logMsg("loadScripts:\n"+src);
}
if(_c5){
src=this.__adserver+"/adstream_mjx.ads"+"/"+_b5+"/1"+this.getSessionID()+"@"+_c5+_b9;
document.write("<script src=\""+src+"\"></script>");
this.__logMsg("loadScripts:\n"+src);
}
}
}
},setAdInfo:function(_cd,_ce){
var _cf=this.__getMyAdID(_cd);
if(!_cf){
return;
}
if(typeof (_ce)=="undefined"){
_ce={};
}
var _d0=_ce.info||"";
var _d1=document.getElementById("oasinfo_"+_cf);
if(!_d0&&_d1){
_d0=_d1.title;
}
if(!_d0){
_d0="fallback";
}
var _d2=_ce.dimensions;
if(!_d2&&_d1){
x=parseInt(_d1.style.width||0);
y=parseInt(_d1.style.height||0);
if(_cd=="fullbanner1"||_cd=="fullbanner2"){
if(x>1.2*728){
x=728;
}
if(y>1.2*90){
y=90;
}
}else{
if(_cd=="rectangle1"){
if(x>1.2*300){
x=300;
}
if(y>1.2*250){
y=250;
}
}else{
if(_cd=="rectangle2"){
if(x>1.2*180){
x=180;
}
if(y>1.2*150){
y=150;
}
}else{
if(_cd=="skyscraper1"){
if(x>1.2*160){
x=160;
}
if(y>1.2*600){
y=600;
}
}
}
}
}
_d2=[x||0,y||0];
}
if(!_d2){
_d2=[0,0];
}
this.__dimensions[_cd]=_d2;
this.__adtrace[_cd]=_d0+" "+_d2.join("x")+" ("+_cf+")";
var msg="setAdInfo for "+_cd+" ("+_cf+")";
var _d4=this.__findMaster();
if(_d4){
_d4.setAdInfo(_cd,{info:_d0,dimensions:_d2});
msg+=" - setting iframe and master info";
}
this.__logMsg(msg,{},3);
},__setProtocol:function(){
this.__protocol="http:";
},__initVideoAdRequests:function(){
if(!this.hasVideoAds()){
return "";
}
var _d5=this.__getAdserverCall();
var _d6=this.__getRolltypes();
for(var k=0;k<_d6.length;k++){
var _d8=_d6[k];
var _d9=this.__getRolltypeMax(_d8);
var _da=this.__getRolltypeBlockIDs(_d8);
for(var i=1;i<=_d9;i++){
var _dc=this.__getMyAdID(_d8+i);
if(!_dc){
continue;
}
if(_d8=="midroll"){
var _dd=["presplit","postsplit"];
for(var l=0;l<_dd.length;l++){
var _df=this.__getMyAdID(_dd[l]+i);
if(_df){
_d5(_df);
}
}
}
for(var j=0;j<_da.length;j++){
_d5(_dc+_da[j]);
}
}
}
document.write("<div id=\""+this.__videoad_pixel_id+"_container\" style=\"position:absolute;top:-100px;\"></div>");
this.__logMsg("__initVideoAdRequests done",{},2);
},__setSpecialProperties:function(){
this.__videoad_pixel_id="oas_videoad_pixel";
this.__rolltypes=["preroll","sponsor","midroll","overlay","postroll"];
this.__preroll_max=1;
this.__preroll_block_ids=["","b"];
this.__sponsor_max=1;
this.__sponsor_block_ids=["","b"];
this.__midroll_max=5;
this.__midroll_block_ids=["","b"];
this.__overlay_max=5;
this.__overlay_block_ids=["","b"];
this.__postroll_max=1;
this.__postroll_block_ids=["","b"];
var _e1=this.__getProtocol();
this.__adserver=_e1+"//austria1.adverserve.net/RealMedia/ads";
},__getRolltypeMax:function(_e2){
return this["__"+_e2+"_max"]||0;
},__getRolltypeBlockIDs:function(_e3){
return this["__"+_e3+"_block_ids"]||[];
},__getRolltypes:function(){
return this.__rolltypes||[];
},__canRolltype:function(_e4){
_e4=_e4.replace(/[0-9]+[a-z]?$/,"");
var _e5=this.__getRolltypes();
for(var i=0;i<_e5.length;i++){
if(_e4==_e5[i]){
return true;
}
}
return false;
},__getVideoBlockListPos:function(_e7){
if(!this.__canRolltype(_e7)){
return "";
}
var _e8="";
var _e9=this.__getRolltypeMax(_e7);
var _ea=this.__getRolltypeBlockIDs(_e7);
for(var i=1;i<=_e9;i++){
if(_e7=="midroll"){
var _ec=["presplit","postsplit"];
for(var l=0;l<_ec.length;l++){
var _ee=this.__getMyAdID(_ec[l]+i);
if(_ee){
if(_e8){
_e8+=",";
}
_e8+=_ee;
}
}
}
for(var j=0;j<_ea.length;j++){
var _f0=this.__getMyAdID(_e7+i+_ea[j]);
if(!_f0){
continue;
}
if(_e8){
_e8+=",";
}
_e8+=_f0;
}
}
return _e8;
},__writeCounterPixel:function(_f1){
var uri=window[_f1];
if(!uri){
return;
}
var id=this.__videoad_pixel_id;
var _f4=document.getElementById(id);
if(!_f4){
var _f5=document.getElementById(id+"_container");
if(!_f5){
_f5=document.createElement("div");
_f5.style.position="absolute";
_f5.style.top="-100px";
document.getElementsByTagName("body")[0].appendChild(_f5);
}
_f4=document.createElement("img");
_f4.src=uri;
_f4.id=id;
_f4.style.width="1px";
_f4.style.height="1px";
_f4.style.borderStyle="none";
_f5.appendChild(_f4);
}
this.__logMsg("__writeCounterPixel for "+_f1+":\n"+uri,{},2);
},__setSyncVars:function(){
this.__sync_vars={};
this.__sync_vars.after=[];
this.__sync_vars.video_ad_requests=[];
var _f6=this.__getRolltypes();
for(var k=0;k<_f6.length;k++){
var _f8=_f6[k];
var _f9=this.__getRolltypeMax(_f8);
var _fa=this.__getRolltypeBlockIDs(_f8);
for(var i=1;i<=_f9;i++){
var _fc=this.__getMyAdID(_f8+i);
if(!_fc){
continue;
}
if(_f8=="midroll"){
var _fd=["presplit","postsplit"];
for(var l=0;l<_fd.length;l++){
var _ff=this.__getMyAdID(_fd[l]+i);
if(_ff){
this.__sync_vars.video_ad_requests.push("OAS_"+_ff);
this.__sync_vars.video_ad_requests.push("OAS_"+_ff+"_counter");
}
}
}
for(var j=0;j<_fa.length;j++){
this.__sync_vars.video_ad_requests.push("OAS_"+_fc+_fa[j]);
this.__sync_vars.video_ad_requests.push("OAS_"+_fc+_fa[j]+"_counter");
}
}
}
},__start:function(){
var _101=this.__findMaster();
if(_101){
if(_101.isUpdateStart()){
_101.hasVideoAds(this.hasVideoAds());
this.__initVideoAdRequests();
_101.syncVars(window,parent,"video_ad_requests");
}
}else{
this.__initVideoAdRequests();
}
},__getMyAdID:function(_102){
var _103={popup1:"Popup",fullbanner1:"Top1",fullbanner2:"Top",rectangle1:"Middle1",rectangle2:"Position1",rectangle3:"Position2",maxiad1:"Middle2",skyscraper1:"Right1",preroll1:"Video1",sponsor1:"Sponsor1",presplit1:"Presplit1",presplit2:"Presplit2",presplit3:"Presplit3",presplit4:"Presplit4",presplit5:"Presplit5",midroll1:"Video3",midroll2:"Video4",midroll3:"Video5",midroll4:"Video6",midroll5:"Video7",overlay1:"Overlay1",overlay2:"Overlay2",overlay3:"Overlay3",overlay4:"Overlay4",overlay5:"Overlay5",postroll1:"Video2"};
var _104=_103[_102];
if(!_104){
var _105=_102.match(/^(.*)([0-9]+)([a-z])$/,"");
if(_105){
var type=_105[1];
var pos=_105[2];
var vpos=_105[3];
if(_103[type+pos]){
var _109=this.__getRolltypeBlockIDs(type);
for(var i=0;i<_109.length;i++){
if(_109[i]==vpos){
_104=_103[type+pos]+vpos;
break;
}
}
}
}
}
return _104||"";
}};
SIMAdHandler.EXTENSIONS.ADBE={doAd:SIMAdHandler.EXTENSIONS.SHARED.doAd,getVideoAdRequest:SIMAdHandler.EXTENSIONS.SHARED.getVideoAdRequest,setAdInfo:SIMAdHandler.EXTENSIONS.SHARED.setAdInfo,__setSyncVars:SIMAdHandler.EXTENSIONS.SHARED.__setSyncVars,__getMyAdID:SIMAdHandler.EXTENSIONS.SHARED.__getMyAdID,__startAdUpdate:SIMAdHandler.EXTENSIONS.SHARED.__startAdUpdate,loadScripts:function(){
var path=this.__getConfig("path")||"/";
var _10c=path.split("/");
var zone=(_10c[2]||"")=="home"?"homepage":"others";
var _10e=this.__getProtocol();
window.adlSite="be.sevengames.nl";
window.adlZone=zone;
window.adlPro=_10e;
var src=adlPro+"//js.adlink.net/js?lang=be&amp;s="+adlSite+"&amp;z="+zone+"&amp;d="+this.getSessionID();
document.write("<script type= \"text/javascript\" src=\""+src+"\"></"+"script>");
this.__logMsg("loadScripts\n"+src);
},__setProtocol:function(){
this.__protocol=window.location.protocol=="https:"?"https:":"http:";
},__adserver_call:function(_110,args){
var _112=window.getAdLinkAdTag;
if(typeof (_112)!="function"){
return;
}
var me=arguments.callee;
if(!me.__init){
me.__init=1;
var path=args.path||"/";
var _115=path.split("/");
me.__zone=(_115[2]||"")=="home"?"homepage":"others";
}
_112(_110,me.__zone);
},__setSpecialProperties:function(){
this.__SOI_to_MY={fullbanner2:"728x90,468x60",rectangle1:"300x250",skyscraper1:"160x600,120x600"};
this.__dimension_map={fullbanner2:[728,90],rectangle1:[300,250],skyscraper1:[160,600]};
}};
SIMAdHandler.EXTENSIONS.ADNL={doAd:SIMAdHandler.EXTENSIONS.SHARED.doAd,getVideoAdRequest:SIMAdHandler.EXTENSIONS.SHARED.getVideoAdRequest,setAdInfo:SIMAdHandler.EXTENSIONS.SHARED.setAdInfo,__setSyncVars:SIMAdHandler.EXTENSIONS.SHARED.__setSyncVars,__getMyAdID:SIMAdHandler.EXTENSIONS.SHARED.__getMyAdID,__startAdUpdate:SIMAdHandler.EXTENSIONS.SHARED.__startAdUpdate,loadScripts:function(_116){
var src="";
var _118=this.__getProtocol();
if(_116==1){
src=_118+"//rc.wl.sbs.nl/Get/SBS/JS/GetRcmd.js?d="+this.getSessionID();
document.write("<script type=\"text/javascript\" src=\""+src+"\"></script>");
}else{
if(_116==2){
var path=this.__getConfig("path")||"/";
var _11a=path.split("/");
var zone=_11a[2]||"_default";
src=_118+"//tr.wl.sbs.nl/Cnt/SBS/CP/sevengames/"+zone+"?d="+this.getSessionID();
document.write("<img src=\""+src+"\" width=\"1\" height=\"1\" alt=\"\" border=\"0\" style=\"display:none;\" />");
}
}
if(src){
this.__logMsg("loadScripts ["+_116+"]\n"+src);
}
},__setProtocol:function(){
this.__protocol="http:";
},__adserver_call:function(_11c,args){
var me=arguments.callee;
if(!me.__init){
me.__init=1;
me.__tile=0;
me.__protocol=args.protocol||"http:";
}
var _11f={fullbanner2:"468x60,728x90",rectangle1:"300x250",skyscraper1:"120x600,160x600"};
var sz=_11f[_11c];
if(!sz){
return;
}
var path=args.path||"/";
var _122=path.split("/");
var zone=_122[2]||"_default";
var _124={sz:sz,tile:++me.__tile,ord:args.session_id};
var _125="";
for(var key in _124){
var _127=_124[key];
_125+=";"+[key,_127].join("=");
}
var src=me.__protocol+"//ad.nl.doubleclick.net/adj/sbs.sevengames.nl/"+zone+_125+"?";
document.write("<script type=\"text/javascript\" src=\""+src+"\"></script>");
},__setSpecialProperties:function(){
this.__SOI_to_MY={fullbanner2:"fullbanner2",rectangle1:"rectangle1",skyscraper1:"skyscraper1"};
this.__dimension_map={fullbanner2:[728,90],rectangle1:[300,250],skyscraper1:[160,600]};
}};
SIMAdHandler.EXTENSIONS.ADNO={doAd:SIMAdHandler.EXTENSIONS.SHARED.doAd,getVideoAdRequest:SIMAdHandler.EXTENSIONS.SHARED.getVideoAdRequest,setAdInfo:SIMAdHandler.EXTENSIONS.SHARED.setAdInfo,__setSyncVars:SIMAdHandler.EXTENSIONS.SHARED.__setSyncVars,__getMyAdID:SIMAdHandler.EXTENSIONS.SHARED.__getMyAdID,__startAdUpdate:SIMAdHandler.EXTENSIONS.SHARED.__startAdUpdate,__setProtocol:function(){
this.__protocol="http:";
},__adserver_call:function(_129,args){
var me=arguments.callee;
if(!me.__init){
me.__init=1;
if(!document.MAX_used){
document.MAX_used=",";
}
me.__charset=document.charset||document.characterSet;
if(me.__charset){
me.__charset="&charset="+escape(me.__charset);
}
me.__referrer=document.referrer?"&referer="+escape(document.referrer):"";
me.__location="&loc="+escape(window.location);
me.__context=document.context?"&context="+escape(document.context):"";
me.__protocol=args.protocol||"http:";
}
var _12c=document.MAX_used!=","?"&exclude="+document.MAX_used:"";
var fo=document.mmm_fo?"&mmm_fo=1":"";
var src=me.__protocol+"//openx.tvnorge.no/www/delivery/ajs.php?zoneid="+_129+"&cb="+args.session_id+_12c+me.__charset+me.__location+me.__referrer+me.__context+fo;
document.write("<script language=\"JavaScript\" type=\"text/javascript\" src=\""+src+"\"></script>");
},__setSpecialProperties:function(){
this.__SOI_to_MY={rectangle1:14,skyscraper1:39};
this.__dimension_map={"rectangle1":[468,400],"skyscraper1":[180,500]};
}};
SIMAdHandler.EXTENSIONS.ADSE={doAd:SIMAdHandler.EXTENSIONS.SHARED.doAd,getVideoAdRequest:SIMAdHandler.EXTENSIONS.SHARED.getVideoAdRequest,setAdInfo:SIMAdHandler.EXTENSIONS.SHARED.setAdInfo,__setSyncVars:SIMAdHandler.EXTENSIONS.SHARED.__setSyncVars,__getMyAdID:SIMAdHandler.EXTENSIONS.SHARED.__getMyAdID,__startAdUpdate:SIMAdHandler.EXTENSIONS.SHARED.__startAdUpdate,loadScripts:function(_12f,args){
if(typeof (args)!="object"){
args={};
}
var _131=this.__getProtocol();
var src;
if(_12f==1){
var src=_131+"//fusion.adtoma.com/script.js";
document.write("<script type=\"text/javascript\" src=\""+src+"\"></script>");
this.__logMsg("loadScripts ["+_12f+"]\n"+src);
}else{
if(_12f==2){
var path=args.path||"/";
var _134=path.split("/");
var zone=(_134[2]||"")=="home"?"start":"start";
window.Fusion.mediaZone="sevengames."+zone;
window.Fusion.layout="sevengames_main";
window.Fusion.adServer="fusion.adtoma.com";
window.Fusion.protocol=_131+"//";
window.Fusion.loadAds();
this.__logMsg("loadScripts ["+_12f+"]\n"+"loadAds() - "+window.Fusion.mediaZone);
}
}
},__setProtocol:function(){
this.__protocol=window.location.protocol=="https:"?"https:":"http:";
},__adserver_call:function(_136,args){
if(!window.Fusion){
return;
}
var _138=window.Fusion.space;
if(typeof (_138)!="function"){
return;
}
var me=arguments.callee;
if(!me.__init){
me.__init=1;
}
if(_136=="TWS"){
var _13a=3;
for(var i=1;i<=_13a;i++){
_138(_136+i);
}
}else{
_138(_136);
}
},__setSpecialProperties:function(){
this.__SOI_to_MY={popup1:"RichMedia",fullbanner2:"panorama",skyscraper1:"TWS"};
this.__dimension_map={popup1:[0,0],fullbanner2:[980,120],skyscraper1:[250,3*360]};
}};
function SIMAdIFrameHandler(){
var self=arguments.callee;
if(!self.__init){
self.__init=1;
self.prototype.loadIFrame=function(_13d,url){
var _13f=this.__getAdIFrame(_13d);
if(!_13f){
return;
}
_13f.src=url||"about:blank";
return true;
};
self.prototype.resizeIFrame=function(_140,_141){
var _142=this.getSelector("iframe",_140);
var _143=document.getElementById(_142);
if(!_143){
return;
}
_143.style.display="inline-block";
_143.style.width=_141[0]+"px";
_143.style.height=_141[1]+"px";
};
self.prototype.setIFrameDisplay=function(_144,flag){
var _146=this.getSelector("iframe",_144);
var _147=document.getElementById(_146);
if(!_147){
return;
}
_147.style.display=flag?"inline-block":"none";
};
self.prototype.__getAdIFrame=function(_148){
if(!_148){
return;
}
if(!this.__ad_iframes){
this.__ad_iframes={};
}
if(!this.__ad_iframes[_148]){
var _149=this.getSelector("iframe",_148);
var _14a=document.getElementById(_149);
if(!_14a){
var _14b=this.getSelector("target",_148);
var _14c=document.getElementById(_14b);
if(!_14c){
return;
}
var _14d=0;
var _14e=0;
var _14f=0;
var _150="none";
_14a=document.createElement("iframe");
_14a.id=_149;
_14a.name=_149;
_14a.style.width=_14d+"px";
_14a.style.height=_14e+"px";
_14a.style.borderStyle=_150;
_14a.style.borderWidth=_14f+"px";
_14a.style.padding="0px";
_14a.style.margin="0px";
_14a.src="about:blank";
_14a.frameBorder=_14f;
_14a.border=_14f;
_14a.scrolling="no";
var _151=_14c.parentNode;
if(!_151){
return;
}
_14c.appendChild(_14a);
}
this.__ad_iframes[_148]=_14a;
}
return this.__ad_iframes[_148];
};
self.prototype.getSelector=function(){
return (SIMAdWriter.getSelector).apply(SIMAdWriter,arguments);
};
}
};
var SIMAdDeliveryHandler={isType:function(_152,type){
var _154=SIMAdWriter.adType;
var _155=SIMAdWriter.getAdtrace(_152);
if(!_155){
return false;
}
if(typeof (type)=="undefined"){
type="";
}
var _156=new RegExp(_152+".+"+type,"i");
var _157=_156.test(_155);
return _157?true:false;
},isDelivered:function(_158){
var _159=this.isType(_158);
var _15a=this.isType(_158,"Fallback");
return _159&&!_15a?true:false;
},hasBlockpixel:function(_15b){
return this.isType(_15b,"Block[_-]?pixel")?true:false;
},reserveSowefoSpace:function(_15c){
var _15d=this.isType(_15c,"Block[_-]?pixel.+"+_15c);
return _15d?true:false;
},controlAdContainer:function(_15e,_15f){
if(!_15f){
_15f=_15e;
}
var elem=document.getElementById(_15f);
if(!elem){
return _161;
}
var _161=this.isDelivered(_15e)?true:false;
if(_161){
if(this.hasBlockpixel(_15e)){
if(this.reserveSowefoSpace(_15e)){
elem.style.backgroundColor="transparent";
elem.style.borderColor="transparent";
elem.style.backgroundImage="none";
}else{
elem.style.display="none";
return;
}
}
elem.removeAttribute("style");
}else{
elem.style.display="none";
}
return _161;
},moveAd:function(id){
var _163=this.getSelector("source",id);
var _164=this.getSelector("target",id);
var _165=document.getElementById(_163);
var _166=document.getElementById(_164);
if(!_165||!_166){
return;
}
var _167=_165.getElementsByTagName("script");
for(var i=0;i<_167.length;i++){
if(!_167[i].src){
continue;
}
_167[i].removeAttribute("src");
}
var _169=_166.parentNode;
_169.replaceChild(_165,_166);
_165.id=_164;
_165.removeAttribute("style");
},getSelector:function(){
return (SIMAdWriter.getSelector).apply(SIMAdWriter,arguments);
}};
var SIMAdLayoutHandler={callMethod:function(_16a,what,args){
if(!_16a){
return;
}
var slot=this[_16a];
if(typeof (slot)!="object"){
return;
}
var _16e=slot[what];
if(typeof (_16e)!="function"){
return;
}
_16e.call(this,args);
},adjustLayoutFor:function(what,args){
return this.callMethod("adjust",what,args);
},renderAd:function(what,args){
return this.callMethod("render",what,args);
},isType:function(_173,type){
return SIMAdDeliveryHandler.isType(_173,type);
},getAdDimensions:function(_175){
return SIMAdWriter.getAdDimensions(_175)||[];
},getOffsetDimensions:function(_176){
return SIMAdWriter.getOffsetDimensions(_176);
},isDelivered:function(_177){
return SIMAdDeliveryHandler.isDelivered(_177);
},getAdType:function(){
return SIMAdWriter.adType;
},getSelector:function(){
return (SIMAdWriter.getSelector).apply(SIMAdWriter,arguments);
},setAttributeForElement:function(id,_179,_17a){
var _17b=document.getElementById(id);
if(!_17b){
return;
}
if(_179=="class"){
_17b.className=_17a;
}else{
if(_179=="id"){
_17b.id=_17a;
}else{
if(_179=="readOnly"){
_17b.readOnly=_17a;
}else{
_17b.style[_179]=_17a;
}
}
}
return true;
},getScreenDimensions:function(){
var _17c=[];
try{
var x=top.innerWidth;
if(typeof (x)!="undefined"){
_17c.push(x);
_17c.push(top.innerHeight);
}else{
var t=top.document;
var _17f=t.documentElement||t.body;
if(_17f){
x=_17f.clientWidth;
}
if(typeof (x)!="undefined"){
_17c.push(x);
_17c.push(_17f.clientHeight);
}else{
_17c.push(t.body.offsetWidth);
_17c.push(t.body.offsetHeight);
}
}
}
catch(e){
}
return _17c;
},getCurrentStyle:function(arg,_181){
var _182=typeof (arg)=="string"?document.getElementById(arg):arg;
if(!_182){
return;
}
var _183;
var _184=document.defaultView?document.defaultView.getComputedStyle:window.getComputedStyle;
if(typeof (_184)=="function"){
var _185=_184(_182,null);
if(_185){
_183=_185.getPropertyValue(_181);
}
}else{
var _185=_182.currentStyle;
if(_185){
_181=_181=="float"?"cssFloat":_181.replace(/-(.)/g,function(x,c){
return c.toUpperCase();
});
_183=_185[_181];
}
}
return _183;
},adjust:{fullbanner2:function(args){
var _189="fullbanner2";
if(typeof (args)!="object"){
args={};
}
var mode=args.mode||"";
var _18b=this.getAdType();
var _18c=this.isDelivered(_189);
if(!_18c){
return;
}
var _18d=_18b=="ADSE"?120:90;
var _18e=0;
if(mode!="finish"){
var _18f=this.isType("fullbanner2","PB2");
var _190=this.getAdDimensions(_189);
if(_18b=="SOI"&&_18f){
_190[1]=180;
}
_18e=_18d-_190[1];
if(_18e<0&&_18b=="SOI"&&!_18f){
_18e=0;
}
}else{
if(_18b.match(/^(SOI|OAS)$/)){
return;
}
var _191=this.getOffsetDimensions(_189);
var ox=_191[0];
var oy=_191[1];
if(typeof (oy)=="number"){
if(oy<15){
this.setAttributeForElement(this.getSelector(_189),"display","none");
}else{
_18e=_18d-oy;
if(_18e){
if(_18e>0){
_18e=0;
}else{
if(_18e>-9){
if(_18e>-9){
_18e=0;
}
}
}
}
}
}
}
if(_18e>0){
this.setAttributeForElement(this.getSelector(_189),"paddingTop",_18e+"px");
}else{
if(_18e<0){
this.setAttributeForElement("sgp"+_189,"height",(_18d+Math.abs(_18e))+"px");
var _194=parseInt(this.getCurrentStyle("sgpright","top")||0);
this.setAttributeForElement("sgpright","top",(_194+Math.abs(_18e))+"px");
}
}
},skyscraper1:function(args){
var _196="skyscraper1";
if(typeof (args)!="object"){
args={};
}
var mode=args.mode||"";
if(mode!="finish"){
return;
}
var _198=this.getAdType();
if(_198=="SOI"||_198=="OAS"){
return;
}
var _199=this.isDelivered(_196);
if(!_199){
return;
}
var _19a=this.getOffsetDimensions(_196);
var ox=_19a[0];
var oy=_19a[1];
if(typeof (oy)=="number"&&oy<15){
this.setAttributeForElement(this.getSelector(_196),"display","none");
}
},rectangle1:function(args){
var _19e="rectangle1";
if(typeof (args)!="object"){
args={};
}
var mode=args.mode||"";
var _1a0=this.getAdType();
var _1a1=this.isDelivered(_19e);
var _1a2=document.getElementById("sgp"+_19e);
var slot;
if(_1a2){
var _1a4=_1a2.parentNode;
var max=10;
counter=0;
while(_1a4&&!slot){
if(++counter>max){
break;
}
if(_1a4.tagName=="BODY"){
break;
}
if(_1a4.className=="Module"&&_1a4.tagName=="DIV"){
slot=_1a4;
break;
}
_1a4=_1a4.parentNode;
}
}
var _1a6=document.getElementById(this.getSelector("fallback",_19e));
if(_1a6){
_1a6.style.display=_1a1?"none":"block";
if(slot){
slot.style.display="block";
}
}else{
if(slot){
slot.style.display=_1a1?"block":"none";
}
}
if(mode!="finish"){
return;
}
if(_1a0=="SOI"||_1a0=="OAS"){
return;
}
if(!_1a1){
return;
}
var _1a7=this.getOffsetDimensions(_19e);
var ox=_1a7[0];
var oy=_1a7[1];
if(typeof (oy)=="number"&&oy<15){
this.setAttributeForElement(this.getSelector(_19e),"display","none");
if(_1a6){
_1a6.style.display="block";
if(slot){
slot.style.display="block";
}
}else{
if(slot){
slot.style.display="none";
}
}
}else{
if(_1a6){
_1a6.style.display="none";
if(slot){
slot.style.display="block";
}
}else{
if(slot){
slot.style.display="block";
}
}
}
},finish:function(args){
if(typeof (args)!="object"){
args={};
}
var _1ab=["rectangle1","fullbanner2","skyscraper1"];
for(var i=0;i<_1ab.length;i++){
var _1ad=_1ab[i];
if(args.iframe&&args.iframe!=_1ad){
continue;
}
this.adjustLayoutFor(_1ad,{mode:"finish"});
}
}},render:{shoppingtipp:function(args){
if(typeof (args)!="object"){
args={};
}
var pos=args.pos;
if(typeof (pos)=="undefined"){
return;
}
var _1b0="shoppingtipp"+pos;
var me=arguments.callee;
if(!me.headline_done){
me.headline_done=0;
}
var head,lnk,img,txt1,txt2,txt3,type;
if(typeof (window.SOI_SHOPPINGTIP)=="object"){
head=SOI_SHOPPINGTIP.headline||"";
type=SOI_SHOPPINGTIP.type||"";
lnk=SOI_SHOPPINGTIP.linkHref||"";
img=SOI_SHOPPINGTIP.imageURL||"";
txt1=SOI_SHOPPINGTIP.teaserHeadline||"";
txt2=SOI_SHOPPINGTIP.teaserText||"";
txt3=SOI_SHOPPINGTIP.linkText||"";
}else{
head="Shopping Tipps";
type="image";
lnk=window.SOI_LNK||"";
img=window.SOI_IMG||"";
txt1=window.SOI_TXT1||"";
if(txt1=="Shopping Tipps"){
txt1="";
}
txt2=window.SOI_TXT2||"";
txt3=window.SOI_TXT3||"";
}
if(!(lnk&&(txt1||txt2||txt3||img))){
return;
}
if(!img){
type="text";
}
var s="";
if(type=="image"&&img){
s="<a href=\""+lnk+"\" target=\"_blank\"><img style=\"width:60px;height:60px\" src=\""+img+"\" /></a>\n";
}
if(txt1){
s+="<p><a style=\"font-weight:bold\" href=\""+lnk+"\" target=\"_blank\">"+txt1+"</a></p>\n";
}
if(txt2){
s+="<p><a href=\""+lnk+"\" target=\"_blank\">"+txt2+"</a></p>\n";
}
if(txt3){
s+="<p><a style=\"text-decoration:underline\" href=\""+lnk+"\" target=\"_blank\">"+txt3+"</a></p>\n";
}
var _1ba=type!="image"?" text":"";
s="<div class=\"shoppingtipp"+_1ba+"\">"+s+"</div>";
if(!me.headline_done++&&head){
s="<h6>"+head+"</h6>\n"+s;
}
if(args.last){
me.headline_done=0;
}
window.SOI_SHOPPINGTIP={};
var _1bb=["SOI_LNK","SOI_IMG","SOI_TXT1","SOI_TXT2","SOI_TXT3"];
for(var i=0;i<_1bb.length;i++){
window[_1bb[i]]="";
}
var _1bd=document.getElementById(this.getSelector("target",_1b0));
if(_1bd){
_1bd.innerHTML=s;
}
}}};
if(!window.soi_adtrace){
soi_adtrace="";
}
if(!window.soi_ad){
soi_ad="";
}
if(!window.SIMAdWriter){
window.SIMAdWriter=new SIMAdHandler("DUMMY",null,window,0);
}

