/******************************************* - Title : Munjanara JS - Date : 2003-09-03 - Author : KKH - Email : vsharp12@naver.com *******************************************/ var HOME_DIR = "MMS"; var initByte = 0; var INIT_BYTE = 0; var focusCursorObj; var guideIsLogin = 0; var mmsFlag = 0; var tmsImageMax = 1; var mmsImageMax = 3; var isAutoSizeAllow = 1; var pageFocus; if(FindService(document, "TMS/sent/") || FindService(document, "TMS/reserve/")) tmsImageMax = 3; var sendMesgModifyAvailable = true; // ¸Þ½ÃÁöº¯°æ°¡´ÉÀ¯¹« // ¹ß¼Û±âº»´Ü°¡Ç¥±â 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 putImageDragStart = 0; var putImageDragEnd = 0; // layer alert open function layer_open(el){ var temp = $('#' + el); //·¹À̾îÀÇ id¸¦ tempº¯¼ö¿¡ ÀúÀå var bg = temp.prev().hasClass('bg'); //dimmed ·¹À̾ °¨ÁöÇϱâ À§ÇÑ boolean º¯¼ö if(bg){ $('.layer').fadeIn(); }else{ temp.fadeIn(); //bg Ŭ·¡½º°¡ ¾øÀ¸¸é ÀϹݷ¹À̾î·Î ½ÇÇàÇÑ´Ù. } // È­¸éÀÇ Áß¾Ó¿¡ ·¹À̾ ¶ç¿î´Ù. if (temp.outerHeight() < $(document).height() ) temp.css('margin-top', '-'+temp.outerHeight()/2+'px'); else temp.css('top', '0px'); if (temp.outerWidth() < $(document).width() ) temp.css('margin-left', '-'+temp.outerWidth()/2+'px'); else temp.css('left', '0px'); temp.find('a.cbtn').click(function(e){ if(bg){ $('.layer').fadeOut(); }else{ temp.fadeOut(); //'´Ý±â'¹öưÀ» Ŭ¸¯ÇÏ¸é ·¹À̾ »ç¶óÁø´Ù. document.all['buyform'].target = ""; document.location.href = "/buycoupon/deposit/mainpage.htm"; } e.preventDefault(); }); $('.layer .bg').click(function(e){ $('.layer').fadeOut(); e.preventDefault(); }); } // »õ·Î¿î â ¿­±â function OpenWin1(url,name,scroll){ var window_left=(screen.width-640)/2; //var window_top=(screen.height-480)/2; var window_top=40; if(!scroll) scroll = "no"; window.open(url,name,'width=10,height=10,status=no,top=' + window_top + ',left=' + window_left +' scrollbars=' + scroll); } function OpenWin2(url,name,width,height,scroll){ var window_left=(screen.width-640)/2; //var window_top=(screen.height-480)/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=(screen.height-480)/2; var window_top=40; if(!check.closed && check) { //alert("°°Àº âÀÌ ÀÌ¹Ì ¶°ÀÖ½À´Ï´Ù"); 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(!sendMesgModifyAvailable){ 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 InsertPhoneBox(fm,phone) { for(var i=0;i<10;i++){ prePhone = fm.all['user'+i].value; if(prePhone == phone){ alert("µ¿ÀÏÇÑ ÀüÈ­¹øÈ£°¡ ÀÖ½À´Ï´Ù."); fm.all['user'+i].select(); 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 ChangeImage(obj,img){ obj.src=img; } // ¿¹¾à ½Ã°£ ¹öư Ȱ¼ºÈ­ ºñȰ¼ºÈ­ function ReservGubn(gubn) { // ±âº»°ª var ob = document.getElementById("reservlayer"); if(!gubn){ document.getElementById("okSend").style.backgroundImage="url(/_img/send_bt_v2.gif)"; ob.style.display = "none"; //ob.innerHTML = ""; }else{ document.getElementById("okSend").style.backgroundImage="url(/_img/send_reserve_bt_v2.gif)"; ob.style.display = ""; //PutPage("reservlayer", "/_inc/reserveTime.inc"); } } // ¿¹¾à , ·¹ÀÌ¾î¹æ½ÄÀÌ ¾Æ´Ñ.. function ReservGubn1(fm,gubn) { fm.ResYear.disabled = gubn; fm.ResMonth.disabled = gubn; fm.ResDay.disabled = gubn; fm.ResHour.disabled = gubn; fm.ResMinute.disabled = gubn; } function ReservGubnV4(gubn) { // ±âº»°ª var ob = document.getElementById("reservlayer"); if(!gubn){ document.getElementById("okSend").style.backgroundImage="url(/_img/send_bt03.gif)"; ob.style.display = "none"; }else{ document.getElementById("okSend").style.backgroundImage="url(/_img/send_recv_bt3.gif)"; ob.style.display = ""; } } // Àü¼ÛâÀ» ÀԷ»óÅ·Πº¯°æ function DoClearV3(dc) { 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["™ö"] = "¼ó"; 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){ alert(limitByte + ' ¹ÙÀÌÆ®¸¦ ÃʰúÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.'); thisText = curText.substring(0, i); ob.value = thisText; byteIs = lastByte; 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){ document.cookie = keyname + "=" + escape(val) + "; 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; } 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; setTimeout ('document.all.okSend.disabled=false', 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 + "px"; ob.style.left = event.clientX + document.body.scrollLeft + 11 + "px"; ob.style.width = width; ob.style.border = '1px solid'; 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=''; msg = RecoverSpacialChar(msg); preview_msg.innerHTML = "
" + img + "
" + msg + "
"; preview_msg.style.top = event.clientY + document.body.scrollTop + 10 + "px"; preview_msg.style.left = event.clientX + document.body.scrollTop + 10 + "px"; preview_msg.style.width = width + "px"; preview_msg.style.border = '1px solid gray'; preview_msg.style.display = 'inline'; } // ¹Ì¸®º¸±â 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<=mmsImageMax;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(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 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 == '') { alert('¸Þ½ÃÁö ³»¿ëÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä.'); tg.msgbox.value = ''; 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){ if(GetCookie(fname) == 'no') return; if(!fname) 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 "tms": case "TMS": default: if(path != "/TMS/" && path != "/TMS/index.html") return break; } if(!exp) expDate = 1; else expDate = exp; var divName = fname; var width = 324; var height = 350; var ptop = 300; var html = ""; // ÀÛÀº»çÀÌÁî 1, Å«»çÀÌÁî 2 if(scale != 1){ width = 450; height = 660; ptop -= 80; } 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','10'); $('#' + divName).css('display','block'); $('#' + divName).css('margin-left', -(width / 2) + 'px'); $('#' + divName).css('left','50%'); html += "
"; html += "
"; html += " "; html += "
´Ý±â¨ä " + expDate + "ÀÏ µ¿¾È ÀÌ Ã¢À» ¿­Áö ¾ÊÀ½
"; html += "
"; $('#' + divName).html(html); if(link){ $('#link_img').css('cursor','pointer'); //$('#link_img').attr('onClick',"PopupSetCookie('" + fname + "', 'no', 1);location.href='" + link + "'"); $('#link_img').attr('onClick',"location.href='" + link + "'"); } } function PopupDivClose(name,exp){ if(!exp) var exp = 0; PopupSetCookie(name, "no" , exp); // Äí۸¦ º¸Á¸ÇÕ´Ï´Ù. $('#' + name).hide(300); } function PopupSetCookie(name,value,expiredays) { if(expiredays != 0){ var todayDate = new Date(); todayDate.setDate( todayDate.getDate() + expiredays ); document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"; }else{ document.cookie = name + "=" + escape( value ) + "; path=/"; } } // À±³â¿©ºÎ üũ function LeapYear(year) { if (year % 4 == 0) return true; // À±³â else return false ; } // ¿ùº° Àϼö¸¦ °¡Á®¿È function GetDays(month, year) { switch(month){ default: case "01": case "03": case "05": case "07": case "08": case "10": case "12": return 31; break; case "02": return (LeapYear(year)) ? 29 : 28; // February break; case "04": case "06": case "09": case "11": return 30; break; } } 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 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.search(/\(±¤°í\)/) != 0 || _mesg.search("¹«·á") == -1 || _mesg.search("°ÅºÎ") == -1 || _mesg.search("080") == -1){ return "(!) Àü¼ÛÇÏ´Â ¸Þ¼¼Áö°¡ ±¤°í(È«º¸)ÀÎ °æ¿ì\n\n±¤°í(È«º¸)¹®ÀÚ´Â ±¤°í±ÔÁ¤Áؼö ÈÄ ¹®ÀÚ¸¦ ¹ß¼ÛÇØ¾ßÇÕ´Ï´Ù.\n¹®ÀÚÀÛ¼º ÈÄ¿¡ ¿ìÃø [±¤°í±ÔÁ¤ÀÚµ¿ÀÔ·Â] ¹öưÀ» ´­·¯\n±¤°í±ÔÄ¢¿¡ ¸ÂÃç ¹®ÀÚ¸¦ ¹ß¼ÛÇØÁÖ¼¼¿ä.\n\n±¤°í(È«º¸)°¡ ¾Æ´Ñ °æ¿ì ¹ß¼ÛÇÏ½Ã¸é µË´Ï´Ù.\n"; }else{ return ""; } } // ±¤°í¼º½ºÆÔ¹®ÀÚ±ÔÄ¢ ¾Ë¸² 2015.7.30 function InsertAdText(msgbox,sender,_title){ if(!sendMesgModifyAvailable){ 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.search(/\(±¤°í\)/) != 0) _mesg = "(±¤°í)\n" + _mesg; // ±¤°íÇ¥½Ã ¾ÈµÈ°æ¿ì break; case 2: if(_mesg.search(/\(¼±°Å¿îµ¿Á¤º¸\)/) != 0) _mesg = "(¼±°Å¿îµ¿Á¤º¸)\n" + _mesg; // ±¤°íÇ¥½Ã ¾ÈµÈ°æ¿ì if(_mesg.search("Èĺ¸ÀÚÀüÈ­¹øÈ£") == -1) _mesg += "\nÈĺ¸ÀÚÀüÈ­¹øÈ£ "; break; } if(_mesg.search("¹«·á") == -1 || _mesg.search("°ÅºÎ") == -1) { if(_title == 2) _mesg += "\nºÒ¹ý¼öÁýÁ¤º¸ ½Å°í¹øÈ£ 118¹ø"; _mesg += "\n¹«·á°ÅºÎ"; } if(_mesg.search("°ÅºÎ\r\n080") == -1 && _mesg.search("°ÅºÎ\n080") == -1 && _mesg.search("°ÅºÎ 080") == -1 && _mesg.search("°ÅºÎ080") == -1 && _mesg.search("¹øÈ£\n080") == -1 && _mesg.search("¹øÈ£ 080") == -1 && _mesg.search("¹øÈ£080") == -1) _mesg += "\n0808512009"; 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; } // À̹ÌÁö »ùÇÃ¿ë ¼Ò½º 2015-11-25 - ¹ÚÁ¾Åà - // ÀϰýÃß°¡ 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); //if(sndPid) PutSound(fm,sndPid,sndFile,sndTitle,sndArtist,sndPoly); 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 PutImageMax(dc){ if(FindService(dc, "MMS")) return mmsImageMax; else return tmsImageMax; } // ÄÁÅÙÃ÷»ðÀÔ function PutImage(fm,pid,title,edate){ //alert("PutImage"); var tail = ""; var divImg; if(document.getElementById('mms_img') == null) var dc = parent.document; //º¸³½¸Þ½ÃÁö°á°ú else var dc = document; var imageMax = PutImageMax(dc); if(document.name == "reserve") imageMax = 1; //¿¹¾à³»¿ªº¯°æ if(!sendMesgModifyAvailable){ alert("À̹ÌÁö¸¦ º¯°æÇÏ½Ç ¼ö ÀÖ´Â »óŰ¡ ¾Æ´Õ´Ï´Ù"); return; } if(!pid){ for(var i=1;i<=imageMax;i++){ if(i != 1) tail = i; divImg = dc.getElementById('mms_img' + tail); divImg.style.display = "none"; fm['photoNum' + tail].value = ""; fm['mms_img' + tail].innerHTML = ""; } }else{ for(var i=1;i<=imageMax;i++){ if(i != 1) tail = i; divImg = dc.getElementById('mms_img' + tail); if(fm['photoNum' + tail].value == "" || fm['edate' + tail].value == ""){ divImg.style.display = "block"; fm['photoNum' + tail].value = pid; fm['photoTitle' + tail].value = title; fm['edate' + tail].value = edate; divImg.innerHTML = PutImageSetEvent(pid,edate,tail); break; }else{ if(fm['photoNum' + tail].value == pid) break; } } // À̹ÌÁö ¸ðµÎ ÀÖÀ»¶§ ¸¶Áö¸· À̹ÌÁö¿¡ Ãß°¡ if(i > imageMax){ tail = imageMax; if(tail == 1) tail = ""; divImg = dc.getElementById('mms_img' + tail); divImg.style.display = "block"; fm['photoNum' + tail].value = pid; fm['photoTitle' + tail].value = title; fm['edate' + tail].value = edate; divImg.innerHTML = PutImageSetEvent(pid,edate,tail); } // ½ºÅ©·ÑÀ̵¿ MoveScroll(dc,"scroll_div","mms_img"+tail); } PutImageEnableBtn(dc); GetFee(fm,fm.fee,parent.document.getElementById("span_msgkind")); } function PutImageMoveScroll(dc,tail){ if(dc.getElementById('photoNum' + tail).value) MoveScroll(dc,"scroll_div","mms_img"+tail); } // ¼±ÅÃµÈ À̹ÌÁö¼ö function PutImageCnt(){ var tail = ""; var cnt = 0; if(document.getElementById('photoNum') != undefined){var dc = document;} else if(parent.document.getElementById('photoNum') != undefined){var dc = parent.document;} else if(top.opener.document.getElementById('photoNum') != undefined){var dc = top.opener.document;} var imageMax = PutImageMax(dc); for(var i=1;i<=imageMax;i++){ if(i != 1) tail = i; if(dc.getElementById('photoNum' + tail).value != "") cnt++; } return cnt; } // Àü¼Ûâ À̹ÌÁö Ç¥±â Ȱ¼ºÈ­ function PutImageEnableBtn(dc){ var tail = ""; var btnTail = ""; var imageMax = PutImageMax(dc); for(var i=1;i<=imageMax;i++){ if(i != 1) tail = i; if(!dc.getElementById('photoNum' + tail).value) btnTail = "off"; else btnTail = "on"; ob = dc.getElementById('put_img_btn' + tail); if(imageMax != 1) ob.src="/_img/hp_" + btnTail + "0" + tail + ".gif"; else ob.src="/_img/hp_mms_" + btnTail + ".gif"; //if(imageMax != 1) ob.src="/_img/put_img_" + btnTail + "_btn" + tail + ".gif"; //else ob.src="/_img/put_img_only1_" + btnTail + "_btn.gif"; } } function PutImageSetEvent(pid,edate,tail){ var file = ""; var imageMax = PutImageMax(document); if(imageMax > 1) file = "Àü¼ÛÀ̹ÌÁö"; else file = "Àü¼ÛÀ̹ÌÁö"; return file; } // Àü¼ÛâÀÇ ÇÑÀåÀÇ À̹ÌÁö Á¦°Å function PutImageDel(pid){ var tail = ""; var ord = ""; var imageMax = PutImageMax(document); for(var i=1;i<=mmsImageMax;i++){ if(i != 1) tail = i; if(document.getElementById('photoNum' + tail).value == pid){ if(tail == "" && imageMax > 1) ord = "ù¹øÂ°"; else if(tail == 2) ord = "µÎ¹øÂ°"; else if(tail == 3) ord = "¼¼¹øÂ°"; else ord = "¼±ÅÃÇϽÅ"; if(confirm(ord + " À̹ÌÁö¸¦ Àü¼Ûâ¿¡¼­ »èÁ¦ÇϽðڽÀ´Ï±î?")){ document.getElementById('mms_img' + tail).style.display = "none"; document.getElementById('photoNum' + tail).value = ""; document.getElementById('mms_img' + tail).innerHTML = ""; } return; } } } // Àü¼ÛâÀÇ À̹ÌÁö ¼ø¼­º¯°æ function PutImageOrderChange(tail,md){ //alert("PutImageOrderChange"); var updn; var ob1 = ""; var ob2 = ""; var guide = ""; if(PutImageCnt(document) <= 1) return; if(md == 1){ putImageDragStart = event.clientY; } if(md == 2){ var imgCnt = PutImageCnt(document); putImageDragEnd = event.clientY; if(putImageDragEnd > putImageDragStart){ guide = "¾Æ·¡"; updn = "dn"; } else{ guide = "À§";updn = "up" }; if(updn == "dn" && tail != imgCnt){ if(tail == ""){ ob1 = ""; ob2 = 2; }else{ ob1 = 2; ob2 = 3; } } if(updn == "up" && tail != ""){ if(tail == 2){ ob1 = 2; ob2 = ""; }else{ ob1 = 3; ob2 = 2; } } if(ob1 || ob2){ document.getElementById('mms_img' + ob1).innerHTML = PutImageSetEvent(document.getElementById('photoNum' + ob1).value,document.getElementById('edate' + ob1).value,ob2); document.getElementById('mms_img' + ob2).innerHTML = PutImageSetEvent(document.getElementById('photoNum' + ob2).value,document.getElementById('edate' + ob2).value,ob1); PutImageSwitch(ob1,ob2); //alert("À̹ÌÁö ÇÑÄ­ " + guide + ", À̵¿µÊ"); } } } // À§Ä¡º¯°æ function PutImageSwitch(ob1,ob2){ var _div1 = document.getElementById('mms_img' + ob1); var _div2 = document.getElementById('mms_img' + ob2); var _photoNum = document.getElementById('photoNum' + ob1).value; var _photoTitle = document.getElementById('photoTitle' + ob1).value; var _edate = document.getElementById('edate' + ob1).value; var _innerHTML = _div1.innerHTML; document.getElementById('photoNum' + ob1).value = document.getElementById('photoNum' + ob2).value; document.getElementById('photoTitle' + ob1).value = document.getElementById('photoTitle' + ob2).value; document.getElementById('edate' + ob1).value = document.getElementById('edate' + ob2).value; _div1.innerHTML = _div2.innerHTML; document.getElementById('photoNum' + ob2).value = _photoNum; document.getElementById('photoTitle' + ob2).value = _photoTitle; document.getElementById('edate' + ob2).value = _edate; _div2.innerHTML = _innerHTML; } // Àü¼ÛâÀÇ À̹ÌÁö ¼ø¼­Á¤¸® function PutImageOrder(){ var tail = ""; var div1 = document.getElementById("mms_img"); var div2 = document.getElementById("mms_img2"); var div3 = document.getElementById("mms_img3"); var photoNum = document.getElementById('photoNum'); var photoNum2 = document.getElementById('photoNum2'); var photoNum3 = document.getElementById('photoNum3'); var edate = document.getElementById('edate'); var edate2 = document.getElementById('edate2'); var edate3 = document.getElementById('edate3'); if(photoNum.value == "" && photoNum2.value != "" && photoNum3.value != ""){ div1.style.display = ""; photoNum.value = photoNum2.value; edate.value = edate2.value; div1.innerHTML = PutImageSetEvent(photoNum2.value,edate2.value,''); div2.style.display = ""; photoNum2.value = photoNum3.value; edate2.value = edate3.value; div2.innerHTML = PutImageSetEvent(photoNum3.value,edate3.value,2); div3.style.display = "none"; photoNum3.value = ""; edate3.value = ""; div3.innerHTML = ""; }else if(photoNum.value != "" && photoNum2.value == "" && photoNum3.value != ""){ div2.style.display = ""; photoNum2.value = photoNum3.value; edate2.value = edate3.value; div2.innerHTML = PutImageSetEvent(photoNum3.value,edate3.value,2); div3.style.display = "none"; photoNum3.value = ""; edate3.value = ""; div3.innerHTML = ""; }else if(photoNum.value == "" && photoNum2.value != "" && photoNum3.value == ""){ div1.style.display = ""; photoNum.value = photoNum2.value; edate.value = edate2.value; div1.innerHTML = PutImageSetEvent(photoNum2.value,edate2.value,''); div2.style.display = "none"; photoNum2.value = ""; edate2.value = ""; div2.innerHTML = ""; } PutImageEnableBtn(document); GetFee(document.all,document.all.fee,parent.document.getElementById("span_msgkind")); } // ƯÁ¤ À§Ä¡·Î ½ºÅ©·Ñ À̵¿ 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 UserToolTip(ob,comment){ var toolTip = document.getElementById("div_user_tool_tip"); if(comment){ document.getElementById("user_tool_tip_comment").innerHTML = comment; toolTip.style.top = event.clientY + document.body.scrollTop - 13; toolTip.style.left = event.clientX + document.body.scrollLeft + 18; toolTip.style.display = 'inline'; ob.onmousemove = function(){toolTip.style.display = 'none';}; // Áö¿¬½Ã°£ } } function UserToolTipHide(ob){ var toolTip = document.getElementById("div_user_tool_tip"); toolTip.style.display = 'none'; } // ¹Ì¸®º¸±â 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 ShowImageList(num, edate, y, allow){ if(GetCookie(allow) === "0") return; if(!num || !edate) return; if(!y) var y = 0; var 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){ 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 ob = $("#div_sent_list"); 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','500px'); $('#' + newDivName).css('top','820px'); $('#' + newDivName).css('left','50%'); $('#' + newDivName).css('margin-left','-200px'); $('#' + newDivName).css('background-color','#FFFFFF'); $('#' + newDivName).css('border','1px solid silver'); $('#' + newDivName).css('position','absolute'); $('#' + newDivName).css('overflow','hidden'); $('#' + newDivName).css('z-index','9'); $('#' + newDivName).css('display','none'); var html = "
"; html += "
"; html += "
"; html += "
"; html += "
"; html += "
¼±ÅÃµÈ º¸³½³»¿ª ÀüÈ­¹øÈ£¸¦ ÁÖ¼Ò·ÏÀ¸·Î µî·ÏÇÕ´Ï´Ù.
"; html += "
"; html += "
±×·ì¸í
"; html += "
"; html += "
"; html += "
(ÀϺΠ»ç¿ëÇÏ½Ç ¼ö ¾ø´Â Ư¼ö¹®ÀÚ´Â ÀÚµ¿Á¦°Å, µî·ÏµË´Ï´Ù)
"; html += "
"; $('#' + newDivName).html(html); } $.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"; ob = $("#" + div); if(fm){ method = "POST"; if(param) param = param + "&" + $(fm).serialize(); else param = $(fm).serialize(); } if(ob.width() != 0) Loading(div); $.ajax({ url : url, dataType : "html", type : method, data : param, //async : false, success : function(result){ ob.html(result); ob.css('border-style', 'none'); ob.css('width', 'auto'); ob.css('height', 'auto'); }, error : function(error){ alert("Á˼ÛÇÕ´Ï´Ù. Àá½ÃÈÄ¿¡ ´Ù½Ã ½ÃµµÇϼ¼¿ä."); } }); } 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){ 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){ if(md == undefined || md == 1){ ScreenDisabled(); if(!$('#loadding6').length){ var newDiv = $("
"); $(document.body).append(newDiv); $('#loading6').css('position','fixed'); $('#loading6').css('top', window.innerHeight / 2 - 70); $('#loading6').css('left','50%'); $('#loading6').css('z-index','90'); $('#loading6').html(""); } $('#loading6').css('display','inline'); }else{ ScreenDisabled(0); $("#loading6").css("display","none"); } } function Alert(mesg){ if(mesg != -1){ if(verIE == "N/A" || verIE > 9){ // È£Ãâ Àü Æ÷Ä¿½Ì pageFocus = $(':focus'); ScreenDisabled(); if(!$('#div_alert').length){ var newDiv = $("
"); $(parent.document.body).append(newDiv); $('#div_alert',parent.document).css('width','300px'); $('#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('margin-left',(LeftNumber($('#div_alert',parent.document).css('width')) / 2) * -1); $('#div_alert',parent.document).css('text-align','right'); $('#div_alert',parent.document).css('opacity',0.9); $('#div_alert',parent.document).html(" X 
"); } $('#div_alert',parent.document).css('top', window.innerHeight / 2 - 70); $('#div_alert_mesg',parent.document).html(mesg.replace(/\n/g,'
')); $('#div_alert',parent.document).css('display','inline'); }else{ alert(mesg); } }else{ $('#div_alert',parent.document).css('display','none'); $('#div_alert_mesg',parent.document).text(''); ScreenDisabled(0); if(pageFocus) $(pageFocus).select(); } } 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"); } } // 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(); if(verIE == 8.0 || verIE == 7.0 || verIE == 6.0 || verIE == 5.0) isAutoSizeAllow = 0; document.write(''); document.write(""); document.write(""); document.write(""); document.write(""); document.write(""); document.write('');