
var $_0=200;var $_1=200;var $_2=320;var $_3="/com_web/control_map.php";var $_4=1;var $_5=2;var $_6=3;var $_7={1:$_4,2:$_4,3:$_5,4:$_5,5:$_6,6:$_6,7:$_6};var $_8=128;var $_9=128;var $_a=20;var $_b=10;var $_c=100;var $_d=300;var $_e=220;var $_f=10;var $_g=1;var $_h=17;var $_i=10000;var $_j='loading_icon';var $_k='input_sim';var $_l='search_result';var $_m='top_next';var $_n='bottom_next';var $_o='top_prev';var $_p='bottom_prev';var $_q='result_subject';var $_r='sim_name_area';var $_s=64;var $_t=128;var $_u=17;var $_v=18;var $_w=19;var $_x=600;var gMapInst=null;var $_y=0;var $_z=null;var $_A=0;var $_B=0;var $_C=0;var $_D=0;var $_E=-1;var $_F=0;var $_G=0;var $_H=0;var $_I=null;var $_J={};$_J[$_u]=null;$_J[$_v]=null;$_J[$_w]=null;var gLoadOpenSpotId=null;var $_K=false;var $_L=0;var $_M=null;function SLPointOld(name,local_x,local_y){if(!local_x){local_x=0;}
if(!local_y){local_y=0;}
var downcased_name=name.toLowerCase();this.x=lh[downcased_name].x+(local_x/256);this.y=lh[downcased_name].y+(local_y/256);}
function CSGGuideMap($_N,$_O,$_P){this.$_Q=null;this.$_R={};this.$_S={};this.$_T={};this.$_Q=new SLMap(document.getElementById($_N),{disableVoiceInfo:"true",hasZoomControls:"true",hasPanningControls:"true",onStateChangedHandler:$_O});for(key in $_P){var $_U=$_P[key].icon;this.$_R[key]={};this.$_R[key].icon=[$_U,$_U,$_U,$_U,$_U,$_U];this.$_R[key].verticalAlign=$_P[key].verticalAlign;this.$_R[key].horizontalAlign=$_P[key].horizontalAlign;}
this.setMapCenter=function($_V,$_W,$_X){if($_X){this.panOrRecenterToSLCoord(new XYPoint($_V,$_W),true);}else{this.centerAndZoomAtSLCoord(new XYPoint($_V,$_W),this.getCurrentZoomLevel());}};this.setMapCenterByLocal=function($_Y,$_Z,$_10,$_X){var $_11=null;try{$_11=new SLPointOld($_Y,$_Z,$_10);}catch(e){;}
if($_11!==null){this.setMapCenter($_11.x,$_11.y,$_X);}};this.getMapCenterSimName=function(){var $_12=this.getMapCenter();return this.getSimNameAtSLCoord($_12.x,$_12.y);};this.getSimNameAtSLCoord=function($_V,$_W){var ret=null;var key=Math.floor($_V)+"-"+Math.floor($_W);if(key in rlh){try{ret=rlh[key];}catch(e){ret=null;}}
return ret;};this.addMarkerAndWindow=function($_13,$_Y,$_Z,$_10,$_14,$_15,$_16){if(($_13 in this.$_T)&&this.$_T[$_13]!==null){return this.$_T[$_13];}
$_Y=$_Y.toLowerCase();var $_11=null;try{$_11=new SLPointOld($_Y,$_Z,$_10);}catch(e){;}
if($_11===null){return null;}
var $_17=new Marker(this.$_R[$_14].icon,new XYPoint($_11.x,$_11.y),{verticalAlign:this.$_R[$_14].verticalAlign,horizontalAlign:this.$_R[$_14].horizontalAlign});if($_15!==null){var $_18=new MapWindow($_15,$_16);this.addMarker($_17,$_18);}else{this.addMarker($_17,null);}
if(!($_Y in this.$_S)){this.$_S[$_Y]=[];}
this.$_T[$_13]=$_17;this.$_S[$_Y].push($_13);return $_17;};this.removeMarkerWithoutSims=function($_19){var $_1a={};var i;var $_1b;var $_1c;for(hashMarkerKey in this.$_S){$_1c=true;$_1b=$_19.length;for(i=0;i<$_1b;i++){var tmp=$_19[i];tmp=tmp.toLowerCase();if(tmp==hashMarkerKey){$_1c=false;break;}}
if($_1c){$_1b=this.$_S[hashMarkerKey].length;for(i=0;i<$_1b;i++){this.removeMarker(this.$_T[this.$_S[hashMarkerKey][i]]);this.$_T[this.$_S[hashMarkerKey][i]]=null;}}else{$_1a[hashMarkerKey]=this.$_S[hashMarkerKey];}}
this.$_S=$_1a;};this.getNumMarkersInSim=function($_Y){$_Y=$_Y.toLowerCase();if($_Y in this.$_S){return this.$_S[$_Y].length;}
return 0;};this.getNumMarkers=function(){var $_1d=0;for($_Y in this.$_S){$_1d+=this.$_S[$_Y].length;}
return $_1d;};this.getSimNamesAroundCenter=function($_1e,$_1f,$_1g,$_1h){var $_12=this.getMapCenter();var $_1d=[];var x;var y;var $_1i=Math.floor($_12.x)+$_1e;var $_1j=$_1i+$_1g;var $_1k=Math.floor($_12.y)+$_1f;var $_1l=$_1k+$_1h;for(y=$_1k;y<$_1l;y++){for(x=$_1i;x<$_1j;x++){var tmp=this.getSimNameAtSLCoord(x,y);if(tmp!==null){$_1d.push(tmp);}}}
return $_1d;};this.removeAllMarkers=function(){this.$_Q.removeAllMarkers();this.$_S={};this.$_T={};};this.clickMarkerById=function($_13){var $_17=this.getMarkerById($_13);if($_17!==null){this.clickMarker($_17);return true;}
return false;};this.getMarkerById=function($_13){if($_13 in this.$_T){return this.$_T[$_13];}
return null;};this.getCurrentZoomLevel=function(){return this.$_Q.getCurrentZoomLevel();};this.setCurrentZoomLevel=function($_1m){return this.$_Q.setCurrentZoomLevel($_1m);};this.centerAndZoomAtSLCoord=function(){return this.$_Q.centerAndZoomAtSLCoord();};this.getMapCenter=function(){return this.$_Q.getMapCenter();};this.addMarker=function($_17,$_18){this.$_Q.addMarker($_17,$_18);}
this.removeMarker=function($_17){this.$_Q.removeMarker($_17);}
this.getViewportBounds=function(){return this.$_Q.getViewportBounds();};this.panOrRecenterToSLCoord=function($_1n,$_1o){this.$_Q.panOrRecenterToSLCoord($_1n,$_1o);};this.clickMarker=function($_17){this.$_Q.clickMarker($_17);GEvent.trigger($_17.gmarker,"click");};}
function getClientSize(){var $_1p={};if(!document.all&&(document.layers||document.getElementById)){$_1p.cx=window.innerWidth;$_1p.cy=window.innerHeight;}else if(document.getElementById&&(document.compatMode=='CSS1Compat')){$_1p.cx=document.documentElement.clientWidth;$_1p.cy=document.documentElement.clientHeight;}else if(document.all){$_1p.cx=document.body.clientWidth;$_1p.cy=document.body.clientHeight;}else{$_1p.cx=800;$_1p.cy=600;}
return $_1p;}
function onStateChangedCallback(){var $_1q=gMapInst.getMapCenterSimName();if($_z!==null){window.clearTimeout($_z);$_z=null;}
$_z=window.setTimeout(function(){$_z=null;updateMarker(false);},$_x);}
function onResizeWindow(){resizeWindow();}
function resizeWindow(){var $_1r=getClientSize();if($_1r.cy<$_1){$_1r.cy=$_1;}
if($_1r.cx<$_0+$_2){$_1r.cx=$_0+$_2;}
if($_M!==null){if($_1r.cx==$_M.cx&&$_1r.cy==$_M.cy){return;}}
$_M=$_1r;document.getElementById("map_sidemenu").style.width=$_0+"px";document.getElementById("map_container").style.width=($_1r.cx-$_0)+"px";document.getElementById("map_container").style.height=$_1r.cy+"px";document.getElementById("outline").style.width=$_1r.cx+"px";if(gMapInst!==null){updateMarker(true);}}
function setLoadingCount($_1s){if($_j){if($_1s){var $_1t=$_L;$_L++;if($_1t===0){$($_j).innerHTML="<img src='/images/now_loading_s.gif'>";}}else{$_L--;if($_L===0){$($_j).innerHTML="";}}}}
function updateMarkerCallback($_1u){var i;var $_1b;var j;var $_1v;var $_1w=[];var $_1x=false;var $_1y=-1;var $_1z=null;var $_1A;var $_1B;var $_1C;var $_1D;var $_1E;var $_1F;var $_1G;var $_1H;var $_17;setLoadingCount(false);try{if($_1u.root.result.rid==$_y){$_1z=$_1u.root;$_1A=$_1u.root.result.rid;$_1B=$_1u.root.result.x;$_1C=$_1u.root.result.y;$_1D=$_1u.root.result.zoomLevel;$_1y=$_1u.root.result.zoomMode;$_1x=true;}}catch(e){$_1x=false;}
if(!$_1x){return;}
$_E=$_1A;$_A=$_1B;$_B=$_1C;$_C=$_1D;if($_1y!=$_D){gMapInst.removeAllMarkers();$_D=$_1y;}
try{$_1F=$_1z.sim;}catch(e){$_1F=[];}
if($_1y==$_4){$_1b=$_1F.length;for(i=0;i<$_1b;i++){$_1E=$_1F[i];try{$_1G=$_1E.name;$_1H=$_1E.marker;}catch(e){continue;}
$_1G.toLowerCase();$_1w.push($_1G);$_1v=$_1H.length;for(j=0;j<$_1v;j++){$_17=$_1H[j];if(gMapInst.getMarkerById($_17.id)===null){var $_1I="http://"+location.hostname+"/jump.php?cnt="+$_17.id+"&type=35";var $_1J="/images/img_sample.jpg";if($_17.type==$_g){try{if($_17.image_s.length>0){$_1J="/img"+$_17.image_s;}}catch(e){$_1J="/images/img_sample.jpg";}
gMapInst.addMarkerAndWindow("spot_"+$_17.id,$_1G,$_17.x,$_17.y,"defaultIcon","<div class='mapwindow'><h3>"
+$_17.subject
+"</h3><p class='slurl'><a href=\'javascript:JumpOpen(\""
+$_1I
+"\")\'>"
+$_1G
+"("
+$_17.x
+"."
+$_17.y
+"."
+$_17.z
+")</a></p><p class='teleport'><a href=\'javascript:JumpOpen(\""
+$_1I
+"\")\'><img src='/images/map_btn_teleport.gif' alt='テレポートする' title='テレポートする' border='0' align='absmiddle' hspace='5' /></a></p><p class='line00'> </p><div class='imgbox'><img src='"
+$_1J
+"' width='100'></div><div class='comentbox'>"
+$_17.note
+"</div><p class='clear'> </p></div>",{alwaysOnTop:false,noEffect:false,closeOnMove:false,width:$_d,height:$_e,padding:$_f});}else if($_17.type==$_h){try{if($_17.image_s.length>0){$_1J=$_17.image_s;}}catch(e){$_1J="/images/img_sample.jpg";}
gMapInst.addMarkerAndWindow("event_"+$_17.id,$_1G,$_17.x,$_17.y,"eventIcon","<div class='mapwindow'><h3>"
+$_17.subject
+"</h3><p class='slurl'><a href=\'javascript:JumpOpen(\""
+$_1I
+"\")\'>"
+$_1G
+"("
+$_17.x
+"."
+$_17.y
+"."
+$_17.z
+")</a></p><p class='teleport'><a href=\'javascript:JumpOpen(\""
+$_1I
+"\")\'><img src='/images/map_btn_teleport.gif' alt='テレポートする' title='テレポートする' border='0' align='absmiddle' hspace='5' /></a></p><p class='line00'> </p><div class='imgbox'><img src='"
+$_1J
+"' width='100'></div><div class='comentbox'>"
+$_17.note
+"</div><p class='clear'> </p></div>",{alwaysOnTop:false,noEffect:false,closeOnMove:false,width:$_d,height:$_e,padding:$_f});}}}}}else if($_1y==$_5){$_1b=$_1F.length;for(i=0;i<$_1b;i++){$_1E=$_1F[i];try{$_1G=$_1E.name;}catch(e){continue;}
$_1G.toLowerCase();$_1w.push($_1G);if(gMapInst.getNumMarkersInSim($_1G)===0){gMapInst.addMarkerAndWindow("sim_"+$_1G,$_1G,$_8,$_9,"simIcon",null,null);}}}
gMapInst.removeMarkerWithoutSims($_1w);if(gLoadOpenSpotId){gMapInst.clickMarkerById(gLoadOpenSpotId);gLoadOpenSpotId=null;}}
function updateMarker($_1K){var i;var $_1b;var $_1L=gMapInst.getMapCenter();var $_1M=gMapInst.getCurrentZoomLevel();$_1L.x=Math.floor($_1L.x);$_1L.y=Math.floor($_1L.y);if(gLoadOpenSpotId){if(gMapInst.clickMarkerById(gLoadOpenSpotId)){gLoadOpenSpotId=null;}}
if(!$_1K){if($_y===$_E){if($_A==$_1L.x&&$_B==$_1L.y&&$_C==$_1M){return;}}else{if($_F==$_1L.x&&$_G==$_1L.y&&$_H==$_1M){return;}}}
$_y=($_y+1)%$_i;$_F=$_1L.x;$_G=$_1L.y;$_H=$_1M;var $_1N=$_7[$_1M];if($_1N!==$_4&&$_1N!==$_5){gMapInst.removeAllMarkers();$_D=$_1N;$_A=$_1L.x;$_B=$_1L.y;$_C=$_1M;$_E=$_y;return;}
var $_1O="";var $_1P=gMapInst.getViewportBounds();$_1P.xMin=Math.floor($_1P.xMin);$_1P.xMax=Math.floor($_1P.xMax);$_1P.yMin=Math.floor($_1P.yMin);$_1P.yMax=Math.floor($_1P.yMax);var $_1Q=gMapInst.getSimNamesAroundCenter($_1P.xMin-$_1L.x,$_1P.yMin-$_1L.y,$_1P.xMax-$_1P.xMin+1,$_1P.yMax-$_1P.yMin+1);$_1b=$_1Q.length;for(i=0;i<$_1b;i++){$_1O+="&sims[]="+$_1Q[i];}
$_1O.toLowerCase();$_1O="m=1"
+"&rid="+$_y
+"&zl="+$_1M
+"&zm="+$_1N
+"&x="+$_1L.x
+"&y="+$_1L.y
+$_1O;var $_1R=new JKL.ParseXML.JSON($_3,$_1O);$_1R.async(updateMarkerCallback);setLoadingCount(true);$_1R.parse();}
function searchSim($_1S){if($_I===null){$_1S=0;}else if($_1S==-1){$_I=null;$_1S=0;}
if($_I===null){var $_1T;var $_1U=[];var $_1V=[];var i;var $_1b;var $_1E;var $_1W=$F($_k);$_1W=$_1W.toLowerCase();$_I=[];if($_1W.length>0){for($_1T in lh){res=$_1T.indexOf($_1W);if(res===0){$_1U.push($_1T);}else if(res!=-1){$_1V.push($_1T);}}
$_1U.sort();$_1V.sort();$_1b=$_1U.length;for(i=0;i<$_1b;i++){$_1E=lh[$_1U[i]];$_1E.sim_name=$_1U[i];$_I.push($_1E);}
$_1b=$_1V.length;for(i=0;i<$_1b;i++){$_1E=lh[$_1V[i]];$_1E.sim_name=$_1V[i];$_I.push($_1E);}
if($_I.length!==0){gMapInst.setMapCenter($_I[0].x+0.5,$_I[0].y+0.5,true);}}}
var $_1X=$_I.length;if($_1X===0){$($_l).innerHTML="検索結果がありません。";updateSearchResultSubject($_s,null);}else{var x;var y;var max;if($_1X<$_1S){$_1S=0;}
max=$_1S+$_a;if($_1X<max){max=$_1X;}
updateSearchResultSubject($_s,$_1S,max);$($_l).innerHTML="";for(i=$_1S;i<max;i++){var $_1Y=$_I[i];x=$_1Y.x+0.5;y=$_1Y.y+0.5;$($_l).innerHTML+="<li><a href=\"javaScript:gMapInst.setMapCenter("
+x+", "+y
+", true);\">"
+$_1Y.sim_name+"</a></li>";}
var $_1Z=$_1S-$_a;if($_1Z>=0){$($_o).innerHTML="<a href=\"javaScript:searchSim("+$_1Z+");\">≪前</a>";$($_p).innerHTML="<a href=\"javaScript:searchSim("+$_1Z+");\">≪前</a>";}else{$($_o).innerHTML="<span class=\"unable\">≪前</span>";$($_p).innerHTML="<span class=\"unable\">≪前</span>";}
if($_1X>max){$($_m).innerHTML="<a href=\"javaScript:searchSim("+max+");\">次≫</a>";$($_n).innerHTML="<a href=\"javaScript:searchSim("+max+");\">次≫</a>";}else{$($_m).innerHTML="<span class=\"unable\">次≫</span>";$($_n).innerHTML="<span class=\"unable\">次≫</span>";}}}
function searchEvent($_1S,$_20){searchSpot($_1S,$_w,$_20);}
function searchSpot($_1S,$_21,$_20){if($_20){$_K=true;}
if($_J[$_21]===null){$_1S=0;}else if($_1S==-1){$_J[$_21]=null;$_1S=0;}
if($_J[$_21]===null){$_J[$_21]=[];var $_1O="m="+$_21+"&num="+$_c;var $_1R=new JKL.ParseXML.JSON($_3,$_1O);$_1R.async(function($_1u){setLoadingCount(false);var $_22=null;var $_23;try{$_23=$_1u.root.result.mode;if($_23==$_v||$_23==$_u||$_23==$_w){$_22=$_1u.root.datas;}}catch(e){$_22=null;}
if($_22===null){$($_l).innerHTML="検索結果がありません。";updateSearchResultSubject($_t,null);}else{$_J[$_23]=$_22;searchSpot(0,$_23);}});setLoadingCount(true);$_1R.parse();$($_l).innerHTML="通信中...";updateSearchResultSubject($_21,null);$($_o).innerHTML="";$($_p).innerHTML="";$($_m).innerHTML="";$($_n).innerHTML="";return;}
initMapWindow();initMapWindow=function(){};var $_1X=$_J[$_21].length;if($_1X===0){$($_l).innerHTML="検索結果がありません。";updateSearchResultSubject($_21,null);}else{var i;var x;var y;var max;if($_1X<$_1S){$_1S=0;}
max=$_1S+$_b;if($_1X<max){max=$_1X;}
$($_l).innerHTML="";updateSearchResultSubject($_21,$_1S,max);var $_24=false;for(i=$_1S;i<max;i++){if(i!=$_1S){$($_l).innerHTML+="<li class=\"line02\"></li>";}
var $_1Y=$_J[$_21][i];var $_25="";var $_11=null;try{$_11=new SLPointOld($_1Y.sim,$_1Y.x,$_1Y.y);var $_26="";if($_21==$_w){$_26="javaScript:gLoadOpenSpotId='event_"
+$_1Y.id
+"';gMapInst.setMapCenter("
+$_11.x
+", "
+$_11.y
+", true);";}else{$_26="javaScript:gLoadOpenSpotId='spot_"
+$_1Y.id
+"';gMapInst.setMapCenter("
+$_11.x
+", "
+$_11.y
+", true);";}
$_25="<li><a href=\""
+$_26
+"\" class='black_n'>"
+$_1Y.subject
+"</a></li><li class=\"simstatus\"><a href=\""
+$_26
+"\">"
+$_1Y.sim
+"("
+$_1Y.x
+","
+$_1Y.y
+","
+$_1Y.z
+")</a></li>";}catch(err){$_25="<li>"
+$_1Y.subject
+"</li><li class=\"simstatus\">"
+$_1Y.sim
+"("
+$_1Y.x
+","
+$_1Y.y
+","
+$_1Y.z
+")</li>";}
$($_l).innerHTML+=$_25;if($_K&&(!$_24)&&$_11!==null){$_24=true;if($_w!=$_21){$_K=false;gLoadOpenSpotId="spot_"+$_1Y.id;gMapInst.setMapCenter($_11.x,$_11.y,true);}else{$_K=false;gLoadOpenSpotId="event_"+$_1Y.id;gMapInst.setMapCenter($_11.x,$_11.y,true);}}}
var $_1Z=$_1S-$_b;var $_27="<span class=\"unable\">≪前</span>";if($_1Z>=0){$_27="<a href=\"javaScript:searchSpot("+$_1Z+", "+$_21+");\">≪前</a>";}
$($_o).innerHTML=$_27;$($_p).innerHTML=$_27;$_27="<span class=\"unable\">次≫</span>";if($_1X>max){$_27="<a href=\"javaScript:searchSpot("+max+", "+$_21+");\">次≫</a>";}
$($_m).innerHTML=$_27;$($_n).innerHTML=$_27;}}
function updateSearchResultSubject($_21,$_1S,max){var $_28="";if($_21==$_s){$_28="SIM検索結果";}else if($_21==$_u){$_28="新着スポット";}else if($_21==$_v){$_28="24時間ランキング";}else if($_21==$_w){$_28="開催中のイベント";}else{$_28="検索結果";}
if($_1S!==null){$_1S=$_1S+1;$_28+="("+$_1S+"-"+max+")";}
$($_q).innerHTML=$_28;}
var initMapWindow=function(){var $_29={};var $_2a=new Img("http://"+location.hostname+"/images/mapicon.png",25,25,true);var $_2b=new Icon($_2a);$_29.defaultIcon={};$_29.defaultIcon.icon=$_2b;$_29.defaultIcon.verticalAlign="bottom";$_29.defaultIcon.horizontalAlign="center";$_2a=new Img("http://"+location.hostname+"/images/mapicon_b.png",25,25,true);$_2b=new Icon($_2a);$_29.simIcon={};$_29.simIcon.icon=$_2b;$_29.simIcon.verticalAlign="bottom";$_29.simIcon.horizontalAlign="center";$_2a=new Img("http://"+location.hostname+"/images/eventicon.png",25,25,true);$_2b=new Icon($_2a);$_29.eventIcon={};$_29.eventIcon.icon=$_2b;$_29.eventIcon.verticalAlign="middle";$_29.eventIcon.horizontalAlign="center";resizeWindow();$("map_container").innerHTML="";gMapInst=new CSGGuideMap("map_container",onStateChangedCallback,$_29);gMapInst.setCurrentZoomLevel(1);window.onresize=onResizeWindow;};function defaultOnLoad(){$("map_container").innerHTML="<img src='/images/now_loading_l.gif'>";searchSpot(0,$_u,true);}
function openPositionById($_2c,$_2d,$_1G,$_2e,$_2f){searchSpot(0,$_u,false);initMapWindow();initMapWindow=function(){};gLoadOpenSpotId=$_2c+'_'+$_2d;gMapInst.setMapCenterByLocal($_1G,$_2e,$_2f,true);}