var x1=0;var y1=0;var tm=0;var lm=0;var tmd=0;var lmd=0;var docm;var tms=0;var lms=0;var docms=false;var map4kf=false;var abuttonf=false;var buttonf=new Array();var mkf='n';var expf=false;var mmf=false;var listmf='n';var facn=new Array();
mapmin=500;
py=pys=mapmin/4000;/*縮尺*/
main_wmax=1050;
h_max=600;
onresize=wresize;/*ウィンドウサイズ変更イベント*/
iconf=new Array(idata.length);/*アイコン表示フラグ*/
listf=new Array(idata.length);/*リスト表示フラグ*/
 /*?MSIE or Opera*/
if(navigator.appName.charAt(0)=="M"&&navigator.userAgent.indexOf("Opera")==-1)navigf='MSIE';
else{ 
if(navigator.userAgent.indexOf("Opera")!=-1)navigf="Opera";
else navigf=false;
 }
 /*マウスイベント*/
document.onmouseup=mouseUp;
document.onmousemove=mouseMove;
 /*マウスホイール*/
var mhf=false;
if(window.addEventListener)window.addEventListener('DOMMouseScroll', wheel, false);
window.onmousewheel=document.onmousewheel=wheel;
//初期設定
function guide_set(){
if(screen.Height<=750){
document.getElementById("butbox").style.width='400px';
document.getElementById("butbox").style.fontSize='12px';
mapmin=400;
py=pys=mapmin/4000;/*縮尺*/
main_wmax=950;
h_max=500;
}
document.getElementById("rmap").style.height=document.getElementById("rmap").style.width=mapmin+"px";//2k縦横
document.getElementById("navi").style.height=document.getElementById("navi").style.width=mapmin+"px";//地図枠縦横
document.getElementById("mapf").style.height=document.getElementById("mapf").style.width=mapmin+"px";//地図枠縦横
document.getElementById("navi").style.top=100+"px";
document.getElementById("s-mapf").style.top=40+"px";
document.getElementById("s-mapf").style.left=10+"px";
document.getElementById("mapf").style.top=0+"px";
document.getElementById("mapf").style.left=0+"px";
document.getElementById("posi").style.top=0+"px";
document.getElementById("posi").style.left=0+"px";
document.getElementById("bari").style.width=80*py+'px';//縮尺棒
document.getElementById("navi").onmousedown=mouseDown;//地図マウスダウン
document.getElementById("s-mapf").onmousedown=mouseDowne;//小地図マウスダウン
document.f1.ret.value="";//検索文字消去
maplef();//地図横位置
 //設備数/*x*/
for(var allfi=0;allfi<=7;allfi++){
 facn[allfi]=0;
 ser_datax=document.getElementById("but"+allfi).innerHTML;
 ser_datax=ser_datax.replace(/\<.*\>/,'');
 ser_datax=ser_datax.replace(/\s/,'');
 ser_data=ser_datax.split('・');
 for(var i in idata){
  serf=false;
  for(var j in ser_data){
   if(idata[i][2].indexOf(ser_data[j])!=-1)serf=true;
   }
  if(serf)facn[allfi]++;
  }
 }//end
var redata=location.search.substring(1);//受信データ
if(redata!='')start_icon(redata);//アイコン表示
}
//ウィンドウサイズ変更→地図横位置設定
function wresize(){keyT=setTimeout("maplef()",1000);}
//地図位置設定
function maplef(){
 //横
if(navigf!='MSIE')bw=Math.floor(window.innerWidth);
else{
bw=Math.floor(window.document.body.clientWidth);
if(isNaN(bw))bw=Math.floor(screen.width*0.9);
else if(bw>=screen.width)bw=Math.floor(screen.width*0.9);
}
if(bw<main_wmax){document.getElementById("main").style.width=main_wmax+'px';plus_w=0;}
else{
 document.getElementById("main").style.width=(bw-16)+'px';
 plus_w=Math.floor((bw-main_wmax)/2);
 }
document.getElementById("butbox").style.left=220+plus_w+"px";
document.getElementById("navi").style.left=220+plus_w+"px";
 //縦
if(navigf!='MSIE')bh=Math.floor(window.innerHeight);
else{
bh=Math.floor(window.document.body.clientHeight);
if(isNaN(bh))bh=Math.floor(screen.Height*0.9);
else if(bh>=screen.Height)bh=Math.floor(screen.Height*0.9);
}
if(bh>=h_max){
 document.getElementById("sepf").style.height=bh-276+"px";
 document.getElementById("con").style.height=bh-116+"px";
 document.getElementById("list").style.height=bh-296+"px";
 }
else{
 document.getElementById("sepf").style.height=h_max-276+"px";
 document.getElementById("con").style.height=h_max-116+"px";
 document.getElementById("list").style.height=h_max-296+"px";
 }
}
//初期アイコン表示
function start_icon(inn){
var data=inn.split('&');
list_html='';
if(data[0]!='s'){
 for(var i in idata){
  for(var j in data){
   if(idata[i][3]==data[j]){
    set_icon(i);
     list_html+=set_list(i);
    if(data.length==1){
     on_mark(i);
     info(i,'s');
     break;
     }
    else{
     document.getElementById("icon"+idata[i][3]).style.zIndex=5;
     }
    }
   }
  icon_q(i);
  }
 document.getElementById("list").innerHTML=list_html;
 }
else{
 data[1]=unescape(data[1]);
document.getElementById("list").innerHTML=data[1];
 for(var i in idata){
  if(idata[i][2].indexOf(data[1])!=-1){
   set_icon(i);
   document.getElementById("icon"+idata[i][3]).style.zIndex=5;
   list_html+=set_list(i);
   }
  icon_q(i);
  }
 document.getElementById("list").innerHTML=list_html;
 }
}
//マウスホイール操作
function wheel(event){
if(mhf){
 var delta=0;
 if (!event)event = window.event;/* For IE. */
 if(event.wheelDelta){delta = event.wheelDelta/120;}/* IE/Opera. */
 else if(event.detail)delta=-event.detail/3;/* Mozilla case. */
 if(delta){
  if(delta<0)magmap("s");/*down*/
  else magmap("b");/*up*/
  }
 if(event.preventDefault)event.preventDefault();
 event.returnValue=false;
 }
}
//地図最小
function allmap(){
py=pys*2;
document.getElementById("mapf").style.top=document.getElementById("mapf").style.left=Math.floor((mapmin-4000*py)/2)+"px";
magmap('s');
}
//地図拡大縮小
function magmap(sob){
//document.f2.tmp.value=py+","+pys;/**/
if(sob=="s"&&py>pys||sob=="b"&&py<1){
 if(sob=="s")document.bs.src="image/buttonsm.gif";
 if(sob=="b")document.bb.src="image/buttonbm.gif";
 if(mmf==false){cent=mapmin/2;cenl=mapmin/2;}
 else {cent=tm;cenl=lm;}
 innt=Math.floor((cent-eval(document.getElementById("mapf").style.top.slice(0,-2)))/py);
 innl=Math.floor((cenl-eval(document.getElementById("mapf").style.left.slice(0,-2)))/py);
 if(sob=="s")py-=pys;
 if(sob=="b")py+=pys;
 py=Math.round(py*10000)/10000;
 document.getElementById("bari").style.width=80*py+'px';//縮尺棒
 innt=cent-Math.floor(innt*py);
 innl=cenl-Math.floor(innl*py);
 if(innt>-5&&innt<5)innt=0;
 if(innl>-5&&innl<5)innl=0;
 m_lmit=-(4000*py-10);
 if(innt<m_lmit)innt=m_lmit;
 else {if(innt>(mapmin-10))innt=(mapmin-10);
  else if(innt>=0&&innt<5)innt=0;
  }
 if(innl<m_lmit)innl=m_lmit;
 else {if(innl>(mapmin-10))innl=(mapmin-10);
  else if(innl>=0&&innl<5)innl=0;
  }
 mpy=Math.floor(4000*py);
 if(!map4kf){
  document.getElementById("rmap").style.height=document.getElementById("rmap").style.width=mpy+"px";//2k縦横
 if(py>0.4){
  document.getElementById("mapf").innerHTML+='<img src="image/map1.jpg" alt="" galleryImg="no" width="0" height="0" id="rmap1" />';
  document.getElementById("mapf").innerHTML+='<img src="image/map2.jpg" alt="" galleryImg="no" width="0" height="0" id="rmap2" />';
  document.getElementById("mapf").innerHTML+='<img src="image/map3.jpg" alt="" galleryImg="no" width="0" height="0" id="rmap3" />';
  if(navigf!="Opera")document.getElementById("mapf").innerHTML+='<img src="image/map4.jpg" alt="" galleryImg="no" width="0" height="0" id="rmap4" onLoad="re_map4k();" />';
  else {document.getElementById("mapf").innerHTML+='<img src="image/map4.jpg" alt="" galleryImg="no" width="0" height="0" id="rmap4" />';re_map4k();}
  }
  }
 else{
 if(py>0.4){
  mpy2=Math.floor(mpy/2);
  document.getElementById("rmap1").style.width=document.getElementById("rmap2").style.width=document.getElementById("rmap3").style.width=document.getElementById("rmap4").style.width=mpy2;
  document.getElementById("rmap1").style.height=document.getElementById("rmap2").style.height=document.getElementById("rmap3").style.height=document.getElementById("rmap4").style.height=mpy2;
  document.getElementById("rmap3").style.top=document.getElementById("rmap4").style.top=mpy2+'px';
  document.getElementById("rmap2").style.left=document.getElementById("rmap4").style.left=mpy2+'px';
  document.getElementById("rmap1").style.display=document.getElementById("rmap2").style.display=document.getElementById("rmap3").style.display=document.getElementById("rmap4").style.display='block';
  document.getElementById("rmap").style.display='none';
  }
 else{
  document.getElementById("rmap").style.height=document.getElementById("rmap").style.width=mpy+"px";//2k縦横
  document.getElementById("rmap").style.display='block';
  document.getElementById("rmap1").style.display=document.getElementById("rmap2").style.display=document.getElementById("rmap3").style.display=document.getElementById("rmap4").style.display='none';
  }
  }
 document.getElementById("mapf").style.top=innt+'px';//上
 document.getElementById("mapf").style.left=innl+'px';//左
 document.getElementById("posi").style.top=Math.floor(-innt/(py*20))+"px";//小地図上
 document.getElementById("posi").style.left=Math.floor(-innl/(py*20))+"px";//小地図左
 document.getElementById("mapf").style.height=document.getElementById("mapf").style.width=mpy+"px";//地図外枠縦横
  //アイコン
 for(var i in idata){
  if(iconf[i]){
   document.getElementById("icon"+idata[i][3]).style.top=(Math.floor(eval(idata[i][4])*py)-8)+'px';
   document.getElementById("icon"+idata[i][3]).style.left=(Math.floor(eval(idata[i][5])*py)-8)+'px';
   if(mkf==i){
    document.getElementById("mk").style.top=(Math.floor(eval(idata[i][4])*py)-10)+'px';
    document.getElementById("mk").style.left=(Math.floor(eval(idata[i][5])*py)-10)+'px';
    }
   if(expf==i){
//document.f2.lmp.value=i;/**/
    settl_exp(i);
    }
   }
  }
 mpy=Math.floor((mapmin/20)/py);
 document.getElementById("posi").style.height=document.getElementById("posi").style.width=mpy+"px";
 document.bs.src="image/buttons.gif";
 document.bb.src="image/buttonb.gif";
 }
return false;
}
 //400k地図読込完了
