function checkboxAllSelect(obj_all_select) { var obj_select_data = Common.getObj('select_data[]', 'name'); var count = obj_select_data.length; for(var x=0; x 0) payment_name[0].setAttribute('chk','y'); //Common.getObj('payment_name', 'name')[0].chk = 'y'; Common.getObj('payment_info_bank').style.display = 'block'; Common.getObj('payment_info_card').style.display = 'none'; try { Common.getObj('agree_payment').style.display = 'block'; } catch (e) {} frm.repeatChk.value = ''; break; case 'card': //Common.getObj('payment_name', 'name')[0].chk = 'n'; var payment_name = document.getElementsByName('payment_name'); if(payment_name.length > 0) payment_name[0].setAttribute('chk','n'); Common.getObj('payment_info_bank').style.display = 'none'; Common.getObj('payment_info_card').style.display = 'block'; Common.getObj('payment_info_card').innerHTML = "½Å¿ëÄ«µå °áÁ¦ÀÔ´Ï´Ù. '°áÁ¦Çϱâ' ¹öÆ°À» ´­·¯ÁÖ¼¼¿ä."; try { Common.getObj('agree_payment').style.display = 'none'; } catch (e) {} break; case 'hpp': //Common.getObj('payment_name', 'name')[0].chk = 'n'; var payment_name = document.getElementsByName('payment_name'); if(payment_name.length > 0) payment_name[0].setAttribute('chk','n'); Common.getObj('payment_info_bank').style.display = 'none'; Common.getObj('payment_info_card').style.display = 'block'; Common.getObj('payment_info_card').innerHTML = "ÈÞ´ëÆù °áÁ¦ÀÔ´Ï´Ù. '°áÁ¦Çϱâ' ¹öÆ°À» ´­·¯ÁÖ¼¼¿ä."; break; case 'vbank': //Common.getObj('payment_name', 'name')[0].chk = 'n'; var payment_name = document.getElementsByName('payment_name'); if(payment_name.length > 0) payment_name[0].setAttribute('chk','n'); Common.getObj('payment_info_bank').style.display = 'none'; Common.getObj('payment_info_card').style.display = 'block'; Common.getObj('payment_info_card').innerHTML = "¿¡½ºÅ©·Î(°¡»ó°èÁÂ) °áÁ¦ÀÔ´Ï´Ù. '°áÁ¦Çϱâ' ¹öÆ°À» ´­·¯ÁÖ¼¼¿ä."; try { Common.getObj('agree_payment').style.display = 'block'; } catch (e) {} break; } /* switch(type) { case 'bank': Common.getObj('payment_name', 'name')[0].chk = 'y'; Common.getObj('payment_info_bank').style.display = ''; Common.getObj('payment_info_card').style.display = 'none'; break; case 'card': Common.getObj('payment_name', 'name')[0].chk = 'n'; Common.getObj('payment_info_bank').style.display = 'none'; Common.getObj('payment_info_card').style.display = ''; break; } */ } function orderAct(url) { orderAct2(url); } function createForm() { var orgFrm = document.com_member; var orgFrmElements = orgFrm.getElementsByTagName('*'); if(document.getElementById('hiddenPaymentForm') == null) { var formObj = document.createElement('form'); formObj.id = 'hiddenPaymentForm'; formObj.name = 'hiddenPaymentForm'; document.body.appendChild(formObj); } formObj= document.getElementById('hiddenPaymentForm'); formObj.innerHTML = ''; for(var i= 0; i < orgFrmElements.length; i++ ) { var tag = orgFrmElements[i].tagName.toLowerCase(); switch(tag){ case 'input': switch(orgFrmElements[i].type.toLowerCase()) { case 'checkbox': case 'radio': //var value = (orgFrmElements[i].checked==true) ? orgFrmElements[i].value : null; if(orgFrmElements[i].checked==true) { var value = orgFrmElements[i].value; var elements = document.createElement('input'); elements.type = 'hidden'; elements.name = orgFrmElements[i].name; elements.value = value; formObj.appendChild(elements); } break; default: var value = orgFrmElements[i].value; var elements = document.createElement('input'); elements.type = 'hidden'; elements.name = orgFrmElements[i].name; elements.value = value; formObj.appendChild(elements); break; } break; case 'textarea': var elements = document.createElement('textarea'); var value = orgFrmElements[i].value; elements.style.display = 'none'; elements.name = orgFrmElements[i].name; elements.value = value; formObj.appendChild(elements); break; case 'select': var index = orgFrmElements[i].selectedIndex; var value = (index >= 0) ? orgFrmElements[i].options[index].value : null; var elements = document.createElement('input'); elements.type = 'hidden'; elements.name = orgFrmElements[i].name; elements.value = value; formObj.appendChild(elements); break; } } return formObj; } function orderDeliveryAct(form) { // 1588 µî°ú °°ÀÌ ¾Õ¹øÈ£°¡ 4ÀÚ¸®Àΰæ¿ì´Â 8ÀÚ¸®±îÁö¸¸ üũ var tel1 = Common.getObj('rphone_01').value; if (tel1.length > 3) { Common.getObj('rphone_03').chk='n'; } var form_check_result = FormCheck.init(form.name); if(form_check_result == false) return false; if(document.getElementsByName('zipcode_02')[0]) { var elementName = ['rname', 'zipcode_01', 'zipcode_02', 'address', 'address_01', 'rphone_01', 'rphone_02', 'rphone_03', 'rmobile_01', 'rmobile_02', 'rmobile_03']; } else { var elementName = ['rname', 'zipcode_01', 'address', 'address_01', 'rphone_01', 'rphone_02', 'rphone_03', 'rmobile_01', 'rmobile_02', 'rmobile_03']; } SSL.send({ 'formName' : form.name ,'elementName' : elementName ,'postName' : 'ssl_encode' }); return false; } function repaymentAct(form) { var form_check_result = FormCheck.init(form.name); if(form_check_result == false) return false; SSL.send({ 'formName' : form.name ,'elementName' : ['repayment_bank', 'repayment_bank_number', 'repayment_depositor'] ,'postName' : 'ssl_encode' }); return false; } function orderAct2(url) { var frm = document.com_member; if(frm.repeatChk == null) { // Áߺ¹ Ŭ¸¯À» ¸·±â À§ÇØ try { var inputObj = document.createElement(''); } catch (e) { var inputObj = document.createElement('input'); inputObj.type="hidden"; inputObj.name="repeatChk"; inputObj.value=''; } frm.appendChild(inputObj); } if(frm.repeatChk.value == 1 && document.getElementsByName('payment_type')[0].checked == true) { alert('ó¸®ÁßÀÔ´Ï´Ù.'); } else { // 1588 µî°ú °°ÀÌ ¾Õ¹øÈ£°¡ 4ÀÚ¸®Àΰæ¿ì´Â 8ÀÚ¸®±îÁö¸¸ üũ var tel1 = Common.getObj('rphone_01').value; if (tel1.length > 3) { Common.getObj('rphone_03').chk='n'; } var tel2 = Common.getObj('ophone_01').value; if (tel2.length > 3) { Common.getObj('ophone_03').chk='n'; } var form_check_result = FormCheck.init('com_member'); if(form_check_result == false) return false; if (typeof(frm.agree) == 'object') { var agree = Common.getObj('agree'); if(agree.checked == false) { alert('ºñȸ¿ø ±¸¸Å ¹× °áÁ¦ °³ÀÎÁ¤º¸º¸È£Á¤Ã¥¿¡ µ¿ÀÇÇÏ¼Å¾ß ÇÕ´Ï´Ù.'); return false; } } //°áÁ¦¼ö´Ü üũ if(frm.payment_type.length == undefined) { if(frm.payment_type.checked == true) { paymentTypeVal = frm.payment_type.value; } } else { for(var i=0; i < frm.payment_type.length; i++) { if(frm.payment_type[i].checked == true) { paymentTypeVal = frm.payment_type[i].value; break; } } } /* pg ·ÎÄÃÈ­·Î ¼öÁ¤ÇÑ ºÎºÐ start*/ if(paymentTypeVal == '') { alert('°áÁ¦¹æ¹ýÀ» ¼±ÅÃÇØÁÖ¼¼¿ä.'); return false; } if(paymentTypeVal != 'bank') { if(document.getElementById('builderPgName')) { switch(document.getElementById('builderPgName').value) { case 'inicis': if(document.INIpay == null || document.INIpay.object == null) { alert("\nÀÌ´ÏÆäÀÌ Ç÷¯±×ÀÎ ¼³Ä¡µÇÁö ¾Ê¾Ò½À´Ï´Ù. \n\n¾ÈÀüÇÑ °áÁ¦¸¦ À§ÇÏ¿© ÀÌ´ÏÆäÀÌ Ç÷¯±×ÀÎÀÇ ¼³Ä¡°¡ ÇÊ¿äÇÕ´Ï´Ù. \n\n´Ù½Ã ¼³Ä¡ÇϽ÷Á¸é Ctrl + F5Å°¸¦ ´©¸£½Ã°Å³ª ¸Þ´ºÀÇ [º¸±â/»õ·Î°íħ]À» ¼±ÅÃÇÏ¿© ÁֽʽÿÀ."); return false; } break; } } } try { if(document.getElementById('agree_payment').style.display != 'none' && document.getElementById('check_agree_order').checked == false) { alert('±¸¸ÅÁøÇà µ¿ÀÇ¿¡ üũÇØ ÁÖ¼¼¿ä.'); return false; } } catch (e) {} if(document.iframe_payment == undefined) { var ifrObj = document.createElement('iframe'); ifrObj.name = 'iframe_payment'; ifrObj.style.display = 'none'; document.body.appendChild(ifrObj); } var paymentForm = createForm(); //paymentPopupWin = window.open("", "paymentPopup", "width=450, height=600"); //paymentPopupWin.focus(); paymentForm.action = '/chtml/pg/pg_payment_ecshop_order_exe.php'; // paymentForm.target = '_new'; paymentForm.method = 'post'; frm.repeatChk.value = 1; if(document.getElementsByName('ozipcode_02')[0] && document.getElementsByName('zipcode_02')[0]) { var elementName = ['oname', 'ozipcode_01', 'ozipcode_02', 'oaddress_01', 'oaddress_02', 'ophone_01', 'ophone_02', 'ophone_03', 'omobile_01', 'omobile_02', 'omobile_03', 'omail', 'rname', 'zipcode_01', 'zipcode_02', 'address', 'address_01', 'rphone_01', 'rphone_02', 'rphone_03', 'rmobile_01', 'rmobile_02', 'rmobile_03', 'payment_name']; } else { var elementName = ['oname', 'ozipcode_01', 'oaddress_01', 'oaddress_02', 'ophone_01', 'ophone_02', 'ophone_03', 'omobile_01', 'omobile_02', 'omobile_03', 'omail', 'rname', 'zipcode_01', 'address', 'address_01', 'rphone_01', 'rphone_02', 'rphone_03', 'rmobile_01', 'rmobile_02', 'rmobile_03', 'payment_name']; } SSL.send({ // 'formName' : paymentForm.name 'idName' : paymentForm.id ,'elementName' : elementName ,'postName' : 'ssl_encode' }); return false; /* if(paymentTypeVal == 'bank') { var com_member = document.com_member; com_member.action = url+'&mode=paymentAct'; frm.repeatChk.value = 1; if(typeof(gRelay) != "undefined") { gRelay.relayForm(frm); } com_member.submit(); } else if(paymentTypeVal == 'card'){ frm.repeatChk.value = 1; // ================== Ä«µå °áÁ¦ ½ÃÀÛ =========================================== var result_url = (url.indexOf('?') > 0) ? url+'&mode=tempPaymentAct' : url+'?mode=tempPaymentAct'; Payment.main('com_member', result_url); // ================== Ä«µå °áÁ¦ ³¡ =========================================== return false; } else { alert('°áÁ¦¼ö´Ü ¼±ÅÃÀÌ À߸øµÇ¾ú½À´Ï´Ù.'); return false; } */ } } function calendar(id) { $(document).ready(function(){$("#"+id).datepicker({dateFormat: "yy-mm-dd", showOn: "both", buttonImage: "/cjs/jquery/images/calendar.gif", buttonImageOnly: true, clearText: "ÃʱâÈ­", closeText: "´Ý±â", currentText: "¿À´Ã", prevText: "ÀÌÀü´Þ", nextText: "´ÙÀ½´Þ", monthNames: ["1¿ù","2¿ù","3¿ù","4¿ù","5¿ù","6¿ù","7¿ù","8¿ù","9¿ù","10¿ù","11¿ù","12¿ù"], dayNamesMin: ["ÀÏ", "¿ù", "È­", "¼ö", "¸ñ", "±Ý", "Åä"] })}); } function ch_img(biz_imgpath, file_name,img_width,img_height,large_file_name,p_code,p_name,p_size,p_money,content){ if(navigator.appVersion.indexOf('MSIE')>0) { document["middle_img"].filters.blendTrans.stop(); document["middle_img"].filters.blendTrans.Apply(); } document["middle_img"].src = biz_imgpath+"/component/ecshop/default/user_img/"+file_name; document["middle_img"].width = img_width; document["middle_img"].height = img_height; if(navigator.appVersion.indexOf('MSIE')>0) { document["middle_img"].filters.blendTrans.Play(); } } function tab_view(cini){ if ( cini == 'a'){ tab_a.style.display = "block"; tab_b.style.display = "none"; tab_c.style.display = "none"; } if (cini =='b'){ tab_a.style.display = "none"; tab_b.style.display = "block"; tab_c.style.display = "none"; } if (cini =='c'){ tab_a.style.display = "none"; tab_b.style.display = "none"; tab_c.style.display = "block"; } } // Çʼö¿É¼Ç¼±Åà ¿©ºÎ ¹Ýȯ // ____________________________________________________________________ function checkOptionSelected(obj_option) { if(typeof(obj_option) == 'object') { if(typeof(obj_option.getAttribute('chk')) == 'undefined') { if(obj_option.selectedIndex==0 && obj_option.value == 'undefined') return false; } else { if(obj_option.selectedIndex==0 && obj_option.getAttribute('chk') == 'y') return false; } } return true; } function buyAct(type, idx, url) { var order_form = document.order_form; var check_form_option = false; switch(type) { case 'buy': order_form.action = url+'&idx='+idx+'&mode=orderBasketAct&check_buy=1'; check_form_option = true; break; case 'basket': order_form.action = url+'&idx='+idx; check_form_option = true; break; case 'wish': order_form.action = url+'&idx='+idx; break; case 'basket_move': idx = idx.split(':'); order_form.action = url+'&idx='+idx[0]+'&basket_idx='+idx[1]; break; } if(check_form_option == true) { var optionIndex = Array('01', '02', '03', 'mix'); for (var i=0; i -1) { /* var price = txt.substring(txt.lastIndexOf('+')+1, txt.length); price = new String(price); var regex = /[^0-9]/g; price = price.replace(regex, ''); return trim(price); */ var price = new String(txt); //var regex = /\+ [0-9]{1,}[,][0-9]{1,}[,][0-9]{1,}/; var regex = /\+ [0-9,]{1,}/; var result = price.match(regex); if(result==null) { regex = /\+ [0-9]{1,}/; result = price.match(regex); if(result==null) result = 0; } } else { result = 0; } result = new String(result); result = result.replace(/\,|\+/g, ''); return trim(result); } // ¿É¼Ç°¡°Ý ÃßÃâ function getOptionPrice() { var result = 0; var option_price = 0; // º¹ÇÕÇü var goods_option = new Array(); for (var i=1; i<=3; i++) { goods_option[i] = document.getElementsByName('goods_option_0'+i)[0]; } // Á¶ÇÕÇü var goods_option_mix = document.getElementById('goods_option_mix'); // Á¶ÇÕÇü if (goods_option_mix) { result += parseInt(getPriceOnly(goods_option_mix.options[goods_option_mix.selectedIndex].text)); } // º¹ÇÕÇü else if (goods_option[1]) { for (i=1; i<=3; i++) { if (goods_option[i]) { option_price = parseInt(getPriceOnly(goods_option[i].options[goods_option[i].selectedIndex].text)); if (option_price>0) result += option_price; } } } return result; } // PHPÀÇ number_format°ú µ¿ÀÏÇÑ ±â´É function number_format(input){ var input = String(input); var reg = /(\-?\d+)(\d{3})($|\.\d+)/; if(reg.test(input)){ return input.replace(reg, function(str, p1,p2,p3){ return number_format(p1) + "," + p2 + "" + p3; } ); }else{ return input; } } // »óÇ° ÃÑ °áÁ¦±Ý¾× °è»ê function calcPriceResult() { var cnt = document.getElementById('order_count').value; var optionPrice = getOptionPrice(); var unitPrice = 0; if (optionPrice>0 && optionPrice!='NaN') unitPrice = parseInt(sell_price)+parseInt(optionPrice); else unitPrice = parseInt(sell_price); result_price = unitPrice * cnt; var price_result = document.getElementById('price_result'); if (result_price>0) price_result.innerHTML = number_format(result_price); else price_result.innerHTML = number_format(sell_price); } // Á¶ÇÕÇüÀÇ °æ¿ì hidden Çʵ忡 °ª ¼¼Æà function setOptionPrice() { var goods_option_mix = document.getElementById('goods_option_mix'); var selected_index = goods_option_mix.selectedIndex; document.getElementById('option_name_01').value = '¿É¼Ç'; document.getElementById('goods_option_01').value = goods_option_mix[selected_index].getAttribute('option_name'); } function searchFormCheck(formName){ if(FormCheck.init(formName) == true){ document.forms[formName].submit(); } }