if(typeof window._iadsdata==="undefined")window._iadsdata={}; var _iads=function(){var prefix="iads";var pcode="iQXeWRlZghBQ";var dtime="426218";var tm=(new Date).getTime();var now=Math.floor((new Date).getTime()/1E3);var _iads={};_iads.domain="i2ad.jp";if(!window._iadsdata.n)window._iadsdata.n=0;function stayTm(){var sty=(new Date).getTime()-tm;return parseInt(sty/100)}function replaceRnd(v){return v.replace(/#I_RND#/g,parseInt(Math.random()*1E8))}var EXPIRE=432E3;function checkStage(vs,nm,sec,max){vs[nm]=vs[nm]||[0,-1];vs[nm][0]++;if(vs[nm][0]== 1)vs[nm][1]=now;if(max<=vs[nm][0])if(vs[nm][1]+sec>now&&vs[nm][1]<=now){vs.deny=now+EXPIRE;return false}else vs[nm]=[0,-1];return true}function verifyCt(){window._iadsdata.n++;var rs={n:-1,er:0};if(typeof Storage!=="undefined"){var vs=null;var L=localStorage;try{vs=JSON.parse(L.getItem("i2ad"))}catch(e){}vs=vs||{last:[null,-1],deny:-1,sec:null,hour:null,day:null};if(window._iadsdata.n>1){rs.n=-2;return rs}if(document.referrer){vs.last=vs.last||[];if(vs.last[0]==document.referrer&&now-vs.last[1]<= 5){rs.n=-3;return rs}vs.last[0]=document.referrer;vs.last[1]=now}checkStage(vs,"sec",5,20);checkStage(vs,"hour",7200,1E3);checkStage(vs,"day",86400,2E3);rs.n=vs.day[0];if(vs.deny>now&&vs.deny-now<=EXPIRE)rs.er=1;else vs.deny=-1;try{L.setItem("i2ad",JSON.stringify(vs))}catch(e){}}return rs}function buildParam(){var b=document.referrer;var s=(window.outerWidth||-1)+"x"+(window.outerHeight||-1)+"_"+(window.innerWidth||-1)+"x"+(window.innerHeight||-1);var e=navigator.platform+(navigator.language||"_")+ navigator.appCodeName+"_"+s;var rs=verifyCt();e+="_k_"+(document.cookie?document.cookie.length:0);return"e="+e+"&dt="+dtime+"&b="+b+"&ct="+rs.n+"&er="+rs.er}_iads.loadJs=function(url,fn){var o=document.createElement("script");o.async=1;o.src=url;o.charset="UTF-8";(document.head||document.getElementsByTagName("head")[0]).appendChild(o);if(fn)if(document.head)o.onload=fn;else o.onreadystatechange=fn};_iads.loadCss=function(url){var o=document.createElement("link");o.rel="stylesheet";o.type="text/css"; o.href=url;(document.head||document.getElementsByTagName("head")[0]).appendChild(o)};_iads.outAd=function(dc_no){outAd(dc_no)};_iads.outTag=function(dc_no,v,imp,cnf){v=replaceRnd(v);imp=replaceRnd(imp);out(dc_no,null,v,imp,cnf)};_iads.outOverlay=function(dc_no,v,imp,cnf){v=replaceRnd(v);imp=replaceRnd(imp);out(dc_no,function(v){var r="
"; return r},v,imp,cnf);_iads.loadJs("//"+_iads.domain+"/assets/overlay.min.js")};var ovCnf={};_iads._getOverlay=function(){return ovCnf};_iads._setOverlay=function(stg){if(stg)ovCnf=stg};_iads.outImp=function(imp){};function out(dc_no,fn,v,imp){var tv=v+imp;document.write(fn?fn(tv):tv)}function outAd(dc_no){var url="//"+_iads.domain+"/i/"+pcode+"/"+dc_no+"/dc?"+buildParam()+"&"+parseInt(Math.random()*1E8);document.write("<"+'script type=text/javascript src="'+url+'" charset=UTF-8><'+"/script>")}return _iads}();