function selectedLinker(hopper){
 location.href = hopper.options[hopper.selectedIndex].value;
}

function Keisan(){
a=document.form1.keido.value
b=document.form1.ido.value
c=document.form1.hensa.value
d=document.form1.sat.value
f=document.form1.kai.value


with (Math) {


//2005.2.23修正。最後のほうのマップからの連動代入「分」表示に直した
//aa=aの整数部分（アポストロフィ以前）を抜き出す
if ((""+a).indexOf("'")> -1) 
aa = Number((String(a).split("'"))[0]);
else aa= 0;
//ab=aの小数部分・分(アポストロフィ以降）を抜き出す
if ((""+a).indexOf("'")> -1)
ab = Number("0."+(String(a).split("'"))[1]);
else ab= 0;
//分(60進数）を少数に変換、aを作り直す
ac = aa+ab*1.66

//ba=bの整数部分（アポストロフィ以前）を抜き出す
if ((""+a).indexOf("'")> -1)
ba = Number((String(b).split("'"))[0]);
else ba= 0;
//bb=bの小数部分・分(アポストロフィ以降）を抜き出す
if ((""+b).indexOf("'")> -1)
bb = Number("0."+(String(b).split("'"))[1]);
else bb= 0;
//分(60進数）を少数に変換、bを作り直す
bc = ba+bb*1.66

//ここまで。

e=d-ac

g=bc/180*PI
h=cos(g)
i=1/(h*sqrt(1/pow(6378.16,2)+(pow(tan(g)/6356.775,2))))+f/1000
j=e/180*PI
k=h*cos(j)
l=pow(42178.16,2)+pow(i,2)-42178.16*i*2*k
m=(l+pow(i,2)-pow(42178.16,2))/(2*i*sqrt(l))
n=i/tan(g)
o=i/sin(g)
p=cos(acos(m)-PI/2)
q=sqrt(l)
r=pow(42178.16,2)+pow(o,2)
s=(l+pow(n,2)-r)/(2*q*n)
t=acos(s/p)/PI*180
u=c-0

el1=acos(m)/PI*180-90
}

if (e<0) {
az1=360-t }
if (e>=0) {
az1=t }

az2=az1+u


//四捨五入で表示する桁数を指定できる汎用関数
//numは四捨五入する数値。ketaは表示する桁数。
//四捨五入されるのは小数点以下keta+1桁目。
//計算結果が長く表示されすぎるため設定(2002.8.5)
function roundNum(num,keta){
var chKeta = Math.pow(10,keta)
var tmp_num = num*chKeta
var tmp_result = Math.round(tmp_num)
var result = tmp_result/chKeta
return result
}

//roundNumで計算し、表示。
//numは各計算結果を、カンマのあとの数値は
//表示する小数点以下の桁数を代入。
document.form1.AZ.value=roundNum(az1,3)
document.form1.AZ2.value=roundNum(az2,3)
document.form1.EL.value=roundNum(el1,3)

}



//衛星の東経と名前の代入
//function Tdrs ( ) {
//document.form1.sat.value=185.7
//document.form1.namae.value="TDRS-F5"
//}


function Nss5 ( ) {
document.form1.sat.value=183
document.form1.namae.value="NSS-5"
}

function Intl701 ( ) {
document.form1.sat.value=180
document.form1.namae.value="Intelsat-701"
}

//function Intl702 ( ) {
//document.form1.sat.value=177
//document.form1.namae.value="Intelsat-702"
//}

//function Intl804 ( ) {
//document.form1.sat.value=176
//document.form1.namae.value="Intelsat-804"
//}


//function Intl802 ( ) {
//document.form1.sat.value=174
//document.form1.namae.value="Intelsat-802"
//}

function Ge23 ( ) {
document.form1.sat.value=172
document.form1.namae.value="GE-23"
}

function Intl2 ( ) {
document.form1.sat.value=169
document.form1.namae.value="Intelsat-2"
}

