/******************************************* - Title : Munjanara JS - Date : 2003-09-03 - Author : KKH - Email : vsharp12@naver.com *******************************************/ var A4W = 595; var A4H = 842; var HOME_DIR = "MMS"; var initByte = 0; var INIT_BYTE = 0; var focusCursorObj; var guideIsLogin = 0; var mmsFlag = 0; var imageMax = 3; //var isAutoSizeAllow = 1; var pageFocus; var pageCont = ''; var counterId; var secTimer; var screenZoom; var menu_loc_head = 91; var menu_loc_side = 177; var toYear = 2024; var toMonth = 04; var toDay = 28; var toDate = 20240428; var reserveLimitDate = 20250528; var sendReplaceWord = new Array("[¼ö½ÅÀÚ]","[À̸§]","[Çö½Ã°£]","[¼º¸í¿­»ðÀÔ]","[±âŸ¿­»ðÀÔ]"); if(FindService(document,'/POLL/')) pageCont = 'POLL'; if(FindService(document,'/birthday')) pageCont = 'birthday'; // ¹ß¼Û±âº»´Ü°¡Ç¥±â var SMS_FEE = 25; var LMS_FEE = 50; var PHOTO_FEE = 90; var PHOTO_FEE2 = PHOTO_FEE + 30; var PHOTO_FEE3 = PHOTO_FEE2 + 30; var PHOTO_FEE_M = 300; var SOUND_FEE = 250; var ALL_FEE = 450; var LIMIT_SEND_ADDR_COUNT = 15000; if(!SMS_MAX_BYTE) var SMS_MAX_BYTE = 90; if(!SMS_MAX_PAGE) var SMS_MAX_PAGE = 1; if(!LMS_MAX_BYTE) var LMS_MAX_BYTE = 2000; var putImageDrag = 0; // »õ·Î¿î â ¿­±â function OpenWin1(url,name,scroll){ var window_left = 210; var window_top = 0; if(!scroll) scroll = "no"; var pop = window.open(url,name,'width=10,height=10,status=no,top=' + window_top + ',left=' + window_left +' scrollbars=' + scroll); try { pop.focus(); } catch(e) { alert("Æ˾÷ÀÌ Â÷´ÜµÇ¾î ÀÖ½À´Ï´Ù."); } } function OpenWin2(url,name,width,height,scroll){ var window_left=(screen.width-640)/2; var window_top=40; if(!scroll) scroll = "no"; window.open(url,name,'width='+width+',height='+height+',status=no,top=' + window_top + ',left=' + window_left +' scrollbars=' + scroll); } var check = ""; function OpenWinOnlyOne(url,name,width,height,scroll){ var window_left=(screen.width-640)/2; var window_top=40; if(!check.closed && check) return; if(!scroll) scroll = "no"; check = window.open(url,name,'width='+width+',height='+height+',status=no,top=' + window_top + ',left=' + window_left +' scrollbars=' + scroll); } function InsertCharV2(chr,dc){ if(!AvaliMsgBox()){ Alert("³»¿ëÀ» ÀÔ·ÂÇÒ ¼ö ÀÖ´Â »óÅ°¡ ¾Æ´Õ´Ï´Ù."); return; } if(!dc) var dc = document; var fm = dc.send_msg; var ob = fm.msgbox; if(ob.value == ob.defaultValue) ob.value = ""; if(dc.selection){ ob.focus(); var sel = dc.selection.createRange(); sel.text = chr; sel.select(); }else if(ob.selectionStart || ob.selectionStart == '0'){ var st = ob.selectionStart; var ed = ob.selectionEnd; ob.value = ob.value.substring(0,st) + chr + ob.value.substring(ed,ob.value.length); ob.selectionStart = ob.selectionEnd = st + chr.length; }else{ ob.value += chr; } DoClearV3(dc); CalByteV3(dc); ob.focus(); } function StripStr(str){ var spcChar = ['$','\'','\"',';','+','&','^','\\','#','@','*','?',' ','<','>','=','`']; for(var i=0;i -1) return spcChar[i]; } return true; } // ¹®ÀÚ¿­¹ÙÀÌÆ®¼ö function GetStringSize(str){ var strLen = str.length; var byteIs = 0; var byteIs; var thisChar; var escChar; for(var i=0; i= 4 || escChar == "%A7"){ byteIs += 2; }else{ if(escChar != "%0D") byteIs += 1; } } return byteIs; } // ¹Þ´Â¹øÈ£ »ðÀÔ ( 2009.07.06 KKH ) - ùȭ¸é ¼ö½Å¹øÈ£ ¸®½ºÆ® ¹æ½ÄÀ¸·Î º¯°æ function InsertPhone(fm,phone) { phone = phone.replace(/cR_/g, '\n'); if(phone){ fm.phoneList.style.backgroundImage=""; fm.phoneList.value = fm.phoneList.value + phone + "\n"; fm.phoneList.focus(); } } function SetPhoneList(ob){ var regPhone = /^(1[016789]{1}|70|2|[3-9]{1}[0-9]{1})[0-9]{3,4}[0-9]{4}$/; var phoneList = $('#' + ob).val().replace(/\./g, '').replace(/ /g, '').replace(/-/g, '').split('\n'); var editPhone = ""; $.each( phoneList, function(idx, phone) { phone = phone.replace(/[^0-9]/g,''); if( $.trim(phone) == "" ) return true; if( regPhone.test($.trim(phone)) ) { //0ÀÌ ¾ø´Â °æ¿ì if( idx == 0 ) editPhone += "0" + phone; else editPhone += "\n0" + phone; } else { //ÀϹÝÀÇ ¹øÈ£ÀÎ °æ¿ì if( idx == 0 ) editPhone += phone; else editPhone += "\n" + phone; } }); return editPhone; } /************************************************************************************************* * ¹Þ´Â¹øÈ£ »ðÀÔ *************************************************************************************************/ function InsertPhoneBox(fm,phone) { for(var i=0;i<10;i++){ prePhone = fm.all['user'+i].value; if(prePhone == phone){ fm.all['user'+i].select(); Alert("µ¿ÀÏÇÑ ÀüÈ­¹øÈ£°¡ ÀÖ½À´Ï´Ù."); break; } if(!prePhone){ fm.all['user'+i].value = phone; break; } } } // ¸Þ½ÃÁö Àü¼Û ⠹̸®¿­±â function OpenWinSend(){ var winHandle = window.open('', 'send', 'width=301, height=338, scrollbars=no'); winHandle.focus(); return true; } function DoClearV3(dc) { if(!AvaliMsgBox()) return; var ob = dc.send_msg.msgbox; if (ob.value == ob.defaultValue) ob.value = ''; CalByteV3(dc); } // ¸¹ÀÌ Æ²¸®´Â ÇÑ±Û ÀÚµ¿ ġȯ (2017.9.1 KKH) function ChangeWrongHangul(str){ if(!str) return ""; var arr = {}; arr["Ÿå"] = "ÀÍ"; arr["Ÿä"] = "ÀØ"; //arr["˜Þ"] = "¼¥"; arr["‰Ñ"] = "µÆ"; arr["ªO"] = "ã"; arr["‹Ã"] = "¶±"; arr["™ö"] = "¼ó"; arr["¯ƒ"] = "Ä¢"; arr["‰ç"] = "µÆ"; for(var wh in arr) str = str.replace(new RegExp(wh,'g'),arr[wh]); return str; } // ¹®ÀÚ¿­ ±æÀÌ °è»ê 2015.11.24 function CalByteV3(dc){ var fm = dc.send_msg; var ob = fm.msgbox; var byteIs = 0; var lastByte; var thisChar; var escChar; var limitByte = SMS_MAX_BYTE; if(dc.all.photoNum.value) limitByte = LMS_MAX_BYTE; var curText = new String(ob.value); var strLen = curText.length; var msgKind = "´Ü¹®"; for(i=0;i= 4 || escChar == "%A7" || escChar == "%B4" || escChar == "%B7" || escChar == "%B8") byteIs += 2; else if(escChar != "%0D") byteIs += 1; if(byteIs > SMS_MAX_BYTE) limitByte = LMS_MAX_BYTE; if(byteIs > limitByte){ thisText = curText.substring(0, i); ob.value = thisText; byteIs = lastByte; Alert(limitByte + ' ¹ÙÀÌÆ®¸¦ ÃÊ°úÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.'); break; } // ¾È³»¸»Ç³¼± if(byteIs > SMS_MAX_BYTE && dc.getElementById('mms_img').innerHTML == ""){ msgKind = "Àå¹®"; if(mmsFlag == 0){ mmsFlag = 1; if(window.name == "main" && ob.value != ob.defaultValue){ dc.getElementById('alert_layer_sms').style.display='none'; dc.getElementById('alert_layer_lms').style.display='block'; if(dc == document) setTimeout("document.getElementById('alert_layer_lms').style.display='none'", 4000); else setTimeout("parent.document.getElementById('alert_layer_lms').style.display='none'", 4000); } } if(dc.getElementById('title')) dc.getElementById('title').disabled = false; }else{ if(dc.getElementById('mms_img').innerHTML == ""){ limitByte = SMS_MAX_BYTE; if(dc.getElementById('title')) dc.getElementById('title').disabled = true; }else msgKind = "±×¸²"; } lastByte = byteIs; } dc.all.span_msgkind.innerHTML = msgKind; dc.all.byte.value = byteIs; dc.all.maxbyte.value = limitByte; //if(isAutoSizeAllow) autosize.update(ob); } /******************************************************************************* * ÄÁÅÙÃ÷º° »ç¿ë¿ä±Ý 2015.11.26 KKH * out1 : ´Ü°¡Ç¥½Ã´ë»ó, out2 : ÄÁÅÙÃ÷Ç¥½Ã´ë»ó (´Ü¹®, Àå¹®, ±×¸²) *******************************************************************************/ function GetFee(fm,out1,out2){ var sumFee; var msgType; if(fm.byte.value > SMS_MAX_BYTE) sumFee = LMS_FEE; else sumFee = SMS_FEE; if(fm.photoNum.value && fm.soundNum.value) sumFee = ALL_FEE; else if(fm.photoNum.value && fm.photoNum2.value) sumFee = PHOTO_FEE2; else if(fm.photoNum.value && fm.photoNum2.value && fm.photoNum3.value) sumFee = PHOTO_FEE3; else if(fm.photoNum.value) sumFee = PHOTO_FEE; else if(fm.soundNum.value) sumFee = SOUND_FEE; // ´Ü°¡Ç¥±â if(out1) out1.innerHTML = sumFee; // ÄÁÅÙÃ÷Ç¥±â if(out2){ if(sumFee == SMS_FEE) msgType = "´Ü¹®"; else if(sumFee == LMS_FEE) msgType = "Àå¹®"; else msgType = "±×¸²"; out2.innerHTML = msgType; } if(document.getElementById("title")){ if(sumFee == SMS_FEE) document.getElementById("title").disabled = true; else document.getElementById("title").disabled = false; } } // ¹®ÀÚ¿­ ±æÀ̸¦ ¸®ÅÏÇÑ´Ù. function GetLength(str) { var length = 0; for(var i = 0; i < str.length; i++) { if (escChar.length >= 4 || escChar == "%A7") length += 2; else if(escChar != "%0D") length += 1; } return length; } // ÀÔ·Â ¸Þ½ÃÁö ÀúÀå function SetCookie(keyname,val,days){ var expires = ""; if(typeof days != 'undefined'){ var date = new Date(); date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); expires = "; expires=" + date.toGMTString(); } document.cookie = escape(keyname) + "=" + escape(val) + expires + "; path=/"; if(GetCookie(keyname) != val) document.cookie = escape(keyname) + "=; path=/"; } // ÇÚµåÆù üũ function CheckHP(phone){ if(!phone) return false; flag = isNaN(phone); if(flag) { Alert('¼ýÀÚ¸¸ ÀԷ°¡´ÉÇÕ´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇϼ¼¿ä.\n\n\' , - , \) µîÀ» ÀÔ·ÂÇÏ½Ã¸é ¾ÈµË´Ï´Ù'); return false; } var prephone = phone.substr(0,3); if(prephone != "011" && prephone != "016" && prephone != "017" && prephone != "018" && prephone !="019" && prephone !="010") { Alert("°¡´ÉÇÑ Åë½Å»ç°¡ ¾Æ´Õ´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇϼ¼¿ä."); return false; } strPhone = new String(phone); if(strPhone.length < 10){ Alert('ÇÚµåÆù ¹øÈ£´Â 10 ÀÚ ÀÌ»óÀ¸·Î ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇϼ¼¿ä.'); return false; } return true; } // ÇÚµåÆùÀÎÁö¸¸ üũ function IsHP(phone){ if(!phone) return false; flag = isNaN(phone); if(flag) return false; var prephone = phone.substr(0,3); if(prephone != "011" && prephone != "016" && prephone != "017" && prephone != "018" && prephone !="019" && prephone !="010") return false; if(phone.length < 10) return false; return true; } // ÀüÈ­¹øÈ£ üũ function CheckTP(phone){ if(!phone) return false; strPhone = new String(phone); if(strPhone.length < 9){ Alert('ÀüÈ­¹øÈ£´Â 9 ÀÚ ÀÌ»óÀ¸·Î ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù. ´Ù½Ã ÀÔ·ÂÇϼ¼¿ä.'); return false; } return true; } // 2022.6.14 function IsPhone(phone){ if(isNaN(phone)) return false; var len = phone.length; var head3 = phone.substr(0,3); var head2 = phone.substr(0,2); if(head3 == "010" && len == 11) return true; else if(head2 == "02" && (len == 9 || len == 10)) return true; else if((head3 == "011" || head3 == "016" || head3 == "017" || head3 == "018" || head3 == "019") && (len == 10 || len == 11)) return true; else if((head3 == "031" || head3 == "032" || head3 == "033" || head3 == "041" || head3 == "042" || head3 == "043" || head3 == "044" || head3 == "051" || head3 == "052" || head3 == "053" || head3 == "054" || head3 == "055" || head3 == "061" || head3 == "062" || head3 == "063" || head3 == "064") && (len == 10 || len == 11)) return true; else if(head3 == "050" && (len == 11 || len == 12)) return true; else if(head3 == "070" && len == 11) return true; else if(head3 == "080" && len == 10) return true; else if((head2 == "15" || head2 == "16" || head2 == "18") && len == 8) return true; else return false; } function CheckPhone(phone){ if(isNaN(phone)){ return false; }else{ if(phone.length < 8 || phone.length > 12){ return false; } var prePhone = phone.substr(0,3); if(prePhone != "010" && prePhone != "011" && prePhone != "016" && prePhone != "017" && prePhone != "018" && prePhone != "019" && prePhone != "030" && prePhone != "031" && prePhone != "032" && prePhone != "033" && prePhone != "041" && prePhone != "042" && prePhone != "043" && prePhone != "044" && prePhone != "050" && prePhone != "051" && prePhone != "052" && prePhone != "053" && prePhone != "054" && prePhone != "055" && prePhone != "060" && prePhone != "061" && prePhone != "062" && prePhone != "063" && prePhone != "064" && prePhone != "070" && prePhone != "080") { var prePhone = phone.substr(0,2); if(prePhone != "02" && prePhone != "15" && prePhone != "16" && prePhone != "18"){ return false; } } } return true; } // °ø¹éÁ¦°Å function Trim(string) { for(;string.indexOf(" ")!= -1;){ string=string.replace(" ",""); } return string; } // Àü¼Û ¹öÆ° ÀÌÁßÀü¼Û ¸·±â function SendLiveExpire(exp){ if(document.getElementById('okSend')){ document.all.okSend.disabled = true; $('#okSend').css('filter','grayscale(50%)'); setTimeout ("document.all.okSend.disabled=false;$('#okSend').css('filter','none')", 1000*exp); } } function PreviewThisImg(img) { document.getElementById("preview_msg_2").innerHTML = ""; document.getElementById("preview_msg_2").style.top = event.y; document.getElementById("preview_msg_2").style.left = event.x; document.getElementById("preview_msg_2").style.display = 'inline'; document.getElementById("preview_msg_2").style.border = 0; } // ¹Ì¸®º¸±â function PreviewBoxBasic(msg,width,bgcolor){ if(!width) var width = 117; if(!bgcolor) var bgcolor = "#ECECF3"; msg = RecoverSpacialChar(msg,"html"); var ob = document.getElementById("preview_frame_top"); ob.style.display = "block"; ob.innerHTML = "
" + msg + "
"; ob.style.top = event.clientY + document.body.scrollTop + 7 + "px"; ob.style.left = event.clientX + document.body.scrollLeft + 20 + "px"; ob.style.width = width; ob.style.border = '1px solid #CCCCCC'; ob.style.display = 'inline'; } function PreviewBoxBasicHide(){ var ob = document.getElementById("preview_frame_top"); ob.style.top = 0; ob.style.left = 0; ob.style.display = 'none'; } function PreviewBoxBasicMove(){ var ob = document.getElementById("preview_frame_top"); ob.style.display = "block"; ob.style.top = event.clientY + document.body.scrollTop + "px"; ob.style.left = event.clientX + document.body.scrollLeft + 11 + "px"; } // ¹Ì¸®º¸±â - ÇÁ·¹ÀÓ¹æ½Ä¿¡ µû¸¥ À§Ä¡¿À·ù function PreviewFrame(iname,msg,width,locateY,bgcolor){ if(!width) var width = 117; if(!bgcolor) var bgcolor = "#ECECF3"; var frameBody = parent.document.getElementById("preview_frame_top"); msg = RecoverSpacialChar(msg); parent.document.getElementById("preview_frame_top").style.display = "block"; parent.document.getElementById("preview_frame_body").innerHTML = "
" + msg + "
"; //parent.document.getElementById("preview_frame_body").style.top = event.clientY + locateY + $(document).scrollTop() + 180 + "px"; parent.document.getElementById("preview_frame_body").style.top = event.clientY + locateY + $(document).scrollTop() + 180 + "px"; parent.document.getElementById("preview_frame_body").style.left = event.clientX + $("#" + iname,parent.document).position().left + $(document).scrollLeft() + 270 + "px"; parent.document.getElementById("preview_frame_body").style.width = width; parent.document.getElementById("preview_frame_body").style.border = '1px solid'; parent.document.getElementById("preview_frame_body").style.display = 'inline'; } function PreviewHide() { parent.document.getElementById("preview_frame_body").style.top = 0; parent.document.getElementById("preview_frame_body").style.left = 0; parent.document.getElementById("preview_frame_body").style.display = 'none'; } function PreviewMove(iname,locateY) { parent.document.getElementById("preview_frame_top").style.display = "block"; parent.document.getElementById("preview_frame_body").style.top = event.clientY + locateY + $(document).scrollTop() + 180 + "px"; parent.document.getElementById("preview_frame_body").style.left = event.clientX + $("#" + iname, parent.document).position().left + document.body.scrollLeft + 270 + "px"; } // ¹Ì¸®º¸±â function MovePreview() { preview_msg.style.top = event.y + document.body.scrollTop + 10 + "px"; preview_msg.style.left = event.x + document.body.scrollLeft + 10 + "px"; } function PreviewThis(msg,width,bgcolor,img){ if(!width) var width = 181; if(!bgcolor) var bgcolor = "#ECECF3"; msg = RecoverSpacialChar(msg); if(img) preview_msg.innerHTML += "
" + img + "
"; if(msg) preview_msg.innerHTML += "
" + msg + "
"; preview_msg.style.top = 0 + "px"; preview_msg.style.left = 0 + "px"; preview_msg.style.width = width; preview_msg.style.display = 'inline'; preview_msg.style.border = '1px solid';; } function PreviewThis2(msg,width,bgcolor,img) { if(!width || width==0) var width = 140; if(!bgcolor) var bgcolor = "#ECECF3"; if(img) img += "
"; else var img=''; if(msg) msg = RecoverSpacialChar(msg); if(img){ msg = img + "
" + msg + "
"; $('#preview_msg').css('width','auto'); }else{ $('#preview_msg').css('width', width); } $('#preview_msg').css('background-color',bgcolor); $('#preview_msg').css('padding','7px'); $('#preview_msg').css('border','1px solid #AAAAAA'); $('#preview_msg').css('border-radius','2px'); $('#preview_msg').css('line-height','17px'); $('#preview_msg').css('overflow','hidden'); $('#preview_msg').html(msg); $('#preview_msg').show(); } //¹®ÀÚ³ª¶óÇ÷¯½º¿¡¼­ »ç¿ëµÊ function PreviewThis4(event, msg, width, bgcolor,img) { if(!width || width==0) var width = 170; if(!bgcolor) var bgcolor = "#ECECF3"; if(img) img += "
"; else var img=''; msg = RecoverSpacialChar(msg); msg = "
x "+msg+"
"; if (msg != '') preview_msg.innerHTML = "
" + img + "
" + msg + "
"; else preview_msg.innerHTML = "
" + img + "
"; preview_msg.style.border = 'none'; preview_msg.style.visibility = 'hidden'; preview_msg.style.display = "block"; // Å×ÀÌºí ·»´õ¸µ setTimeout(function() { var tooltipWidth = preview_msg.offsetWidth; var tooltipHeight = preview_msg.offsetHeight; var posX = event.pageX + 10; var posY = event.pageY - tooltipHeight; // ÅøÆÁÀÌ Ã¢ÀÇ À§ÂÊÀ» ³Ñ¾î°¡Áö ¾Êµµ·Ï Á¶Á¤ if (posY < 0) { posY = event.clientY + 10; } // ÅøÆÁÀÌ Ã¢ÀÇ ¾Æ·¡ÂÊÀ» ³Ñ¾î°¡Áö ¾Êµµ·Ï Á¶Á¤ if (posY + tooltipHeight > window.innerHeight) { posY = event.clientY - tooltipHeight - 10; } preview_msg.style.top = posY + "px"; preview_msg.style.left = posX + "px"; preview_msg.style.visibility = 'visible'; }, 0); // setTimeoutÀ» »ç¿ëÇÏ¿© ·»´õ¸µ ÈÄ offsetWidth È®ÀÎ } // ¹Ì¸®º¸±â function HidePreview() { if ($("#sent_list_contents", parent.document).css("display") == "block" || $("#sent_list_contents", parent.document).css("display") == "inline") { parent.document.getElementById("preview_top").style.display = "none"; // parent.document.getElementById("preview_msg_2").innerHTML = ''; parent.document.getElementById("preview_msg_2").style.top = 0; parent.document.getElementById("preview_msg_2").style.left = 0; parent.document.getElementById("preview_msg_2").style.display = 'none'; } else { preview_msg.innerHTML = ''; preview_msg.style.top = 0; preview_msg.style.left = 0; preview_msg.style.display = 'none'; } } function InputMoveNext(sou,size,tar){ var sLen = sou.value.length; if(size <= sLen) tar.select(); } // ÀԷ¸޽ÃÁöÀúÀå 2004-08-16 // À̹ÌÁöÆ÷ÇÔ¼öÁ¤ 2016-07-06 function SaveMessage(){ var tail = ""; if(typeof document.send_msg != "undefined"){ var fm = document.send_msg; for(var i=1;i<=imageMax;i++){ if(i != 1) tail = i; if(typeof fm['photoNum' + tail] != "undefined" && fm['photoNum' + tail] != ""){ var photoNum = fm['photoNum' + tail].value; var edate = fm['edate' + tail].value; if(photoNum != "" && edate != ""){ SetCookie("movePid" + tail, photoNum); SetCookie("moveEnrol" + tail, edate); }else{ SetCookie("movePid" + tail, ""); SetCookie("moveEnrol" + tail, ""); } } } if(typeof fm.msgbox != "undefined"){ var msg = fm.msgbox.value; //if(msg != fm.msgbox.defaultValue) SetCookie("saveTMS",msg); if(msg != fm.msgbox.defaultValue) sessionStorage.setItem("saveTMS",msg); } if(typeof fm.title != "undefined"){ var title = fm.title.value; SetCookie("saveTitle",title); } } return; } function GetCookie(keyname){ var name = new RegExp(keyname + '=([^;]*)'); return name.test(document.cookie) ? unescape(RegExp.$1) : ''; } // ÁÖ¼Ò·Ï ÀüÈ­¹øÈ£ »ðÀÔ Àü¼Ûâ¿¡ »ðÀÔ function UsePhone(phone,num){ if(parent.opener){ for(var i=1;i<=num;i++){ // Áߺ¹ ÀüÈ­¹øÈ£¸¦ °É·Á³½´Ù. if(parent.opener.document.send_msg["to_phone"+i].value!=phone){ if(parent.opener.document.send_msg["to_phone"+i].value==""){ parent.opener.document.send_msg["to_phone"+i].value=phone; break; } }else{ Alert('Áߺ¹µÈ ÀüÈ­¹øÈ£ ÀÔ´Ï´Ù.'); break; } } } } function GuideTextChar(str,chr){ var divName = "guide-text-char"; var ob = $('#' + divName); if(!ob.length){ var newDiv = $("
"); $(document.body).append(newDiv); } } function GuideTip(ob,loc,title,comment){ if(!ob) return; if(!$('#' + ob).length){ var newDiv = $("
"); $(document.body).append(newDiv); } var loc = $('#' + loc).offset(); $('#' + ob).css("top",(loc.top - 91) + "px"); $('#' + ob).css("margin-left",-($(document.body).width()/2 - loc.left + $('#' + ob).width()) + "px"); $('#' + ob).css("background-image","url('/_img/tip_scale_eye.png')"); var body = "
" + title + "
"; body += "
" + comment + "
"; $('#' + ob).html(body); } function addChar(aspchar){ document.send_msg.msgbox1.value += aspchar; calByte(document.send_msg.msgbox1.value); } function chgPhoneFocus(tg){ document.send_msg['to_phone'+tg].focus(); } function openWin(url,name) { var winHandle = window.open(url, name, 'width=301, height=338, scrollbars=no'); winHandle.focus(); return true; } function openSendWin() { var winHandle = window.open('', 'sendSMS', 'width=301, height=338, scrollbars=no'); winHandle.focus(); return true; } function grp_openSendWin() { var winHandle = window.open('', 'sendSMS', 'width=301, height=420, scrollbars=no'); winHandle.focus(); return true; } function saveSMS() { var tg = eval(document.send_msg); if (tg.msgbox.value == tg.msgbox.defaultValue || tg.msgbox.value == '') { tg.msgbox.value = ''; Alert('¸Þ½ÃÁö ³»¿ëÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä.'); return false; } var a = eval(document.send_msg.msgbox); var b = eval(document.saveSMS_form.save_message); b.value = a.value; if(opensaveWin()){ document.saveSMS_form.submit(); } } function opensaveWin() { var winHandle = window.open('', 'saveSMS', 'width=301, height=338, scrollbars=no'); winHandle.focus(); return true; } // ½Å¿ëÄ«µå ¿µ¼öÁõ ( allatbiz ) function BillView(tnum){ var window_left=(screen.width-640)/2; var window_top=(screen.height-480)/2; var name = "billView" ; var urls = "https://www.allatbiz.net/servlet/AllatBizSrv/biznoss/jsp/content/crd_pop_billview1.jsp?porder_no=" + tnum; //window.showModalDialog(urls,'', 'dialogWidth:395px; dialogHeight:830px; status:no; scroll:no; resizable:no') ; window.open(urls,name,'width=395,height=730,status=no,top=' + window_top + ',left=' + window_left +' scrollbars=no'); } // ActiveX ÆÐÄ¡¿¡ µû¸¥ ( 2006-04-01 ) function ObjWrite(s){ document.write(s); } // ½Å¿ëÄ«µå ¿µ¼öÁõ ( allatbiz 2006-06-16 ) function BillViewN(cnum,tnum){ var window_left=(screen.width-640)/2; //var window_top=(screen.height-480)/2; var window_top=20; var name = "billView" ; url ="https://www.allatpay.com/servlet/AllatBizPop/member/pop_card_receipt.jsp?tx_seq_no=" + tnum + "&order_no=" + cnum; window.open(url,name,'width=410,height=670,status=no,top=' + window_top + ',left=' + window_left +' scrollbars=no'); } // ·¹À̾î¹æ½Ä Àü¼Ûâ ÃʱâÈ­ ( 2006-06-14 ) function ClearSendLayer(){ document.all.totPhone.innerHTML='0'; document.all.inPhone.innerHTML='0'; document.all.dupPhone.innerHTML='0'; document.all.rejPhone.innerHTML='0'; document.all.saveFee.innerHTML='0'; document.all.mesg.innerHTML='ÀüÈ­¹øÈ£ È®ÀÎÁß ..'; } // EnterKey TAB À̺¥Æ® °­Á¦ ¹ß»ý function NextFocus(){ if(event.keyCode == 13) event.keyCode = 9; } // Progress Page À¯Áö ½Ã°£ function ProgressPage(tm){ OpenWin1("/MSG/inc/progress.htm?liveTime=" + tm,"progress"); } // ¸ÞÀÎÆ˾÷â function PublicPopup(fname,kind,scale,link,exp,fpath){ if(!fname) return; var fileInfo = fname.split('.'); var divName = fileInfo[0]; if(!fpath) fpath = "/_img"; if(GetCookie(divName) == 'no') return; var path = $(location).attr('pathname') switch(kind){ case "mms": case "MMS": if(path != "/MMS/" && path != "/MMS/index.html") return break; case "poll": case "POLL": if(path != "/POLL/" && path != "/POLL/index.html") return break; case "intro": if(path != "/" && path != "/index.html") return break; case "addr": case "ADDR": if(path != "/TMS/addr/" && path != "/TMS/addr/index.html") return break; case "tms": case "TMS": default: if(path != "/TMS/" && path != "/TMS/index.html") return break; } if(!exp) expDate = 1; else expDate = exp; var width = 324; var height = 330; var ptop = 300; var html = ""; var guide = "ÀÏ µ¿¾È ÀÌ Ã¢À» ¿­Áö ¾ÊÀ½"; // ÀÛÀº»çÀÌÁî 1, Å«»çÀÌÁî 2 if(scale != 1){ width = 450; height = 660; ptop -= 80; }else guide = "ÀÏ ¿­Áö¾ÊÀ½"; var newDiv = $("
"); $(document.body).append(newDiv); $('#' + divName).css('width',width + 'px'); $('#' + divName).css('height',height + 'px'); $('#' + divName).css('background-color','#FFFFFF'); $('#' + divName).css('border','1px solid orange'); $('#' + divName).css('position','absolute'); $('#' + divName).css('top',ptop + 'px'); $('#' + divName).css('overflow','hidden'); $('#' + divName).css('z-index','95'); $('#' + divName).css('display','block'); $('#' + divName).css('margin-left', -(width / 2) + 'px'); $('#' + divName).css('left','50%'); html += "
"; html += "
"; html += "
"; html += "
´Ý±â
¨ä " + expDate + guide + "
"; html += "
"; $('#' + divName).html(html); if(link){ $("div[name='link_img']:last").css('cursor','pointer'); $("div[name='link_img']:last").attr('onClick',link); } } function PopupDivClose(name,exp){ if(!exp) var exp = 0; PopupSetCookie(name, "no" , exp); $('#' + name).hide(); } function PopupSetCookie(name,value,expiredays){ if(expiredays != 0){ var date = new Date(); date.setDate(date.getDate() + expiredays); document.cookie = name + "=" + escape(value ) + "; path=/; expires=" + date.toGMTString() + ";"; }else{ document.cookie = name + "=" + escape(value) + "; path=/"; } } function ChkPos(){ focusCursorObj=window.event.srcElement.createTextRange(); focusCursorObj.moveToPoint(window.event.x, window.event.y); } function CheckSendPhone(ob,ty){ if(ob.value == '' || ob.value == 0){ ob.select(); Alert('¹ß½Å¹øÈ£°¡ ÁöÁ¤µÇÁö ¾Ê¾Ò½À´Ï´Ù.'); return false; } if(ob.value.length < 8){ ob.select(); Alert('¹ß½Å¹øÈ£¸¦ ´Ù½Ã È®ÀÎÇØÁÖ¼¼¿ä.'); return false; } if(ty == 1){ if(ob.value.length < 8){ ob.select(); Alert('¹ß½Å¹øÈ£¸¦ ´Ù½Ã È®ÀÎÇØÁÖ¼¼¿ä.'); return false; } } if(!CheckPhone2(ob.value)){ ob.select(); Alert('¹ß½Å¹øÈ£¸¦ ´Ù½Ã È®ÀÎÇØÁÖ¼¼¿ä.'); return false; } return true; } function Text2Checked(ob){ ob.checked = !ob.checked; } function ServerMesgSize(ob){ var mesg = ob.value; OpenWin1("/MSG/php/serverMesgSize.php?str=" + mesg,""); } // AllTheGate function CardReceipt(num,cid,day){ url="https://www.allthegate.com/receipt/receipt.jsp"; //url="https://www.allthegate.com/customer/receiptLast3.jsp"; url=url+"?sRetailer_id=munjanara"; url=url+"&send_no="+num; url=url+"&approve="+cid; url=url+"&send_dt="+day; window.open(url, "window","toolbar=no,location=no,directories=no,status=,menubar=no,scrollbars=no,resizable=no,width=420,height=700,top=0,left=150"); } // Nicepayment function CardReceiptNice(tid){ // type 1 : ¸ÅÃâÀüÇ¥, type 2 : Çö±Ý¿µ¼öÁõ url="https://npg.nicepay.co.kr/issue/IssueLoader.do"; url=url+"?TID=" + tid; url=url+"&type=0"; window.open(url, "window","toolbar=no,location=no,directories=no,status=,menubar=no,scrollbars=yes,resizable=no,width=420,height=700,top=0,left=150"); } function CallCardReceipt(cid,tid,day){ url="http://www.allthegate.com/customer/receiptLast3.jsp"; url=url+"?sRetailer_id=munjanara"; url=url+"&approve=" + cid; url=url+"&send_no=" + tid; url=url+"&send_dt=" + day; window.open(url, "window","toolbar=no,location=no,directories=no,status=,menubar=no,scrollbars=no,resizable=no,width=420,height=700,top=0,left=150"); } function GuideIsLogin(){ if(guideIsLogin == 0){ guideIsLogin = 1; Alert("·Î±×ÀÎÀ» ÇÏ¼Å¾ß Á¤»óÀÌ¿ëÀÌ °¡´ÉÇÕ´Ï´Ù."); return; } } function GuideSelfClose(exp){ $(document.body).append("
·Î±×ÀÎ ÈÄ ÀÌ¿ëÇØÁÖ¼¼¿ä.
"); $(document.body).append(""); if(exp){ $('#div_alert_mesg_expired',document).show(); var alertInterval = setInterval(function(){ exp--; $('#div_alert_mesg_expired',document).html("- " + exp + "ÃÊÈÄ ´ÝÈû -"); if(exp == 0){ clearInterval(alertInterval); self.close(); } },1000); } } function CheckEmail(email){ for(var i=0;i 4) count += 2; else if(escape(temp) != "%0D") count++; if(count > _len) break; } return _str.substring(0, k); } // È­¸éÀ§Ä¡À̵¿ function goPageLoc(name){ if(!name) name = "#"; else name = "#"+name; document.location.href = name; } // º¸³½³»¿ëº¸±â function SentLayer(msg,img,snd) { var msg = RecoverSpacialChar(msg); if ($("#sent_list_contents", parent.document).css("display") == "block" || $("#sent_list_contents", parent.document).css("display") == "inline"){ parent.document.getElementById("preview_top").style.display = "block"; parent.document.getElementById("preview_msg_2").innerHTML = "
" + img + "
" + msg + "
"; parent.document.getElementById("preview_msg_2").style.top = event.clientY + 476 + document.body.scrollTop + 180 + "px"; parent.document.getElementById("preview_msg_2").style.left = event.clientX + $("#sent_list_contents", parent.document).position().left + document.body.scrollLeft + 270 + "px"; parent.document.getElementById("preview_msg_2").style.width = 176 + "px"; parent.document.getElementById("preview_msg_2").style.border = '1px solid'; parent.document.getElementById("preview_msg_2").style.display = 'inline'; }else{ var div = document.getElementById("preview_msg_2"); div.innerHTML = "
" + img + "
" + msg + "
"; div.style.top = event.clientY + document.body.scrollTop + 10 + "px"; div.style.left = event.clientX + document.body.scrollLeft + 10 + "px"; div.style.width = 176 + "px"; div.style.border = '1px solid'; div.style.display = 'inline'; } } function SentLayerMove() { sent_layer.style.top = event.y + document.body.scrollTop + 10; sent_layer.style.left = event.x + document.body.scrollLeft + 10; } function SentLayerHide() { sent_layer.innerHTML = ''; sent_layer.style.top = 0; sent_layer.style.left = 0; sent_layer.style.display = 'none'; } // ¿µ¼ýÀÚ ¹®ÀÚ°Ë»ç function IsStrEN(str){ if(str == "") return; var charOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@._-"; for(i=0;i'); msg = msg.replace(/</g, '<'); msg = msg.replace(/&/g, '&'); } else var msg = ""; var fm = dc.send_msg; fm.pid.value = pid; fm.msgbox.value = msg; SMS_FEE = parent.SMS_FEE; LMS_FEE = parent.LMS_FEE; PHOTO_FEE = parent.PHOTO_FEE; SOUND_FEE = parent.SOUND_FEE; ALL_FEE = parent.ALL_FEE; CalByteV3(dc); MoveScroll(dc, "scroll_div", "msgbox"); GetFee(fm,dc.getElementById("fee"),dc.getElementById("span_msgkind")); } // ƯÁ¤ ½Ã°£µ¿¾È ¹öÆ° ºñÈ°¼ºÈ­ function DisableExpire(ob,se){ ob.disabled = true; setTimeout ('ob.disabled=false', 1000 * se); } // 3ÀÚ¸®¼ö Äĸ¶ Ç¥Çö function NumberFormat(val){ var str = val + ""; var ret = ""; var j = 1; str = str.replace(/\,/gi,''); var len = str.length; for(i=len;i>0;i--){ chr = str.substring(i-1,i); ret = chr + ret; if((j%3)==0 && i>1) ret = "," + ret; j++; } return ret; } // ±¤°í¼º½ºÆÔ¹®ÀÚ±ÔÄ¢ ¾Ë¸² 2015.7.30 function CheckSpamAdRull(_mesg){ if(_mesg.indexOf("(±¤°í)") != 0 || _mesg.indexOf("¹«·á") == -1 || _mesg.indexOf("°ÅºÎ") == -1 || _mesg.indexOf("080") == -1){ return "(!) Àü¼ÛÇÏ´Â ¸Þ¼¼Áö°¡ ±¤°í(È«º¸)ÀÎ °æ¿ì\n\n±¤°í(È«º¸)¹®ÀÚ´Â ±¤°í±ÔÁ¤Áؼö ÈÄ ¹®ÀÚ¸¦ ¹ß¼ÛÇؾßÇÕ´Ï´Ù.\n¹®ÀÚÀÛ¼º ÈÄ¿¡ ¿ìÃø [±¤°í±ÔÁ¤ÀÚµ¿ÀÔ·Â] ¹öÆ°À» ´­·¯\n±¤°í±ÔÄ¢¿¡ ¸ÂÃç ¹®ÀÚ¸¦ ¹ß¼ÛÇØÁÖ¼¼¿ä.\n\n±¤°í(È«º¸)°¡ ¾Æ´Ñ °æ¿ì ¹ß¼ÛÇÏ½Ã¸é µË´Ï´Ù.\n"; }else return ""; } // ±¤°í¼º½ºÆÔ¹®ÀÚ±ÔÄ¢ ¾Ë¸² 2015.7.30 function InsertAdText(msgbox,sender,_title){ if(!AvaliMsgBox()){ Alert("³»¿ëÀ» ÀÔ·ÂÇÒ ¼ö ÀÖ´Â »óÅ°¡ ¾Æ´Õ´Ï´Ù."); return; } if(!_title) var _title = 1; if(msgbox.value == msgbox.defaultValue) msgbox.value = ""; var _mesg = msgbox.value; var _head3 = 0; if(sender){ var _len = sender.length; if(_len){ for(var i=0;i<_len;i++){ if(sender[i].selected == true){ _head3 = sender[i].value.substr(0,3); break; } } } } switch(_title){ default: case 1: if(_mesg.indexOf("(±¤°í)") != 0) _mesg = "(±¤°í)\n" + _mesg; // ±¤°íÇ¥½Ã ¾ÈµÈ°æ¿ì break; case 2: if(_mesg.indexOf("(¼±°Å¿îµ¿Á¤º¸)") != 0) _mesg = "(¼±°Å¿îµ¿Á¤º¸)\n" + _mesg; // ±¤°íÇ¥½Ã ¾ÈµÈ°æ¿ì if(_mesg.indexOf("Èĺ¸ÀÚÀüÈ­¹øÈ£") == -1) _mesg += "\nÈĺ¸ÀÚÀüÈ­¹øÈ£ "; break; } if(_mesg.indexOf("¹«·á") == -1 || _mesg.indexOf("°ÅºÎ") == -1) { if(_title == 2) _mesg += "\nºÒ¹ý¼öÁýÁ¤º¸½Å°í 118¹ø"; _mesg += "\n¹«·á°ÅºÎ"; } if(_mesg.indexOf("°ÅºÎ\r\n080") == -1 && _mesg.indexOf("°ÅºÎ\n080") == -1 && _mesg.indexOf("°ÅºÎ 080") == -1 && _mesg.indexOf("°ÅºÎ080") == -1 && _mesg.indexOf("¹øÈ£\n080") == -1 && _mesg.indexOf("¹øÈ£ 080") == -1 && _mesg.indexOf("¹øÈ£080") == -1) _mesg += "\n0808802009"; if(msgbox.value == _mesg) Alert("ÇöÀç ¸Þ½ÃÁö´Â °ü·Ã ±ÔÁ¤À» ÁؼöÇÑ ÇüÅÂÀÔ´Ï´Ù."); else msgbox.value = _mesg; } function Put080(){ window.open("/_support/put_080.htm","hidfrm"); } // ¹ß½Å¹øÈ£Á¦ÇÑ( 2015.10.21 ÇÚµåÆù¸¸ ) function CheckCellPhoneNumber(phone){ phone = phone.replace(/[^0-9]+/g,""); // °ø¹éÁ¦°Å var length = phone.length; // ÀüüÀÚ¸®¼ö var head3 = phone.substr(0,3); // ¾Õ3ÀÚ¸®¼ýÀÚ var head2 = phone.substr(0,2); // ¾Õ2ÀÚ¸®¼ýÀÚ if(length == 12) // 0N0 ¹øÈ£ if(head3 == "030" || head3 == "050" || head3 == "060" || head3 == "070" || head3 == "080") return 1; if(length == 11){ // ÇÚµåÆù¹øÈ£ if(head3 == "010" || head3 == "011" || head3 == "016" || head3 == "017" || head3 == "018" || head3 == "019" || head3 == "030" || head3 == "050" || head3 == "060" || head3 == "070" || head3 == "080") return 1; } if(length == 10){ // ÇÚµåÆù¹øÈ£ ( 010 ¹øÈ£´Â ¹«Á¶°Ç 11ÀÚ¸® ) if(head3 == "011" || head3 == "016" || head3 == "017" || head3 == "018" || head3 == "019" || head3 == "060" || head3 == "070" || head3 == "080") return 1; } if(length == 9) // Áö¿ª¹øÈ£ if(head2 == "02") return 1; if(length == 8) // ´ëÇ¥¹øÈ£ if(head2 == "15" || head2 == "16" || head2 == "18") return 1; return false; } // ÀüÈ­¹øÈ£ À¯¹« ( 2015.7.1 ) function CheckPhone2(phone){ phone = phone.replace(/[^0-9]+/g,""); // °ø¹éÁ¦°Å var length = phone.length; // ÀüüÀÚ¸®¼ö var head3 = phone.substr(0,3); // ¾Õ3ÀÚ¸®¼ýÀÚ var head2 = phone.substr(0,2); // ¾Õ2ÀÚ¸®¼ýÀÚ if(length == 12) // 0N0 ¹øÈ£ if(head3 == "030" || head3 == "050" || head3 == "060" || head3 == "070" || head3 == "080") return 1; if(length == 11){ // ÇÚµåÆù¹øÈ£ if(head3 == "010" || head3 == "011" || head3 == "016" || head3 == "017" || head3 == "018" || head3 == "019" || head3 == "030" || head3 == "050" || head3 == "060" || head3 == "070" || head3 == "080") return 1; // Áö¿ª¹øÈ£ ( 02 Á¦¿Ü ¹øÈ£´Â 11ÀÚ¸® ¶Ç´Â 10ÀÚ¸® ) if(head3 == "031" || head3 == "032" || head3 == "033" || head3 == "041" || head3 == "042" || head3 == "043" || head3 == "044" || head3 == "051" || head3 == "052" || head3 == "053" || head3 == "054" || head3 == "055" || head3 == "061" || head3 == "062" || head3 == "063" || head3 == "064"){ var in3 = phone.substr(3,3); // Áß°£ 3ÀÚ¸® var in2 = phone.substr(3,2); // Áß°£ 2ÀÚ¸® // Áö¿ª¹øÈ£ ¹× ´ëÇ¥¹øÈ£ µÚ °øÅë¼­ºñ½º½Äº°¹øÈ£ »ç¿ë±ÝÁö if(in3 != "030" && in3 != "050" && in3 != "060" && in3 != "070" && in3 != "080" && in2 != "15" && in2 != "16" && in2 != "18") return 1; return 1; } } if(length == 10){ // ÇÚµåÆù¹øÈ£ ( 010 ¹øÈ£´Â ¹«Á¶°Ç 11ÀÚ¸® ) if(head3 == "011" || head3 == "016" || head3 == "017" || head3 == "018" || head3 == "019" || head3 == "060" || head3 == "070" || head3 == "080") return 1; // Áö¿ª¹øÈ£ ( 02 ¹øÈ£´Â ¹«Á¶°Ç 10ÀÚ¸® ¶Ç´Â 9ÀÚ¸® ) if(head2 == "02" || head3 == "031" || head3 == "032" || head3 == "033" || head3 == "041" || head3 == "042" || head3 == "043" || head3 == "044" || head3 == "051" || head3 == "052" || head3 == "053" || head3 == "054" || head3 == "055" || head3 == "061" || head3 == "062" || head3 == "063" || head3 == "064"){ // Áö¿ª¹øÈ£ ¹× ´ëÇ¥¹øÈ£ µÚ °øÅë¼­ºñ½º½Äº°¹øÈ£ »ç¿ë±ÝÁö if(head2 != 02){ var in3 = phone.substr(3,3); // Áß°£ 3ÀÚ¸® var in2 = phone.substr(3,2); // Áß°£ 2ÀÚ¸® if(in3 != "030" && in3 != "050" && in3 != "060" && in3 != "070" && in3 != "080" && in2 != "15" && in2 != "16" && in2 != "18") return 1; }else{ var in3 = phone.substr(2,3); // Áß°£ 3ÀÚ¸® var in2 = phone.substr(2,2); // Áß°£ 2ÀÚ¸® if(in3 != "030" && in3 != "050" && in3 != "060" && in3 != "070" && in3 != "080" && in2 != "15" && in2 != "16" && in2 != "18") return 1; } //return 1; } } if(length == 9) // Áö¿ª¹øÈ£ if(head2 == "02") return 1; if(length == 8) // ´ëÇ¥¹øÈ£ if(head2 == "15" || head2 == "16" || head2 == "18") return 1; return false; } // ÀÏ°ýÃß°¡ function PutTheme(fm,thmPid,imgPid,sndPid,sndFile,sndTitle,sndArtist,sndPoly,msg,edate){ msg = RecoverSpacialChar(msg); if(Trim(msg)){ if(fm.mms_txt !== undefined) fm.mms_txt.value = msg; else fm.msgbox.value = msg; //PutSizeMsg(fm,msg); } if(thmPid) fm.themeNum.value=thmPid; if(imgPid) PutImage(fm,imgPid,"",edate); fm.mms_img.style.display = ""; } // URL¿¡ ƯÁ¤¹®ÀÚ¿­ ã±â function FindService(dc,str){ var url = dc.location.href; var n = url.indexOf(str); if(n > -1) return true; else return false; } // À̹ÌÁöÃʱâÈ­ function PutInitImage(tail){ if(!tail) tail = ""; $("#photoNum" + tail).val(''); $("#photoTitle" + tail).val(''); $("#edate" + tail).val(''); $("#mms_img" + tail).html(''); PutImageArea(GetCookie('show_mms_area')); } // À̹ÌÁöÀå¼ö function PutImageCnt(){ var photoCnt = 0; $.each($("input[group='photo_list']"), function(){ if($(this).val()) photoCnt++; }); return photoCnt; } // À̹ÌÁöÁ¤·Ä function PutSortImage(){ var tail; var photoNum = []; var photoTitle = []; var edate = []; var idx = 0; $.each($("input[group='photo_list']"), function(){ tail = LeftNumber($(this).attr('id')); if($("#photoNum" + tail).val()){ photoNum[idx] = $("#photoNum" + tail).val(); photoTitle[idx] = $("#photoTitle" + tail).val(); edate[idx] = $("#edate" + tail).val(); idx++; } }); idx = 0; $.each($("input[group='photo_list']"), function(){ tail = LeftNumber($(this).attr('id')); if(!photoNum[idx]){ PutInitImage(tail); }else{ $("#photoNum" + tail).val(photoNum[idx]); $("#photoTitle" + tail).val(photoTitle[idx]); $("#edate" + tail).val(edate[idx]); PutSetBody(photoNum[idx],edate[idx],tail,1); } idx++; }); GetFee(document.all,document.all.fee,parent.document.getElementById("span_msgkind")); } function PutImageDragStart(){ var ob = window.event? window.event : e; putImageDrag = ob.clientX; return false; } function PutImageDragEnd(tail){ var ob = window.event? window.event : e; var val; var offset; offset = putImageDrag - ob.clientX; if(offset > 0) val = -1; else val = 1; if(tail != 2 && Math.abs(offset) > 80) val *= 2; PutSetOrder(val,tail); return false; } // À̹ÌÁö Å©°Ô º¸±â function SeeBigSample(edate, num){ var imgFile = "/MMS/photo/user/" + edate + "/" + num + ".jpg"; var image = new Image(); image.onload = function(){ var width, height; if(this.width > A4W) width = A4W; else width = this.width; if(this.height > A4H) height = A4H; else height = this.height; if(width <= 213) return; ScreenDisabled(); var newDiv = $(""); $(document.body).append(newDiv); newDiv.css('width', width); newDiv.css('height', height); newDiv.css('background-color','#FFFFFF'); newDiv.css('margin-left', -(width/2)); $('#see_big_sample').append(""); newDiv.on('click', function(){ $('#see_big_sample').remove(); ScreenDisabled(0); }); newDiv.show(); }; image.src = imgFile; } // À̹ÌÁöÁ¤º¸ function PutSetBody(num,edate,tail,noani){ var img = ""; var str = img + "
"; str += "<" str += "X" str += ">" str += "
"; $("#mms_img" + tail).html(str); if(!IsMobile() && ($('#mms_' + num).length || $('#msgbox_' + num).length) && noani!=1){ if($('#mms_div_clone').length) $('#mms_div_clone').remove(); var div = $('#mms_div').clone(); div.prop('id','mms_div_clone'); $('.photo_list_image', div).removeAttr('onMouseOver'); $('.photo_list_image', div).removeAttr('onDragStart'); $('.photo_list_image', div).removeAttr('onDragEnd'); $('.photo_list_image', div).removeAttr('onClick'); $('.mms_img', div).css('opacity','0.6'); var sobj = $('#mms_' + num).length?$('#mms_' + num):$('#msgbox_' + num); var sloc = sobj.offset(); div.css('top',sloc.top - 100); div.css('left',sloc.left - 35); div.css('background-image',''); div.css('background-color','#AAAAAA'); div.css('padding',''); div.css('padding','5px 12px 5px 0px'); div.css('position','absolute'); div.css('border-radius','5px'); div.css('z-index','4'); div.on('click', function(){ SetScreenLoc($('#hp_top'),70,400); }); div.show(); $(document.body).append(div); $("#mms_img" + tail, div).fadeOut(0, function(){ $(this).css('opacity','1.0'); $(this).css('border','2px solid #333333'); $(this).fadeIn(400); }); setTimeout(function(){ div.fadeOut(500,function(){ div.remove(); }); }, 1700); } $("#mms_img" + tail).on('mouseover',function(){ $(this).children('div').show(); }); $("#mms_img" + tail).on('mouseout',function(){ $(this).children('div').hide(); }); } // À̹ÌÁö¼ø¼­º¯°æ function PutSetOrder(val,tail){ if(!tail) tail = 1; if(Math.abs(val) > 2) return; if(Math.abs(val) == 2 && PutImageCnt() != imageMax) val /= 2; var posit = tail + val; if(posit == 1) posit = ""; if(tail == 1) tail = ""; if(!$('#photoNum' + posit).val()) return; var _photoNum = $("#photoNum" + posit).val(); var _photoTitle = $("#photoTitle" + posit).val(); var _edate = $("#edate" + posit).val(); var photoNum = $("#photoNum" + tail).val(); var photoTitle = $("#photoTitle" + tail).val(); var edate = $("#edate" + tail).val(); $("#photoNum" + posit).val(photoNum); $("#photoTitle" + posit).val(photoTitle); $("#edate" + posit).val(edate); PutSetBody(photoNum,edate,posit,1); $("#photoNum" + tail).val(_photoNum); $("#photoTitle" + tail).val(_photoTitle); $("#edate" + tail).val(_edate); PutSetBody(_photoNum,_edate,tail,1); } function PutImageArea(mmsArea){ if(mmsArea === "" || mmsArea == 1){ $("#mms_div").fadeIn(400); $("#msgbox").css('height', 184); }else if(!PutImageCnt()){ $('#mms_div').hide(); $('#msgbox').css('height',280); } } // À̹ÌÁö»ðÀÔ function PutImage(fm,num,title,edate){ var tail; if(!AvaliMsgBox()){ Alert("À̹ÌÁö¸¦ º¯°æÇÏ½Ç ¼ö ÀÖ´Â »óÅ°¡ ¾Æ´Õ´Ï´Ù"); return; } // ÃʱâÈ­ if(!num){ $.each($("input[group='photo_list']"), function(){ tail = LeftNumber($(this).attr('id')); PutInitImage(tail); }); } // Ãß°¡ if(num){ if(FileExists("/MMS/photo/user/" + edate + "/" + num + ".jpg") == 0){ Alert("¿øº» À̹ÌÁö°¡ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù."); return; } $.each($("input[group='photo_list']"), function(){ tail = LeftNumber($(this).attr('id')); if($(this).val() == num){ PutSetBody(num,edate,tail); return false; } if(!$("#photoNum" + tail).val() || tail == 3){ $("#photoNum" + tail).val(num); $("#photoTitle" + tail).val(title); $("#edate" + tail).val(edate); PutSetBody(num,edate,tail); PutImageArea(1); return false; } }); } GetFee(fm,fm.fee,parent.document.getElementById("span_msgkind")); } // ƯÁ¤ À§Ä¡·Î ½ºÅ©·Ñ À̵¿ function SetScreenLoc(ob,offset,delay){ if(!offset) offset = 0; if(!delay) delay = 400; $("html, body").animate({scrollTop: ob.offset().top - offset},delay); } function MoveScroll(dc,_parent,_child){ var ob = dc.getElementById(_child); if(ob) $("#"+_parent,dc).animate({scrollTop: ob.offsetTop},800); } function MoveScrollObject(_ob,_offset){ if(!_offset) _offset = 0; if($('#' + _ob).length) $(document.body).animate({scrollTop: $('#' + _ob).offset().top + _offset},800); } // ¹®ÀÚÇ¥±â¸¦ À§ÇÑ ¿¹¾à¾î º¹±¸ function RecoverSpacialChar(msg,type){ msg = msg.replace(/bS_/g, '\\'); msg = msg.replace(/dQ_/g, '\"'); msg = msg.replace(/sQ_/g, '\''); switch(type){ default: case "html": msg = msg.replace(/cR_/g, '
'); msg = msg.replace(/\n/g, '
'); msg = msg.replace(/ /g, ' '); break; case "object": msg = msg.replace(/cR_/g, '\n'); break; } return msg; } // ·¹À̾î·Î´Ù½Ãº¸¿©ÁÖ±â function ContentsLayerView(cont, msg, width, bgcolor, bgimg, allow){ if(GetCookie(allow) === "0") return; if(!width) var width = '140'; if(!bgcolor) var bgcolor = "transparent"; var obj; switch(cont){ default: case "text": obj = RecoverSpacialChar(msg,"html"); break; case "image": obj = ""; break; } var sideBox = document.getElementById("contents_sidebox"); sideBox.innerHTML = "
" + obj + "
"; sideBox.style.top = event.y + document.body.scrollTop + 20 +"px"; sideBox.style.left = event.x + document.body.scrollLeft - (width / 2) + "px"; sideBox.style.width = width + 10; sideBox.style.display = 'inline'; } function ContentsLayerMove(width, allow){ if(GetCookie(allow) === "0") return; if(!width) var width = '140'; var sideBox = document.getElementById("contents_sidebox"); sideBox.style.top = event.y + document.body.scrollTop + 20 +"px"; sideBox.style.left = event.clientX + document.body.scrollLeft - (width / 2) + "px"; } function ContentsLayerHide(allow){ if(GetCookie(allow) === "0") return; document.getElementById("contents_sidebox").style.display = 'none'; } function GuideToolTip(ob,comment,offsetTop,offsetLeft){ if(!ob || !comment) return; var ob = $('#' + ob); if(ob.length){ var newDivName = "guide_tool_tip"; if(!$('#' + newDivName).length){ var newDiv = $(""); $(document.body).append(newDiv); } var obLoc = ob.offset(); if(!offsetTop) offsetTop = 0; if(!offsetLeft) offsetLeft = 0; $('#' + newDivName).html(comment); $('#' + newDivName).css('position','absolute'); $('#' + newDivName).css('color','#777777'); $('#' + newDivName).css('background-color','#F7F7F7'); $('#' + newDivName).css('border-top','solid 1px #EEEEEE'); $('#' + newDivName).css('border-left','solid 1px #999999'); $('#' + newDivName).css('border-right','solid 1px #999999'); $('#' + newDivName).css('border-bottom','solid 1px #999999'); $('#' + newDivName).css('padding','3px'); $('#' + newDivName).css('border-radius','2px 2px 5px 5px'); $('#' + newDivName).css('top',obLoc.top + offsetTop); $('#' + newDivName).css('left',obLoc.left + offsetLeft); $('#' + newDivName).slideDown(); setTimeout(function(){ $('#' + newDivName).slideUp(); }, 1000); } } // ¹Ì¸®º¸±â function PreviewThis3(msg,width,bgcolor) { if(!width) var width = 140; if(!bgcolor) var bgcolor = "#ECECF3"; msg = RecoverSpacialChar(msg); if ($("#list01", parent.document).css("display") == "block" || $("#list01", parent.document).css("display") == "inline") { parent.document.getElementById("preview_msg_3").innerHTML = "
"; parent.document.getElementById("preview_msg_3").style.top = event.clientY + 800 + document.body.scrollTop; parent.document.getElementById("preview_msg_3").style.left = event.clientX + $("#list01", parent.document).position().left + document.body.scrollLeft + 300; parent.document.getElementById("preview_msg_3").style.width = width; parent.document.getElementById("preview_msg_3").style.border = '1px solid'; parent.document.getElementById("preview_msg_3").style.display = 'inline'; } else { parent.preview_msg__1.innerHTML = "
"; parent.preview_msg__1.style.top = event.clientY + document.body.scrollTop + 10; parent.preview_msg__1.style.left = event.clientX + document.body.scrollLeft + 10; parent.preview_msg__1.style.width = width; parent.preview_msg__1.style.border = '1px solid'; parent.preview_msg__1.style.display = 'inline'; } } // ¹Ì¸®º¸±â function MovePreview3() { if ($("#list01", parent.document).css("display") == "block" || $("#list01", parent.document).css("display") == "inline") { parent.document.getElementById("preview_msg_3").style.top = event.clientY + 800 + document.body.scrollTop; parent.document.getElementById("preview_msg_3").style.left = event.clientX + $("#list01", parent.document).position().left + document.body.scrollLeft + 300; } else { parent.preview_msg__1.style.top = event.clientY + document.body.scrollTop + 10; parent.preview_msg__1.style.left = event.clientX + document.body.scrollLeft + 10; } } // ¹Ì¸®º¸±â function HidePreview3() { if ($("#list01", parent.document).css("display") == "block" || $("#list01", parent.document).css("display") == "inline") { parent.document.getElementById("preview_msg_3").style.top = 0; parent.document.getElementById("preview_msg_3").style.left = 0; parent.document.getElementById("preview_msg_3").style.display = 'none'; } else { parent.preview_msg__1.innerHTML = ''; parent.preview_msg__1.style.top = 0; parent.preview_msg__1.style.left = 0; parent.preview_msg__1.style.display = 'none'; } } // Äü¸Þ´º ó¸® function QuickMenuBar(_obj, _objImg, _open){ if(typeof document.getElementById(_obj) == "undefined") return; if(typeof document.getElementById(_objImg) != "undefined") var objImg = document.getElementById(_objImg); else var objImg = false; if(!_open) _open = 0; var basic_left = 24; var obj = document.getElementById(_obj); var default_top = 105; //default ³ôÀÌ var default_left = parseInt((document.body.clientWidth/2) - (960/2) + basic_left); var control_left = default_left + 158; if(default_left < basic_left) default_left = basic_left; $(obj).left = default_left + "px"; $(obj).animate( { "top": default_top +"px" }, 0 ); $(obj).animate( { "left": default_left +"px" }, 0 ); $(obj).clearQueue(); if(_open == 1){ // ¿­¾îµÒ $(obj).css("left",control_left); if(objImg) $(objImg).attr("src","/_img/quick_menu_2.png"); }else{ $("#menu_out_in").click(function (){ //if(!$(obj).is(':animated')){ if($(obj).css("left") == (default_left + "px")){ $(obj).animate( { "left": control_left + "px" }, 300 ); if(objImg) $(objImg).attr("src","/_img/quick_menu_2.png"); }else{ $(obj).animate( { "left": default_left + "px" }, 300 ); if(objImg) $(objImg).attr("src","/_img/quick_menu_4.png"); } //} }); } } // Àü¼ÛâÀ̹ÌÁö¹Ì¸®º¸±â function ShowHpImage(num, edate){ var div; if(!$("#showHpImage").length){ div = $(""); $(document.body).append(div); div.css('position','absolute'); div.css('background-color','#EEEEEE'); div.css('border','solid 1px #555555'); div.css('padding','3px'); div.css('border-radius','3px'); }else{ div = $("#showHpImage"); } var loc = $("#mms_div").offset(); var dis = 5; if(GetCookie('scale_hp') == 1) dis += 64; div.css('top',loc.top + 10); div.css('left',loc.left + $("#mms_div").width() + dis); img = ""; div.show(); div.html(img); } function ShowHpImageHide(){ if($("#showHpImage").length) $("#showHpImage").hide(); } // À̹ÌÁö »ùÇà ¸¶¿ì½º¿À¹ö½Ã Å« À̹ÌÁöº¸¿©ÁÖ±â function ShowImageList(num, edate, y, allow, src){ if(GetCookie(allow) === "0") return; if((!num || !edate) && !src) return; if(!y) var y = 0; var imgFile = "/MMS/photo/user/" + edate + "/" + num + ".jpg"; if(src) imgFile = $(src).attr('src'); ob = document.getElementById("show_image_list"); ob.innerHTML = "
"; ob.style.top = event.clientY + document.body.scrollTop + y - 100; ob.style.left = event.clientX + document.body.scrollLeft + 12; ob.style.display = 'inline'; } function ShowImageListMove(y, allow, ob){ if(GetCookie(allow) === "0") return; if(!y) var y = 0; var ob = document.getElementById("show_image_list"); ob.style.top = event.clientY + document.body.scrollTop + y - 100; ob.style.left = event.clientX + document.body.scrollLeft + 12; } function ShowImageListHide(allow){ if(GetCookie(allow) === "0") return; var ob = document.getElementById("show_image_list"); ob.style.top = 0; ob.style.left = 0; ob.style.display = 'none'; } function GetSentList(cont, bowl, fm, param, addr){ var dayStr; var resultStr; var seekStr; var method; if(!param) var param = ""; var sentListMenu1 = "sent_list_sms"; var sentListMenu2 = "sent_list_lms"; var sentListMenu3 = "sent_list_mms"; var sentListEach = "btn_sent_list_each"; var sentListBundle = "btn_sent_list_bundle"; var isCont = param.indexOf("cont="); if(isCont != -1) cont = param.substring(isCont+5, isCont+5+3); var isBowl = param.indexOf("bowl="); if(isBowl != -1){ bowl = param.substring(isBowl+5, isBowl+5+4); if(bowl == "bund") bowl = "bundle"; } var div = "div_sent_list"; var ob = $("#" + div); switch(cont){ case "SMS": sentListMenu1 += "_on"; break; default: cont = "LMS"; case "LMS": sentListMenu2 += "_on"; break; case "MMS": sentListMenu3 += "_on"; break; } if(bowl != "each" && bowl != "bundle") bowl = "each"; if(bowl == "each") sentListEach += "_on"; else sentListBundle += "_on"; param = "&cont=" + cont + "&bowl=" + bowl + param; if(!addr) url = "/TMS/sent/list_" + bowl + ".htm"; else{ url = "/TMS/sent/save_addr.htm"; param = param + "&job_group=" + addr; } if(fm){ method = "POST"; if(param) param = param + "&" + $(fm).serialize(); else param = $(fm).serialize(); }else method = "GET"; var newDivName = "sent_save_group"; if(!$('#' + newDivName).length){ var newDiv = $("
"); $(document.body).append(newDiv); $('#' + newDivName).css('width','350px'); $('#' + newDivName).css('top','820px'); $('#' + newDivName).css('left','50%'); $('#' + newDivName).css('margin-left', $('#' + newDivName).css('width').replace(/[^0-9]/g,'') / 2 * -1); $('#' + newDivName).css('background-color','#FFFFFF'); $('#' + newDivName).css('border','1px solid silver'); $('#' + newDivName).css('position','absolute'); $('#' + newDivName).css('overflow','hidden'); $('#' + newDivName).css('z-index','8'); $('#' + newDivName).css('display','none'); var html = "
"; html += "
±×·ìµî·Ï º¸³½¹øÈ£
"; html += "
"; html += "
"; html += "
"; html += "
¼±ÅÃÇÑ ÀüÈ­¹øÈ£¸¦ ÁÖ¼Ò·Ï¿¡ ±×·ìÀ¸·Î µî·Ï
"; html += "
"; html += "
"; html += "
±×·ì¸í
"; html += "
"; html += "
µî·Ï
"; html += "
"; html += "
"; $('#' + newDivName).html(html); } Loading(div); $.ajax({ url : url, dataType : "html", type : method, data : param, success : function(result){ ob.html(result); ob.css('border-style', 'none'); ob.css('width', 'auto'); ob.css('height', 'auto'); document.getElementById("sent_list_menu1").src = "/_img/" + sentListMenu1 + ".gif"; document.getElementById("sent_list_menu2").src = "/_img/" + sentListMenu2 + ".gif"; document.getElementById("sent_list_menu3").src = "/_img/" + sentListMenu3 + ".gif"; document.getElementById("img_each").src = "/_img/" + sentListEach + ".gif"; document.getElementById("img_bundle").src = "/_img/" + sentListBundle + ".gif"; if(GetCookie("sent_param_1") && GetCookie("sent_param_1") != param) SetCookie("sent_param_2",GetCookie("sent_param_1")); SetCookie("sent_param_1",param); } }); } function PutPage(div, url, param, fm){ if(url == "") return false; var method = "GET"; //pageFocus = $(':focus').attr('id'); //$("#" + pageFocus).blur(); var ret; var ob = null; if(div) ob = $("#" + div); if(fm){ method = "POST"; if(param) param = param + "&" + $(fm).serialize(); else param = $(fm).serialize(); } if(ob != null && ob.width() != 0) Loading(div); $.ajax({ url : url, dataType : "html", type : method, data : param, async : false, success : function(result){ if(ob != null){ ob.html(result); ob.css('border-style', 'none'); ob.css('width', 'auto'); ob.css('height', 'auto'); }else{ ret = result; } }, error : function(error){ //alert("Á˼ÛÇÕ´Ï´Ù. Àá½ÃÈÄ¿¡ ´Ù½Ã ½ÃµµÇϼ¼¿ä."); } }); //if(pageFocus) $("#" + pageFocus).select(); if(ret) return ret; } function Loading(div,border){ var ob = $("#" + div); var guideText = "


"; ob.css('text-align', "center"); ob.css('width', ob.width()); ob.css('height', ob.height()); ob.html(""); if(border > 0){ ob.css('border-style', 'solid'); ob.css('border-color', '#F7F7F7'); } ob.html(guideText); } function PutValue(eid, path, param){ if(path == "") return false; if(typeof document.getElementById(eid) != "object") return false; send_request( function (obj) { var res = obj.responseText; document.getElementById(eid).value = res; }, param, "GET", path, true, true); } function CheckCR(tail){ if(!isNaN(eval(tail))) var cr = '\r\n'; else var cr = ''; return cr; } // ¹®ÀÚ¸Þ½ÃÁö Àü¼Û½Ã Á¦¸ñ¿¡ »ç¿ëºÒ°¡ÇÑ Æ¯¼ö¹®ÀÚ var checkSendTitleFlag = 0; function CheckSendTitle(ob, str){ var key = new Array('\'', '\"','<','>','\\', '!','@','#','`','$','%','^','~','&','*','?','\n','\r','\t','\ '); for(var i=1;i <= key.length;i++){ if(str.indexOf(key[i]) != -1){ if(!checkSendTitleFlag) Alert("°ø¹éÀ» Æ÷ÇÔÇÑ ÀϺΠƯ¼ö¹®ÀÚ´Â Á¦¸ñÀ¸·Î »ç¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù."); ob.value = str.replace(key[i],''); checkSendTitleFlag = 1; break; } } } // Å°ÀԷ¼ýÀÚ¸¸ function OnlyNumber(ob){ $(ob).val($(ob).val().replace(/[^0-9]/g,"")); $(ob).keyup(function(){ $(this).val($(this).val().replace(/[^0-9]/g,"")); }); } // ¼ýÀÚ¸¸ ³²±è function LeftNumber(str){ if(!str) return; else return str.replace(/[^0-9]/g,""); } // À̸ÞÀÏ µµ¸ÞÀÎÀÔ·Â function InsertEmailDomain(val){ var ob = document.getElementById("email_domain"); if(val == "dir"){ ob.value = ""; ob.readOnly = false; ob.focus(); }else if(val){ ob.readOnly = true; ob.value = val; } } // Á¤¼öÇü ¼ýÀÚ(ÃÊ ´ÜÀ§)¸¦ "½Ã:ºÐ:ÃÊ" ÇüÅ·ΠǥÇöÇÏ´Â ÇÔ¼ö function ToHourMinSec(t) { var hour; var min; var sec; // Á¤¼ö·ÎºÎÅÍ ³²Àº ½Ã, ºÐ, ÃÊ ´ÜÀ§ °è»ê hour = Math.floor(t / 3600); min = Math.floor( (t-(hour*3600)) / 60 ); sec = t - (hour*3600) - (min*60); // hh:mm:ss ÇüŸ¦ À¯ÁöÇϱâ À§ÇØ ÇÑÀÚ¸® ¼öÀÏ ¶§ 0 Ãß°¡ if(hour < 10) hour = "0" + hour; if(min < 10) min = "0" + min; if(sec < 10) sec = "0" + sec; return(hour + ":" + min + ":" + sec); } // Å©°Ôº¸±â function MakeItBig(ob){ var isOnOff = GetCookie(ob); ob = document.getElementById(ob); ob.innerHTML = ""; if(isOnOff == "" || isOnOff == 1){ //PopupSetCookie(ob, 1, 7); ob.innerHTML += ""; }else{ //PopupSetCookie(ob, 0, 7); ob.innerHTML += ""; } } // Åä±Û½ÃÅ°±â function SetToggleCookie(ob){ var isOnOff = GetCookie(ob); if(isOnOff == "" || isOnOff == 1) PopupSetCookie(ob, 0, 7); else PopupSetCookie(ob, 1, 7); } // È­¸éóÀ½À¸·Î À̵¿ function MoveTop(){ $('html, body').stop().animate({scrollTop: 0}, 500); } // ¸®½ºÆ®¹Ú½º ¿É¼ÇÃß°¡ function SelectAddOption(ob,val,txt){ var opt = ""; opt = document.createElement('option'); opt.value = val; opt.text = txt; ob.add(opt); ob.value.selected; ob[ob.length - 1].selected = true; } // Á÷Á¢ÀԷ±׷ì»ý¼º function AddGroup4Listbox(step){ if(!step){ var option = $(""); $('#groupNum').prepend(option); $('#groupNum').attr("onClick","AddGroup4Listbox(1)"); }else{ if($('#groupNum').val() == "temp"){ $('#group-info').html(''); $('#groupNum').select(); } } } function LoadingLayer(md,cnt,sc){ var bgColor = "#FFFFFF"; if(md == undefined || md == 1){ if(sc == undefined || sc == 1) ScreenDisabled(); else{ ScreenDisabled(0); bgColor = "#F7F7F7"; } if(!$('#loading6').length){ var newDiv = $("
"); $(document.body).append(newDiv); $('#loading6').css('position','fixed'); $('#loading6').css('top', '40%'); $('#loading6').css('left','50%'); $('#loading6').css('padding','9px'); $('#loading6').css('background-color',bgColor); $('#loading6').css('border-radius','10px'); $('#loading6').css('opacity','0.7'); $('#loading6').css('z-index','90'); $('#loading6').html(""); } if(cnt){ $('#loading6').append("
1ÃÊ
"); var sec = 1; secTimer = setInterval(function(){ if(sec >= cnt){ LoadingLayer(0); clearInterval(secTimer); $('#loading6_sec').remove(); return "timeout"; }else{ sec++; $('#loading6_sec').html(sec + "ÃÊ"); } }, 1000); } $('#loading6').css('display','block'); }else{ ScreenDisabled(0); if($('#loading6_sec').length) $('#loading6_sec').remove(); if(secTimer) clearInterval(secTimer); $("#loading6").css("display","none"); } } function SetCssWrap(ob){ var ob = $(ob); if(!ob.length) return; if(verIE == "N/A") ob.css('white-space','nowrap'); } function EventAlert(location_ob,event_ob,event_title,start_count,set_x,set_y,link,style){ if(!location_ob) location_ob = "document.body"; if(!event_ob) event_ob = "event_guide"; if(!event_title) event_title = "À̺¥Æ®"; if(!start_count) start_count = 86400; if(!set_x) set_x = 0; if(!set_y) set_y = 0; if(!style) style = "border:2px solid #f2b6be;background-color:#eb5252"; var loc = $('#' + location_ob).offset(); var newDiv = $("
"); newDiv.css('top',loc.top + set_y); newDiv.css('margin-left',-($(document.body).width()/2 - loc.left + set_x) + "px"); newDiv.css('font','bold 11px arial'); newDiv.css('color','white'); newDiv.hide(); var subId = event_ob + "_time"; newDiv.append(event_title + "
"); if(link){ newDiv.on('click',function(){ document.location.href = link; }); } $(document.body).append(newDiv); newDiv.show(); if(start_count < 86400){ $("#" + subId).show(); var sec = start_count; var eventTimer = setInterval(function(){ sec--; var lsec = sec % 60; var lmin = ((sec - lsec) / 60) % 60; var lhour = Math.floor(sec / 3600); if(lsec < 10) lsec = '0' + lsec; if(lmin < 10) lmin = '0' + lmin; if(lhour < 10) lhour = '0' + lhour; if(sec < 1){ clearInterval(eventTimer); newDiv.hide(); } $("#" + subId).html(lhour + ":" + lmin + ":" + lsec); }, 1000); } /* if(event_ob == "makeup_image"){ setInterval(function(){ newDiv.hide(); }, 10000); } */ } function SendResultAlert(slide,title,body1,body2,link){ var width = 350; var height = 238; var closeSec = GetCookie(slide); if(!$.isNumeric(closeSec)) closeSec = 0; if(!$('#div_slide_alert').length){ var newDiv = $(""); $(parent.document.body).append(newDiv); }else{ $('#div_slide_alert').slideUp(); $('#div_slide_alert').empty(); } if(title){ title = "
" + title + "
"; $('#div_slide_alert',parent.document).append(title); }else title = ""; $('#div_slide_alert',parent.document).append("
"); if(body1){ body1 = "
" + body1 + "
"; $('#div_slide_alert_body',parent.document).append(body1); }else body1 = ""; if(body2){ body1 = "
" + body2 + "
"; $('#div_slide_alert_body',parent.document).append(body2); }else body2 = ""; if(link){ link = "
" + link + "
"; }else link = ""; $('#div_slide_alert',parent.document).append("
"); $('#slide_auto_close').val(closeSec); $('#slide_auto_close').attr('onClick','if(this.value == \'0\'){clearInterval(counterId);$(\'#div_slide_countdown\').html(\'\');}'); $('#div_slide_alert',parent.document).append("
" + link + "
X´Ý±â
"); $('#div_slide_alert',parent.document).slideDown(); if(closeSec > 0){ if(counterId) clearInterval(counterId); counterId = setInterval(function(){ $('#div_slide_countdown').attr('onClick','clearInterval(counterId);$(this).html(\'\');'); if(closeSec != 0) $('#div_slide_countdown').html(closeSec + 'ÃÊ'); else{ clearInterval(counterId); $('#div_slide_alert',parent.document).slideUp(); } closeSec--; },1000); } } function FadeAlert(comment,exp){ if(!comment) return; if(!exp) exp = 5; if(!$('#div_fade_alert',parent.document).length){ var newDiv = $(""); $(parent.document.body).append(newDiv); $(newDiv).html("
Ãß°¡ ÇÊ¿ä¼­·ùX
"); } $('#div_fade_alert',parent.document).css("margin-left", parseInt($('#div_fade_alert',parent.document).css("width")) / 2 * -1 + 15); $('#fade_alert_body',parent.document).html(comment); $('#div_fade_alert',parent.document).fadeIn(500); if(exp > 0){ if(counterId) clearInterval(counterId); counterId = setInterval(function(){ if(exp < 1){ clearInterval(counterId); $('#div_fade_alert',parent.document).fadeOut(500); return; } exp--; },1000); } } function SlideAlert(title){ var slide = "slide_alert"; var closeSec = GetCookie(slide); if(!$.isNumeric(closeSec)) closeSec = 0; if(!$('#div_slide_alert_simple').length){ var newDiv = $(""); $(parent.document.body).append(newDiv); }else{ $('#div_slide_alert_simple').slideUp(); $('#div_slide_alert_simple').empty(); } title = "
" + title + "
"; $('#div_slide_alert_simple',parent.document).append(title); link = ""; $('#div_slide_alert_simple',parent.document).append("
" + link + "
X´Ý±â
"); $('#slide_auto_close_simple').val(closeSec); $('#div_slide_alert_simple',parent.document).css("margin-left", parseInt($('#div_slide_alert_simple',parent.document).css("width")) / 2 * -1); $('#div_slide_alert_simple',parent.document).slideDown(); if(closeSec > 0){ if(counterId) clearInterval(counterId); counterId = setInterval(function(){ if(closeSec == 0){ clearInterval(counterId); $('#div_slide_alert_simple',parent.document).slideUp(); } closeSec--; },1000); } } function Alert(mesg,x,opt,exp){ if(mesg != -1){ if(!mesg) mesg = "ÀϽÃÀûÀÎ Àå¾Ö¹ß»ý\n\n°í°´¼¾ÅÍ·Î ¹®ÀÇÇϼ¼¿ä"; if(verIE == "N/A" || verIE > 9){ // È£Ãâ Àü Æ÷Ä¿½Ì pageFocus = $(':focus').attr('id'); $("#" + pageFocus).blur(); ScreenDisabled(); if(!$('#div_alert').length){ var newDiv = $(""); $(parent.document.body).append(newDiv); $('#div_alert',parent.document).css('width','auto'); $('#div_alert',parent.document).css('position','fixed'); $('#div_alert',parent.document).css('left','50%'); $('#div_alert',parent.document).css('z-index','100'); $('#div_alert',parent.document).css('overflow','hidden'); $('#div_alert',parent.document).css('text-align','right'); //$('#div_alert',parent.document).css('opacity',0.9); if(x != 1) $('#div_alert',parent.document).html(" X  "); $('#div_alert',parent.document).append("
"); if($('#screen_disabled').length){ $('#screen_disabled').on('click',function(){ ObjectShake($('#div_alert')); }); } } $('#div_alert_mesg_expired',parent.document).html(''); $('#div_alert_mesg',parent.document).html(mesg.replace(/\n/g,'
')); $('#div_alert',parent.document).show(); $('#div_alert',parent.document).css('top', window.innerHeight / 2 - 70); $('#div_alert',parent.document).css('margin-left',$('#div_alert',parent.document).width() / 2 * -1); if(opt){ $('#div_alert',parent.document).css('cursor','default'); $('#div_alert_table',parent.document).attr('onClick',''); $('#div_alert_mesg',parent.document).append(opt); }else{ $('#div_alert',parent.document).css('cursor','pointer'); $('#div_alert_table',parent.document).attr('onClick','Alert(-1)'); } if(exp){ $('#div_alert_mesg_expired',parent.document).show(); var alertInterval = setInterval(function(){ exp--; $('#div_alert_mesg_expired',parent.document).html("

- " + exp + "ÃÊÈÄ ´ÝÈû -"); if(exp == 0){ clearInterval(alertInterval); Alert(-1); } },1000); } //ObjectShake($('#div_alert')); }else{ Alert(mesg); } }else{ $('#div_alert',parent.document).hide(); $('#div_alert_mesg',parent.document).text(''); ScreenDisabled(0); if(pageFocus) $("#" + pageFocus).select(); } } function ObjectShake(ob){ if(ob.length){ ob.animate({'left':'-=25px'},40); ob.animate({'left':'+=25px'},40); ob.animate({'left':'-=10px'},50); ob.animate({'left':'+=10px'},50); } } function ScreenDisabled(md){ var ob = parent.document; if(md == undefined || md == 1){ if(!$('#screen_disabled').length){ var newDiv = $("
"); $(ob.body).append(newDiv); $('#screen_disabled',ob).css('top','0'); $('#screen_disabled',ob).css('left','0'); $('#screen_disabled',ob).css('position','absolute'); $('#screen_disabled',ob).css('width','100%'); $('#screen_disabled',ob).css('background-color','#000000'); $('#screen_disabled',ob).css('opacity',0.25); $('#screen_disabled',ob).css('z-index','90'); } $('#screen_disabled',ob).css('height',$(ob).height()); $('#screen_disabled',ob).css('display','inline'); }else{ $("#screen_disabled",ob).css("display","none"); } } function FileExists(file){ if(!file) return 0; var rt; $.ajax({ url: file, type: 'HEAD', async: false, success: function(){ rt = 1; }, error: function(){ rt = 0; } }); return rt; } function AvaliMsgBox(){ if($("#msgbox").attr("disabled") == "disabled") return 0; else return 1; } function CheckComSocial(num){ if(num == '0000000000') return false; var numberMap = num.replace(/-/gi, '').split('').map(function (d){ return parseInt(d, 10); }); if(numberMap.length == 10){ var keyArr = [1, 3, 7, 1, 3, 7, 1, 3, 5]; var chk = 0; keyArr.forEach(function(d, i){ chk += d * numberMap[i]; }); chk += parseInt((keyArr[8] * numberMap[8])/ 10, 10); return Math.floor(numberMap[9]) === ( (10 - (chk % 10) ) % 10); } return false; } function ScreenZoom(){ var scale = 1.0; var szoom = GetCookie("szoom"); if(!szoom || szoom == 1) scale = 1.1; $(document.body).css("zoom",scale); SetCookie("szoom",scale); } function SetReserve(mode) { if(!mode){ $('#okSend').css('background-image','url(/_img/send_bt03.gif)'); $('#reservlayer').hide(); if($("#cal-body").length) $("#cal-body").slideUp(300); $('#reserv_tab1').css('background-color','#7F99E2'); $('#reserv_tab1_text').css('color','#FFFFFF'); $('#reserv_tab2').css('background-color','#DDDDDD'); $('#reserv_tab2_text').css('color','gray'); }else{ $('#okSend').css('background-image','url(/_img/send_recv_bt3.gif)'); $('#reservlayer').show(); SetReserveDate(); $('#reserv_tab1').css('background-color','#DDDDDD'); $('#reserv_tab1_text').css('color','gray'); $('#reserv_tab2').css('background-color','#7F99E2'); $('#reserv_tab2_text').css('color','#FFFFFF'); } } function GetDays(month, year) { var dt = new Date(year, month, 0); return dt.getDate(); } function VarListMonth(obj,year,month){ var target = eval("document.all." + obj); target.options.length = 0; var lastDay = GetDays(month,year); var index=0; for(var i=0;i" + i + "")); } $("#ResYear").val(year); // ¿ù if(year == toYear) stMonth = toMonth; else if(year == edYear) edMonth = String(reserveLimitDate).substr(4,2)*1; $("#ResMonth").empty(); for(i=stMonth;i<=edMonth;i++){ $("#ResMonth").append($("")); } $("#ResMonth").val(month); if($("#ResMonth").val() == null) $("#ResMonth").val(edMonth); // ÀÏ if(year == edYear && month == edMonth){ edDay = String(reserveLimitDate).substr(6,2)*1; day = day>edDay?edDay:day; } $("#ResDay").empty(); for(i=stDay;i<=edDay;i++){ $("#ResDay").append($("")); } $("#ResDay").val(day); if($("#ResDay").val() == null) $("#ResDay").val(edDay); MakeCalender($("#ResYear").val()*1,$("#ResMonth").val()*1,$("#ResDay").val()*1); } function MakeCalender(year,month){ if(!year) year = toYear; if(!month) month = toMonth; var colList = ""; var styleStr = ""; var dt; var i; var _year; var _month; var _day; var thisDate; var weekTitle = ["ÀÏ","¿ù","È­","¼ö","¸ñ","±Ý","Åä"]; var nextYear = year; var nextMonth = month + 1; var preYear = year; var preMonth = month - 1; if(nextMonth > 12){ nextYear = year + 1; nextMonth = 1; } if(preMonth < 1){ preYear = year - 1; preMonth = 12; } var next3Year = year; var next3Month = month + 3; var pre3Year = year; var pre3Month = month - 3; if(next3Month > 12){ next3Year = year + 1; next3Month -= 12; } if(pre3Month < 1){ pre3Year = year - 1; pre3Month = 12 + pre3Month; } // À̵¿ colList += "
" + year + "." + month +"<<  <>>>  X
"; colList += "
"; // ¿äÀÏŸÀÌƲ for(i=0;i" + weekTitle[i] + "
"; } colList += "
"; dt = new Date(year,month-1,1); var firstDayWeek = dt.getDay(); dt = new Date(year,month-1,0); var lastDayPre = dt.getDate(); dt = new Date(year,month,0); var lastDay = dt.getDate(); var lastDayWeek = dt.getDay(); // Àü´ÞÇ¥½Ã for(i=firstDayWeek-1;i>=0;i--){ /* styleStr = CalDateColor(preYear,preMonth,lastDayPre-i); _year = String(preYear); _month = preMonth; _day = lastDayPre-i; if(_month < 10) _month = "0" + _month; if(_day < 10) _day = "0" + _day; colList += "
" + (lastDayPre-i) + "
"; */ colList += "
"; } // ¿äû´ÞÇ¥½Ã for(i=1;i<=lastDay;i++){ dt = new Date(year,month-1,i); week = dt.getDay(); styleStr = ""; styleStr += CalDateColor(year,month,i); if(week == 0) styleStr += "color:red;clear:both;"; else if(week == 6) styleStr += "color:blue;"; _year = String(year); _month = month; _day = i; if(_month < 10) _month = "0" + _month; if(_day < 10) _day = "0" + _day; colList += "
" + (i*1) + "
"; } // ´ÙÀ½´ÞÇ¥½Ã for(i=1;i<=6-lastDayWeek;i++){ /* styleStr = CalDateColor(nextYear,nextMonth,i); _year = String(nextYear); _month = nextMonth; _day = i; if(_month < 10) _month = "0" + _month; if(_day < 10) _day = "0" + _day; colList += "
" + (i*1) + "
"; */ colList += "
"; } if(!$('#cal-body').length){ var newDiv = $(""); $(document.body).append(newDiv); var loc = $('#send_method_reserve').offset(); $('#cal-body').css("top",(loc.top + 24) + "px"); $('#cal-body').css("margin-left",-($(document.body).width()/2 - loc.left + 8) + "px"); } $("#cal-body").html(colList); GetAnniversaryInfo(year,month); } function CalSetDate(year,month,day){ if(!$("#reservlayer").length) return; if(month < 10) month = "0" + month; if(day < 10) day = "0" + day; thisDate = year + "" + month + day; if(thisDate >= toDate && thisDate <= reserveLimitDate){ SetReserveDate(year,month*1,day*1); if($("#cal-body").length) $("#cal-body").hide(300); } } function CalDateColor(year,month,day){ var str = ""; if(month < 10) month = "0" + month; if(day < 10) day = "0" + day; thisDate = year + "" + month + day; if(thisDate == toDate) str += "background-color:#DDDDDD;"; if(thisDate >= toDate && thisDate <= reserveLimitDate) str += "cursor:pointer;"; else str += "color:silver;"; return str; } function GetAnniversaryInfo(year,month){ if(!year || !month) return; if(!$("#cal-body").length) return; if(month < 10) month = "0" + month; var date = String(year) + month; var color = "red"; if(date < String(toYear) + toMonth) color = "orange"; var result = PutPage("","https://www.munjanamu.co.kr/ajax/anniversaryInfo.php","&rest=1&date=" + date); if(!result) return; else{ var info; var row = result.split('
'); for(var i=0;i -1) resizeTo($(window).outerWidth(),$(window).outerHeight() + 95); } // IE ¹öÀü function GetVerIE(){ var word; var version = "N/A"; var agent = navigator.userAgent.toLowerCase(); var name = navigator.appName; // IE old version ( IE 10 or Lower ) if( name == "Microsoft Internet Explorer" ) word = "msie "; else{ // IE 11 if ( agent.search("trident") > -1 ) word = "trident/.*rv:"; // Microsoft Edge else if ( agent.search("edge/") > -1 ) word = "edge/"; } var reg = new RegExp( word + "([0-9]{1,})(\\.{0,}[0-9]{0,1})" ); if ( reg.exec( agent ) != null ) version = RegExp.$1 + RegExp.$2; return version; } var verIE = GetVerIE(); document.write(''); document.write(""); document.write(""); document.write(""); document.write(""); document.write(""); document.write('');