var yahooSvcId = "dj0zaiZpPXpycFhOSGp2akNhUiZzPWNvbnN1bWVyc2VjcmV0Jng9NzY-"; /** * My서비스정보 조회 */ function getServiceinfo() { var setUrl = "/util/serviceInfo"; $.ajax({ url : setUrl, type : "POST", timeout : 3000, data : $("#form_action").serialize(), success : function(response) { $("#remain_date").html(response.resultMsg); sidebarmyinfo(); }, error : function() { $("#remain_date").text('-'); sidebarmyinfo(); } }); } /** 상담원 페이지 오픈 **/ function CusWin(aspid) { var nPage = window.open('http://www.9939.jp/'+aspid,'counswin','width=1040, height=710,left=100,top=40,scrollbars=no'); nPage.focus(); } function rememberId(sid) { var today = new Date(); today.setDate( today.getDate() + 100 ); document.cookie = "tmpEzhSaveId=" + sid + "; path=/; expires=" + today.toGMTString() + ";"; } function formatNumber(n){ return Number(String(n).replace(/\..*|[^\d]/g,"")).toLocaleString().slice(0,-3); } function commaStr( num ){ num = num+""; point = num.length%3 len = num.length; str = num.substring(0,point); while( point < len){ if( str != "" ) str += ","; str += num.substring( point , point+3); point +=3; } return str; } function nameLink(name) { var linkTarget = "#" + name; location.href = linkTarget; } function todayClocse(name, val, limit, fnc) { $.cookie(name, val, { expires: limit }); eval(fnc); } function addPostData(res) { var dataInfo = res.ResultInfo; var Data = res.Feature; var rowData = ''; if(dataInfo.Count == 0) { alert('올바른 우편번호를 입력해 주세요.'); } else { for(var i = 0; i < Data.length; i++) { rowData = Data[i]; console.log(JSON.stringify(rowData)); } } } function errorLocation(url, msg) { alert(msg); if(url != "") { location.replace(url); } } function zerofill(n, c) { return ((new Array(c).join("0")) + n).slice(-c); } function getDay(n) { var ret = new Date(); ret = new Date(ret.getFullYear(), ret.getMonth(), ret.getDate() - n ); return ret; } function dateTostr(d) { console.log(d); return d.getFullYear() + '-' + zerofill(d.getMonth() +1, 2) + '-' + zerofill(d.getDate(), 2) ; } function getDayTime(n, sName, eName){ var startdate, enddate; if(n == 1) { startdate = dateTostr(getDay(n)); enddate = startdate; } else { enddate = dateTostr(getDay(0)); startdate = dateTostr(getDay(n)); } $('#' + sName).val(startdate); $('#' + eName).val(enddate); } function getMonthTime(n, sName, eName) { var startdate, enddate; var now = new Date(); startdate = new Date(now.getFullYear(), now.getMonth() -1); enddate = new Date(now.getFullYear(), now.getMonth(), ''); $('#' + sName).val(dateTostr(startdate)); $('#' + eName).val(dateTostr(enddate)); } if(typeof arrCkParam !== 'function') { var arrCkParam = function(className) { var ret, sp = ''; $('.' + className).each(function() { if($(this).is(':checked') == true) { sp = (ret == '') ? '' : '&'; ret = ret + sp + $(this).val(); } }) return ret; } } if(typeof getCookie !== 'function') { var getCookie = function(k) { k = k + '='; var cookieData = document.cookie; var start = cookieData.indexOf(k); var cValue = ''; if(start != -1){ start += k.length; var end = cookieData.indexOf(';', start); if(end == -1)end = cookieData.length; cValue = cookieData.substring(start, end); } return unescape(cValue); } } if(typeof setCookie !== 'function') { /** * 쿠키를 생성한다. * @param string k 쿠키명 * @param string v 쿠키값 * @param int t 쿠키저장 날짜 */ var setCookie = function(k, v, d) { var expire = new Date(); expire.setDate(expire.getDate() + d); cookies = k + '=' + escape(v) + '; path=/ '; if(typeof d != 'undefined') cookies += ';expires=' + expire.toGMTString() + ';'; document.cookie = cookies; } } function myezhelpsetskinselect(a){ if(a.value=="1"){ document.getElementById('myezhelp_skinsample_img').src = "/images/myezhelp_skinsample_img1.gif" }else if(a.value=="2"){ document.getElementById('myezhelp_skinsample_img').src = "/images/myezhelp_skinsample_img2.gif" }else if(a.value=="3"){ document.getElementById('myezhelp_skinsample_img').src = "/images/myezhelp_skinsample_img3.gif" } else if(a.value=="4"){ document.getElementById('myezhelp_skinsample_img').src = "/images/myezhelp_skinsample_img4.gif" } else if(a.value=="5"){ document.getElementById('myezhelp_skinsample_img').src = "/images/myezhelp_skinsample_img5.gif" } }