(function(c){var a=false;if(!("SPDemographic" in c))c.SPDemographic={requestedVisit:a};if(c.SPDemographic.createGateway)return;var b={serverName:"spdmg-backend.i-mobile.co.jp",scheme:document.location.protocol=="http:"?"http":"https",ignoreSpotIDs:"16905,28113,28114,28783,29712,29713".split(","),ignoreSiteIDs:"".split(","),ignoreAdvSiteIDs:"".split(",")};b.visitPageUrl=b.scheme+"://"+b.serverName+"/visit.aspx";b.convPageUrl=b.scheme+"://"+b.serverName+"/conv.aspx";b.advPageUrl=b.scheme+"://"+b.serverName+"/adv.aspx";function h(){var a="iframe";this.executeVisit=function(g){if(e(b.ignoreSpotIDs,g))return;if(c.SPDemographic.requestedVisit==true)return;else c.SPDemographic.requestedVisit=true;d(function(){var c=document.createElement(a);c.src=b.visitPageUrl+"?asid="+g;c.name="gdm_visitFrame";f(c);document.body.appendChild(c)})};this.executeConv=function(g,c){if(e(b.ignoreSiteIDs,g))return;d(function(){var d=document.createElement(a);d.src=b.convPageUrl+"?sid="+g;if(c)d.src+="&rid="+c;d.name="gdm_convFrame";f(d);document.body.appendChild(d)})};this.executeAdVisit=function(g,h,i){if(e(b.ignoreAdvSiteIDs,g))return;var c=function(){var c=document.createElement(a);c.src=b.advPageUrl+"?sid="+g;if(h)c.src+="&cq="+h;c.name="gdm_advFrame";f(c);document.body.appendChild(c)};if(i)d(function(){setTimeout(c,i)});else d(c)}}function d(e){var b="DOMContentLoaded";if(document.addEventListener){if(document.readyState=="complete"){e();return}var d=function(){c.removeEventListener("load",d,a);document.removeEventListener(b,d,a);e()};document.addEventListener(b,d,a);c.addEventListener("load",d,a)}else if(document.attachEvent){var f=a;try{f=window.frameElement==null}catch(h){}if(document.documentElement.doScroll&&f)g(e);else c.attachEvent("onload",e)}}function g(a){try{document.documentElement.doScroll("left")}catch(b){setTimeout(function(){g(a)},64);return}a()}function e(c,e){for(var d=c.length,b=0;b<d;b++)if(c[b]==e)return true;return a}function f(b){var a="0";if(b.style){b.style.visibility="hidden";b.style.padding=a;b.style.display="none"}b.setAttribute("frameBorder",a);b.setAttribute("scrolling","no");b.setAttribute("width",a);b.setAttribute("height",a);b.setAttribute("marginwidth",a);b.setAttribute("marginheight",a);b.setAttribute("vspace",a);b.setAttribute("hspace",a)}c.SPDemographic.createGateway=function(){return new h}})(window)