/*var 190307*/ ithomedevday21cookie=[]; var ithomedevday21cookie=function(){}; ithomedevday21cookie.prototype={ ithomedevday21css:"", msgTxt:"為提供您更佳的服務,本網站使用 Cookies。當您使用本網站,即表示您同意 Cookies 技術支援。更多資訊請參閱", privacyTxt:"隱私權聲明", cookieconfirmTxt:"確定", privacylink:"index.html#privacy", ithomedevday21htmldom:"
::msgTxt::::privacyTxt::
", ithomedevday21cookiepath:"/", create:function(){ this.ithomedevday21htmldom=this.ithomedevday21htmldom.replace("::msgTxt::",this.msgTxt).replace("::privacyTxt::",this.privacyTxt).replace("::cookieconfirmTxt::",this.cookieconfirmTxt).replace("::privacylink::",this.privacylink); var ithomedevday21Cookies = {}; ithomedevday21Cookies.setValue = function (name, value) { var argv = arguments; var argc = arguments.length; var expires = (argc > 2) ? argv[2] : null; var path = (argc > 3) ? argv[3] : '/'; var domain = (argc > 4) ? argv[4] : null; var secure = (argc > 5) ? argv[5] : false; document.cookie = name + "=" + escape(value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : ""); }; ithomedevday21Cookies.getValue = function (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; var j = 0; while (i < clen) { j = i + alen; if (document.cookie.substring(i, j) == arg) return ithomedevday21Cookies.getCookieVal(j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; }; ithomedevday21Cookies.clear = function (name) { if (ithomedevday21Cookies.getValue(name)) { var expdate = new Date(); expdate.setTime(expdate.getTime() - (86400 * 1000 * 1)); ithomedevday21Cookies.setValue(name, "", expdate); } }; ithomedevday21Cookies.getCookieVal = function (offset) { var endstr = document.cookie.indexOf(";", offset); if (endstr == -1) { endstr = document.cookie.length; } return unescape(document.cookie.substring(offset, endstr)); }; var urlpath=location.pathname; var cookiepath=this.ithomedevday21cookiepath; if(cookiepath=="/" && urlpath.split("/").length>2){ var patharray=urlpath.split("/"); for(gp in patharray){ if(patharray[gp]!="" && patharray[gp].indexOf(".htm")==-1 && patharray[gp].indexOf(".aspx")==-1 && patharray[gp].indexOf(".html")==-1){ cookiepath+=patharray[gp]+"/" } } } if(ithomedevday21Cookies.getValue(cookiepath)==null){ //document.head.insertAdjacentHTML("beforeEnd",""); document.body.insertAdjacentHTML("beforeEnd",this.ithomedevday21htmldom); var targetcheckbox = document.getElementById('cookieconfirm'); targetcheckbox.addEventListener('click',function(){ ithomedevday21Cookies.setValue(cookiepath,"true",null,cookiepath); }); var isfooter=false; window.ithomecookieTime=null; window.addEventListener('scroll', function() { clearTimeout(ithomecookieTime); ithomecookieTime=null; ithomecookieTime=setTimeout(function(){ var e1 = document.getElementById("cookieAlertBox"); var e2 = document.getElementById("bottomDOM"); var e1val=(window.scrollY+window.innerHeight); var e2val=(e2.offsetTop); if(e1val>=e2val && !isfooter){ e1.classList.remove("position-fixed"); isfooter=true; window.scroll({ top: document.body.offsetHeight, behavior: 'smooth' }); }else if(e1val<(e2val-50)){ e1.classList.add("position-fixed"); isfooter=false; } },100); }); } } }