function popSetCookie(name, value, expiredays ) { var todayDate = new Date(); todayDate.setDate( todayDate.getDate() + expiredays ); document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" } function popGetCookie( name ){ var nameOfCookie = name + "="; var x = 0; while ( x <= document.cookie.length ){ var y = (x+nameOfCookie.length); if ( document.cookie.substring( x, y ) == nameOfCookie ) { if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 ) endOfCookie = document.cookie.length; return unescape( document.cookie.substring( y, endOfCookie ) ); } x = document.cookie.indexOf( " ", x ) + 1; if ( x == 0 ) break; } return ""; } function btnCommonPOPUPLayerClose(xid) { document.getElementById(xid).style.display = "none"; } /* -- ?4?????????--*/ function pop_chk(xid){ popSetCookie( xid, "done" , 1); document.getElementById(xid).style.display = "none"; } function printZeros(n,digits){ n=n.toString(); var zero=''; if(n.length < digits){ for(i=0;i < digits -n.length;i++){zero+='0';} } return zero +n; } function nowString(){ var d = new Date(); var s= printZeros(d.getFullYear(),4) + printZeros(d.getMonth()+1,2) + printZeros(d.getDate(),2) + printZeros(d.getHours(),2) + printZeros(d.getMinutes(),2); return s; } function popLinkUrl(){ var linkURL = "http://www.hanatour.com/asp/promotion/autopromo/ap-20000.asp?promo_code=P15420"; var siteURL = popGetCookie("SiteURL"); if(siteURL==""){ window.open(linkURL,"_blank"); }else{ window.open("http://www.hanatour.com/asp/genexh/gateway_popup.asp?purl="+linkURL,"_blank"); } } document.write(''); document.getElementById("layer_popup_POPM1").innerHTML = '
' + ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + ' closed' + ' ' + ' ' + '
'; if( nowString() >= 201804061300 && nowString() <= 201804300000 ){ document.getElementById("layer_popup_POPM1").style.display = (popGetCookie("layer_popup_POPM1") == "") ? "block" : "none"; }else{ document.getElementById("layer_popup_POPM1").style.display ="none"; }