/************************************************* 회원가입창 오픈 *************************************************/ function openRegister() { WinPop("/6_etc/2_register.asp", "WinRegister", 730, 800, 3); } /************************************************* 회원정보수정창 *************************************************/ function openMyinfo() { WinPop("/6_etc/2_myinfo.asp", "WinRegister", 730, 800, 3); } /************************************************* 팝업 관련 함수 : 06/09/27 모든 팝업계열 함수를 Opt로 조절가능한 함수로 통합, 이미지팝업 별도 추가 *************************************************/ function WinPop(Url, Name, Width, Height, Opt) { if (Opt == 1) {var OptV=',toolbar=no,location=no,directories=no,status=no,menuBar=no,scrollBars=no,resizable=no';} //모든조건 no else if (Opt == 2){var OptV=',toolbar=no,location=no,directories=no,status=no,menuBar=no,scrollBars=no,resizable=auto';} //사이즈조절만 가능 else if (Opt == 3){var OptV=',toolbar=no,location=no,directories=no,status=no,menuBar=no,scrollBars=yes,resizable=no';} //스크롤바만 가능 else if (Opt == 9){var OptV=',toolbar=yes,location=yes,directories=yes,status=yes,menuBar=yes,scrollBars=yes,resizable=yes';} //스크롤바만 가능 var Option='width=' + Width + ',height=' + Height + OptV; // alert(Url + "\n" + Name + "\n" + Option); winup=window.open(Url, Name, Option); if (!winup) { for (i=0;i<3 ;i++ ) {setTimeout(WinPop(Url, Name, Width, Height, Opt),500);} alert('팝업 차단을 허용해 주세요.'); } else {winup.focus();} } /************************************************* 타입체크 관련 함수 *************************************************/ var Alpha="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" ; var Num="0123456789" ; var PhoneNum="(+-),. " + Num; var Alnum=Alpha + Num +"-_"; var Special="`~!@#$%^&*()-_=+|,.<>;:?/\"'{}[]\\"; function alNumCheck (str) { for (k = 0; k < str.length; k++) { tmp = str.charAt(k); if (Alnum.indexOf (tmp) == -1) { return true; } } return false; } function checkSpecialChar(expression){ var strSpecial = " `~!@#$%^&*()_+|\;\\/:=-<>.'\" "; for(i=0;i=0; i--){ if(str.substr(i,1) == " ") end--; else break; } if(end < 0) return ""; else return str.substring(start, end+1); } /************************************************* iFrame 크기조절관련 함수 *************************************************/ function syncHeight(el) { el.height = eval(el.name+".document.body.scrollHeight"); } //======================================================================================== // IE설계변경에 따른 ActiveX 사용 코드 변경 함수 : EMBED 태그 타입에는 모두 적용가능 //======================================================================================== // 06/09/27 미디어플레이어 속성값 설정 소스 및 파라미터 설명 추가 // 각각의 값은 1(true) 이면 보이고 0(false) 이면 보이지 않는다. // // [타입설정] // 확장자 : wmv : type=video/x-ms-wmv // 확장자 : asf : type=video/x-ms-asf // 확장자 : avi : type=video/x-ms-avi // 확장자 : 플래쉬 : type=application/x-ms-wmv // 확장자 : 윈도우미디어플레이어 mplayer로 설정 : type=application/x-mplayer2 // [파라미터의 속성-플러그인과 함께 쓰이는 속성] // SHOWCONTROLS : 재생버튼 등이 있는 일반적인 컨트롤박스 // SHOWSTATUS BAR : 다운로드바, 용량, 시간 등을 나타내주는 상태박스 // SHOWDISPLAY : 재생목록을 보여주는 재생목록박스 // SHOWGOTOBAR // // [EMBED 태그 속성] // WIDTH / HEIGHT : 이걸 꼭 설명해야 돼냐..--;; // AUTOSTART : 자동실행, 1 이면 자동실행 // PLAYCOUNT : 재생(가능)횟수 : wm9버젼용 // LOOP : 반복횟수, 1 이면 무한반복 // VOLUME : 볼륨, 0~100%, 0 이면 볼륨최대 // HIDDEN : 콘솔감추기, true 면 보이지 않는다. // AOTOSIZE : 화면크기가 파일 고유으ㅟ 사이지로 될지 여부 // TRANSPARENTATSTART : 버퍼링시 윈도우 로고를 보여줄 지 여부, 1 이면 보여줌 // EnableContextMenu : 메뉴금지여부, 0 이면 금지. 결론적으로 마우스 우측클릭 금지 // invokeURLS : URL을 윈도우미디어플레이어에 보내면 자동으로 컨트롤하여 스크립트 명령 이벤트를 패스한 후 브라우저에 미디어파일의 주소를 호출 할지 말지를 체크. 즉 미디어 파일의 주소(URL) 타입의 값이 true 이면 호출하고 false이면 호출하지 않음. 결과적으로 파일의 주소가 잘못 또는 변경되거나 찾을 수 없는 경우 EMBED 소스가 적용된 웹페이지의 로딩속도에 도움이 됨 // // [색상입히기] // style='filter:gray() 또는 filter:xray()' : 각각 회색(실버)톤 검정메탈톤으로 스킨 변함 //======================================================================================== function MakeFlashString(source,id,width,height,wmode, otherParam) { return ""+otherParam+""; } function MakeMovingString(source,width,height) { return ""; //컨트롤박스, 상태박스가 보인다. } function DocumentWrite(src) { document.write(src); } /************************************************* 영수증 인쇄 - 신용카드 *************************************************/ function printReceipt(para_No) { // 카드결제, 계좌이 if (para_No=="") { alert("거래번호가 정확하지 않습니다."); return; } var tmpUrl; tmpUrl = "" // tmpUrl = "https://admin.kcp.co.kr/Modules/Sale/Card/ADSA_CARD_BILL_Receipt.jsp?c_trade_no=" + para_No; // window.open(tmpUrl, "receipt_print", "width=450,heigth=730,toolbar=no, scrollbars=no, status=no, resizable=yes"); tmpUrl = "https://admin8.kcp.co.kr/assist/bill.BillAction.do?cmd=card_bill&c_trade_no=" + para_No; window.open(tmpUrl , "receipt_print", "width=470, height=815"); } /***************************************************** 현금영수증 인쇄 - 계좌이체, 가상계좌 입금 site_cd ordr_idxx : 주문번호 cash_yn : 현금영수증여부, 현금영수증 등록 여부 cash_authno : 현금 영수증 승인 번호 *****************************************************/ function printCashReceipt(site_cd, order_id, bill_yn, auth_no) { // 계좌이체, 현금영수증 // alert(site_cd + "\n" + order_id + "\n" + bill_yn + "\n" + auth_no); // if (para_No=="") { if (order_id=="") { alert("거래번호가 정확하지 않습니다."); return; } else { receiptWin2 = "https://admin.kcp.co.kr/Modules/Service/Cash/Cash_Bill_Common_View.jsp"; receiptWin2 += "?"; receiptWin2 += "term_id=PGNW" + site_cd + "&"; receiptWin2 += "orderid=" + order_id + "&"; receiptWin2 += "bill_yn=" + bill_yn + "&"; receiptWin2 += "authno=" + auth_no ; // alert(receiptWin2); window.open(receiptWin2 , "" , "width=450, height=670"); } } function printReceipt1(approvalno, orderno) { // 현금영수증 // alert(approvalno + " / " + orderno); if ((approvalno=="") || (orderno=="")) { alert("거래번호가 정확하지 않습니다."); return; } else { var tmpUrl; tmpUrl = "" tmpUrl = "https://admin.kcp.co.kr/Modules/Service/Cash/Cash_Bill_Common_View.jsp?term_id=PGNWT0000&oRderid=" + orderno + "&bill_yn=N&authno=" + approvalno; window.open(tmpUrl, "receipt_print", "width=450,heigth=730,toolbar=no, scrollbars=no, status=no, resizable=yes"); } } /************************************************* 프린트 영역 지정 함수 : 2012.03.08 kbh0007 *************************************************/ var initBody; function beforePrint() { initBody = document.body.innerHTML; document.body.innerHTML = idPrint.innerHTML; } function afterPrint() { document.body.innerHTML = initBody; } function printArea() { window.print(); } window.onbeforeprint = beforePrint; window.onafterprint = afterPrint; /* $(window).load(function() { // 로딩되기 시작할때 }); $(document).ready(function() { // 모두 로딩되었을때 }); */ function setCookie( name, value, expiredays ) { var todayDate = new Date(); todayDate.setDate( todayDate.getDate() + expiredays ); document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" } function getCookie(name) { var nameOfCookie = name + "="; var x = 0; while ( x <= document.cookie.length ) { var y = (x+nameOfCookie.length); if ( document.cookie.substring( x, y ) == nameOfCookie ) { if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 ) endOfCookie = document.cookie.length; return unescape( document.cookie.substring( y, endOfCookie ) ); } x = document.cookie.indexOf( " ", x ) + 1; if ( x == 0 ) break; } return ""; }