function Intl8 ( ) {
document.form1.sat.value=166
document.form1.namae.value="Intelsat-8"
}

function SbirdB2 ( ) {
document.form1.sat.value=162
document.form1.namae.value="SuperBird-B2"
}

function SbirdA ( ) {
document.form1.sat.value=158
document.form1.namae.value="SuperBird-A"
}

function Jc2A ( ) {
document.form1.sat.value=154
document.form1.namae.value="JCSAT-2A"
}

function JcR ( ) {
document.form1.sat.value=150
document.form1.namae.value="JCSAT-R"
}

function Mea2 ( ) {
document.form1.sat.value=148
document.form1.namae.value="Measat-2"
}

function AG2 ( ) {
document.form1.sat.value=146
document.form1.namae.value="Agila-2"
}

//function Gor33 ( ) {
//document.form1.sat.value=145
//document.form1.namae.value="Gorizont-33"
//}

function SbirdC ( ) {
document.form1.sat.value=144
document.form1.namae.value="SuperBird-C"
}


function Exp3 ( ) {
document.form1.sat.value=140
document.form1.namae.value="Express-AM3" 
}


function Tel18 ( ) {
document.form1.sat.value=138
document.form1.namae.value="TELSTAR-18"
}

function Nstab ( ) {
document.form1.sat.value=136
document.form1.namae.value="N-star-b"
}

function Ap6 ( ) {
document.form1.sat.value=134
document.form1.namae.value="Apstar-6"
}

function Jc5A ( ) {
document.form1.sat.value=132
document.form1.namae.value="JCSAT-5A"
}

function Jc3 ( ) {
document.form1.sat.value=128
document.form1.namae.value="JCSAT-3"
}

function Sino3 ( ) {
document.form1.sat.value=125
document.form1.namae.value="Sinosat-3"
}

function Jc4A ( ) {
document.form1.sat.value=124
document.form1.namae.value="JCSAT-4A"
}

function Asia4 ( ) {
document.form1.sat.value=122.2
document.form1.namae.value="Asiasat-4"
}

function Thai1A ( ) {
document.form1.sat.value=120
document.form1.namae.value="Thaicom-1A"
}

function Korea ( ) {
document.form1.sat.value=116
document.form1.namae.value="Koreasat-3"
}

function Chi6 ( ) {
document.form1.sat.value=115
document.form1.namae.value="Chinasat-6"
}

function PC2K5 ( ) {
document.form1.sat.value=113
document.form1.namae.value="Palapa-C2,Koreasat-5"
}

function Sino1 ( ) {
document.form1.sat.value=110.5
document.form1.namae.value="Sinosat-1"
}

function Bs12Nsat ( ) {
document.form1.sat.value=110
document.form1.namae.value="B-sat1A, B-sat2A, Nsat-110"
}


function Nss11 ( ) {
document.form1.sat.value=108.0
document.form1.namae.value="NSS-11"
}

function Asia3s ( ) {
document.form1.sat.value=105.5
document.form1.namae.value="Asiasat-3S"
}

function ExpA2 ( ) {
document.form1.sat.value=103
document.form1.namae.value="Express-A2"
}

function Asia2 ( ) {
document.form1.sat.value=100.5
document.form1.namae.value="Asiasat-2"
}

//function Exp11 ( ) {
//document.form1.sat.value=96.5
//document.form1.namae.value="Express AM-11"
//}

function Nss6 ( ) {
document.form1.sat.value=95
document.form1.namae.value="Nss-6"
}

//function In3A ( ) {
//document.form1.sat.value=93.5
//document.form1.namae.value="Insat-3A"
//}

function Mea13 ( ) {
document.form1.sat.value=91.5
document.form1.namae.value="Measat-1,3"
}

function Yama201 ( ) {
document.form1.sat.value=90.0
document.form1.namae.value="Yamal-201"
}

