たぼさんの部屋

いちょぼとのんびり

js圧縮

Online YUI Compressor

http://refresh-sf.com/yui/#output

  • これでMain_2.jsを圧縮して動作確認 OK
( function() {
        var c = document.location.host;
        var j = document.location.protocol;
        var r = j + "//" + c;
        var H = document.location.pathname;
        console.log(H);
        var B = H.substr(0, H.lastIndexOf("/"));
        console.log(B);
        var p = [];
        var g = r + "EFOLAB/_server/_pages";
        var q = "menu";
        var n;
        var f;
        var a;
        var D;
        var x;
        var A;
        var J;
        var z;
        var s;
        var K;
        var E;
        var h;
        var l;
        var b;
        var w;
        var C;
        var N;
        var i;
        var G;
        var v;
        var M;
        var d;
        var t;
        var m;
        var y;
        var u;
        var I;
        var k;
        var L;
        var F;
        C = function() {
            this.loadingCounter = 0
        };
        C.prototype = {
            initialSetting : function() {
                this.loadingCounter += 1;
                console.log(this.loadingCounter);
                if (this.loadingCounter === 1) {
                    s.style.visibility = "visible"
                } else {
                    s.style.height = "auto"
                }
                m.setContainerHeight();
                d.off();
                M.setOnOpenFunction(function() {
                    k.setDisable()
                });
                M.setOnCloseFunction(function() {
                    k.setEnable()
                });
                window.scrollTo(0, 0);
                try {
                    if (s.contentDocument) {
                        k.set(s.contentDocument.body);
                        var Q = s.contentDocument.forms;
                        console.log("forms=" + Q.length);
                        for (var R = 0; R < Q.length; R++) {
                            var S = Q[R].action;
                            console.log(Q[R].action);
                            console.log(S.host);
                            console.log(S.host === c);
                            console.log(S.indexOf(c));
                            if (S.indexOf(c) === -1) {
                                Q[R].addEventListener("submit", function() {
                                    console.log("submit");
                                    m.enable = false;
                                    d.on("送信中");
                                    s.style.height = "200px";
                                    s.setAttribute("scroll", "yes");
                                    window.scrollTo(0, 0)
                                }, false)
                            }
                        }
                    } else {
                        console.log("ちがうドメインのためリンク管理不能")
                    }
                } catch(T) {
                    console.log(T.stack)
                }
            },
            handleEvent : function(Q) {
                console.log(Q.type);
                var e = JSON.parse(Q.data);
                console.log(e);
                if (e.iframeload) {
                    s.style.height = e.iframeload.height + "px";
                    this.initialSetting()
                } else {
                    if (e.flick) {
                        console.log(e.flick);
                        M.slideMenu(e.flick)
                    } else {
                        if (e.orientationchange) {
                            s.style.height = e.orientationchange.height + "px";
                            m.setContainerHeight()
                        } else {
                            if (e.resize) {
                                s.style.height = e.resize.height + "px";
                                m.setContainerHeight()
                            }
                        }
                    }
                }
            }
        };
        N = function() {
            this.clientWidth = undefined;
            this.enable = true;
            var e = this;
            s.addEventListener("load", function(Q) {
                console.log("iframe load");
                console.log(Q.type);
                e.enable = true;
                d.off()
            }, false)
        };
        N.prototype = {
            initialSetting : function() {
                this.screenWigth = window.screen.width;
                var Q = document.body.getElementsByTagName("span");
                for (var e = 0; e < Q.length; e++) {
                    if (Q[e].getAttribute("size")) {
                        new w(Q[e], Q[e].getAttribute("size"))
                    }
                }
                M.setOnOpenFunction(function() {
                    u.setDisable()
                });
                M.setOnCloseFunction(function() {
                    u.setEnable()
                });
                y.set(a);
                u.set(D);
                I.set(x);
                E.style.visibility = "visible";
                E.style.opacity = 1
            },
            setContainerHeight : function() {
                if (!this.enable) {
                    console.log("高さ調節中止");
                    s.style.height = "auto";
                    s.setAttribute("scrolling", "auto");
                    return
                }
                a.style.height = "auto";
                A.style.height = "auto";
                var R = a.clientHeight;
                var e = A.clientHeight;
                console.log("_subContainer.clientHeight=" + a.clientHeight);
                console.log("_mainContainer.clientHeight" + A.clientHeight);
                var Q = (R > e) ? R : e;
                J.style.height = Q + "px";
                a.style.height = "inherit";
                A.style.height = "inherit"
            },
            onOrientationChange : function() {
                if (window.screen.width === this.screenWigth) {
                    return
                } else {
                    s.style.height = "auto";
                    this.setContainerHeight();
                    this.screenWigth = window.screen.width
                }
            },
            handleEvent : function(e) {
                console.log(e.type);
                if (e.type === "load") {
                    this.initialSetting();
                    this.setContainerHeight()
                }
                if (e.type === "orientationchange") {
                    this.onOrientationChange()
                }
                if (e.type === "resize") {
                    this.onOrientationChange()
                }
            }
        };
        G = function(e) {
            this.sourceAnchor = e;
            this.initialize()
        };
        G.prototype = {
            initialize : function() {
                if ("ontouchstart" in window) {
                    this.sourceAnchor.addEventListener("touchstart", this, false);
                    this.sourceAnchor.addEventListener("touchend", this, false)
                } else {
                    this.sourceAnchor.addEventListener("click", this, false)
                }
            },
            handleEvent : function(e) {
                switch(e.type) {
                    case"touchstart":
                        this.sourceAnchor.style.backgroundColor = "rgb(255,248,248)";
                        document.getElementById("menuTicker").style.display = "none";
                        break;
                    case"touchend":
                        this.sourceAnchor.style.backgroundColor = "white";
                        M.slideMenu();
                        break
                }
            }
        };
        var v = function(e) {
            this.container = e;
            this.initialize()
        };
        v.prototype = {
            initialize : function() {
                this.container.addEventListener("touchstart", this, false);
                this.container.addEventListener("touchmove", this, false)
            },
            handleEvent : function(e) {
                console.log(e.type + "this.movedFlg=" + this.movedFlg);
                switch(e.type) {
                    case"touchstart":
                        this.movedFlg = false;
                        this.start = {
                            pageX : e.touches[0].pageX,
                            pageY : e.touches[0].pageY,
                            time : Number(new Date())
                        };
                        this.isScrolling = undefined;
                        break;
                    case"touchmove":
                        console.log(this.movedFlg);
                        if (this.movedFlg) {
                            return
                        }
                        if (e.touches.length > 1 || e.scale && e.scale !== 1) {
                            return
                        }
                        this.deltaX = e.changedTouches[0].pageX - this.start.pageX;
                        this.deltaY = e.changedTouches[0].pageY - this.start.pageY;
                        this.deltaTime = Number(new Date()) - this.start.time;
                        if ( typeof this.isScrolling === "undefined") {
                            this.isScrolling = !! (this.isScrolling || Math.abs(this.deltaX) < Math.abs(this.deltaY))
                        }
                        if (this.isScrolling) {
                            return
                        }
                        if (Math.abs(this.deltaX) > 50) {
                            if (this.deltaX < 0) {
                                M.slideMenu("close")
                            }
                            if (this.deltaX > 0) {
                                M.slideMenu("open")
                            }
                            this.movedFlg = true
                        }
                        break
                }
            }
        };
        w = function(R, Q) {
            this.target = R;
            this.size = Q;
            var e = this;
            window.addEventListener("resize", function() {
                e.setSize.call(e)
            }, false);
            this.setSize()
        };
        w.prototype = {
            BASE_RATIO : 1 / 360,
            setSize : function() {
                try {
                    this.target.style.fontSize = Math.round(this.getDocWidth() * this.BASE_RATIO * this.size * 100) + "%"
                } catch(Q) {
                    alert(Q)
                }
            },
            getDocWidth : function() {
                return document.documentElement.clientWidth
            }
        };
        var i = function() {
            this.container = undefined;
            this.enable = true;
            this.serial = Number(new Date())
        };
        i.prototype = {
            initialize : function() {
            },
            set : function(R) {
                this.container = R;
                var e = this.container.getElementsByTagName("a");
                for (var Q = 0; Q < e.length; Q++) {
                    var S = e[Q];
                    if ("ontouchstart" in window) {
                        S.addEventListener("touchstart", this, false);
                        S.addEventListener("touchend", this, false)
                    } else {
                        S.addEventListener("click", this, false)
                    }
                }
            },
            setEnable : function() {
                this.enable = true
            },
            setDisable : function() {
                this.enable = false
            },
            handleEvent : function(Q) {
                console.log("ページ遷移::event.type=" + Q.type);
                console.log(this);
                var aa = function(ab) {
                    var e = undefined;
                    if (ab.href) {
                        e = ab
                    } else {
                        e = aa(ab.parentNode)
                    }
                    return e
                };
                if (Q.type === "touchstart") {
                    this.start = {
                        pageX : Q.touches[0].pageX,
                        pageY : Q.touches[0].pageY,
                        time : Number(new Date())
                    }
                }
                if (Q.type === "touchend") {
                    var U = Q.changedTouches[0].pageX - this.start.pageX;
                    var S = Q.changedTouches[0].pageY - this.start.pageY;
                    if (S !== 0 || U !== 0) {
                        console.log("scroll or flick");
                        return
                    }
                    console.log("スクロールでもflickでもない");
                    console.log("this.enable=" + this.enable);
                    if (!this.enable) {
                        console.log("link disable");
                        console.log(Q.target);
                        console.log(Q.target.parentNode);
                        Q.preventDefault();
                        return false
                    }
                    M.closeSlide();
                    var R = function(e) {
                        console.log("---protocol振り分け:anchor.protocol === 'tel: ---'" + (e.protocol === "tel:"));
                        console.log("anchor.protocol=" + e.protocol);
                        return e.protocol === "tel:"
                    };
                    var W = function(e) {
                        console.log("---menuからのリンク判定 : anchor.className===menuClassName ---" + (e.className === q));
                        console.log("className=" + e.className);
                        console.log("menuClassName=" + q);
                        return e.className === q
                    };
                    var Z = function(e) {
                        console.log("--- 内部サイトかどうかの判別:anchor.host === host ---" + (e.host === c));
                        console.log("anchor.host =" + e.host);
                        console.log("host=" + c);
                        return e.host === c
                    };
                    var T = function(e) {
                        var ac = false;
                        for (var ab = 0; ab < p.length; ab++) {
                            console.log("--- 対象の他ドメインかどうかの判別:anchor.host === targetDomain[" + ab + "] ---" + (e.host === p[ab]));
                            console.log("anchor.host =" + e.host);
                            console.log("targetDomain[" + ab + "]=" + p[ab]);
                            if (e.host === p[ab]) {
                                ac = true
                            }
                        }
                        return ac
                    };
                    var V = aa(Q.target);
                    V.style.color = "red";
                    console.log("----リンクの判別開始----");
                    if (R(V)) {
                        return
                    }
                    Q.preventDefault();
                    if (Z(V)) {
                        if (W(V)) {
                            console.log("内部サイト:menuからのリンク:遷移先=" + V.href);
                            s.src = V.href
                        } else {
                            console.log("内部サイト:iframeからのリンク:遷移先=" + V.href);
                            s.src = V.href
                        }
                        s.style.height = window.screen.height;
                        d.on()
                    } else {
                        if (T(V)) {
                            console.log("対象の他ドメイン");
                            d.on();
                            s.style.height = window.screen.height;
                            var Y = V.getAttribute("href");
                            try {
                                s.src = Y
                            } catch(X) {
                                console.log(X.stack)
                            }
                        } else {
                            try {
                                console.log("対象外の他ドメイン:" + V.href);
                                location.href = V.href
                            } catch(X) {
                                alert(X.stack)
                            }
                        }
                    }
                    if (V.onclick) {
                        console.log("onclickの属性を実行しました。");
                        V.onclick()
                    }
                    V.style.color = "gray"
                }
            }
        };
        var b = function(e) {
            this.wrapperContainer = e;
            this.layer = undefined;
            this.p = undefined;
            this.initialize()
        };
        b.prototype = {
            initialize : function() {
                var R = document.createElement("div");
                var T = document.createElement("div");
                var e = document.createElement("img");
                var S = (B.indexOf("/test") !== -1) ? "/test" : "";
                e.src = r + S + "/EFOLAB/_script/img/loading.gif";
                var U = document.createElement("p");
                U.textContent = "読み込み中...";
                T.appendChild(e);
                T.appendChild(U);
                R.appendChild(T);
                T.style.textAlign = "center";
                T.style.position = "fixed";
                T.style.width = "100%";
                T.style.top = (window.screen.height) / 2;
                R.setAttribute("style", "position:absolute;z-index:30;width:100%;top:0px;");
                R.style.backgroundColor = "rgba(255,255,255,0.7)";
                var Q = this.wrapperContainer.style.height || window.screen.height;
                console.log(Q);
                R.style.height = Q;
                R.style.display = "none";
                this.wrapperContainer.appendChild(R);
                this.layer = R;
                this.p = U
            },
            on : function(Q) {
                var e = this.wrapperContainer.style.height;
                this.layer.style.height = e;
                this.layer.style.display = "block";
                if (Q) {
                    this.p.textContent = Q + "..."
                }
            },
            off : function() {
                this.layer.style.display = "none"
            }
        };
        var l = function(Q, e) {
            this.slideContainer = Q;
            this.wrapperContainer = e;
            this.wrapperContainer.width = undefined;
            this.maxSlideRatio = 0.35;
            this.maxSlideLeftPercent = this.maxSlideRatio * 100 + "%";
            this.minSlideLeftPercent = "0%";
            this.menuElement = undefined;
            this.onCloseFunctions = [];
            this.onOpenFunctions = [];
            this.initialize()
        };
        l.prototype = {
            initialize : function() {
                this.slideContainer.style.left = this.minSlideLeftPercent;
                this.wrapperContainer.width = this.wrapperContainer.getBoundingClientRect().width
            },
            setOnOpenFunction : function(e) {
                this.onOpenFunctions.push(e)
            },
            setOnCloseFunction : function(e) {
                this.onCloseFunctions.push(e)
            },
            toNumberFromPercent : function(R) {
                try {
                    return parseFloat(R.split("%").join(""))
                } catch(Q) {
                    console.log(R + Q)
                }
            },
            slideMenu : function(e) {
                switch(e) {
                    case"open":
                        this.openSlide();
                        break;
                    case"close":
                        this.closeSlide();
                        break;
                    default:
                        if (this.slideContainer.style.left === this.minSlideLeftPercent) {
                            this.openSlide()
                        } else {
                            if (this.slideContainer.style.left === this.maxSlideLeftPercent) {
                                this.closeSlide()
                            }
                        }
                }
            },
            openSlide : function() {
                this.slideContainer.style.left = this.maxSlideLeftPercent;
                var e = this.onOpenFunctions;
                for (var Q = 0; Q < e.length; Q++) {
                    console.log("onOpenFunctions=" + e[Q]);
                    e[Q]()
                }
            },
            closeSlide : function() {
                this.slideContainer.style.left = this.minSlideLeftPercent;
                var e = this.onCloseFunctions;
                for (var Q = 0; Q < e.length; Q++) {
                    console.log("onCloseFunctions=" + e[Q]);
                    e[Q]()
                }
            }
        };
        function P() {
            console.log("DOMContentLoaded");
            n = document.getElementById("outerContainer");
            f = document.getElementById("pageContainer");
            a = document.getElementById("subContainer");
            D = document.getElementById("footerContainer");
            x = document.getElementById("inquiryAssyContainer");
            A = document.getElementById("mainContainer");
            J = document.getElementById("contentsContainer");
            z = document.getElementById("menuAnchor");
            K = document.getElementById("topContainer");
            s = document.getElementById("iframe");
            E = document.getElementById("menuTicker");
            h = document.getElementById("subMenuAssyContainer");
            m = new N();
            t = new C();
            M = new l(A, J);
            y = new i();
            u = new i();
            I = new i();
            k = new i();
            d = new b(J);
            L = new G(z);
            F = new v(A);
            window.addEventListener("load", m, false);
            window.addEventListener("orientationchange", m, false);
            window.addEventListener("resize", m, false);
            window.addEventListener("message", t, false);
            d.on()
        }

        var o = document.createElement("base");
        o.href = r;
        document.head.appendChild(o);
        try {
            if (document.body) {
                P()
            } else {
                document.addEventListener("DOMContentLoaded", P, false)
            }
        } catch(O) {
            document.addEventListener("DOMContentLoaded", P, false)
        }
    }()); 

