var Amg=(function(amg){amg.Privacy=(function(privacy){var dialog_width_pct=80;var dialog_height_pct=85;var dialog_height_min=240;var banner_height_pix=80;var iframe_src="https://aquawin.com.tw/privacy/v2/content"+"?url="+encodeURIComponent(window.location.href)+"&t="+(new Date().getTime());var privacy_cookie_name="is_privacy_viewed";var privacy_cookie_days=1000;var manipulate_footer=null;var configurations={};var media_query_string="only screen and (max-width:460px)";privacy.band=function(confs){if(getPrivacyCookieValue()<=0){configurations=confs||{};var mquery=window.matchMedia(media_query_string);createBannerElement(mquery,configurations);if(!('offset' in configurations)||configurations.offset===!0){manipulate_footer=getFooterElement();setFooterOffset(manipulate_footer,banner_height_pix)} mquery.addListener(resetBannerElement)}} privacy.show=function(){setDialogVisible(!0)};privacy.hide=function(){setDialogVisible(!1)};privacy.read=function(){setPrivacyCookieValue(1);deleteBannerElement();setFooterOffset(manipulate_footer,0)};function getDialogHeight(){var winH=window.innerHeight;var height=Math.floor(winH*dialog_height_pct/100);return Math.max(height,dialog_height_min)} function setDialogVisible(visible){if(!document.getElementById("amg-privacy-dialog")){createDialogElements()} var overlay=document.getElementById("amg-privacy-overlay");var dialog=document.getElementById("amg-privacy-dialog");overlay.style.display=visible?"block":"none";dialog.style.display=visible?"block":"none";if(visible){resetDialogElements()}} function resetBannerElement(mquery){if(getPrivacyCookieValue()<=0){deleteBannerElement();createBannerElement(mquery,configurations);resetDialogElements();setFooterOffset(manipulate_footer,banner_height_pix)}} function deleteBannerElement(){var banner=document.getElementById("amg-privacy-banner");if(banner){banner.style.display="none";document.getElementsByTagName("body")[0].removeChild(banner)}} function createBannerElement(mquery,confs){var is_mmatch=mquery.matches;banner_height_pix=is_mmatch?120:80;var banner=document.createElement('div');banner.id="amg-privacy-banner";banner.style.webkitFlexDirection="row";banner.style.alignItems="center";banner.style.display="flex";banner.style.flexDirection=is_mmatch?"column":"row";banner.style.width="90%";banner.style.position="fixed";banner.style.overflow="hidden";banner.style.boxSizing="border-box";banner.style.bottom="0px";banner.style.left="0px";banner.style.right="0px";banner.style.padding="20px";banner.style.color="#fff";banner.style.backgroundColor="#000";banner.style.zIndex="9988";banner.style.justifyContent="space-between";banner.style.fontFamily="Arial";var divL=document.createElement("div");if(is_mmatch)divL.style.paddingBottom="10px";var text=document.createElement('span');text.style.color="#fff";text.innerHTML='text' in confs?confs.text:"This website uses cookies to ensure you get the best experience on our website.";var more=document.createElement("button");more.onclick=privacy.show;more.innerHTML='more' in confs?confs.more:"Learn more...";more.style.color="#ddd";more.style.border="0";more.style.backgroundColor="#000";more.style.boxShadow="none";more.style.marginLeft="10px";more.style.textDecoration="underline";more.style.cursor="pointer";var divR=document.createElement("div");var save=document.createElement("button");save.onclick=privacy.read;save.innerHTML='save' in confs?confs.save:"Got it!";save.style.color="#000";save.style.border="0";save.style.backgroundColor="#ff0";save.style.boxShadow="none";save.style.fontWeight="bold";save.style.padding="8px 40px 8px 40px";save.style.cursor="pointer";save.style.borderRadius="5px";divL.appendChild(text);divL.appendChild(more);divR.appendChild(save);banner.appendChild(divL);banner.appendChild(divR);document.getElementsByTagName("body")[0].appendChild(banner)} function resetDialogElements(){var dialog=document.getElementById("amg-privacy-dialog");var iframe=document.getElementById("amg-privacy-iframe");if(dialog){var winW=window.innerWidth;var winH=window.innerHeight;var dlgH=getDialogHeight();dialog.style.left=Math.floor(winW*(100-dialog_width_pct)/100/2)+"px";dialog.style.top=(winH>dlgH?Math.floor((winH-dlgH)/2):0)+"px"} if(iframe){iframe.style.height=(getDialogHeight()-60)+"px"}} function createDialogElements(){var container=document.createElement('div');var overlay=document.createElement('div');overlay.id="amg-privacy-overlay";overlay.style.display="none";overlay.style.width="90%";overlay.style.height="100%";overlay.style.position="fixed";overlay.style.top="0px";overlay.style.left="0px";overlay.style.backgroundColor="#fefefe";overlay.style.opacity="0.7";overlay.style.zIndex="9999";var dialog=document.createElement('div');dialog.id="amg-privacy-dialog";dialog.style.display='none';dialog.style.position="fixed";dialog.style.width=dialog_width_pct+"%";dialog.style.zIndex="9999";dialog.style.border="1px solid lightgray";dialog.style.borderRadius="10px";dialog.style.backgroundColor="#ffffff";dialog.style.boxShadow="4px 4px 4px lightgray";var _head=document.createElement('div');_head.style.fontSize="20px";_head.style.padding="5px";_head.style.margin="0px 10px 0px 10px";var close=document.createElement('span');close.onclick=onButtonCloseClicked;close.innerHTML="×";close.style.color="#aaaaaa";close.style.float="right";close.style.fontSize="28px";close.style.fontWeight="bold";close.style.cursor="pointer";var _body=document.createElement('div');_body.style.color="black";_body.style.fontSize="14px";_body.style.padding="10px";_body.style.margin="0px 10px 0px 10px";var iframe=document.createElement('iframe');iframe.id="amg-privacy-iframe";iframe.src=iframe_src;iframe.style.width="90%";iframe.style.height=(getDialogHeight()-60)+"px";iframe.style.border="0px solid gray";iframe.style.position="relative";var _foot=document.createElement('div');_foot.style.textAlign="center";_foot.style.padding="5px";_foot.style.margin="0px 10px 0px 10px";_head.appendChild(close);_body.appendChild(iframe);dialog.appendChild(_head);dialog.appendChild(_body);dialog.appendChild(_foot);container.appendChild(overlay);container.appendChild(dialog);document.getElementsByTagName("body")[0].appendChild(container)} function onButtonCloseClicked(){privacy.hide()} function getPrivacyCookieValue(){var cname=privacy_cookie_name+'=';var dcookie=decodeURIComponent(document.cookie);var dcookies=dcookie.split(';');for(var i=0;i