function fn_incenter(a_code,a_class,a_jisa){ $(".li_class").removeClass("active"); $("#group_code_"+a_class).addClass("active"); jisa_network_info(a_jisa); } function jisa_network_info(p_jisaCode){ $("#group_name").empty(); $("#intro_text").empty(); $("#group_address").empty(); $("#group_roadaddr").empty(); $("#group_roadmap").empty(); $("#group_tel").empty(); $("#group_fax").empty(); $("#group_mail").empty(); $("#group_24tel").empty(); $("#group_pic").empty(); $("#group_pic_gallery").empty(); $("#group_mapimg").empty(); $("#addr_tooltip").empty(); $("#group_sns").empty(); var tmp_pic1,tmp_pic2,tmp_pic3,tmp_pic4,tmp_pic5,tmp_pic6,tmp_pic7,tmp_pic8,tmp_pic9,tmp_pic10,tmp_pic11,tmp_pic12,g_sns tmp_pic1=""; tmp_pic2=""; tmp_pic3=""; tmp_pic4=""; tmp_pic5=""; tmp_pic6=""; tmp_pic7=""; tmp_pic8=""; tmp_pic9=""; tmp_pic10=""; tmp_pic11=""; tmp_pic12=""; var param = 'group_code='+ p_jisaCode; $.ajax({ url: '/service/user_support/svc_network.asp', type: 'POST', data: param, dataType: 'json', //timeout: 3000, error: function(p_req, p_status, p_err) { alert("["+ p_status + "]"+"지사정보 연결중 오류가 발생되었습니다."); }, success: function(p_data) { if(dvf_ISNULL(p_data.group_name, "") != ""){$("#group_name").html(p_data.group_name);};if(dvf_ISNULL(p_data.intro_text, "") != ""){$("#intro_text").html(unescape(p_data.intro_text));};if(dvf_ISNULL(p_data.group_address, "") != ""){$("#group_address").html("주소 : "+unescape(p_data.group_address));};if(dvf_ISNULL(p_data.group_roadaddr, "") != ""){$("#group_roadaddr").html("도로명 주소 : "+unescape(p_data.group_roadaddr));};if(dvf_ISNULL(p_data.group_pure_addr, "") != ""){$("#addr_tooltip").html("주소 : "+unescape(p_data.group_pure_addr));};if(dvf_ISNULL(p_data.group_roadmap, "") != ""){$("#group_roadmap").html("오시는길 : "+unescape(p_data.group_roadmap));};if(dvf_ISNULL(p_data.group_tel, "") != ""){$("#group_tel").html("Tel : "+unescape(p_data.group_tel));};if(dvf_ISNULL(p_data.group_fax, "") != ""){$("#group_fax").html("Fax : "+unescape(p_data.group_fax));};if(dvf_ISNULL(p_data.group_mail, "") != ""){$("#group_mail").html("E-Mail : "+unescape(p_data.group_mail));};if(dvf_ISNULL(p_data.KAKAO_ID, "") != ""){$("#kakao_id").prop("href",unescape(p_data.KAKAO_ID));};if(dvf_ISNULL(p_data.group_24tel, "") != ""){$("#group_24tel").html("24시간 상담전화 : "+unescape(p_data.group_24tel));};if(dvf_ISNULL(p_data.g_sns, "") != ""){$("#group_sns").html(""+unescape(p_data.g_sns));};$("#group_fair").html(""); if(dvf_ISNULL(p_data.group_pic1, "") != ""){ //센터 전경 이미지 tmp_pic1 = ""; } if(dvf_ISNULL(p_data.group_pic2, "") != ""){ // tmp_pic2 = ""; } if(dvf_ISNULL(p_data.group_pic3, "") != ""){ // tmp_pic3 = ""; } if(dvf_ISNULL(p_data.group_pic4, "") != ""){ // tmp_pic4 = ""; } if(dvf_ISNULL(p_data.group_pic5, "") != ""){ // tmp_pic5 = ""; } if(dvf_ISNULL(p_data.group_pic6, "") != ""){ // tmp_pic6 = ""; } if(dvf_ISNULL(p_data.group_pic7, "") != ""){ // tmp_pic7 = ""; } if(dvf_ISNULL(p_data.group_pic8, "") != ""){ // tmp_pic8 = ""; } if(dvf_ISNULL(p_data.group_pic9, "") != ""){ // tmp_pic9 = ""; } if(dvf_ISNULL(p_data.group_pic10, "") != ""){ // tmp_pic10 = ""; } if(dvf_ISNULL(p_data.group_pic11, "") != ""){ // tmp_pic11 = ""; } if(dvf_ISNULL(p_data.group_pic12, "") != ""){ // tmp_pic12 = ""; } $("#group_pic").html(""); fn_gallery(); //갤러리 호출 fn_googleMap(p_data.group_pure_addr,p_jisaCode); jisa_network_info2(p_jisaCode); } }); } function fn_googleMap(realAddr,jcode) { var swzoom = 17; var geocoder = new google.maps.Geocoder(); if (jcode == '12' || jcode == '527'){ swzoom = 19; } if (jcode == '465'){ //realAddr = '전라북도 전주시 덕진구 중동 778-2 씨앤알코스메틱스(주)'; } geocoder.geocode( { 'address': realAddr}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { var latlng = new google.maps.LatLng(37.4927509, 127.0342735); var mapOptions = {zoom: swzoom, center: latlng} var map = new google.maps.Map(document.getElementById('group_mapimg'), mapOptions); map.setCenter(results[0].geometry.location); var infowindow = new google.maps.InfoWindow({}); var marker = new google.maps.Marker({map: map, position: results[0].geometry.location }); infowindow.setContent('유학네트 ' + $("#group_name").text() + '
' + $("#addr_tooltip").text()); infowindow.open(map, marker); }else{ return false; } }); } function fn_gallery(){ $("area[rel^='prettyPhoto']").prettyPhoto(); $(".gallery:first a[rel^='prettyPhoto']").prettyPhoto({animation_speed:'normal',theme:'light_square',slideshow:3000, autoplay_slideshow: false}); $(".gallery:gt(0) a[rel^='prettyPhoto']").prettyPhoto({animation_speed:'fast',slideshow:10000, hideflash: true}); $("#custom_content a[rel^='prettyPhoto']:first").prettyPhoto({ changepicturecallback: function(){ initialize(); } }); $("#custom_content a[rel^='prettyPhoto']:last").prettyPhoto({ changepicturecallback: function(){ _bsap.exec(); } }); } //클릭된 삭제버튼(a link 의 data-whatever값) 데이터를 저장해둠 $('#gallery').on('show.bs.modal', function (event) { var button = $(event.relatedTarget); var title = $(button).parents(".tab-pane").find(".tab-title").html(); $("#title").html(title); }); function jisa_network_info2(p_jisaCode){ $("#intro_text").empty(); var url='/service/user_support/svc_intro.asp?group_code='+ p_jisaCode; xmlHttp=GetXmlHttpObject(); xmlHttp.onreadystatechange = function(){ if (xmlHttp.readyState==4){ if (xmlHttp.status == 200){ replaceMsg = xmlHttp.responseText; document.getElementById("intro_text").innerHTML=replaceMsg; }else{ alert("listSearch_callback===>state is "+xmlHttp.status); } }else{ document.getElementById("intro_text").innerHTML=""; } }; xmlHttp.open("POST",url,true); xmlHttp.send(); } function GetXmlHttpObject(){var xmlHttp=null;try{xmlHttp=new XMLHttpRequest()}catch(e){try{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")}};return xmlHttp}