//function Yama102 ( ) {
//document.form1.sat.value=89.8
//document.form1.namae.value="Yamal-102"
//}


function St1 ( ) {
document.form1.sat.value=88
document.form1.namae.value="ST-1"
}

function Cstar1 ( ) {
document.form1.sat.value=87.5
document.form1.namae.value="ChinaStar-1"
}

function Intl709 ( ) {
document.form1.sat.value=85.2
document.form1.namae.value="Intelsat-709"
}

function In2E ( ) {
document.form1.sat.value=83
document.form1.namae.value="Insat-2E"
}

function Exp2 ( ) {
document.form1.sat.value=80
document.form1.namae.value="Express-AM2"
}

function Thai23 ( ) {
document.form1.sat.value=78.5
document.form1.namae.value="Thaicom-2,3"
}

function Tel10 ( ) {
document.form1.sat.value=76.5
document.form1.namae.value="Telstar-10"
}

function ABS1 ( ) {
document.form1.sat.value=75
document.form1.namae.value="ABS-1"
}

//function In3C ( ) {
//document.form1.sat.value=74
//document.form1.namae.value="Insat-3C"
//}

function Intl4 ( ) {
document.form1.sat.value=72
document.form1.namae.value="Intelsat-4"
}

function EutW5 ( ) {
document.form1.sat.value=70.5
document.form1.namae.value="Eutelsat-W5"
}

function Intl710 ( ) {
document.form1.sat.value=68.5
document.form1.namae.value="Intelsat-7,10"
}

function Intl704 ( ) {
document.form1.sat.value=66
document.form1.namae.value="Intelsat-704"
}

function Intl906 ( ) {
document.form1.sat.value=64.2
document.form1.namae.value="Intelsat-906"
}

function Intl902 ( ) {
document.form1.sat.value=62
document.form1.namae.value="Intelsat-902"
}

function Intl904 ( ) {
document.form1.sat.value=60
document.form1.namae.value="Intelsat-904"
}

function NSS703 ( ) {
document.form1.sat.value=57
document.form1.namae.value="NSS-703"
}



//地図から都市の緯度、経度、偏差を代入
//緯度と経度の数値は、都道府県庁所在地または
//地方庁の位置情報から得たもの、分　で記入　2005.1.28変更
//「分」表記にあわせて小数点をアポストロフィに。　2005.2.23変更

function Wakkanai ( ) {
document.form1.keido.value="141'4"
document.form1.ido.value="45'24"
document.form1.hensa.value=9.7
document.form1.placename.value="稚内"
}

function Asahikawa ( ) {
document.form1.keido.value="142'22"
document.form1.ido.value="43'46"
document.form1.hensa.value=9.0
document.form1.placename.value="旭川"
}

function Sapporo ( ) {
document.form1.keido.value="141'21"
document.form1.ido.value="43'03"
document.form1.hensa.value=9.0
document.form1.placename.value="札幌"
}

function Hakodate ( ) {
document.form1.keido.value="140'43"
document.form1.ido.value="41'46"
document.form1.hensa.value=8.7
document.form1.placename.value="函館"
}

function Aomori ( ) {
document.form1.keido.value="140'44"
document.form1.ido.value="40'49"
document.form1.hensa.value=8.3
document.form1.placename.value="青森"
}

function Morioka ( ) {
document.form1.keido.value="141'09"
document.form1.ido.value="39'42"
document.form1.hensa.value=7.8
document.form1.placename.value="盛岡"
}

function Akita ( ) {
document.form1.keido.value="140'06"
document.form1.ido.value="39'43"
document.form1.hensa.value=8.2
document.form1.placename.value="秋田"
}

function Senndai ( ) {
document.form1.keido.value="140'52"
document.form1.ido.value="38'15"
document.form1.hensa.value=7.4
document.form1.placename.value="仙台"
}

