/*!
 *===============================================================
 * MapKonest－맵코네스트／コネスト韓国地図／KONEST韩国地图
 *===============================================================
 */
var InfoWin;var InfoWinOpt="";var MAPURL=location.protocol+"//"+location.host;if(MAPURL.indexOf("map.konest.")<0){MAPURL="http://map.konest.com"}var WINIMG=MAP_RSC_SVR+"/img/mapwin";var currentMarkerZIndex=200;function makeKonestInfoWin(a){InfoWin=new FreeMapInfoWin();InfoWin.setPanning(true);a.addLayer(InfoWin,"InfoWin");InfoWin.setzIndex(5)}function getLabelContent(d,c,e){e=setUndefined(e,"lblWindow");var a=[];a.push("<div "+(e?" id="+e:"")+">");a.push("<table border=0 cellspacing=0 cellpadding=0>");a.push("	<tr>");a.push("		<td width=4 height=4 class=notxt><img src='MIMG/lbl_tl.png' class=png24 width=4 height=4 /></td>");a.push("		<td background='MIMG/lbl_bgt.png' class=png24bg></td>");a.push("		<td width=6 height=4 class=notxt><img src='MIMG/lbl_tr.png' class=png24 width=6 height=4 /></td>");a.push("	</tr>");a.push("	<tr valign=top>");a.push("		<td background='MIMG/lbl_bgl.png' class=png24bg></td>");a.push("		<td background='MIMG/lbl_bgc.gif' "+(e?"id=lblContent":"")+">"+d+"</td>");a.push("		<td background='MIMG/lbl_bgr.png' class=png24bg></td>");a.push("	</tr>");a.push("	<tr>");a.push("		<td height=6 class=notxt><img src='MIMG/lbl_bl.png' class=png24 width=4 height=6 /></td>");a.push("		<td background='MIMG/lbl_bgb.png' class=png24bg></td>");a.push("		<td class=notxt><img src='MIMG/lbl_br.png' class=png24 width=6 height=6 /></td>");a.push("	</tr>");a.push("</table>");if(c){a.push("<div id=lblArrow class=notxt><img src='MIMG/lbl_arr2.png' width=9 height=7 class=png24 /></div>")}a.push("</div>");var b=a.join("\n");b=b.replaceAll("MIMG",WINIMG);return b}function addjustLabelWindow(c){var b=document.getElementById("lblWindow");var d=document.getElementById("lblArrow");if(!b||!d){return}var a=b.clientWidth;var e=b.clientHeight;d.style.top=(e-3)+"px";d.style.left=Math.round(a/2)-4+"px"}FreeMapMarker.prototype.showTooltip=function(){var a=getLabelContent(this.getContents(),true);this.setInfoWinOffset(new FreeMapPoint(0,-2));this.fixInfoWinPos();this.showInfoWindow(a,true);addjustLabelWindow();InfoWin.setPanning(true);this.getParentObj().getInfoWin().setPanning(true)};FreeMapMarker.prototype.hideTooltip=function(){this.hideInfoWindow()};function getWindowContent(e,d,b){b=setUndefined(b,"infoWindow");var a=[];a.push("<div "+(b?" id="+b:"")+">");a.push("<table border=0 cellspacing=0 cellpadding=0>");a.push("	<tr>");a.push("		<td width=6 height=5 class=notxt><img src='MIMG/iwin_tl.png' class=png24 width=6 height=5 /></td>");a.push("		<td background='MIMG/iwin_bgt.png' class=png24bg></td>");a.push("		<td width=8 class=notxt><img src='MIMG/iwin_tr.png' class=png24 width=8 height=5 /></td>");a.push("	</tr>");a.push("	<tr valign=top>");a.push("		<td background='MIMG/iwin_bgl.png' class=png24bg></td>");a.push("		<td background='MIMG/iwin_bgc.gif' "+(b?"id=infoContent":"")+">"+e+"</td>");a.push("		<td background='MIMG/iwin_bgr.png' class=png24bg></td>");a.push("	</tr>");a.push("	<tr>");a.push("		<td height=8 class=notxt><img src='MIMG/iwin_bl.png' class=png24 width=6 height=8 /></td>");a.push("		<td background='MIMG/iwin_bgb.png'></td>");a.push("		<td class=notxt><img src='MIMG/iwin_br.png' class=png24 width=8 height=8 /></td>");a.push("	</tr>");a.push("</table>");if(d){a.push("<div id=infoArrow class=notxt><img src='MIMG/iwin_arr.png' width=40 height=21 class=png24 /></div>")}if(d){a.push("<div id=infoClose><img style='cursor:pointer;' onclick='closeInfoWindow();' title='閉じる' src='MIMG/iwin_close2.png' width=15 height=14 class=png24 /></div>")}a.push("</div>");var c=a.join("\n");c=c.replaceAll("MIMG",WINIMG);return c}function closeInfoWindow(a){a=setUndefined(a,true);var b=FreemapObj.getLayer("InfoWin");b.hide();b.setContents("");b.setDisableMouseDownEvent(false);$("#INFOTEMP").empty();if(a){FreemapObj.removeKeyLayers("BMK")}gIsPointing=false;FreeMapEvent.trigger(FreemapObj,"infowinclose",b)}function addjustInfoWindow(){var b=document.getElementById("infoWindow");var c=document.getElementById("infoArrow");var e=document.getElementById("infoClose");if(!b||!c||!e){return}var a=b.clientWidth;var d=b.clientHeight;e.style.left=(a-25)+"px";c.style.top=(d-6)+"px";c.style.left=Math.round(a/2)-20+"px"}function dispKonestInfo(b){var d=$("#INFOTEMP").html();$("#INFOTEMP").empty();var c=FreemapObj.getLayer("InfoWin");var a=getWindowContent(d,true);c.setContents(a);c.show();if(a.indexOf("SCROLL1")>=0){c.setDisableMouseDownEvent(true)}addjustInfoWindow();FreeMapEvent.trigger(FreemapObj,"infowinopen",c);if(gInitProc&&gInitProc==true){execInitProc()}if(b&&b.t&&b.k){}}function openKonestInfo(a,f,b,d){if(!checkPointing()){return}var e=FreemapObj.getLayer("InfoWin");e.setOffset(new FreeMapPoint(0,-12));e.setMarkerSize(new FreeMapSize(0,0));e.setPosition(new FreeMapPoint(a,f));var c="/svc/_info_konest_total.html";$("#INFOTEMP").load(c,{t:b,k:d,x:a,y:f,l:FreemapObj.getZoomLevel(),opt:InfoWinOpt},function(){dispKonestInfo(null)})}FreeMapMarker.prototype.showKonestInfoWindow=function(){if(!checkPointing()){return}this.hideTooltip();this.setZindexTemp(currentMarkerZIndex++);if(this.fm_event_click&&this.konType&&(this.konType!=""&&this.konID!="")){var a=this;var d=a.getPoint();var b="/svc/_info_konest_total.html";var e={t:this.konType,k:this.konID,x:d.x,y:d.y,l:FreemapObj.getZoomLevel(),opt:InfoWinOpt};var c=this.getParentObj().getLayer("InfoWin");c.hide();c.setContents("");c.setOffset(new FreeMapPoint(0,-12));c.fixInfoWinPos(this);c.setMarkerSize(a.getSize());c.setPosition(d);$("#INFOTEMP").load(b,e,function(){dispKonestInfo(a)})}else{this.showTooltip()}};FreeMapMarker.prototype.hideKonestInfoWindow=function(){if(!checkPointing()){return}this.setZindexOrg();this.mkIconTag.style.zIndex=this.mkZIndex;this.getParentObj().getLayer("InfoWin").hide();this.getParentObj().getLayer("InfoWin").setContents("")};FreeMapMarker.prototype.setKonestMarker=function(b,a){this.konType=b;this.konID=a};FreeMapMap.prototype.getKonestMarker=function(d,b){var a=this.getArrayMarker();if(a&&a.length>0){for(var c=0;c<a.length;c++){if(a[c].makerKey=="MK"&&a[c].konType){if(a[c].konType==d&&a[c].konID==b){return a[c]}}}}return null};function getInfowinData(f){f=setUndefined(f,true);var e=FreemapObj.getLayer("InfoWin");var k=FreemapObj.getCenter();var b={InfoType:"",InfoID:"",InfoCX:0,InfoCY:0,MapCX:k.x,MapCY:k.y,MapLevel:FreemapObj.getZoomLevel()};if(!e.isShow()){return b}var h=e.getPosition();b.InfoCX=h.x;b.InfoCY=h.y;if(f){if(!(typeof gMapLevel=="undefined"||typeof gMapX1=="undefined")){var j=e.getInfoDiv().childNodes[0].childNodes[0].clientHeight;var g=e.getPosition();var d=g.x;var c=g.y+FreemapObj.distancePerPixel(gMapLevel)*(j/2);if(d<gMapX1||d>gMapX2||c<gMapY1||c>gMapY2){return b}}}var a=$("#infoContent").find("div[name=KonT]").html();a=setUndefined(a,"");var i=$("#infoContent").find("div[name=KonI]").html();i=setUndefined(i,"");b.InfoType=a.trim();b.InfoID=i.trim();return b}(function(){["lbl_tl.png","lbl_bgt.png","lbl_tr.png","lbl_bgl.png","lbl_bgc.gif","lbl_bgr.png","lbl_bl.png","lbl_bgb.png","lbl_br.png","lbl_arr2.png","iwin_tl.png","iwin_bgt.png","iwin_tr.png","iwin_bgl.png","iwin_bgc.gif","iwin_bgr.png","iwin_bl.png","iwin_bgb.png","iwin_br.png","iwin_arr.png","iwin_close2.png"].forEach(function(b){(new Image).src=MAP_RSC_SVR+"/img/mapwin/"+b})})();
