nav=navigator.appName.substring(0,1);
uu=(document.URL+"?").split("?");
if(uu[1]!=""){
dd=uu[1].split(",");
xx=dd[0]*1;yy=dd[1]*1;
}
//地図の縦横長さ
function img_size(){
img_w=0;img_h=0;ij=0;
dd=map.split(";");
for(i=0;i<dd.length;i++){
pp=dd[i].split(",");
for(j=0;j<pp.length;j++){
img_w+=tizu.document.images[ij].width;
img_h+=tizu.document.images[ij].height;
ij++;
}
}
img_ww=img_w/j;img_hh=img_h/i;


}
mov_flg=0;
//左右上下
function mov(x,y){
if(mov_flg==0){
mx=x*4;my=y*4;
mov_sub();
mov_flg=1;
}
}
//移動ルーチン
function mov_sub(){
xx=xx+mx;yy=yy+my;

xxyy();
mv_tim=setTimeout("mov_sub()",30);
}
//静止
function stp(){
if(mov_flg==1){
clearTimeout(mv_tim);
mov_flg=0;
tizu.document.getElementById("point").style.top = yy+260;
tizu.document.getElementById("point").style.left =xx+300;
document.f_xy.ee_xx.value=xx;
document.f_xy.ee_yy.value=yy;
}
}
//クリック位置へ移動
function xy_set(){
ssx=document.f_xy.e_x.value*1-360;
ssy=document.f_xy.e_y.value*1-320;
if(nav=="N"){
ssx=ssx-(document.f_xy.e_xx.value*1);
ssy=ssy-(document.f_xy.e_yy.value*1);
}
abs_x=Math.abs(ssx);abs_y=Math.abs(ssy);
if(abs_x>abs_y){ss=abs_x;}else{ss=abs_y;}
hh=Math.floor(ss/10);
dxx=xx;dyy=yy;
tizu.document.getElementById("point").style.top = yy+ssy+260;
tizu.document.getElementById("point").style.left =xx+ssx+300;
document.f_xy.ee_xx.value=xx+ssx;
document.f_xy.ee_yy.value=yy+ssy;
x1=ssx/hh;y1=ssy/hh;h=0;
xy_set_sub();

}


function xy_set_sub(){
h++;
if(h>hh){
clearTimeout(set_tim);
xx=dxx+ssx;
yy=dyy+ssy;
xxyy();
return
}
xx=dxx+x1*h;
yy=dyy+y1*h;
if(xx<0){xx=0;}
if(yy<0){yy=00;}
if(xx>3320){xx=3320;}
if(yy>2520){yy=2520;}
document.f_xy.e_xx.value=xx;
document.f_xy.e_yy.value=yy;
tizu.scrollTo(xx,yy);
set_tim=setTimeout("xy_set_sub()",30);
}
//メニューに移動
function xy_point(p){
if(p==0){return;}
pp=dt[p].split(",");
document.f_xy.e_name.value=pp[0];
document.f_xy.e_url.value=pp[3];
document.f_xy.e_mail.value=pp[4];
document.f_xy.e_tel.value=pp[5];
d0=pp[6];d1=d0.split("|");
d2="";
for(i=0;i<d1.length;i++){
d2+=d1[i]+"\n";
}
document.f_xy.e_com.value=d2;
document.f_xy.e_oner.value=pp[7];
ssx=pp[1]*1-xx;
ssy=pp[2]*1-yy;
abs_x=Math.abs(ssx);abs_y=Math.abs(ssy);
if(abs_x>abs_y){ss=abs_x;}else{ss=abs_y;}
hh=Math.floor(ss/10);
dxx=xx;dyy=yy;
tizu.document.getElementById("point").style.top = yy+ssy+260;
tizu.document.getElementById("point").style.left =xx+ssx+300;
document.f_xy.ee_xx.value=xx+ssx;
document.f_xy.ee_yy.value=yy+ssy;
x1=ssx/hh;y1=ssy/hh;h=0;
xy_set_sub();

}

//移動位置
function xxyy(){
if(xx<0){xx=0;}
if(yy<0){yy=00;}
if(xx>(img_ww-864)){xx=img_ww-864;}
if(yy>(img_hh-640)){yy=img_hh-640;}
document.f_xy.e_xx.value=xx;
document.f_xy.e_yy.value=yy;
tizu.scrollTo(xx,yy);


}
//マウスボタン開放
window.document.onmouseup=stp;

//名簿５０音順

md=new Array();

mn=0;
for(i=1;i<=n;i++){
dd=dt[i].split(",");
md[mn]=dd[0]+","+i;
mn++;
}
md.sort();

//ページ作成

document.write('<table  width="864" border="0"><tr valign=top><td valign=top><font size=2>');
//document.write('<form name="f_xy">');
document.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;下の枠内で緑マークにマウスを置き、「手のマーク」になる場所をクリックすると映像が開きます。&nbsp;&nbsp;&nbsp;&nbsp;<img src='./img/go.gif' valign=top>目的地&nbsp;&nbsp;<select name='namaes' onChange='xy_point(this.options[this.selectedIndex].value)'>");
for(i=0;i<mn;i++){
dd=md[i].split(",");
document.write("<option  value='",dd[1],"'>",dd[0]);
}
document.write("<option  value='0' selected>選択してください");
document.write("</select>\n");

document.write('<input type="hidden" name="map_dt" value="',map,'">');
document.write('<input type="hidden" name="map_url" value="',url,'">');

document.write('</td></tr><tr valign=top><td valign=top>');
document.write('<table border="0" bgcolor=white width=896>');
document.write('<tr height=20><th width=32 onmouseDown="mov(-1,-1)" onMouseOut="stp()"></th><th onmouseDown="mov(0,-1)"></th><th width=32 onmouseDown="mov(1,-1)" onMouseOut="stp()"></th></tr>');
document.write('<tr><th onmouseDown="mov(-1,0)" onMouseOut="stp()"></th><th>');
document.write('<iframe src="mati_win.htm" width=864 height=640 name="tizu" scrolling=no></iframe>');
document.write('</th><th width=32 onmouseDown="mov(1,0)" onMouseOut="stp()"></th></tr>');
document.write('<tr height=20><th onmouseDown="mov(-1,1)" onMouseOut="stp()"></th><th onmouseDown="mov(0,1)" onMouseOut="stp()"></th><th onmouseDown="mov(1,1)" onMouseOut="stp()"></th></tr>');
document.write('</table>');

