var doc_open_old=document.open;var doc_close_old=document.close;document.open=function(){};document.close=function(){};var write_old=document.write;var writeln_old=document.writeln;function AdSpace(wpId){this.wpId=wpId;this.target=false;this.responseStrings="";this.unloadedScripts=[];this.scriptArr=[];this.scriptUrlArr=[];this.flObj=false;this.flObjNeedle=false;this.flObjStr="";this.isReady=false;this.delay=false;this.scriptdelay=false;this.waitingTimes={scriptstack:800,singleinternalscript:400,emptyresponse:100,objectnotready:1500,probablywaiting:500,emptydocwrite:500,obligatory:300};this.events=[];this.firstInit=function(){this.target=document.getElementById("adition_tag_"+this.wpId);if(this.target!=null){this.target.innerHTML='<div id="'+this.wpId+'_tracking"></div>';var title=this.target.title.replace(/\'/gim,escape("'"));title=title.replace(/\%27/gim,escape(escape("'")));title=title.replace(/\"/gim,escape('"'));title=title.replace(/\%22/gim,escape(escape('"')));this.appendUrlScript(adUrl+this.wpId+title+prf);this.target.title="";}};this.getTimeoutSeconds=function(type){if(typeof aditionPostloadTimes=="object"&&aditionPostloadTimes[type]){return aditionPostloadTimes[type];}else{return this.waitingTimes[type];}};this.addEvent=function(eventFunction){this.events.push(eventFunction);};this.fireEvents=function(){while(this.events.length>0){var func=this.events[0];for(var j=0;j<this.events.length;j++){this.events[j]=this.events[j+1];}this.events.pop();if(typeof func=="function"){func();};}};this.markAsLoaded=function(identifier){for(var i=0;i<this.unloadedScripts.length;i++){if(this.unloadedScripts[i]==identifier){this.unloadedScripts=this.unloadedScripts.slice(0,i).concat(this.unloadedScripts.slice(i+1));return;}}};this.createScript=function(attributes){var scriptTag=document.createElement('script');if(attributes!=null){for(var i in attributes){scriptTag.setAttribute(i,attributes[i]);}}return scriptTag;};this.appendUrlScript=function(scriptUrl,attributes){scriptUrl=scriptUrl.replace(/&amp;/gi,"&");var scriptTag=this.createScript(attributes);var identifier=new Date().getTime()+Math.round(Math.random()*(100));scriptTag.id=identifier;this.unloadedScripts.push(identifier);scriptTag.identifier=identifier;var self=this;if(scriptTag.readyState&&Adition_BrowserId()!=7){if(scriptTag.readyState=="loaded"||scriptTag.readyState=="complete"){this.markAsLoaded(identifier);}else{scriptTag.onreadystatechange=function(){if(this.readyState=="loaded"||this.readyState=="complete"){self.markAsLoaded(this.identifier);}};}}else{scriptTag.onload=function(){self.markAsLoaded(this.identifier);};}scriptTag.onerror=function(){self.markAsLoaded(this.identifier);};var appendix=(scriptUrl.match(/\?/)===null)?'?':'&';if(scriptUrl.match(/(clickurl|adform|2mdn|eye|serving)/)===null){appendix=appendix+""+new Date().getTime();}else{appendix="";}scriptTag.setAttribute('src',scriptUrl+appendix);var self=this;if(!(Adition_BrowserId()==3||Adition_BrowserId()==9)&&scriptUrl.match(/adition|flashwrite|ntdom\.js/i)!=null){window.setTimeout(function(){self.target.appendChild(scriptTag);},20);}else{this.target.appendChild(scriptTag);}};this.appendScript=function(scriptData,attributes){var scriptTag=this.createScript(attributes);this.target.appendChild(scriptTag);scriptTag.text=scriptData;};this.appendResponse=function(response){this.target.innerHTML+=response;if(navigator.userAgent.toLowerCase().search(/msie/)!=-1&&response.match(/<\/(object)>/gim)!=null&&response.match(/ebstd/gim)==null){this.target=document.getElementById(this.wpId+'_tracking');}};this.evaluateScripts=function(){var objCheck=false;if(this.scriptArr.length=="1"&&this.scriptArr[0].scriptUrl==false&&this.scriptArr[0].scriptData.match(/document.wri/gim)==null&&this.scriptArr[0].scriptData.match(/[a-z0-9_]+\([\w\W\s\S\d,]*\)/gim)==null){objCheck=true;}else{var objectID=this.wpId;var tResponse=adObject.responseStrings;adObjectStateTimeout(function(){if(adObject!=null&&tResponse==adObject.responseStrings&&adObject.wpId==objectID&&adObject.scriptArr.length==0&&adObject.scriptUrlArr.length==0){adObject.isReady=true;checkAdObjectState();}},this.getTimeoutSeconds("scriptstack"),"evaluate");}while(this.scriptArr.length>0){var evalObj=this.scriptArr[0];for(var j=0;j<this.scriptArr.length;j++){this.scriptArr[j]=this.scriptArr[j+1];}this.scriptArr.pop();if(evalObj.scriptUrl!=false){this.appendUrlScript(evalObj.scriptUrl,evalObj.attributes);}else{this.appendScript(evalObj.scriptData,evalObj.attributes);}evalObj=false;}if(objCheck){var self=this;var tempResponse=this.responseStrings;adObjectStateTimeout(function(){if(self.wpId==adObject.wpId&&tempResponse==adObject.responseStrings){self.isReady=true;}checkAdObjectState();},this.getTimeoutSeconds("singleinternalscript"),"evaluate objcheck");}};this.parseResponse=function(response){this.isReady=false;this.responseStrings+=response;var indicateReady=true;var scriptRegExp=/(<script[^>]*>)([\s\S]*?)<\/script>/gim;var tempResponse=response+"";tempResponse=tempResponse.replace(/<iframe.*>[\s\w\W\S.]*(<script [\s\w\W\S.]*)+<\/iframe>/gim,"");response=response.replace(scriptRegExp,"");response=response.replace(/<noscript>([\s\S]*?)<\/noscript>/gim,"");if(this.flObjNeedle==false){if(response.match(/<(html|div|span|meta|noscript|a|object|iframe|script|embed)/im)!=null){this.flObjNeedle=RegExp.$1;this.flObj=true;this.flObjStr+=response;indicateReady=false;}}if(this.flObj==true){if(this.flObjStr!=response){this.flObjStr+=response;}var needleRegExp=new RegExp("<\/"+this.flObjNeedle+">","gim");var openNeedleRegExp=new RegExp("<"+this.flObjNeedle,"gim");this.delay=true;var openNeedles=(this.flObjStr.match(openNeedleRegExp)!=null)?this.flObjStr.match(openNeedleRegExp).length:0;if((this.flObjNeedle.match(/embed/i)&&this.flObjStr.match(/<embed[^>]*[\/]?>\s*(<\/embed>)?/gim))||(response.match(needleRegExp)!=null&&this.flObjStr.match(needleRegExp).length>=openNeedles)){tempResponse+=this.flObjStr;response=this.flObjStr;this.flObjStr=this.flObjStr.replace(scriptRegExp,"");this.appendResponse(this.flObjStr);if(this.flObjNeedle.match(/noscript|meta/gim)==null){indicateReady=true;}else{indicateReady=false;}this.flObj=false;this.flObjStr="";this.flObjNeedle=false;}}else{indicateReady=true;this.appendResponse(response);}var script2RegExp=/(<script[^>]*>)([\s\S]*?)<\/script>/gim;var scriptBlock;while(scriptBlock=script2RegExp.exec(tempResponse)){indicateReady=false;var attributes=new Object();var attributeRegExp=/([\w]+)=["']?((?:.(?!["']?\s+(?:\w+)=|[>"']))+.)["']?/gim;var scriptUrl=false;var attr;while(attr=attributeRegExp.exec(scriptBlock[1])){var kvpair=[];kvpair[0]=attr[1];kvpair[1]=attr[2];if(kvpair[0].match(/src/gim)!=null){scriptUrl=kvpair[1].replace(/[\'\"]/,"");}else{attributes[kvpair[0].toLowerCase()]=kvpair[1];}}if(typeof attributes.type=="undefined"&&typeof attributes.language=="undefined"){attributes.type="text/javascript";}var data=new Object();data.scriptUrl=scriptUrl;data.scriptData=scriptBlock[2];data.attributes=attributes;this.scriptArr.push(data);}if(response.match(/^\s+$/i)!=null){indicateReady=false;var wpId=adObject.wpId;if(this.scriptArr.length==0){adObjectStateTimeout(function(){if(adObject!=null&&adObject.wpId==wpId&&adObject.scriptArr.length==0){adObject.isReady=true;}},this.getTimeoutSeconds("emptyresponse"),"parse whitespaces");}}if(response.match(/^\s*<!--(.)*-->\s*$/gim)!=null){indicateReady=false;}if(response.match(/^(<div .*>)?<(img|iframe).*width(=[\'\"]?1[\'\"]|:[\s]*1[\s]*px).*>(<\/div>)?$/gim)!=null){indicateReady=false;}this.isReady=indicateReady;if(this.isReady==true){this.delay=true;}else{var lResp=adObject.responseStrings;var wpId=adObject.wpId;if(this.scriptArr.length==0){adObjectStateTimeout(function(){if(adObject.wpId==wpId&&lResp==adObject.responseStrings){adObject.isReady=true;}checkAdObjectState();},this.getTimeoutSeconds("objectnotready"),"parse not ready");}}};}var stateTimeout;function adObjectStateTimeout(callback,time,caller){clearTimeout(stateTimeout);stateTimeout=window.setTimeout(callback,time);}function checkAdObjectState(){if(adObject!=null&&(adObject==false||(adObject.isReady==true&&adObject.flObj==false&&adObject.scriptArr.length==0&&adObject.unloadedScripts.length==0))){elementCount++;if(adObject!=null&&adObject!=false){adObject.fireEvents();}if(elementCount<adElements.length){adObject=new AdSpace(adElements[elementCount]);adObject.firstInit();}else{var lastResponse=adObject.responseStrings;if(adObject!=null&&adObject!=false){adObject.fireEvents();}adObjectStateTimeout(function(){restoreDocWrite(lastResponse);},1000000,"restore docwrite");}}else{if(adObject!=null&&adObject!=false){var lResp=adObject.responseStrings;var unloadedScripts=adObject.unloadedScripts;adObjectStateTimeout(function(){if(lResp==adObject.responseStrings){adObject.isReady=true;}if(unloadedScripts.length>0){for(var i=0;i<unloadedScripts.length;i++){adObject.markAsLoaded(unloadedScripts[i]);}}checkAdObjectState();},adObject.getTimeoutSeconds("probablywaiting"),"adobjectstate");}}}var origAttachEvent;var origAddEventListener;function renderAds(){if(window.attachEvent){origAttachEvent=window.attachEvent;window.attachEvent=function(event,callBack){if(adObject&&event=="onload"){adObject.addEvent(callBack);}else{origAttachEvent(event,callBack);}};}else{if(window.addEventListener){origAddEventListener=window.addEventListener;window.addEventListener=function(event,callBack,indicator){if(adObject&&event=="load"){adObject.addEvent(callBack);}else{origAddEventListener(event,callBack,indicator);}};}};document.write=function(str){var wait=false;var origStr=str;i++;var str=str.replace(/[\s]*<noscript>[\s\S]*?<\/noscript>[\s]*/gim,"");str=str.replace(/<!--.*?-->/gim,"");if(str.length<origStr.length&&str.length==0){wait=true;}if(str.match(/[^\s]/gim)!=null){clearTimeout(stateTimeout);adObject.parseResponse(str);}else{var tmpId=adObject.wpId;var tmpResponse=adObject.responseStrings;if(tmpResponse.match(/show_ads\.js[\"\']>[\s]*<\/script>$/gim)!==null){wait=true;}if(!wait){adObjectStateTimeout(function(){if(adObject.wpId==tmpId&&adObject.responseStrings==tmpResponse&&adObject.scriptArr.length==0){adObject.isReady=true;checkAdObjectState();}},adObject.getTimeoutSeconds("emptydocwrite"),"renderads");}}if(adObject.scriptArr.length>0){adObject.isReady=false;adObject.evaluateScripts();}else{if(adObject.isReady==true&&adObject.flObj==false){var tmpId=adObject.wpId;var tmpResponse=adObject.responseStrings;adObjectStateTimeout(function(){if(adObject.wpId==tmpId&&adObject.responseStrings==tmpResponse&&adObject.scriptArr.length==0){checkAdObjectState();}},adObject.getTimeoutSeconds("obligatory"),"renderads ready no fl");}}};document.writeln=function(str){document.write(str+"\n");};elements=(document.body||document.documentElement).getElementsByTagName('div');for(var i=0;i<elements.length;++i){if(res=elements[i].id.match(/adition_tag_(.*)/)){adElements.push(res[1]);}}checkAdObjectState();}var adObject=false;var adElements=[];var elementCount=-1;function restoreDocWrite(lastResponse){if(adObject!=null&&adObject.responseStrings==lastResponse){adObject=null;}document.write=write_old;document.writeln=writeln_old;}var brs=navigator.userAgent.toLowerCase();function Adition_OSId(){if(brs.search(/symbian/)!=-1){return 13;}else if(brs.search(/android/)!=-1){return 12;}else if(brs.search(/iphone|ipad/)!=-1){return 14;}else if(brs.search(/windows\sce/)!=-1){return 11;}else if(brs.search(/windows\snt\s6\.1/)!=-1){return 10;}else if(brs.search(/unix/)!=-1){return 7;}else if(brs.search(/linux/)!=-1){return 6;}else if(brs.search(/mac\sos\sx|macintosh|mac\x5fpowerpc/)!=-1){return 5;}else if(brs.search(/windows\snt\s6\.0/)!=-1){return 9;}else if(brs.search(/windows\snt\s5\.2/)!=-1){return 8;}else if(brs.search(/windows\snt\s5\.1/)!=-1){return 3;}else if(brs.search(/windows\snt\s5\.0/)!=-1){return 2;}else if(brs.search(/windows\snt\s4\.0/)!=-1){return 4;}else if(brs.search(/windows\s95|windows\sme|win98|windows\s98/)!=-1){return 1;}else{return-1;}}function Adition_BrowserId(){if(brs.search(/msie\s9/)!=-1){return 12;}else if(brs.search(/chrome\//)!=-1){return 11;}else if(brs.search(/msie\s8/)!=-1){return 10;}else if(brs.search(/opera/)!=-1){return 7;}else if(brs.search(/gecko\//)!=-1){return 6;}else if(brs.search(/konqueror|safari/)!=-1){return 8;}else if(brs.search(/msie\s7/)!=-1){return 9;}else if(brs.search(/msie\s6/)!=-1){return 3;}else if(brs.search(/netscape6|netscape\/(7\.\d*)/)!=-1){return 5;}else if(brs.search(/netscape4/)!=-1){return 4;}else if(brs.search(/msie\s5/)!=-1){return 2;}else if(brs.search(/msie\s4/)!=-1){return 1;}else{return-1;}}function Adition_ResId(){if(screen.width==1024&&screen.height==576){return 164;}else if(screen.width==1024&&screen.height==600){return 165;}else if(screen.width==1024&&screen.height==768){return 3;}else if(screen.width==1072&&screen.height==600){return 166;}else if(screen.width==1152&&screen.height==768){return 167;}else if(screen.width==1152&&screen.height==864){return 4;}else if(screen.width==1152&&screen.height==870){return 168;}else if(screen.width==1152&&screen.height==900){return 169;}else if(screen.width==1200&&screen.height==800){return 170;}else if(screen.width==1200&&screen.height==900){return 171;}else if(screen.width==1280&&screen.height==1024){return 5;}else if(screen.width==1280&&screen.height==720){return 172;}else if(screen.width==1280&&screen.height==768){return 9;}else if(screen.width==1280&&screen.height==800){return 10;}else if(screen.width==1280&&screen.height==854){return 173;}else if(screen.width==1280&&screen.height==960){return 7;}else if(screen.width==1360&&screen.height==1024){return 179;}else if(screen.width==1360&&screen.height==768){return 174;}else if(screen.width==1366&&screen.height==1024){return 180;}else if(screen.width==1366&&screen.height==768){return 175;}else if(screen.width==1376&&screen.height==768){return 176;}else if(screen.width==1400&&screen.height==1050){return 8;}else if(screen.width==1400&&screen.height==900){return 177;}else if(screen.width==1440&&screen.height==900){return 11;}else if(screen.width==1440&&screen.height==960){return 178;}else if(screen.width==1600&&screen.height==1024){return 183;}else if(screen.width==1600&&screen.height==1200){return 6;}else if(screen.width==1600&&screen.height==768){return 181;}else if(screen.width==1600&&screen.height==900){return 182;}else if(screen.width==1680&&screen.height==1050){return 12;}else if(screen.width==1920&&screen.height==1080){return 184;}else if(screen.width==1920&&screen.height==1200){return 13;}else if(screen.width==1920&&screen.height==1400){return 185;}else if(screen.width==1920&&screen.height==1440){return 186;}else if(screen.width==2048&&screen.height==1152){return 187;}else if(screen.width==2048&&screen.height==1536){return 188;}else if(screen.width==2560&&screen.height==1440){return 190;}else if(screen.width==2560&&screen.height==1600){return 191;}else if(screen.width==2560&&screen.height==2048){return 192;}else if(screen.width==2800&&screen.height==2100){return 193;}else if(screen.width==640&&screen.height==480){return 1;}else if(screen.width==720&&screen.height==400){return 153;}else if(screen.width==800&&screen.height==480){return 154;}else if(screen.width==800&&screen.height==600){return 2;}else if(screen.width==832&&screen.height==624){return 159;}else if(screen.width==848&&screen.height==480){return 155;}else if(screen.width==852&&screen.height==480){return 156;}else if(screen.width==858&&screen.height==484){return 158;}else if(screen.width==864&&screen.height==480){return 157;}else if(screen.width==960&&screen.height==540){return 160;}else if(screen.width==960&&screen.height==640){return 162;}else if(screen.width==960&&screen.height==720){return 163;}else if(screen.width==964&&screen.height==544){return 161;}else{return-1;}}function Adition_Referrer(){try{var i=0;if(top.location.href!==document.location.href){i=1;}return[i,escape(document.referrer)];}catch(e){return[1,escape(document.referrer)];}}function Adition_Flash(){var f="",n=navigator;if(n.plugins&&n.plugins.length){for(var ii=0;ii<n.plugins.length;ii++){if(n.plugins[ii].name.indexOf('Shockwave Flash')!=-1){f=n.plugins[ii].description.split('Shockwave Flash ')[1];i=f.indexOf('.');f=f.substr(0,i);break;}}}else if(window.ActiveXObject){for(var ii=10;ii>=2;ii--){try{var fl=eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash."+ii+"');");if(fl){f=ii;break;}}catch(e){}}}return f;}var ad_count=0;var adUrl=((window.location.protocol.match(/http/i))?window.location.protocol:"http:")+"//ad3.adfarm1.adition.com/js?wp_id=";function Adition_Prfstr(){var prfstr='';if(typeof(nuggprof)!='undefined'){for(i=0;i<nuggprof.length;++i){prfstr+='&prf['+nuggprof[i][0]+']='+nuggprof[i][1];}}return prfstr;}var prf=Adition_Prfstr();
