function private_popup(formName){ f = formName; f = eval(f); if(f.private_check.checked == true) { win=window.open('/main/privacy_view/','private','width=552,height=510,left=420,top=200'); win.focus(); } } function quick_private_popup(formName){ f = formName ; f = eval(f) ; if(f.private_check.checked == true) { win=window.open('/main/privacy_view/quick/','private','width=552,height=510,left=420,top=200'); win.focus(); } } function private_popup2(chk){ if(chk == "Y") { win=window.open('/main/privacy_view/special/','private','width=552,height=510,left=420,top=200'); win.focus(); } } function dialogAjaxDefault(ajaxUrl, ajaxWidth, ajaxHeight) { Dialog.alert( { url : ajaxUrl, options : { method : 'get' } }, { className : 'default', width : ajaxWidth, height : ajaxHeight, closable : true, draggable : true, okLabel: 'none' }) } function displayFlash(src, width, height, id) { var flashDSP = "";document.write(flashDSP) } // 상품상세탭 셀렉트 로드페이지지정 function tab_subCTL(tName,scName,clickBtn){ var thistab = $(tName) var thisView = $(scName) var thisNoad = $(tName+" a") var tabNum = thistab.find("a").length-1 thisNoad.click(function() { clickBtn = $(this).index(); //alert(clickBtn) for (i = 0; i <= tabNum; i++){ if(i == clickBtn){ onName = thistab.find("a:eq("+clickBtn+") img").attr("src"); onImages = onName.replace("_off","_on"); thistab.find("a:eq("+clickBtn+") img").attr({src:onImages}); thisView.find(".bohum-text:eq("+clickBtn+")").css({"display":"block"}); }else{ offName = thistab.find("a:eq("+i+") img").attr("src"); if(offName.indexOf("_on")>-1){ offImage = offName.replace("_on","_off"); thistab.find("a:eq("+i+") img").attr({src:offImage}); thisView.find(".bohum-text:eq("+i+")").css({"display":"none"}); } } if(clickBtn == 3){ $(".bohum-details .bohum-right").css({"display":"none"}); }else{ $(".bohum-details .bohum-right").css({"display":"block"}); } } }) if(clickBtn == 3){ $(".bohum-details .bohum-right").css({"display":"none"}); }else{ $(".bohum-details .bohum-right").css({"display":"block"}); } //초기화 for (i = 0; i <= tabNum; i++) { offName = thistab.find("a:eq("+i+") img").attr("src").replace("_on.gif", "_off.gif"); thistab.find("a:eq("+i+") img").attr({ src: offName }) } $(".bohum-details .cont-list .bohum-text").css({"display":"none"}); onName = thistab.find("a:eq("+clickBtn+") img").attr("src").replace("_off.gif","_on.gif"); thistab.find("a:eq("+clickBtn+") img").attr({src:onName}) thisView.find(".bohum-text:eq("+clickBtn+")").css({"display":"block"}); } function product_tabCall(sTabnum){ //tab_subCTL(탭,탭컨텐츠,표시될번호 ) //alert("호출 상품탭메뉴번호 >"+sTabnum) tab_subCTL(".bohum-details .tab",".bohum-details .cont-list",sTabnum); } //무료상담신청 function open_layer_free_request(insur_code, category_code){ var url = "/insur/free_layer_open"; var data = "insur_code="+insur_code+"&category_code="+category_code; $.ajax({ type: "POST", url: url, data: data, success: function(result_data){ $('#free_request_area').html(""); $('#free_request_area').html(result_data); $("#free_request_area").dialog({ width:500, height:600, modal:true, draggable:false, resizable:false }); $('#free_request_area').siblings('div.ui-dialog-titlebar').remove(); } }); } //보험가입신청 function open_layer_join_request(insur_code, category_code){ var url = "/insur/join_request_layer_open"; var data = "insur_code="+insur_code+"&category_code="+category_code; $.ajax({ type: "POST", url: url, data: data, success: function(result_data){ $('#join_request_area').html(""); $('#join_request_area').html(result_data); $("#join_request_area").dialog({ width:510, height:650, modal:true, draggable:false, resizable:false }); $('#join_request_area').siblings('div.ui-dialog-titlebar').remove(); } }); } //sms 인증창 오픈 function open_sms_layer(customer_mobile, type) { $.validationEngine.closePrompt('.formError',true); $.ajax({ type: "POST", url: "/insur/get_auth_no", data: "", success: function(no){ $('#sms_area').load('/insur/set_auth_form', {'auth_no':no, 'customer_mobile':customer_mobile, 'type':type}); $("#sms_area").dialog({ width:450, height:300, modal:true, resizable:false }); $('#sms_area').siblings('div.ui-dialog-titlebar').remove(); } }); } //탭 자동 이동 function auto_tab(id1, id2, length) { if ($(id1).val().length == length) { $(id2).focus(); } } function set_blank(id, check_id) { $(id).val(""); $(check_id).val('Y'); } function show_small_loading(area){ $(area).html("
"); } //휴대폰 번호 선택 처리 function choice_hphone(choice_val){ $("#quick_customer_hphone1").val(choice_val); } //1차 보종 선택 처리 function choice_category(category_code){ $("#quick_category_code").val(category_code); } //성별 선택 처리 function choice_sex(choice_val){ $("#quick_customer_sex").val(choice_val); } //개인정보수집 동의 선택 처리 function choice_gather(form_name, target_gather){ var tmp_target_gather = "#"+target_gather; if($(tmp_target_gather).is(':checked')){ open_agreement(form_name,target_gather); } } /* 한글 입력체크 */ function onlyKorean(str){ /* var findStr = str.match(/[가-힣ㄱ-ㅣ]+/); if ( str == findStr )return true; else return false; */ var pattern = /([^가-힣\x20])/i; if (pattern.test(str)) return false; else return true; } /* 숫자 입력체크 */ function onlyNumber(str){ var findStr = str.match(/[0-9]+/); if ( str == findStr )return true; else return false; } /* 한글이외에 입력방지 */ function hangul(){ if((event.keyCode < 12592) || (event.keyCode > 12687)) event.returnValue = false } /* 숫자이외에 입력시 메세지 */ function numbersonly_msg(e, decimal) { if((event.keyCode>=48) && (event.keyCode<=57)) { return true; }else{ alert("숫자로 입력해 주시기 바랍니다."); return false; } } /* 숫자이외에 입력방지 */ function numbersonly(e, decimal) { var key; var keychar; if (window.event) { key = window.event.keyCode; } else if (e) { key = e.which; } else { return true; } keychar = String.fromCharCode(key); if ((key == null) || (key == 0) || (key == 8) || (key == 9) || (key == 13) || (key == 27)) { return true; } else if ((("0123456789").indexOf(keychar) > -1)) { return true; } else if (decimal && (keychar == ".")) { return true; } else return false; } //이메일 유효성 체크 function isemail(strValue){ var tmp = strValue.match("^[0-9A-Za-z._-]+@[0-9A-Za-z.-]+$"); if (tmp != strValue){ return false; } else { return true; } } //폼 리셋 function reset_frm(frmId){ $(frmId).each(function(){ this.reset(); }); } //탭 자동 이동 function auto_tab(id1, id2, length) { if ($(id1).val().length == length) { $(id2).focus(); } } //개인정보 처리방침 function open_privacy(view_flag) { window.open("/html/layer_popup/popup_privacy.html?view_flag="+view_flag,"PRIVACY","width=552,height=500,left=400,top=190,scrollbars=no"); } //개인정보수집 및 활용동의 function open_agreement(form_name,target_gather) { window.open("/html/popup_agreement.html?form_name="+form_name+"&target_gather="+target_gather,"AGREEMENT","width=552,height=510,left=400,top=190,scrollbars=no"); } //가입자 유의 상항 function open_insur_rule() { window.open("/html/layouts/layer_popup/popup_insur_rule.html","RULE","width=667,height=510,left=400,top=190,scrollbars=yes"); } function close_calculation_layer(){ $("#realtime_calculation_result").hide(); } //상단 실시간 보험료 function rt_tabCTL(rtTabnum){ var rt_main = $("#realtime-insurance"); var rt_layer = rt_main.find(".tab-bojong"); var rt_tab = rt_layer.find(">li").find(">a"); var rt_table = rt_layer.find(".rt-bohum"); $(document).ready(function(){ function rt_tabSel(){ t= $(this); rtTabnum =t.parent().index() rt_table.css({"display":"none"}) rt_layer.find(">li:eq("+rtTabnum+")").find(".rt-bohum").css({"display":"block"}); rt_tab.removeClass(); rt_tab.addClass("off"); t.removeClass(); t.addClass("on"); } rt_tab.focus(rt_tabSel).click(rt_tabSel) rt_main.find(".bohum-sel>a").mouseenter(function(){ t=$(this); var infoBox = t.parent("div"); n= t.index()/4+0.5 infoBox.find(".more-window01").css({"display":"none"}); infoBox.find(".plen0"+n).css({"display":"block"}); t.mouseleave(function(){ infoBox.find(".more-window01").css({"display":"none"}); }) }) }) rt_table.css({"display":"none"}) rt_layer.find(">li:eq("+rtTabnum+")").find(".rt-bohum").css({"display":"block"}); rt_tab.removeClass(); rt_tab.addClass("off"); rt_layer.find(">li:eq("+rtTabnum+")").find(">a").removeClass(); rt_layer.find(">li:eq("+rtTabnum+")").find(">a").addClass("on"); } function close_fee_rule() { $('#insur_fee_rule').hide(); }