function re_map4k(){
mpy2=Math.floor(4000*py/2);
document.getElementById("rmap3").style.top=document.getElementById("rmap4").style.top=document.getElementById("rmap2").style.left=document.getElementById("rmap4").style.left=mpy2+'px';
document.getElementById("rmap1").style.width=document.getElementById("rmap2").style.width=document.getElementById("rmap3").style.width=document.getElementById("rmap4").style.width=document.getElementById("rmap1").style.height=document.getElementById("rmap2").style.height=document.getElementById("rmap3").style.height=document.getElementById("rmap4").style.height=mpy2+'px';
document.getElementById("rmap1").style.display=document.getElementById("rmap2").style.display=document.getElementById("rmap3").style.display=document.getElementById("rmap4").style.display='block';
document.getElementById("rmap").style.display='none';
map4kf=true;
}
//マウス 移動
function mouseMove(e){
var x;
var y;
if(e){x=e.pageX;y=e.pageY;}
else if(event){
 x=event.clientX+document.body.scrollLeft;
 y=event.clientY+document.body.scrollTop;
 }
tm=y-eval(document.getElementById("navi").style.top.slice(0,-2));
lm=x-eval(document.getElementById("navi").style.left.slice(0,-2));
document.f2.t1.value=(y-eval(document.getElementById("navi").style.top.slice(0,-2))-eval(document.getElementById("mapf").style.top.slice(0,-2)))/py;/**/
document.f2.t2.value=(x-eval(document.getElementById("navi").style.left.slice(0,-2))-eval(document.getElementById("mapf").style.left.slice(0,-2)))/py;/**/
tms=y;
lms=x;
if(docm){
 tmds=(tmd+tm);
 lmds=(lmd+lm);
 m_lmit=-(4000*py-10);
 if(tmds>m_lmit&&tmds<(mapmin-10)){
  if(tmds>=0&&tmds<5)tmds=0;
  docm.style.top=tmds+'px';//上
  document.getElementById("posi").style.top=Math.floor(-tmds/(py*20))+"px";//小地図上
  }
 if(lmds>m_lmit&&lmds<(mapmin-10)){
  if(lmds>=0&&lmds<5)lmds=0;
  docm.style.left=lmds+'px';//左
  document.getElementById("posi").style.left=Math.floor(-lmds/(py*20))+"px";//小地図左
  }
 return false;
 }
else if(docms){
 tmds=(tms+tmd);
 lmds=(lms+lmd);
 if(tmds<(5-Math.floor(200*pys/py)))tmds=(5-Math.floor(200*pys/py));
 else {if(tmds>195)tmds=195;
  else if(tmds>=0&&tmds<5)tmds=0;
  }
 docms.style.top=tmds+"px";//小地図上
 document.getElementById("mapf").style.top=Math.floor(-tmds*(py*20))+'px';//上
 if(lmds<(5-Math.floor(200*pys/py)))lmds=(5-Math.floor(200*pys/py));
 else {if(lmds>195)lmds=195;
  else if(lmds>=0&&lmds<5)lmds=0;
  }
 docms.style.left=lmds+"px";//小地図左
 document.getElementById("mapf").style.left=Math.floor(-lmds*(py*20))+'px';//左
 return false;
 }
}
//移動開始
function mouseDown(){
document.getElementById("navi").style.cursor="move";
docm=document.getElementById("mapf");
tmd=eval(docm.style.top.slice(0,-2))-tm;
lmd=eval(docm.style.left.slice(0,-2))-lm;
return false;
}
//小地図移動開始
function mouseDowne(){
document.getElementById("s-mapf").style.cursor="move";
docms=document.getElementById("posi");
tmd=eval(docms.style.top.slice(0,-2))-tms;
lmd=eval(docms.style.left.slice(0,-2))-lms;
return false;
}
//マウス操作終了
function mouseUp(e){
if(docm){
 document.getElementById("navi").style.cursor="default";
 docm=null;
 }
if(docms){
 document.getElementById("s-mapf").style.cursor="default";
 docms=null;
 }
document.bs.src="image/buttons.gif";
document.bb.src="image/buttonb.gif";
document.ball.src="image/b-all.gif";
return false;
}
//アイコン全表示
function challch(){
if(!abuttonf){
 buttonf=new Array();
 abuttonf=true;
 document.getElementById("but").style.borderStyle="inset";
 document.getElementById("but").style.backgroundColor="#cc9933";
for(var isetx=7;isetx>=0;isetx--){
 wicon(document.getElementById("but"+isetx),'index');
 }
 }
else {
 /*x*/
 abuttonf=false;
 document.getElementById("but").style.borderStyle="outset";
 document.getElementById("but").style.backgroundColor="#ccffee";
 for(var isetx=7;isetx>=0;isetx--){
  inn=document.getElementById("but"+isetx);
  inn.style.borderStyle="outset";
  inn.style.backgroundColor="#ccffee";
  buttonf[inn.id]=false;
  }
 for(var i in idata){
  if(iconf[i]){
   document.getElementById("icon"+idata[i][3]).style.zIndex=0;
   if(mkf==i){document.getElementById("mk").style.zIndex=0;mkf='n';}
   if(listmf==i)document.getElementById("liin"+listmf).style.color='#000000';
   }
  }
 }
}
//全表示?
function wchall_x(){
allfin=0;/*x*/
for(var allfi=0;allfi<=7;allfi++){if(buttonf[document.getElementById("but"+allfi).id])allfin++;}
if(allfin>7){
 abuttonf=true;
 document.getElementById("but").style.borderStyle="inset";
 document.getElementById("but").style.backgroundColor="#cc9933";
 }
}
//アイコン 0.ふりがな 1.名称 2.分類 3.ID 4.上 5.左 6.アイコン 7.写真 8.電話 9.説明 10.url 11.リンク先名
function wicon(inn,set){
ser_datax=inn.innerHTML;
ser_datax=ser_datax.replace(/\<.*\>/,'');
ser_datax=ser_datax.replace(/\s/,'');
ser_data=ser_datax.split('・');
if(set=='index'){
 if(!buttonf[inn.id]){
  inn.style.borderStyle="inset";
  inn.style.backgroundColor="#cc9933";
  for(var i in idata){
   serf=false;
   for(var j in ser_data){
    if(idata[i][2].indexOf(ser_data[j])!=-1&&!serf){
     serf=true;
     set_icon(i);
     if(mkf!=i)document.getElementById("icon"+idata[i][3]).style.zIndex=5;
     else document.getElementById("icon"+idata[i][3]).style.zIndex=7;
     }
    }
   if(!serf&&iconf[i]&&document.getElementById("icon"+idata[i][3]).style.zIndex==5)document.getElementById("icon"+idata[i][3]).style.zIndex=4;
   }
  buttonf[inn.id]=true;
  wchall_x();
  }
 else {
  inn.style.borderStyle="outset";
  inn.style.backgroundColor="#ccffee";
  document.getElementById("but").style.borderStyle="outset";
  document.getElementById("but").style.backgroundColor="#ccffee";
  abuttonf=false;
  for(var i in idata){
   for(var j in ser_data){
    if(idata[i][2].indexOf(ser_data[j])!=-1){
     if(iconf[i]){
      document.getElementById("icon"+idata[i][3]).style.zIndex=0;
      if(mkf==i){document.getElementById("mk").style.zIndex=0;mkf='n';}
      if(listmf==i)document.getElementById("liin"+listmf).style.color='#000000';
      }
     }
    }
   }
  buttonf[inn.id]=false;
  }
 }/*index end*/
}
function set_icon(i){
if(!iconf[i]){
 w_html='<img src="icon/'+idata[i][6]+'" galleryImg="no" width="16" height="16" id="icon'+idata[i][3]+'" class="iconf" onMouseOver="info('+i+','+"'e'"+');" onMouseOut="imou('+i+');" onClick="info('+i+','+"'s'"+');on_mark('+i+');"';
 if(idata[i][10]!='')w_html+=' onDblClick="gourl('+i+');"';
  w_html+=' />';
  document.getElementById("iconbox").innerHTML+=w_html;
  iconf[i]=true;
  }
 document.getElementById("icon"+idata[i][3]).style.top=(Math.floor(eval(idata[i][4])*py)-8)+'px';
 document.getElementById("icon"+idata[i][3]).style.left=(Math.floor(eval(idata[i][5])*py)-8)+'px';
}
//アイコンクリック
function on_mark(i){
if(mkf!='n')document.getElementById("icon"+idata[mkf][3]).style.zIndex=5;
document.getElementById("mk").style.top=(Math.floor(eval(idata[i][4])*py)-10)+'px';
document.getElementById("mk").style.left=(Math.floor(eval(idata[i][5])*py)-10)+'px';
document.getElementById("icon"+idata[i][3]).style.zIndex=7;
document.getElementById("mk").style.zIndex=6;
if(listmf!='n')document.getElementById("liin"+listmf).style.color='#000000';
mkf=i;
}
//アイコンダブルクリック
function gourl(inn){
window.open(idata[inn][10]);
}
//設備情報
function info(inn,isel){
if(!docm){
 tw_html=pw_html=iw_html=uw_html=euw_html='';
 w_html='<div id="iruby">'+idata[inn][0]+'</div><div id="iname">'+idata[inn][1]+'</div>';
if(idata[inn][8]!=''){
 tw_html='<div id="itel">';
 if(!idata[inn][8].match(/^\(/)||!idata[inn][8].match(/^0/))tw_html+='(0969)';
 tw_html+=idata[inn][8]+'</div>';
 }
 if(idata[inn][7]!=''){pw_html='<div id="eximg"><img src="photo/'+idata[inn][7]+'" alt="" galleryImg="no" width="160" height="120" /></div>'};
 iw_html='<div id="i1">'+idata[inn][9]+'</div>';
 if(idata[inn][10]!=''||(idata[inn].length>12&&idata[inn][12]!=''))euw_html='<br /><div id="iurl">リンク</div>';
if(idata[inn][10]!=''){
 uw_html='<div id="iurl">ダブルクリックで'+idata[inn][11]+'へ</div>';
 euw_html+='<div id="iurl"><a href="'+idata[inn][10]+'" target="_blank">'+idata[inn][11]+'</a></div>';
 }
if(idata[inn].length>12){
for(var i=12;i<idata[inn].length;i+=2){
 euw_html+='<div id="iurl"><a href="'+idata[inn][i]+'" target="_blank">'+idata[inn][i+1]+'</a></div>';
 }
 }
if(isel=='e'){
settl_exp(inn);
 document.getElementById("exp").innerHTML=w_html+pw_html+uw_html;
 document.getElementById("exp").style.display='block';
 }
 else if(isel=='s')document.getElementById("sepf").innerHTML=w_html+tw_html+pw_html+iw_html+euw_html;
}
}

function settl_exp(inn){
expf=inn;
if(tm<mapmin/2){
 document.getElementById("exp").style.top=Math.round(eval(idata[inn][4])*py+8)+'px';
 document.getElementById("exp").style.bottom='auto';
 }
else {
 document.getElementById("exp").style.top='auto';
 document.getElementById("exp").style.bottom=Math.round((4000-eval(idata[inn][4]))*py+8)+'px';
 }
if(lm<mapmin/2)document.getElementById("exp").style.left=Math.round((eval(idata[inn][5]))*py+10)+'px';else document.getElementById("exp").style.left=Math.round((eval(idata[inn][5]))*py-200)+'px';
}

function imou(){
expf=null;
document.getElementById("exp").style.display='none';
}
//設備リスト全表示
function allwlist(){
document.getElementById("list").innerHTML='';
 /*x*/
for(var isetx=0;isetx<=7;isetx++){
 inn=document.getElementById("listb"+isetx);
 document.getElementById("list").innerHTML+='<div class="liinh">【'+inn.innerHTML+'】</div><br class="clr" />';
 wlist(inn,'a');
 }
}
//設備リスト
function wlist(inn,serw){
ser_data=inn.innerHTML.split('・');
listf=new Array(idata.length);
listmf='n';
if(serw=='s')document.getElementById("list").innerHTML='';
for(var i in idata){
 for(var j in ser_data){
  if(idata[i][2].indexOf(ser_data[j])!=-1&&!listf[i]){
   document.getElementById("list").innerHTML+=set_list(i);
   }
  }
 }
}
//検索リスト
function slist(){
data=document.f1.ret.value.replace(/　/g,' ');
ser_data=data.split(' ');
listf=new Array(idata.length);
listmf='n';
list_html=new Array();
for(var i=0;i<4;i++){list_html[i]='';}
document.getElementById("list").innerHTML='';
for(var i in idata){
 k=0;
 for(var j in ser_data){if(idata[i][0].indexOf(ser_data[j])!=-1)k++;}
 if(k>=ser_data.length){list_html[0]+=set_list(i);}
 else{
  k=0;
  for(var j in ser_data){if(idata[i][1].indexOf(ser_data[j])!=-1)k++;}
  if(k>=ser_data.length){list_html[0]+=set_list(i);}
  else{
   k=0;
   for(var j in ser_data){if(idata[i][2].indexOf(ser_data[j])!=-1)k++;}
   if(k>=ser_data.length){list_html[1]+=set_list(i);}
   else{
    k=0;
    for(var j in ser_data){if(idata[i][9].indexOf(ser_data[j])!=-1)k++;}
    if(k>=ser_data.length){list_html[2]+=set_list(i);}
    else{
     k=0;
     for(var j in ser_data){if(idata[i][0].indexOf(ser_data[j])!=-1||idata[i][1].indexOf(ser_data[j])!=-1||idata[i][2].indexOf(ser_data[j])!=-1||idata[i][9].indexOf(ser_data[j])!=-1)k++;}
     if(k>=ser_data.length){list_html[3]+=set_list(i);}
     }
    }
   }
  }
 }
if(list_html[0]!=''||list_html[1]!=''||list_html[2]!=''||list_html[3]!='')document.getElementById("list").innerHTML=list_html[0]+list_html[1]+list_html[2]+list_html[3];
else document.getElementById("list").innerHTML='検索結果　０件';
}
 /**/
function set_list(i){
listf[i]=true;
html_data='<div id="liin'+i+'" class="liin" onClick="lwicon('+i+');" onDblClick="list_cen('+i+')" ><img src="icon/'+idata[i][6]+'" alt="" galleryImg="no" width="16" height="16" /><div>'+idata[i][1]+'</div></div><br class="clr" />';
return html_data;
}
function lwicon(inn){
set_icon(inn);
on_mark(inn);
info(inn,'s');
document.getElementById("liin"+inn).style.color='#ff0000';
listmf=inn;
icon_q(inn);
}
 /*ボタン別アイコン全表示?*/
function icon_q(inn){
serf=false;
for(var allfi=0;allfi<=7;allfi++){
 ser_datax=document.getElementById("but"+allfi).innerHTML;
 ser_datax=ser_datax.replace(/\<.*\>/,'');
 ser_datax=ser_datax.replace(/\s/,'');
 ser_data=ser_datax.split('・');
 for(var j in ser_data){
  if(idata[inn][2].indexOf(ser_data[j])!=-1)serf=true;
  }
 if(serf)break;
 }
count=0;
serf=false;
for(var i in idata){
 serf=false;
 for(var j in ser_data){
  if(idata[i][2].indexOf(ser_data[j])!=-1)serf=true;
  }
 if(serf){if(iconf[i]&&document.getElementById("icon"+idata[i][3]).style.zIndex>3)count++;}
 }
if(facn[allfi]==count){
 inn=document.getElementById('but'+allfi);
 inn.style.borderStyle="inset";
 inn.style.backgroundColor="#cc9933";
 buttonf[inn.id]=true;
 wchall_x();
 }
}
//リスト→中央表示
function list_cen(inn){
tmds=mapmin/2-Math.floor((eval(idata[inn][4]))*py);
lmds=mapmin/2-Math.floor((eval(idata[inn][5]))*py);
document.getElementById("mapf").style.top=tmds+'px';//地図上
document.getElementById("posi").style.top=Math.floor(-tmds/(py*20))+"px";//小地図上
document.getElementById("mapf").style.left=lmds+'px';//地図左
document.getElementById("posi").style.left=Math.floor(-lmds/(py*20))+"px";//小地図左
return false;
}