function Yamagata ( ) {
document.form1.keido.value="140'22"
document.form1.ido.value="38'14"
document.form1.hensa.value=7.5
document.form1.placename.value="山形"
}

function Fukushima ( ) {
document.form1.keido.value="140'28"
document.form1.ido.value="37'44"
document.form1.hensa.value=7.3
document.form1.placename.value="福島"
}

function Nigata ( ) {
document.form1.keido.value="139'1"
document.form1.ido.value="37'54"
document.form1.hensa.value=7.6
document.form1.placename.value="新潟"
}

function Mito ( ) {
document.form1.keido.value="140'26"
document.form1.ido.value="36'2"
document.form1.hensa.value=6.7
document.form1.placename.value="水戸"
}

function Utsunomiya ( ) {
document.form1.keido.value="139'53"
document.form1.ido.value="36'33"
document.form1.hensa.value=6.9
document.form1.placename.value="宇都宮"
}

function Maebashi ( ) {
document.form1.keido.value="139'03"
document.form1.ido.value="36'23"
document.form1.hensa.value=7.0
document.form1.placename.value="前橋"
}

function Omiya ( ) {
document.form1.keido.value="139'39"
document.form1.ido.value="35'51"
document.form1.hensa.value=6.7
document.form1.placename.value="大宮"
}

function Tokyo ( ) {
document.form1.keido.value="139'41"
document.form1.ido.value="35'41"
document.form1.hensa.value=6.6
document.form1.placename.value="東京"
}

function Chiba ( ) {
document.form1.keido.value="140'07"
document.form1.ido.value="35'36"
document.form1.hensa.value=6.5
document.form1.placename.value="千葉"
}

function Yokohama ( ) {
document.form1.keido.value="139'38"
document.form1.ido.value="35'26"
document.form1.hensa.value=6.5
document.form1.placename.value="横浜"
}

function Koufu ( ) {
document.form1.keido.value="138'34"
document.form1.ido.value="35'39"
document.form1.hensa.value=6.8
document.form1.placename.value="甲府"
}

function Nagano ( ) {
document.form1.keido.value="138'11"
document.form1.ido.value="36'39"
document.form1.hensa.value=7.2
document.form1.placename.value="長野"
}

function Shizuoka ( ) {
document.form1.keido.value="138'23"
document.form1.ido.value="34'58"
document.form1.hensa.value=6.6
document.form1.placename.value="静岡"
}

function Toyama ( ) {
document.form1.keido.value="137'13"
document.form1.ido.value="36'41"
document.form1.hensa.value=7.4 
document.form1.placename.value="富山"
}

function Kanazawa ( ) {
document.form1.keido.value="136'37"
document.form1.ido.value="36'35"
document.form1.hensa.value=7.4
document.form1.placename.value="金沢"
}

function Fukui ( ) {
document.form1.keido.value="136'13"
document.form1.ido.value="36'03"
document.form1.hensa.value=7.2
document.form1.placename.value="福井"
}

function Gifu ( ) {
document.form1.keido.value="136'43"
document.form1.ido.value="35'23"
document.form1.hensa.value=7.0
document.form1.placename.value="岐阜"
}

function Nagoya ( ) {
document.form1.keido.value="136'54"
document.form1.ido.value="35'1"
document.form1.hensa.value=6.8
document.form1.placename.value="名古屋"
}

function Tsu ( ) {
document.form1.keido.value="136'3"
document.form1.ido.value="34'43"
document.form1.hensa.value=6.8
document.form1.placename.value="津"
}

function Ootsu ( ) {
document.form1.keido.value="135'52"
document.form1.ido.value="35'0"
document.form1.hensa.value=6.9
document.form1.placename.value="大津"
}

function Kyoto ( ) {
document.form1.keido.value="135'45"
document.form1.ido.value="35'01"
document.form1.hensa.value=6.9
document.form1.placename.value="京都"
}