Packer

http://dean.edwards.name/packer/

(function(){var c=document.location.host;var j=document.location.protocol;var r=j+"//"+c;var H=document.location.pathname;console.log(H);var B=H.substr(0,H.lastIndexOf("/"));console.log(B);var p=[];var g=r+"EFOLAB/_server/_pages";var q="menu";var n;var f;var a;var D;var x;var A;var J;var z;var s;var K;var E;var h;var l;var b;var w;var C;var N;var i;var G;var v;var M;var d;var t;var m;var y;var u;var I;var k;var L;var F;C=function(){this.loadingCounter=0};C.prototype={initialSetting:function(){this.loadingCounter+=1;console.log(this.loadingCounter);if(this.loadingCounter===1){s.style.visibility="visible"}else{s.style.height="auto"}m.setContainerHeight();d.off();M.setOnOpenFunction(function(){k.setDisable()});M.setOnCloseFunction(function(){k.setEnable()});window.scrollTo(0,0);try{if(s.contentDocument){k.set(s.contentDocument.body);var Q=s.contentDocument.forms;console.log("forms="+Q.length);for(var R=0;R<Q.length;R++){var S=Q[R].action;console.log(Q[R].action);console.log(S.host);console.log(S.host===c);console.log(S.indexOf(c));if(S.indexOf(c)===-1){Q[R].addEventListener("submit",function(){console.log("submit");m.enable=false;d.on("送信中");s.style.height="200px";s.setAttribute("scroll","yes");window.scrollTo(0,0)},false)}}}else{console.log("ちがうドメインのためリンク管理不能")}}catch(T){console.log(T.stack)}},handleEvent:function(Q){console.log(Q.type);var e=JSON.parse(Q.data);console.log(e);if(e.iframeload){s.style.height=e.iframeload.height+"px";this.initialSetting()}else{if(e.flick){console.log(e.flick);M.slideMenu(e.flick)}else{if(e.orientationchange){s.style.height=e.orientationchange.height+"px";m.setContainerHeight()}else{if(e.resize){s.style.height=e.resize.height+"px";m.setContainerHeight()}}}}}};N=function(){this.clientWidth=undefined;this.enable=true;var e=this;s.addEventListener("load",function(Q){console.log("iframe load");console.log(Q.type);e.enable=true;d.off()},false)};N.prototype={initialSetting:function(){this.screenWigth=window.screen.width;var Q=document.body.getElementsByTagName("span");for(var e=0;e<Q.length;e++){if(Q[e].getAttribute("size")){new w(Q[e],Q[e].getAttribute("size"))}}M.setOnOpenFunction(function(){u.setDisable()});M.setOnCloseFunction(function(){u.setEnable()});y.set(a);u.set(D);I.set(x);E.style.visibility="visible";E.style.opacity=1},setContainerHeight:function(){if(!this.enable){console.log("高さ調節中止");s.style.height="auto";s.setAttribute("scrolling","auto");return}a.style.height="auto";A.style.height="auto";var R=a.clientHeight;var e=A.clientHeight;console.log("_subContainer.clientHeight="+a.clientHeight);console.log("_mainContainer.clientHeight"+A.clientHeight);var Q=(R>e)?R:e;J.style.height=Q+"px";a.style.height="inherit";A.style.height="inherit"},onOrientationChange:function(){if(window.screen.width===this.screenWigth){return}else{s.style.height="auto";this.setContainerHeight();this.screenWigth=window.screen.width}},handleEvent:function(e){console.log(e.type);if(e.type==="load"){this.initialSetting();this.setContainerHeight()}if(e.type==="orientationchange"){this.onOrientationChange()}if(e.type==="resize"){this.onOrientationChange()}}};G=function(e){this.sourceAnchor=e;this.initialize()};G.prototype={initialize:function(){if("ontouchstart"in window){this.sourceAnchor.addEventListener("touchstart",this,false);this.sourceAnchor.addEventListener("touchend",this,false)}else{this.sourceAnchor.addEventListener("click",this,false)}},handleEvent:function(e){switch(e.type){case"touchstart":this.sourceAnchor.style.backgroundColor="rgb(255,248,248)";document.getElementById("menuTicker").style.display="none";break;case"touchend":this.sourceAnchor.style.backgroundColor="white";M.slideMenu();break}}};var v=function(e){this.container=e;this.initialize()};v.prototype={initialize:function(){this.container.addEventListener("touchstart",this,false);this.container.addEventListener("touchmove",this,false)},handleEvent:function(e){console.log(e.type+"this.movedFlg="+this.movedFlg);switch(e.type){case"touchstart":this.movedFlg=false;this.start={pageX:e.touches[0].pageX,pageY:e.touches[0].pageY,time:Number(new Date())};this.isScrolling=undefined;break;case"touchmove":console.log(this.movedFlg);if(this.movedFlg){return}if(e.touches.length>1||e.scale&&e.scale!==1){return}this.deltaX=e.changedTouches[0].pageX-this.start.pageX;this.deltaY=e.changedTouches[0].pageY-this.start.pageY;this.deltaTime=Number(new Date())-this.start.time;if(typeof this.isScrolling==="undefined"){this.isScrolling=!!(this.isScrolling||Math.abs(this.deltaX)<Math.abs(this.deltaY))}if(this.isScrolling){return}if(Math.abs(this.deltaX)>50){if(this.deltaX<0){M.slideMenu("close")}if(this.deltaX>0){M.slideMenu("open")}this.movedFlg=true}break}}};w=function(R,Q){this.target=R;this.size=Q;var e=this;window.addEventListener("resize",function(){e.setSize.call(e)},false);this.setSize()};w.prototype={BASE_RATIO:1/360,setSize:function(){try{this.target.style.fontSize=Math.round(this.getDocWidth()*this.BASE_RATIO*this.size*100)+"%"}catch(Q){alert(Q)}},getDocWidth:function(){return document.documentElement.clientWidth}};var i=function(){this.container=undefined;this.enable=true;this.serial=Number(new Date())};i.prototype={initialize:function(){},set:function(R){this.container=R;var e=this.container.getElementsByTagName("a");for(var Q=0;Q<e.length;Q++){var S=e[Q];if("ontouchstart"in window){S.addEventListener("touchstart",this,false);S.addEventListener("touchend",this,false)}else{S.addEventListener("click",this,false)}}},setEnable:function(){this.enable=true},setDisable:function(){this.enable=false},handleEvent:function(Q){console.log("ページ遷移::event.type="+Q.type);console.log(this);var aa=function(ab){var e=undefined;if(ab.href){e=ab}else{e=aa(ab.parentNode)}return e};if(Q.type==="touchstart"){this.start={pageX:Q.touches[0].pageX,pageY:Q.touches[0].pageY,time:Number(new Date())}}if(Q.type==="touchend"){var U=Q.changedTouches[0].pageX-this.start.pageX;var S=Q.changedTouches[0].pageY-this.start.pageY;if(S!==0||U!==0){console.log("scroll or flick");return}console.log("スクロールでもflickでもない");console.log("this.enable="+this.enable);if(!this.enable){console.log("link disable");console.log(Q.target);console.log(Q.target.parentNode);Q.preventDefault();return false}M.closeSlide();var R=function(e){console.log("---protocol振り分け:anchor.protocol === 'tel: ---'"+(e.protocol==="tel:"));console.log("anchor.protocol="+e.protocol);return e.protocol==="tel:"};var W=function(e){console.log("---menuからのリンク判定 : anchor.className===menuClassName ---"+(e.className===q));console.log("className="+e.className);console.log("menuClassName="+q);return e.className===q};var Z=function(e){console.log("--- 内部サイトかどうかの判別:anchor.host === host ---"+(e.host===c));console.log("anchor.host ="+e.host);console.log("host="+c);return e.host===c};var T=function(e){var ac=false;for(var ab=0;ab<p.length;ab++){console.log("--- 対象の他ドメインかどうかの判別:anchor.host === targetDomain["+ab+"] ---"+(e.host===p[ab]));console.log("anchor.host ="+e.host);console.log("targetDomain["+ab+"]="+p[ab]);if(e.host===p[ab]){ac=true}}return ac};var V=aa(Q.target);V.style.color="red";console.log("----リンクの判別開始----");if(R(V)){return}Q.preventDefault();if(Z(V)){if(W(V)){console.log("内部サイト:menuからのリンク:遷移先="+V.href);s.src=V.href}else{console.log("内部サイト:iframeからのリンク:遷移先="+V.href);s.src=V.href}s.style.height=window.screen.height;d.on()}else{if(T(V)){console.log("対象の他ドメイン");d.on();s.style.height=window.screen.height;var Y=V.getAttribute("href");try{s.src=Y}catch(X){console.log(X.stack)}}else{try{console.log("対象外の他ドメイン:"+V.href);location.href=V.href}catch(X){alert(X.stack)}}}if(V.onclick){console.log("onclickの属性を実行しました。");V.onclick()}V.style.color="gray"}}};var b=function(e){this.wrapperContainer=e;this.layer=undefined;this.p=undefined;this.initialize()};b.prototype={initialize:function(){var R=document.createElement("div");var T=document.createElement("div");var e=document.createElement("img");var S=(B.indexOf("/test")!==-1)?"/test":"";e.src=r+S+"/EFOLAB/_script/img/loading.gif";var U=document.createElement("p");U.textContent="読み込み中...";T.appendChild(e);T.appendChild(U);R.appendChild(T);T.style.textAlign="center";T.style.position="fixed";T.style.width="100%";T.style.top=(window.screen.height)/2;R.setAttribute("style","position:absolute;z-index:30;width:100%;top:0px;");R.style.backgroundColor="rgba(255,255,255,0.7)";var Q=this.wrapperContainer.style.height||window.screen.height;console.log(Q);R.style.height=Q;R.style.display="none";this.wrapperContainer.appendChild(R);this.layer=R;this.p=U},on:function(Q){var e=this.wrapperContainer.style.height;this.layer.style.height=e;this.layer.style.display="block";if(Q){this.p.textContent=Q+"..."}},off:function(){this.layer.style.display="none"}};var l=function(Q,e){this.slideContainer=Q;this.wrapperContainer=e;this.wrapperContainer.width=undefined;this.maxSlideRatio=0.35;this.maxSlideLeftPercent=this.maxSlideRatio*100+"%";this.minSlideLeftPercent="0%";this.menuElement=undefined;this.onCloseFunctions=[];this.onOpenFunctions=[];this.initialize()};l.prototype={initialize:function(){this.slideContainer.style.left=this.minSlideLeftPercent;this.wrapperContainer.width=this.wrapperContainer.getBoundingClientRect().width},setOnOpenFunction:function(e){this.onOpenFunctions.push(e)},setOnCloseFunction:function(e){this.onCloseFunctions.push(e)},toNumberFromPercent:function(R){try{return parseFloat(R.split("%").join(""))}catch(Q){console.log(R+Q)}},slideMenu:function(e){switch(e){case"open":this.openSlide();break;case"close":this.closeSlide();break;default:if(this.slideContainer.style.left===this.minSlideLeftPercent){this.openSlide()}else{if(this.slideContainer.style.left===this.maxSlideLeftPercent){this.closeSlide()}}}},openSlide:function(){this.slideContainer.style.left=this.maxSlideLeftPercent;var e=this.onOpenFunctions;for(var Q=0;Q<e.length;Q++){console.log("onOpenFunctions="+e[Q]);e[Q]()}},closeSlide:function(){this.slideContainer.style.left=this.minSlideLeftPercent;var e=this.onCloseFunctions;for(var Q=0;Q<e.length;Q++){console.log("onCloseFunctions="+e[Q]);e[Q]()}}};function P(){console.log("DOMContentLoaded");n=document.getElementById("outerContainer");f=document.getElementById("pageContainer");a=document.getElementById("subContainer");D=document.getElementById("footerContainer");x=document.getElementById("inquiryAssyContainer");A=document.getElementById("mainContainer");J=document.getElementById("contentsContainer");z=document.getElementById("menuAnchor");K=document.getElementById("topContainer");s=document.getElementById("iframe");E=document.getElementById("menuTicker");h=document.getElementById("subMenuAssyContainer");m=new N();t=new C();M=new l(A,J);y=new i();u=new i();I=new i();k=new i();d=new b(J);L=new G(z);F=new v(A);window.addEventListener("load",m,false);window.addEventListener("orientationchange",m,false);window.addEventListener("resize",m,false);window.addEventListener("message",t,false);d.on()}var o=document.createElement("base");o.href=r;document.head.appendChild(o);try{if(document.body){P()}else{document.addEventListener("DOMContentLoaded",P,false)}}catch(O){document.addEventListener("DOMContentLoaded",P,false)}}());