(function(d){var c="load",a=false,b=true;if(!("IMobileCore" in d))d.IMobileCore={};if(d.IMobileCore.loadScript)return;var e={isFunction:function(a){return Object.prototype.toString.call(a)==="[object Function]"},isArray:function(a){return Object.prototype.toString.call(a)==="[object Array]"},readyRegExp:/^(complete|loaded)$/,createScriptNode:function(c){var a=document.createElement("script");a.type="text/javascript";a.charset=c.charset;if(c.async===b)if(a.async)a.async=b;return a},head:document.getElementsByTagName("head")[0],loadAllCompleted:function(d){for(var e=d.length,c=0;c<e;c++){var f=d[c];if(!f.completed)return a}return b},loadScript:function(e,i){var g="onreadystatechange",d=this.createScriptNode(e),h=this,f=function(j){if(j.type===c||h.readyRegExp.test((j.currentTarget||j.srcElement).readyState)){if(d.addEventListener)d.removeEventListener(c,f,a);else if(d.attachEvent)d.detachEvent(g,f);else d.onload=null;if(e.completed===b)return;e.completed=b;h.isFunction(e.loaded)&&e.loaded(e);h.isFunction(i)&&i(e)}};if(d.addEventListener)d.addEventListener(c,f,a);else if(d.attachEvent)d.attachEvent(g,f);else d.onload=f;d.src=e.url;h.head.appendChild(d)},waitForDOMReady:function(e){var b="DOMContentLoaded",h=this;if(document.addEventListener){if(h.readyRegExp.test(document.readyState)){e();return}var f=function(){d.removeEventListener(c,f,a);document.removeEventListener(b,f,a);e()};document.addEventListener(b,f,a);d.addEventListener(c,f,a)}else if(document.attachEvent){var g=a;try{g=window.frameElement==null}catch(i){}if(document.documentElement.doScroll&&g)h._checkScroll(e);else d.attachEvent("onload",e)}},_checkScroll:function(a){var b=this;try{document.documentElement.doScroll("left")}catch(c){setTimeout(function(){b._checkScroll(a)},64);return}a()}},f={async:a,charset:"utf-8"};d.IMobileCore.loadScript=function(d){if(!d)throw new Error("config is null");d.waitReadyDOM=d.waitReadyDOM||a;var g=d.scripts;if(!e.isArray(g))throw new Error("config is not Array");for(var h={isCompleted:a,completed:function(a){if(e.isFunction(a))this.completedFunc=a;return this},_onCompleted:function(){this.isCompleted=b;this.completedFunc&&this.completedFunc()}},j=g.length,i=0;i<j;i++){var c=g[i];if(!c.name)throw new Error("not exist name property");if(!c.url)throw new Error("not exist url property");c.async=c.async||f.async;c.charset=c.charset||f.charset;c.completed=a;e.loadScript(c,function(){if(e.loadAllCompleted(g)===b){if(!d.waitReadyDOM){h._onCompleted();return}e.waitForDOMReady(function(){h._onCompleted()})}})}return h}})(window);(function(e){var a=null,c,d,b;try{c=imobile_adv_sid}catch(h){c=a}try{d=imobile_adv_cq}catch(h){d=a}try{b=imobile_tg_wait}catch(h){b=a}if(!c)return;var g=document.location.protocol=="http:"?"http":"https",f=function(){if(e.SPDemographic)try{if(b!=a&&isNaN(b)==false)SPDemographic.createGateway().executeAdVisit(c,d,b);else SPDemographic.createGateway().executeAdVisit(c,d,0)}catch(f){}};e.IMobileCore.loadScript&&e.IMobileCore.loadScript({waitReadyDOM:false,scripts:[{name:"dg_gateway",url:g+"://spdmg.i-mobile.co.jp/script/dg_gateway.js?20120208",async:true}]}).completed(function(){f()})})(window)