function Nara ( ) {
document.form1.keido.value="135'5"
document.form1.ido.value="34'4"
document.form1.hensa.value=6.8
document.form1.placename.value="奈良"
}

function Wakayama ( ) {
document.form1.keido.value="135'1"
document.form1.ido.value="34'13"
document.form1.hensa.value=6.7
document.form1.placename.value="和歌山"
}

function Osaka ( ) {
document.form1.keido.value="135'31"
document.form1.ido.value="34'41"
document.form1.hensa.value=6.8
document.form1.placename.value="大阪"
}

function Koube ( ) {
document.form1.keido.value="135'11"
document.form1.ido.value="34'41"
document.form1.hensa.value=6.8
document.form1.placename.value="神戸"
}

function Tottori ( ) {
document.form1.keido.value="134'14"
document.form1.ido.value="35'3"
document.form1.hensa.value=7.1
document.form1.placename.value="鳥取"
}

function Matsue ( ) {
document.form1.keido.value="133'03"
document.form1.ido.value="35'28"
document.form1.hensa.value=7.1
document.form1.placename.value="松江"
}

function Okayama ( ) {
document.form1.keido.value="133'56"
document.form1.ido.value="34'39"
document.form1.hensa.value=6.9
document.form1.placename.value="岡山"
}

function Hiroshima ( ) {
document.form1.keido.value="132'27"
document.form1.ido.value="34'23"
document.form1.hensa.value=6.8
document.form1.placename.value="広島"
}

function Yamaguchi ( ) {
document.form1.keido.value="131'28"
document.form1.ido.value="34'1"
document.form1.hensa.value=6.6
document.form1.placename.value="山口"
}

function Takamatsu ( ) {
document.form1.keido.value="134'02"
document.form1.ido.value="34'2"
document.form1.hensa.value=6.8
document.form1.placename.value="高松"
}

function Tokushima ( ) {
document.form1.keido.value="134'33"
document.form1.ido.value="34'03"
document.form1.hensa.value=6.2
document.form1.placename.value="徳島"
}

function Kouchi ( ) {
document.form1.keido.value="133'32"
document.form1.ido.value="33'33"
document.form1.hensa.value=6.5
document.form1.placename.value="高知"
}

function Matsuyama ( ) {
document.form1.keido.value="132'46"
document.form1.ido.value="33'5"
document.form1.hensa.value=6.6
document.form1.placename.value="松山"
}

function Fukuoka ( ) {
document.form1.keido.value="130'25"
document.form1.ido.value="33'36"
document.form1.hensa.value=6.4
document.form1.placename.value="福岡"
}

function Ooita ( ) {
document.form1.keido.value="131'36"
document.form1.ido.value="33'14"
document.form1.hensa.value=6.4
document.form1.placename.value="大分"
}

function Saga ( ) {
document.form1.keido.value="130'18"
document.form1.ido.value="33'14"
document.form1.hensa.value=6.3
document.form1.placename.value="佐賀"
}

function Nagasaki ( ) {
document.form1.keido.value="129'52"
document.form1.ido.value="32'44"
document.form1.hensa.value=6.1
document.form1.placename.value="長崎"
}

function Kumamoto ( ) {
document.form1.keido.value="130'44"
document.form1.ido.value="32'47"
document.form1.hensa.value=6.2
document.form1.placename.value="熊本"
}

function Miyazaki ( ) {
document.form1.keido.value="131'25"
document.form1.ido.value="31'54"
document.form1.hensa.value=6.0
document.form1.placename.value="宮崎"
}

function Kagoshima ( ) {
document.form1.keido.value="130'33"
document.form1.ido.value="31'33"
document.form1.hensa.value=5.8
document.form1.placename.value="鹿児島"
}

function Naha ( ) {
document.form1.keido.value="127'4"
document.form1.ido.value="26'12"
document.form1.hensa.value=3.9
document.form1.placename.value="那覇"
}

