if (typeof(COMMON_JS) == 'undefined') { // 한번만 실행 var COMMON_JS = true; // 전역 변수 var errmsg = ""; var errfld; // 필드 검사 function check_field(fld, msg) { if ((fld.value = trim(fld.value)) == "") error_field(fld, msg); else clear_field(fld); return; } // 필드 오류 표시 function error_field(fld, msg) { if (msg != "") errmsg += msg + "\n"; if (!errfld) errfld = fld; fld.style.background = "#BDDEF7"; } // 필드를 깨끗하게2014-12-15 function clear_field(fld) { fld.style.background = "#FFFFFF"; } function trim(s) { var t = ""; var from_pos = to_pos = 0; for (i=0; i=0; i--) { if (s.charAt(i-1) == ' ') continue; else { to_pos = i; break; } } t = s.substring(from_pos, to_pos); // alert(from_pos + ',' + to_pos + ',' + t+'.'); return t; } // 자바스크립트로 PHP의 number_format 흉내를 냄 // 숫자에 , 를 출력 function number_format(v) { v = v+""; var arr = v.split("."); if(arr.length > 1) { var str = arr[0]; }else{ var str =v; } str = ""+str+""; var retValue = ""; for(i=0; i 0 && (i%3)==0) { retValue = str.charAt(str.length - i -1) + "," + retValue; } else { retValue = str.charAt(str.length - i -1) + retValue; } } if(arr.length > 1) { return retValue +"." +arr[1]; } else { return retValue; } } function number_replace(obj,rep) { var retval = obj.replace(/,/gi,""); return retval; } // 새 창 function popup_window(url, winname, opt) { window.open(url, winname, opt); } // 폼메일 창 function popup_formmail(url) { opt = 'scrollbars=yes,width=417,height=385,top=10,left=20'; popup_window(url, "wformmail", opt); } // , 를 없앤다. function no_comma(data) { var tmp = ''; var comma = ','; var i; for (i=0; i \n"; js_url += " \n"; js_url += " \n"; var settings; if (g4_is_gecko) { settings ='width='+(w+10)+','; settings +='height='+(h+10)+','; } else { settings ='width='+w+','; settings +='height='+h+','; } settings +='top='+wint+','; settings +='left='+winl+','; settings +='scrollbars=no,'; settings +='resizable=yes,'; settings +='status=no'; win=window.open("","image_window",settings); win.document.open(); win.document.write (" \n \n\n"); var size = "이미지 사이즈 : "+w+" x "+h; win.document.write (""+size+" \n"); if(w >= screen.width || h >= screen.height) { win.document.write (js_url); var click = "ondblclick='window.close();' style='cursor:move' title=' "+size+" \n\n 이미지 사이즈가 화면보다 큽니다. \n 왼쪽 버튼을 클릭한 후 마우스를 움직여서 보세요. \n\n 더블 클릭하면 닫혀요. '"; } else var click = "onclick='window.close();' style='cursor:pointer' title=' "+size+" \n\n 클릭하면 닫혀요. '"; win.document.write (" \n"); win.document.write (" \n\n"); win.document.write (" \n"); win.document.write ("
"); win.document.write (""); win.document.close(); if(parseInt(navigator.appVersion) >= 4){win.window.focus();} } // a 태그에서 onclick 이벤트를 사용하지 않기 위해 function win_open(url, name, option) { var popup = window.open(url, name, option); popup.focus(); } // 우편번호 창 function win_zip(frm_name, frm_zip1, frm_zip2, frm_addr1, frm_addr2) { url = g4_path + "/" + g4_bbs + "/zip.php?frm_name="+frm_name+"&frm_zip1="+frm_zip1+"&frm_zip2="+frm_zip2+"&frm_addr1="+frm_addr1+"&frm_addr2="+frm_addr2; win_open(url, "winZip", "left=50,top=50,width=616,height=460,scrollbars=1"); } // 쪽지 창 function win_memo(url) { if (!url) url = g4_path + "/" + g4_bbs + "/memo.php"; win_open(url, "winMemo", "left=50,top=50,width=620,height=460,scrollbars=1"); } // 포인트 창 function win_point(url) { win_open(g4_path + "/" + g4_bbs + "/point.php", "winPoint", "left=20, top=20, width=616, height=635, scrollbars=1"); } // 스크랩 창 function win_scrap(url) { if (!url) url = g4_path + "/" + g4_bbs + "/scrap.php"; win_open(url, "scrap", "left=20, top=20, width=616, height=500, scrollbars=1"); } // 새로운 패스워드 분실 창 : 100902 function win_password_lost() { win_open(g4_path + "/" + g4_bbs + "/password_lost.php", 'winPasswordLost', 'left=50, top=50, width=617, height=330, scrollbars=1'); } // 패스워드 분실 창 function win_password_forget() { win_open(g4_path + "/" + g4_bbs + "/password_forget.php", 'winPasswordForget', 'left=50, top=50, width=616, height=500, scrollbars=1'); } // 코멘트 창 function win_comment(url) { win_open(url, "winComment", "left=50, top=50, width=800, height=600, scrollbars=1"); } // 폼메일 창 function win_formmail(mb_id, name, email) { if (g4_charset.toLowerCase() == 'euc-kr') win_open(g4_path+"/" + g4_bbs + "/formmail.php?mb_id="+mb_id+"&name="+name+"&email="+email, "winFormmail", "left=50, top=50, width=600, height=500, scrollbars=0"); else win_open(g4_path+"/" + g4_bbs + "/formmail.php?mb_id="+mb_id+"&name="+encodeURIComponent(name)+"&email="+email, "winFormmail", "left=50, top=50, width=600, height=480, scrollbars=0"); } // 달력 창 function win_calendar(fld, cur_date, delimiter, opt) { if (!opt) opt = "left=50, top=50, width=240, height=230, scrollbars=0,status=0,resizable=0"; win_open(g4_path+"/" + g4_bbs + "/calendar.php?fld="+fld+"&cur_date="+cur_date+"&delimiter="+delimiter, "winCalendar", opt); } // 설문조사 창 function win_poll(url) { if (!url) url = ""; win_open(url, "winPoll", "left=50, top=50, width=616, height=500, scrollbars=1"); } // 자기소개 창 function win_profile(mb_id) { win_open(g4_path+"/" + g4_bbs + "/profile.php?mb_id="+mb_id, 'winProfile', 'left=50,top=50,width=620,height=510,scrollbars=1'); } var last_id = null; function menu(id) { if (id != last_id) { if (last_id != null) document.getElementById(last_id).style.display = "none"; document.getElementById(id).style.display = "block"; last_id = id; } else { document.getElementById(id).style.display = "none"; last_id = null; } } function textarea_decrease(id, row) { if (document.getElementById(id).rows - row > 0) document.getElementById(id).rows -= row; } function textarea_original(id, row) { document.getElementById(id).rows = row; } function textarea_increase(id, row) { document.getElementById(id).rows += row; } // 글숫자 검사 function check_byte(content, target) { var i = 0; var cnt = 0; var ch = ''; var cont = document.getElementById(content).value; for (i=0; i 4) { cnt += 2; } else { cnt += 1; } } // 숫자를 출력 document.getElementById(target).innerHTML = cnt; return cnt; } // 브라우저에서 오브젝트의 왼쪽 좌표 function get_left_pos(obj) { var parentObj = null; var clientObj = obj; //var left = obj.offsetLeft + document.body.clientLeft; var left = obj.offsetLeft; while((parentObj=clientObj.offsetParent) != null) { left = left + parentObj.offsetLeft; clientObj = parentObj; } return left; } // 브라우저에서 오브젝트의 상단 좌표 function get_top_pos(obj) { var parentObj = null; var clientObj = obj; //var top = obj.offsetTop + document.body.clientTop; var top = obj.offsetTop; while((parentObj=clientObj.offsetParent) != null) { top = top + parentObj.offsetTop; clientObj = parentObj; } return top; } function flash_movie(src, ids, width, height, wmode) { var wh = ""; if (parseInt(width) && parseInt(height)) wh = " width='"+width+"' height='"+height+"' "; document.write(""); } function flash(id, width, height){ document.write('' +'' +'' +'' +'' +'' +'' +''); } function obj_movie(src, ids, width, height, autostart) { var wh = ""; if (parseInt(width) && parseInt(height)) wh = " width='"+width+"' height='"+height+"' "; if (!autostart) autostart = false; return ""; } function doc_write(cont) { document.write(cont); } function open_window(strurl,strname,intwidth,intheight,strscroll) { if(strscroll == "") { strscroll = "no"; } window.open(strurl,strname,'width='+intwidth+',height='+intheight+',scrollbars='+strscroll); } function open_window_center(strurl,strname,intwidth,intheight,strscroll) { if(strscroll == "") { strscroll = "no"; } var intLeft = Math.ceil((window.screen.width - intwidth) / 2 ); var intTop = Math.ceil((window.screen.height - intheight) / 2 ) - 100; window.open(strurl,strname,'resizable=no,width='+intwidth+',height='+intheight+',scrollbars='+strscroll+',top='+intTop+',left='+intLeft); } function open_modal_window_center(strurl,strname,intwidth,intheight,strscroll) { if(strscroll == "") { strscroll = "no"; } var intLeft = Math.ceil((window.screen.width - intwidth) / 2 ); var intTop = Math.ceil((window.screen.height - intheight) / 2 ) - 100; window.showModalDialog(strurl,strname,'dialogWidth='+intwidth+'px; dialogHeight='+intheight+'px; dialogTop='+intTop+'; dialogLeft='+intLeft+'px'); } function open_window_right(strurl,strname,intwidth,intheight,strscroll) { if(strscroll == "") { strscroll = "no"; } var intLeft = Math.ceil(window.screen.width - intwidth); var intTop = Math.ceil((window.screen.height - intheight) / 2 ) - 100; window.open(strurl,strname,'width='+intwidth+',height='+intheight+',scrollbars='+strscroll+',top='+intTop+',left='+intLeft); } function open_window_custom(strurl,strname,intwidth,intheight,intLeft,intTop,strscroll) { if(strscroll == "") { strscroll = "no"; } window.open(strurl,strname,'width='+intwidth+',height='+intheight+',scrollbars='+strscroll+',top='+intTop+',left='+intLeft); } function window_location(strurl,strkind) { if(!strkind) { window.location=strurl; } else if(strkind == "parent") { parent.window.location=strurl; } else if(strkind == "opener") { opener.window.location=strurl; } } /* << 김이사님 텝메뉴 때문에 요곳좀 넣을께용 >> */ /* 롤오버 관련 함수 */ function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i= "0" && ch <= "9") || (ch >= "a" && ch <= "z") ||(ch >= "A" && ch <= "Z")) { chk=true; } else { chk=false; break; } } return chk; } function CheckID_check() { var fm = document.regMemberfm; var id_chk = ""; if(!fm.email01.value) { document.getElementById("idtext").value = "아이디가 없습니다. 아이디를 입력하여 주십시오."; fm.email01.focus(); return false; } if(!fm.email02.value) { document.getElementById("idtext").value = "아이디가 없습니다. 아이디를 입력하여 주십시오."; fm.email02.focus(); return false; } return true; } function Check_pass1() { var idchk = true; idchk = CheckID_check(); if(idchk == false) { return false; } var fm = document.regMemberfm; if(fm.passwd1.value.length < 4) { document.getElementById("passwordtext").value = "비밀번호는 4자이상 입력하여 주십시오."; // alert('비밀번호는 6자 이상이어야 합니다.'); fm.passwd1.value=''; // fm.passwd1.focus(); return false; } else { document.getElementById("passwordtext").value = "사용가능한 비밀번호 입니다."; return true; } } function Check_pass2() { var idchk = true; idchk = CheckID_check(); if(idchk == false) { return false; } var fm = document.regMemberfm; if(fm.passwd1.value != fm.passwd2.value) { document.getElementById("passwordtext").value = "비밀번호는가 일치하지 않습니다."; //alert('비밀번호는가 일치하지 않습니다. 다시 시도하여 주십시오.'); fm.passwd1.value=''; fm.passwd2.value=''; fm.passwd1.focus(); return false; } else { if(fm.passwd1.value) { document.getElementById("passwordtext").value = "비밀번호가 일치합니다."; return true; } else { document.getElementById("passwordtext").value = "비밀번호가 없습니다. 비밀번호를 입력하여 주십시오."; fm.passwd1.focus(); return false; } } } function Check_update_pass1() { var fm = document.regMemberfm; if(fm.passwd1.value.length < 4) { document.getElementById("passwordtext").value = "비밀번호는 4자이상 입력하여 주십시오."; // alert('비밀번호는 6자 이상이어야 합니다.'); fm.passwd1.value=''; // fm.passwd1.focus(); return false; } else { document.getElementById("passwordtext").value = "사용가능한 비밀번호 입니다."; return true; } } function Check_update_pass2() { var fm = document.regMemberfm; if(fm.passwd1.value != fm.passwd2.value) { document.getElementById("passwordtext").value = "비밀번호는가 일치하지 않습니다."; //alert('비밀번호는가 일치하지 않습니다. 다시 시도하여 주십시오.'); fm.passwd1.value=''; fm.passwd2.value=''; fm.passwd1.focus(); return false; } else { if(fm.passwd1.value) { document.getElementById("passwordtext").value = "비밀번호가 일치합니다."; return true; } else { document.getElementById("passwordtext").value = "비밀번호가 없습니다. 비밀번호를 입력하여 주십시오."; fm.passwd1.focus(); return false; } } } function CheckID_OUT() { var fm = document.regMemberfm; if(!fm.email01.value) { document.getElementById("idtext").value = "아이디가 없습니다. 아이디를 입력하여 주십시오."; fm.email01.focus(); return false; } if(!fm.email02.value) { document.getElementById("idtext").value = "아이디가 없습니다. 아이디를 입력하여 주십시오."; fm.email02.focus(); return false; } var email = fm.email01.value+"@"+fm.email02.value; CheckIDHandle(email); } // 아이디체크 function CheckIDHandle(strDN) { var url = 'id_check.php?id=' + strDN; LoadXMLHttpRequest("CheckIDHandledn", url) } // 아이디 처리과정 function CheckIDHandledn() { if(xmlHttp.readyState == 4) { switch (xmlHttp.status) { case 200: // 페이지가 잘 불러졌을경우 함수처리. var strTemp = xmlHttp.responseText; var strTempArr = new Array(); strTempArr = strTemp.split(";"); CheckID_effect(strTempArr[0],strTempArr[1]); break; case 404: alert('데이터 처리 페이지 없음'); break; } } } function CheckID_effect(effect,id) { var fm = document.regMemberfm; if(effect == 1) { document.getElementById("idtext").value = "이미 "+id+" 란 아이디가 존재합니다. 다른 아이디를 입력하여 주십시오"; fm.email01.value=""; fm.email02.value=""; fm.email01.focus(); return false; } else { document.getElementById("idtext").value = id+" 는 사용가능한 아이디 입니다."; return true; } } function mailSum(fm) { var selEmail = fm.email02_sel.value; fm.email02.value = selEmail; if(selEmail == '') document.all.email02.style.display = ''; else document.all.email02.style.display = 'none'; } function CheckHandle(strkd,obj,obj2) { settle.location.href='../findmake.php?kd='+strkd+'&val='+obj+'&val2='+obj2; } function financial_promotion_pop(obj,objwidth,objheight) { open_window_center('financial_promotion_pop.php?obj='+obj,'financial_promotion_pop',objwidth,objheight,'no'); } function check_sales_homepage(obj) { open_window_center("sales_homepage_pop.php?obj="+obj,"sales_homepage","960","630","no"); } function check_main_counsel(obj) { open_window_center("/company/sales_homepage_pop.php?obj="+obj,"sales_homepage","960","630","no"); } function check_counsel_pop(obj) { opener.window.location = '/online/index.php?cl='+obj; self.close(); } function openSNS(gubunNum) { var href = ""; var name = ""; var msg = "스페이스 케이-문서보관 서비스"; var url = location.href; if(gubunNum == 'twitter') { href = "http://twitter.com/share?url="+url+"&text="+encodeURI(msg); name = "twitter"; }else if(gubunNum == 'facebook'){ href = "http://www.facebook.com/sharer.php?u="+url+"&t="+encodeURI(msg)+"&src=sp"; name = "facebook"; }else if(gubunNum == 'me2day'){ href = "http://me2day.net/posts/new?new_post[body]=%22"+encodeURI(msg)+"%22:"+url+"&new_post[tags]="+encodeURI("태그"); name = "me2day"; }else if(gubunNum == 'yozm'){ href = "http://yozm.daum.net/api/popup/prePost?prefix="+encodeURI(msg)+"&link="+url; name = "yozm"; }else if(gubunNum == 'google'){ href = "https://plus.google.com/share?url="+encodeURIComponent(url); } window.open(href, name, 'toolbar=0, status=0, width=626, height=436'); } function link_general(obj) { window.location=obj; } function link_confirm(kind,obj) { if(confirm('삭제한 데이터는 복구되지 않습니다. 삭제를 진행하시겠습니까?.')) { settle.window.location = kind+"?val="+obj; } } function check_admin_saleman(obj) { open_window_center("check_admin_saleman.php?obj="+obj,"check_admin_saleman","400","550","yes"); } function check_vc(obj) { CheckTeamHandle(obj); } // 팀 체크 function CheckTeamHandle(strDN) { var url = 'team_check.php?seq=' + strDN; LoadXMLHttpRequest("CheckTeamHandledn", url) } // 팀 처리과정 function CheckTeamHandledn() { if(xmlHttp.readyState == 4) { switch (xmlHttp.status) { case 200: // 페이지가 잘 불러졌을경우 함수처리. var strTemp = xmlHttp.responseText; var strTempArr = new Array(); var strTempSubArr = new Array(); strTempArr = strTemp.split("^"); var optOr = document.getElementById("vstseq"); for(var i=optOr.options.length-1; i>0; i--) { optOr.options[i] = null; } for(var i=0;i 0) { imgSectionValPrev = parseInt(imgSectionVal)-1; document.getElementById('estateBingImg').src="/"+imgObjVal2[imgSectionValPrev][1]; document.getElementsByName("imgSection")[0].value = imgSectionValPrev; } } } function check_show_image(obj,imgurl) { if(obj && obj != "images/no_image_big.jpg") { document.getElementById('estateBingImg').src=obj; } } function check_show_consult_image(obj) { if(obj) { document.getElementById('consultrepimg').src=obj; } } function check_d_form(form) { if(confirm('삭제한 데이터는 복구되지 않습니다. 정말 삭제하시겠습니까?')) { document.getElementsByName("kind")[0].value = "del"; document.getElementsByName(form)[0].action = "qna/process.php"; document.getElementsByName(form)[0].submit(); } } function createMarker(pos, count, content) { var iconUrl = 'http://admin.vuple.co.kr/img/icon_here.gif'; var marker = new NMark(pos, new NIcon(iconUrl, new NSize(20, 20))); NEvent.addListener(marker, "mouseover", function(pos) { infowin.set(pos, '
' + content + '
'); infowin.showWindow() }); NEvent.addListener(marker, "mouseout", function() { infowin.hideWindow(); }); return marker; } function check_point_pop(obj) { if(!obj) { alert('값이 올바르지 않습니다.'); self.close(); } open_window_center('member_point_pop.php?seq='+obj,'member_point_pop','600','450','no'); } function check_del(url,obj) { if(!obj || !url) { alert("접근이 올바르지 않습니다"); return false; } if(confirm('삭제한 데이터는 복구되지 않습니다. 정말 삭제하시겠습니까?')) { settle.window.location = url+"?kind=del&seq="+obj; } } function check_post_del(url,obj,formname,objtarget,objtext) { if(!obj || !url) { alert("접근이 올바르지 않습니다"); return false; } if(confirm(objtext)) { var regfm = document.getElementsByName(formname)[0]; regfm.action = url; regfm.kind.value = "del"; regfm.seq.value = obj; regfm.target = objtarget; regfm.submit(); } } function check_post_update(url,obj,strsd,formname) { if(!obj || !url) { alert("접근이 올바르지 않습니다"); return false; } var regfm = document.getElementsByName(formname)[0]; regfm.action = url; regfm.SD.value = strsd; regfm.seq.value = obj; regfm.submit(); } function check_del_form(fm,fol) { if(confirm('삭제한 데이터는 복구되지 않습니다. 정말 삭제하시겠습니까?')) { var form = document.getElementsByName(fm)[0]; form.RD.value = "1"; form.kind.value = "del"; form.action = fol+"/process.php"; form.method = "POST"; form.target="settle"; form.submit(); } } function check_del_list_form(fm,fol,seq) { if(!seq) { alert('접근이 올바르지 않습니다.'); } if(confirm('삭제한 데이터는 복구되지 않습니다. 정말 삭제하시겠습니까?')) { var form = document.getElementsByName(fm)[0]; form.SE.value = seq; form.RD.value = "1"; form.kind.value = "del"; form.action = fol+"/process.php"; form.method = "POST"; form.target="settle"; form.submit(); } } function check_update_list_form(fm,content,seq) { var form = document.getElementsByName(fm)[0]; form.SE.value = seq; form.summary.value=Base64.decode(content); form.kind.value = "update"; document.getElementById("sbtn").value='내용수정'; } function check_summary_reset(fm) { var form = document.getElementsByName(fm)[0]; form.summary.value=""; form.SE.value = ""; form.kind.value = "save"; document.getElementById("sbtn").value='내용등록'; } function check_update(regfm) { var obj = document.getElementsByName("SE")[0].value; if(!obj) { alert("접근이 올바르지 않습니다. 다시 시도하여 주십시오"); return false; } else { document.getElementsByName(regfm)[0].method = "post"; document.getElementsByName(regfm)[0].target = "_self"; document.getElementsByName("RD")[0].value = "4"; document.getElementsByName(regfm)[0].submit(); } } function addFile(tb_name){//테이블 1줄추가 var tb_name = document.getElementById(tb_name); var rowIcnt = tb_name.rows.length; //if(rowIcnt > 29) return false;//최대 29라인 for(var i=1;i<=5;i++){ var oCurrentRow,oCurrentCell; oCurrentRow = tb_name.insertRow(); //tr 추가 rowIndex = oCurrentRow.rowIndex; //줄번호

for(var i=1;i<=5;i++){ oCurrentCell = oCurrentRow.insertCell();//td 추가 switch(i){ case 1: switch_str = "<input type='text' name='c_num[]'>"; break; case 2: switch_str = "<input type='text' name='c_name[]'>"; break; case 3: switch_str = "<input type='text' name='c_phone[]' onkeyup='OnCheckPhone(this);'>"; break; case 4: switch_str = "<input type='text' name='c_quantity[]'>"; break; case 5: switch_str = "<a href='#' onclick=\"excel('"+rowIndex+"');\"><img src='../image/print.png'></a>"; break; default: switch_str =""; break; } oCurrentCell.innerHTML = switch_str;//TD안의 내용물을 붙여넣는다 } } function paytableadd(tb_name) { var tb_name = document.getElementById(tb_name); var rowIcnt = tb_name.rows.length; if(rowIcnt < 4) { $("#paytable").append("무통장내역은행명 : | 계좌번호 : 입금자명입금예정일 일"); } } function paytableadddel(tb_name,rowcnt) { //Measurement 1줄삭제 var tb_name = document.getElementById(tb_name); var rowIcnt = tb_name.rows.length; if(rowIcnt > 2) { tb_name.deleteRow(2); tb_name.deleteRow(2); } } function check_paytable(obj) { var paytable = document.getElementById("paytable"); if(obj == "C") { paytable.style.display = "none"; } else if (obj == "M") { paytable.style.display = "none"; } } function addZero(i){ var rtn = parseInt(i) + 100; return rtn.toString().substring(1,3); } function check_online_w_form(fm) { var form = check_form(fm); if(form == false) { return false; } var codekind = false; var code = document.getElementsByName("code[]"); for(var i=0;i> 2; enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); enc4 = chr3 & 63; if (isNaN(chr2)) { enc3 = enc4 = 64; } else if (isNaN(chr3)) { enc4 = 64; } output = output + this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) + this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4); } return output; }, // public method for decoding decode : function (input) { var output = ""; var chr1, chr2, chr3; var enc1, enc2, enc3, enc4; var i = 0; input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); while (i < input.length) { enc1 = this._keyStr.indexOf(input.charAt(i++)); enc2 = this._keyStr.indexOf(input.charAt(i++)); enc3 = this._keyStr.indexOf(input.charAt(i++)); enc4 = this._keyStr.indexOf(input.charAt(i++)); chr1 = (enc1 << 2) | (enc2 >> 4); chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); chr3 = ((enc3 & 3) << 6) | enc4; output = output + String.fromCharCode(chr1); if (enc3 != 64) { output = output + String.fromCharCode(chr2); } if (enc4 != 64) { output = output + String.fromCharCode(chr3); } } output = Base64._utf8_decode(output); return output; }, // private method for UTF-8 encoding _utf8_encode : function (string) { string = string.replace(/\r\n/g,"\n"); var utftext = ""; for (var n = 0; n < string.length; n++) { var c = string.charCodeAt(n); if (c < 128) { utftext += String.fromCharCode(c); } else if((c > 127) && (c < 2048)) { utftext += String.fromCharCode((c >> 6) | 192); utftext += String.fromCharCode((c & 63) | 128); } else { utftext += String.fromCharCode((c >> 12) | 224); utftext += String.fromCharCode(((c >> 6) & 63) | 128); utftext += String.fromCharCode((c & 63) | 128); } } return utftext; }, // private method for UTF-8 decoding _utf8_decode : function (utftext) { var string = ""; var i = 0; var c = c1 = c2 = 0; while ( i < utftext.length ) { c = utftext.charCodeAt(i); if (c < 128) { string += String.fromCharCode(c); i++; } else if((c > 191) && (c < 224)) { c2 = utftext.charCodeAt(i+1); string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); i += 2; } else { c2 = utftext.charCodeAt(i+1); c3 = utftext.charCodeAt(i+2); string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); i += 3; } } return string; } } function link_pop_url(obj) { if(obj) { var fm = document.getElementsByName("othersite")[0]; fm.action = obj; fm.target = "_blank"; fm.submit(); } } function fn_faq_link(obj) { var stxt = document.getElementsByName("STXT")[0]; var retval = ""; if(stxt.value) { retval = "&STXT="+stxt.value; } retval = "?SSEC="+obj+retval; window.location = "faq.php"+retval; } function check_shop_cate_master(obj) { var url = '/adm/product/product_cate_check.php?id=' + obj; LoadXMLHttpRequest("CheckShopCateMaster", url) } function CheckShopCateMaster() { if(xmlHttp.readyState == 4) { switch (xmlHttp.status) { case 200: // 페이지가 잘 불러졌을경우 함수처리. var strTemp = xmlHttp.responseText; var strTempArr = new Array(); var strTempSubArr = new Array(); strTempArr = strTemp.split("`"); var optOr = document.getElementById("cpcsseq"); for(var i=optOr.options.length-1; i>0; i--) { optOr.options[i] = null; } for(var i=0;i<=parseInt(strTempArr.length-1);i++) { strTempSubArr = strTempArr[i].split("^"); var opt = document.createElement('option'); if(strTempSubArr[1] != undefined) { opt.text = decodeURIComponent(strTempSubArr[1]); opt.value = strTempSubArr[0]; document.getElementById("cpcsseq").add(opt); } } break; case 404: alert('데이터 처리 페이지 없음'); break; } } } function check_update_form_front_passwd(fm,fol,filelink) { var form = document.getElementsByName(fm)[0]; form.kind.value = "update"; form.SD.value = "3"; form.action = fol+filelink; form.method = "POST"; form.submit(); } function check_del_form_front_passwd(fm,fol,filelink) { var form = document.getElementsByName(fm)[0]; form.kind.value = "del"; form.SD.value = "4"; form.action = fol+filelink; form.method = "POST"; form.submit(); } function check_img(obj) { document.getElementById("repembedimg").src = obj; document.getElementsByName("popimg")[0].value = obj; } function check_popup_img() { open_window_center("","product_pop","510","510","no"); setTimeout(check_popup_img_submit,1000); } function check_popup_img_submit() { var fm = document.getElementsByName("regproductfm")[0]; fm.method="POST"; fm.target="product_pop"; fm.action="product_pop.html"; fm.submit(); } }