
LANDMARK_ICON_HASH={"200":"img/micon/government.gif","201":"img/micon/government.gif","202":"img/micon/government.gif","218":"img/micon/government.gif","203":"img/micon/station.gif","204":"img/micon/icsa.gif","205":"img/micon/icsa.gif","206":"img/micon/icsa.gif","207":"img/micon/icsa.gif","208":"img/micon/icsa.gif","209":"img/micon/icsa.gif","210":"img/micon/airline.gif","211":"","219":"","212":"img/micon/school.gif","213":"img/micon/school.gif","214":"img/micon/school.gif","215":"img/micon/school.gif","220":"img/micon/school.gif","221":"img/micon/school.gif","222":"img/micon/kindergarten.gif","223":"img/micon/school.gif","224":"img/micon/hospital.gif","216":"img/micon/leisure.gif","217":"img/micon/leisure.gif","225":"img/micon/leisure.gif","226":"img/micon/leisure.gif","227":"img/micon/leisure.gif","228":"img/micon/leisure.gif","229":"img/micon/leisure.gif","230":"img/micon/leisure.gif","231":"img/micon/leisure.gif","232":"img/micon/police.gif","233":"img/micon/police.gif","234":"img/micon/police.gif","235":"img/micon/government.gif","236":"","237":"","238":"","239":"img/micon/hotel.gif","240":"img/micon/gs.gif","241":"img/micon/buss.gif","242":"img/micon/crossing.gif","243":"img/micon/station.gif","244":"img/micon/icsa.gif","246":"img/micon/shopping.gif","247":"img/micon/bank.gif","248":"img/micon/postal.gif","249":"img/micon/leisure.gif","250":"img/micon/museum.gif","251":"img/micon/library.gif","252":"img/micon/convenience.gif","253":"img/micon/gourmet.gif","254":"img/micon/other.gif","255":"img/micon/leisure.gif","256":"img/micon/place.gif","258":"img/micon/place.gif","259":"img/micon/place.gif","264":"","265":"","266":"","267":"img/micon/park.gif","257":"img/micon/temple.gif","268":"img/micon/temple.gif","269":"","270":"","245":"img/micon/subway.gif","stationall":"img/micon/station.gif","http://203.216.208.184/icon/1.gif":"ad_GOU","http://203.216.208.184/icon/2.gif":"ad_ACC","http://203.216.208.184/icon/3.gif":"ad_FAS","http://203.216.208.184/icon/4.gif":"ad_BEA","http://203.216.208.184/icon/5.gif":"ad_SHO","http://203.216.208.184/icon/6.gif":"ad_MED","http://203.216.208.184/icon/7.gif":"ad_SCH","http://203.216.208.184/icon/8.gif":"ad_LEI","http://203.216.208.184/icon/9.gif":"ad_REA","http://203.216.208.184/icon/10.gif":"ad_JOB","http://203.216.208.184/icon/11.gif":"ad_LIV","http://203.216.208.184/icon/12.gif":"ad_CAR","http://203.216.208.184/icon/13.gif":"ad_ADL"}
var GENRE_LIST='/mcms/js/genrelist.csv?'+new Date().getHours()+new Date().getMinutes()+new Date().getSeconds()+new Date().getMilliseconds();var _GNR_ICON=LANDMARK_ICON_HASH
var _OTR_ICON=new Array();var default_landmark='';var default_mlocal='';var default_genre='';var gmenu_flg=false;var CenterScaleList=new Array();var genrelistID=null;var _GNR_CODE="";var _MLOCAL_TAG="";var _MBLOCK_CODE="";var _MBLOCK_CODE_BK="";var _MBLOCK_GRP="";var OLD_CENTERLAT="";var OLD_CENTERLON="";var OLD_CENTERZOOM="";var listLandMarkArray=new Array();var listMlocalArray=new Array();var listMblockArray=new Array();var mblock_grp="";var mblock_code="";var b__json_url="";var b__json_dom_land=new Array();var b__json_param=new Array();var b__json_prop=new Array();var b__json_length=0;var b__json_ttl=new Object();var gnrcode="";var mlocal_tag="";var _landmarkPoiAdd;var DEFAULT_ICON_PATTERN=[{"close":C,"mouseover":M,"open":O},{"close":C,"mouseover":M,"open":O},{"close":C,"mouseover":M,"open":O},{"close":C,"mouseover":M,"open":O},{"close":C,"mouseover":M,"open":O},{"close":C,"mouseover":M,"open":O},{"close":C,"mouseover":M,"open":O},{"close":C,"mouseover":M,"open":O},{"close":C,"mouseover":M,"open":O},{"close":C,"mouseover":M,"open":O}];var DEFAULT_LISTITEM_PATTERN=[{"close":C,"mouseover":M,"open":O},{"close":C,"mouseover":M,"open":O},{"close":C,"mouseover":M,"open":O},{"close":C,"mouseover":M,"open":O},{"close":C,"mouseover":M,"open":O},{"close":C,"mouseover":M,"open":O},{"close":C,"mouseover":M,"open":O},{"close":C,"mouseover":M,"open":O},{"close":C,"mouseover":M,"open":O},{"close":C,"mouseover":M,"open":O}];var route_object=null;var isJson=false;var timeoutBlock=null;var SEARCH_COMP_FLG=true;function getMapcode(){var pi=new CMS_RequestParam(mm);pi.setParam(CONFIG_PARAM);var url=pi.getPosURL();url+="&xtype=json";url+="&varname=_json_dom";if(MBrowser.safari)url+='&xcode=utf8';var httpobj=CMSCommon.createHttpRequest();httpobj.open("GET",url,false);httpobj.send(null);if(httpobj.readyState==4||httpobj.state==200||httpobj.state==304){eval(httpobj.responseText);if(typeof(_json_dom)=='undefined'){if(document.getElementById("mapcode"))document.getElementById("mapcode").innerHTML="";if(document.getElementById('sokodoko'))document.getElementById('sokodoko').innerHTML="";if(document.getElementById('sokodoko_ken'))document.getElementById('sokodoko_ken').innerHTML="";if(document.getElementById('sokodoko_city'))document.getElementById('sokodoko_city').innerHTML="";if(document.getElementById('zipcode'))document.getElementById('zipcode').innerHTML="";if(typeof(getMapcodeEnd)=="function"){callGetMapcodeEnd();}
return;}}else{if(document.getElementById("mapcode"))document.getElementById("mapcode").innerHTML="";if(document.getElementById('sokodoko'))document.getElementById('sokodoko').innerHTML="";if(document.getElementById('sokodoko_ken'))document.getElementById('sokodoko_ken').innerHTML="";if(document.getElementById('sokodoko_city'))document.getElementById('sokodoko_city').innerHTML="";if(document.getElementById('zipcode'))document.getElementById('zipcode').innerHTML="";if(typeof(getMapcodeEnd)=="function"){callGetMapcodeEnd();}
return;}
if(_json_dom[0]&&_json_dom[0].mid.indexOf('errors')!=-1){if(document.getElementById("mapcode"))document.getElementById("mapcode").innerHTML="";if(document.getElementById('sokodoko'))document.getElementById('sokodoko').innerHTML="";if(document.getElementById('sokodoko_ken'))document.getElementById('sokodoko_ken').innerHTML="";if(document.getElementById('sokodoko_city'))document.getElementById('sokodoko_city').innerHTML="";if(document.getElementById('zipcode'))document.getElementById('zipcode').innerHTML="";if(typeof(getMapcodeEnd)=="function"){callGetMapcodeEnd();}
return;}
dumpjson_mapcode(_json_dom);dumpjson_sokodoko(_json_dom);dumpjson_scalelist(_json_dom);dumpjson_zipcode(_json_dom);if(typeof(getMapcodeEnd)=="function"){callGetMapcodeEnd(_json_dom);}};function callGetMapcodeEnd(_json_dom){var _center_info=new Object();if(mm){_center_info.el_10=CMSCommon.roundToDigit(mm.getCenterLatLng().x,7);_center_info.nl_10=CMSCommon.roundToDigit(mm.getCenterLatLng().y,7);_center_info.el_60=CMSCommon.change10to60(mm.getCenterLatLng().x);_center_info.nl_60=CMSCommon.change10to60(mm.getCenterLatLng().y);_center_info.scl=_ZIDtoSCL[mm.getZoomLevel()];}
if(_json_dom&&typeof(_json_dom)!='undefined'){getSokodokoData(_json_dom,_center_info);}
getMapcodeEnd(_center_info);}
function dumpjson_scalelist(_json_dom){CenterScaleList=new Array();if(typeof(_json_dom.slst)!="undefined"){for(var i=0;i<_json_dom.slst.length;i++){CenterScaleList.push(_json_dom.slst[i].scd);}}};function dumpjson_mapcode(_json_dom){if(typeof(_json_dom)=='undefined'){if(document.getElementById("mapcode"))
document.getElementById("mapcode").innerHTML="";}else{if(document.getElementById("mapcode"))
document.getElementById("mapcode").innerHTML=_json_dom.mapcode;}};function dumpjson_sokodoko(_json_dom){if(typeof(_json_dom)=='undefined'&&document.getElementById('sokodoko'))document.getElementById('sokodoko').innerHTML='';if(typeof(_json_dom)=='undefined'&&document.getElementById('sokodoko_ken'))document.getElementById('sokodoko_ken').innerHTML='';if(typeof(_json_dom)=='undefined'&&document.getElementById('sokodoko_city'))document.getElementById('sokodoko_city').innerHTML='';else{var grp=CONFIG_PARAM["grp"].toString();var str='';if(typeof(_json_dom.adna2)=='undefined'||typeof(_json_dom.adna3)=='undefined'||typeof(_json_dom.adna4)=='undefined')document.getElementById('sokodoko').innerHTML='';str+=_json_dom.adna2;str+=_json_dom.adna3;str+=_json_dom.adna4;if(str=='')str='&nbsp;';if(document.getElementById('sokodoko')){document.getElementById('sokodoko').innerHTML=str;}
if(document.getElementById('sokodoko_ken')){var sd_ken=document.getElementById('sokodoko_ken');var kencode=_json_dom.admi4.substr(0,2);sd_ken.innerHTML='<a href="/c/f?grp='+grp+'&BT1=admimap&BT='+kencode+'&uc=6&fn=/html/map/web/admi'+kencode+'.html" target="_self">'+_json_dom.adna2+'</a>';}
if(document.getElementById('sokodoko_city')){var sd_city=document.getElementById('sokodoko_city');sd_city.innerHTML=_json_dom.adna3+_json_dom.adna4;}}
if(CONFIG_PARAM['flg_weather']&&CONFIG_PARAM['flg_weather']==1){wcode=_json_dom.admi4.substr(0,5);putWeather(wcode);}};function dumpjson_zipcode(_json_dom){if(typeof(_json_dom)=='undefined'){if(document.getElementById("zipcode"))
document.getElementById("zipcode").innerHTML="";}else{if(document.getElementById("zipcode"))
document.getElementById("zipcode").innerHTML=_json_dom.zipcode;}};function getCenterInfo(_fmt,_flg){var _center_info=new Object();if(!mm)return;switch(_fmt){case 10:_center_info.el=CMSCommon.roundToDigit(mm.getCenterLatLng().x,7);_center_info.nl=CMSCommon.roundToDigit(mm.getCenterLatLng().y,7);break;case 60:_center_info.el=CMSCommon.change10to60(mm.getCenterLatLng().x);_center_info.nl=CMSCommon.change10to60(mm.getCenterLatLng().y);break;default:_center_info.el=CMSCommon.change10to60(mm.getCenterLatLng().x);_center_info.nl=CMSCommon.change10to60(mm.getCenterLatLng().y);break;}
_center_info.scl=_ZIDtoSCL[mm.getZoomLevel()];if(_flg){_center_info.sd_el="";_center_info.sd_nl="";_center_info.ad_ken="";_center_info.ad_city="";_center_info.ad_cho="";_center_info.ad_kana="";_center_info.admicode="";_center_info.mapcode="";_center_info.zipcode="";_center_info.scd=null;_center_info.sna=null;var pi=new CMS_RequestParam(mm);pi.setParam(CONFIG_PARAM);var url=pi.getPosURL();url+="&xtype=json";url+="&varname=_json";if(MBrowser.safari)url+='&xcode=utf8';var httpobj=CMSCommon.createHttpRequest();httpobj.open("GET",url,false);httpobj.send(null);if(httpobj.readyState==4||httpobj.state==200||httpobj.state==304){eval(httpobj.responseText);if(typeof(_json)=='undefined')return _center_info;}else{return _center_info;}
if(_json[0]&&_json[0].mid.indexOf('errors')!=-1)return _center_info;getSokodokoData(_json,_center_info);}
return _center_info;};function getSokodokoData(_json,_center_info){if(typeof(_json)!=='undefined'){_center_info.sd_el=_json.el;_center_info.sd_nl=_json.nl;_center_info.ad_ken=_json.adna2;_center_info.ad_city=_json.adna3;_center_info.ad_cho=_json.adna4;_center_info.ad_kana=_json.adkana;_center_info.admicode=_json.admi4;_center_info.mapcode=_json.mapcode;_center_info.zipcode=_json.zipcode;var scd=new Array();var sna=new Array();for(var i=0;i<_json.slst.length;i++){scd.push(_json.slst[i].scd);sna.push(_json.slst[i].sna);}
_center_info.scd=scd;_center_info.sna=sna;}};function showCenterLatLon(){var _center_info="";if(document.getElementById("el_60")){_center_info=getCenterInfo(60,false);var div=document.getElementById("el_60");div.innerHTML=_center_info.el;}
if(document.getElementById("nl_60")){_center_info=getCenterInfo(60,false);var div=document.getElementById("nl_60");div.innerHTML=_center_info.nl;}
if(document.getElementById("el_10")){_center_info=getCenterInfo(10,false);var div=document.getElementById("el_10");div.innerHTML=CMSCommon.roundToDigit(_center_info.el,7);}
if(document.getElementById("nl_10")){_center_info=getCenterInfo(10,false);var div=document.getElementById("nl_10");div.innerHTML=CMSCommon.roundToDigit(_center_info.nl,7);}};function showCenterScale(){if(document.getElementById("sclcode")){_center_info=getCenterInfo("",false);var div=document.getElementById("sclcode");div.innerHTML=_center_info.scl;}};function resizeGenre(){if(typeof(MAPRESIZE_END)!="undefined"){if(MAPRESIZE_END){if(document.getElementById("genremenu")){resizeGenreMenu();}
if(document.getElementById("genrelist")){resizeGenreList();}
MAPRESIZE_END=false;}else{setTimeout(resizeGenre,500);}}else{if(document.getElementById("genremenu")){resizeGenreMenu();}
if(document.getElementById("genrelist")){resizeGenreList();}}};function searchInit(){createSearchImage();if(CONFIG_PARAM['conf_flg']=='1'&&typeof getCrdIcon=="undefined")return window.setTimeout(searchInit,100);loadGenreList();if(CONFIG_PARAM['search_type']=="rangeinfo"&&typeof(info_search)=="function"){search_api_type="rangeinfo";}
if(CONFIG_PARAM['search_type']=="block_poiwithin"&&typeof(block_search)=="function"){search_api_type="block_poiwithin";}
if(search_api_type=="rangeinfo"){showSearchImage();info_search_init();}
else if(search_api_type=="block_poiwithin"){showSearchImage();block_search_init();}
else{landmark_search_init();}};function loadGenreList(){var gnrlist_other=getGenreOtherList();if(typeof(gnrlist_other)=="undefined"||!gnrlist_other)return;var xmlhttp=CMSCommon.createHttpRequest();xmlhttp.open("GET",gnrlist_other,false);xmlhttp.send(null);if(xmlhttp.readyState==4||xmlhttp.state==200||xmlhttp.state==304){var gnr=xmlhttp.responseText;if(typeof(gnr)=='undefined')return;setGenreList(gnr);}};function getGenreOtherList(){var gnrlist_other="";var date=new Date();if(!CONFIG_PARAM["grp"]||CONFIG_PARAM["grp"]==""||!CONFIG_PARAM["genrelist_other"]||CONFIG_PARAM["genrelist_other"]==""){gnrlist_other=null;_OTR_ICON=LANDMARK_ICON_HASH;}else{var csvfile=CONFIG_PARAM["genrelist_other"].toString();gnrlist_other='/custom/'+CONFIG_PARAM["grp"]+'/js/'+csvfile+'?'+date.getHours()+date.getMinutes()+date.getSeconds()+date.getMilliseconds();}
return gnrlist_other;};function setGenreList(gnr){var SP=String.fromCharCode(10);var values=gnr.split(SP);for(var i=0;i<values.length;i++){if(values[i].charAt(0)!='#'){_OTR_ICON[values[i].split(',')[0]]=values[i].split(',')[1];}}};function landmark_search_init(){if(CONFIG_PARAM['dgnr']!=''){if(CONFIG_PARAM['dgnr'].indexOf("mbl_grp")!=-1){mblock_grp=mblock_grp.split("&")[0];default_genre=CONFIG_PARAM['dgnr'];}else{default_genre=CONFIG_PARAM['dgnr'];}}else if(CONFIG_PARAM['default_genre']&&CONFIG_PARAM['default_genre']!=''){if(CONFIG_PARAM['default_genre'].indexOf('|')!=-1){default_genre=CONFIG_PARAM['default_genre'].replace(/\|/g,",");}else{default_genre=CONFIG_PARAM['default_genre'];}}else{if(document.getElementById('genre')&&document.getElementById('genre').value!=''){default_genre=document.getElementById('genre').value;}
else{default_genre='';}}
if(default_genre!=''){var mtArray=new Array();if(default_genre.indexOf(',')!=-1){mtArray=default_genre.split(',');}else{mtArray.push(default_genre);}
var m_gnr=new Array();var m_tag=new Array();getSearchCode();if(m_gnr.length!=0){default_landmark=m_gnr.join(',');CONFIG_PARAM['default_landmark']=default_landmark;}
if(m_tag.length!=0){default_mlocal=m_tag.join(',');CONFIG_PARAM['default_mlocal']=default_mlocal;}
if(document.getElementById('genre')){for(i=0;i<document.getElementById('genre').length;i++){if(default_genre==document.getElementById('genre').options[i].value){document.getElementById('genre').selectedIndex=i;break;}}
getLandMark();}
else if(!CONFIG_PARAM["flg_genremenu"]||CONFIG_PARAM["flg_genremenu"]!=1||!document.getElementById("genremenu")){getLandMark();}else{defaultSetGMenu();clickGenreLink(default_genre);gmenu_flg=true;}}
if(document.getElementById("genremenu")&&CONFIG_PARAM["flg_genremenu"]==1){if(gmenu_flg)return;else initGMenu();}};function getSearchCode(){var select_genre='';gnrcode="";mlocal_tag="";mblock_grp="";mblock_code="";_MBLOCK_CODE="";if(document.getElementById('genre')&&document.getElementById('genre').value!=''){select_genre=document.getElementById('genre').value;}else if(default_genre!=''){select_genre=default_genre;}else{gnrcode='';}
var mtArray=new Array();if(select_genre.indexOf(',')!=-1){mtArray=select_genre.split(',');}else{if(select_genre!=''){mtArray.push(select_genre);}}
var m_gnr=new Array();var m_tag=new Array();var m_slali=new Array();var m_block=new Array();for(var i=0;i<mtArray.length;i++){if(mtArray[i].match(/mbl_grp=/)){var q=mtArray[i].replace(/mbl_grp/,"grp");m_block.push(q);}
else if(mtArray[i].match(/2[0-9]{2}/)){m_gnr.push(mtArray[i]);}
else if(mtArray[i].match(/grp=/)){m_slali.push(mtArray[i]);}
else{m_tag.push(mtArray[i]);}}
if(m_gnr.length!=0){if(m_tag.length!=0){if(m_slali.length!=0){gnrcode=m_gnr.join(',')+',000';}else{gnrcode=m_gnr.join(',');}
mlocal_tag=m_tag.join(',');mblock_code='';_MBLOCK_CODE="";}else if(m_slali.length!=0){gnrcode=m_gnr.join(',')+',000';mlocal_tag='';mblock_code='';_MBLOCK_CODE="";}else{gnrcode=m_gnr.join(',');mlocal_tag='';mblock_code='';_MBLOCK_CODE="";}}else if(m_tag.length!=0&&m_block!=""&&m_block.length!=0){var c=new Array();var _code=new Array();for(var i=0;i<m_block.length;i++){if(m_block[i].toString().indexOf("&")!=-1){mblock_grp=m_block[0].split("&")[0];mblock_grp=mblock_grp.split("=")[1];c.push(m_block[i].split("&")[1]);for(var j=0;j<c.length;j++){if(c[i].toString().indexOf("=")!=-1){_code.push(c[i].split("=")[1]);}}}else{mblock_grp=m_block[i].split("=")[1];}}
mblock_code=_code.join(',');gnrcode='';mlocal_tag=m_tag.join(',');var np=new CMS_RequestParam(mm);setMBlockPm();var url=np.getNpMBlockMlocalParam();getGrpAndSearchstr(url);}else if(m_tag.length!=0){if(m_slali.length!=0){gnrcode='000';}
else{gnrcode='';}
mlocal_tag=m_tag.join(',');}else if(m_slali.length!=0){gnrcode='000';mlocal_tag='';mblock_code='';}else if(m_block!=""||m_block.length!=0){var c=new Array();var _code=new Array();for(var i=0;i<m_block.length;i++){if(m_block[i].toString().indexOf("&")!=-1){mblock_grp=m_block[0].split("&")[0];mblock_grp=mblock_grp.split("=")[1];c.push(m_block[i].split("&")[1]);for(var j=0;j<c.length;j++){if(c[i].toString().indexOf("=")!=-1){_code.push(c[i].split("=")[1]);}}}else{mblock_grp=m_block[i].split("=")[1];}}
mblock_code=_code.join(',');gnrcode='';mlocal_tag='';var np=new CMS_RequestParam(mm);setMBlockPm();var url=np.getNpMBlockParam();getGrpAndSearchstr(url);}
if(m_slali.length!=0){for(var i=0;i<m_slali.length;i++){CONFIG_PARAM['search_grp']+=m_slali[i].split('=')[1]+',';}
CONFIG_PARAM['search_grp']=CONFIG_PARAM['search_grp'].slice(0,CONFIG_PARAM['search_grp'].length-1);}
return select_genre;};function getMain(){var np=new CMS_RequestParam(mm);np.setParam(CONFIG_PARAM);var cl=getCenterLocation();OLD_CENTERLAT=cl.nl10;OLD_CENTERLON=cl.el10;OLD_CENTERZOOM=mm.getZoomLevel();var url='';if(_GNR_CODE!=''&&_MLOCAL_TAG!=''){url+=np.getNpURL()+np.getNpMAlpsParam()+np.getNpMMlocalParam();}else if(mblock_grp!=''&&_MLOCAL_TAG!=''){setMBlockPm();url=np.getNpMBlockMlocalParam();return url;}else{if(_GNR_CODE!=''){url+=np.getNpURL()+np.getNpAlpsParam();}
else if(_MLOCAL_TAG!=''){url+=np.getNpAddURL()+np.getNpMlocalParam();}
else if(mblock_grp!=""||document.getElementById("genre").indexOf("mbl_grp=")!=-1){setMBlockPm();url=np.getNpMBlockParam();return url;}}
url+="&el="+cl.el;url+="&nl="+cl.nl;url+="&xtype=json";url+="&varname=_json_dom_land";if(MBrowser.safari){url+='&xcode=utf8';}
return url;};function getPandN(_action){var np=new CMS_RequestParam(mm);np.setParam(CONFIG_PARAM);var url=np.getNpAddURL();if(_action=='next'){url+=np.getNextNpMlocalParam();}else if(_action=='prev'){url+=np.getPrevNpMlocalParam();}
url+="&el="+OLD_CENTERLON;url+="&nl="+OLD_CENTERLAT;url+="&xtype=json";url+="&varname=_json_dom_land";if(MBrowser.safari){url+='&xcode=utf8';}
return url;};function getCenterLocation(){var loc=new Object();if(default_url.icon.length!=0&&markerA.length!=0&&CONFIG_PARAM['icon_center_flg']!=1){if(POI_PARAM['EL_0']&&POI_PARAM['NL_0']){if(POI_PARAM['EL_0'].toString().indexOf('/')!=-1&&POI_PARAM['NL_0'].toString().indexOf('/')!=-1){loc.el=POI_PARAM['EL_0'].toString();loc.nl=POI_PARAM['NL_0'].toString();loc.el10=POI_PARAM['EL_0'].toString();loc.nl10=POI_PARAM['NL_0'].toString();}else{loc.el=CMSCommon.change10to60(markerA[0].rpos.x);loc.nl=CMSCommon.change10to60(markerA[0].rpos.y);loc.el10=markerA[0].rpos.x;loc.nl10=markerA[0].rpos.y;}}else{loc.el=CMSCommon.change10to60(mm.getCenterLatLng().x);loc.nl=CMSCommon.change10to60(mm.getCenterLatLng().y);loc.el10=mm.getCenterLatLng().x;loc.nl10=mm.getCenterLatLng().y;}}else{loc.el=CMSCommon.change10to60(mm.getCenterLatLng().x);loc.nl=CMSCommon.change10to60(mm.getCenterLatLng().y);loc.el10=mm.getCenterLatLng().x;loc.nl10=mm.getCenterLatLng().y;}
return loc;};function genrelistInit(_id){if(!genrelistID||genrelistID==null){if(!_id||_id==""||typeof(_id)=="undefined"){genrelistID="genrelist";}else{genrelistID=_id;}}};function setInitPoiNW(){var listtemplate=null;var listmode=null;var listpager=null;var iconTemplete=null;if(typeof(MCMS_IconTemplete)=="function"){iconTemplete=new MCMS_IconTemplete();}
if(CONFIG_PARAM['landmark']=='text'){if(typeof(MCMS_selectbox_ListItemTemplete)=="function"){listtemplate=new MCMS_selectbox_ListItemTemplete();listmode=POIBuilder.LISTMODE_SELECTBOX;}}
else if(CONFIG_PARAM['landmark']=='select'){if(typeof(MCMS_ListItemTemplete)=="function"){listtemplate=new MCMS_ListItemTemplete();}}
else if(CONFIG_PARAM['landmark']=='list'){if(typeof(MCMS_ListItemTemplete)=="function"){listtemplate=new MCMS_ListItemTemplete();listpager=new MCMS_ListPagerTemplete();}}
poib.setInit({"map":mm,"listDiv":document.getElementById(genrelistID),"iconTemplete":iconTemplete,"listItemTemplete":listtemplate,"listPagerTemplete":listpager,"listener":new GlobalListener(),"iconPatternMap":null,"listItemPatternMap":null,"listMode":listmode});setPoiAction();poinwIconOverride();poinwListOverride();if(CONFIG_PARAM['flg_popuptype']==1)poinwOverRide();if(CONFIG_PARAM['landmark']=='text'){function selectListItem(poi,listClose,iconOpenFlg){if(this.divp){this.divp.innerHTML=poi.listItemOpenHTML;if(listClose)this.closeSelectBox();if(iconOpenFlg){window.setTimeout(function(){if(poi.data.opetype=='mlocal'){poi.openPopup();}},0);}}}
POIBuilder.prototype.selectListItem=selectListItem;}};function clearPoiOnly(){listLandMarkArray=null;listMlocalArray=null;listMblockArray=null;massAdArray=null;CONFIG_PARAM['search_grp']='';setInitPoiNW();poib.resetPoi();if(route_object!=null&&route_object.points)route_object.removeRoute();};function clearPoiAndList(_template){listLandMarkArray=null;listMlocalArray=null;listMblockArray=null;massAdArray=null;CONFIG_PARAM['search_grp']='';setInitPoiNW();poib.resetPoi();poib.showList(_template);if(route_object!=null&&route_object.points)route_object.removeRoute();var lpparam=Object();lpparam.hit=0;lpparam.pm=0;lpparam.page=1;lpparam.pageMax=0;lpparam.startIndex=0;lpparam.endIndex=0;lpparam.prevAble=false;lpparam.nextAble=false;poib.listPager=new ListPager(lpparam,'');var cb;if(cb=MEvent.hash[mm.id+"searchcomplete"]){for(var i in cb){if(!cb.hasOwnProperty(i))continue;cb[i].call(mm,poib.listPager.hit,poib.listPager.pm,poib.listPager.page,poib.listPager.pageMax,poib.listPager.startIndex,poib.listPager.endIndex,poib.listPager.prevAble,poib.listPager.nextAble);}}};function getLandMark(tagid){var flg=checkPoiSearchFlg();if(search_api_type=="rangeinfo"){if(route_object!=null){if(route_object&&route_object.lineObj&&route_object.lineObj!=null)route_object.removeRoute();}
if(flg==null){clearPoiOnly();}else if(!flg){info_search_set_poi(null);}else{showSearchImage();info_search_reload();}
return;}
else if(search_api_type=="block_poiwithin"){if(route_object!=null){if(route_object&&route_object.lineObj&&route_object.lineObj!=null)route_object.removeRoute();}
if(flg==null){clearPoiOnly();}else if(!flg){block_search_set_poi(null);}else{showSearchImage();block_search_reload();}
return;}
else{if(flg==null){clearPoiOnly();}else if(!flg){clearPoiAndList("void");}else{if(SEARCH_COMP_FLG==null||SEARCH_COMP_FLG==true){SEARCH_COMP_FLG=false;landmark_search(tagid);}}}};function landmark_search(tagid){search_api_type=null;genrelistInit(tagid);setInitPoiNW();CONFIG_PARAM['search_grp']='';var flg=checkPoiSearchFlg();if(flg==null){clearPoiOnly();SEARCH_COMP_FLG=true;return;}else if(!flg){clearPoiAndList("void");SEARCH_COMP_FLG=true;return;}else{var select_genre=getSearchCode();if(gnrcode==""&&mlocal_tag==""&&mblock_grp==""){SEARCH_COMP_FLG=true;if(document.getElementById("genre")&&document.getElementById("genre").tagName.toLowerCase()=="select"&&document.getElementById("genre").selectedIndex==0&&document.getElementById("genre").options[document.getElementById("genre").selectedIndex].value=="")clearPoiOnly();return;}
if(mlocal_tag!=_MLOCAL_TAG){if((!CONFIG_PARAM['site_id']||CONFIG_PARAM['site_id']=='')||(!CONFIG_PARAM['site_pw']||CONFIG_PARAM['site_pw']=='')){clearPoiAndList("");SEARCH_COMP_FLG=true;return;}}
if(select_genre!=''){analytics_easy("/"+CONFIG_PARAM['grp']+"_map/genrelist/"+select_genre+"/analytics.gif");}
if(OLD_CENTERZOOM!=mm.getZoomLevel()&&(CONFIG_PARAM['icon_center_flg']==0||!CONFIG_PARAM['icon_center_flg']||CONFIG_PARAM['icon_center_flg']=='')&&markerA.length!=0||CONFIG_PARAM['icon_center_flg']==1||markerA.length==0||gnrcode!=_GNR_CODE||mlocal_tag!=_MLOCAL_TAG||mblock_code!=_MBLOCK_CODE_BK||mblock_grp!=_MBLOCK_GRP||mblock_grp==""&&typeof(_json_dom_land)=='undefined'){if(mblock_grp!=""){showSearchImage();setTimeout(function(){getLandMarkMain(tagid);},200);}else{showSearchImage();setTimeout(function(){getLandMarkMain(tagid);},200);}}
else{SEARCH_COMP_FLG=true;}}};function getLandMarkMain(tagid){mm.moving=true;if((OLD_CENTERLAT!=mm.getCenterLatLng().y&&OLD_CENTERLON!=mm.getCenterLatLng().x)||(gnrcode!=_GNR_CODE||mlocal_tag!=_MLOCAL_TAG)){if(route_object!=null&&route_object.points)route_object.drawRemoveRoute(false);}
_GNR_CODE=gnrcode;_MLOCAL_TAG=mlocal_tag;_MBLOCK_GRP=mblock_grp;_MBLOCK_CODE_BK=mblock_code;var url=getMain();if(url==""||typeof(url)=="undefined"){hideSearchImage();mm.moving=false;SEARCH_COMP_FLG=true;return;}
b__json_length=0;if(url.toString().indexOf("PoiWithin")!=-1){b__json_url=url;isJson=true;var jsonRequest="";if(!CONFIG_PARAM["oe"]||CONFIG_PARAM["oe"]==""){jsonRequest=new JSONscriptRequest(url,"EUC-JP");}else{var out_enc=CONFIG_PARAM["oe"].toString();if(out_enc.indexOf("utf-8")!=-1||out_enc.indexOf("utf8")!=-1){jsonRequest=new JSONscriptRequest(url,"utf-8");}else if(out_enc.indexOf("shift_jis")!=-1||out_enc.indexOf("sjis")!=-1){jsonRequest=new JSONscriptRequest(url,"shift_jis");}else{jsonRequest=new JSONscriptRequest(url,"euc-jp");}}
jsonRequest.buildScriptTag();jsonRequest.addScriptTag();var timeoutmaxc=10;var timeoutc=0;if(timeoutBlock!=null){clearInterval(timeoutBlock);}
timeoutBlock=setInterval(function(){if(isJson==false||timeoutc>timeoutmaxc){clearInterval(timeoutBlock);timeoutBlock=null;if(timeoutc>timeoutmaxc){b__json_length=0;}
hideSearchImage();jsonRequest.removeScriptTag();}
timeoutc++;},500);mm.moving=false;SEARCH_COMP_FLG=true;return;}
var httpobj=CMSCommon.createHttpRequest();httpobj.open("GET",url,false);httpobj.send(null);if(httpobj.readyState==4||httpobj.state==200||httpobj.state==304){eval(httpobj.responseText);var timeout=setTimeout(function(){hideSearchImage();clearTimeout(timeout);},500);}
mm.moving=false;var ttl=new Object();CONFIG_PARAM['poiinfo']=null;if(typeof(_json_dom_land)!='undefined'&&typeof(m__json_dom_land)!='undefined'&&_GNR_CODE!=''&&_MLOCAL_TAG!=''){setGenreData(_json_dom_land,m__json_dom_land,'',tagid);}else if(typeof(_json_dom_land)!='undefined'){if(_GNR_CODE!=''){setGenreData(_json_dom_land,'','',tagid);}else if(_MLOCAL_TAG!=''){if(_json_dom_land&&_json_dom_land[0]&&_json_dom_land[0].mid.indexOf('error')!=-1){ttl.trans_code=0;ttl.hit=0;ttl.vp=0;ttl.pm=0;ttl.page=0;}else{ttl.trans_code=_json_dom_land.trans_code;ttl.hit=_json_dom_land.hit;ttl.vp=_json_dom_land.required;ttl.pm=_json_dom_land.return_count;ttl.page=_json_dom_land.page_number;}
CONFIG_PARAM['poiinfo']=ttl;setGenreData('',_json_dom_land,'',tagid);}}else{setGenreData('','','',tagid);}
if(listLandMarkArray.length>0||listMlocalArray.length>0){showGenreData(ttl);}
default_landmark='';default_mlocal='';default_mblock='';SEARCH_COMP_FLG=true;};function getPAndNLandMark(_action){showSearchImage();setTimeout(function(){getPAndNLandMarkMain(_action);},100);};function getPAndNLandMarkMain(_action){showSearchImage();mm.moving=true;var url=getPandN(_action);var httpobj=CMSCommon.createHttpRequest();httpobj.open("GET",url,false);httpobj.send(null);if(httpobj.readyState==4||httpobj.state==200||httpobj.state==304){eval(httpobj.responseText);hideSearchImage();}else{hideSearchImage();return;}
var ttl=new Object();ttl.trans_code=_json_dom_land.trans_code;ttl.hit=_json_dom_land.hit;ttl.vp=_json_dom_land.required;ttl.pm=_json_dom_land.return_count;ttl.page=_json_dom_land.page_number;CONFIG_PARAM['poiinfo']=ttl;setGenreData('',_json_dom_land,'',genrelistID);if(listMlocalArray.length>0){showGenreData(ttl);}
mm.moving=false;};function setGenreData(_json_dom_land,m__json_dom_land,b__json_dom_land,tagid){listLandMarkArray=new Array();listMlocalArray=new Array();listMblockArray=new Array();massAdArray=new Array();if(!_json_dom_land&&!m__json_dom_land&&!b__json_dom_land){return;}
var center_el='';var center_nl='';if(default_url.icon.length!=0&&markerA.length!=0&&_I_CNT!=0){center_el=0;center_nl=0;if(POI_PARAM['EL_0']&&POI_PARAM['NL_0']){if(POI_PARAM['EL_0'].toString().indexOf('/')!=-1&&POI_PARAM['NL_0'].toString().indexOf('/')==-1){center_el=change60to10(POI_PARAM['EL_0']);center_nl=change60to10(POI_PARAM['NL_0']);}
else{center_el=markerA[0].rpos.x;center_nl=markerA[0].rpos.y;}
if(center_el==0){center_el=POI_PARAM['EL_0'].toString();center_nl=POI_PARAM['NL_0'].toString();}}}
var l_cnt=0;if(m__json_dom_land&&m__json_dom_land[0]&&m__json_dom_land[0].mid.indexOf('error')!=-1){}else{if(m__json_dom_land!=''&&m__json_dom_land.item.length!=0){for(var i=0;i<m__json_dom_land.item.length;i++){if((m__json_dom_land.item[i].x==''&&m__json_dom_land.item[i].y=='')||m__json_dom_land.item[i].isgps==0){massAdArray.push(new setMlocalList(m__json_dom_land.item[i]));massAdArray[massAdArray.length-1].listBG='mass';}else{listMlocalArray.push(new setMlocalList(m__json_dom_land.item[i]));listMlocalArray[i].listBG=l_cnt%2;var leg=0;if(CONFIG_PARAM['icon_center_flg']==1){leg=parseInt(CMSCommon.distance(new MPoint(m__json_dom_land.item[i].x/3600000,m__json_dom_land.item[i].y/3600000),new MPoint(mm.getCenterLatLng().x,mm.getCenterLatLng().y)));}else{if(center_el!=''&&center_nl!=''){leg=parseInt(CMSCommon.distance(new MPoint(m__json_dom_land.item[i].x/3600000,m__json_dom_land.item[i].y/3600000),new MPoint(center_el,center_nl)));}else{leg=parseInt(CMSCommon.distance(new MPoint(m__json_dom_land.item[i].x/3600000,m__json_dom_land.item[i].y/3600000),new MPoint(mm.getCenterLatLng().x,mm.getCenterLatLng().y)));}}
listMlocalArray[i].leg=leg;l_cnt++;}}}
else if(m__json_dom_land.hit==0&&m__json_dom_land.item.length!=0){for(var i=0;i<m__json_dom_land.item.length;i++){if((m__json_dom_land.item[i].x==''&&m__json_dom_land.item[i].y=='')||m__json_dom_land.item[i].isgps==0){massAdArray.push(new setMlocalList(m__json_dom_land.item[i]));massAdArray[massAdArray.length-1].listBG='mass';}}}}
if(_json_dom_land!=''&&_json_dom_land.hit!=0){for(var i=0;i<_json_dom_land.hit;i++){var lo=new Object();lo.id=_json_dom_land.crd[i].id;lo.gname=_json_dom_land.crd[i].title[0].value;lo.gcode=_json_dom_land.crd[i].category.id;lo.category=_json_dom_land.crd[i].category.categoryName;lo.nl=CMSCommon.change60to10(_json_dom_land.crd[i].place.loc60[0]);lo.el=CMSCommon.change60to10(_json_dom_land.crd[i].place.loc60[1]);lo.s_grp='';lo.link='';if(lo.gcode=='000'){lo.s_grp=_json_dom_land.crd[i].grp;lo.iconwidth=_json_dom_land.crd[i].iconwidth;lo.iconheight=_json_dom_land.crd[i].iconheight;lo.iconfile=_json_dom_land.crd[i].iconfile;if(!NOT_POPUP_LINKS[lo.s_grp+'_000']){lo.link=_json_dom_land.crd[i].title[0].onmapurl;}}
var leg=0;if(CONFIG_PARAM['icon_center_flg']==1){lo.leg=parseInt(CMSCommon.distance(new MPoint(lo.el,lo.nl),new MPoint(mm.getCenterLatLng().x,mm.getCenterLatLng().y)));}else{if(center_el!=''&&center_nl!=''){lo.leg=parseInt(CMSCommon.distance(new MPoint(lo.el,lo.nl),new MPoint(center_el,center_nl)));}else{lo.leg=parseInt(CMSCommon.distance(new MPoint(lo.el,lo.nl),new MPoint(mm.getCenterLatLng().x,mm.getCenterLatLng().y)));}}
listLandMarkArray.push(new setLandMarkList(lo));listLandMarkArray[i].listBG=l_cnt%2;l_cnt++;}}
if(b__json_length!=0&&b__json_prop.hit!=0){if(!b__json_dom_land)return;for(var i=0;i<b__json_length;i++){var json=b__json_dom_land[0][i];var lo=new Object();lo=json;if(mblock_grp.indexOf("station01")!=-1){lo.id=i;lo.name=json.st_name;}else{lo.id=json.id;lo.name=json.name;}
var iconurl="";if(typeof(json.icon_url)!="undefined"&&json.icon_url!=""){iconurl=json.icon_url;}else if(typeof(CONFIG_PARAM['blockdata_default_iconurl'])!="undefined"&&CONFIG_PARAM['blockdata_default_iconurl']!=""){iconurl=CONFIG_PARAM['blockdata_default_iconurl'];}
var iconid="";if(typeof(json.icon_id)!="undefined"&&json.icon_id!=""){iconid=json.icon_id;}else if(typeof(_OTR_ICON[iconurl])!="undefined"&&_OTR_ICON[iconurl]!=""){iconid=_OTR_ICON[iconurl];}else if(typeof(CONFIG_PARAM['blockdata_default_iconid'])!="undefined"&&CONFIG_PARAM['blockdata_default_iconid']!=""){iconid=CONFIG_PARAM['blockdata_default_iconid'];}
var iconwidth="";var iconheight="";if(typeof(json.icon_width)!="undefined"&&json.icon_width!=""){iconwidth=json.icon_width;}else if(typeof(CONFIG_PARAM['landmark_icon_width'])!="undefined"&&CONFIG_PARAM['landmark_icon_width']!=""){iconwidth=CONFIG_PARAM['landmark_icon_width'];}else{return;}
if(typeof(json.icon_height)!="undefined"&&json.icon_height!=""){iconheight=json.icon_height;}else if(typeof(CONFIG_PARAM['landmark_icon_height'])!="undefined"&&CONFIG_PARAM['landmark_icon_height']!=""){iconheight=CONFIG_PARAM['landmark_icon_height'];}else{return;}
lo.address=json.full_address;if(lo.address=="")lo.address=json.kenname+json.cityname;lo.iconid=iconid;lo.icon=iconurl;lo.iconwidth=iconwidth;lo.iconheight=iconheight;lo.gcode="";if(json.search_str01)lo.gcode=json.search_str01;lo.link="";if(json.link_str1)lo.link=json.link_str1;lo.text="";if(json.disp_str01)lo.text=json.disp_str01;lo.image="";if(json.thumb_picname)lo.image=json.thumb_picname;lo.imagewidth="";if(json.disp_num01)lo.imagewidth=json.disp_num01;lo.imageheight="";if(json.disp_num02)lo.imageheight=json.disp_num02;lo.nl="";if(json.latitude)lo.nl=json.latitude;lo.el="";if(json.longitude)lo.el=json.longitude;lo.leg="";if(json.latitude&&json.longitude)lo.leg=parseInt(CMSCommon.distance(new MPoint(lo.el,lo.nl),new MPoint(mm.getCenterLatLng().x,mm.getCenterLatLng().y)));listMblockArray.push(new setMBlockList(lo));listMblockArray[i].listBG=l_cnt%2;l_cnt++;}}
var nf=new Object();nf.id='notFound';if(mblock_grp!=""&&b__json_length==0){listMblockArray.push(new setMBlockList(nf));}else if(_GNR_CODE!=''&&_MLOCAL_TAG!=''){if(_json_dom_land.hit==0&&m__json_dom_land.hit==0){listLandMarkArray.push(new setLandMarkList(nf));listMlocalArray=new Array();}}else if(_GNR_CODE!=''){if(_json_dom_land.hit==0){listLandMarkArray.push(new setLandMarkList(nf));}}else if(_MLOCAL_TAG!=''){if(m__json_dom_land.hit==0){listMlocalArray.push(new setMlocalList(nf));if(massAdArray.length>0){listMlocalArray=listMlocalArray.concat(massAdArray);}}
else{var cflag=0;for(var i=0;i<listMlocalArray.length;i++){if(listMlocalArray[i].pos.x!=0&&listMlocalArray[i].pos.y!=0){cflag=1;break;}}
if(cflag==0){listMlocalArray.push(new setMlocalList(nf));}
if(massAdArray.length>0){listMlocalArray=listMlocalArray.concat(massAdArray);}}}
return;};function showGenreData(lp){var cdisp=new Array();if(CONFIG_PARAM['content_display']&&CONFIG_PARAM['content_display']!=''){if(CONFIG_PARAM['content_display'].indexOf(':')!=-1){cdisp=CONFIG_PARAM['content_display'].split(':');}else{cdisp.push(CONFIG_PARAM['content_display']);}}else{cdisp.push('alps');}
var cdisp_block=new Array();if(CONFIG_PARAM['content_display_block']&&CONFIG_PARAM['content_display_block']!=''){if(CONFIG_PARAM['content_display_block'].indexOf(':')!=-1){cdisp_block=CONFIG_PARAM['content_display_block'].split(':');}else{cdisp_block.push(CONFIG_PARAM['content_display_block']);}}else{cdisp_block.push('block');}
var idisp=new Array();if(CONFIG_PARAM['icon_display']&&CONFIG_PARAM['icon_display']!=''){if(CONFIG_PARAM['icon_display'].indexOf(':')!=-1){idisp=CONFIG_PARAM['icon_display'].split(':');}else{idisp.push(CONFIG_PARAM['icon_display']);}}else{idisp=cdisp;}
if(_MLOCAL_TAG!=''&&mblock_grp!=""){if(cdisp_block.length==2){if(cdisp_block[0].toUpperCase()=='MLOCAL'&&cdisp_block[1].toUpperCase()=='BLOCK'){if(listMlocalArray.length!=0&&listMlocalArray[0].id!='notFound'){if(listMblockArray.length!=0&&listMblockArray[0].id!='notFound'){poib.build(listMlocalArray.concat(listMblockArray),new ListPager(lp,''));}else{poib.build(listMlocalArray,new ListPager(lp,''));}
if(CONFIG_PARAM['flg_route']==1&&listMlocalArray[0].pos.x!=null&&listMlocalArray[0].pos.y!=null){displayRoute(listMlocalArray[0],listMlocalArray[0].id,"search");}}
else if(listMblockArray.length!=0&&listMblockArray[0].id!='notFound'){if(b__json_length!=0){poib.build(listMblockArray,new ListPager(lp,''));if(CONFIG_PARAM['flg_route']==1&&listMblockArray[0].pos.x!=null&&listMblockArray[0].pos.y!=null){displayRoute(listMblockArray[0],0,"search");}}}
else{poib.build(listMlocalArray);}
poib.show();}
else if(cdisp_block[0].toUpperCase()=='BLOCK'&&cdisp_block[1].toUpperCase()=='MLOCAL'){if(listMblockArray.length!=0&&listMblockArray[0].id!='notFound'){if(b__json_length!=0){if(listMlocalArray.length!=0&&listMlocalArray[0].id!='notFound'){poib.build(listMblockArray.concat(listMlocalArray),new ListPager(lp,''));}else{poib.build(listMblockArray,new ListPager(lp,''));}
if(CONFIG_PARAM['flg_route']==1&&listMblockArray[0].pos.x!=null&&listMblockArray[0].pos.y!=null){displayRoute(listMblockArray[0],0,"search");}}}
else if(listMlocalArray.length!=0&&listMlocalArray[0].id!='notFound'){poib.build(listMlocalArray,new ListPager(lp,''));if(CONFIG_PARAM['flg_route']==1&&listMlocalArray[0].pos.x!=null&&listMlocalArray[0].pos.y!=null){displayRoute(listMlocalArray[0],listMlocalArray[0].id,"search");}}
else{poib.build(listMlocalArray);}
poib.show();}}
else{if(listMblockArray.length!=0&&listMblockArray[0].id!='notFound'){if(b__json_length!=0){poib.build(listMblockArray,new ListPager(lp,''));if(CONFIG_PARAM['flg_route']==1&&listMblockArray[0].pos.x!=null&&listMblockArray[0].pos.y!=null){displayRoute(listMblockArray[0],0,"search");}}else{poib.build(listMblockArray);}
poib.show();}
else if(listMlocalArray.length!=0&&listMlocalArray[0].id!='notFound'){poib.build(listMlocalArray);if(CONFIG_PARAM['flg_route']==1&&listMlocalArray[0].pos.x!=null&&listMlocalArray[0].pos.y!=null){displayRoute(listMlocalArray[0],listMlocalArray[0].id,"search");}}}}
else if(_GNR_CODE!=''&&_MLOCAL_TAG!=''||mblock_grp!=""){if(cdisp.length==2){if(cdisp[0].toUpperCase()=='MLOCAL'&&cdisp[1].toUpperCase()=='ALPS'){if(listMlocalArray.length!=0&&listMlocalArray[0].id!='notFound'){poib.build(listMlocalArray.concat(listLandMarkArray));if(CONFIG_PARAM['flg_route']==1&&listMlocalArray[0].pos.x!=null&&listMlocalArray[0].pos.y!=null){displayRoute(listMlocalArray[0],listMlocalArray[0].id,"search");}
var cb;if(cb=MEvent.hash[mm.id+"searchcomplete"]){for(var i in cb){if(!cb.hasOwnProperty(i))continue;cb[i].call(mm,_json_dom_land.hit,CONFIG_PARAM.vp,1,1,1,_json_dom_land.hit,false,false);}}}
else if(listLandMarkArray.length!=0&&listLandMarkArray[0].id!='notFound'){poib.build(listLandMarkArray);if(CONFIG_PARAM['flg_route']==1&&listLandMarkArray[0].pos.x!=null&&listLandMarkArray[0].pos.y!=null){displayRoute(listLandMarkArray[0],0,"search");}
var cb;if(cb=MEvent.hash[mm.id+"searchcomplete"]){for(var i in cb){if(!cb.hasOwnProperty(i))continue;cb[i].call(mm,_json_dom_land.hit,CONFIG_PARAM.vp,1,1,1,_json_dom_land.hit,false,false);}}}
else if(listMblockArray.length!=0&&listMblockArray[0].id!='notFound'){if(b__json_length!=0){poib.build(listMblockArray,new ListPager(lp,""));if(CONFIG_PARAM['flg_route']==1&&listMblockArray[0].pos.x!=null&&listMblockArray[0].pos.y!=null){displayRoute(listMblockArray[0],0,"search");}}else{poib.build(listMblockArray);}}
else{poib.build(listLandMarkArray);var cb;if(cb=MEvent.hash[mm.id+"searchcomplete"]){for(var i in cb){if(!cb.hasOwnProperty(i))continue;cb[i].call(mm,0,CONFIG_PARAM.vp,1,0,0,0,false,false);}}}
poib.show();}
else if(cdisp[0].toUpperCase()=='ALPS'&&cdisp[1].toUpperCase()=='MLOCAL'){if(listLandMarkArray.length!=0&&listLandMarkArray[0].id!='notFound'){poib.build(listLandMarkArray.concat(listMlocalArray));if(CONFIG_PARAM['flg_route']==1&&listLandMarkArray[0].pos.x!=null&&listLandMarkArray[0].pos.y!=null){displayRoute(listLandMarkArray[0],0,"search");}}
else if(listMlocalArray.length!=0&&listMlocalArray[0].id!='notFound'){poib.build(listMlocalArray);if(CONFIG_PARAM['flg_route']==1&&listMlocalArray[0].pos.x!=null&&listMlocalArray[0].pos.y!=null){displayRoute(listMlocalArray[0],listMlocalArray[0].id,"search");}}
else if(listMblockArray.length!=0&&listMblockArray[0].id!='notFound'){if(b__json_length!=0){poib.build(listMblockArray,new ListPager(lp,''));if(CONFIG_PARAM['flg_route']==1&&listMblockArray[0].pos.x!=null&&listMblockArray[0].pos.y!=null){displayRoute(listMblockArray[0],0,"search");}}}
else{poib.build(listLandMarkArray);}
poib.show();}}
else{if(listLandMarkArray.length!=0&&listLandMarkArray[0].id!='notFound'){poib.build(listLandMarkArray.concat(listMlocalArray));if(CONFIG_PARAM['flg_route']==1&&listLandMarkArray[0].pos.x!=null&&listLandMarkArray[0].pos.y!=null){displayRoute(listLandMarkArray[0],0,"search");}}
else if(listMlocalArray.length!=0&&listMlocalArray[0].id!='notFound'){poib.build(listMlocalArray);if(CONFIG_PARAM['flg_route']==1&&listMlocalArray[0].pos.x!=null&&listMlocalArray[0].pos.y!=null){displayRoute(listMlocalArray[0],listMlocalArray[0].id,"search");}}
else if(listMblockArray.length!=0&&listMblockArray[0].id!='notFound'){if(b__json_length!=0){poib.build(listMblockArray,new ListPager(lp,''));if(CONFIG_PARAM['flg_route']==1&&listMblockArray[0].pos.x!=null&&listMblockArray[0].pos.y!=null){displayRoute(listMblockArray[0],0,"search");}}else{poib.build(listMblockArray);}
poib.show();}}}
else if(_MLOCAL_TAG!=''){if(CONFIG_PARAM['content_display']&&CONFIG_PARAM['content_display'].toUpperCase().match(/MLOCAL/)){poib.build(listMlocalArray,new ListPager(lp,''));if(listMlocalArray.length!=0){if(listMlocalArray[0].id!='notFound'){if(CONFIG_PARAM['flg_route']==1&&listMlocalArray[0].pos.x!=null&&listMlocalArray[0].pos.y!=null){displayRoute(listMlocalArray[0],listMlocalArray[0].id,"search");}
poib.show();}
else{poib.showList();}}else{}}}
else if(mblock_grp!=''){if(b__json_length!=0&&listMblockArray[0].id!='notFound'){poib.build(listMblockArray,new ListPager(lp,''));if(CONFIG_PARAM['flg_route']==1&&listMblockArray[0].pos.x!=null&&listMblockArray[0].pos.y!=null){displayRoute(listMblockArray[0],0,"search");}
poib.show();}else{poib.showList();}}
else if(_GNR_CODE!=''){if(CONFIG_PARAM['content_display']&&CONFIG_PARAM['content_display'].toUpperCase().match(/ALPS/)){poib.build(listLandMarkArray);if(listLandMarkArray.length!=0){if(listLandMarkArray[0].id!='notFound'){if(CONFIG_PARAM['flg_route']==1&&listLandMarkArray[0].pos.x!=null&&listLandMarkArray[0].pos.y!=null){displayRoute(listLandMarkArray[0],0,"search");}
var cb;if(cb=MEvent.hash[mm.id+"searchcomplete"]){for(var i in cb){if(!cb.hasOwnProperty(i))continue;cb[i].call(mm,_json_dom_land.hit,CONFIG_PARAM.vp,1,1,1,_json_dom_land.hit,false,false);}}
poib.show();}
else{poib.showList();}}}}
resizeGenreList();if(_GNR_CODE==''){var cb;if(cb=MEvent.hash[mm.id+"searchcomplete"]){for(var i in cb){if(!cb.hasOwnProperty(i))continue;cb[i].call(mm,poib.listPager.hit,poib.listPager.pm,poib.listPager.page,poib.listPager.pageMax,poib.listPager.startIndex,poib.listPager.endIndex,poib.listPager.prevAble,(poib.listPager.hit==0)?false:poib.listPager.nextAble);}}}
SEARCH_COMP_FLG=true;return;};function checkPoiSearchFlg(){if(!CONFIG_PARAM["poi_search_flg"]||CONFIG_PARAM["poi_search_flg"]==""){return true;}else{var s_flg=eval(CONFIG_PARAM["poi_search_flg"]);if(typeof(s_flg)!="object"||s_flg.length!=10)return true;else if(s_flg=="-1,-1,-1,-1,-1,-1,-1,-1,-1,-1")return null;else{var z=mm.getZoomLevel();for(var i=0;i<10;i++){if(i==z&&s_flg[z]==1)return true;}
return false;}}};function setPoiAction(){if(!CONFIG_PARAM["poi_icon_pattern"]||CONFIG_PARAM["poi_icon_pattern"]==""){POI.DEFAULT_ICON_PATTERN_MAP=DEFAULT_ICON_PATTERN;}else{try{var iconAction=eval(CONFIG_PARAM["poi_icon_pattern"]);if(typeof(iconAction)!="object"||iconAction.length!=10){POI.DEFAULT_ICON_PATTERN_MAP=DEFAULT_ICON_PATTERN;}else{POI.DEFAULT_ICON_PATTERN_MAP=iconAction;}}catch(e){POI.DEFAULT_ICON_PATTERN_MAP=DEFAULT_ICON_PATTERN;}}
if(!CONFIG_PARAM["poi_listitem_pattern"]||CONFIG_PARAM["poi_listitem_pattern"]==""){POI.DEFAULT_LISTITEM_PATTERN_MAP=DEFAULT_LISTITEM_PATTERN;}else{try{var listAction=eval(CONFIG_PARAM["poi_listitem_pattern"]);if(typeof(listAction)!="object"||listAction.length!=10){POI.DEFAULT_LISTITEM_PATTERN_MAP=DEFAULT_LISTITEM_PATTERN;}else{POI.DEFAULT_LISTITEM_PATTERN_MAP=listAction;}}catch(e){POI.DEFAULT_LISTITEM_PATTERN_MAP=DEFAULT_LISTITEM_PATTERN;}}};function resizeGenreList(){if(!mm||!CONFIG_PARAM["flg_resize"]||CONFIG_PARAM["flg_resize"]==""||!document.getElementById(genrelistID))return;if(CONFIG_PARAM["flg_resize"]==1&&document.getElementById(genrelistID)){if(typeof(resizeGenreListAndFilter)=="function"){resizeGenreListAndFilter();}else{document.getElementById(genrelistID).style.height=mm.div.offsetHeight;}
var list=document.getElementById("genrelist");if(list)list.style.overflow="auto";}};function setLandMarkList(poidata){this.id=poidata.id;if(this.id=='notFound')return;if(poidata.gname.indexOf('<!-- CR -->')!=-1){if(poidata.gname=='<!-- CR -->'){this.title='';}
else{this.title=poidata.gname.replace("<!-- CR -->","<BR>");}}else{this.title=poidata.gname;}
this.item_name=this.title.replace("<BR>","");if(this.item_name.length>15){this.item_name=this.item_name.substring(0,15)+'...';}
this.text=poidata.category;this.pos=new MPoint(poidata.el,poidata.nl);this.opetype='alps';this.address='';this.icon=new Object();if(!CONFIG_PARAM['landmark_icon_width']){CONFIG_PARAM['landmark_icon_width']=null;}
if(!CONFIG_PARAM['landmark_icon_height']){CONFIG_PARAM['landmark_icon_height']=null;}
if(poidata.gcode!='000'){this.icon.src=CONFIG_PARAM['FRONT_URL']+_GNR_ICON[poidata.gcode];this.icon.width=CONFIG_PARAM['landmark_icon_width'];this.icon.height=CONFIG_PARAM['landmark_icon_height'];}else{if(_GNR_ICON[poidata.s_grp]){this.icon.src=CONFIG_PARAM['FRONT_URL']+_GNR_ICON[poidata.s_grp];this.icon.width=CONFIG_PARAM['landmark_icon_width'];this.icon.height=CONFIG_PARAM['landmark_icon_height'];}else{this.icon.src=CONFIG_PARAM['FRONT_URL']+poidata.iconfile.slice(1,poidata.iconfile.length);if((typeof(poidata.iconwidth)!='undefined'&&typeof(poidata.iconheight)!='undefined')&&(poidata.iconwidth>1&&poidata.iconheight>1)){this.icon.width=poidata.iconwidth;this.icon.height=poidata.iconheight;}else{this.icon.width=CONFIG_PARAM['landmark_icon_width'];this.icon.height=CONFIG_PARAM['landmark_icon_height'];}}}
this.iconAnchor=new MPoint(this.icon.width/2,this.icon.height/2);this.image=new Object();this.image.src='';this.image.height='';this.image.width='';this.image.l_width='';this.image.l_height='';this.link=poidata.link;this.leg=poidata.leg;};function setMlocalList(poidata){this.id=poidata.id;if(this.id=='notFound')return;if(poidata.title.indexOf('<!-- CR -->')!=-1){if(poidata.title=='<!-- CR -->'){this.title='';}
else{this.title=poidata.title.replace("<!-- CR -->","<BR>");}}else{this.title=poidata.title;}
this.item_name=poidata.title;this.item_name=this.title.replace("<BR>","");this.text=poidata.text;if(this.item_name.length>15){this.item_name=this.item_name.substring(0,15)+'...';}
if(this.text.length>15){this.text=this.text.substring(0,35)+'...';}
if(poidata.x!=''&&poidata.y!=''){this.pos=new MPoint(poidata.x/3600000,poidata.y/3600000);}else{this.pos=new MPoint(null,null);}
this.opetype='mlocal';this.address=poidata.address;this.icon=new Object();if(!CONFIG_PARAM['landmark_icon_width']){CONFIG_PARAM['landmark_icon_width']=null;}
if(!CONFIG_PARAM['landmark_icon_height']){CONFIG_PARAM['landmark_icon_height']=null;}
this.icon.src=poidata.iconl;if(poidata.iconlh==''&&poidata.iconlw==''){this.icon.width=CONFIG_PARAM['landmark_icon_width'];this.icon.height=CONFIG_PARAM['landmark_icon_height'];}else{this.icon.width=poidata.iconlw;this.icon.height=poidata.iconlh;}
this.iconAnchor=new MPoint(this.icon.width/2,this.icon.height/2);this.image=new Object();this.image.src=poidata.pcrimgurl;this.image.height=poidata.pcrimgH;this.image.width=poidata.pcrimgW;if(this.image.src==''){this.image.src='/img/all/maps/noimage50.gif';this.image.l_width=50;this.image.l_height=50;}else{if(poidata.pcrimgH==0&&poidata.pcrimgW==0){this.image.l_width=45;this.image.l_height=50;}else{if(parseInt(poidata.pcrimgH)>parseInt(poidata.pcrimgW)){this.image.l_width=(poidata.pcrimgW/poidata.pcrimgH)*50;this.image.l_height=50;}else{this.image.l_width=50;this.image.l_height=(poidata.pcrimgH/poidata.pcrimgW)*50;}}}
this.link=poidata.link;this.leg='';}
function setMBlockPm(){if(!CONFIG_PARAM["pm"]||CONFIG_PARAM["pm"]==""||isNaN(CONFIG_PARAM["pm"])){CONFIG_PARAM["pm"]=20;}else{CONFIG_PARAM["pm"]=CONFIG_PARAM["pm"];}
if(!CONFIG_PARAM["marge_pm"]||CONFIG_PARAM["marge_pm"]==""||isNaN(CONFIG_PARAM["marge_pm"])){CONFIG_PARAM["marge_pm"]=10;}else{CONFIG_PARAM["marge_pm"]=CONFIG_PARAM["marge_pm"];}};function cb_getNpMBlockParam(data){isJson=false;b__json_dom_land=new Array();b__json_param=new Array();b__json_prop=new Array();b__json_ttl=new Object();if(!data.mbml||!data.mbml.PoiList){b__json_dom_land.push("");b__json_length=0;}else{var poi=data.mbml.PoiList.Poi instanceof Array?data.mbml.PoiList.Poi:[data.mbml.PoiList.Poi];if(poi&&poi!=null){b__json_dom_land.push(poi);if(data.mbml.Property.hit==0&&poi.length==1){b__json_length=0;}else{b__json_length=poi.length;}}}
b__json_param.push(data.mbml.Parameter);b__json_prop.push(data.mbml.Property);b__json_ttl.trans_code=0;if(data.mbml.Property&&data.mbml.Parameter){b__json_ttl.hit=data.mbml.Property.hit;b__json_ttl.vp=data.mbml.Parameter.pm;b__json_ttl.pm=data.mbml.Parameter.pm;b__json_ttl.page=data.mbml.Property.start;}
CONFIG_PARAM["poiinfo"]=b__json_ttl;setGenreData("","",b__json_dom_land,genrelistID);showGenreData(b__json_ttl);hideSearchImage();};function cb_getNpMBlockMlocalParam(data){isJson=false;b__json_dom_land=new Array();b__json_param=new Array();b__json_prop=new Array();b__json_ttl=new Object();m__json_dom_land=new Object();if(!data.mbml||!data.mbml.PoiList){b__json_dom_land.push("");b__json_length=0;}else{var poi=data.mbml.PoiList.Poi instanceof Array?data.mbml.PoiList.Poi:[data.mbml.PoiList.Poi];if(poi&&poi!=null){b__json_dom_land.push(poi);if(data.mbml.Property.hit==0&&poi.length==1){b__json_length=0;}else{b__json_length=poi.length;}}}
b__json_param.push(data.mbml.Parameter);b__json_prop.push(data.mbml.Property);b__json_ttl.trans_code=0;if(data.mbml.Property&&data.mbml.Parameter){b__json_ttl.hit=data.mbml.Property.hit;if(data.mbml.Property.hit!=0){b__json_ttl.vp=data.mbml.Parameter.pm;b__json_ttl.pm=data.mbml.Parameter.pm;b__json_ttl.page=data.mbml.Property.start;b__json_ttl.hiddenZero=true;}else{b__json_ttl.vp=0;b__json_ttl.pm=0;b__json_ttl.page=0;b__json_ttl.hiddenZero=false;}}
if(data.mbml&&data.mbml.AdvertisementsList&&data.mbml.AdvertisementsList.Advertisements){var Advertisementsjson=data.mbml.AdvertisementsList.Advertisements;m__json_dom_land.required=Advertisementsjson.total_required_count;m__json_dom_land.hit=Advertisementsjson.total_available_count;m__json_dom_land.return_count=Advertisementsjson.total_returned_count;b__json_ttl.return_count=Advertisementsjson.total_returned_count;m__json_dom_land.page_number=Advertisementsjson.returned_page_number;m__json_dom_land.start_index=Advertisementsjson.start_index;m__json_dom_land.end_index=Advertisementsjson.end_index;m__json_dom_land.item=new Array();if(Advertisementsjson.advertisement){for(i=0;i<Advertisementsjson.advertisement.length;i++){var ad=Advertisementsjson.advertisement[i];var mjson=new Object();mjson.id=ad.ad_id;if(ad.mas_flag==1){mjson.isgps="0";}else{mjson.isgps="1";}
mjson.free_flag=ad.free_flag;mjson.keyword=ad.ad_category_code;if(ad.longitude_japan_dec){mjson.x=Math.round(ad.longitude_japan_dec*60*60*1000);}
if(ad.latitude_japan_dec){mjson.y=Math.round(ad.latitude_japan_dec*60*60*1000);}
mjson.nl10=ad.latitude_japan_dec;mjson.el10=ad.longitude_japan_dec;mjson.nl60=ad.latitude_japan_dms;mjson.el60=ad.longitude_japan_dms;var address=ad.shop_pref+ad.shop_city+ad.shop_town+ad.shop_address;mjson.address=address;mjson.address2=address;mjson.tel=ad.shop_telephone;mjson.title=ad.ad_title;mjson.title2=ad.ad_title;mjson.text=ad.ad_description;mjson.ppc=ad.shop_ppcall_number;mjson.pcrimgurl=ad.ad_image_url;mjson.pcrimgH=ad.ad_image_height;mjson.pcrimgW=ad.ad_image_width;mjson.iconl=(ad.ad_pict_url&&!ad.ad_pict_url instanceof Object)?ad.ad_pict_url:ad.ad_icon_url;mjson.iconlh=(ad.ad_pict_heigth&&!ad.ad_pict_url instanceof Object)?ad.ad_pict_height:ad.ad_icon_height;mjson.iconlw=(ad.ad_pict_width&&!ad.ad_pict_url instanceof Object)?ad.ad_pict_width:ad.ad_icon_width;mjson.link=ad.ad_link_url;mjson.link2=ad.ad_link_url;m__json_dom_land.item.push(mjson);}}}
if(m__json_dom_land.item.length==0){setGenreData("","",b__json_dom_land,genrelistID);}else if(b__json_dom_land==""){setGenreData("",m__json_dom_land,"",genrelistID);}else{setGenreData("",m__json_dom_land,b__json_dom_land,genrelistID);}
if(m__json_dom_land.return_count==0&&data.mbml.Property.hit==0){b__json_ttl.hiddenZero=true;}
CONFIG_PARAM["poiinfo"]=b__json_ttl;showGenreData(b__json_ttl);hideSearchImage();};function getGrpAndSearchstr(url){if(url.indexOf("?")==-1){return;}
var request=url.split("?")[1];var param=request.split("&");for(var i=0;i<param.length;i++){if(param[i].indexOf("grp")!=-1)_MBLOCK_CODE=param[i];if(param[i].indexOf("search_str01")!=-1)_MBLOCK_CODE+=param[i];}};function setMBlockList(poidata){if(mblock_grp.indexOf("station01")!=-1){this.id=poidata.id;if(this.id=='notFound')return;this.name=poidata.name;this.title=poidata.name;this.item_name=poidata.name;if(this.item_name.length>15){this.item_name=this.item_name.substring(0,15)+'...';}
this.address=poidata.address;this.gcode=poidata.gcode;this.link="";this.text="";this.nl=poidata.nl;this.el=poidata.el;this.pos=new MPoint(this.el,this.nl);this.icon=new Object();this.icon.src=poidata.icon;this.icon.src=CONFIG_PARAM['FRONT_URL']+_GNR_ICON["stationall"];if(!CONFIG_PARAM['landmark_icon_width']||CONFIG_PARAM['landmark_icon_width']==""||!CONFIG_PARAM['landmark_icon_height']||CONFIG_PARAM['landmark_icon_height']=="")return;this.icon.width=CONFIG_PARAM['landmark_icon_width'];this.icon.height=CONFIG_PARAM['landmark_icon_height'];this.iconAnchor=new MPoint(this.icon.width/2,this.icon.height/2);this.image=new Object();this.image.src="";this.image.width="";this.image.height="";this.leg=poidata.leg;this.opetype='alps';}else{this.id=poidata.id;if(this.id=='notFound')return;this.name=poidata.name;this.title=poidata.name;this.item_name=poidata.name;if(this.item_name.length>15){this.item_name=this.item_name.substring(0,15)+'...';}
this.address=poidata.address;this.gcode=poidata.gcode;this.link=poidata.link;this.text=poidata.text;if(this.text.length>15){this.text=this.text.substring(0,35)+'...';}
this.nl=poidata.nl;this.el=poidata.el;this.pos=new MPoint(this.el,this.nl);this.icon=new Object();this.iconid=poidata.iconid;this.icon.src=poidata.icon;if(this.icon.src==""){}
if(poidata.iconwidth==0||poidata.iconheight==0||typeof(poidata.iconwidth)=="undefined"||typeof(poidata.iconheight)=="undefined"){return;}else{this.icon.width=poidata.iconwidth;this.icon.height=poidata.iconheight;}
this.iconAnchor=new MPoint(this.icon.width/2,this.icon.height/2);this.image=new Object();this.image.src=poidata.image;this.image.width=poidata.imagewidth;this.image.height=poidata.imageheight;if(this.image.src==""||typeof(this.image.src)=="undefined"){this.image.src="/img/all/maps/noimage50.gif";this.image.id="noimage";this.image.l_width=50;this.image.l_height=50;}else{if(poidata.imagewidth==0||poidata.imageheight==0||typeof(poidata.imagewidth)=="undefined"||typeof(poidata.imageheight)=="undefined"){this.image.l_width=45;this.image.l_height=50;}else{if(parseInt(poidata.imagewidth)>parseInt(poidata.imageheight)){this.image.l_width=(poidata.imagewidth/poidata.imageheight)*50;this.image.l_height=50;}else{this.image.l_width=50;this.image.l_height=(poidata.imageheight/poidata.imagewidth)*50;}}}
this.leg=poidata.leg;this.opetype='mblock';}};function getPrevBlock(data){var url=b__json_url;b__json_url="";if(url.indexOf("?")==-1)return;var requestUrl="";requestUrl=url.split("?")[0];var req="";req=url.split("?")[1];var param=new Array();if(req.indexOf("&")!=-1){param=req.split("&");}
for(var i=0;i<param.length;i++){var paramstr=param[i].split("=");if(requestUrl.indexOf("grp")==-1)requestUrl+="?"+param[i];if(paramstr[0]=="el")requestUrl+="&"+param[i];if(paramstr[0]=="nl")requestUrl+="&"+param[i];if(paramstr[0]=="minel")requestUrl+="&"+param[i];if(paramstr[0]=="minnl")requestUrl+="&"+param[i];if(paramstr[0]=="maxel")requestUrl+="&"+param[i];if(paramstr[0]=="maxnl")requestUrl+="&"+param[i];if(paramstr[0]=="scl")requestUrl+="&"+param[i];if(paramstr[0]=="sgrp")requestUrl+="&"+param[i];if(paramstr[0]=="pm")requestUrl+="&"+param[i];if(paramstr[0]=="ie")requestUrl+="&"+param[i];if(paramstr[0]=="oe")requestUrl+="&"+param[i];if(paramstr[0]=="vo")requestUrl+="&"+param[i];if(paramstr[0]=="json")requestUrl+="&"+param[i];if(paramstr[0]=="callback")requestUrl+="&"+param[i];if(paramstr[0]=="search_str01")requestUrl+="&"+param[i];if(paramstr[0]=="start"){var start=parseInt(param[i].replace(/start=/g,""))-1;}
if(paramstr[0]=="site_id")requestUrl+="&"+param[i];if(paramstr[0]=="site_pw")requestUrl+="&"+param[i];if(paramstr[0]=="cate_code")requestUrl+="&"+param[i];if(paramstr[0]=="req_count")requestUrl+="&"+param[i];if(paramstr[0]=="mas_flag")requestUrl+="&"+param[i];if(paramstr[0]=="over_dist")requestUrl+="&"+param[i];}
requestUrl+="&start="+start;blockPrevAndNext(requestUrl);};function getNextBlock(data){var url=b__json_url;b__json_url="";if(url.indexOf("?")==-1)return;var requestUrl="";requestUrl=url.split("?")[0];var req="";req=url.split("?")[1];var param=new Array();if(req.indexOf("&")!=-1){param=req.split("&");}
for(var i=0;i<param.length;i++){var paramstr=param[i].split("=");if(requestUrl.indexOf("grp")==-1)requestUrl+="?"+param[i];if(paramstr[0]=="el")requestUrl+="&"+param[i];if(paramstr[0]=="nl")requestUrl+="&"+param[i];if(paramstr[0]=="minel")requestUrl+="&"+param[i];if(paramstr[0]=="minnl")requestUrl+="&"+param[i];if(paramstr[0]=="maxel")requestUrl+="&"+param[i];if(paramstr[0]=="maxnl")requestUrl+="&"+param[i];if(paramstr[0]=="scl")requestUrl+="&"+param[i];if(paramstr[0]=="sgrp")requestUrl+="&"+param[i];if(paramstr[0]=="pm")requestUrl+="&"+param[i];if(paramstr[0]=="ie")requestUrl+="&"+param[i];if(paramstr[0]=="oe")requestUrl+="&"+param[i];if(paramstr[0]=="vo")requestUrl+="&"+param[i];if(paramstr[0]=="json")requestUrl+="&"+param[i];if(paramstr[0]=="callback")requestUrl+="&"+param[i];if(paramstr[0]=="search_str01")requestUrl+="&"+param[i];if(paramstr[0]=="start"){var start=parseInt(param[i].replace(/start=/g,""))+1;}
if(paramstr[0]=="site_id")requestUrl+="&"+param[i];if(paramstr[0]=="site_pw")requestUrl+="&"+param[i];if(paramstr[0]=="cate_code")requestUrl+="&"+param[i];if(paramstr[0]=="req_count")requestUrl+="&"+param[i];if(paramstr[0]=="mas_flag")requestUrl+="&"+param[i];if(paramstr[0]=="over_dist")requestUrl+="&"+param[i];}
requestUrl+="&start="+start;blockPrevAndNext(requestUrl);};function blockPrevAndNext(url){showSearchImage();mm.moving=true;b__json_url=url;setTimeout(function(){var jsonRequest=new JSONscriptRequest(url,"EUC-JP");jsonRequest.buildScriptTag();jsonRequest.addScriptTag();},100);mm.moving=false;};function displayRoute(_object,_number,_event){if(search_api_type=="rangeinfo")return;if(search_api_type=="block_poiwithin")return;if(route_object==null){route_object=new CMSRoute();}
route_object.setObjectData(_object,_number);route_object.showHideRouteInit();showHideRoute(_event);};function CMSRoute(){this.obj=null;this.id=null;this.pos=null;this.sp=null;this.ep=null;this.url=null;this.data=null;this.points=new Array();this.lineObj=new Array();this.flg=false;this.drawTimeout=null;this.nocheckbox_disp_flg=false;};CMSRoute.prototype.setObjectData=function(_object,_id){this.scl=mm.getZoomLevel();this.id=_id;if(_object==""){var checkArray=new Array();if(listLandMarkArray.length>0&&listMlocalArray.length>0){checkArray=listLandMarkArray.concat(listMlocalArray);}else if(listMblockArray.length>0&&listMlocalArray.length>0){checkArray=listMblockArray.concat(listMlocalArray);}else if(listLandMarkArray.length>0){checkArray=listLandMarkArray;}else if(listMlocalArray.length>0){checkArray=listMlocalArray;}else if(listMblockArray.length>0){checkArray=listMblockArray;}
for(var i in checkArray){if(this.id==checkArray[i].id){this.obj=checkArray[i];}}}else{this.obj=_object;}
this.id=this.obj.opetype+'_'+this.id;};CMSRoute.prototype.showHideRouteInit=function(){if(this.init_flg)return;if(document.getElementById("route_check")){var check=document.getElementById("route_check");if(!CONFIG_PARAM["flg_route_init"]||CONFIG_PARAM["flg_route_init"]==""||CONFIG_PARAM["flg_route_init"]==1){check.checked=true;}else if(CONFIG_PARAM["flg_route_init"]==0){check.checked=false;}else{check.checked=true;}}
this.init_flg=true;};CMSRoute.prototype.setSpAndEp=function(){var cpos=mm.getCenterLatLng();if(CONFIG_PARAM['icon_center_flg']==1){this.sp=CMSCommon.change10to60(cpos.y)+","+CMSCommon.change10to60(cpos.x);}else{if(default_url.icon.length!=0&&markerA.legnth!=0&&POI_PARAM["EL_0"]&&POI_PARAM["NL_0"]){if(POI_PARAM["EL_0"].toString().indexOf("/")!=-1&&POI_PARAM["NL_0"].toString().indexOf("/")!=-1){this.sp=POI_PARAM["NL_0"]+","+POI_PARAM["EL_0"];}else if(POI_PARAM["EL_0"].toString().indexOf(".")!=-1&&POI_PARAM["NL_0"].toString().indexOf(".")!=-1){this.sp=CMSCommon.change10to60(POI_PARAM["NL_0"])+","+CMSCommon.change10to60(POI_PARAM["EL_0"]);}else{this.sp=CMSCommon.change10to60(markerA[0].rpos.y)+","+CMSCommon.change10to60(markerA[0].rpos.x);}}else{this.sp=CMSCommon.change10to60(cpos.y)+","+CMSCommon.change10to60(cpos.x);}}
this.ep=CMSCommon.change10to60(this.obj.pos.y)+","+CMSCommon.change10to60(this.obj.pos.x);};CMSRoute.prototype.setRequestUrl=function(){if(this.sp==null||this.ep==null)return;this.url=CONFIG_PARAM['MAP_URL'];this.url+="grp=asp_route";this.url+="&uc=30";this.url+="&sp="+this.sp;this.url+="&ep="+this.ep;if(CONFIG_PARAM['route_rp']){this.url+="&rp="+CONFIG_PARAM['route_rp'];}else{this.url+="&rp=out:2";}};CMSRoute.prototype.createRequest=function(){if(this.url==null)return;var httpobj=CMSCommon.createHttpRequest();httpobj.open("GET",this.url,false);httpobj.send(null);if(httpobj.readyState==4||httpobj.state==200||httpobj.state==304){this.data=httpobj.responseXML;if(typeof(this.data)=="undefined")return;this.getRouteItem(this.data);}};CMSRoute.prototype.getRouteItem=function(ad){if(search_api_type=="rangeinfo")return;if(search_api_type=="block_poiwithin")return;if(!ad||!ad.getElementsByTagName('routing').item(0)){this.points=new Array();this.drawRemoveRoute(false);return;}
var sp=ad.getElementsByTagName('sp').item(0).firstChild.nodeValue.split(';');var ep=ad.getElementsByTagName('ep').item(0).firstChild.nodeValue.split(';');var rp=new Array();var rpNl=new Array();var rpEl=new Array();var rpLen=ad.getElementsByTagName('rp').length;this.points=new Array();for(var i=0;i<rpLen;i++){if(i%2==0){if(ad.getElementsByTagName('rp').item(i+1)!=null){rp[i]=ad.getElementsByTagName('rp').item(i).firstChild.nodeValue.split(';');this.points.push(new MPoint(CMSCommon.change60to10(rp[i][1]).toString(),CMSCommon.change60to10(rp[i][0]).toString()));}}else if(i%2==1){rp[i]=ad.getElementsByTagName('rp').item(i).firstChild.nodeValue.split(';');this.points.push(new MPoint(CMSCommon.change60to10(rp[i][1]).toString(),CMSCommon.change60to10(rp[i][0]).toString()));}}
this.points.unshift(new MPoint(CMSCommon.change60to10(sp[1]).toString(),CMSCommon.change60to10(sp[0]).toString()));this.points.push(new MPoint(CMSCommon.change60to10(ep[1]).toString(),CMSCommon.change60to10(ep[0]).toString()));this.pos=this.obj.pos.x+','+this.obj.pos.y;};CMSRoute.prototype.checkPoiOnMap=function(){if(markerA.length==0)return;if(!this.points||this.points.length==0)return;var marker=new MPoint(CMSCommon.change60to10(POI_PARAM['EL_0']),CMSCommon.change60to10(POI_PARAM['NL_0']));var poi=new MPoint(CMSCommon.change60to10(this.ep.split(",")[1]),CMSCommon.change60to10(this.ep.split(",")[0]));var bounds=mm.getBoundsLatLng();var range=new MBox(bounds.minX,bounds.minY,bounds.maxX,bounds.maxY);var flg_marker=range.contains(marker);var flg_poi=range.contains(poi);if(!document.getElementById("route_check")){if(!CONFIG_PARAM["flg_route_init"]||CONFIG_PARAM["flg_route_init"]==""||CONFIG_PARAM["flg_route_init"]==1){if(flg_marker||flg_poi)return true;}else if(CONFIG_PARAM["flg_route_init"]==0&&route_object.nocheckbox_disp_flg){if(flg_marker||flg_poi)return true;}}else{var check=document.getElementById("route_check");if(check.checked==true){if(flg_marker||flg_poi)return true;}}
return false;};CMSRoute.prototype.drawLine=function(){if(search_api_type=="rangeinfo")return;if(search_api_type=="block_poiwithin")return;this.removeRoute();if(this.drawTimeout!=null)clearTimeout(this.drawTimeout);this.drawTimeout=setTimeout(function(){route_object.drawLineMain();route_object.drawTimeout=null;},100);};CMSRoute.prototype.drawLineMain=function(){var pos=new Array();if(this.lineObj==null)this.lineObj=new Array();if(!this.points||this.points.length==0)return;if(typeof(poib.pois[0])=="undefined"||poib.pois[0].id=="notFound")return;for(var cnt=1;cnt<this.points.length;cnt++){var iline=intersection(this.points[cnt-1],this.points[cnt]);if(iline=="")continue;var aPos=iline.split(":");pos.push(new MPoint(parseFloat(aPos[0]),parseFloat(aPos[1])));pos.push(new MPoint(parseFloat(aPos[2]),parseFloat(aPos[3])));}
var routePolyLine=null;var pos1=new Array();for(var cnt=0;cnt<pos.length;cnt+=2){if(pos1.length==0){pos1.push(pos[cnt]);pos1.push(pos[cnt+1]);}else{if(pos1[pos1.length-1].x==pos[cnt].x&&pos1[pos1.length-1].y==pos[cnt].y){pos1.push(pos[cnt+1]);}else{routePolyLine=new MPolyline(pos1,CONFIG_PARAM['ROUTE_COLOR'],CONFIG_PARAM['ROUTE_WIDTH']);routePolyLine.div.setAttribute("route",true);this.lineObj.push(routePolyLine);pos1=new Array();pos1.push(pos[cnt]);pos1.push(pos[cnt+1]);}}}
if(pos1=='')return;routePolyLine=new MPolyline(pos1,CONFIG_PARAM['ROUTE_COLOR'],CONFIG_PARAM['ROUTE_WIDTH']);routePolyLine.div.setAttribute("route",true);this.lineObj.push(routePolyLine);for(var ocnt=0;ocnt<this.lineObj.length;ocnt++){if(eval(this.lineObj[ocnt].div.getAttribute("route")))mm.addOverlay(this.lineObj[ocnt]);}
this.flg=true;};CMSRoute.prototype.showRouteDistance=function(){if(search_api_type=="rangeinfo")return;if(search_api_type=="block_poiwithin")return;this.hideRouteErrorMsg();if(this.data==null||!this.data.getElementsByTagName('tdist')||!this.data.getElementsByTagName('tdist').item(0)){this.hideRouteDistance();this.showRouteErrorMsg();return;}
var dist=this.data.getElementsByTagName('tdist').item(0).firstChild.nodeValue;if(dist==null){this.hideRouteDistance();this.showRouteErrorMsg();return;}
if(document.getElementById("route_time")){document.getElementById("route_time").innerHTML=(Math.ceil(dist/80))+"ʬ";}
if(!document.getElementById("route_dist")){return;}
dist=dist.toString();if(dist.indexOf(".")!=-1){dist=dist.replace(/(\d{1,3}(?=(?:\d\d\d)+\.)|\d\d\d(?=\d+$))/g,"$1,");}else{dist=dist.replace(/(\d{1,3}(?=(?:\d\d\d)+$))/g,"$1,");}
this.hideRouteErrorMsg();document.getElementById("route_dist").innerHTML=dist+"m";};CMSRoute.prototype.hideRouteDistance=function(){if(search_api_type=="rangeinfo")return;if(search_api_type=="block_poiwithin")return;this.hideRouteErrorMsg();if(!document.getElementById("route_dist"))return;document.getElementById("route_dist").innerHTML="";if(!document.getElementById("route_time"))return;document.getElementById("route_time").innerHTML="";};CMSRoute.prototype.showRouteErrorMsg=function(){if(search_api_type=="rangeinfo")return;if(search_api_type=="block_poiwithin")return;if(!document.getElementById("route_error"))return;document.getElementById("route_error").style.display='inline';};CMSRoute.prototype.hideRouteErrorMsg=function(){if(search_api_type=="rangeinfo")return;if(search_api_type=="block_poiwithin")return;if(!document.getElementById("route_error"))return;document.getElementById("route_error").style.display='none';};CMSRoute.prototype.removeRoute=function(){if(this.lineObj&&this.lineObj!=""&&this.lineObj.length>0&&this.flg){if(this.lineObj instanceof Array){for(var pcnt=0;pcnt<this.lineObj.length;pcnt++){if(eval(this.lineObj[pcnt].div.getAttribute("route")))mm.removeOverlay(this.lineObj[pcnt]);}
this.lineObj=new Array();}else{mm.removeOverlay(this.lineObj);this.lineObj=null;}
this.flg=false;}};CMSRoute.prototype.drawRemoveRoute=function(_mode){if(this.obj.pos.x==0&&this.obj.pos.y==0){if(this.obj.listBG=="mass"){this.removeRoute();this.hideRouteDistance();return;}
else return;}
switch(_mode){case true:if(this.pos==this.obj.pos.x+','+this.obj.pos.y&&this.scl==mm.getZoomLevel()&&this.flg)break;this.setSpAndEp();this.setRequestUrl();this.createRequest();this.drawLine();this.showRouteDistance();break;case false:this.removeRoute();this.hideRouteDistance();break;}};CMSRoute.prototype.checkResearchRoute=function(){if(listMblockArray==""&&listMlocalArray==""&&listLandMarkArray=="")return;if(route_object==null||route_object==""&&!this.points)return;if(search_api_type=="rangeinfo")return;if(search_api_type=="block_poiwithin")return;if(!document.getElementById("route_check")){if(this.flg){this.researchRoute();}else{this.removeRoute();this.hideRouteDistance();return;}}else{var check=document.getElementById("route_check");if(check.checked==true){this.researchRoute();}else{this.removeRoute();this.hideRouteDistance();}}};CMSRoute.prototype.researchRoute=function(){var pos=mm.getCenterLatLng();var tmp=this.points.toString().split(",");var last_pos=new Object();last_pos.x=tmp[tmp.length-2];last_pos.y=tmp[tmp.length-1];var tmp_id=this.id;this.removeRoute();this.resetData();this.id=tmp_id;if(!this.id||this.id==null){if(listMblockArray.length>0){this.id="mblock_0";}else if(listMlocalArray!=""){this.id="mlocal_0";}else if(listLandMarkArray!=""){this.id="alps_0";}}
this.sp=CMSCommon.change10to60(pos.y)+","+CMSCommon.change10to60(pos.x);this.ep=CMSCommon.change10to60(last_pos.y)+","+CMSCommon.change10to60(last_pos.x);this.setRequestUrl();var redrawTimeout=setTimeout(function(){route_object.createRequest();route_object.drawLine();route_object.showRouteDistance();route_object.flg=true;clearTimeout(redrawTimeout);},200);};CMSRoute.prototype.resetData=function(){this.pos=null;this.sp=null;this.ep=null;this.url=null;this.data=null;this.points=new Array();this.drawTimeout=null;this.nocheckbox_disp_flg=false;};function checkArea(x,y){var mb=mm.getBoundsLatLng();var minLon=mb.minX;var minLat=mb.minY;var maxLon=mb.maxX;var maxLat=mb.maxY;flg=0;if(minLon<=x&&x<=maxLon){flg+=1;}
if(minLat<=y&&y<=maxLat){flg+=2;}
return flg;};function intersection(start,end){var mb=mm.getBoundsLatLng();var minLon=mb.minX;var minLat=mb.minY;var maxLon=mb.maxX;var maxLat=mb.maxY;if(start.x<minLon&&end.x<minLon)return"";if(start.x>maxLon&&end.x>maxLon)return"";if(start.y<minLat&&end.y<minLat)return"";if(start.y>maxLat&&end.y>maxLat)return"";wk_lonlat=new Array();if((end.x-start.x)!=0){var a=(end.y-start.y)/(end.x-start.x);var b=start.y-a*start.x;lat1=a*minLon+b;lon1=minLon;lat2=minLat;lon2=(minLat-b)/a;lat3=a*maxLon+b;lon3=maxLon;lat4=maxLat;lon4=(maxLat-b)/a;if(checkArea(start.x,start.y)==3&&checkArea(end.x,end.y)==3){wk_lonlat.push(start);wk_lonlat.push(end);}else{if(checkArea(lon1,lat1)==3){wk_lonlat.push(new MPoint(lon1,lat1));}
if(checkArea(lon2,lat2)==3){wk_lonlat.push(new MPoint(lon2,lat2));}
if(checkArea(lon3,lat3)==3){wk_lonlat.push(new MPoint(lon3,lat3));}
if(checkArea(lon4,lat4)==3){wk_lonlat.push(new MPoint(lon4,lat4));}}}else{lat1=start.y;lon1=minLon;lat2=minLat;lon2=start.x;lat3=end.y;lon3=maxLon;lat4=maxLat;lon4=end.x;if((checkArea(start.x,start.y)&1)==1){if((checkArea(start.x,start.y)&2)==2){wk_lonlat.push(new MPoint(start.x,start.y));}else{if(start.y<minLat){wk_lonlat.push(new MPoint(start.x,minLat));}else if(start.y>maxLat){wk_lonlat.push(new MPoint(start.x,maxLat));}}}
if((checkArea(end.x,end.y)&1)==1){if((checkArea(end.x,end.y)&2)==2){wk_lonlat.push(new MPoint(end.x,end.y));}else{if(end.y<minLat){wk_lonlat.push(new MPoint(end.x,minLat));}else if(end.y>maxLat){wk_lonlat.push(new MPoint(end.x,maxLat));}}}}
var startLonLat="";var endLonLat="";startLon="";startLat="";endLon="";endLat="";if(wk_lonlat.length!=2){return"";}
else{if(checkArea(start.x,start.y)==3&&checkArea(end.x,end.y)==3){startLonLat=start.x+":"+start.y;endLonLat=end.x+":"+end.y;return startLonLat+":"+endLonLat;}
lon_flg=0;lat_flg=0;if(wk_lonlat[1].x<wk_lonlat[0].x)lon_flg=1;if(wk_lonlat[1].y<wk_lonlat[0].y)lat_flg=1;if((wk_lonlat[0].x<start.x&&start.x<wk_lonlat[1].x)||(wk_lonlat[1].x<start.x&&start.x<wk_lonlat[0].x)){startLon=start.x;}else if(start.x<wk_lonlat[lon_flg].x){startLon=wk_lonlat[lon_flg].x;}else{startLon=wk_lonlat[Math.abs(lon_flg-1)].x;}
if((wk_lonlat[0].y<start.y&&start.y<wk_lonlat[1].y)||(wk_lonlat[1].y<start.y&&start.y<wk_lonlat[0].y)){startLat=start.y;}else if(start.y<wk_lonlat[lat_flg].y){startLat=wk_lonlat[lat_flg].y;}else{startLat=wk_lonlat[Math.abs(lat_flg-1)].y;}
if((wk_lonlat[0].x<end.x&&end.x<wk_lonlat[1].x)||(wk_lonlat[1].x<end.x&&end.x<wk_lonlat[0].x)){endLon=end.x;}else if(end.x<wk_lonlat[lon_flg].x){endLon=wk_lonlat[lon_flg].x;}else{endLon=wk_lonlat[Math.abs(lon_flg-1)].x;}
if((wk_lonlat[0].y<end.y&&end.y<wk_lonlat[1].y)||(wk_lonlat[1].y<end.y&&end.y<wk_lonlat[0].y)){endLat=end.y;}else if(end.y<wk_lonlat[lat_flg].y){endLat=wk_lonlat[lat_flg].y;}else{endLat=wk_lonlat[Math.abs(lat_flg-1)].y;}
startLonLat=startLon+":"+startLat;endLonLat=endLon+":"+endLat}
if(checkArea(start.x,start.y)==3){startLonLat=start.x+":"+start.y;}
if(checkArea(end.x,end.y)==3){endLonLat=end.x+":"+end.y;}
if(startLonLat!=""&&endLonLat!=""){return startLonLat+":"+endLonLat;}
return"";};function showHideRoute(_event){if(search_api_type=="rangeinfo")return;if(search_api_type=="block_poiwithin")return;if(route_object==null)return;route_object.resetData();if(!document.getElementById("route_check")){if(_event=="click"){route_object.drawRemoveRoute(true);route_object.nocheckbox_disp_flg=true;}else if(_event=="search"){if(!CONFIG_PARAM["flg_route_init"]||CONFIG_PARAM["flg_route_init"]==""||CONFIG_PARAM["flg_route_init"]==1){route_object.drawRemoveRoute(true);route_object.nocheckbox_disp_flg=true;}else if(CONFIG_PARAM["flg_route_init"]==0){route_object.drawRemoveRoute(false);route_object.nocheckbox_disp_flg=false;}else{route_object.drawRemoveRoute(true);route_object.nocheckbox_disp_flg=true;}}}else{var check=document.getElementById("route_check");if(check.checked==true){route_object.drawRemoveRoute(true);}else{route_object.drawRemoveRoute(false);}
route_object.nocheckbox_disp_flg=false;}};function setPoiAddress(el,nl,id){if(listLandMarkArray&&listLandMarkArray!=""){if(!listLandMarkArray[id]||listLandMarkArray[id].address==""){getPoiAddress(el,nl);showPoiAddress(id);}
else if(listLandMarkArray[id].address!=""){showPoiAddress(id);return;}}
else if(listMblockArray&&listMblockArray!=""){if(listMblockArray[id].address==""||typeof(listMblockArray[id].address)=="undefined"){getPoiAddress(el,nl);showPoiAddress(id);}
else if(listMblockArray[id].address!=""){showPoiAddress(id);return;}}};function getPoiAddress(el,nl){var pi=new CMS_RequestParam(mm);pi.setParam(CONFIG_PARAM);var url=pi.cf.FRONT_URL+pi.cf.API+"/posInfo?";url+="grp="+pi.cf.grp;url+="&el="+CMSCommon.change10to60(el);url+="&nl="+CMSCommon.change10to60(nl);if(MBrowser.safari){url+='&xcode=utf8';}
url+="&xtype=json";url+="&varname=_json";var httpobj=CMSCommon.createHttpRequest();httpobj.open("GET",url,false);httpobj.send(null);if(httpobj.readyState==4||httpobj.state==200||httpobj.state==304){eval(httpobj.responseText);if(typeof(_json)=='undefined')return;}else{return;}
if(_json[0]&&_json[0].mid.indexOf('errors')!=-1)return;_getPoiAddress(_json);};function _getPoiAddress(json){if(json==null||json=="")return;_landmarkPoiAdd=json.adna2+json.adna3+json.adna4;return _landmarkPoiAdd;};function showPoiAddress(id){if(listLandMarkArray&&listLandMarkArray!=""){if(!listLandMarkArray[id])return;listLandMarkArray[id].address=_landmarkPoiAdd;if(listLandMarkArray[id].address!=null){if(document.getElementById("poi_"+id)){document.getElementById("poi_"+id).innerHTML=listLandMarkArray[id].address;}}}else if(listMblockArray&&listMblockArray!=""){if(!listMblockArray[id])return;listMblockArray[id].address=_landmarkPoiAdd;if(listMblockArray[id].address!=null){if(document.getElementById("poi_"+id)){document.getElementById("poi_"+id).innerHTML=listMblockArray[id].address;}}}};function createSearchImage(){if(!CONFIG_PARAM["searching_image"]||CONFIG_PARAM["searching_image"]=="")return;if(!document.getElementById("map")||document.getElementById("searchImg"))return;if(!document.getElementById('searchDiv')){var grp=CONFIG_PARAM["grp"];if(CONFIG_PARAM["searching_image"].toString().indexOf("|")==-1)return;var search=CONFIG_PARAM["searching_image"].split("|");var img=search[0];var img_w=search[1];img_w=parseInt(img_w/2);var img_h=search[2];img_h=parseInt(img_h/2);if(img_w==""||img_h=="")return;var map_w=parseInt(mm.div.offsetWidth);map_w=parseInt(map_w/2)-img_w;var map_h=parseInt(mm.div.offsetHeight);map_h=parseInt(map_h/2)-img_h;var idiv=document.createElement("DIV");if(MBrowser.ie5up){idiv.id="searchDiv";idiv.align="center";idiv.style.valign="center";idiv.style.position="absolute";idiv.style.left=map_w+"px";idiv.style.top=map_h+"px";idiv.style.zIndex=300;}else{idiv.setAttribute("id","searchDiv");idiv.setAttribute("align","center");idiv.setAttribute("valign","center");idiv.setAttribute("left",map_w);idiv.setAttribute("top",map_h);idiv.setAttribute("style","z-index:300;position:absolute;top:"+map_h+"px; left:"+map_w+"px;");}
if(search[0].match(/^http:/)){idiv.innerHTML='<img src="'+search[0]+'">';}else{idiv.innerHTML='<img src="/custom/'+grp+img+'">';}
idiv.style.visibility="hidden";idiv.style.display="none";document.getElementById("map").appendChild(idiv);}};function showSearchImage(){if(!CONFIG_PARAM["searching_image"]||CONFIG_PARAM["searching_image"]=="")return;if(!document.getElementById("map"))return;if(document.getElementById('searchDiv')){var div=document.getElementById('searchDiv');if(div.style.visibility=="visible"&&div.style.display=="block")return;div.style.visibility="visible";div.style.display="block";if(document.getElementById("genrefilter")){var backLink=document.getElementById("genrefilter").getElementsByTagName("a");if(backLink[0])backLink[0].style.visibility="hidden";}}else return;};function hideSearchImage(){if(!CONFIG_PARAM["searching_image"]||CONFIG_PARAM["searching_image"]=="")return;if(!document.getElementById("map"))return;if(document.getElementById('searchDiv')){var div=document.getElementById('searchDiv');if(div.style.visibility=="hidden"&&div.style.display=="none")return;div.style.visibility="hidden";div.style.display="none";if(document.getElementById("genrefilter")){var backLink=document.getElementById("genrefilter").getElementsByTagName("a");if(backLink[0])backLink[0].style.visibility="visible";}}else return;};function setSearchImagePos(){if(!CONFIG_PARAM["searching_image"]||CONFIG_PARAM["searching_image"]=="")return;if(!document.getElementById("map"))return;if(CONFIG_PARAM["searching_image"].toString().indexOf("|")==-1)return;var search=CONFIG_PARAM["searching_image"].split("|");var img=search[0];var img_w=search[1];img_w=parseInt(img_w/2);var img_h=search[2];img_h=parseInt(img_h/2);if(img_w==""||img_h=="")return;var map_w=parseInt(mm.div.offsetWidth);map_w=parseInt(map_w/2)-img_w;var map_h=parseInt(mm.div.offsetHeight);map_h=parseInt(map_h/2)-img_h;document.getElementById('searchDiv').style.left=map_w+"px";document.getElementById('searchDiv').style.top=map_h+"px";};function showIconNamePopup(poi){if(CONFIG_PARAM["flg_iname"]==1&&markerA.length>0){var Dx=parseInt(poi.data.icon.width/2);var Dy=parseInt(poi.data.icon.height/2);var cpp=mm.r2p(poi.pos);var lt=mm.p2r(new MPoint(cpp.x-Dx,cpp.y-Dx));var rt=mm.p2r(new MPoint(cpp.x+Dx,cpp.y-Dx));var rb=mm.p2r(new MPoint(cpp.x+Dy,cpp.y+Dy));var lb=mm.p2r(new MPoint(cpp.x-Dy,cpp.y+Dy));var markerPos=new Object();markerPos.len=markerA.length;markerPos.id=new Array();markerPos.el=new Array();markerPos.nl=new Array();markerPos.str=new Array();for(var i=0;i<markerPos.len;i++){markerPos.id.push(inameObj.id[i]);markerPos.el.push(inameObj.el[i]);markerPos.nl.push(inameObj.nl[i]);markerPos.str.push(inameObj.str[i]);}
var rangeBox=null;rangeBox=new MBox(lb.x,lb.y,rt.x,rt.y);var c_poi=checkContainPoi(rangeBox,markerPos);if(c_poi.flg.toString()=="true"&&c_poi.str!=""){mm.openInfoWindowHtml(new MPoint(c_poi.el,c_poi.nl),c_poi.str,new MSize(10,10));if(document.getElementById("SingleInfowindow0")){document.getElementById("SingleInfowindow0").onmouseover=function(){mm.closeInfoWindow();}}}}};function checkContainPoi(rangeBox,markerPos){if(rangeBox==null)return true;var c_poi=new Object();c_poi.id=new Array();c_poi.el=new Array();c_poi.nl=new Array();c_poi.str=new Array();c_poi.flg=new Array();for(var i=0;i<markerPos.len;i++){var point=new MPoint(markerPos.el[i],markerPos.nl[i]);c_poi.id.push(markerPos.id[i]);c_poi.el.push(markerPos.el[i]);c_poi.nl.push(markerPos.nl[i]);c_poi.str.push(markerPos.str[i]);c_poi.flg.push(rangeBox.contains(point));return c_poi;}};function poinwOverRide(){if(typeof(POIBuilder.listItemMouseoutHandlerOrg)=="undefined")POIBuilder.listItemMouseoutHandlerOrg=POIBuilder.listItemMouseoutHandler;POIBuilder.listItemMouseoutHandler=function(){}
if(typeof(POIBuilder.prototype.refreshPoisOrg)=="undefined")POIBuilder.prototype.refreshPoisOrg=POIBuilder.prototype.refreshPois;POIBuilder.prototype.refreshPois=function(){var d=this.onMapPois;var l=d.length;for(var i=0;i<l;i++){d[i].refresh();if(typeof(CONFIG_PARAM["conf_flg"])!="undefined"&&CONFIG_PARAM["conf_flg"]==1){check_id=(d[i].data.opetype=='alps')?d[i].data.title+d[i].data.pos.x+d[i].data.pos.y+d[i].data.opetype:((d[i].data.opetype=='cmapion'||d[i].data.opetype=='block_search')?d[i].data.identifier:"");if(d[i].id==this.openPopupPoiID&&d[i].data.opetype!='alps'||check_id==this.openPopupPoiID){d[i].iconOpen(true);if(d[i].data.opetype=='alps')setPoiAddress(d[i].data.pos.x,d[i].data.pos.y,d[i].data.id);}}
else{check_id=(d[i].data.opetype=='alps'||d[i].data.opetype=='cmapion'||d[i].data.opetype=='block_search')?d[i].data.title+d[i].data.pos.x+d[i].data.pos.y+((d[i].data.opetype=='alps'||d[i].data.opetype=='cmapion')?d[i].data.opetype:""):"";if(d[i].id==this.openPopupPoiID&&(d[i].data.opetype!='alps'||d[i].data.opetype=='cmapion'||d[i].data.opetype=='block_search')||check_id==this.openPopupPoiID){d[i].iconOpen(true);if(d[i].data.opetype=='alps'||d[i].data.opetype=='cmapion'||d[i].data.opetype=='block_search')setPoiAddress(d[i].data.pos.x,d[i].data.pos.y,d[i].data.id);}}}}
if(typeof(POI.prototype.iconOpenOrg)=="undefined")POI.prototype.iconOpenOrg=POI.prototype.iconOpen;POI.prototype.iconOpen=function(){var itype=this.getIconType("open");var ltype=this.getListItemType("open");if(itype){if(this.data.opetype=='alps'||this.data.opetype=="cmapion"||this.data.opetype=='block_search'){check_id=this.data.title+this.data.pos.x+this.data.pos.y+this.data.opetype;if(this.poibuilder.openPopupPoiID&&this.poibuilder.openPopupPoiID!=check_id)this.poibuilder.openPopupPoi.iconClose();this.popupState="open";this.iconModify(itype);this.poibuilder.openPopupPoiID=this.data.title+this.data.pos.x+this.data.pos.y+this.data.opetype;}else{if(this.poibuilder.openPopupPoiID&&this.poibuilder.openPopupPoiID!=this.id)this.poibuilder.openPopupPoi.iconClose();this.popupState="open";this.iconModify(itype);this.poibuilder.openPopupPoiID=this.id;}
this.poibuilder.openPopupPoi=this;if(this.mmarker&&this.mmarker.div)this.mmarker.div.style.zIndex=POI.OPEN_ZINDEX;}
if(ltype){this.listItemModify(ltype);}}};function poinwUnOverRide(){if(typeof(POIBuilder.listItemMouseoutHandlerOrg)=="undefined"||typeof(POIBuilder.prototype.refreshPoisOrg)=="undefined"||typeof(POI.prototype.iconOpenOrg)=="undefined")return
POIBuilder.listItemMouseoutHandler=POIBuilder.listItemMouseoutHandlerOrg;POIBuilder.prototype.refreshPois=POIBuilder.prototype.refreshPoisOrg;POI.prototype.iconOpen=POI.prototype.iconOpenOrg;}
function poinwIconOverride(){if(typeof(POIBuilder.iconMouseoverHandlerOrg)=="undefined"){POIBuilder.iconMouseoverHandler=function(e){var attri=POIBuilder.getAttri(e);var poi=POIBuilder.poisHash[this.id.substring(5,this.id.length)];if(poi&&(attri&&typeof(attri)=="string"&&attri.indexOf(poi.id)==-1)||!attri){if(POIBuilder.SAVE_MOVER_ID==poi.id){POIBuilder.SAVE_MOVER_ID=null;}else{poi.iconMouseover();var pb=poi.poibuilder;var detectDiv=pb.detectDiv;var div=poi.mmarker.div;var target=this;MEvent.EventMClickQueue["PmDf"]=1;detectDiv.style.left=(parseInt(div.style.left)-(parseInt(detectDiv.style.width)/2))+"px";detectDiv.style.top=(parseInt(div.style.top)-(parseInt(detectDiv.style.height)/2))+"px";detectDiv.onmousemove=function(e){POIBuilder.iconMouseoutHandler.call(target,e)}
detectDiv.onmouseup={};POIBuilder.map.canvasdiv.appendChild(detectDiv);POIBuilder.showDetectDiv=true;POIBuilder.detectDiv=detectDiv;POIBuilder.SAVE_MOVER_ID=poi.id;showIconNamePopup(poi);}}}}
else{POIBuilder.iconMouseoverHandlerOrg=function(e){var attri=POIBuilder.getAttri(e);var poi=POIBuilder.poisHash[this.id.substring(5,this.id.length)];if(poi&&(attri&&typeof(attri)=="string"&&attri.indexOf(poi.id)==-1)||!attri){if(POIBuilder.SAVE_MOVER_ID==poi.id){POIBuilder.SAVE_MOVER_ID=null;}else{poi.iconMouseover();var pb=poi.poibuilder;var detectDiv=pb.detectDiv;var div=poi.mmarker.div;var target=this;MEvent.EventMClickQueue["PmDf"]=1;detectDiv.style.left=(parseInt(div.style.left)-(parseInt(detectDiv.style.width)/2))+"px";detectDiv.style.top=(parseInt(div.style.top)-(parseInt(detectDiv.style.height)/2))+"px";detectDiv.onmousemove=function(e){POIBuilder.iconMouseoutHandler.call(target,e)}
detectDiv.onmouseup={};POIBuilder.map.canvasdiv.appendChild(detectDiv);POIBuilder.showDetectDiv=true;POIBuilder.detectDiv=detectDiv;POIBuilder.SAVE_MOVER_ID=poi.id;showIconNamePopup(poi);}}}}
if(typeof(POIBuilder.iconMouseoutHandlerOrg)=="undefined"){POIBuilder.iconMouseoutHandler=function(e){var attri=POIBuilder.getAttri(e,((MBrowser.safari||MBrowser.opera95up)?"lmout":null));var poi=POIBuilder.poisHash[this.id.substring(5,this.id.length)];if(poi&&(attri&&typeof(attri)=="string"&&attri.indexOf(poi.id)==-1)||!attri){if(poi)poi.iconMouseout();if(POIBuilder.detectDiv){POIBuilder.map.canvasdiv.removeChild(POIBuilder.detectDiv);POIBuilder.showDetectDiv=false;POIBuilder.detectDiv=null;POIBuilder.SAVE_MOVER_ID=null;delete(MEvent.EventMClickQueue["PmDf"]);}
if(CONFIG_PARAM["flg_iname"]==1&&markerA.length>0){mm.closeInfoWindow();}}}}
else{POIBuilder.iconMouseoutHandlerOrg=function(e){var attri=POIBuilder.getAttri(e,((MBrowser.safari||MBrowser.opera95up)?"lmout":null));var poi=POIBuilder.poisHash[this.id.substring(5,this.id.length)];if(poi&&(attri&&typeof(attri)=="string"&&attri.indexOf(poi.id)==-1)||!attri){if(poi)poi.iconMouseout();if(POIBuilder.detectDiv){POIBuilder.map.canvasdiv.removeChild(POIBuilder.detectDiv);POIBuilder.showDetectDiv=false;POIBuilder.detectDiv=null;POIBuilder.SAVE_MOVER_ID=null;delete(MEvent.EventMClickQueue["PmDf"]);}
if(CONFIG_PARAM["flg_iname"]==1&&markerA.length>0){mm.closeInfoWindow();}}}}};function poinwListOverride(){POIBuilder.prototype.showList=function(pois){var d;var ld=this.listDiv;if(pois=="void"){if(ld){if(this.listItemTemplete&&this.listItemTemplete.nullPoiList){if(typeof(this.listItemTemplete.nullPoiList)=="string"){ld.innerHTML=this.listItemTemplete.nullPoiList;}else if(typeof(this.listItemTemplete.nullPoiList)=="function"){ld.innerHTML=this.listItemTemplete.nullPoiList();}}}
return;}else if(pois){if(!(pois instanceof Array))return;d=pois;}else{d=this.pois;}
var l=d.length;var useStripe=false;var stripeCounter;if(this.stripedListColor&&this.stripedListColor instanceof Array){useStripe=true;stripeCounter=0;stripeArray=this.stripedListColor;stripeLength=this.stripedListColor.length;}
if(ld){ld.innerHTML="";if(this.listMode==POIBuilder.LISTMODE_SELECTBOX){if(l!=0){var divp=document.createElement("div");var divc=document.createElement("div");this.divp=divp;this.divc=divc;divp.style.border="1px solid #0078C8";var obj=this;divp.onclick=function(e){if(obj.selectboxOpen)obj.closeSelectBox();else obj.openSelectBox();};divc.style.borderLeft="1px solid #CFCFCF";divc.style.borderRight="1px solid #CFCFCF";divc.style.borderBottom="1px solid #CFCFCF";this.closeSelectBox();for(var i=0;i<l;i++){divc.appendChild(d[i].listItem);if(useStripe){d[i].listItem.style.backgroundColor=stripeArray[stripeCounter%stripeLength];stripeCounter++;}}
this.selectListItem(d[0],true,false);ld.appendChild(divp);ld.appendChild(divc);}else{}}else{if(l!=0){if(this.listPager&&this.listPagerTemplete){var pagerHDiv=document.createElement("div");var s1=this.listPagerTemplete.headerPagerHTML(this.listPager);if(s1){var s2=this.listPager.regExpReplace(s1);pagerHDiv.innerHTML=s2;ld.appendChild(pagerHDiv);}}
for(var i=0;i<l;i++){ld.appendChild(d[i].listItem);if(useStripe){d[i].listItem.style.backgroundColor=stripeArray[stripeCounter%stripeLength];stripeCounter++;}}
if(this.listPager&&this.listPagerTemplete){var pagerFDiv=document.createElement("div");var s1=this.listPagerTemplete.footerPagerHTML(this.listPager);if(s1){var s2=this.listPager.regExpReplace(s1);pagerFDiv.innerHTML=s2;ld.appendChild(pagerFDiv);}}
this.scrollList(0,true);}else{if(this.listItemTemplete&&this.listItemTemplete.notFoundPoiList){if(typeof(this.listItemTemplete.notFoundPoiList)=="string"){ld.innerHTML=this.listItemTemplete.notFoundPoiList;}else if(typeof(this.listItemTemplete.notFoundPoiList)=="function"){ld.innerHTML=this.listItemTemplete.notFoundPoiList();}}}}}}};
